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

Side by Side Diff: runtime/vm/object_store.h

Issue 388963003: Avoid allocating an exception object in the snapshot reader. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: addressed comments Created 6 years, 5 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/object.cc ('k') | runtime/vm/object_store.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 #ifndef VM_OBJECT_STORE_H_ 5 #ifndef VM_OBJECT_STORE_H_
6 #define VM_OBJECT_STORE_H_ 6 #define VM_OBJECT_STORE_H_
7 7
8 #include "vm/object.h" 8 #include "vm/object.h"
9 9
10 namespace dart { 10 namespace dart {
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 RawInstance* stack_overflow() const { return stack_overflow_; } 373 RawInstance* stack_overflow() const { return stack_overflow_; }
374 void set_stack_overflow(const Instance& value) { 374 void set_stack_overflow(const Instance& value) {
375 stack_overflow_ = value.raw(); 375 stack_overflow_ = value.raw();
376 } 376 }
377 377
378 RawInstance* out_of_memory() const { return out_of_memory_; } 378 RawInstance* out_of_memory() const { return out_of_memory_; }
379 void set_out_of_memory(const Instance& value) { 379 void set_out_of_memory(const Instance& value) {
380 out_of_memory_ = value.raw(); 380 out_of_memory_ = value.raw();
381 } 381 }
382 382
383 RawUnhandledException* preallocated_unhandled_exception() const {
384 return preallocated_unhandled_exception_;
385 }
386 void set_preallocated_unhandled_exception(const UnhandledException& value) {
387 preallocated_unhandled_exception_ = value.raw();
388 }
389
383 RawStacktrace* preallocated_stack_trace() const { 390 RawStacktrace* preallocated_stack_trace() const {
384 return preallocated_stack_trace_; 391 return preallocated_stack_trace_;
385 } 392 }
386 void set_preallocated_stack_trace(const Stacktrace& value) { 393 void set_preallocated_stack_trace(const Stacktrace& value) {
387 preallocated_stack_trace_ = value.raw(); 394 preallocated_stack_trace_ = value.raw();
388 } 395 }
389 396
390 RawFunction* lookup_port_handler() const { 397 RawFunction* lookup_port_handler() const {
391 return lookup_port_handler_; 398 return lookup_port_handler_;
392 } 399 }
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 RawLibrary* profiler_library_; 495 RawLibrary* profiler_library_;
489 RawGrowableObjectArray* libraries_; 496 RawGrowableObjectArray* libraries_;
490 RawGrowableObjectArray* pending_classes_; 497 RawGrowableObjectArray* pending_classes_;
491 RawGrowableObjectArray* pending_functions_; 498 RawGrowableObjectArray* pending_functions_;
492 RawGrowableObjectArray* resume_capabilities_; 499 RawGrowableObjectArray* resume_capabilities_;
493 RawError* sticky_error_; 500 RawError* sticky_error_;
494 RawString* unhandled_exception_handler_; 501 RawString* unhandled_exception_handler_;
495 RawContext* empty_context_; 502 RawContext* empty_context_;
496 RawInstance* stack_overflow_; 503 RawInstance* stack_overflow_;
497 RawInstance* out_of_memory_; 504 RawInstance* out_of_memory_;
505 RawUnhandledException* preallocated_unhandled_exception_;
498 RawStacktrace* preallocated_stack_trace_; 506 RawStacktrace* preallocated_stack_trace_;
499 RawFunction* lookup_port_handler_; 507 RawFunction* lookup_port_handler_;
500 RawFunction* handle_message_function_; 508 RawFunction* handle_message_function_;
501 RawUserTag* default_tag_; 509 RawUserTag* default_tag_;
502 RawObject** to() { 510 RawObject** to() {
503 return reinterpret_cast<RawObject**>(&handle_message_function_); 511 return reinterpret_cast<RawObject**>(&handle_message_function_);
504 } 512 }
505 513
506 friend class SnapshotReader; 514 friend class SnapshotReader;
507 515
508 DISALLOW_COPY_AND_ASSIGN(ObjectStore); 516 DISALLOW_COPY_AND_ASSIGN(ObjectStore);
509 }; 517 };
510 518
511 } // namespace dart 519 } // namespace dart
512 520
513 #endif // VM_OBJECT_STORE_H_ 521 #endif // VM_OBJECT_STORE_H_
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/object_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698