As part of making the compiler and other subsystems independent
of `Isolate` we have to move various state from `Isolate` to
`IsolateGroup`.
The class_table and object_store were already moved to `IsolateGroup`.
This CL only replaces usages of `Isolate::{object_store,class_table}`
with the equivalent in `IsolateGroup`.
Issue https://github.com/dart-lang/sdk/issues/36097
TEST=Pure refactoring - relying on existing test coverage.
Change-Id: I34a0682d715b054d6c5faff077a513980f59a348
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177126
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Fix vm/cc/OldGC_Unsync to not change FLAG_marker_tasks while incremental marking is in progress.
Fix vm/cc/IterateReadOnly to not mark the heap as read-only while marking or sweeping are in progress.
Remove unnecessary WaitForGCTasks leftover from background finalization.
Bug: https://github.com/dart-lang/sdk/issues/39299
Change-Id: Ib3340e514b44230b9735b74b1f2012ca9b998d50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124824
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Use DART_CHECK_VALID has been incorrect since the introduction of Isolate.kill and Dart_Cleanup because it crashes when given an unwind error.
Remove long-broken FullSnapshot1 test.
Change-Id: I1427249349e8138427bc7833980b5eff6ac466db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98263
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
- 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 .
stack_limit_,
stack_overflow_flags_,
saved_stack_limit_,
stack_overflow_count_ and
other interrupts mask fields from Isolate structure to Thread structure
- Change the stack overflow check in the prolog to load the stack limit
from the THR register, this removes the back to back dependent loads to
load the stack limit from the Isolate structure
R=johnmccutchan@google.com, rmacnak@google.com
Review URL: https://codereview.chromium.org/1812753002 .
Thread barrier with:
* fixed (at construction) number n of participating threads {T1,T2,T3,...,Tn}
* unknown number of rounds.
Requirements:
* there is some R such that each participating thread makes
R calls to Sync() followed by its one and only call to Exit().
Guarantees:
* for any two threads Ti and Tj and round number r <= R,
everything done by Ti before its r'th call to Sync() happens before
everything done by Tj after its r'th call to Sync().
Note:
* it's not required that the thread that constructs the barrier participates.
BUG=
Review URL: https://codereview.chromium.org//1337943004 .
Remove potentially dangerous (but currently unused) Isolate::stack_limit() accessor.
Add method to test whether interrupts are scheduled, using relaxed memory ordering.
Document and test correct usage by adding a new unit test.
This will be used to periodically check for safepoints in C++ (which will then be equivalent to our generated code).
BUG=
R=iposva@google.com
Review URL: https://codereview.chromium.org//1277473004 .
Cache a pointer to the isolate's Heap in the Thread object
and use it in generated code for allocation.
Change generated allocation code to load allocation-top and
end via THR (THR->heap.top). This is slightly slower than
embedding the address, but faster than loading it
via the Isolate (THR->isolate->heap.top)
BUG=
R=koda@google.com
Review URL: https://codereview.chromium.org//1263513002 .
- Complete revamp of isolate-specific flags.
- Associate flags with the isolate on creation.
- Dart_CreateIsolate and associate callback do take an
extra flags argument.
- Make sure to clear IC data array when clearing code.
BUG=23578
Review URL: https://codereview.chromium.org//1162033005
compatible with webkit and will allow for easy externalization of
strings. One byte strings are retained for pure ASCII strings.
(The language specification was changed recently to reflect this as
follows "A string is a sequence of UTF-16 code units").
- Remove four byte string class and all references to it.
- Rename some of the string functions in Dart API to make them
consistent and better describe the underlying functionality
Dart_NewString => Dart_NewStringFromCString
Dart_NewString8 => Dart_NewStringFromUTF8
Dart_NewString16 => Dart_NewStringFromUTF16
Dart_NewString32 => Dart_NewStringFromUTF32
Dart_NewExternalString8 => Dart_NewExternalUTF8String
Dart_NewExternalString16 => Dart_NewExternalUTF16String
Dart_NewExternalString32 => Dart_NewExternalUTF32String
Dart_StringGet8 => Dart_StringToUTF8
Dart_StringGet16 => Dart_StringToUTF16
Dart_StringToCString => Dart_StringToCString
Dart_IsString8 => Removed
Dart_IsString16 -> Removed
Dart_StringToBytes -> Removed
Dart_StringGet32 -> Removed
Review URL: https://codereview.chromium.org//11318018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14357 260f80e4-7a28-3924-810f-c04153c831b5
big global change, so let me explain in more detail. This refactoring CL does
the following:
- moves all the dart code for isolates in a common library (lib/isolate)
- changes frog to understand 'dart:isolate' imoprts by loading the code from the
location above.
- changes the vm to undernstand 'dart:isolate' imports by creating a separate
library that is part of the bootstrap. This follows the same code-structure
that Todd suggested in his CL introducing the mirror library
- changes dartc to use the shared isolate library as the source of truth for
type checking. I left around some of the internal js code in dartc so that the
backend continues to work for apps that don't use isolates.
- changes all tests that use isolates to import the library explicitly (this is a large bulk of the files in this CL)
- changes test status for tests we can't fix in this repo (e.g. co19)
- splits the isolate library code to make it possible to preserve some tests
without exposing internal types (e.g. tests about
serialization/deserialization)
- changes the create_sdk script to copy the isolate library to the sdk
- includes the isolate library in dartdoc
I'll wait for at least one lgtm from each area (dartc, vm, frog, sdk)
There is one important pending thing this CL doesn't do:
- update test_runner.dart: This should be updated next time we upload the new
binaries to tool/testing/bin
- dartium specific changes: Vijay, is there anything I need to do for dartium?
Review URL: https://chromiumcodereview.appspot.com//9422019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4647 260f80e4-7a28-3924-810f-c04153c831b5
The purpose of this change is twofold:
1. Source in the bin directory can now use the same assertions as
source in the vm directory. The ASSERT macro used by the code
in runtime/bin was just defined to use assert from the standard
C library.
2. Moving other implementation parts from runtime/vm to
runtime/platform (e.g. classes Monitor and Mutex) for sharing
between runtime/bin and runtime/vm will be easier as these
implementations rely on these assertion macros.
Created two gypi files for the platform directory. One for the
headers and one for the source. The source one is only included
when building the VM library and will be present in libdart.a
when the dart executable is linked.
All the code for asserts is still in the dart namespace.
Also re-arranged the order of includes to be alphabetically in
the files touched.
R=ager@google.com, iposva@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//9189003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3335 260f80e4-7a28-3924-810f-c04153c831b5