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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 if (snapshot == NULL) { | 231 if (snapshot == NULL) { |
232 const String& message = String::Handle( | 232 const String& message = String::Handle( |
233 String::New("Invalid snapshot.")); | 233 String::New("Invalid snapshot.")); |
234 return ApiError::New(message); | 234 return ApiError::New(message); |
235 } | 235 } |
236 ASSERT(snapshot->kind() == Snapshot::kFull); | 236 ASSERT(snapshot->kind() == Snapshot::kFull); |
237 if (FLAG_trace_isolates) { | 237 if (FLAG_trace_isolates) { |
238 OS::Print("Size of isolate snapshot = %" Pd "\n", snapshot->length()); | 238 OS::Print("Size of isolate snapshot = %" Pd "\n", snapshot->length()); |
239 } | 239 } |
240 SnapshotReader reader(snapshot->content(), snapshot->length(), | 240 SnapshotReader reader(snapshot->content(), snapshot->length(), |
241 Snapshot::kFull, isolate); | 241 Snapshot::kFull, isolate, zone.GetZone()); |
242 const Error& error = Error::Handle(reader.ReadFullSnapshot()); | 242 const Error& error = Error::Handle(reader.ReadFullSnapshot()); |
243 if (!error.IsNull()) { | 243 if (!error.IsNull()) { |
244 return error.raw(); | 244 return error.raw(); |
245 } | 245 } |
246 if (FLAG_trace_isolates) { | 246 if (FLAG_trace_isolates) { |
247 isolate->heap()->PrintSizes(); | 247 isolate->heap()->PrintSizes(); |
248 isolate->megamorphic_cache_table()->PrintSizes(); | 248 isolate->megamorphic_cache_table()->PrintSizes(); |
249 } | 249 } |
250 } | 250 } |
251 | 251 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 return predefined_handles_->handles_.AllocateScopedHandle(); | 310 return predefined_handles_->handles_.AllocateScopedHandle(); |
311 } | 311 } |
312 | 312 |
313 | 313 |
314 bool Dart::IsReadOnlyHandle(uword address) { | 314 bool Dart::IsReadOnlyHandle(uword address) { |
315 ASSERT(predefined_handles_ != NULL); | 315 ASSERT(predefined_handles_ != NULL); |
316 return predefined_handles_->handles_.IsValidScopedHandle(address); | 316 return predefined_handles_->handles_.IsValidScopedHandle(address); |
317 } | 317 } |
318 | 318 |
319 } // namespace dart | 319 } // namespace dart |
OLD | NEW |