Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 25 for iota (0.04 sec)

  1. src/cmd/compile/internal/types2/decl.go

    func (check *Checker) constDecl(obj *Const, typ, init syntax.Expr, inherited bool) {
    	assert(obj.typ == nil)
    
    	// use the correct value of iota and errpos
    	defer func(iota constant.Value, errpos syntax.Pos) {
    		check.iota = iota
    		check.errpos = errpos
    	}(check.iota, check.errpos)
    	check.iota = obj.val
    	check.errpos = nopos
    
    	// provide valid constant value under all circumstances
    	obj.val = constant.MakeUnknown()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 29.6K bytes
    - Viewed (0)
  2. src/go/types/decl.go

    }
    
    func (check *Checker) constDecl(obj *Const, typ, init ast.Expr, inherited bool) {
    	assert(obj.typ == nil)
    
    	// use the correct value of iota
    	defer func(iota constant.Value, errpos positioner) {
    		check.iota = iota
    		check.errpos = errpos
    	}(check.iota, check.errpos)
    	check.iota = obj.val
    	check.errpos = nil
    
    	// provide valid constant value under all circumstances
    	obj.val = constant.MakeUnknown()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 31K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/typexpr.go

    		return
    
    	case *Const:
    		check.addDeclDep(obj)
    		if !isValid(typ) {
    			return
    		}
    		if obj == universeIota {
    			if check.iota == nil {
    				check.error(e, InvalidIota, "cannot use iota outside constant declaration")
    				return
    			}
    			x.val = check.iota
    		} else {
    			x.val = obj.val
    		}
    		assert(x.val != nil)
    		x.mode = constant_
    
    	case *TypeName:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  4. src/go/types/typexpr.go

    		return
    
    	case *Const:
    		check.addDeclDep(obj)
    		if !isValid(typ) {
    			return
    		}
    		if obj == universeIota {
    			if check.iota == nil {
    				check.error(e, InvalidIota, "cannot use iota outside constant declaration")
    				return
    			}
    			x.val = check.iota
    		} else {
    			x.val = obj.val
    		}
    		assert(x.val != nil)
    		x.mode = constant_
    
    	case *TypeName:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 16.3K bytes
    - Viewed (0)
  5. src/go/types/stmt.go

    	defer func(env environment, indent int) {
    		check.environment = env
    		check.indent = indent
    	}(check.environment, check.indent)
    	check.environment = environment{
    		decl:  decl,
    		scope: sig.scope,
    		iota:  iota,
    		sig:   sig,
    	}
    	check.indent = 0
    
    	check.stmtList(0, body.List)
    
    	if check.hasLabel {
    		check.labels(body)
    	}
    
    	if sig.results.Len() > 0 && !check.isTerminating(body, "") {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 30.6K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types2/stmt.go

    	defer func(env environment, indent int) {
    		check.environment = env
    		check.indent = indent
    	}(check.environment, check.indent)
    	check.environment = environment{
    		decl:  decl,
    		scope: sig.scope,
    		iota:  iota,
    		sig:   sig,
    	}
    	check.indent = 0
    
    	check.stmtList(0, body.List)
    
    	if check.hasLabel && !check.conf.IgnoreBranchErrors {
    		check.labels(body)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 30.7K bytes
    - Viewed (0)
  7. src/runtime/runtime1.go

    // The cached value is a uint32 in which the low bits
    // are the "crash" and "all" settings and the remaining
    // bits are the traceback value (0 off, 1 on, 2 include system).
    const (
    	tracebackCrash = 1 << iota
    	tracebackAll
    	tracebackShift = iota
    )
    
    var traceback_cache uint32 = 2 << tracebackShift
    var traceback_env uint32
    
    // gotraceback returns the current traceback settings.
    //
    // If level is 0, suppress all tracebacks.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:52:17 UTC 2024
    - 19.3K bytes
    - Viewed (0)
  8. src/runtime/mfinal.go

    	fin     [(_FinBlockSize - 2*goarch.PtrSize - 2*4) / unsafe.Sizeof(finalizer{})]finalizer
    }
    
    var fingStatus atomic.Uint32
    
    // finalizer goroutine status.
    const (
    	fingUninitialized uint32 = iota
    	fingCreated       uint32 = 1 << (iota - 1)
    	fingRunningFinalizer
    	fingWait
    	fingWake
    )
    
    var finlock mutex  // protects the following variables
    var fing *g        // goroutine that runs finalizers
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 01:56:56 UTC 2024
    - 19K bytes
    - Viewed (0)
  9. src/runtime/runtime2.go

    	// _Gscanwaiting -> _Gscanrunnable are actually okay because
    	// they don't affect stack ownership.
    
    	// _Gidle means this goroutine was just allocated and has not
    	// yet been initialized.
    	_Gidle = iota // 0
    
    	// _Grunnable means this goroutine is on a run queue. It is
    	// not currently executing user code. The stack is not owned.
    	_Grunnable // 1
    
    	// _Grunning means this goroutine may execute user code. The
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:57:37 UTC 2024
    - 47.9K bytes
    - Viewed (0)
  10. src/go/types/check.go

    	scope         *Scope                 // top-most scope for lookups
    	pos           token.Pos              // if valid, identifiers are looked up as if at position pos (used by Eval)
    	iota          constant.Value         // value of iota in a constant declaration; nil otherwise
    	errpos        positioner             // if set, identifier position of a constant with inherited initializer
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 23.1K bytes
    - Viewed (0)
Back to top