Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for NewStarExpr (0.44 sec)

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

    		// Copy from the static string data to the [n]byte.
    		if len(sc) > 0 {
    			sptr := ir.NewUnaryExpr(base.Pos, ir.OSPTR, s)
    			sptr.SetBounded(true)
    			as := ir.NewAssignStmt(base.Pos, ir.NewStarExpr(base.Pos, p), ir.NewStarExpr(base.Pos, typecheck.ConvNop(sptr, t.PtrTo())))
    			appendWalkStmt(init, as)
    		}
    
    		// Slice the [n]byte to a []byte.
    		slice := ir.NewSliceExpr(n.Pos(), ir.OSLICEARR, p, nil, nil, nil)
    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/cmd/compile/internal/walk/range.go

    		nfor.Post = mkcallstmt1(fn, typecheck.NodAddr(hit))
    
    		key := ir.NewStarExpr(base.Pos, typecheck.ConvNop(ir.NewSelectorExpr(base.Pos, ir.ODOT, hit, keysym), types.NewPtr(t.Key())))
    		if v1 == nil {
    			body = nil
    		} else if v2 == nil {
    			body = []ir.Node{rangeAssign(nrange, key)}
    		} else {
    			elem := ir.NewStarExpr(base.Pos, typecheck.ConvNop(ir.NewSelectorExpr(base.Pos, ir.ODOT, hit, elemsym), types.NewPtr(t.Elem())))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 20 14:52:33 UTC 2023
    - 17.6K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/typecheck/typecheck.go

    	t := n.Type()
    	if t == nil || !t.IsPtr() {
    		return n
    	}
    	t = t.Elem()
    	if t == nil {
    		return n
    	}
    	if !t.IsArray() {
    		return n
    	}
    	star := ir.NewStarExpr(base.Pos, n)
    	star.SetImplicit(true)
    	return Expr(star)
    }
    
    func needOneArg(n *ir.CallExpr, f string, args ...interface{}) (ir.Node, bool) {
    	if len(n.Args) == 0 {
    		p := fmt.Sprintf(f, args...)
    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/complit.go

    		// If we allocated on the heap with ONEW, copy the static to the
    		// heap (4). We skip this for stack temporaries, because
    		// initStackTemp already handled the copy.
    		a = ir.NewStarExpr(base.Pos, vauto)
    		appendWalkStmt(init, ir.NewAssignStmt(base.Pos, a, vstat))
    	}
    
    	// put dynamics into array (5)
    	var index int64
    	for _, value := range n.List {
    		if value.Op() == ir.OKEY {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 19:03:54 UTC 2023
    - 19.5K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/walk/walk.go

    	}
    	ptr := ir.NewUnaryExpr(pos, ir.OIDATA, n)
    	if types.IsDirectIface(t) {
    		ptr.SetType(t)
    		ptr.SetTypecheck(1)
    		return ptr
    	}
    	ptr.SetType(types.NewPtr(t))
    	ptr.SetTypecheck(1)
    	ind := ir.NewStarExpr(pos, ptr)
    	ind.SetType(t)
    	ind.SetTypecheck(1)
    	ind.SetBounded(true)
    	return ind
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 27 20:56:00 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/walk/assign.go

    	var_.SetTypecheck(1)
    	var_.MarkNonNil() // mapaccess always returns a non-nil pointer
    
    	n.Lhs[0] = var_
    	init.Append(walkExpr(n, init))
    
    	as := ir.NewAssignStmt(base.Pos, a, ir.NewStarExpr(base.Pos, var_))
    	return walkExpr(typecheck.Stmt(as), init)
    }
    
    // walkAssignRecv walks an OAS2RECV node.
    func walkAssignRecv(init *ir.Nodes, n *ir.AssignListStmt) ir.Node {
    	init.Append(ir.TakeInit(n)...)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:09:06 UTC 2024
    - 20.3K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/ir/func.go

    	}
    	var e Node = NewUnaryExpr(pos, OIDATA, n)
    	e.SetType(types.Types[types.TUINTPTR].PtrTo())
    	e.SetTypecheck(1)
    	e = NewStarExpr(pos, e)
    	e.SetType(types.Types[types.TUINTPTR])
    	e.SetTypecheck(1)
    	return e
    }
    
    // DeclareParams creates Names for all of the parameters in fn's
    // signature and adds them to fn.Dcl.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:05:44 UTC 2024
    - 21.1K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/walk/expr.go

    	}
    	call := mkcall1(mapFn, nil, init, args...)
    	call.SetType(types.NewPtr(t.Elem()))
    	call.MarkNonNil() // mapaccess1* and mapassign always return non-nil pointers.
    	star := ir.NewStarExpr(base.Pos, call)
    	star.SetType(t.Elem())
    	star.SetTypecheck(1)
    	return star
    }
    
    // walkLogical walks an OANDAND or OOROR node.
    func walkLogical(n *ir.LogicalExpr, init *ir.Nodes) ir.Node {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:01 UTC 2024
    - 27.6K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/walk/order.go

    		}
    		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
    	}
    }
    
    // mapKeyReplaceStrConv replaces OBYTES2STR by OBYTES2STRTMP
    // in n to avoid string allocations for keys in map lookups.
    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