- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 58 for generic (0.67 sec)
-
src/cmd/compile/internal/ssa/compile.go
{"dse", "insert resched checks"}, // insert resched checks adds new blocks containing generic instructions {"insert resched checks", "lower"}, {"insert resched checks", "tighten"}, // prove relies on common-subexpression elimination for maximum benefits. {"generic cse", "prove"}, // deadcode after prove to eliminate all new dead blocks. {"prove", "generic deadcode"}, // common-subexpression before dead-store elim, so that we recognize
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 22 14:55:18 UTC 2024 - 18.6K bytes - Viewed (0) -
src/cmd/compile/internal/types2/typexpr.go
typ := check.typInternal(e, def) assert(isTyped(typ)) if isGeneric(typ) { check.errorf(e, WrongTypeArgCount, "cannot use generic type %s without instantiation", typ) typ = Typ[Invalid] } check.recordTypeAndValue(e, typexpr, typ, nil) return typ } // genericType is like typ but the type must be an (uninstantiated) generic // type. If cause is non-nil and the type expression was a valid type but not
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 16.6K bytes - Viewed (0) -
src/cmd/compile/internal/types2/decl.go
nval := 0 // number of (constant or variable) values in the cycle; valid if !generic ndef := 0 // number of type definitions in the cycle; valid if !generic loop: for _, obj := range cycle { switch obj := obj.(type) { case *Const, *Var: nval++ case *TypeName: // If we reach a generic type that is part of a cycle // and we are in a type parameter list, we have a cycle
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 29.6K bytes - Viewed (0) -
src/cmd/compile/internal/types2/instantiate.go
if sig == orig { copy := *sig sig = © } // After instantiating a generic signature, it is not generic // anymore; we need to set tparams to nil. sig.tparams = nil res = sig default: // only types and functions can be generic panic(fmt.Sprintf("%v: cannot instantiate %v", pos, orig)) } // Update all contexts; it's possible that we've lost a race.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:01:18 UTC 2024 - 12.7K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/sccp.go
// only if its arguments satisfy additional conditions(e.g. divide by zero). // It's fragile and error-prone. We did a trick by reusing the existing rules // in generic rules for compile-time evaluation. But generic rules rewrite // original value, this behavior is undesired, because the lattice of values // may change multiple times, once it was rewritten, we lose the opportunity
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jan 22 16:54:50 UTC 2024 - 17.6K bytes - Viewed (0) -
src/cmd/compile/internal/types2/infer.go
// t0 was simplified to t1. // If t0 was a generic function, but the simplified signature t1 does // not contain any type parameters anymore, the function is not generic // anymore. Remove it's type parameters. (go.dev/issue/59953) // Note that if t0 was a signature, t1 must be a signature, and t1 // can only be a generic signature if it originated from a generic
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 24 13:54:20 UTC 2024 - 26.4K bytes - Viewed (0) -
src/cmd/compile/internal/types2/named.go
} // Origin returns the generic type from which the named type t is // instantiated. If t is not an instantiated type, the result is t. func (t *Named) Origin() *Named { if t.inst == nil { return t } return t.inst.orig } // TypeParams returns the type parameters of the named type t, or nil. // The result is non-nil for an (originally) generic type even if it is instantiated.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 20:03:31 UTC 2024 - 23.9K bytes - Viewed (0) -
src/cmd/compile/internal/types2/validtype.go
for _, e := range nest { if Identical(e, t) { // We have a cycle. If t != t.Origin() then t is an instance of // the generic type t.Origin(). Because t is in the nest, t must // occur within the definition (RHS) of the generic type t.Origin(), // directly or indirectly, after expansion of the RHS. // Therefore t.Origin() must be invalid, no matter how it is
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 15 13:22:37 UTC 2024 - 10.2K bytes - Viewed (0) -
src/cmd/compile/internal/types2/predicates.go
} return false } // isGeneric reports whether a type is a generic, uninstantiated type // (generic signatures are not included). // TODO(gri) should we include signatures or assert that they are not present? func isGeneric(t Type) bool { // A parameterized type is only generic if it doesn't have an instantiation already.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:01:18 UTC 2024 - 17.5K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/_gen/main.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jan 19 22:42:34 UTC 2023 - 16.9K bytes - Viewed (0)