There is a new lattice point for each class, representing the values
that are subclasses of it.
To ensure that subclassing information is valued higher than subtype
information, we exploit that the ordering of lattice points determines
how the join operation chooses between ambiguous upper bounds.
BUG=
R=kustermann@google.com
Review URL: https://chromereviews.googleplex.com/488627013 .
There is a new 'call handler' meta field in the constraint system,
unfolding any number of 'call' properties on the callee until a
function value is found.
Every method invocation must now load this field to ensure the actual
function is invoked. This adds quite a bit of overhead, but in strong
mode we should be able to avoid the extra load in practice.
BUG=
R=vegorov@google.com
Review URL: https://chromereviews.googleplex.com/485117015 .
Allocation of a value and bitmask input are two different constraints
in the constraint system. However, for all values other than 'null',
there should be exactly one bitmask input and one allocation constraint.
The bitmask input was omitted in some cases in the handling of
externals, which is fixed in this CL.
BUG=
R=kustermann@google.com
Review URL: https://chromereviews.googleplex.com/481187013 .
This adds a notion of bitmasks to the constraint system,
which will be propagated by the solver, and joined using
bitwise OR. The solver does not care what the bits mean.
These bits propagate nullability and other values that we
care to preserve when a good base class could not be found.
This also adds an interface in front of type propagation
that exposes the inferred types in an accessible manner.
BUG=
R=kustermann@google.com
Review URL: https://chromereviews.googleplex.com/483887013 .
Instance members are now cloned for every class that inherits it.
The constraint system now explicitly requires all values to be
created using `newValue()`.
There is now a notion of "unions" for representing sets of values.
For class values, unions correspond to types. For function values,
unions are based on overriding and method names.
The solver's internal map of type (Value,Field) -> Value denoting
the value of a given field has been removed.
The builder must instead register store and load locations for
every valid (Value,Field) pair. Dynamic stores assign into the
store location, and dynamic loads take the value from the load
location.
Final fields have no store location, so they cannot be polluted
by dynamic stores.
R=vegorov@google.com
Review URL: https://chromereviews.googleplex.com/455987013 .
Transformer lifts try/catch auxiliary variables that need to survive across
yield points into the context.
Drive by fix: we were calling asyncThenWrapper to create an :async_op_error
callback by mistake.
R=kustermann@google.com
BUG=
Review URL: https://chromereviews.googleplex.com/466247013 .
- Rewrite all expressions in functions, not only expression-statements.
- Inject :await_ctx_var and :await_jump_var into the wrapper.
- Don't use transformed expression directly as part of completer.complete call.
BUG=
R=kustermann@google.com
Review URL: https://chromereviews.googleplex.com/468717014 .
This transformer is responsible for lifting subexpression into temporary variables preserved across yield points.
To maintain AST validity I introduced an expression that can contain a block of statements inside called BlockExpression.
BUG=
R=kustermann@google.com
Review URL: https://chromereviews.googleplex.com/458577014 .
LocalInitializer lets us to bind temporaries to variables in the
initializer list. We use it to ensure the arguments to super() are
evaluated at the right time.
accessors.dart and the new file super_calls.dart have been moved into
a folder "frontend" for frontend helpers that operate on Kernel IR.
BUG=
R=kustermann@google.com
Review URL: https://chromereviews.googleplex.com/457457013 .