Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 75 for typecheck (0.43 sec)

  1. src/cmd/compile/internal/typecheck/typecheck.go

    	// Skip typecheck if already done.
    	// But re-typecheck ONAME/OTYPE/OLITERAL/OPACK node in case context has changed.
    	if n.Typecheck() == 1 || n.Typecheck() == 3 {
    		switch n.Op() {
    		case ir.ONAME:
    			break
    
    		default:
    			return n
    		}
    	}
    
    	if n.Typecheck() == 2 {
    		base.FatalfAt(n.Pos(), "typechecking loop")
    	}
    
    	n.SetTypecheck(2)
    	n = typecheck1(n, top)
    	n.SetTypecheck(1)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 20 19:08:34 UTC 2024
    - 30.5K bytes
    - Viewed (0)
  2. hack/verify-typecheck.sh

    # Usage: `hack/verify-typecheck.sh`.
    
    set -o errexit
    set -o nounset
    set -o pipefail
    
    KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
    source "${KUBE_ROOT}/hack/lib/init.sh"
    cd "${KUBE_ROOT}"
    
    kube::golang::setup_env
    
    ret=0
    TYPECHECK_SERIAL="${TYPECHECK_SERIAL:-false}"
    go run ./test/typecheck "$@" "--serial=$TYPECHECK_SERIAL" || ret=$?
    
    if [[ $ret -ne 0 ]]; then
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 06:07:00 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/walk/builtin.go

    		fnname = "makeslice"
    		argtype = types.Types[types.TINT]
    	}
    	fn := typecheck.LookupRuntime(fnname)
    	ptr := mkcall1(fn, types.Types[types.TUNSAFEPTR], init, reflectdata.MakeSliceElemRType(base.Pos, n), typecheck.Conv(len, argtype), typecheck.Conv(cap, argtype))
    	ptr.MarkNonNil()
    	len = typecheck.Conv(len, types.Types[types.TINT])
    	cap = typecheck.Conv(cap, types.Types[types.TINT])
    	sh := ir.NewSliceHeaderExpr(base.Pos, t, ptr, len, cap)
    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/temp.go

    	appendWalkStmt(init, ir.NewAssignStmt(base.Pos, tmp, val))
    	return typecheck.Expr(typecheck.NodAddr(tmp)).(*ir.AddrExpr)
    }
    
    // stackTempAddr returns the expression &tmp, where tmp is a newly
    // allocated temporary variable of the given type. Statements to
    // zero-initialize tmp are appended to init.
    func stackTempAddr(init *ir.Nodes, typ *types.Type) *ir.AddrExpr {
    	n := typecheck.TempAt(base.Pos, ir.CurFunc, typ)
    	n.SetNonMergeable(true)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 09 16:41:23 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  5. 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)
  6. 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)
  7. src/cmd/compile/internal/walk/switch.go

    				nif.Cond = typecheck.Expr(nif.Cond)
    				nif.Cond = typecheck.DefaultLit(nif.Cond, nil)
    				out.Append(nif)
    				out = &nif.Else
    			}
    			return
    		}
    
    		half := lo + n/2
    		nif := ir.NewIfStmt(base.Pos, nil, nil, nil)
    		nif.Cond = less(half)
    		base.Pos = base.Pos.WithNotStmt()
    		nif.Cond = typecheck.Expr(nif.Cond)
    		nif.Cond = typecheck.DefaultLit(nif.Cond, 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)
  8. src/cmd/compile/internal/coverage/cover.go

    	mdax := typecheck.NodAddr(cnames.MetaVar)
    	mdauspx := typecheck.ConvNop(mdax, types.Types[types.TUNSAFEPTR])
    
    	// Materialize expression for length.
    	lenx := ir.NewInt(base.Pos, int64(mdlen)) // untyped
    
    	// Generate a call to runtime.addCovMeta, e.g.
    	//
    	//   pkgIdVar = runtime.addCovMeta(&sym, len, hash, pkgpath, pkid, cmode, cgran)
    	//
    	fn := typecheck.LookupRuntime("addCovMeta")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 29 21:55:46 UTC 2024
    - 6K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/walk/order.go

    								init = init[1:]
    							}
    						}
    						dcl := typecheck.Stmt(ir.NewDecl(base.Pos, ir.ODCL, n.(*ir.Name)))
    						ncas.PtrInit().Append(dcl)
    					}
    					tmp := o.newTemp(t, t.HasPointers())
    					as := typecheck.Stmt(ir.NewAssignStmt(base.Pos, n, typecheck.Conv(tmp, n.Type())))
    					ncas.PtrInit().Append(as)
    					r.Lhs[i] = 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)
  10. src/cmd/compile/internal/walk/expr.go

    	et := n.X.Type().Kind()
    
    	if types.IsComplex[et] && n.Op() == ir.ODIV {
    		t := n.Type()
    		call := mkcall("complex128div", types.Types[types.TCOMPLEX128], init, typecheck.Conv(n.X, types.Types[types.TCOMPLEX128]), typecheck.Conv(n.Y, types.Types[types.TCOMPLEX128]))
    		return typecheck.Conv(call, t)
    	}
    
    	// Nothing to do for float divisions.
    	if types.IsFloat[et] {
    		return n
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:01 UTC 2024
    - 27.6K bytes
    - Viewed (0)
Back to top