Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for NewUnaryExpr (0.74 sec)

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

    	elemtype := s.Type().Elem()
    
    	// Decompose slice.
    	oldPtr := ir.NewUnaryExpr(base.Pos, ir.OSPTR, s)
    	oldLen := ir.NewUnaryExpr(base.Pos, ir.OLEN, s)
    	oldCap := ir.NewUnaryExpr(base.Pos, ir.OCAP, s)
    
    	// Number of elements we are adding
    	num := ir.NewUnaryExpr(base.Pos, ir.OLEN, l2)
    
    	// newLen := oldLen + num
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:09:06 UTC 2024
    - 20.3K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/walk/builtin.go

    	l = append(l, ir.NewAssignStmt(base.Pos, nr, n.Y))
    
    	nfrm := ir.NewUnaryExpr(base.Pos, ir.OSPTR, nr)
    	nto := ir.NewUnaryExpr(base.Pos, ir.OSPTR, nl)
    
    	nlen := typecheck.TempAt(base.Pos, ir.CurFunc, types.Types[types.TINT])
    
    	// n = len(to)
    	l = append(l, ir.NewAssignStmt(base.Pos, nlen, ir.NewUnaryExpr(base.Pos, ir.OLEN, nl)))
    
    	// if n > len(frm) { n = len(frm) }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 22:35:22 UTC 2024
    - 31.2K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/walk/walk.go

    	if c != n || len(init) != 0 {
    		base.Fatalf("backingArrayPtrLen not cheap: %v", n)
    	}
    	ptr = ir.NewUnaryExpr(base.Pos, ir.OSPTR, n)
    	if n.Type().IsString() {
    		ptr.SetType(types.Types[types.TUINT8].PtrTo())
    	} else {
    		ptr.SetType(n.Type().Elem().PtrTo())
    	}
    	ptr.SetTypecheck(1)
    	length = ir.NewUnaryExpr(base.Pos, ir.OLEN, n)
    	length.SetType(types.Types[types.TINT])
    	length.SetTypecheck(1)
    	return ptr, length
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 27 20:56:00 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/walk/switch.go

    	// Get interface descriptor word.
    	// For empty interfaces this will be the type.
    	// For non-empty interfaces this will be the itab.
    	srcItab := ir.NewUnaryExpr(base.Pos, ir.OITAB, s.srcName)
    	srcData := ir.NewUnaryExpr(base.Pos, ir.OIDATA, s.srcName)
    	srcData.SetType(types.Types[types.TUINT8].PtrTo())
    	srcData.SetTypecheck(1)
    
    	// For empty interfaces, do:
    	//     if e._type == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:01 UTC 2024
    - 30.1K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/ir/func.go

    	if wantABI != obj.ABIInternal {
    		base.ErrorfAt(pos, 0, "internal/abi.FuncPC%s does not accept func expression, which is ABIInternal", wantABI)
    	}
    	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
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:05:44 UTC 2024
    - 21.1K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/typecheck/func.go

    			typecheckargs(n)
    			fallthrough
    		case ir.ONEW:
    			arg, ok := needOneArg(n, "%v", n.Op())
    			if !ok {
    				n.SetType(nil)
    				return n
    			}
    			u := ir.NewUnaryExpr(n.Pos(), l.BuiltinOp, arg)
    			return typecheck(ir.InitExpr(n.Init(), u), top) // typecheckargs can add to old.Init
    
    		case ir.OCOMPLEX, ir.OCOPY, ir.OUNSAFEADD, ir.OUNSAFESLICE, ir.OUNSAFESTRING:
    			typecheckargs(n)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 06 15:23:18 UTC 2024
    - 21.1K bytes
    - Viewed (0)
Back to top