Commit Graph

1422 Commits

Author SHA1 Message Date
Jenny Messerly 472c898c87 [dartdevc] fix for-in loop variable shadowing a var used in initialzer
Dart for-in loops allow `var x = [1]; for (var x in x) {}`, which is not
allowed in JS. If this pattern is detected, a temporary variable is
introduced so the for-in initializer expression is evaluated outside of
the JS for-of loop.

(This issue seems to be unique to for-in loops. For loops and other
kinds of variable declarations of the form `var x = ...` are not
allowed to use `x` in the initializer, even if `x` is declared in an
outer scope.)

Also fixes an out-of-date comment in the DDC+Analyzer backend.

Change-Id: I35b272a5a311f7b6f104cc82a99cc83a6ed5c247
Reviewed-on: https://dart-review.googlesource.com/c/79142
Commit-Queue: Alan Knight <alanknight@google.com>
Auto-Submit: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Alan Knight <alanknight@google.com>
2018-10-11 17:07:39 +00:00
Peter von der Ahé 5b32ab3be6 Remove the word "strongMode" from some package:kernel libraries.
Temporarily using "legacyMode" instead, but I plan to rid these soon.

Change-Id: Iff8bcde03b6ebe4ad95f963f456c855e73e58926
Reviewed-on: https://dart-review.googlesource.com/c/79042
Auto-Submit: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-10-11 08:50:43 +00:00
G?nter Z?chbauer 2da0b9f4f1 fix some typos
Closes #34738
https://github.com/dart-lang/sdk/pull/34738

GitOrigin-RevId: d211bbacfe65355cf7304c990ffb6c79d7a229cf
Change-Id: If690e6d378e543b300e1f6a353ceae73e39c29db
Reviewed-on: https://dart-review.googlesource.com/c/78900
Reviewed-by: Alexander Thomas <athom@google.com>
2018-10-10 19:15:30 +00:00
Jenny Messerly f320477ff9 [dartdevc] add module-name option to kernel backend
This name is not used by most module formats, but we do use it with the
legacy format.

Change-Id: I8d2f36b12a60b37d0460b57d5a360ba21b4e0476
Reviewed-on: https://dart-review.googlesource.com/c/78923
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-10-10 18:09:03 +00:00
Peter von der Ahé f1b6d81404 Remove Target.strongMode
Change-Id: I60f72904f4a9ae3427b2a2633a22f70a6b6f8ea9
Reviewed-on: https://dart-review.googlesource.com/c/79020
Commit-Queue: Peter von der Ahé <ahe@google.com>
Auto-Submit: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-10-10 12:49:18 +00:00
Peter von der Ahé bc49637085 Convert package:dev_compiler to use onDiagnostic
Change-Id: I67eaae26c40452dd94c4135e813cfdd89e2fb087
Reviewed-on: https://dart-review.googlesource.com/c/77563
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2018-10-03 06:46:55 +00:00
Brian Wilkerson 6c577f0620 Deprecate Element.isVirtual
Change-Id: I987ba5fbe847c961d698692e0e8b6c98cdbfb30c
Reviewed-on: https://dart-review.googlesource.com/77230
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-09-29 15:43:43 +00:00
Konstantin Shcheglov 9c585bf5df Document that ResourceProvider requires absolute, normalized paths, and enforce this.
This allows us to avoid performing normalization, and work with paths
as is. So, this speeds up SourceFactoryImpl.restoreUri() from 7.5% to 3.7%

R=brianwilkerson@google.com

Change-Id: I085f3db40af6543fbb524a82fad48aa051e87937
Reviewed-on: https://dart-review.googlesource.com/77017
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-09-28 17:18:49 +00:00
Peter von der Ahé 8ef3258e59 Remove _ConstantExpressionError
Change-Id: I0f7c590e826d9516d7b916cb6e39fd67eab97997
Reviewed-on: https://dart-review.googlesource.com/76662
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2018-09-28 08:41:53 +00:00
Jenny Messerly cfe9202393 [dartdevc] fix dart:mirrors type information for generic functions
This regressed in https://dart-review.googlesource.com/c/74664/.
In Analyzer FunctionType.typeFormals returns TypeParameterElements
instead of TypeParameterTypes; it is not safe to assume non-null bound
for elements.

Also fixes & clarifies the intent of _canEmitTypeAtTopLevel (formerly
_typeIsLoaded). There was no reason to visit the typeFormals, as generic
function types can always be emitted into the module.

Change-Id: Ia8b9271c2d1b66dca934d032dcbbe4fe89146f1b
Reviewed-on: https://dart-review.googlesource.com/76746
Reviewed-by: Alan Knight <alanknight@google.com>
2018-09-27 22:56:51 +00:00
Jenny Messerly 9ad59bada2 [dartdevc] fix #34358, int to double conversion for literals
Also fix #34360 by addressing a few remaining Analyzer issues.

Change-Id: Iac3d9ba72aa370846fced3654a376899b5938152
Reviewed-on: https://dart-review.googlesource.com/76343
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-09-27 20:15:20 +00:00
Kevin Millikin c9b05d3f1f Allow super calls in mixin declarations
Allow super calls to occur in mixin declarations if they target a
method from any of the superclass constraint interfaces.

Instead of compiling the Dart mixin declaration
    mixin M on S0, S1 {...}
to Kernel:
    abstract class _M&S0&S1 = S0 with S1;
    abstract class M extends _M&S0&S1 { ... }
we compile it to Kernel:
    abstract class _M&S0&S1 implements S0, S1 {}
    abstract class M extends _M&S0&S1 { ... }
because the former is not symmetrical with respect to S0 and S1.  It
will prefer a method from the 'mixin' S1 over one from S0 which can
give a compile-time error if the method from S0 is more general.

Modify mixin inference to support the new compilation of mixin
declarations.  It still has to support old-style VM super mixins until
support for those is removed from the VM.

Change-Id: Ib945aa11cc19c457b07bc802beae10d1663ff6b7
Reviewed-on: https://dart-review.googlesource.com/76141
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2018-09-27 10:19:30 +00:00
Jenny Messerly d673847bd8 [dartdevc] add --kernel option, deprecate bin/dartdevk
`dartdevc --kernel` is now equivalent to the old `dartdevk` command.
This will make migration easier, as it's now just a flag to enable
CFE/Kernel. `dartdevk` is now deprecated, but it can be supported for
a while as it just calls `dartdevc --kernel`.

Change-Id: Ib8d09f74556740a3af11c753f80cd87bd4a09044
Reviewed-on: https://dart-review.googlesource.com/76566
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-09-26 21:18:06 +00:00
Jenny Messerly 1c8d65c49b fix #32785, implement typedef equality in dartdevc
This change expands typedefs into their underlying function type in the
compiler. Typedefs no longer exist at runtime in DDC, so they now have
similar equality and identity behavior as other function types.

The compiler used to preserve typedefs so they could have a better
toString. But over time that support has been almost entirely lost;
the caching for function/interface types eliminates typedefs, and
DDC+Kernel does not appear to get any TypedefTypes from the common
front end. So in practice typedef types were almost never present at
runtime. Because of this, we can remove the remaining support with very
little user visible effect. This also brings DDC's canonicalization
roughly in line with dart2js for compile-time typedefs, so frameworks
like Angular will be able to continue their use of `identical` for fast
type comparisons.

This CL also fixes DDC's type caching for generic function types
(typeHashCode was incorrect for them), and has some refactoring to
improve names/comments and make the SDK runtime code more clear.

Change-Id: I4e34c0c8f737a8535ba474a4683967ff41bcd3c8
Reviewed-on: https://dart-review.googlesource.com/74664
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Alan Knight <alanknight@google.com>
2018-09-26 02:01:45 +00:00
Jenny Messerly 3b511b9439 [dartdevc] improve compile time of kernel backend
- avoids creating a second analyzer summary resynthesizer
- avoids creating a new class hierarchy

Change-Id: Idd9e2952f1ab46b2a5d58bbc40fa2be5c1604d5e
Reviewed-on: https://dart-review.googlesource.com/76062
Reviewed-by: Alan Knight <alanknight@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-09-26 01:02:05 +00:00
Jenny Messerly 64b6d713e3 [dartdevc] enable super mixin support in Kernel backend
Change-Id: If2a1c4ec8328080a890e7f22b657b19af4fe53ae
Reviewed-on: https://dart-review.googlesource.com/75791
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-09-20 23:59:18 +00:00
Paul Berry 7763ec3cd1 Surface analyzer toplevel inference limitations as DDC errors.
To avoid causing unrelated tests to start failing, the tests have been
modified to avoid running afoul of the analyzer toplevel inference
limitations.  (Note that we still have adequate test coverage in
pkg/front_end/testcases that the front end isn't subject to these
limitations).

Change-Id: I7b8f84a358d0e8891025b24143117c39d1b7dd69
Reviewed-on: https://dart-review.googlesource.com/75389
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-09-19 21:01:59 +00:00
Jenny Messerly 0496569f09 implement super mixins in dartdevc and fix a few issues in Analyzer
Fixes #34167. This implements the Dart 2 mixin proposal
(https://goo.gl/KEKQyv) for DDC. When the mixin is applied, a class
is created for the application that extends the correct superclass
and has all of the instance members, so `super` works correctly.

This also fixes a few minor issues in Analyzer's (mostly complete)
implementation:
- InterfaceType.isObject now returns false for Dart 2 mixins.
- Least upper bound calculation recognizes mixins are not Object.
- Interface of the mixin now implements its superclass constraints.
- Mixin superclass constraints are checked against the superclass and
  all previously applied mixins (if any); this keeps it working with
  the subtype fix above, and also prevents a not-yet-applied mixin
  from satisfying the constraint

The language_2/mixin_declaration tests were updated with a few minor
fixes now that we can run Analyzer/dartdevc to test them.

This change implements super mixins for DDC's Kernel backend (DDK)
too. This will be enabled once Kernel adds a flag to recognize which
Class nodes are mixins (vs normal classes).


Change-Id: Ib3c4fcb12de9988345e52d92931196828d8227c3
Reviewed-on: https://dart-review.googlesource.com/74965
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2018-09-18 03:21:48 +00:00
Jenny Messerly 98d25ed34a fix #34450, implement boolean bitwise operators in dartdevc
These will be added in https://dart-review.googlesource.com/c/sdk/+/74664.

Change-Id: I9712d8f9df72e686dd49e0b5198aa37e17815eb5
Reviewed-on: https://dart-review.googlesource.com/71228
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-09-14 20:02:16 +00:00
Martin Kustermann 609d2770be Reland "[VM] Add new SymbolConstant to package:kernel/ast.dart"
The canonicalization of symbols needs to take library privacy into
account. Since the Symbol class itself only has a [_name] field but does
not reference in which library the symbol came from, the [_name] must be
mangled.

Mangling is done by backends and so we make a new [SymbolConstant] which
the backends can desugar by doing appropriate mangling and construction
of a [Symbol] instance.

Fixes https://github.com/dart-lang/sdk/issues/34396

Change-Id: I2e13288483c35f875d39eefdb73677b2cc03527a
Reviewed-on: https://dart-review.googlesource.com/74360
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2018-09-11 09:29:01 +00:00
Jenny Messerly 24493c2f54 Add support for dartdevk to read Analyzer summaries into Kernel format
This allows dartdevk to be used in the context of an existing build
system based on Analyzer summary files. This will ease migration of
existing dartdevc users over to dartdevk.

Change-Id: I8413f906e384f3f33c98e450adc0860f6fa7bc53
Reviewed-on: https://dart-review.googlesource.com/65641
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-09-10 22:51:04 +00:00
Alexander Aprelev d97823b704 Revert "[VM] Add new SymbolConstant to package:kernel/ast.dart"
This reverts commit ef72098353 as it broke
buildbot on CQ.

Change-Id: If9d19a9393157078d0e0890b92a418ba5ced42c6
Reviewed-on: https://dart-review.googlesource.com/74281
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-09-10 20:40:43 +00:00
Martin Kustermann ef72098353 [VM] Add new SymbolConstant to package:kernel/ast.dart
The canonicalization of symbols needs to take library privacy into
account. Since the Symbol class itself only has a [_name] field but does
not reference in which library the symbol came from, the [_name] must be
mangled.

Mangling is done by backends and so we make a new [SymbolConstant] which
the backends can desugar by doing appropriate mangling and construction
of a [Symbol] instance.

Fixes https://github.com/dart-lang/sdk/issues/34396

Change-Id: I5ddb5331ce79a0b942807929d4b8f1050a9899e7
Reviewed-on: https://dart-review.googlesource.com/73883
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-09-10 15:31:09 +00:00
Jenny Messerly 1a6a334cd7 fix #34273, dartdevk should use the default bound for generic functions
When dynamically calling a generic function or method without passing
any explicit type arguments, the default bounds are used. The default
should be `dynamic` unless an explicit bound was provided for the type
parameter.

Change-Id: I82f7166303f936adbecedd0c633b518f2700def4
Reviewed-on: https://dart-review.googlesource.com/72081
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2018-09-01 01:48:21 +00:00
Alan Knight e3a063319d Check for an exception when asking if the Platform is windows
Change-Id: I4c247f5ae38e724d32e9db383817efa57047eea4
Reviewed-on: https://dart-review.googlesource.com/71901
Commit-Queue: Alan Knight <alanknight@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2018-08-30 22:17:45 +00:00
Paul Berry e76d37f307 Remove strong mode booleans related to summary linking.
The analyzer always runs in strong mode now, so these booleans aren't
needed.

Change-Id: Ic16ca9f37f8befead5aee85140fb70395a1d3511
Reviewed-on: https://dart-review.googlesource.com/71622
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-08-30 13:54:42 +00:00
Paul Berry d04d304909 Stop using/generating spec.sum file.
For some time now, this file has had the same contents as strong.sum.
There's no point in keeping it around.

Change-Id: I793a41ca6cb1c47c68357f549d299fa95b96c4c5
Reviewed-on: https://dart-review.googlesource.com/71701
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-08-30 12:32:52 +00:00
Jenny Messerly fb67619728 fix #29914, DDC shouldn't create super accessor for an abstract one
When the superclass has a getter/setter pair, and the subclass only
overrides one of the pair, DDC will generate the other one to forward
to the superclass. However these should not be generated for abstract
accessors. This patch fixes the compiler so it skips abstract accessors.

Change-Id: I60fa83b57db2e42ab47b7f4f3c28ef2a56e324ec
Reviewed-on: https://dart-review.googlesource.com/72073
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-08-30 00:39:13 +00:00
Konstantin Shcheglov 1b8f3026bf Remove most of isStrongModeError: false, update language_2 tests.
https://github.com/dart-lang/sdk/issues/33022
https://github.com/dart-lang/sdk/issues/28823
https://github.com/dart-lang/sdk/issues/11124

Change-Id: I44427cdab25aae356ec89d677fa142d23d7b42c7
Reviewed-on: https://dart-review.googlesource.com/71428
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2018-08-29 02:06:45 +00:00
Jacob MacDonald 00d9330987 use Uri.base.path not Uri.base.toFilePath
Change-Id: Ib9ace455b22f30e168ae5b37d70a6f5b45d00e0d
Reviewed-on: https://dart-review.googlesource.com/71183
Reviewed-by: Alexander Thomas <athom@google.com>
2018-08-22 16:59:09 +00:00
Jacob MacDonald 4445ad1707 Support custom --multi-root-scheme flag, and --multi-root arguments. Also pass the custom scheme to jsProgramToCode to fix placeSourceMap calls.
Change-Id: I394ce51ba15e68fb98b0ce2c65020c740763cd94
Reviewed-on: https://dart-review.googlesource.com/70680
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2018-08-21 18:58:29 +00:00
Brian Wilkerson 8b125b55d0 Add an AST structure for the new mix-in support
Change-Id: I3d8890edf26eeb19eaaab9c27772e2c37c10e629
Reviewed-on: https://dart-review.googlesource.com/70141
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2018-08-21 16:39:41 +00:00
Vyacheslav Egorov aa8145a03d [vm/kernel] Add a transformation that annotates invocations with receiver type.
Currently we only annotate those call-sites that would result
in generic covariant checks performed on the callee side.

Bug: https://github.com/dart-lang/sdk/issues/31798
Change-Id: Ifcf60032036575f615015d716276484a7c1236b3
Reviewed-on: https://dart-review.googlesource.com/69580
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-08-16 12:30:56 +00:00
Dmitry Stefantsov 53321309da [kernel] Remove Vector-related Kernel nodes
They were supposed to be used as a part of the closure conversion pass,
which is now obsoleted.

Change-Id: Ie063f6c44487df7cd5d21895e8edc03251525d5f
Reviewed-on: https://dart-review.googlesource.com/68662
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-08-07 11:49:49 +00:00
Brian Wilkerson 87f753dbd3 Replace some declarations of element with declaredElement
Change-Id: Idd62472b16cccaa98749a510197ec8d0f5053cb1
Reviewed-on: https://dart-review.googlesource.com/67820
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2018-08-02 16:00:36 +00:00
Jacob MacDonald 329e029bd6 Fixes https://github.com/dart-lang/sdk/issues/34035
https://github.com/dart-lang/sdk/commit/1a122e3ac0cc7f699b8b6ce7e10880a40061bacf looks like it accidentally stopped providing summaries at all in analyzer mode, and didn't take into account the summary extension when doing automatic module renaming.

Change-Id: Ib08d0ed169670d704a87d53d1937495939db9a73
Reviewed-on: https://dart-review.googlesource.com/67684
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2018-07-31 22:20:46 +00:00
Jenny Messerly 994dc880ed fix hints in dartdevc
Some of these only show up after the missing return fix (see #28233).

Change-Id: I4db73fac087ca7c4decf8b13460955d9917c671f
Reviewed-on: https://dart-review.googlesource.com/66900
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2018-07-26 23:35:33 +00:00
Jenny Messerly 1a122e3ac0 Deprecate module-root option in dartdevc, part of #32272
Adds an option for specifying the output JS module name if that is
needed (only applies for some module formats).

Also removes repl-compile (it's set via API, not the command line).

Refactors dartdevk options to match dartdevc so we can migrate more
easily. Moves shared code into a shared location and removes copied
code.

Change-Id: I966343ecbbc962f5d0f14ea7e65d78660159f420
Reviewed-on: https://dart-review.googlesource.com/64823
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2018-07-26 02:43:48 +00:00
Jenny Messerly 099815312a fix dartdevc source maps incorrectly storing temporary variable locations
Change-Id: Ib31bdc1067275c718b581172308c3926e19f906e
Reviewed-on: https://dart-review.googlesource.com/66861
Reviewed-by: Alan Knight <alanknight@google.com>
2018-07-26 01:32:58 +00:00
Jenny Messerly 21b85f326a fix #33348, length is a valid enum field name
Change-Id: Id4f9b3134a8041c826b7c8ccdd2763380f5fc987
Reviewed-on: https://dart-review.googlesource.com/66229
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2018-07-25 22:05:25 +00:00
Jenny Messerly 78ce706775 workaround for #33885, constant evaluation in Analyzer sometimes fails
Change-Id: I3cc641caab94210d38a893f849b4590dba77f47c
Reviewed-on: https://dart-review.googlesource.com/66225
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2018-07-25 20:54:25 +00:00
Jenny Messerly 44933e1f1e fix #33876, only use Object method null helpers if signature matches
toString and noSuchMethod are dispatched in a way that allows `null` to
be correctly handled. This code path was not checking if the argument
signature was compatible with the Object methods.

Change-Id: I25b5f11c32961b529660e2d49916053e1fab11df
Reviewed-on: https://dart-review.googlesource.com/65282
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2018-07-19 18:23:17 +00:00
Jenny Messerly 128ecff0c5 fix #33872, support typeArguments passed to reflectType
Change-Id: I84cfbeec89fa9bf3fa50b7df0ccb6861d364b802
Reviewed-on: https://dart-review.googlesource.com/65201
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2018-07-19 00:19:54 +00:00
Jenny Messerly 875abcea39 Remove experimental closure support from dartdevc
Change-Id: Id171cbfd220c4b504f13183ffdcad581c44fb41a
Reviewed-on: https://dart-review.googlesource.com/64826
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2018-07-16 19:32:44 +00:00
Jenny Messerly f601b9cd45 fix #33287, error in dartdevc if an int cannot be represented in JS
Also fixes #32585, Analyzer's int64 validation was rejecting integers
that are accepted by CFE/VM/int.parse.

Refactors DDC to allow us to emit errors from the CodeGenerator
(previously unsupported).

Change-Id: Ifd24ab90848cc42b226961e375167c557299c0b7
Reviewed-on: https://dart-review.googlesource.com/63023
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2018-07-12 00:47:01 +00:00
Devon Carew 6cc709e192 Avoid using deprecated apis and constants.
Change-Id: I471335e882817711c5d22ccb956dca5e33834679
Reviewed-on: https://dart-review.googlesource.com/64081
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2018-07-10 22:35:58 +00:00
Devon Carew 2dd33c2a6c Have the package:analyzer strong mode option hard coded to on. Delete several spec mode only tests.
Change-Id: I5dffec68d9845fe75936d55100c03306b6eda363
Reviewed-on: https://dart-review.googlesource.com/64060
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-07-10 05:30:10 +00:00
Jens Johansen 6888bc2824 Compile time error for web int literals that cannot be represented exactly
Bug: #33351
Change-Id: I2b99858dfc276dc70c3a36c289030e801145af86
Reviewed-on: https://dart-review.googlesource.com/61180
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2018-06-22 10:47:54 +00:00
Jens Johansen 276598199e Make DDK interpret IntLiteral.value as uint64
As per bug #33351, and based upon what dart2js does.

Change-Id: I18fec2685b22b094d191f4c70a58553a9132b86c
Reviewed-on: https://dart-review.googlesource.com/60841
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2018-06-20 08:18:19 +00:00
Jenny Messerly d2a37231b3 optimize await in async* methods in dartdevc
Refactors async* implementation class to dart:async and ports it back to
Dart. Improves `await` to avoid zone registration at each await.

Change-Id: I15cac2a40bd56269c8ade1dc0810792c23459ef5
Reviewed-on: https://dart-review.googlesource.com/59260
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2018-06-15 01:54:03 +00:00