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

Side by Side Diff: runtime/vm/dart_api_impl.cc

Issue 1390153004: Move deopt_id and related helpers/definitions from Isolate to Thread (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "include/dart_api.h" 5 #include "include/dart_api.h"
6 #include "include/dart_mirrors_api.h" 6 #include "include/dart_mirrors_api.h"
7 #include "include/dart_native_api.h" 7 #include "include/dart_native_api.h"
8 8
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "vm/class_finalizer.h" 10 #include "vm/class_finalizer.h"
(...skipping 1467 matching lines...) Expand 10 before | Expand all | Expand 10 after
1478 DART_EXPORT void Dart_ExitIsolate() { 1478 DART_EXPORT void Dart_ExitIsolate() {
1479 CHECK_ISOLATE(Isolate::Current()); 1479 CHECK_ISOLATE(Isolate::Current());
1480 Thread::ExitIsolate(); 1480 Thread::ExitIsolate();
1481 } 1481 }
1482 1482
1483 1483
1484 // TODO(iposva): Remove this API and instead expose the underlying flags. 1484 // TODO(iposva): Remove this API and instead expose the underlying flags.
1485 DART_EXPORT Dart_Handle Dart_IsolateSetStrictCompilation(bool value) { 1485 DART_EXPORT Dart_Handle Dart_IsolateSetStrictCompilation(bool value) {
1486 CHECK_ISOLATE(Isolate::Current()); 1486 CHECK_ISOLATE(Isolate::Current());
1487 Isolate* isolate = Isolate::Current(); 1487 Isolate* isolate = Isolate::Current();
1488 if (isolate->has_compiled()) { 1488 if (isolate->has_compiled_code()) {
1489 return Api::NewError( 1489 return Api::NewError(
1490 "%s expects that the isolate has not yet compiled code.", CURRENT_FUNC); 1490 "%s expects that the isolate has not yet compiled code.", CURRENT_FUNC);
1491 } 1491 }
1492 if (!value) { 1492 if (!value) {
1493 return Api::NewError( 1493 return Api::NewError(
1494 "%s expects that the value is set to true only.", CURRENT_FUNC); 1494 "%s expects that the value is set to true only.", CURRENT_FUNC);
1495 } 1495 }
1496 Isolate::Current()->set_strict_compilation(); 1496 Isolate::Current()->set_strict_compilation();
1497 return Api::Null(); 1497 return Api::Null();
1498 } 1498 }
(...skipping 4573 matching lines...) Expand 10 before | Expand all | Expand 10 after
6072 ApiReallocate); 6072 ApiReallocate);
6073 writer.WriteFullSnapshot(); 6073 writer.WriteFullSnapshot();
6074 *vm_isolate_snapshot_size = writer.VmIsolateSnapshotSize(); 6074 *vm_isolate_snapshot_size = writer.VmIsolateSnapshotSize();
6075 *isolate_snapshot_size = writer.IsolateSnapshotSize(); 6075 *isolate_snapshot_size = writer.IsolateSnapshotSize();
6076 *instructions_snapshot_size = writer.InstructionsSnapshotSize(); 6076 *instructions_snapshot_size = writer.InstructionsSnapshotSize();
6077 6077
6078 return Api::Success(); 6078 return Api::Success();
6079 } 6079 }
6080 6080
6081 } // namespace dart 6081 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698