| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |