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

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

Issue 883263004: Allows turning on checked mode on a per-isolate basis (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 10 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/intrinsifier_x64.cc ('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 "vm/base_isolate.h" 10 #include "vm/base_isolate.h"
11 #include "vm/class_table.h" 11 #include "vm/class_table.h"
12 #include "vm/counters.h" 12 #include "vm/counters.h"
13 #include "vm/handles.h" 13 #include "vm/handles.h"
14 #include "vm/megamorphic_cache_table.h" 14 #include "vm/megamorphic_cache_table.h"
15 #include "vm/metrics.h" 15 #include "vm/metrics.h"
16 #include "vm/random.h" 16 #include "vm/random.h"
17 #include "vm/store_buffer.h" 17 #include "vm/store_buffer.h"
18 #include "vm/tags.h" 18 #include "vm/tags.h"
19 #include "vm/os_thread.h" 19 #include "vm/os_thread.h"
20 #include "vm/trace_buffer.h" 20 #include "vm/trace_buffer.h"
21 #include "vm/timer.h" 21 #include "vm/timer.h"
22 22
23 namespace dart { 23 namespace dart {
24 24
25 DECLARE_FLAG(bool, enable_type_checks);
26 DECLARE_FLAG(bool, enable_asserts);
27 DECLARE_FLAG(bool, error_on_bad_type);
28 DECLARE_FLAG(bool, error_on_bad_override);
29
25 // Forward declarations. 30 // Forward declarations.
26 class AbstractType; 31 class AbstractType;
27 class ApiState; 32 class ApiState;
28 class Array; 33 class Array;
29 class Capability; 34 class Capability;
30 class CHA; 35 class CHA;
31 class Class; 36 class Class;
32 class Code; 37 class Code;
33 class CodeIndexTable; 38 class CodeIndexTable;
34 class Debugger; 39 class Debugger;
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 Mutex* mutex() const { return mutex_; } 355 Mutex* mutex() const { return mutex_; }
351 356
352 Debugger* debugger() const { return debugger_; } 357 Debugger* debugger() const { return debugger_; }
353 358
354 void set_single_step(bool value) { single_step_ = value; } 359 void set_single_step(bool value) { single_step_ = value; }
355 bool single_step() const { return single_step_; } 360 bool single_step() const { return single_step_; }
356 static intptr_t single_step_offset() { 361 static intptr_t single_step_offset() {
357 return OFFSET_OF(Isolate, single_step_); 362 return OFFSET_OF(Isolate, single_step_);
358 } 363 }
359 364
365 void set_has_compiled(bool value) { has_compiled_ = value; }
366 bool has_compiled() const { return has_compiled_; }
367
368 void set_strict_compilation(bool value) { strict_compilation_ = value; }
369 bool strict_compilation() const { return strict_compilation_; }
370 bool TypeChecksEnabled() {
371 return FLAG_enable_type_checks || strict_compilation_;
372 }
373 bool AssertsEnabled() {
374 return FLAG_enable_asserts || strict_compilation_;
375 }
376 bool ErrorOnBadTypeEnabled() {
377 return FLAG_error_on_bad_type || strict_compilation_;
378 }
379 bool ErrorOnBadOverrideEnabled() {
380 return FLAG_error_on_bad_override || strict_compilation_;
381 }
382
360 // Requests that the debugger resume execution. 383 // Requests that the debugger resume execution.
361 void Resume() { 384 void Resume() {
362 resume_request_ = true; 385 resume_request_ = true;
363 } 386 }
364 387
365 // Returns whether the vm service has requested that the debugger 388 // Returns whether the vm service has requested that the debugger
366 // resume execution. 389 // resume execution.
367 bool GetAndClearResumeRequest() { 390 bool GetAndClearResumeRequest() {
368 bool resume_request = resume_request_; 391 bool resume_request = resume_request_;
369 resume_request_ = false; 392 resume_request_ = false;
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 ObjectStore* object_store_; 665 ObjectStore* object_store_;
643 uword top_exit_frame_info_; 666 uword top_exit_frame_info_;
644 void* init_callback_data_; 667 void* init_callback_data_;
645 Dart_EnvironmentCallback environment_callback_; 668 Dart_EnvironmentCallback environment_callback_;
646 Dart_LibraryTagHandler library_tag_handler_; 669 Dart_LibraryTagHandler library_tag_handler_;
647 ApiState* api_state_; 670 ApiState* api_state_;
648 StubCode* stub_code_; 671 StubCode* stub_code_;
649 Debugger* debugger_; 672 Debugger* debugger_;
650 bool single_step_; 673 bool single_step_;
651 bool resume_request_; 674 bool resume_request_;
675 bool has_compiled_;
676 bool strict_compilation_;
652 Random random_; 677 Random random_;
653 Simulator* simulator_; 678 Simulator* simulator_;
654 LongJumpScope* long_jump_base_; 679 LongJumpScope* long_jump_base_;
655 TimerList timer_list_; 680 TimerList timer_list_;
656 intptr_t deopt_id_; 681 intptr_t deopt_id_;
657 Mutex* mutex_; // protects stack_limit_ and saved_stack_limit_. 682 Mutex* mutex_; // protects stack_limit_ and saved_stack_limit_.
658 uword stack_limit_; 683 uword stack_limit_;
659 uword saved_stack_limit_; 684 uword saved_stack_limit_;
660 uword stack_base_; 685 uword stack_base_;
661 uword stack_overflow_flags_; 686 uword stack_overflow_flags_;
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 uint8_t* serialized_args_; 887 uint8_t* serialized_args_;
863 intptr_t serialized_args_len_; 888 intptr_t serialized_args_len_;
864 uint8_t* serialized_message_; 889 uint8_t* serialized_message_;
865 intptr_t serialized_message_len_; 890 intptr_t serialized_message_len_;
866 bool paused_; 891 bool paused_;
867 }; 892 };
868 893
869 } // namespace dart 894 } // namespace dart
870 895
871 #endif // VM_ISOLATE_H_ 896 #endif // VM_ISOLATE_H_
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_x64.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698