Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for OSTRUCTLIT (0.29 sec)

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

    	"cmd/compile/internal/staticinit"
    	"cmd/compile/internal/typecheck"
    	"cmd/compile/internal/types"
    	"cmd/internal/obj"
    )
    
    // walkCompLit walks a composite literal node:
    // OARRAYLIT, OSLICELIT, OMAPLIT, OSTRUCTLIT (all CompLitExpr), or OPTRLIT (AddrExpr).
    func walkCompLit(n ir.Node, init *ir.Nodes) ir.Node {
    	if isStaticCompositeLiteral(n) && !ssa.CanSSA(n.Type()) {
    		n := n.(*ir.CompLitExpr) // not OPTRLIT
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 19:03:54 UTC 2023
    - 19.5K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/staticinit/sched.go

    		case ir.OARRAYLIT, ir.OSLICELIT, ir.OSTRUCTLIT, ir.OMAPLIT:
    			// copy pointer
    			staticdata.InitAddr(l, loff, staticdata.GlobalLinksym(s.Temps[r]))
    			return true
    		}
    
    	case ir.OSLICELIT:
    		r := r.(*ir.CompLitExpr)
    		// copy slice
    		staticdata.InitSlice(l, loff, staticdata.GlobalLinksym(s.Temps[r]), r.Len)
    		return true
    
    	case ir.OARRAYLIT, ir.OSTRUCTLIT:
    		r := r.(*ir.CompLitExpr)
    		p := s.Plans[r]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 17:16:14 UTC 2024
    - 30.7K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/ir/fmt.go

    	OPAREN:            8,
    	OPRINTLN:          8,
    	OPRINT:            8,
    	ORUNESTR:          8,
    	OSLICE2ARR:        8,
    	OSLICE2ARRPTR:     8,
    	OSTR2BYTES:        8,
    	OSTR2RUNES:        8,
    	OSTRUCTLIT:        8,
    	OTYPE:             8,
    	OUNSAFEADD:        8,
    	OUNSAFESLICE:      8,
    	OUNSAFESLICEDATA:  8,
    	OUNSAFESTRING:     8,
    	OUNSAFESTRINGDATA: 8,
    	OINDEXMAP:         8,
    	OINDEX:            8,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 05 15:20:28 UTC 2023
    - 26K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/walk/expr.go

    		n := n.(*ir.ConvExpr)
    		return walkStringToBytesTemp(n, init)
    
    	case ir.OSTR2RUNES:
    		n := n.(*ir.ConvExpr)
    		return walkStringToRunes(n, init)
    
    	case ir.OARRAYLIT, ir.OSLICELIT, ir.OMAPLIT, ir.OSTRUCTLIT, ir.OPTRLIT:
    		return walkCompLit(n, init)
    
    	case ir.OSEND:
    		n := n.(*ir.SendStmt)
    		return walkSend(n, init)
    
    	case ir.OCLOSURE:
    		return walkClosure(n.(*ir.ClosureExpr), init)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:01 UTC 2024
    - 27.6K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/typecheck/stmt.go

    			// //go:uintptr{escapes,keepalive}?
    			if arg.Type().IsUintptr() && arg.X.Type().IsUnsafePtr() {
    				visit(&arg.X)
    				return
    			}
    
    		case ir.OARRAYLIT, ir.OSLICELIT, ir.OSTRUCTLIT:
    			// TODO(mdempsky): For very large slices, it may be preferable
    			// to construct them at the go/defer statement instead.
    			list := arg.(*ir.CompLitExpr).List
    			for i, el := range list {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 20 15:10:54 UTC 2023
    - 17.8K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/typecheck/expr.go

    				}
    
    				// No pushtype allowed here. Tried and rejected.
    				sk.Value = Expr(sk.Value)
    				sk.Value = AssignConv(sk.Value, sk.Field.Type, "field value")
    				ls[i] = sk
    			}
    		}
    
    		n.SetOp(ir.OSTRUCTLIT)
    	}
    
    	return n
    }
    
    // tcStructLitKey typechecks an OKEY node that appeared within a
    // struct literal.
    func tcStructLitKey(typ *types.Type, kv *ir.KeyExpr) *ir.StructKeyExpr {
    	key := kv.Key
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/walk/order.go

    func mapKeyReplaceStrConv(n ir.Node) bool {
    	var replaced bool
    	switch n.Op() {
    	case ir.OBYTES2STR:
    		n := n.(*ir.ConvExpr)
    		n.SetOp(ir.OBYTES2STRTMP)
    		replaced = true
    	case ir.OSTRUCTLIT:
    		n := n.(*ir.CompLitExpr)
    		for _, elem := range n.List {
    			elem := elem.(*ir.StructKeyExpr)
    			if mapKeyReplaceStrConv(elem.Value) {
    				replaced = true
    			}
    		}
    	case ir.OARRAYLIT:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 02:00:33 UTC 2024
    - 42.7K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/ssagen/ssa.go

    				// That memory can't overlap with the memory being written.
    				mayOverlap = false
    			}
    		}
    
    		// Evaluate RHS.
    		rhs := n.Y
    		if rhs != nil {
    			switch rhs.Op() {
    			case ir.OSTRUCTLIT, ir.OARRAYLIT, ir.OSLICELIT:
    				// All literals with nonzero fields have already been
    				// rewritten during walk. Any that remain are just T{}
    				// or equivalents. Use the zero value.
    				if !ir.IsZero(rhs) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 19:44:43 UTC 2024
    - 284.9K bytes
    - Viewed (0)
Back to top