Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 125 for typechecker (0.58 sec)

  1. src/go/types/builtins.go

    		}
    
    		x.mode = value
    		x.typ = NewPointer(universeByte)
    		if check.recordTypes() {
    			check.recordBuiltinType(call.Fun, makeSig(x.typ, Typ[String]))
    		}
    
    	case _Assert:
    		// assert(pred) causes a typechecker error if pred is false.
    		// The result of assert is the value of pred if there is no error.
    		// Note: assert is only available in self-test mode.
    		if x.mode != constant_ || !isBoolean(x.typ) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 27.2K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/types2/builtins.go

    		}
    
    		x.mode = value
    		x.typ = NewPointer(universeByte)
    		if check.recordTypes() {
    			check.recordBuiltinType(call.Fun, makeSig(x.typ, Typ[String]))
    		}
    
    	case _Assert:
    		// assert(pred) causes a typechecker error if pred is false.
    		// The result of assert is the value of pred if there is no error.
    		// Note: assert is only available in self-test mode.
    		if x.mode != constant_ || !isBoolean(x.typ) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 27.1K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. src/cmd/internal/testdir/testdir_test.go

    // the 1.18 compiler using the new types2 type checker, or pass with sub-optimal
    // error(s).
    
    // List of files that the compiler cannot errorcheck with the new typechecker (types2).
    var types2Failures = setOf(
    	"shift1.go",               // types2 reports two new errors which are probably not right
    	"fixedbugs/issue10700.go", // types2 should give hint about ptr to interface
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 21 20:08:06 UTC 2024
    - 57.5K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/typecheck/func.go

    // To be called by typecheck, not directly.
    // (Call typecheck.Func instead.)
    func tcFunc(n *ir.Func) {
    	if base.EnableTrace && base.Flag.LowerT {
    		defer tracePrint("tcFunc", n)(nil)
    	}
    
    	if name := n.Nname; name.Typecheck() == 0 {
    		base.AssertfAt(name.Type() != nil, n.Pos(), "missing type: %v", name)
    		name.SetTypecheck(1)
    	}
    }
    
    // tcCall typechecks an OCALL node.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 06 15:23:18 UTC 2024
    - 21.1K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/typecheck/expr.go

    		return n
    	}
    	return n
    }
    
    // tcSliceHeader typechecks an OSLICEHEADER node.
    func tcSliceHeader(n *ir.SliceHeaderExpr) ir.Node {
    	// Errors here are Fatalf instead of Errorf because only the compiler
    	// can construct an OSLICEHEADER node.
    	// Components used in OSLICEHEADER that are supplied by parsed source code
    	// have already been typechecked in e.g. OMAKESLICE earlier.
    	t := n.Type()
    	if t == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/typecheck/stmt.go

    		}
    		checkassign(n.Value)
    	}
    
    	// second half of dance
    	n.SetTypecheck(1)
    	if n.Key != nil && n.Key.Typecheck() == 0 {
    		n.Key = AssignExpr(n.Key)
    	}
    	if n.Value != nil && n.Value.Typecheck() == 0 {
    		n.Value = AssignExpr(n.Value)
    	}
    
    	Stmts(n.Body)
    }
    
    // tcReturn typechecks an ORETURN node.
    func tcReturn(n *ir.ReturnStmt) ir.Node {
    	if ir.CurFunc == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 20 15:10:54 UTC 2023
    - 17.8K bytes
    - Viewed (0)
  9. 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)
  10. src/go/types/stdlib_test.go

    			_, err := c.getDirPackage(dir)
    			if err != nil {
    				t.Errorf("error checking %s: %v", dir, err)
    			}
    		}()
    	}
    
    	wg.Wait()
    
    	if testing.Verbose() {
    		fmt.Println(len(dirFiles), "packages typechecked in", time.Since(start))
    	}
    }
    
    // stdlibChecker implements concurrent type-checking of the packages defined by
    // dirFiles, which must define a closed set of packages (such as GOROOT/src).
    type stdlibChecker struct {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 19 04:39:56 UTC 2023
    - 13.7K bytes
    - Viewed (0)
Back to top