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

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

Issue 2147493005: Remove per-isolate compile-time constants cache. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | 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 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 RawArray* library_load_error_table() const { 433 RawArray* library_load_error_table() const {
434 return library_load_error_table_; 434 return library_load_error_table_;
435 } 435 }
436 void set_library_load_error_table(const Array& table) { 436 void set_library_load_error_table(const Array& table) {
437 library_load_error_table_ = table.raw(); 437 library_load_error_table_ = table.raw();
438 } 438 }
439 static intptr_t library_load_error_table_offset() { 439 static intptr_t library_load_error_table_offset() {
440 return OFFSET_OF(ObjectStore, library_load_error_table_); 440 return OFFSET_OF(ObjectStore, library_load_error_table_);
441 } 441 }
442 442
443 RawArray* vm_compile_time_constants() const {
444 return vm_compile_time_constants_;
445 }
446 void set_vm_compile_time_constants(const Array& value) {
447 vm_compile_time_constants_ = value.raw();
448 }
449
450 RawArray* unique_dynamic_targets() const { 443 RawArray* unique_dynamic_targets() const {
451 return unique_dynamic_targets_; 444 return unique_dynamic_targets_;
452 } 445 }
453 void set_unique_dynamic_targets(const Array& value) { 446 void set_unique_dynamic_targets(const Array& value) {
454 unique_dynamic_targets_ = value.raw(); 447 unique_dynamic_targets_ = value.raw();
455 } 448 }
456 449
457 RawGrowableObjectArray* token_objects() const { 450 RawGrowableObjectArray* token_objects() const {
458 return token_objects_; 451 return token_objects_;
459 } 452 }
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 V(RawGrowableObjectArray*, error_listeners_) \ 565 V(RawGrowableObjectArray*, error_listeners_) \
573 V(RawContext*, empty_context_) \ 566 V(RawContext*, empty_context_) \
574 V(RawInstance*, stack_overflow_) \ 567 V(RawInstance*, stack_overflow_) \
575 V(RawInstance*, out_of_memory_) \ 568 V(RawInstance*, out_of_memory_) \
576 V(RawUnhandledException*, preallocated_unhandled_exception_) \ 569 V(RawUnhandledException*, preallocated_unhandled_exception_) \
577 V(RawStacktrace*, preallocated_stack_trace_) \ 570 V(RawStacktrace*, preallocated_stack_trace_) \
578 V(RawFunction*, lookup_port_handler_) \ 571 V(RawFunction*, lookup_port_handler_) \
579 V(RawTypedData*, empty_uint32_array_) \ 572 V(RawTypedData*, empty_uint32_array_) \
580 V(RawFunction*, handle_message_function_) \ 573 V(RawFunction*, handle_message_function_) \
581 V(RawArray*, library_load_error_table_) \ 574 V(RawArray*, library_load_error_table_) \
582 V(RawArray*, vm_compile_time_constants_) \
583 V(RawArray*, unique_dynamic_targets_) \ 575 V(RawArray*, unique_dynamic_targets_) \
584 V(RawGrowableObjectArray*, token_objects_) \ 576 V(RawGrowableObjectArray*, token_objects_) \
585 V(RawArray*, token_objects_map_) \ 577 V(RawArray*, token_objects_map_) \
586 V(RawGrowableObjectArray*, megamorphic_cache_table_) \ 578 V(RawGrowableObjectArray*, megamorphic_cache_table_) \
587 V(RawCode*, megamorphic_miss_code_) \ 579 V(RawCode*, megamorphic_miss_code_) \
588 V(RawFunction*, megamorphic_miss_function_) \ 580 V(RawFunction*, megamorphic_miss_function_) \
589 581
590 RawObject** from() { return reinterpret_cast<RawObject**>(&object_class_); } 582 RawObject** from() { return reinterpret_cast<RawObject**>(&object_class_); }
591 #define DECLARE_OBJECT_STORE_FIELD(type, name) \ 583 #define DECLARE_OBJECT_STORE_FIELD(type, name) \
592 type name; 584 type name;
593 OBJECT_STORE_FIELD_LIST(DECLARE_OBJECT_STORE_FIELD) 585 OBJECT_STORE_FIELD_LIST(DECLARE_OBJECT_STORE_FIELD)
594 #undef DECLARE_OBJECT_STORE_FIELD 586 #undef DECLARE_OBJECT_STORE_FIELD
595 RawObject** to() { 587 RawObject** to() {
596 return reinterpret_cast<RawObject**>(&megamorphic_miss_function_); 588 return reinterpret_cast<RawObject**>(&megamorphic_miss_function_);
597 } 589 }
598 RawObject** to_snapshot(Snapshot::Kind kind) { 590 RawObject** to_snapshot(Snapshot::Kind kind) {
599 switch (kind) { 591 switch (kind) {
600 case Snapshot::kCore: 592 case Snapshot::kCore:
601 return reinterpret_cast<RawObject**>(&vm_compile_time_constants_); 593 return reinterpret_cast<RawObject**>(&library_load_error_table_);
602 case Snapshot::kAppWithJIT: 594 case Snapshot::kAppWithJIT:
603 case Snapshot::kAppNoJIT: 595 case Snapshot::kAppNoJIT:
604 return to(); 596 return to();
605 case Snapshot::kScript: 597 case Snapshot::kScript:
606 case Snapshot::kMessage: 598 case Snapshot::kMessage:
607 case Snapshot::kNone: 599 case Snapshot::kNone:
608 case Snapshot::kInvalid: 600 case Snapshot::kInvalid:
609 break; 601 break;
610 } 602 }
611 UNREACHABLE(); 603 UNREACHABLE();
612 return NULL; 604 return NULL;
613 } 605 }
614 606
615 friend class Serializer; 607 friend class Serializer;
616 friend class Deserializer; 608 friend class Deserializer;
617 609
618 DISALLOW_COPY_AND_ASSIGN(ObjectStore); 610 DISALLOW_COPY_AND_ASSIGN(ObjectStore);
619 }; 611 };
620 612
621 } // namespace dart 613 } // namespace dart
622 614
623 #endif // VM_OBJECT_STORE_H_ 615 #endif // VM_OBJECT_STORE_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698