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

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

Issue 1012333002: Keep zone cached in SnapshotReader to allow removing ZoneHandle(Isolate*) interface. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 9 months 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/constant_propagator.cc ('k') | runtime/vm/dart_api_impl.cc » ('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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « runtime/vm/constant_propagator.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698