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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 reader.ReadFullSnapshot(); | 228 reader.ReadFullSnapshot(); |
229 if (FLAG_trace_isolates) { | 229 if (FLAG_trace_isolates) { |
230 isolate->heap()->PrintSizes(); | 230 isolate->heap()->PrintSizes(); |
231 isolate->megamorphic_cache_table()->PrintSizes(); | 231 isolate->megamorphic_cache_table()->PrintSizes(); |
232 } | 232 } |
233 } | 233 } |
234 | 234 |
235 Object::VerifyBuiltinVtables(); | 235 Object::VerifyBuiltinVtables(); |
236 | 236 |
237 StubCode::Init(isolate); | 237 StubCode::Init(isolate); |
238 // TODO(zra): ifndef to be removed when ARM64 port is ready. | |
239 #if !defined(TARGET_ARCH_ARM64) | |
240 if (snapshot_buffer == NULL) { | 238 if (snapshot_buffer == NULL) { |
241 if (!isolate->object_store()->PreallocateObjects()) { | 239 if (!isolate->object_store()->PreallocateObjects()) { |
242 return isolate->object_store()->sticky_error(); | 240 return isolate->object_store()->sticky_error(); |
243 } | 241 } |
244 } | 242 } |
245 isolate->megamorphic_cache_table()->InitMissHandler(); | 243 isolate->megamorphic_cache_table()->InitMissHandler(); |
246 #endif | |
247 | 244 |
248 isolate->heap()->EnableGrowthControl(); | 245 isolate->heap()->EnableGrowthControl(); |
249 isolate->set_init_callback_data(data); | 246 isolate->set_init_callback_data(data); |
250 Api::SetupAcquiredError(isolate); | 247 Api::SetupAcquiredError(isolate); |
251 if (FLAG_print_class_table) { | 248 if (FLAG_print_class_table) { |
252 isolate->class_table()->Print(); | 249 isolate->class_table()->Print(); |
253 } | 250 } |
254 | 251 |
255 // Setup for profiling. | 252 // Setup for profiling. |
256 Profiler::InitProfilingForIsolate(isolate); | 253 Profiler::InitProfilingForIsolate(isolate); |
(...skipping 30 matching lines...) Expand all Loading... |
287 return predefined_handles_->handles_.AllocateScopedHandle(); | 284 return predefined_handles_->handles_.AllocateScopedHandle(); |
288 } | 285 } |
289 | 286 |
290 | 287 |
291 bool Dart::IsReadOnlyHandle(uword address) { | 288 bool Dart::IsReadOnlyHandle(uword address) { |
292 ASSERT(predefined_handles_ != NULL); | 289 ASSERT(predefined_handles_ != NULL); |
293 return predefined_handles_->handles_.IsValidScopedHandle(address); | 290 return predefined_handles_->handles_.IsValidScopedHandle(address); |
294 } | 291 } |
295 | 292 |
296 } // namespace dart | 293 } // namespace dart |
OLD | NEW |