This CL changes dart2js such that the effect that we used to get with
option '--initializing-formal-access' is now obtained unconditionally,
i.e., that extension is now enabled by default.
dart2js will continue to accept the option, such that scripts passing
the option will not break.
The CL is _not_ intended to be landed at this time, the plan is to
enable the feature in a coordinated manner when all tools are ready.
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org/2141023002 .
This CL changes the semantics of `dart2js --generic-method-syntax`
generated code for `e as T` where `T` is a method type parameter.
The old behavior was to raise a `TypeError` at runtime when such an
expression was evaluated. The new behavior is to consider `T` as an
alias for `dynamic`, i.e., `e as T` will then always succeed.
Addresses part of issue 27460, omits a part that is not yet agreed upon.
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org/2388843002 .
When loading a snapshot all library prefixes should be considered not
loaded. This makes code running from a JIT snapshot throw the correct
error when using a deferred prefix before it is loaded.
Also, update test status and avoid skipping tests.
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/2416963003 .
Added two new bytecodes: LoadFieldExt, StoreFieldExt that
store the field offset in the following nop-instruction that
is skipped. This allows offsets up to 16 bit.
BUG=
R=zra@google.com
Review URL: https://codereview.chromium.org/2399333003 .
The current implementation of StreamIterator has a one-element buffer which
allows it listen for the next even eagerly, and only pause if consumption
doesn't keep up with production.
However, StreamIterator is also used by both VM and dart2js implementations
of "await for", and according to the specification, the iterated stream
must be paused between loop iterations.
The CL removes the one-element buffer and forces a pause after each event.
R=floitsch@google.com
Review URL: https://codereview.chromium.org/2149893002 .
Take two. (This version adds status file entries for checked
tests.)
Type parameters and arguments are parsed but ignored. Proper
handling of the parameters will be added subsequently.
The feature must be enabled with --generic-method-syntax.
Compiling all of dart2js consumes about 2.2% more tokens with
this change, due to the necessary lookahead to distinguish
generic functions from generic types.
===== with this change =========
Number of tokens: 1056691
Source length: 5850143 characters
Number of source tokens: 936226
Total tokens consumed: 3628934 <<<<<
Classes parsed: 2457
Tokens consumed: 977999
Functions parsed: 49607
Tokens consumed: 2430638
===== without this change ======
Number of tokens: 1056691
Source length: 5850143 characters
Number of source tokens: 936226
Total tokens consumed: 3547765 <<<<<
Classes parsed: 2457
Tokens consumed: 942536
Functions parsed: 49607
Tokens consumed: 2371357
(This reverts commit a1edb1766fd16b1268f3506feb7c9856b32bedfc.)
BUG= 25869
Review URL: https://codereview.chromium.org/2269693002 .
Type parameters and arguments are parsed but ignored. Proper
handling of the parameters will be added subsequently.
The feature must be enabled with --generic-method-syntax.
Compiling all of dart2js consumes about 2.2% more tokens with
this change, due to the necessary lookahead to distinguish
generic functions from generic types.
===== with this change =========
Number of tokens: 1056691
Source length: 5850143 characters
Number of source tokens: 936226
Total tokens consumed: 3628934 <<<<<
Classes parsed: 2457
Tokens consumed: 977999
Functions parsed: 49607
Tokens consumed: 2430638
===== without this change ======
Number of tokens: 1056691
Source length: 5850143 characters
Number of source tokens: 936226
Total tokens consumed: 3547765 <<<<<
Classes parsed: 2457
Tokens consumed: 942536
Functions parsed: 49607
Tokens consumed: 2371357
BUG=25869
R=asiva@google.com
Review URL: https://codereview.chromium.org/2260693002 .
Apparently the VM does not get the --initializing-formal-access flag
set, which these tests need in order to pass.
TBR=terry
BUG=
Review URL: https://codereview.chromium.org/2219473002 .