Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for SliceExpr (0.16 sec)

  1. src/go/ast/ast.go

    		X       Expr      // expression
    		Lbrack  token.Pos // position of "["
    		Indices []Expr    // index expressions
    		Rbrack  token.Pos // position of "]"
    	}
    
    	// A SliceExpr node represents an expression followed by slice indices.
    	SliceExpr struct {
    		X      Expr      // expression
    		Lbrack token.Pos // position of "["
    		Low    Expr      // begin of slice range; or nil
    		High   Expr      // end of slice range; or nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 28 21:32:41 UTC 2024
    - 35.6K bytes
    - Viewed (0)
  2. src/go/types/index.go

    	// a valid type.
    	if x.typ == nil {
    		x.typ = Typ[Invalid]
    	}
    
    	check.index(index, length)
    	return false
    }
    
    func (check *Checker) sliceExpr(x *operand, e *ast.SliceExpr) {
    	check.expr(nil, x, e.X)
    	if x.mode == invalid {
    		check.use(e.Low, e.High, e.Max)
    		return
    	}
    
    	valid := false
    	length := int64(-1) // valid if >= 0
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 22 16:17:05 UTC 2024
    - 11.2K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/walk/expr.go

    	case ir.OSTRINGHEADER:
    		n := n.(*ir.StringHeaderExpr)
    		return walkStringHeader(n, init)
    
    	case ir.OSLICE, ir.OSLICEARR, ir.OSLICESTR, ir.OSLICE3, ir.OSLICE3ARR:
    		n := n.(*ir.SliceExpr)
    		return walkSlice(n, init)
    
    	case ir.ONEW:
    		n := n.(*ir.UnaryExpr)
    		return walkNew(n, init)
    
    	case ir.OADDSTR:
    		return walkAddString(n.(*ir.AddStringExpr), init)
    
    	case ir.OAPPEND:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:01 UTC 2024
    - 27.6K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/typecheck/expr.go

    		n.SetType(types.NewPtr(types.Types[types.TUINT8]))
    	} else {
    		n.SetType(types.NewPtr(t.Elem()))
    	}
    	return n
    }
    
    // tcSlice typechecks an OSLICE or OSLICE3 node.
    func tcSlice(n *ir.SliceExpr) ir.Node {
    	n.X = DefaultLit(Expr(n.X), nil)
    	n.Low = indexlit(Expr(n.Low))
    	n.High = indexlit(Expr(n.High))
    	n.Max = indexlit(Expr(n.Max))
    	hasmax := n.Op().IsSlice3()
    	l := n.X
    	if l.Type() == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/typecheck/typecheck.go

    		n := n.(*ir.StringHeaderExpr)
    		return tcStringHeader(n)
    
    	case ir.OMAKESLICECOPY:
    		n := n.(*ir.MakeExpr)
    		return tcMakeSliceCopy(n)
    
    	case ir.OSLICE, ir.OSLICE3:
    		n := n.(*ir.SliceExpr)
    		return tcSlice(n)
    
    	// call and call like
    	case ir.OCALL:
    		n := n.(*ir.CallExpr)
    		return tcCall(n, top)
    
    	case ir.OCAP, ir.OLEN:
    		n := n.(*ir.UnaryExpr)
    		return tcLenCap(n)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 20 19:08:34 UTC 2024
    - 30.5K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/walk/order.go

    		if lhs == nil || lhs.Op() != ir.ONAME && !ir.SameSafeExpr(lhs, n.Args[0]) {
    			return o.copyExpr(n)
    		}
    		return n
    
    	case ir.OSLICE, ir.OSLICEARR, ir.OSLICESTR, ir.OSLICE3, ir.OSLICE3ARR:
    		n := n.(*ir.SliceExpr)
    		n.X = o.expr(n.X, nil)
    		n.Low = o.cheapExpr(o.expr(n.Low, nil))
    		n.High = o.cheapExpr(o.expr(n.High, nil))
    		n.Max = o.cheapExpr(o.expr(n.Max, nil))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 02:00:33 UTC 2024
    - 42.7K bytes
    - Viewed (0)
Back to top