Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(460)

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 1291803009: Enable concurrent optimization test after migrating scopes to Thread* (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Update ASSERT in LongJumpScope. Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/flow_graph_compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl.cc
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 47a410f7630531cf08574c11142cf5dfaf1f8ab1..18832d372cbed1428d772c13ec2bfa011236479e 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -1510,9 +1510,10 @@ DART_EXPORT Dart_Handle Dart_CreateSnapshot(
uint8_t** isolate_snapshot_buffer,
intptr_t* isolate_snapshot_size) {
ASSERT(FLAG_load_deferred_eagerly);
- Isolate* isolate = Isolate::Current();
+ Thread* thread = Thread::Current();
+ Isolate* isolate = thread->isolate();
DARTSCOPE(isolate);
- TIMERSCOPE(isolate, time_creating_snapshot);
+ TIMERSCOPE(thread, time_creating_snapshot);
if (vm_isolate_snapshot_buffer != NULL &&
vm_isolate_snapshot_size == NULL) {
RETURN_NULL_ERROR(vm_isolate_snapshot_size);
@@ -1549,9 +1550,10 @@ DART_EXPORT Dart_Handle Dart_CreateSnapshot(
static Dart_Handle createLibrarySnapshot(Dart_Handle library,
uint8_t** buffer,
intptr_t* size) {
- Isolate* isolate = Isolate::Current();
+ Thread* thread = Thread::Current();
+ Isolate* isolate = thread->isolate();
DARTSCOPE(isolate);
- TIMERSCOPE(isolate, time_creating_snapshot);
+ TIMERSCOPE(thread, time_creating_snapshot);
if (buffer == NULL) {
RETURN_NULL_ERROR(buffer);
}
@@ -4176,12 +4178,13 @@ DART_EXPORT Dart_Handle Dart_Invoke(Dart_Handle target,
Dart_Handle name,
int number_of_arguments,
Dart_Handle* arguments) {
- Isolate* isolate = Isolate::Current();
+ Thread* thread = Thread::Current();
+ Isolate* isolate = thread->isolate();
DARTSCOPE(isolate);
CHECK_CALLBACK_STATE(isolate);
// TODO(turnidge): This is a bit simplistic. It overcounts when
// other operations (gc, compilation) are active.
- TIMERSCOPE(isolate, time_dart_execution);
+ TIMERSCOPE(thread, time_dart_execution);
const String& function_name = Api::UnwrapStringHandle(isolate, name);
if (function_name.IsNull()) {
@@ -5195,9 +5198,10 @@ DART_EXPORT Dart_Handle Dart_LoadScript(Dart_Handle url,
Dart_Handle source,
intptr_t line_offset,
intptr_t column_offset) {
- Isolate* isolate = Isolate::Current();
+ Thread* thread = Thread::Current();
+ Isolate* isolate = thread->isolate();
DARTSCOPE(isolate);
- TIMERSCOPE(isolate, time_script_loading);
+ TIMERSCOPE(thread, time_script_loading);
const String& url_str = Api::UnwrapStringHandle(isolate, url);
if (url_str.IsNull()) {
RETURN_TYPE_ERROR(isolate, url, String);
@@ -5241,9 +5245,10 @@ DART_EXPORT Dart_Handle Dart_LoadScript(Dart_Handle url,
DART_EXPORT Dart_Handle Dart_LoadScriptFromSnapshot(const uint8_t* buffer,
intptr_t buffer_len) {
- Isolate* isolate = Isolate::Current();
+ Thread* thread = Thread::Current();
+ Isolate* isolate = thread->isolate();
DARTSCOPE(isolate);
- TIMERSCOPE(isolate, time_script_loading);
+ TIMERSCOPE(thread, time_script_loading);
StackZone zone(isolate);
if (buffer == NULL) {
RETURN_NULL_ERROR(buffer);
@@ -5454,9 +5459,10 @@ DART_EXPORT Dart_Handle Dart_LoadLibrary(Dart_Handle url,
Dart_Handle source,
intptr_t line_offset,
intptr_t column_offset) {
- Isolate* isolate = Isolate::Current();
+ Thread* thread = Thread::Current();
+ Isolate* isolate = thread->isolate();
DARTSCOPE(isolate);
- TIMERSCOPE(isolate, time_script_loading);
+ TIMERSCOPE(thread, time_script_loading);
const String& url_str = Api::UnwrapStringHandle(isolate, url);
if (url_str.IsNull()) {
RETURN_TYPE_ERROR(isolate, url, String);
@@ -5560,9 +5566,10 @@ DART_EXPORT Dart_Handle Dart_LoadSource(Dart_Handle library,
Dart_Handle source,
intptr_t line_offset,
intptr_t column_offset) {
- Isolate* isolate = Isolate::Current();
+ Thread* thread = Thread::Current();
+ Isolate* isolate = thread->isolate();
DARTSCOPE(isolate);
- TIMERSCOPE(isolate, time_script_loading);
+ TIMERSCOPE(thread, time_script_loading);
const Library& lib = Api::UnwrapLibraryHandle(isolate, library);
if (lib.IsNull()) {
RETURN_TYPE_ERROR(isolate, library, Library);
@@ -5599,9 +5606,10 @@ DART_EXPORT Dart_Handle Dart_LoadSource(Dart_Handle library,
DART_EXPORT Dart_Handle Dart_LibraryLoadPatch(Dart_Handle library,
Dart_Handle url,
Dart_Handle patch_source) {
- Isolate* isolate = Isolate::Current();
+ Thread* thread = Thread::Current();
+ Isolate* isolate = thread->isolate();
DARTSCOPE(isolate);
- TIMERSCOPE(isolate, time_script_loading);
+ TIMERSCOPE(thread, time_script_loading);
const Library& lib = Api::UnwrapLibraryHandle(isolate, library);
if (lib.IsNull()) {
RETURN_TYPE_ERROR(isolate, library, Library);
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/flow_graph_compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698