Commit Graph

2009 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
Ivan Naydonov ed6c557d1a Add cli parameters to kernel_sdk.dart to get all paths explicitly
To allow ddc sdk kernel generation internally, add a way to provide
paths to dependent files explicitly, instead of assuming relative from
Platform.script.

Also remove .packages file parameter. We don't have this file internally
and sdk shouldn't depend on any of packages anyway, so it just work
without this option.

Change-Id: Iec892cbb640d35e64d107c6af36d214632815bae
Reviewed-on: https://dart-review.googlesource.com/c/77485
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Auto-Submit: Ivan Naydonov <inayd@google.com>
2018-10-09 22:15:06 +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
Vijay Menon 70cc34df21 Custom format errors and exceptions to show traces
Fixes #34529

Change-Id: If5142a9c11808af50d1b7a04346e53e980cce3e6
Reviewed-on: https://dart-review.googlesource.com/76101
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2018-09-24 17:41:33 +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
Lasse R.H. Nielsen cc08d0e1da Add operators &, | and ^ to bool.
Change-Id: Idd6472f239445914c1ff1ab68fc7b38fa6b320ae
Reviewed-on: https://dart-review.googlesource.com/25240
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Florian Loitsch <floitsch@google.com>
2018-09-17 12:33:12 +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 be5cd6307f fix #34296, generic function instantiation should be checked eagerly
Change-Id: I8c6e0980c23d8ca2cb22db9411028b59be5eb8db
Reviewed-on: https://dart-review.googlesource.com/72545
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-09-07 21:34:36 +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
Jenny Messerly 14d3249567 fix dartdevc to be robust if JS interop classes are not found
If a JS class is not found (because it's not loaded yet), dartdevc
should handle this gracefully. However the code assumed that the class
would not be nested in a module that itself has not been loaded. That's
fixed in this change.

Change-Id: I2de8f4b85e8063dea31ea257aca9721702c6ea7a
Reviewed-on: https://dart-review.googlesource.com/72065
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-08-30 00:38:08 +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
Bob Nystrom da2ed2fd59 Don't ignore runtime cast failures on Map<K,V>.
Change-Id: I18a607e37510b78c27a62381864b98f21a0d4192
Reviewed-on: https://dart-review.googlesource.com/67503
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2018-07-30 23:31:05 +00:00
Jenny Messerly 7651177cf1 fix #33684, "not a function" JS TypeError usually means nSM
Improves the error message when calling a null function, by suggesting
to the user that null may be the problem. Also prefixes the errors with
'NoSuchMethodError' to match Dart user expectations (the Dart type that
users can catch is indeed NoSuchMethodError).

Change-Id: Ia9bca5bc2a3e33e83f0c3728b48f7b17f98dcc6a
Reviewed-on: https://dart-review.googlesource.com/66228
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2018-07-27 00:13:00 +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
Sigmund Cherem d5b5736a47 Merge DDC's libraries specification into the sdk/lib/libraries.json file
Change-Id: I3f8076a3726aec0636e63173df8ec2a2c75d225e
Reviewed-on: https://dart-review.googlesource.com/66740
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-07-26 22:31:51 +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 5fa401cab0 fix dartdevc dart:_runtime to use old-style part-of declarations
There appears to be some inconsistency in how "dart:" part-of URIs are
interpreted by different tools, so this goes back to the old style.

Change-Id: I02f9ce568c0b9859f2fa6239131b0232aa1f8ae4
Reviewed-on: https://dart-review.googlesource.com/66281
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-07-25 02:29:31 +00:00