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

Unified Diff: runtime/vm/benchmark_test.cc

Issue 1473403003: Move ApiLocalScope out of class ApiState into class Thread so that the API local handles and zone e… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: self-code-review Created 5 years, 1 month 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
Index: runtime/vm/benchmark_test.cc
diff --git a/runtime/vm/benchmark_test.cc b/runtime/vm/benchmark_test.cc
index 1b22bc521a4498b9fa257b00c05b1f95d1b3c13a..dc2fcdf89fa0573d50ea4751a4f9302b1f6e06c0 100644
--- a/runtime/vm/benchmark_test.cc
+++ b/runtime/vm/benchmark_test.cc
@@ -55,7 +55,7 @@ BENCHMARK(CorelibCompileAll) {
BENCHMARK(CorelibCompilerStats) {
bin::Builtin::SetNativeResolver(bin::Builtin::kBuiltinLibrary);
bin::Builtin::SetNativeResolver(bin::Builtin::kIOLibrary);
- CompilerStats* stats = Isolate::Current()->compiler_stats();
+ CompilerStats* stats = thread->isolate()->compiler_stats();
ASSERT(stats != NULL);
stats->EnableBenchmark();
Timer timer(true, "Compiler stats compiling all of Core lib");
@@ -77,7 +77,7 @@ BENCHMARK(CorelibCompilerStats) {
BENCHMARK(CorelibIsolateStartup) {
const int kNumIterations = 1000;
Timer timer(true, "CorelibIsolateStartup");
- Isolate* isolate = Isolate::Current();
+ Isolate* isolate = thread->isolate();
Thread::ExitIsolate();
for (int i = 0; i < kNumIterations; i++) {
timer.Start();
@@ -416,7 +416,7 @@ BENCHMARK(Dart2JSCompilerStats) {
reinterpret_cast<Dart_NativeEntryResolver>(NativeResolver));
EXPECT_VALID(lib);
}
- CompilerStats* stats = Isolate::Current()->compiler_stats();
+ CompilerStats* stats = thread->isolate()->compiler_stats();
ASSERT(stats != NULL);
stats->EnableBenchmark();
Timer timer(true, "Compile all of dart2js benchmark");
@@ -545,7 +545,7 @@ BENCHMARK_SIZE(CoreSnapshotSize) {
// Need to load the script into the dart: core library due to
// the import of dart:_internal.
TestCase::LoadCoreTestScript(kScriptChars, NULL);
- Api::CheckAndFinalizePendingClasses(Isolate::Current());
+ Api::CheckAndFinalizePendingClasses(thread);
// Write snapshot with object content.
FullSnapshotWriter writer(&vm_isolate_snapshot_buffer,
@@ -582,7 +582,7 @@ BENCHMARK_SIZE(StandaloneSnapshotSize) {
// Need to load the script into the dart: core library due to
// the import of dart:_internal.
TestCase::LoadCoreTestScript(kScriptChars, NULL);
- Api::CheckAndFinalizePendingClasses(Isolate::Current());
+ Api::CheckAndFinalizePendingClasses(thread);
// Write snapshot with object content.
FullSnapshotWriter writer(&vm_isolate_snapshot_buffer,
@@ -623,7 +623,7 @@ BENCHMARK(EnterExitIsolate) {
"\n";
const intptr_t kLoopCount = 1000000;
TestCase::LoadTestScript(kScriptChars, NULL);
- Api::CheckAndFinalizePendingClasses(Isolate::Current());
+ Api::CheckAndFinalizePendingClasses(thread);
Dart_Isolate isolate = Dart_CurrentIsolate();
Timer timer(true, "Enter and Exit isolate");
timer.Start();
« no previous file with comments | « runtime/lib/isolate.cc ('k') | runtime/vm/bootstrap.cc » ('j') | runtime/vm/dart_api_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698