Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 42 for BinaryExpr (0.65 sec)

  1. src/cmd/compile/internal/typecheck/typecheck.go

    		return tcRecover(n)
    
    	case ir.OUNSAFEADD:
    		n := n.(*ir.BinaryExpr)
    		return tcUnsafeAdd(n)
    
    	case ir.OUNSAFESLICE:
    		n := n.(*ir.BinaryExpr)
    		return tcUnsafeSlice(n)
    
    	case ir.OUNSAFESLICEDATA:
    		n := n.(*ir.UnaryExpr)
    		return tcUnsafeData(n)
    
    	case ir.OUNSAFESTRING:
    		n := n.(*ir.BinaryExpr)
    		return tcUnsafeString(n)
    
    	case ir.OUNSAFESTRINGDATA:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 20 19:08:34 UTC 2024
    - 30.5K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/walk/compare.go

    	return ir.NewInt(base.Pos, int64(hash.Sum32()))
    }
    
    // The result of walkCompare MUST be assigned back to n, e.g.
    //
    //	n.Left = walkCompare(n.Left, init)
    func walkCompare(n *ir.BinaryExpr, init *ir.Nodes) ir.Node {
    	if n.X.Type().IsInterface() && n.Y.Type().IsInterface() && n.X.Op() != ir.ONIL && n.Y.Op() != ir.ONIL {
    		return walkCompareInterface(n, init)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 24 21:55:14 UTC 2023
    - 16.2K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/typecheck/const.go

    			return n
    		}
    
    		n.SetType(t)
    		return n
    
    	case ir.OEQ, ir.ONE, ir.OLT, ir.OLE, ir.OGT, ir.OGE:
    		n := n.(*ir.BinaryExpr)
    		if !t.IsBoolean() {
    			break
    		}
    		n.SetType(t)
    		return n
    
    	case ir.OLSH, ir.ORSH:
    		n := n.(*ir.BinaryExpr)
    		n.X = convlit1(n.X, t, explicit, nil)
    		n.SetType(n.X.Type())
    		if n.Type() != nil && !n.Type().IsInteger() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 05 15:20:28 UTC 2023
    - 10.5K bytes
    - Viewed (0)
  4. src/go/printer/nodes.go

    // ----------------------------------------------------------------------------
    // Expressions
    
    func walkBinary(e *ast.BinaryExpr) (has4, has5 bool, maxProblem int) {
    	switch e.Op.Precedence() {
    	case 4:
    		has4 = true
    	case 5:
    		has5 = true
    	}
    
    	switch l := e.X.(type) {
    	case *ast.BinaryExpr:
    		if l.Op.Precedence() < e.Op.Precedence() {
    			// parens will be inserted.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 17 18:53:17 UTC 2023
    - 52.6K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/unsafeptr/unsafeptr.go

    		// Base case: initial conversion from unsafe.Pointer to uintptr.
    		return len(x.Args) == 1 &&
    			hasBasicType(info, x.Fun, types.Uintptr) &&
    			hasBasicType(info, x.Args[0], types.UnsafePointer)
    
    	case *ast.BinaryExpr:
    		// "It is valid both to add and to subtract offsets from a
    		// pointer in this way. It is also valid to use &^ to round
    		// pointers, usually for alignment."
    		switch x.Op {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  6. src/go/types/exprstring.go

    		}
    		buf.WriteByte(')')
    
    	case *ast.StarExpr:
    		buf.WriteByte('*')
    		WriteExpr(buf, x.X)
    
    	case *ast.UnaryExpr:
    		buf.WriteString(x.Op.String())
    		WriteExpr(buf, x.X)
    
    	case *ast.BinaryExpr:
    		WriteExpr(buf, x.X)
    		buf.WriteByte(' ')
    		buf.WriteString(x.Op.String())
    		buf.WriteByte(' ')
    		WriteExpr(buf, x.Y)
    
    	case *ast.ArrayType:
    		buf.WriteByte('[')
    		if x.Len != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 08 19:31:44 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  7. src/go/ast/ast.go

    	//
    	UnaryExpr struct {
    		OpPos token.Pos   // position of Op
    		Op    token.Token // operator
    		X     Expr        // operand
    	}
    
    	// A BinaryExpr node represents a binary expression.
    	BinaryExpr struct {
    		X     Expr        // left operand
    		OpPos token.Pos   // position of Op
    		Op    token.Token // operator
    		Y     Expr        // right operand
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 28 21:32:41 UTC 2024
    - 35.6K bytes
    - Viewed (0)
  8. src/cmd/vendor/golang.org/x/tools/go/ast/inspector/typeof.go

    	case *ast.BadDecl:
    		return 1 << nBadDecl
    	case *ast.BadExpr:
    		return 1 << nBadExpr
    	case *ast.BadStmt:
    		return 1 << nBadStmt
    	case *ast.BasicLit:
    		return 1 << nBasicLit
    	case *ast.BinaryExpr:
    		return 1 << nBinaryExpr
    	case *ast.BlockStmt:
    		return 1 << nBlockStmt
    	case *ast.BranchStmt:
    		return 1 << nBranchStmt
    	case *ast.CallExpr:
    		return 1 << nCallExpr
    	case *ast.CaseClause:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 18 21:28:13 UTC 2023
    - 4.8K bytes
    - Viewed (0)
  9. src/go/ast/walk.go

    			Walk(v, n.Type)
    		}
    
    	case *CallExpr:
    		Walk(v, n.Fun)
    		walkList(v, n.Args)
    
    	case *StarExpr:
    		Walk(v, n.X)
    
    	case *UnaryExpr:
    		Walk(v, n.X)
    
    	case *BinaryExpr:
    		Walk(v, n.X)
    		Walk(v, n.Y)
    
    	case *KeyValueExpr:
    		Walk(v, n.Key)
    		Walk(v, n.Value)
    
    	// Types
    	case *ArrayType:
    		if n.Len != nil {
    			Walk(v, n.Len)
    		}
    		Walk(v, n.Elt)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 16:34:10 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  10. src/go/types/union.go

    // extracting both the binary exprs (blist) and leaf types (tlist).
    func flattenUnion(list []ast.Expr, x ast.Expr) (blist, tlist []ast.Expr) {
    	if o, _ := x.(*ast.BinaryExpr); o != nil && o.Op == token.OR {
    		blist, tlist = flattenUnion(list, o.X)
    		blist = append(blist, o)
    		x = o.Y
    	}
    	return blist, append(tlist, x)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 6.2K bytes
    - Viewed (0)
Back to top