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

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

Issue 12041056: Initial revision of ARM simulator and (empty) MIPS simulator. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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/disassembler.h ('k') | runtime/vm/isolate.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) 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 18 matching lines...) Expand all
29 class MessageHandler; 29 class MessageHandler;
30 class Mutex; 30 class Mutex;
31 class ObjectPointerVisitor; 31 class ObjectPointerVisitor;
32 class ObjectStore; 32 class ObjectStore;
33 class RawArray; 33 class RawArray;
34 class RawContext; 34 class RawContext;
35 class RawDouble; 35 class RawDouble;
36 class RawMint; 36 class RawMint;
37 class RawInteger; 37 class RawInteger;
38 class RawError; 38 class RawError;
39 class Simulator;
39 class StackResource; 40 class StackResource;
40 class StackZone; 41 class StackZone;
41 class StubCode; 42 class StubCode;
42 43
43 44
44 // Used by the deoptimization infrastructure to defer allocation of Double 45 // Used by the deoptimization infrastructure to defer allocation of Double
45 // objects until frame is fully rewritten and GC is safe. 46 // objects until frame is fully rewritten and GC is safe.
46 // See callers of Isolate::DeferDoubleMaterialization. 47 // See callers of Isolate::DeferDoubleMaterialization.
47 class DeferredDouble { 48 class DeferredDouble {
48 public: 49 public:
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 return reinterpret_cast<uword>(&stack_limit_); 195 return reinterpret_cast<uword>(&stack_limit_);
195 } 196 }
196 197
197 // The current stack limit. This may be overwritten with a special 198 // The current stack limit. This may be overwritten with a special
198 // value to trigger interrupts. 199 // value to trigger interrupts.
199 uword stack_limit() const { return stack_limit_; } 200 uword stack_limit() const { return stack_limit_; }
200 201
201 // The true stack limit for this isolate. 202 // The true stack limit for this isolate.
202 uword saved_stack_limit() const { return saved_stack_limit_; } 203 uword saved_stack_limit() const { return saved_stack_limit_; }
203 204
205 static uword GetSpecifiedStackSize();
206
207 static const intptr_t kStackSizeBuffer = (16 * KB);
208
204 enum { 209 enum {
205 kApiInterrupt = 0x1, // An interrupt from Dart_InterruptIsolate. 210 kApiInterrupt = 0x1, // An interrupt from Dart_InterruptIsolate.
206 kMessageInterrupt = 0x2, // An interrupt to process an out of band message. 211 kMessageInterrupt = 0x2, // An interrupt to process an out of band message.
207 kStoreBufferInterrupt = 0x4, // An interrupt to process the store buffer. 212 kStoreBufferInterrupt = 0x4, // An interrupt to process the store buffer.
208 213
209 kInterruptsMask = 214 kInterruptsMask =
210 kApiInterrupt | 215 kApiInterrupt |
211 kMessageInterrupt | 216 kMessageInterrupt |
212 kStoreBufferInterrupt, 217 kStoreBufferInterrupt,
213 }; 218 };
(...skipping 17 matching lines...) Expand all
231 ASSERT(deopt_id_ != kNoDeoptId); 236 ASSERT(deopt_id_ != kNoDeoptId);
232 return deopt_id_++; 237 return deopt_id_++;
233 } 238 }
234 239
235 RawArray* ic_data_array() const { return ic_data_array_; } 240 RawArray* ic_data_array() const { return ic_data_array_; }
236 void set_ic_data_array(RawArray* value) { ic_data_array_ = value; } 241 void set_ic_data_array(RawArray* value) { ic_data_array_ = value; }
237 ICData* GetICDataForDeoptId(intptr_t deopt_id) const; 242 ICData* GetICDataForDeoptId(intptr_t deopt_id) const;
238 243
239 Debugger* debugger() const { return debugger_; } 244 Debugger* debugger() const { return debugger_; }
240 245
246 Simulator* simulator() const { return simulator_; }
247 void set_simulator(Simulator* value) { simulator_ = value; }
248
241 GcPrologueCallbacks& gc_prologue_callbacks() { 249 GcPrologueCallbacks& gc_prologue_callbacks() {
242 return gc_prologue_callbacks_; 250 return gc_prologue_callbacks_;
243 } 251 }
244 252
245 GcEpilogueCallbacks& gc_epilogue_callbacks() { 253 GcEpilogueCallbacks& gc_epilogue_callbacks() {
246 return gc_epilogue_callbacks_; 254 return gc_epilogue_callbacks_;
247 } 255 }
248 256
249 static void SetCreateCallback(Dart_IsolateCreateCallback cb) { 257 static void SetCreateCallback(Dart_IsolateCreateCallback cb) {
250 create_callback_ = cb; 258 create_callback_ = cb;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 deferred_mints_ = NULL; 343 deferred_mints_ = NULL;
336 return list; 344 return list;
337 } 345 }
338 346
339 private: 347 private:
340 Isolate(); 348 Isolate();
341 349
342 void BuildName(const char* name_prefix); 350 void BuildName(const char* name_prefix);
343 void PrintInvokedFunctions(); 351 void PrintInvokedFunctions();
344 352
345 static uword GetSpecifiedStackSize();
346
347 static const intptr_t kStackSizeBuffer = (16 * KB);
348
349 static ThreadLocalKey isolate_key; 353 static ThreadLocalKey isolate_key;
350 StoreBufferBlock store_buffer_block_; 354 StoreBufferBlock store_buffer_block_;
351 StoreBuffer store_buffer_; 355 StoreBuffer store_buffer_;
352 ClassTable class_table_; 356 ClassTable class_table_;
353 MegamorphicCacheTable megamorphic_cache_table_; 357 MegamorphicCacheTable megamorphic_cache_table_;
354 Dart_MessageNotifyCallback message_notify_callback_; 358 Dart_MessageNotifyCallback message_notify_callback_;
355 char* name_; 359 char* name_;
356 int64_t start_time_; 360 int64_t start_time_;
357 Dart_Port main_port_; 361 Dart_Port main_port_;
358 Heap* heap_; 362 Heap* heap_;
359 ObjectStore* object_store_; 363 ObjectStore* object_store_;
360 RawContext* top_context_; 364 RawContext* top_context_;
361 uword top_exit_frame_info_; 365 uword top_exit_frame_info_;
362 void* init_callback_data_; 366 void* init_callback_data_;
363 Dart_LibraryTagHandler library_tag_handler_; 367 Dart_LibraryTagHandler library_tag_handler_;
364 ApiState* api_state_; 368 ApiState* api_state_;
365 StubCode* stub_code_; 369 StubCode* stub_code_;
366 Debugger* debugger_; 370 Debugger* debugger_;
371 Simulator* simulator_;
367 LongJump* long_jump_base_; 372 LongJump* long_jump_base_;
368 TimerList timer_list_; 373 TimerList timer_list_;
369 intptr_t deopt_id_; 374 intptr_t deopt_id_;
370 RawArray* ic_data_array_; 375 RawArray* ic_data_array_;
371 Mutex* mutex_; // protects stack_limit_ and saved_stack_limit_. 376 Mutex* mutex_; // protects stack_limit_ and saved_stack_limit_.
372 uword stack_limit_; 377 uword stack_limit_;
373 uword saved_stack_limit_; 378 uword saved_stack_limit_;
374 MessageHandler* message_handler_; 379 MessageHandler* message_handler_;
375 uword spawn_data_; 380 uword spawn_data_;
376 GcPrologueCallbacks gc_prologue_callbacks_; 381 GcPrologueCallbacks gc_prologue_callbacks_;
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 Isolate* new_isolate_; 460 Isolate* new_isolate_;
456 Isolate* saved_isolate_; 461 Isolate* saved_isolate_;
457 uword saved_stack_limit_; 462 uword saved_stack_limit_;
458 463
459 DISALLOW_COPY_AND_ASSIGN(SwitchIsolateScope); 464 DISALLOW_COPY_AND_ASSIGN(SwitchIsolateScope);
460 }; 465 };
461 466
462 } // namespace dart 467 } // namespace dart
463 468
464 #endif // VM_ISOLATE_H_ 469 #endif // VM_ISOLATE_H_
OLDNEW
« no previous file with comments | « runtime/vm/disassembler.h ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698