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

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

Issue 187133004: When reading a full snapshot use the class id from the snapshot instead of generating a new one. Th… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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
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 #ifndef VM_ISOLATE_H_ 5 #ifndef VM_ISOLATE_H_
6 #define VM_ISOLATE_H_ 6 #define VM_ISOLATE_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "platform/thread.h" 10 #include "platform/thread.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 class RawError; 53 class RawError;
54 class RawFloat32x4; 54 class RawFloat32x4;
55 class RawInt32x4; 55 class RawInt32x4;
56 class SampleBuffer; 56 class SampleBuffer;
57 class Simulator; 57 class Simulator;
58 class StackResource; 58 class StackResource;
59 class StackZone; 59 class StackZone;
60 class StubCode; 60 class StubCode;
61 class TypeArguments; 61 class TypeArguments;
62 class TypeParameter; 62 class TypeParameter;
63 class ObjectHistogram;
64 class ObjectIdRing; 63 class ObjectIdRing;
65 64
66 65
67 #define REUSABLE_HANDLE_LIST(V) \ 66 #define REUSABLE_HANDLE_LIST(V) \
68 V(Object) \ 67 V(Object) \
69 V(Array) \ 68 V(Array) \
70 V(String) \ 69 V(String) \
71 V(Instance) \ 70 V(Instance) \
72 V(Function) \ 71 V(Function) \
73 V(Field) \ 72 V(Field) \
(...skipping 23 matching lines...) Expand all
97 } 96 }
98 97
99 static void SetCurrent(Isolate* isolate); 98 static void SetCurrent(Isolate* isolate);
100 99
101 static void InitOnce(); 100 static void InitOnce();
102 static Isolate* Init(const char* name_prefix); 101 static Isolate* Init(const char* name_prefix);
103 void Shutdown(); 102 void Shutdown();
104 103
105 // Register a newly introduced class. 104 // Register a newly introduced class.
106 void RegisterClass(const Class& cls); 105 void RegisterClass(const Class& cls);
106 void RegisterClassAt(intptr_t index, const Class& cls);
107 void ValidateClassTable();
107 108
108 // Visit all object pointers. 109 // Visit all object pointers.
109 void VisitObjectPointers(ObjectPointerVisitor* visitor, 110 void VisitObjectPointers(ObjectPointerVisitor* visitor,
110 bool visit_prologue_weak_persistent_handles, 111 bool visit_prologue_weak_persistent_handles,
111 bool validate_frames); 112 bool validate_frames);
112 113
113 // Visits weak object pointers. 114 // Visits weak object pointers.
114 void VisitWeakPersistentHandles(HandleVisitor* visit, 115 void VisitWeakPersistentHandles(HandleVisitor* visit,
115 bool visit_prologue_weak_persistent_handles); 116 bool visit_prologue_weak_persistent_handles);
116 117
117 StoreBuffer* store_buffer() { return &store_buffer_; } 118 StoreBuffer* store_buffer() { return &store_buffer_; }
118 static intptr_t store_buffer_offset() { 119 static intptr_t store_buffer_offset() {
119 return OFFSET_OF(Isolate, store_buffer_); 120 return OFFSET_OF(Isolate, store_buffer_);
120 } 121 }
121 122
122 ClassTable* class_table() { return &class_table_; } 123 ClassTable* class_table() { return &class_table_; }
123 static intptr_t class_table_offset() { 124 static intptr_t class_table_offset() {
124 return OFFSET_OF(Isolate, class_table_); 125 return OFFSET_OF(Isolate, class_table_);
125 } 126 }
126 127
127 ObjectHistogram* object_histogram() { return object_histogram_; }
128
129 bool cha_used() const { return cha_used_; } 128 bool cha_used() const { return cha_used_; }
130 void set_cha_used(bool value) { cha_used_ = value; } 129 void set_cha_used(bool value) { cha_used_ = value; }
131 130
132 MegamorphicCacheTable* megamorphic_cache_table() { 131 MegamorphicCacheTable* megamorphic_cache_table() {
133 return &megamorphic_cache_table_; 132 return &megamorphic_cache_table_;
134 } 133 }
135 134
136 Dart_MessageNotifyCallback message_notify_callback() const { 135 Dart_MessageNotifyCallback message_notify_callback() const {
137 return message_notify_callback_; 136 return message_notify_callback_;
138 } 137 }
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 IsolateSpawnState* spawn_state_; 481 IsolateSpawnState* spawn_state_;
483 bool is_runnable_; 482 bool is_runnable_;
484 GcPrologueCallbacks gc_prologue_callbacks_; 483 GcPrologueCallbacks gc_prologue_callbacks_;
485 GcEpilogueCallbacks gc_epilogue_callbacks_; 484 GcEpilogueCallbacks gc_epilogue_callbacks_;
486 intptr_t defer_finalization_count_; 485 intptr_t defer_finalization_count_;
487 DeoptContext* deopt_context_; 486 DeoptContext* deopt_context_;
488 487
489 // Status support. 488 // Status support.
490 char* stacktrace_; 489 char* stacktrace_;
491 intptr_t stack_frame_index_; 490 intptr_t stack_frame_index_;
492 ObjectHistogram* object_histogram_;
493 491
494 bool cha_used_; 492 bool cha_used_;
495 493
496 // Ring buffer of objects assigned an id. 494 // Ring buffer of objects assigned an id.
497 ObjectIdRing* object_id_ring_; 495 ObjectIdRing* object_id_ring_;
498 496
499 IsolateProfilerData* profiler_data_; 497 IsolateProfilerData* profiler_data_;
500 Mutex profiler_data_mutex_; 498 Mutex profiler_data_mutex_;
501 InterruptableThreadState* thread_state_; 499 InterruptableThreadState* thread_state_;
502 500
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 char* script_url_; 623 char* script_url_;
626 char* library_url_; 624 char* library_url_;
627 char* class_name_; 625 char* class_name_;
628 char* function_name_; 626 char* function_name_;
629 char* exception_callback_name_; 627 char* exception_callback_name_;
630 }; 628 };
631 629
632 } // namespace dart 630 } // namespace dart
633 631
634 #endif // VM_ISOLATE_H_ 632 #endif // VM_ISOLATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698