the return type was invalid, which caused a runtime cast failure. Many of the onError handlers return `void` which is not assignable to T.
This was discovered in internal testing as we attempted to run DDC against the unforked SDK sources.
R=floitsch@google.com
Review-Url: https://codereview.chromium.org/2718643003 .
- When generating app-aot snapshot we are currently running Kernel isolate
in the precompiler mode, which means we can't have field guards enabled.
- DBC does not support field guards so flags must be correctly initialized.
BUG=
TBR=rmacnak@google.com
Review-Url: https://codereview.chromium.org/2720893004 .
We have tests that disable it but we train app-jit snapshot for Kernel with field guards enabled so
we need to make sure that Kernel isolate runs with correct settings matching the settings at the time
when app-jit snapshot was created.
BUG=
R=rmacnak@google.com
Review-Url: https://codereview.chromium.org/2715213008 .
IsolateData contains AppSnapshot which might own some HeapPage-s, so we can't
destroy IsolateData in the Dart_IsolateShutdownCallback, because some thread
running in the isolate (e.g. background compiler) might still touch
thoses pages or objects they host.
We need to delay destruction of AppSnapshot until after the isolate shutdown.
Current API does not allow that, so we introduce a new isolate lifecycle
callback - Dart_IsolateCleanupCallback, which is invoked at the end of the
isolote lifecycle when things like background compiler have been stopped
and no Dart code is supposed to run.
BUG=
R=rmacnak@google.com
Review-Url: https://codereview.chromium.org/2720723005 .
Before it simply looked at FLAG_enable_{asserts/type_checks}.
We allow disabling or enabling type checks / asserts for newly created isolates
through Dart_IsolateFlags even when they are enabled globally through
FLAG_enable_{asserts/type_checks} flags.
This change allows isolates to use app-jit snapshots trained with type checks /
asserts disabled as long as isolate itself has type check and asserts disabled,
independent of whether FLAG_enable_{asserts/type_checks} is set globally or not.
Additionally disable type checks and asserts on Kernel isolate even if flags
FLAG_enable_{asserts/type_checks} are set.
This change allows to train Kernel app-jit snapshot once and use it both for
$ dart --dfe=...
and for
$ dart --checked --dfe=...
configurations.
BUG=
R=rmacnak@google.com
Review-Url: https://codereview.chromium.org/2720123004 .
Original CL: https://codereview.chromium.org/2692803006/
Original commit message:
Tracking the awaiter return call stack:
- [x] Each async function closure now knows who is awaiting on their
return. This is effectively the asynchronous equivalent of the 'frame pointer'.
- [x] Each async* function closure now knows how is listening on their
stream. This is effectively the asynchronous equivalent of the 'frame pointer'.
Detecting uncaught exceptions in async functions:
- [x] Code object keeps a map from :await_jump_var to token position
- [x] Exception Handlers keep track if they are generated (as part of compilation) or directly from user code
- [x] Debugger maps :await_jump_var to a specific try index
R=johnmccutchan@google.com
Review-Url: https://codereview.chromium.org/2725623003 .
- Consistently accept hypens or underscores in option names.
- Replace --snapshot_kind=none with --dependencies-only, since the former is ambiguous as to whether an existing core snapshot needs to be read. Important when using an embedder-specific dart: library.
- Don't try to canonicalize file paths for the snapshot pieces since this fails if there isn't already a file on disk.
R=asiva@google.com, goderbauer@google.com
Review-Url: https://codereview.chromium.org/2707383007 .
Tracking the awaiter return call stack:
- [x] Each async function closure now knows who is awaiting on their
return. This is effectively the asynchronous equivalent of the 'frame pointer'.
- [x] Each async* function closure now knows how is listening on their
stream. This is effectively the asynchronous equivalent of the 'frame pointer'.
Detecting uncaught exceptions in async functions:
- [x] Code object keeps a map from :await_jump_var to token position
- [x] Exception Handlers keep track if they are generated (as part of compilation) or directly from user code
- [x] Debugger maps :await_jump_var to a specific try index
Fixes#27242R=rmacnak@google.com
Review-Url: https://codereview.chromium.org/2692803006 .
We may not know initially that the input to HGetLength is fixed-length, but discover so later.
Most notably this happens with --trust-type-annotations, since the HTypeKnown for 'trusting' the type hides the underlying type, but it also happens as a consequence of local dataflow and other optimizations.
BUG=
R=efortuna@google.com
Review-Url: https://codereview.chromium.org/2713393002 .