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

Side by Side Diff: vm/isolate.h

Issue 10783035: Create frequently used symbols in the vm isolate (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 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
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_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 "vm/class_table.h" 10 #include "vm/class_table.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 void set_ast_node_id(int value) { ast_node_id_ = value; } 174 void set_ast_node_id(int value) { ast_node_id_ = value; }
175 175
176 intptr_t computation_id() const { return computation_id_; } 176 intptr_t computation_id() const { return computation_id_; }
177 void set_computation_id(int value) { computation_id_ = value; } 177 void set_computation_id(int value) { computation_id_ = value; }
178 178
179 RawArray* ic_data_array() const { return ic_data_array_; } 179 RawArray* ic_data_array() const { return ic_data_array_; }
180 void set_ic_data_array(RawArray* value) { ic_data_array_ = value; } 180 void set_ic_data_array(RawArray* value) { ic_data_array_ = value; }
181 181
182 Debugger* debugger() const { return debugger_; } 182 Debugger* debugger() const { return debugger_; }
183 183
184 GcPrologueCallbacks& gc_prologue_callbacks() {
185 return gc_prologue_callbacks_;
186 }
187
188 GcEpilogueCallbacks& gc_epilogue_callbacks() {
189 return gc_epilogue_callbacks_;
190 }
191
184 static void SetCreateCallback(Dart_IsolateCreateCallback cb) { 192 static void SetCreateCallback(Dart_IsolateCreateCallback cb) {
185 create_callback_ = cb; 193 create_callback_ = cb;
186 } 194 }
187 static Dart_IsolateCreateCallback CreateCallback() { 195 static Dart_IsolateCreateCallback CreateCallback() {
188 return create_callback_; 196 return create_callback_;
189 } 197 }
190 198
191 static void SetInterruptCallback(Dart_IsolateInterruptCallback cb) { 199 static void SetInterruptCallback(Dart_IsolateInterruptCallback cb) {
192 interrupt_callback_ = cb; 200 interrupt_callback_ = cb;
193 } 201 }
194 static Dart_IsolateInterruptCallback InterruptCallback() { 202 static Dart_IsolateInterruptCallback InterruptCallback() {
195 return interrupt_callback_; 203 return interrupt_callback_;
196 } 204 }
197 205
198 static void SetShutdownCallback(Dart_IsolateShutdownCallback cb) { 206 static void SetShutdownCallback(Dart_IsolateShutdownCallback cb) {
199 shutdown_callback_ = cb; 207 shutdown_callback_ = cb;
200 } 208 }
201 static Dart_IsolateShutdownCallback ShutdownCallback() { 209 static Dart_IsolateShutdownCallback ShutdownCallback() {
202 return shutdown_callback_; 210 return shutdown_callback_;
203 } 211 }
204 212
205 GcPrologueCallbacks& gc_prologue_callbacks() {
206 return gc_prologue_callbacks_;
207 }
208
209 GcEpilogueCallbacks& gc_epilogue_callbacks() {
210 return gc_epilogue_callbacks_;
211 }
212
213 private: 213 private:
214 Isolate(); 214 Isolate();
215 215
216 void BuildName(const char* name_prefix); 216 void BuildName(const char* name_prefix);
217 void PrintInvokedFunctions(); 217 void PrintInvokedFunctions();
218 218
219 static uword GetSpecifiedStackSize(); 219 static uword GetSpecifiedStackSize();
220 220
221 static const intptr_t kStackSizeBuffer = (16 * KB); 221 static const intptr_t kStackSizeBuffer = (16 * KB);
222 222
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 Isolate* new_isolate_; 317 Isolate* new_isolate_;
318 Isolate* saved_isolate_; 318 Isolate* saved_isolate_;
319 uword saved_stack_limit_; 319 uword saved_stack_limit_;
320 320
321 DISALLOW_COPY_AND_ASSIGN(SwitchIsolateScope); 321 DISALLOW_COPY_AND_ASSIGN(SwitchIsolateScope);
322 }; 322 };
323 323
324 } // namespace dart 324 } // namespace dart
325 325
326 #endif // VM_ISOLATE_H_ 326 #endif // VM_ISOLATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698