Side effect of this:
Fix bug where helpers in js_mirrors were specifying that name had to have type String when it could really also be a JS Symbol as well.
Fix bug where top level JS interop members using the external keyword but no @JS keyword were not implemented.
Update js_typed_interop_test.dart so it can work in DDC.
Add regression test for jsify call with native function type arguments.
BUG=
R=vsm@google.com
Review-Url: https://codereview.chromium.org/2827333003 .
This CL makes four classes:
- TypeInferrer, which is the API for type inference within a method
body or field initializer, used by BodyBuilder.
- TypeInferrerImpl, which is the generic implementation of
TypeInferrer.
- TypeInferenceEngine, which is the API for top level type inference
and for creating TypeInferrers.
- TypeInferenceEngineImpl, which is the generic implementation of
TypeInferenceEngine.
R=karlklose@google.com
Review-Url: https://codereview.chromium.org/2830313002 .
This CL hooks up enough infrastructure for doing simple top level type
inference of variables whose initializer is an int.
Additional type inference rules will be added in follow-up CLs.
R=karlklose@google.com
Review-Url: https://codereview.chromium.org/2828253003 .
Due to the tight coupling between analyzer and front_end, they need to
be published atomically. The last published version of kernel is old
enough that it needs to be published too.
I've bumped the versions to the following, and changed the
dependencies so that this set of versions is mutually compatible:
- analyzer: 0.30.0-alpha.3
- front_end: 0.1.0-alpha.2
- kernel: 0.2.0
(Note that kernel's version didn't need bumping since the most
recently published version of it is 0.1.0)
R=asgerf@google.com
Review-Url: https://codereview.chromium.org/2828273003 .
- Instead of a pointer to new'd memory, Kernel strings now have an
offset from the start of the string data.
- When the streaming reader encounters the string data it records the
offset from the start of the binary. This offset is stored in the
Kernel Program and is used to compute the offset for strings.
- When a KernelReader is constructed, the string data is copied into a
Uint8 array in the VM's heap.
- A pointer to the string data is put into every Kernel script so it
can be used for constructing VM strings at compile time.
The source table does not use Kernel strings any more because those
strings are not found in the raw string data. Instead, the source
table uses new'd buffers for strings (but this will be cleaned up
separately).
R=jensj@google.com
Review-Url: https://codereview.chromium.org/2820363002 .
This is necessary because some of the TypeInferrer's roles (e.g. type
promotion and determination of the types of constants) are still
needed in non-strong mode.
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2829683008 .
This CL introduces Fasta's first type inference rule, and hooks it up
to all the necessary testing infrastructure. The rule is that a local
variable whose initializer is an integer literal should have an
inferred type of int.
Only variables occurring at top level within a method are inferred (we
don't yet recurse inside sub-blocks).
Additional type inference rules will be added in follow-up CLs.
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2828693003 .
In a future CL I need to add an import to this file, and for reasons I
haven't been able to track down, doing so causes type inference
failures. This CL works around the problem by making the affected
types explicit.
Once the bug is fixed, I hope to be able to revert this.
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2833563004 .
If we don't, and we transplant any of them into a new detached instance
of synthetic FunctionElementImpl, they are not able to access later
enclosingUnit in order to resynthesize their type.
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2829843002 .