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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/intrinsifier_x64.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate.h
===================================================================
--- runtime/vm/isolate.h (revision 43472)
+++ runtime/vm/isolate.h (working copy)
@@ -22,6 +22,11 @@
namespace dart {
+DECLARE_FLAG(bool, enable_type_checks);
+DECLARE_FLAG(bool, enable_asserts);
+DECLARE_FLAG(bool, error_on_bad_type);
+DECLARE_FLAG(bool, error_on_bad_override);
+
// Forward declarations.
class AbstractType;
class ApiState;
@@ -357,6 +362,24 @@
return OFFSET_OF(Isolate, single_step_);
}
+ void set_has_compiled(bool value) { has_compiled_ = value; }
+ bool has_compiled() const { return has_compiled_; }
+
+ void set_strict_compilation(bool value) { strict_compilation_ = value; }
+ bool strict_compilation() const { return strict_compilation_; }
+ bool TypeChecksEnabled() {
+ return FLAG_enable_type_checks || strict_compilation_;
+ }
+ bool AssertsEnabled() {
+ return FLAG_enable_asserts || strict_compilation_;
+ }
+ bool ErrorOnBadTypeEnabled() {
+ return FLAG_error_on_bad_type || strict_compilation_;
+ }
+ bool ErrorOnBadOverrideEnabled() {
+ return FLAG_error_on_bad_override || strict_compilation_;
+ }
+
// Requests that the debugger resume execution.
void Resume() {
resume_request_ = true;
@@ -649,6 +672,8 @@
Debugger* debugger_;
bool single_step_;
bool resume_request_;
+ bool has_compiled_;
+ bool strict_compilation_;
Random random_;
Simulator* simulator_;
LongJumpScope* long_jump_base_;
« 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