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

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

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/isolate.h ('k') | runtime/vm/native_arguments.h » ('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 #include "vm/isolate.h" 5 #include "vm/isolate.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "lib/mirrors.h" 9 #include "lib/mirrors.h"
10 #include "vm/code_observers.h" 10 #include "vm/code_observers.h"
11 #include "vm/compiler_stats.h" 11 #include "vm/compiler_stats.h"
12 #include "vm/dart_api_state.h" 12 #include "vm/dart_api_state.h"
13 #include "vm/dart_entry.h" 13 #include "vm/dart_entry.h"
14 #include "vm/debugger.h" 14 #include "vm/debugger.h"
15 #include "vm/heap.h" 15 #include "vm/heap.h"
16 #include "vm/message_handler.h" 16 #include "vm/message_handler.h"
17 #include "vm/object_store.h" 17 #include "vm/object_store.h"
18 #include "vm/parser.h" 18 #include "vm/parser.h"
19 #include "vm/port.h" 19 #include "vm/port.h"
20 #include "vm/simulator.h"
20 #include "vm/stack_frame.h" 21 #include "vm/stack_frame.h"
21 #include "vm/stub_code.h" 22 #include "vm/stub_code.h"
22 #include "vm/symbols.h" 23 #include "vm/symbols.h"
23 #include "vm/thread.h" 24 #include "vm/thread.h"
24 #include "vm/timer.h" 25 #include "vm/timer.h"
25 #include "vm/visitor.h" 26 #include "vm/visitor.h"
26 27
27 namespace dart { 28 namespace dart {
28 29
29 DEFINE_FLAG(bool, report_usage_count, false, 30 DEFINE_FLAG(bool, report_usage_count, false,
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 main_port_(0), 264 main_port_(0),
264 heap_(NULL), 265 heap_(NULL),
265 object_store_(NULL), 266 object_store_(NULL),
266 top_context_(Context::null()), 267 top_context_(Context::null()),
267 top_exit_frame_info_(0), 268 top_exit_frame_info_(0),
268 init_callback_data_(NULL), 269 init_callback_data_(NULL),
269 library_tag_handler_(NULL), 270 library_tag_handler_(NULL),
270 api_state_(NULL), 271 api_state_(NULL),
271 stub_code_(NULL), 272 stub_code_(NULL),
272 debugger_(NULL), 273 debugger_(NULL),
274 simulator_(NULL),
273 long_jump_base_(NULL), 275 long_jump_base_(NULL),
274 timer_list_(), 276 timer_list_(),
275 deopt_id_(0), 277 deopt_id_(0),
276 ic_data_array_(Array::null()), 278 ic_data_array_(Array::null()),
277 mutex_(new Mutex()), 279 mutex_(new Mutex()),
278 stack_limit_(0), 280 stack_limit_(0),
279 saved_stack_limit_(0), 281 saved_stack_limit_(0),
280 message_handler_(NULL), 282 message_handler_(NULL),
281 spawn_data_(0), 283 spawn_data_(0),
282 gc_prologue_callbacks_(), 284 gc_prologue_callbacks_(),
283 gc_epilogue_callbacks_(), 285 gc_epilogue_callbacks_(),
284 deopt_cpu_registers_copy_(NULL), 286 deopt_cpu_registers_copy_(NULL),
285 deopt_fpu_registers_copy_(NULL), 287 deopt_fpu_registers_copy_(NULL),
286 deopt_frame_copy_(NULL), 288 deopt_frame_copy_(NULL),
287 deopt_frame_copy_size_(0), 289 deopt_frame_copy_size_(0),
288 deferred_doubles_(NULL), 290 deferred_doubles_(NULL),
289 deferred_mints_(NULL) { 291 deferred_mints_(NULL) {
290 } 292 }
291 293
292 294
293 Isolate::~Isolate() { 295 Isolate::~Isolate() {
294 delete [] name_; 296 delete [] name_;
295 delete heap_; 297 delete heap_;
296 delete object_store_; 298 delete object_store_;
297 delete api_state_; 299 delete api_state_;
298 delete stub_code_; 300 delete stub_code_;
299 delete debugger_; 301 delete debugger_;
302 #if defined(USING_SIMULATOR)
303 delete simulator_;
304 #endif
300 delete mutex_; 305 delete mutex_;
301 mutex_ = NULL; // Fail fast if interrupts are scheduled on a dead isolate. 306 mutex_ = NULL; // Fail fast if interrupts are scheduled on a dead isolate.
302 delete message_handler_; 307 delete message_handler_;
303 message_handler_ = NULL; // Fail fast if we send messages to a dead isolate. 308 message_handler_ = NULL; // Fail fast if we send messages to a dead isolate.
304 } 309 }
305 310
306 void Isolate::SetCurrent(Isolate* current) { 311 void Isolate::SetCurrent(Isolate* current) {
307 Thread::SetThreadLocal(isolate_key, reinterpret_cast<uword>(current)); 312 Thread::SetThreadLocal(isolate_key, reinterpret_cast<uword>(current));
308 } 313 }
309 314
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 621
617 622
618 void Isolate::VisitWeakPersistentHandles(HandleVisitor* visitor, 623 void Isolate::VisitWeakPersistentHandles(HandleVisitor* visitor,
619 bool visit_prologue_weak_handles) { 624 bool visit_prologue_weak_handles) {
620 if (api_state() != NULL) { 625 if (api_state() != NULL) {
621 api_state()->VisitWeakHandles(visitor, visit_prologue_weak_handles); 626 api_state()->VisitWeakHandles(visitor, visit_prologue_weak_handles);
622 } 627 }
623 } 628 }
624 629
625 } // namespace dart 630 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/isolate.h ('k') | runtime/vm/native_arguments.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698