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

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

Issue 1418863003: Precompilation: Generate instance calls as IC calls that can switch to Megamoprhic calls. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/code_patcher_x64.cc ('k') | runtime/vm/flow_graph_compiler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "vm/dart.h" 5 #include "vm/dart.h"
6 6
7 #include "vm/code_observers.h" 7 #include "vm/code_observers.h"
8 #include "vm/cpu.h" 8 #include "vm/cpu.h"
9 #include "vm/dart_api_state.h" 9 #include "vm/dart_api_state.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 { 346 {
347 TimelineDurationScope tds(T, I->GetIsolateStream(), "StubCode::Init"); 347 TimelineDurationScope tds(T, I->GetIsolateStream(), "StubCode::Init");
348 StubCode::Init(I); 348 StubCode::Init(I);
349 } 349 }
350 350
351 // When running precompiled, the megamorphic miss function/code comes from the 351 // When running precompiled, the megamorphic miss function/code comes from the
352 // snapshot. 352 // snapshot.
353 if (!Dart::IsRunningPrecompiledCode()) { 353 if (!Dart::IsRunningPrecompiledCode()) {
354 MegamorphicCacheTable::InitMissHandler(I); 354 MegamorphicCacheTable::InitMissHandler(I);
355 } 355 }
356 const Code& miss_code =
357 Code::Handle(I->object_store()->megamorphic_miss_code());
358 I->set_ic_miss_code(miss_code);
359
356 if (snapshot_buffer == NULL) { 360 if (snapshot_buffer == NULL) {
357 if (!I->object_store()->PreallocateObjects()) { 361 if (!I->object_store()->PreallocateObjects()) {
358 return I->object_store()->sticky_error(); 362 return I->object_store()->sticky_error();
359 } 363 }
360 } 364 }
361 365
362 I->heap()->EnableGrowthControl(); 366 I->heap()->EnableGrowthControl();
363 I->set_init_callback_data(data); 367 I->set_init_callback_data(data);
364 Api::SetupAcquiredError(I); 368 Api::SetupAcquiredError(I);
365 if (FLAG_print_class_table) { 369 if (FLAG_print_class_table) {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 return predefined_handles_->handles_.IsValidScopedHandle(address); 437 return predefined_handles_->handles_.IsValidScopedHandle(address);
434 } 438 }
435 439
436 440
437 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) { 441 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) {
438 ASSERT(predefined_handles_ != NULL); 442 ASSERT(predefined_handles_ != NULL);
439 return predefined_handles_->api_handles_.IsValidHandle(handle); 443 return predefined_handles_->api_handles_.IsValidHandle(handle);
440 } 444 }
441 445
442 } // namespace dart 446 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/code_patcher_x64.cc ('k') | runtime/vm/flow_graph_compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698