Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 42 for BinaryExpr (0.23 sec)

  1. src/cmd/compile/internal/walk/convert.go

    	// pointers, usually for alignment."
    	var originals []ir.Node
    	var walk func(n ir.Node)
    	walk = func(n ir.Node) {
    		switch n.Op() {
    		case ir.OADD:
    			n := n.(*ir.BinaryExpr)
    			walk(n.X)
    			walk(n.Y)
    		case ir.OSUB, ir.OANDNOT:
    			n := n.(*ir.BinaryExpr)
    			walk(n.X)
    		case ir.OCONVNOP:
    			n := n.(*ir.ConvExpr)
    			if n.X.Type().IsUnsafePtr() {
    				n.X = cheapExpr(n.X, init)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 09 17:28:22 UTC 2023
    - 18.2K bytes
    - Viewed (0)
  2. src/go/doc/exports.go

    	case *ast.StarExpr: // possibly an embedded type literal
    		r.filterType(nil, t.X)
    	case *ast.UnaryExpr:
    		if t.Op == token.TILDE { // approximation element
    			r.filterType(nil, t.X)
    		}
    	case *ast.BinaryExpr:
    		if t.Op == token.OR { // union
    			r.filterType(nil, t.X)
    			r.filterType(nil, t.Y)
    		}
    	case *ast.ArrayType:
    		r.filterType(nil, t.Elt)
    	case *ast.StructType:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 01 18:18:07 UTC 2022
    - 8.5K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/syntax/parser.go

    // Expressions
    
    func (p *parser) expr() Expr {
    	if trace {
    		defer p.trace("expr")()
    	}
    
    	return p.binaryExpr(nil, 0)
    }
    
    // Expression = UnaryExpr | Expression binary_op Expression .
    func (p *parser) binaryExpr(x Expr, prec int) Expr {
    	// don't trace binaryExpr - only leads to overly nested trace output
    
    	if x == nil {
    		x = p.unaryExpr()
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 62.9K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/walk/order.go

    		return
    	}
    	if len(s) < 2 || s[0] == nil || s[0].Op() != ir.OAS || s[1] == nil || s[1].Op() != ir.OCOPY {
    		return
    	}
    
    	as := s[0].(*ir.AssignStmt)
    	cp := s[1].(*ir.BinaryExpr)
    	if as.Y == nil || as.Y.Op() != ir.OMAKESLICE || ir.IsBlank(as.X) ||
    		as.X.Op() != ir.ONAME || cp.X.Op() != ir.ONAME || cp.Y.Op() != ir.ONAME ||
    		as.X.Name() != cp.X.Name() || cp.X.Name() == cp.Y.Name() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 02:00:33 UTC 2024
    - 42.7K bytes
    - Viewed (0)
  5. src/go/types/expr.go

    	return true
    }
    
    // opName returns the name of the operation if x is an operation
    // that might overflow; otherwise it returns the empty string.
    func opName(e ast.Expr) string {
    	switch e := e.(type) {
    	case *ast.BinaryExpr:
    		if int(e.Op) < len(op2str2) {
    			return op2str2[e.Op]
    		}
    	case *ast.UnaryExpr:
    		if int(e.Op) < len(op2str1) {
    			return op2str1[e.Op]
    		}
    	}
    	return ""
    }
    
    var op2str1 = [...]string{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 02:09:54 UTC 2024
    - 49.7K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/walk/walk.go

    		// so we ensure they are evaluated first.
    		case ir.OADD, ir.OSUB, ir.OMUL, ir.ONEG:
    			return ssagen.Arch.SoftFloat && isSoftFloat(n.Type())
    		case ir.OLT, ir.OEQ, ir.ONE, ir.OLE, ir.OGE, ir.OGT:
    			n := n.(*ir.BinaryExpr)
    			return ssagen.Arch.SoftFloat && isSoftFloat(n.X.Type())
    		case ir.OCONV:
    			n := n.(*ir.ConvExpr)
    			return ssagen.Arch.SoftFloat && (isSoftFloat(n.Type()) || isSoftFloat(n.X.Type()))
    
    		case ir.OMIN, ir.OMAX:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 27 20:56:00 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/walk/builtin.go

    //
    //	init {
    //	  n := len(a)
    //	  if n > len(b) { n = len(b) }
    //	  if a.ptr != b.ptr { memmove(a.ptr, b.ptr, n*sizeof(elem(a))) }
    //	}
    //	n;
    //
    // Also works if b is a string.
    func walkCopy(n *ir.BinaryExpr, init *ir.Nodes, runtimecall bool) ir.Node {
    	if n.X.Type().Elem().HasPointers() {
    		ir.CurFunc.SetWBPos(n.Pos())
    		fn := writebarrierfn("typedslicecopy", n.X.Type().Elem(), n.Y.Type().Elem())
    		n.X = cheapExpr(n.X, init)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 22:35:22 UTC 2024
    - 31.2K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/ir/fmt.go

    		}
    		fmt.Fprint(s, "]")
    
    	case OSLICEHEADER:
    		n := n.(*SliceHeaderExpr)
    		fmt.Fprintf(s, "sliceheader{%v,%v,%v}", n.Ptr, n.Len, n.Cap)
    
    	case OCOMPLEX, OCOPY, OUNSAFEADD, OUNSAFESLICE:
    		n := n.(*BinaryExpr)
    		fmt.Fprintf(s, "%v(%v, %v)", n.Op(), n.X, n.Y)
    
    	case OCONV,
    		OCONVIFACE,
    		OCONVNOP,
    		OBYTES2STR,
    		ORUNES2STR,
    		OSTR2BYTES,
    		OSTR2RUNES,
    		ORUNESTR,
    		OSLICE2ARR,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 05 15:20:28 UTC 2023
    - 26K bytes
    - Viewed (0)
  9. src/go/parser/parser.go

    func (p *parser) embeddedElem(x ast.Expr) ast.Expr {
    	if p.trace {
    		defer un(trace(p, "EmbeddedElem"))
    	}
    	if x == nil {
    		x = p.embeddedTerm()
    	}
    	for p.tok == token.OR {
    		t := new(ast.BinaryExpr)
    		t.OpPos = p.pos
    		t.Op = token.OR
    		p.next()
    		t.X = x
    		t.Y = p.embeddedTerm()
    		x = t
    	}
    	return x
    }
    
    func (p *parser) embeddedTerm() ast.Expr {
    	if p.trace {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 08 20:07:50 UTC 2023
    - 72.2K bytes
    - Viewed (0)
  10. src/cmd/cgo/ast.go

    		} else {
    			f.walk(&n.Fun, ctxCall, visit)
    		}
    		f.walk(n.Args, ctxExpr, visit)
    	case *ast.StarExpr:
    		f.walk(&n.X, context, visit)
    	case *ast.UnaryExpr:
    		f.walk(&n.X, ctxExpr, visit)
    	case *ast.BinaryExpr:
    		f.walk(&n.X, ctxExpr, visit)
    		f.walk(&n.Y, ctxExpr, visit)
    	case *ast.KeyValueExpr:
    		f.walk(&n.Key, ctxExpr, visit)
    		f.walk(&n.Value, ctxExpr, visit)
    
    	case *ast.ArrayType:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 07 16:54:27 UTC 2023
    - 14.3K bytes
    - Viewed (0)
Back to top