Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 14 of 14 for NodAddr (0.1 sec)

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

    func mapKeyArg(fast int, n, key ir.Node, assigned bool) ir.Node {
    	if fast == mapslow {
    		// standard version takes key by reference.
    		// orderState.expr made sure key is addressable.
    		return typecheck.NodAddr(key)
    	}
    	if assigned {
    		// mapassign does distinguish pointer vs. integer key.
    		return key
    	}
    	// mapaccess and mapdelete don't distinguish pointer vs. integer key.
    	switch fast {
    	case mapfast32ptr:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:01 UTC 2024
    - 27.6K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/typecheck/expr.go

    		return n
    	}
    	if l.Type().IsArray() {
    		if !ir.IsAddressable(n.X) {
    			base.Errorf("invalid operation %v (slice of unaddressable value)", n)
    			n.SetType(nil)
    			return n
    		}
    
    		addr := NodAddr(n.X)
    		addr.SetImplicit(true)
    		n.X = Expr(addr)
    		l = n.X
    	}
    	t := l.Type()
    	var tp *types.Type
    	if t.IsString() {
    		if hasmax {
    			base.Errorf("invalid operation %v (3-index slice of string)", n)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/typecheck/typecheck.go

    		types.CalcSize(tt)
    		rcvr := f2.Type.Recv().Type
    		if !types.Identical(rcvr, tt) {
    			if rcvr.IsPtr() && types.Identical(rcvr.Elem(), tt) {
    				checklvalue(n.X, "call pointer method on")
    				addr := NodAddr(n.X)
    				addr.SetImplicit(true)
    				n.X = typecheck(addr, ctxType|ctxExpr)
    			} else if tt.IsPtr() && (!rcvr.IsPtr() || rcvr.IsPtr() && rcvr.Elem().NotInHeap()) && types.Identical(tt.Elem(), rcvr) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 20 19:08:34 UTC 2024
    - 30.5K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/walk/order.go

    			base.Fatalf("mapKeyTemp: key type is not sufficiently aligned, kt=%v nt=%v", kt, nt)
    		}
    		tmp := o.newTemp(kt, true)
    		// *(*nt)(&tmp) = n
    		var e ir.Node = typecheck.NodAddr(tmp)
    		e = ir.NewConvExpr(pos, ir.OCONVNOP, nt.PtrTo(), e)
    		e = ir.NewStarExpr(pos, e)
    		o.append(ir.NewAssignStmt(pos, e, n))
    		return tmp
    	}
    }
    
    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