| 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 const String& message = String::Handle( | 238 const String& message = String::Handle( |
| 239 String::New("Invalid snapshot.")); | 239 String::New("Invalid snapshot.")); |
| 240 return ApiError::New(message); | 240 return ApiError::New(message); |
| 241 } | 241 } |
| 242 ASSERT(snapshot->kind() == Snapshot::kFull); | 242 ASSERT(snapshot->kind() == Snapshot::kFull); |
| 243 if (FLAG_trace_isolates) { | 243 if (FLAG_trace_isolates) { |
| 244 OS::Print("Size of isolate snapshot = %" Pd "\n", snapshot->length()); | 244 OS::Print("Size of isolate snapshot = %" Pd "\n", snapshot->length()); |
| 245 } | 245 } |
| 246 SnapshotReader reader(snapshot->content(), snapshot->length(), | 246 SnapshotReader reader(snapshot->content(), snapshot->length(), |
| 247 Snapshot::kFull, isolate); | 247 Snapshot::kFull, isolate); |
| 248 reader.ReadFullSnapshot(); | 248 const Error& error = Error::Handle(reader.ReadFullSnapshot()); |
| 249 if (!error.IsNull()) { |
| 250 return error.raw(); |
| 251 } |
| 249 if (FLAG_trace_isolates) { | 252 if (FLAG_trace_isolates) { |
| 250 isolate->heap()->PrintSizes(); | 253 isolate->heap()->PrintSizes(); |
| 251 isolate->megamorphic_cache_table()->PrintSizes(); | 254 isolate->megamorphic_cache_table()->PrintSizes(); |
| 252 } | 255 } |
| 253 } | 256 } |
| 254 | 257 |
| 255 Object::VerifyBuiltinVtables(); | 258 Object::VerifyBuiltinVtables(); |
| 256 | 259 |
| 257 StubCode::Init(isolate); | 260 StubCode::Init(isolate); |
| 258 if (snapshot_buffer == NULL) { | 261 if (snapshot_buffer == NULL) { |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 return predefined_handles_->handles_.AllocateScopedHandle(); | 309 return predefined_handles_->handles_.AllocateScopedHandle(); |
| 307 } | 310 } |
| 308 | 311 |
| 309 | 312 |
| 310 bool Dart::IsReadOnlyHandle(uword address) { | 313 bool Dart::IsReadOnlyHandle(uword address) { |
| 311 ASSERT(predefined_handles_ != NULL); | 314 ASSERT(predefined_handles_ != NULL); |
| 312 return predefined_handles_->handles_.IsValidScopedHandle(address); | 315 return predefined_handles_->handles_.IsValidScopedHandle(address); |
| 313 } | 316 } |
| 314 | 317 |
| 315 } // namespace dart | 318 } // namespace dart |
| OLD | NEW |