as this API has been deprecated and dartium was the last user.
2. Some unit tests are using some of these API entrypoints, so moved them
over to a test file which will be linked into run_vm_tests
Change-Id: I3343b23d082400da3c803cf81ea80dfaa5e426cf
Reviewed-on: https://dart-review.googlesource.com/7942
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
New folder structure (nested under vm/):
- compiler/
- jit/ - JIT specific code
- aot/ - AOT specific code
- backend/ - all middle-end and back-end code (IL, flow graph)
- assembler/ - assemblers and disassemblers
- frontend/ - front ends (AST -> IL, Kernel -> IL)
compiler/README.md would be the documentation root for the compiler
pipeline
Bug: https://github.com/dart-lang/sdk/issues/30575
Change-Id: I2dfd9688793bff737f7632ddc77fca766875ce36
Reviewed-on: https://dart-review.googlesource.com/2940
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Use the speed of previous scavenges to estimate the time required for the next scavenge. When we receive an initial notification, perform a scavenge if we have allocated enough and we estimate we can complete the scavenge before the deadline.
Expand the time recorded for a scavenge to include safepointing and iterating roots.
R=asiva@google.com
Review-Url: https://codereview.chromium.org/3001423002 .
Before this change, the column number of the StackOverflow error was
reported at the opening '(' of the function parameter list:
ReturnType function(...) { ... }
^
This change moves it to the opening '{':
ReturnType function(...) { ... }
^
In case of single statement functions with '=>', the location of the '='
is reported as the column number of the StackOverflow error.
R=asiva@google.com
Review-Url: https://codereview.chromium.org/3002833003 .
Reapply 3d4838fc70 with the following
modifications:
* define PRIX64 to fix compilation errors on Windows;
* add and use short form format specifiers PX and PX64 to make it
uniform with other format specifiers.
Original review: https://codereview.chromium.org/2987183002
Description of the original CL:
Until this change, implementation of Dart_IntegerToHexCString()
always created Bigint objects and used Bigint::ToHexCString() to do
the work.
In --limit-ints-to-64-bits mode (with Dart integers limited to 64
bits) Bigints are banned and should not be used.
This CL revises Dart_IntegerToHexCString implementation to avoid
creating Bigint objects for Smi and Mint arguments, so it would
work in --limit-ints-to-64-bits mode.
Also, this CL adds test case to lock down the behavior of
Dart_IntegerToHexCString.
R=zra@google.com
Issue: https://github.com/dart-lang/sdk/issues/30103
Review-Url: https://codereview.chromium.org/2985423002 .
Until this change, implementation of Dart_IntegerToHexCString()
always created Bigint objects and used Bigint::ToHexCString() to do
the work.
In --limit-ints-to-64-bits mode (with Dart integers limited to 64
bits) Bigints are banned and should not be used.
This CL revises Dart_IntegerToHexCString implementation to avoid
creating Bigint objects for Smi and Mint arguments, so it would
work in --limit-ints-to-64-bits mode.
Also, this CL adds test case to lock down the behavior of
Dart_IntegerToHexCString.
R=asiva@google.com
Issue: https://github.com/dart-lang/sdk/issues/30103
Review-Url: https://codereview.chromium.org/2987183002 .
2. Adjust the Dart front end to not require a 'main' method when the in memory filesystem is used, this allows execution of VM unit tests which all do not necessarily have a 'main' method (integrated CL from siggi)
3. Change kernel reader to not look for a 'main' methos when Dart_LoadKernel is called.
4. Change Dart_LoadScript to also support loading of dart programs when Dart front end is used
R=aam@google.com, sigmund@google.com
Review-Url: https://codereview.chromium.org/2948273002 .
This is the 2nd attempt to land the CL
abed3c2a70
Original review: https://codereview.chromium.org/2982823002
No extra changes were made. Large literals in the Dart core library
which caused failures during the previous attempt to land this CL have
been fixed separately.
Description of the CL:
In --limit-ints-to-64-bits mode:
* Integer constructors return Integer::null if integer is out of range.
* Error is reported for integer literals which are out of range.
* Dart API is revised to return errors if integers are out of range.
Bigint::IsDisabled() method is introduced to be able to enable/disable
Bigints independently of --limit-ints-to-64-bits mode in future.
Deprecated constructor Integer::NewFromUint64 is replaced with
Integer::New in certain cases.
R=regis@google.com
Issue: https://github.com/dart-lang/sdk/issues/30103
Review-Url: https://codereview.chromium.org/2980223002 .
In --limit-ints-to-64-bits mode:
* Integer constructors return Integer::null if integer is out of range.
* Error is reported for integer literals which are out of range.
* Dart API is revised to return errors if integers are out of range.
Bigint::IsDisabled() method is introduced to be able to enable/disable
Bigints independently of --limit-ints-to-64-bits mode in future.
Deprecated constructor Integer::NewFromUint64 is replaced with
Integer::New in certain cases.
R=zra@google.com
Issue: https://github.com/dart-lang/sdk/issues/30103
Review-Url: https://codereview.chromium.org/2982823002 .
There are a few problems with this function:
* It returns uint64_t instead of int64_t, which is different from
core Dart library function identityHashCode()
* Dart_IdentityHash truncates negative Mint and Bigint values to 0,
while negative Smi values are converted to uint64_t.
The Dart_IdentityHash function is not used, so we decided to remove it
instead of fixing these problems.
R=zra@google.com
Review-Url: https://codereview.chromium.org/2980043002 .
- 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 .
The problem with these changes was that closed ports still continue to receive
messages and as a result we start using dead peer objects.
Fixing that would require more intrusive changes into message handler implementation - so instead we are reverting the changes and restoring manual PORT -> PEER mapping.
BUG=
R=erikcorry@google.com
Review-Url: https://codereview.chromium.org/2666063002 .
- Don't mark core_isolate_snapshot_buffer as a const pointer.
- Update app snapshots without code to not rewrite the VM isolate snapshot, as already done by app snapshots with code.
Fixes#28368R=asiva@google.com
Review-Url: https://codereview.chromium.org/2637193002 .
If an error happens during the compilation of a function body, an Error is thrown which can be intercepted, and ensures that finally blocks are executed before the isolate is terminated.
The language spec is vague about compilation errors. A doc describing the intentions behind this CL is at
https://docs.google.com/document/d/1_MWOgwJadLCQSBps0zD6Rj5dG4iP1UBuiDvTMH-WMzI/edit#
Example:
1 void bad() {
2 return 5
3 }
4
5 void main(args) {
6 bad();
7 }
Before this CL:
$ dart ~/tmp/e.dart
'file:///Users/hausner/tmp/e.dart': error: line 2 pos 11: semicolon expected
return 5
^
$
After this change:
$ dart ~/tmp/e.dart
Unhandled exception:
'file:///Users/hausner/tmp/e.dart': error: line 2 pos 11: semicolon expected
return 5
^
#0 main (file:///Users/hausner/tmp/e.dart:6:3)
#1 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:259)
#2 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:148)
$
Notice that the stack trace points to the call site of bad(), not the text location of the syntax error. That's not a bug. The location of the syntax error is given in the error message.
BUG= https://github.com/dart-lang/sdk/issues/23684R=asiva@google.com, lrn@google.com
Review URL: https://codereview.chromium.org/2044753002 .
Prevents a race between the marker and finalizer when the handle is freed (fixes#27029).
Disallow creating weak handles for immediate objects. We don't distinguish these from free handles, so their callbacks are never run.
Don't report freed handles over the vm service.
R=asiva@google.com
Review URL: https://codereview.chromium.org/2281193002 .
Dartium test html/async_spawnuri_test is failing when legacy
patch class syntax parsing is removed.
Once dartium is fixed, this change can be re-applied.
TBR=terry
Review URL: https://codereview.chromium.org/2274663004 .
Allow members of patch classes to be annotated with @patch. The VM
ignores the annotation. I simply replaces the original method
if the name matches, or reports an error if field names match.
Adding a bit is_patched to members to do more checking remains a
TODO. There are currently no unused bits available, and I don’t want
to increase the size of Function objects for this.
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org/2230383003 .
We now check all of the scripts which make up a library. If any
script is modified, then we consider that library to be modified. We
also consider any library which imports a modified library to be
modified. To propagate this info efficiently, we build and discard
the imported-by graph when beginning a reload.
The embedder must provide a FileModifiedCallback in order to support
the detection of modified scripts.
In order to detect changes to package: libraries, we have modified the
embedder interface to provide the resolved url when possible, so that
we don't need to re-resolve package uris when checking for reload.
This change is incompatible and all embedders will need to be updated.
We now support a "force" flag when reloading sources. This causes all
libraries to be reloaded regardless of whether the underlying scripts
have been updated.
Closes#26919R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/2186423002 .