Commit Graph

311 Commits

Author SHA1 Message Date
Srujan Gaddam 65ce9ed581 Add debugger runtime APIs and add/modify tests
- Exposes a minimum set of APIs that are needed by DWDS
a single class Debugger.
- Renames some APIs and modifies the signature to better
align with what's happening and what DWDS actually uses.
Similarly, modifies the internal APIs to handle the new format.
- Modifies expression evaluation test suite to handle the
new module format correctly.
- Modifies LibraryBundleCompiler to emit the right export name.
- Adds/adapts existing tests for the runtime debugger APIs.

With this, all tests within pkg/dev_compiler/test/expression_compiler
pass with the new module format with the exception of two tests within
expression_compiler_e2e_ddc_null_safe_test, which will be fixed
in a future CL.

Change-Id: I296496441ea421ecb57bed3b2e90b92365fef510
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/391308
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2024-11-01 22:09:30 +00:00
MarkZ d53711d88b [ddc] Reconciling d8 and Chrome timing differences in hot reload suite.
Appending a script to the DOM in Chrome causes microtasks to fire. This change makes the `hotRestart` pathway async and inserts an async callback at the hot restart boundary for d8.

Change-Id: Ib05e9e496b6313d861fb5cb691a5894beed62a6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/389224
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2024-10-28 23:11:43 +00:00
Nicholas Shahan 95d13a89fa [ddc] Compile SDK as a bundle of libraries
Cleanup temporary code paths in the stable version of compiler.dart.

Change-Id: I4b60d90345bf8653060772789f55e16fb5db60d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/385185
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2024-10-04 20:08:57 +00:00
Sigmund Cherem 00b11411d6 [ddc] support library cycles in the new module format.
We'd like to properly support cases like:

```
a.dart:
  import 'b.dart';
  class A extends B {}
  class C {}

b.dart:
  import 'a.dart'
  class B extends C {}
```

Here both A and B will request a reference to the other during
linking.

We break the cycle by storing libraries in the map after they are
initialized, but before we recursively link them. Now an access to a
library proxy has different guarantees:
* during linking, it guarantees to return an intialized library.
* during program execution, it guarantees to return a linked
  library.

Aside from this change, this CL does a minor change to the logic on
`hotReloadEnd` to not change the state of the `libraries` array on a
hot-reload. This change is technically not necessary, but may help us
more clearly track the invariants of the library map: the new logic
keeps updates to the map monotonic over time.

Change-Id: Id2aafa3d94c6bff32b7ddb326f883f978bff6bf0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/385324
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2024-09-27 18:07:48 +00:00
Sigmund Cherem 9c91f31c10 DDC implementation of experimental dynamic modules.
In particular,

* Provides a DDC implementation for dynamic modules, where the download
  and instantiation of the module is delegated to the embedder of the
  program.

* Exposes an embedding API to allow embedders to define the loading logic.

* Adds a flag to compile code as a dynamic module. This includes
  generating an entrypoint trampoline and checks to validate that a
  dynamic module doesn't stump over previously defined libraries.

* Adds test coverage for DDC under `pkg/dynamic_modules/test/`.

Test suite can be run by executing:
```
DART_CONFIGURATION=ReleaseX64 out/ReleaseX64/dart-sdk/bin/dart \
    pkg/dynamic_modules/test/runner/main.dart -t ddc
```

Once we provide integration of test configuration results to that test
runner, we will add it as part of the test matrix.


Change-Id: I626b5fefe9a27546cc6d1630d17e812544a711c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/379748
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2024-09-10 00:55:02 +00:00
MarkZ 6db84ef903 [ddc] Adding hot reload test with DDC's new module system.
Change-Id: I55c0b4d3c74654c192b6e664120778b057aa7161
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383820
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2024-09-09 23:16:48 +00:00
Nicholas Shahan ec0445ae79 [ddc] Add hot restart to new ddc module format
Add a simple implementation that throws out all libraries and runs the
main method again which triggers all libraries to be initialized with
fresh values.

Move the hot reload tests to the ddc canary test configuration
since that is where the support works at this time.

Update frontend server to use the use the new version of the DDC
LibraryCompiler when the emit library bundle option is true.

Change-Id: I6eba613106672536ef8bfcb0ff0a55749e2fb63c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/381902
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-09-09 17:58:56 +00:00
Nicholas Shahan 3cc6105316 [ddc] Add empty link methods to new ddc module format
The link methods will contain all operations required to link class
hierarchies across library boundaries.

Change-Id: Iaa2bc566e17d215fd8bd9a20e6fc668679a2b58c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380208
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2024-08-30 22:53:32 +00:00
Nicholas Shahan c958bcc4cc [ddc] Use import URI to name a library
Import URIs are normalized by the CFE and should be globally unique in
the program. They serve as a good identifier to name a library in the
new "ddc" module format.

Change-Id: I9e255221bcffba52ad80138a4672d0490b7cbacd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/381781
Reviewed-by: Nate Biggs <natebiggs@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
2024-08-30 22:53:32 +00:00
Nicholas Shahan 49f630c53b [ddc] Introduce a hot reload variant of "ddc" modules
These new modules are only used when compiling with the `--canary`,
`--modules=ddc` and no other module formats.

This new flavor of the module system treats the output .js files as
a bundle of one or more Dart libraries.

In this change the Dart SDK module is still compiled with it's
libraries mixed together but exports them individually. Ideally this
is temporary and eventually they can be compiled in isolation as
well.

All other modules are compiled in isolation so class hierarchies many
may be broken until proper cross library linking is implemented in a
followup change.

Change-Id: I27e58a445476198bd8613bb63c57cb96c0d5bc55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/379261
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2024-08-20 20:14:36 +00:00
Elliott Brooks 51e8a74f07 [DDC] During hot-restart, wait to run main if the promise readyToRunMain is provided
Bug: https://github.com/flutter/devtools/issues/7231
Change-Id: Iebd1caa62cff4f41a226d7214c7a8ae330ed02c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355880
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Elliott Brooks <elliottbrooks@google.com>
2024-04-18 21:22:15 +00:00
MarkZ d30283f0a1 [ddc] Adding tests for pkg:reload_test and enabling reload tests in test bots.
* Adds tests for the memory filesystem
* Enables hot restart/reload tests
* Adds flags to the hot reload suite
* Makes path resolution logic windows-friendly
* Adds test-reporting logic for trybots to hot reload tests

Change-Id: Ic51a0b8a3c6f8b6de20b58b2ac185dacf444cf47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353788
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2024-03-25 23:58:26 +00:00
MarkZ 210e120fbd [ddc] Creating a hot reload and hot restart test suite.
The hot reload runner currently only supports d8, but I plan to add support for Chrome and VM execution.

Notable changes:
* Creates `package:reload_test` with helpers for running this suite.
* Updates the module loader with D8-specific branches and hooks for hot reload/restart.
* Exposes DDC runtime variables via a `HotReloadTestRuntime` API.
* Ports constant equality hot restart tests from webdev/dwds (validated to fail if either cache-clearing mechanism fails).
* Partially rolls DDC's d8 preamble forward (towards dart2js's).
* Wraps D8's timer implementation with custom timeout logic to better match Chrome's timing semantics when executing with native JS async.

Tests for the framework and matrix updates will be added in an upcoming change.

Change-Id: I2773b29f464cfd0330e4c653c05e117ae150b4a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350021
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2024-03-05 00:12:18 +00:00
MarkZ 91d22a7e40 [ddc] Renaming dart_library.js to ddc_module_loader.js
This also removes deprecated references to the DDC module system as the "legacy" module system.

This is part of an ongoing effort to deprecate the AMD module system: https://github.com/dart-lang/sdk/issues/52361

Change-Id: Ic32c6c6a0b7bf2c3bf0326be42cc9a88db8e303e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348183
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2024-01-30 19:43:49 +00:00
MarkZ 5d4e742a67 Updating dart_library.js to be consistent with its internal version.
Change-Id: Ia90393022cf43a713bf9f6efb36f3f29b13aa456
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/338422
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2023-12-06 21:50:54 +00:00
Nicholas Shahan 1e1266f8e6 [ddc] Sync dart_library.js from internal
Fixes: https://github.com/dart-lang/sdk/issues/52372
Change-Id: I9cc76c685b9234118a66fa38d2d4e03c2d3fc434
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/306916
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-06-05 17:59:24 +00:00
Mark Zhou 887505e3ab [ddc] Creating dart_library API for deferred loading
This is part of a series of CLs to enable real deferred loading in DDC.

- Creates a new top-level object in dart_library.js for holding the state/API
  for deferred loading.
- Only supported in the DDC module system

This also contains a bunch of cleanup/comments for our internal JS Linter. Notably, 'var' is not allowed, so we're attaching our top level namespace objects to `self`.

Change-Id: I230d63f044e85e7d16644525ff79fa9522398c87
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289400
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2023-04-10 23:00:41 +00:00
Mark Zhou a92274cae8 [ddc] Rolling internal dart_library.js into SDK
Change-Id: Ifb1cf1aed53b04eaa0a258668eab6b4b8f19df80
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286609
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2023-03-07 19:44:26 +00:00
Nicholas Shahan 2b4a3b082b [ddc] Merge remaining diffs in dart_library.js
- Copy the internal version of dart_library.js without any changes.
- Unblocks syncing this file again.
- Update ddb script to use the dart2js preamble for d8 which includes
  assignment of a global `self` and the fake event loop for better
  error handling.

Change-Id: I01c2ad82fe7c36bb393f9eab897f558daabf6b8b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181522
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-02-01 19:55:49 +00:00
Nicholas Shahan 0551fdc7f1 [ddc] Format dart_library.js
Just some preliminary formatting to make it easier to see the diffs
when I merge the changes from the version in google3. The diff
algorithm gerrit uses doesn't handle the change in indentation very
well.

Change-Id: I2a4daa50d0051140569d51bea5845a0366ba1dad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180700
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-01-25 18:47:53 +00:00
Mark Zhou 05d46af646 [dartdevc] Synchronizing dart_library.js with internal hot restart change.
See: cl/352082170
Change-Id: I6bb9cc27997d1ce2117c58d5e3b3ee3a299e7c2d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180260
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2021-01-21 00:39:13 +00:00
Sigmund Cherem 1a98374702 [dartdevc] Make dart_library.js compatible with d8.
This change makes dart_library.js more resilient so it can run in a
browser or in d8.

This is a necessary step to later enable test.py dartdevk tests in d8.

Change-Id: Ic8e5bbc9f1bbc6707a876208605f4fcaad41cee7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177000
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
2021-01-06 01:53:30 +00:00
Nicholas Shahan 1869a54132 [ddc] Update ddb to run with ddc/legacy modules in d8
- Fixes broken benchmarks in ddc because the benchmarks run in
  d8 with the ddc module system can handle conflicting library
  names more gracefully than es6.

- In the future we need to update the source of truth for
  dart_library.js so we can keep the file in sync.

- Removes the ability for ddb to run with any precompiled sdk.js
  from a dart installation. Now you must run a build first and
  the sdk.js files from that build will be used. This means the
  `--debug` flag no longer changes which sdk.js files are used.

Change-Id: Icaf78956f93ff643d23e68001354ec08c9c28b12
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166926
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-10-24 00:14:42 +00:00
David Morgan 056bd5e72f Reland "Revert "[dartdevc] record metrics""
This reverts commit a0e4f0575a.

Reason for revert: Issues with hot restart in google3, see b/152181536.

Original change's description:
> Revert "Revert "[dartdevc] record metrics""
> 
> Reland with fixes for internal build (patch set 2+)
> 
> Change-Id: I5b130d020c9437a2c52dd074ad007e1fef7a8fa5
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139241
> Commit-Queue: Vijay Menon <vsm@google.com>
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Reviewed-by: Gary Roumanis <grouma@google.com>

TBR=vsm@google.com,sigmund@google.com,grouma@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I012e1adaa405e85fd1a3d7d280b889b7df44e5b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140580
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2020-03-23 12:16:13 +00:00
Vijay Menon a0e4f0575a Revert "Revert "[dartdevc] record metrics""
Reland with fixes for internal build (patch set 2+)

Change-Id: I5b130d020c9437a2c52dd074ad007e1fef7a8fa5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139241
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Gary Roumanis <grouma@google.com>
2020-03-19 13:09:59 +00:00
Vijay Menon 4093d08271 Revert "[dartdevc] record metrics"
This reverts commit 73347e0cad.

This is breaking the internal build.

TBR=grouma,sigmund

Change-Id: Iad093ddb8c996cd65571d00b3d711453358a4f26
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139001
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2020-03-11 01:38:38 +00:00
Vijay Menon 73347e0cad [dartdevc] record metrics
Embeds metrics in generated JS code to measure code size / load times.

Change-Id: I13b2b3cb458af571702c4f559af8b9c9b35a7562
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138891
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-03-10 18:19:50 +00:00
Vijay Menon 8a947deffa [dartdevc] clear console on hot restart
Internal request b/147818704

Change-Id: I08c655c74ea10b6f14ffde8283cbfc286dfae41b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132180
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Gary Roumanis <grouma@google.com>
2020-01-16 22:07:18 +00:00
Jenny Messerly c0c3fc4c5f [dartdevc] fix #34596, hot restart can now clear field & cache state
This adds a method to the internal SDK runtime library that can be
called to clear state when a hot restart is desired.

This also refactors some of the logic around ignoring type errors,
as we need to ensure we can clear those caches. Also I noticed a bug
where the result of isSubtypeOf was assumed to be non-null, but this
was not the case. The new structure should make this more clear.

(Note: I think we may be able to remove a lot of the code for ignoring
type errors soon.)

Change-Id: Icf5072ffe21aefd85e9816ffc2fc29f679839bc4
Reviewed-on: https://dart-review.googlesource.com/c/78324
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-10-18 19:52:32 +00:00
Bob Nystrom 68dc77f456 Build DDC's SDK as part of the regular build.
This involves a few main pieces:

- Add code to the GN scripts to generate DDC's patched SDK and then
  compile it to summaries and JS in the build output directory.

- Add support to the underlying DDC build scripts to support controlling
  which files are built where.

- Update test.dart to use the DDC SDK from the build directory.

- Update create_sdk to use the built SDK instead of the checked in one.

- Fix various internal DDC tools to build their own copy of the SDK
  (since they can't easily find the one in the build directory because
  it's path if config-specific) and use those.

- Delete the checked DDC SDK JS and summaries.

I think I got everything working. The built Dart SDK looks fine -- it's
identical to one built using the old build scripts.

The various tools and DDC's little test runner I *think* work, but there
may be a bug or two in there. I tried the various things I could and it
seems like they work but it's hard to tell since they may be kind of
broken right now anyway.

Bug:
Change-Id: Iea77915a5c1cc8450f60ebfbdf8c725c7ea2f32c
Reviewed-on: https://dart-review.googlesource.com/18144
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2017-11-20 23:24:07 +00:00
Vijay Menon f70f544e57 Fix source map entries for field accesses
This improves:
- stepping through assignment expressions in devtools
- hover on fields when on lhs

Change-Id: Ifee0d7b0fe2de65494182f6818b9dbcd0a79087d
Reviewed-on: https://dart-review.googlesource.com/21820
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Alan Knight <alanknight@google.com>
2017-11-17 23:38:45 +00:00
Leaf Petersen 63918ea921 Remove comment syntax from lib/async.
Eliminate uses of the comment syntax in lib/async.  This is mostly
done simply by turning explicit (but commented) casts into implicit
casts to avoid regressing dart2js performance.

Bug:
Change-Id: I286c7bffbf609b5e2fa24b9d48b90876c2c45a9b
Reviewed-on: https://dart-review.googlesource.com/21566
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2017-11-17 20:40:47 +00:00
Leaf Petersen 85ca7df7e2 Avoid fuzzy arrows when parsing json.
Change the types on the json decoding reviver to avoid fuzzy arrow
checks.

Bug:
Change-Id: I3ca52d7676b6305c398f128d370bc9859fd65820
Reviewed-on: https://dart-review.googlesource.com/21564
Reviewed-by: Vijay Menon <vsm@google.com>
2017-11-17 20:37:07 +00:00
Leaf Petersen 4a56f7b360 Add back missing cast failure cache on function types.
Casts for function types got moved off of the generic path, and hence
are missing the memo cache.  Added a second function type  cast cache.

Fixes #31392

Bug:
Change-Id: Ie1b87adf630f5059b57d01956778f5adde0533fc
Reviewed-on: https://dart-review.googlesource.com/21525
Reviewed-by: Vijay Menon <vsm@google.com>
2017-11-16 22:48:13 +00:00
Alan Knight abf5e4bad4 Use toString() for DDC header previews
For ObjectFormatter right now we just show the class name. Some objects,
e.g. Int64, have descriptive toString() operations that are much more
informative than their internal structure.

This changes the default header to be
  Instance of 'Thing'
rather than just
  Thing
which is a little worse, but it's much better for these kinds of classes.
For Int64 we will now show
  12345 (Int64)

We also clip the toString() if it's too long.

Bug:
Change-Id: Iae6a8e66fdbe1d9f5c157ecdb983a833e26d00f4
Reviewed-on: https://dart-review.googlesource.com/21522
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Alan Knight <alanknight@google.com>
2017-11-16 21:54:02 +00:00
Paul Berry 1034ad336d Strong mode fix for line_splitter.dart.
The new front end doesn't support generic comment syntax yet, so it's
getting the wrong type for LineSplitter in strong mode.  Since we no
longer to preserve legacy mode semantics for LineSplitter, we can just
use the correct strong mode types without generic comment syntax.

Change-Id: If2dcb2fb3fae9eb49685838e4e84958e545650c7
Reviewed-on: https://dart-review.googlesource.com/21286
Reviewed-by: Florian Loitsch <floitsch@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-11-16 19:52:51 +00:00
Leaf Petersen c7df667e9f Regenerate DDC sdk.
Bug:
Change-Id: Id92703841e1be358b27275aeecc3cc94eae89972
Reviewed-on: https://dart-review.googlesource.com/21385
Reviewed-by: Paul Berry <paulberry@google.com>
2017-11-16 17:03:25 +00:00
Lasse R.H. Nielsen 0b58c4bd10 Change some constant declarations to lowerCase.
Retain the old values.

Reapply of https://dart-review.googlesource.com/c/sdk/+/20680 with fixes
for VM method fingerprints.

Change-Id: Ie14e7ccc3194d5561983348e6b6752728913ff4d
Reviewed-on: https://dart-review.googlesource.com/20664
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2017-11-14 12:59:14 +00:00
Lasse R.H. Nielsen e61fc07b58 Revert "Change some constant declarations to lowerCase."
This reverts commit c048cfb178.

Reason for revert: VM code fingerprints needs update.

Original change's description:
> Change some constant declarations to lowerCase.
> 
> Retain the old values.
> 
> Change-Id: I03bd326f379fe5f96d8f6081a7133de956d745c0
> Reviewed-on: https://dart-review.googlesource.com/11520
> Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
> Reviewed-by: Florian Loitsch <floitsch@google.com>

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

Change-Id: I095e8198304ca4e59b39d30b0fdf0af4945e5231
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/20680
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2017-11-14 11:23:08 +00:00
Lasse R.H. Nielsen c048cfb178 Change some constant declarations to lowerCase.
Retain the old values.

Change-Id: I03bd326f379fe5f96d8f6081a7133de956d745c0
Reviewed-on: https://dart-review.googlesource.com/11520
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-11-14 11:13:04 +00:00
Leaf Petersen 01f9fbd29a Name mixin classes to workaround V8 bug.
V8 is inferring arbitrarily large names (many kilobytes each) for
anonymous functions in certain conditions.  Naming top level classes
works around this.

See also: https://bugs.chromium.org/p/v8/issues/detail?id=7069

Bug:
Change-Id: I7bce1701ca81c12bb3cb970b959bc9512592975d
Reviewed-on: https://dart-review.googlesource.com/20261
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>
2017-11-10 22:47:58 +00:00
Jenny Messerly 384678e4b3 port DDC's code_generator to Kernel
Change-Id: I2b6a5f56a69f5d3a965aefc3f8d4550d5940ac5a
Reviewed-on: https://dart-review.googlesource.com/17980
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2017-11-04 22:17:56 +00:00
Jenny Messerly f2478e5526 fix SDK for fuzzy arrows change to main function
Change-Id: I7b7d5b64c1694b0cd4d5b6d8b13231db236617cc
Reviewed-on: https://dart-review.googlesource.com/18688
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2017-11-04 08:20:24 +00:00
Jenny Messerly 1dfa9d2320 fix DDC SDK for Symbol.computeUnmangledName
Change-Id: I8b793744339dd934833f6188b5b8267d4dad1746
Reviewed-on: https://dart-review.googlesource.com/17864
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2017-11-01 20:38:06 +00:00
Vijay Menon 48cfab5deb Fix source maps for better dev tools hover
Change-Id: Id706a1c5817f174a3b512e5c7e2f29599b078eb8
Reviewed-on: https://dart-review.googlesource.com/17700
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2017-10-31 22:09:10 +00:00
Jacob Richman 8b221d13a4 Fix ddc debugger_test Fix regression in custom formatters due to change in metadata signatures to use Object.__proto__ instead of a null __proto__.
Bug:
Change-Id: I68fdb980e777b7c3f335fd6b57181134e3159cc3
Reviewed-on: https://dart-review.googlesource.com/17060
Commit-Queue: Jacob Richman <jacobr@google.com>
Reviewed-by: Jacob Richman <jacobr@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2017-10-31 19:45:27 +00:00
Alan Knight dfcce6d012 Make trapRuntimeErrors false by default
Bug:
Change-Id: I4e631113b00d5c39feaee74f4895a2e1f75641d0
Reviewed-on: https://dart-review.googlesource.com/17620
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Jacob Richman <jacobr@google.com>
Commit-Queue: Alan Knight <alanknight@google.com>
2017-10-31 18:59:59 +00:00
Jenny Messerly 0aa6801f8a fix function type printing in DDC to match VM
Change-Id: I2e15d34c8a40d9ed86b44f5c3db7052fb7c8a783
Reviewed-on: https://dart-review.googlesource.com/14780
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2017-10-27 22:35:20 +00:00
Jenny Messerly 5a4100b595 add a workaround to async/await for DDC's ignore cast fail unsoundness
Change-Id: Ic5e58d31b6b5d46bf74a3c7363e19fca239cdc21
Reviewed-on: https://dart-review.googlesource.com/17040
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2017-10-27 20:12:39 +00:00
Jenny Messerly 77775c5292 Unroll mixins in DDC, so each mixin application is generated
This is for compatibility with Kernel, as well as fixing several bugs,
and generally being a more robust architecture.

This may also perform better than the current design.

Notable fixes include several issues around deferred classes.

Change-Id: I1b6f44ebdf6304b10b47d19026156a25e04146ef
Reviewed-on: https://dart-review.googlesource.com/16337
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2017-10-27 04:26:44 +00:00