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

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

Issue 2572563004: Improve the casing of Stackmap and Stacktrace. (Closed)
Patch Set: Build fixes Created 4 years 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
« no previous file with comments | « runtime/vm/snapshot.h ('k') | runtime/vm/stack_frame.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/snapshot.h" 5 #include "vm/snapshot.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/bootstrap.h" 8 #include "vm/bootstrap.h"
9 #include "vm/class_finalizer.h" 9 #include "vm/class_finalizer.h"
10 #include "vm/dart.h" 10 #include "vm/dart.h"
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 363
364 364
365 void SnapshotReader::SetReadException(const char* msg) { 365 void SnapshotReader::SetReadException(const char* msg) {
366 const String& error_str = String::Handle(zone(), String::New(msg)); 366 const String& error_str = String::Handle(zone(), String::New(msg));
367 const Array& args = Array::Handle(zone(), Array::New(1)); 367 const Array& args = Array::Handle(zone(), Array::New(1));
368 args.SetAt(0, error_str); 368 args.SetAt(0, error_str);
369 Object& result = Object::Handle(zone()); 369 Object& result = Object::Handle(zone());
370 const Library& library = Library::Handle(zone(), Library::CoreLibrary()); 370 const Library& library = Library::Handle(zone(), Library::CoreLibrary());
371 result = DartLibraryCalls::InstanceCreate(library, Symbols::ArgumentError(), 371 result = DartLibraryCalls::InstanceCreate(library, Symbols::ArgumentError(),
372 Symbols::Dot(), args); 372 Symbols::Dot(), args);
373 const Stacktrace& stacktrace = Stacktrace::Handle(zone()); 373 const StackTrace& stacktrace = StackTrace::Handle(zone());
374 const UnhandledException& error = UnhandledException::Handle( 374 const UnhandledException& error = UnhandledException::Handle(
375 zone(), UnhandledException::New(Instance::Cast(result), stacktrace)); 375 zone(), UnhandledException::New(Instance::Cast(result), stacktrace));
376 thread()->long_jump_base()->Jump(1, error); 376 thread()->long_jump_base()->Jump(1, error);
377 } 377 }
378 378
379 379
380 RawObject* SnapshotReader::VmIsolateSnapshotObject(intptr_t index) const { 380 RawObject* SnapshotReader::VmIsolateSnapshotObject(intptr_t index) const {
381 return Object::vm_isolate_snapshot_object_table().At(index); 381 return Object::vm_isolate_snapshot_object_table().At(index);
382 } 382 }
383 383
(...skipping 1572 matching lines...) Expand 10 before | Expand all | Expand 10 after
1956 if (setjmp(*jump.Set()) == 0) { 1956 if (setjmp(*jump.Set()) == 0) {
1957 NoSafepointScope no_safepoint; 1957 NoSafepointScope no_safepoint;
1958 WriteObject(obj.raw()); 1958 WriteObject(obj.raw());
1959 } else { 1959 } else {
1960 ThrowException(exception_type(), exception_msg()); 1960 ThrowException(exception_type(), exception_msg());
1961 } 1961 }
1962 } 1962 }
1963 1963
1964 1964
1965 } // namespace dart 1965 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/snapshot.h ('k') | runtime/vm/stack_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698