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

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

Issue 1339363002: Reapply "Move megamorphic cache table into the Dart heap." (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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
« 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 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 return OFFSET_OF(ObjectStore, library_load_error_table_); 426 return OFFSET_OF(ObjectStore, library_load_error_table_);
427 } 427 }
428 428
429 RawArray* compile_time_constants() const { 429 RawArray* compile_time_constants() const {
430 return compile_time_constants_; 430 return compile_time_constants_;
431 } 431 }
432 void set_compile_time_constants(const Array& value) { 432 void set_compile_time_constants(const Array& value) {
433 compile_time_constants_ = value.raw(); 433 compile_time_constants_ = value.raw();
434 } 434 }
435 435
436 RawGrowableObjectArray* megamorphic_cache_table() const {
437 return megamorphic_cache_table_;
438 }
439 void set_megamorphic_cache_table(const GrowableObjectArray& value) {
440 megamorphic_cache_table_ = value.raw();
441 }
442 RawFunction* megamorphic_miss_function() const {
443 return megamorphic_miss_function_;
444 }
445 void SetMegamorphicMissHandler(const Code& code, const Function& func) {
446 // Hold onto the code so it is traced and not detached from the function.
447 megamorphic_miss_code_ = code.raw();
448 megamorphic_miss_function_ = func.raw();
449 }
450
436 // Visit all object pointers. 451 // Visit all object pointers.
437 void VisitObjectPointers(ObjectPointerVisitor* visitor); 452 void VisitObjectPointers(ObjectPointerVisitor* visitor);
438 453
439 // Called to initialize objects required by the vm but which invoke 454 // Called to initialize objects required by the vm but which invoke
440 // dart code. If an error occurs then false is returned and error 455 // dart code. If an error occurs then false is returned and error
441 // information is stored in sticky_error(). 456 // information is stored in sticky_error().
442 bool PreallocateObjects(); 457 bool PreallocateObjects();
443 458
444 void InitKnownObjects(); 459 void InitKnownObjects();
445 460
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 RawContext* empty_context_; 531 RawContext* empty_context_;
517 RawInstance* stack_overflow_; 532 RawInstance* stack_overflow_;
518 RawInstance* out_of_memory_; 533 RawInstance* out_of_memory_;
519 RawUnhandledException* preallocated_unhandled_exception_; 534 RawUnhandledException* preallocated_unhandled_exception_;
520 RawStacktrace* preallocated_stack_trace_; 535 RawStacktrace* preallocated_stack_trace_;
521 RawFunction* lookup_port_handler_; 536 RawFunction* lookup_port_handler_;
522 RawTypedData* empty_uint32_array_; 537 RawTypedData* empty_uint32_array_;
523 RawFunction* handle_message_function_; 538 RawFunction* handle_message_function_;
524 RawArray* library_load_error_table_; 539 RawArray* library_load_error_table_;
525 RawArray* compile_time_constants_; 540 RawArray* compile_time_constants_;
526 RawObject** to() { 541 RawObject** to_snapshot() {
527 return reinterpret_cast<RawObject**>(&compile_time_constants_); 542 return reinterpret_cast<RawObject**>(&compile_time_constants_);
528 } 543 }
544 RawGrowableObjectArray* megamorphic_cache_table_;
545 RawCode* megamorphic_miss_code_;
546 RawFunction* megamorphic_miss_function_;
547 RawObject** to() {
548 return reinterpret_cast<RawObject**>(&megamorphic_miss_function_);
549 }
529 550
551 friend class FullSnapshotWriter;
530 friend class SnapshotReader; 552 friend class SnapshotReader;
531 friend class VmIsolateSnapshotReader; 553 friend class VmIsolateSnapshotReader;
532 554
533 DISALLOW_COPY_AND_ASSIGN(ObjectStore); 555 DISALLOW_COPY_AND_ASSIGN(ObjectStore);
534 }; 556 };
535 557
536 } // namespace dart 558 } // namespace dart
537 559
538 #endif // VM_OBJECT_STORE_H_ 560 #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