Commit Graph

2256 Commits

Author SHA1 Message Date
Leaf Petersen 4c881188b2 Disable the .whereType method until generic methods are turned on.
The whereType method silently does the wrong thing without methods,
so make it throw until we turn them on everywhere.

Change-Id: Id934c8bdb4f682dbc3560d78fbca580e37297e2d
Reviewed-on: https://dart-review.googlesource.com/45744
Reviewed-by: Nate Bosch <nbosch@google.com>
2018-03-08 23:14:22 +00:00
Lasse Reichstein Holst Nielsen b3c12d4e3a Dart 2 Libraries Wave 3
Add `typeArguments` to Invocation.
Add constructors to Invocation, making it less necessary for users to create their own implementations.
Add tests.
Add Symbol.unaryMinus and Symbol.empty constants.

Change-Id: I70cb3265f9413617cf57fce1297e393a29eeb26a
Reviewed-on: https://dart-review.googlesource.com/40741
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-03-08 16:36:07 +00:00
Paul Berry a3218d0b72 Roll back change to pkg/dev_compiler/analysis_options.yaml
This should work around #32450 and fix the buildbots.

Change-Id: I21d187a34de86ef4e383a9ea7fc297eda1363780
Reviewed-on: https://dart-review.googlesource.com/45521
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-03-07 12:10:07 +00:00
Jenny Messerly dab7da78cd fix implicit casts in DDC
There are a few bug fixes here as well. Most notably, `.name.name`
instead of `.name` in DDK's analysis of virtual accessors. DDC/K's
handling of spread arguments in JS interop was also fairly broken
(it was generating a RestParameter instead of Spread). There's
also a lot of cleanup in js_ast as well, to make it a bit more
type safe.

Change-Id: Ia5333179e6dd0a62f20ce64a2b2b8bedf2ed7c49
Reviewed-on: https://dart-review.googlesource.com/44700
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2018-03-07 01:26:21 +00:00
Jenny Messerly 1b9b3453de fix DDC ES6 module export names, part of #32272
We use renamable variables for Dart libraries, this ensures we still
export it with the correct name.

Change-Id: I96dc161e33d265c0ffbd07f8d642629504dffe62
Reviewed-on: https://dart-review.googlesource.com/42892
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2018-03-07 01:03:01 +00:00
Vijay Menon 34f8c356a3 Fix sdk stack trace mapping so tools recognize it
This should fix #32389

Change-Id: I1e6f1a7aea852abb9b2b4a9bf851941a8e0c91e7
Reviewed-on: https://dart-review.googlesource.com/44840
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2018-03-02 19:46:49 +00:00
Vijay Menon 39c2fc00e8 Optimize forwarding calls in string/num/bool
This generates string.length instead of string[dartx.length].  Will
do same kernel side if this looks good.

Change-Id: I1fed3ca3febfa441ba36a0be34d06ab9e2e103c8
Reviewed-on: https://dart-review.googlesource.com/44280
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2018-03-01 03:55:16 +00:00
Vijay Menon ea7c7988e3 Don't inline source maps into the SDK
Change-Id: Ia4e8673cf0c023353b27a3c0a947b09e04ec09c0
Reviewed-on: https://dart-review.googlesource.com/44320
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2018-03-01 03:21:37 +00:00
Lasse R.H. Nielsen 9ee735b659 Add missing methods to List and Map implementations.
Optimize FollowedBy when the operands have efficient length.

Change-Id: I0af59240d70b929358c06b8d57a85df2deee6aaf
Reviewed-on: https://dart-review.googlesource.com/43665
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-02-28 12:26:53 +00:00
Devon Carew aac3b7a3c1 Address two analyzer warnings.
Change-Id: Idec60e040785b8967c024557f15dc28839287a94
Reviewed-on: https://dart-review.googlesource.com/43540
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-02-23 19:42:58 +00:00
Peter von der Ahé fc5e9938e6 Tweak output from package:testing
* Ensure that chain paths have a trailing slash.
* Don't use ANSI escapes when terminal doesn't support them.

Both changes combined should change the logged output on build bots from running pkg/dev_compiler/test/sourcemap/sourcemaps_ddk_suite.dart from:

<ESC>[2K[ 00:00 |   0.0% | +    0 | -    0 ]: sourcemaps_ddk//breakpoint_on_class_all_in_one_line.unformatte setup<ESC>[1A

To:

[ 00:00 |   0.0% | +    0 | -    0 ]: sourcemaps_ddk/breakpoint_on_class_all_in_one_line.unformatte setup

Change-Id: I0f79e7cefb4e5bcba3002aa49f624cc0a2f7032c
Reviewed-on: https://dart-review.googlesource.com/43402
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-02-23 12:50:04 +00:00
Stephen Adams 284312b101 Test for compiled-to-JavaScript version of BigInt.isValidInt
In JavaScript, and integral valued double is an 'int'.

Change-Id: I79dedcb00f74dc699f85a21a2052239ed25b7974
Reviewed-on: https://dart-review.googlesource.com/41640
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2018-02-22 04:07:52 +00:00
Jenny Messerly 12a3378a49 fix #27305, DDC's default help should be simple
This moves more options to verbose help (`-h -v`) similar to dart2js and VM.

Change-Id: I7d3d9525543e26e55c2d1853e8c32722784c41d4
Reviewed-on: https://dart-review.googlesource.com/42881
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-02-21 23:49:42 +00:00
Konstantin Shcheglov fae3a83629 Remove typed_mock
Bug: https://github.com/dart-lang/sdk/issues/32271
Change-Id: I32d7708f269b9618f6a031f0323f5cea646066f3
Reviewed-on: https://dart-review.googlesource.com/42862
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-02-21 22:22:32 +00:00
Jenny Messerly 2ba564fa07 Avoid Analyzer isInSdk in DDC to work around #31045
We were avoiding it in most cases, but a few slipped in.
Also refactors a few `uri.toString() == value` to test the scheme and
path, avoiding the expensive `Uri.toString()` call.

Change-Id: I7500a1fa9139b0cc0f2d5bd6d899f6563ec402b8
Reviewed-on: https://dart-review.googlesource.com/42463
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-02-21 18:33:31 +00:00
Jenny Messerly 23f9f269a7 fix #32217, library prefixes can now be hovered in DDC expressions
For example, hover now works on `async` in `async.scheduleMicrotask`:

    import 'dart:async' as async;
    main() {
      async.scheduleMicrotask(() { print('hi'); });
    }

This does not change the import line or types, as neither of those
currently supports hover.

Change-Id: I4d9d61fb4e67ebda02cc6c1ce982b35b31d799bc
Reviewed-on: https://dart-review.googlesource.com/42086
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2018-02-21 14:08:26 +00:00
Jenny Messerly c9d2d5ba36 fix #32209, hover on cascades in DDC
Also improves hover on instance creation, so the constructor can be
hovered/jumped to.

Change-Id: Ie05c6e8cf4b98b334aba31be80bbe97a56d2079e
Reviewed-on: https://dart-review.googlesource.com/42084
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-02-21 04:35:44 +00:00
Vijay Menon 64c1dc8e24 Set ignoreWhitelistedErrors to false by default
Our SDK tests explicitly disable this.  I'd like our external apps to
have this disabled as well - not sure it's coming up there.
Internally, we will need to enable in our bootstrap code.  I'll turn
that on there for now - but perhaps we can make that a per-target thing.

Change-Id: I484e048126d8d75f31f404029b94efe1d822c49e
Reviewed-on: https://dart-review.googlesource.com/28381
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2018-02-20 21:29:25 +00:00
Jenny Messerly 0e4d4b3116 fix #32210, hover on top-level/static fields
Change-Id: Ied71cbaeaffc69b292549b600426e06de525048a
Reviewed-on: https://dart-review.googlesource.com/42085
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-02-20 19:26:46 +00:00
Jenny Messerly 6ae0c47649 skip field initializers in DDC when they have no visible effect
We already do this in most cases when we have a constructor initializer
and the field initializer is side effect free (e.g. implicit null or a
literal). But `this.` fields were not recognized as being initialized
explicitly by the constructor.

This is already working in DDC+Kernel (because `this.` parameters are
desugared).

Change-Id: I2af1a71681451adf00c1807b2c41dad874a9465a
Reviewed-on: https://dart-review.googlesource.com/41961
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-02-20 18:48:45 +00:00
Jenny Messerly f4823309b2 fix pkg/dev_compiler/tool/ddb to work for paths outside the cwd
Change-Id: I571283824b1f5ca660842ceeb8ccc0a7624697d8
Reviewed-on: https://dart-review.googlesource.com/42500
Reviewed-by: Vijay Menon <vsm@google.com>
2018-02-20 18:39:09 +00:00
Aske Simon Christensen 194dcf6a9b Report detailed errors when the number or names of arguments do not
match parameters of callee.

Closes https://github.com/dart-lang/sdk/issues/31795

Change-Id: Ic53cc55174a540f387289d4d9cc24ff5c65c547e
Reviewed-on: https://dart-review.googlesource.com/40822
Reviewed-by: Paul Berry <paulberry@google.com>
2018-02-20 16:42:25 +00:00
Jenny Messerly 2d851eb444 fix #32083, improve hover and stepping for DDC source maps
This change improves DDC/DDK source maps:
- fix Analyzer backend step locations to pass all of the tests
  Kernel was passing. Also improves breakpoints and code coverage.
- fix Analyzer backend to mark hover spans where possible, such as
  fields, parameters, locals, `this`, properties, methods, etc.
- refactor DDC/DDK backends to emit source locations, rather than
  pointers to Analyzer/Kernel tree nodes.
- unify/simplify source_map_printer between Analyzer/Kernel backends.
- source_map_printer understands JS expression nesting, marking the
  innermost JS expression offset corresponding to a given Dart offset.
  This preserves hover tooltips, even for expressions with implicit
  coercions (e.g. `dart.test(x)`)
- source_map_printer understands that JS end-of-function markings need
  to be before the closing brace.
- merge _visitAndMarkExpression and _visitExpression to simplify
  Analyzer & Kernel backends.
- fix test expectations where the column location was too specific.
- adds a message to the stepping test runner to help future debugging.
- removes optional destructuring support from Analyzer backend. This
  was unused/untested and added complexity. Instead we should decide
  if/when to fully switch to destructuring, and then do so.

Change-Id: Ic47b4e21447fffc8fb1809b7bf8ffceeeb61b43e
Reviewed-on: https://dart-review.googlesource.com/42028
Reviewed-by: Vijay Menon <vsm@google.com>
2018-02-17 21:25:56 +00:00
Stephen Adams e1cfc35572 Update dart2js/ddc int.bitLength
1. Make bitLength work on very large values. This fixes problems with
BigInt.from on large values.

2. Restructure to allow Math.clz32 to be used once dart2js no longer
supporst IE11.

Change-Id: I255f030ff3b3630cdee63502d11a8b6630a4f008
Reviewed-on: https://dart-review.googlesource.com/41960
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2018-02-16 22:26:35 +00:00
Jacob MacDonald 0bda5c9015 get source_map_stack_trace working for the external world
Bug:
Change-Id: I7385f2f1f11742ce5f90cce67b863ba066074679
Reviewed-on: https://dart-review.googlesource.com/41921
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2018-02-15 22:45:26 +00:00
Jenny Messerly b371ed5db3 fix #32140, locals shadowing constructor/catch params
This gets DDC and DDK to handle the block body of functions/methods in a
similar way, eliminating it from the JS if it is not necessary, and fixes
a bug in DDC for cases where we do need to emit a nested block scope.

Change-Id: I37d3d69bfcf9b1204385cca7785601fb7d6edfc3
Reviewed-on: https://dart-review.googlesource.com/41565
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-02-14 23:43:13 +00:00
Paul Berry 421db9c69c Re-land "Implement proper checking for callability of Function class."
(was reverted in https://dart-review.googlesource.com/c/sdk/+/40980
due to an analyzer bot breakage)

Original commit message:
Implement proper checking for callability of Function class.

There was some old (incorrect) logic for doing this, behind the flag
enableStrictCallChecks.  This flag has been removed, since the new
behavior is now standard in Dart 2.0.

Fixes #31509

Change-Id: Ice5cf38bbc648badf7f2563ff930b69f9a799635
Reviewed-on: https://dart-review.googlesource.com/41120
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-02-14 11:30:23 +00:00
Régis Crelier 4c9a842d61 [corelib] Cleanup isValidInt and toInt() in new BigInt implementation.
Change-Id: I1f107d4f6e26ea3644bc6c9f7cff5ee6fac43958
Reviewed-on: https://dart-review.googlesource.com/40512
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2018-02-14 03:43:52 +00:00
Paul Berry 35aea15097 Revert "Implement proper checking for callability of Function class."
This reverts commit 6837dafcc3.

Reason for revert: Broke analyzer bots.

Original change's description:
> Implement proper checking for callability of Function class.
> 
> There was some old (incorrect) logic for doing this, behind the flag
> enableStrictCallChecks.  This flag has been removed, since the new
> behavior is now standard in Dart 2.0.
> 
> Fixes #31509
> 
> Change-Id: I4a6da34a4b85ea8409f6e0d14c377a586546056a
> Reviewed-on: https://dart-review.googlesource.com/40509
> Commit-Queue: Paul Berry <paulberry@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Reviewed-by: Mike Fairhurst <mfairhurst@google.com>

TBR=paulberry@google.com,scheglov@google.com,brianwilkerson@google.com,mfairhurst@google.com

Change-Id: Ib631ad16bc5e937ff914127d1c5330f3fcaff2c9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/40980
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-02-13 19:56:35 +00:00
Paul Berry 6837dafcc3 Implement proper checking for callability of Function class.
There was some old (incorrect) logic for doing this, behind the flag
enableStrictCallChecks.  This flag has been removed, since the new
behavior is now standard in Dart 2.0.

Fixes #31509

Change-Id: I4a6da34a4b85ea8409f6e0d14c377a586546056a
Reviewed-on: https://dart-review.googlesource.com/40509
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2018-02-13 14:19:08 +00:00
Vijay Menon b0017db436 Add DDC launcher for Chrome / Node / D8
Note: by default, it uses the dartdevc/dartdevk snapshot on your path.
Use the -d flag to run against current sources.
Change-Id: I3dbce41653258b9d965505dba66458d07124409f
Reviewed-on: https://dart-review.googlesource.com/40120
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2018-02-09 22:21:53 +00:00
Jenny Messerly 5ef7920d84 fix DDC explicit field initialization to null
This was unintentionally regressed during a fix to field init order. It
does not typically show up in Dart code because undefined and null are
both handled, but it can break JS interop.

Change-Id: I771895826ee09bb6c5e2f9b016eb7673caf61cd1
Reviewed-on: https://dart-review.googlesource.com/40202
Reviewed-by: Vijay Menon <vsm@google.com>
2018-02-09 02:48:07 +00:00
Lasse R.H. Nielsen bdc6e9c862 Add ticks counter to Timer.
Change-Id: Ie5ed28fa8b7ef9c6aea97331267cf3c717b17099
Reviewed-on: https://dart-review.googlesource.com/21342
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-02-08 10:16:00 +00:00
Jenny Messerly 4f5b5566c1 fix #32082, local variable assignment source location
Also fixes some issues with field initializers; stepping and hover
tooltips should work reasonably now.

Change-Id: I2d0e9e7e14a52ee8c020902f80f835a913f494f3
Reviewed-on: https://dart-review.googlesource.com/39860
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2018-02-08 02:58:39 +00:00
Lasse R.H. Nielsen 6f78471687 New methods on Iterable, List, Set, Queue, Map.
Changes signature of Iterable.singleWhere.
Makes LinkedHashMap no longer be a HashMap.

Change-Id: I7a12fea533d42b0fc8357086649df38ad01f3cdd
Reviewed-on: https://dart-review.googlesource.com/39140
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-02-07 06:12:53 +00:00
William Hesse 9c35cff5cd Revert "New methods on Iterable, List, Set, Queue, Map."
This reverts commit 0b59f24f97.

Reason for revert: Creates crashes in dart2js with kernel, see
https://luci-milo.appspot.com/buildbot/client.dart/dart2js-linux-d8-minified-1-5-be/9751

Original change's description:
> New methods on Iterable, List, Set, Queue, Map.
> Changes signature of Iterable.singleWhere.
> Makes LinkedHashMap no longer be a HashMap.
> 
> Change-Id: Ibd7e56e1ac03cb9fb10d19d1328d452fcd06d89f
> Reviewed-on: https://dart-review.googlesource.com/32541
> Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
> Reviewed-by: Leaf Petersen <leafp@google.com>

TBR=lrn@google.com,leafp@google.com

Change-Id: Iab904f5885a5213ae2e16ef496eed0b6843185f3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/39060
Reviewed-by: William Hesse <whesse@google.com>
2018-02-06 13:32:19 +00:00
Lasse R.H. Nielsen 0b59f24f97 New methods on Iterable, List, Set, Queue, Map.
Changes signature of Iterable.singleWhere.
Makes LinkedHashMap no longer be a HashMap.

Change-Id: Ibd7e56e1ac03cb9fb10d19d1328d452fcd06d89f
Reviewed-on: https://dart-review.googlesource.com/32541
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-02-06 11:17:46 +00:00
Bob Nystrom a73b141633 Remove StreamSubscription<T> from the cast failure whitelist.
All internal cast failures should be fixed now, so we don't need to
ignore this type any more.

Change-Id: I206d7865f5a3293e579f31e96e919b69b572200f
Reviewed-on: https://dart-review.googlesource.com/38980
Reviewed-by: Vijay Menon <vsm@google.com>
2018-02-06 04:19:02 +00:00
Jenny Messerly 85cfbebd76 Fix constKeyword usage in DDC in preparation for implicit new/const
Change-Id: Iad3d38449dbe5bbb71d470cf085c2c071432abf5
Reviewed-on: https://dart-review.googlesource.com/38147
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-02-02 20:33:46 +00:00
Florian Loitsch 3b8e4d41a7 Reapply "Run async functions immediately."
Which was reverted in commit 032be73dbe.
Originally commited in commit 67bac0bce6.
Original review URL: https://dart-review.googlesource.com/5263

Change-Id: Ic7333c29e502a3924dc6aade8ffa46fc8aa5b04a
Reviewed-on: https://dart-review.googlesource.com/38120
Commit-Queue: Florian Loitsch <floitsch@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2018-02-02 15:50:16 +00:00
Florian Loitsch 032be73dbe Revert "Run async functions immediately."
This reverts commit 67bac0bce6.

Reason for revert: broke the bot.

Original change's description:
> Run async functions immediately.
> 
> Migrated from https://codereview.chromium.org/2478703003/
> 
> Change-Id: I1d678c01ba5876490b12c676c500171328361d31
> Reviewed-on: https://dart-review.googlesource.com/5263
> Commit-Queue: Florian Loitsch <floitsch@google.com>
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
> Reviewed-by: Vijay Menon <vsm@google.com>
> Reviewed-by: William Hesse <whesse@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Régis Crelier <regis@google.com>

TBR=whesse@google.com,rnystrom@google.com,vegorov@google.com,kustermann@google.com,zra@google.com,floitsch@google.com,jmesserly@google.com,vsm@google.com,regis@google.com,sigmund@google.com

Change-Id: I20c948057423c3fa5aa8c72843f8f2a17e086ad5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/37981
Reviewed-by: Florian Loitsch <floitsch@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2018-02-01 15:01:21 +00:00
Florian Loitsch 67bac0bce6 Run async functions immediately.
Migrated from https://codereview.chromium.org/2478703003/

Change-Id: I1d678c01ba5876490b12c676c500171328361d31
Reviewed-on: https://dart-review.googlesource.com/5263
Commit-Queue: Florian Loitsch <floitsch@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2018-02-01 14:08:57 +00:00
Lasse Reichstein Holst Nielsen 0c18b643c6 Add RegExp.escape methods.
Fixes 4706

Bug: http://dartbug.com/4706
Change-Id: If635cb0eb7c20405ab0127a443fe51176191b5ad
Reviewed-on: https://dart-review.googlesource.com/35641
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2018-02-01 09:56:47 +00:00
Jenny Messerly 68ea5433fd implement assert initializers for DDC, fixes #27809
also fixes #31058, DDC failed to execute all field initializers
(already fixed this in DDK when porting code_generator).

also fixes assertion_initializer_test, it was not strong mode clean, so
it was not giving any meaningful results for runtime behavior.

Change-Id: I290b266ad77ed92851cc2d0617690c6c021182a3
Reviewed-on: https://dart-review.googlesource.com/37866
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-02-01 01:12:17 +00:00
Jenny Messerly 7d60caba63 fix #31973, dynamic calls to super getters that return Function
Change-Id: I6e87d5a501fcd004b43d570ce8a970ae9b8a5f78
Reviewed-on: https://dart-review.googlesource.com/37900
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-02-01 00:51:06 +00:00
Jenny Messerly 5013b28bbe fix #31999, remove fuzzy arrow runtime support from DDC
Also updates tests that relied on fuzzy arrows.

Change-Id: Ia8df1d8d421e43dfada589223d5e46182b92fa67
Reviewed-on: https://dart-review.googlesource.com/37425
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-01-31 22:20:38 +00:00
Bob Nystrom 4aa55f06f4 Don't redundantly ignore cast failures on function types.
As far as I can tell, this case never gets hit because there is separate
support for ignoring cast failures on function types elsewhere.

Change-Id: I78bd8d0af10764477505545384f5103f294228bf
Reviewed-on: https://dart-review.googlesource.com/37648
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2018-01-31 21:48:40 +00:00
Jenny Messerly 16f8bbe68b fix #32001, DDC mixins with getter/setters partially from superclass
Whenever we install a getter or setter, we need to install a corresponding
one that calls `super`, because JS treats getters/setters as pairs for the
purposes of lookup. Normally we generate the paired super accessor, but for
mixins we cannot, because we don't know what the `super` will be at compile
time. So the fix is for `mixinMembers` to handle it at run time.

Change-Id: I2b14ea437720bd26f2879c7daac5b3f796d48038
Reviewed-on: https://dart-review.googlesource.com/37645
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-01-30 21:44:50 +00:00
Leaf Petersen 991753313f Remove deep future flattening from analyzer and DDC
Change-Id: Ic48f29adec3a46744b259ba5b2b8ad7d97caa6c2
Reviewed-on: https://dart-review.googlesource.com/37424
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2018-01-30 18:11:11 +00:00
Paul Berry e978cd6062 Encapsulate the handling of forwarding stub target references.
As discussed in https://dart-review.googlesource.com/c/sdk/+/34261.

Change-Id: I2af5021ad9738f6bc47bb11d2a1133f303d3ace9
Reviewed-on: https://dart-review.googlesource.com/36481
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
2018-01-30 11:49:38 +00:00