Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for walkExpr (0.18 sec)

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

    	n.Ptr = walkExpr(n.Ptr, init)
    	n.Len = walkExpr(n.Len, init)
    	n.Cap = walkExpr(n.Cap, init)
    	return n
    }
    
    // walkStringHeader walks an OSTRINGHEADER node.
    func walkStringHeader(n *ir.StringHeaderExpr, init *ir.Nodes) ir.Node {
    	n.Ptr = walkExpr(n.Ptr, init)
    	n.Len = walkExpr(n.Len, init)
    	return n
    }
    
    // return 1 if integer n must be in range [0, max), 0 otherwise.
    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/walk/stmt.go

    	}
    
    	var init ir.Nodes
    
    	call := n.Call.(*ir.CallExpr)
    	call.Fun = walkExpr(call.Fun, &init)
    
    	if len(init) > 0 {
    		init.Append(n)
    		return ir.NewBlockStmt(n.Pos(), init)
    	}
    	return n
    }
    
    // walkIf walks an OIF node.
    func walkIf(n *ir.IfStmt) ir.Node {
    	n.Cond = walkExpr(n.Cond, n.PtrInit())
    	walkStmtList(n.Body)
    	walkStmtList(n.Else)
    	return n
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 06 15:42:30 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/walk/builtin.go

    	return mkcall("gorecover", nn.Type(), init, walkExpr(nn.Args[0], init))
    }
    
    // walkUnsafeData walks an OUNSAFESLICEDATA or OUNSAFESTRINGDATA expression.
    func walkUnsafeData(n *ir.UnaryExpr, init *ir.Nodes) ir.Node {
    	slice := walkExpr(n.X, init)
    	res := typecheck.Expr(ir.NewUnaryExpr(n.Pos(), ir.OSPTR, slice))
    	res.SetType(n.Type())
    	return walkExpr(res, init)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 22:35:22 UTC 2024
    - 31.2K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/walk/assign.go

    	if ir.IsBlank(a) {
    		return walkExpr(typecheck.Stmt(n), init)
    	}
    
    	var_ := typecheck.TempAt(base.Pos, ir.CurFunc, types.NewPtr(t.Elem()))
    	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)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:09:06 UTC 2024
    - 20.3K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/walk/walk.go

    	}
    }
    
    // walkRecv walks an ORECV node.
    func walkRecv(n *ir.UnaryExpr) ir.Node {
    	if n.Typecheck() == 0 {
    		base.Fatalf("missing typecheck: %+v", n)
    	}
    	init := ir.TakeInit(n)
    
    	n.X = walkExpr(n.X, &init)
    	call := walkExpr(mkcall1(chanfn("chanrecv1", 2, n.X.Type()), nil, &init, n.X, typecheck.NodNil()), &init)
    	return ir.InitExpr(init, call)
    }
    
    func convas(n *ir.AssignStmt, init *ir.Nodes) *ir.AssignStmt {
    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. test/fixedbugs/issue8154.go

    // compile
    
    // Copyright 2015 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Issue 8154: cmd/5g: ICE in walkexpr walk.c
    
    package main
    
    func main() {
    	c := make(chan int)
    	_ = [1][]func(){[]func(){func() { <-c }}}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 313 bytes
    - Viewed (0)
  7. src/cmd/compile/internal/walk/closure.go

    	if x := clo.Prealloc; x != nil {
    		if !types.Identical(typ, x.Type()) {
    			panic("closure type does not match order's assigned type")
    		}
    		addr.Prealloc = x
    		clo.Prealloc = nil
    	}
    
    	return walkExpr(cfn, init)
    }
    
    // closureArgs returns a slice of expressions that can be used to
    // initialize the given closure's free variables. These correspond
    // one-to-one with the variables in clo.Func.ClosureVars, and will be
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 20 15:56:08 UTC 2023
    - 6.5K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/walk/convert.go

    	"cmd/compile/internal/typecheck"
    	"cmd/compile/internal/types"
    	"cmd/internal/sys"
    )
    
    // walkConv walks an OCONV or OCONVNOP (but not OCONVIFACE) node.
    func walkConv(n *ir.ConvExpr, init *ir.Nodes) ir.Node {
    	n.X = walkExpr(n.X, init)
    	if n.Op() == ir.OCONVNOP && n.Type() == n.X.Type() {
    		return n.X
    	}
    	if n.Op() == ir.OCONVNOP && ir.ShouldCheckPtr(ir.CurFunc, 1) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 09 17:28:22 UTC 2023
    - 18.2K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/walk/compare.go

    		return walkCompareInterface(n, init)
    	}
    
    	if n.X.Type().IsString() && n.Y.Type().IsString() {
    		return walkCompareString(n, init)
    	}
    
    	n.X = walkExpr(n.X, init)
    	n.Y = walkExpr(n.Y, init)
    
    	// Given mixed interface/concrete comparison,
    	// rewrite into types-equal && data-equal.
    	// This is efficient, avoids allocations, and avoids runtime calls.
    	//
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 24 21:55:14 UTC 2023
    - 16.2K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/walk/switch.go

    	// use a zero-cost alias of the byte slice.
    	// Do this before calling walkExpr on cond,
    	// because walkExpr will lower the string
    	// conversion into a runtime call.
    	// See issue 24937 for more discussion.
    	if cond.Op() == ir.OBYTES2STR && allCaseExprsAreSideEffectFree(sw) {
    		cond := cond.(*ir.ConvExpr)
    		cond.SetOp(ir.OBYTES2STRTMP)
    	}
    
    	cond = walkExpr(cond, sw.PtrInit())
    	if cond.Op() != ir.OLITERAL && cond.Op() != ir.ONIL {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:01 UTC 2024
    - 30.1K bytes
    - Viewed (0)
Back to top