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

Unified Diff: runtime/vm/object.cc

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/isolate.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 43472)
+++ runtime/vm/object.cc (working copy)
@@ -5870,7 +5870,7 @@
bool Function::HasCompatibleParametersWith(const Function& other,
Error* bound_error) const {
- ASSERT(FLAG_error_on_bad_override);
+ ASSERT(Isolate::Current()->ErrorOnBadOverrideEnabled());
ASSERT((bound_error != NULL) && bound_error->IsNull());
// Check that this function's signature type is a subtype of the other
// function's signature type.
@@ -13559,7 +13559,7 @@
const AbstractType& instantiated_other = AbstractType::Handle(
isolate, other.InstantiateFrom(other_instantiator, bound_error));
if ((bound_error != NULL) && !bound_error->IsNull()) {
- ASSERT(FLAG_enable_type_checks);
+ ASSERT(Isolate::Current()->TypeChecksEnabled());
return false;
}
other_class = instantiated_other.type_class();
@@ -14228,7 +14228,7 @@
// type and/or malbounded parameter types, which will then be encountered here
// at run time.
if (IsMalbounded()) {
- ASSERT(FLAG_enable_type_checks);
+ ASSERT(Isolate::Current()->TypeChecksEnabled());
if ((bound_error != NULL) && bound_error->IsNull()) {
*bound_error = error();
}
@@ -14235,7 +14235,7 @@
return false;
}
if (other.IsMalbounded()) {
- ASSERT(FLAG_enable_type_checks);
+ ASSERT(Isolate::Current()->TypeChecksEnabled());
if ((bound_error != NULL) && bound_error->IsNull()) {
*bound_error = other.error();
}
@@ -14442,7 +14442,7 @@
bool Type::IsMalbounded() const {
- if (!FLAG_enable_type_checks) {
+ if (!Isolate::Current()->TypeChecksEnabled()) {
return false;
}
if (raw_ptr()->error_ == LanguageError::null()) {
@@ -14462,7 +14462,7 @@
return true;
}
ASSERT(type_error.kind() == Report::kMalboundedType);
- return FLAG_enable_type_checks;
+ return Isolate::Current()->TypeChecksEnabled();
}
@@ -15439,7 +15439,7 @@
bound_error,
trail);
}
- if (FLAG_enable_type_checks &&
+ if ((Isolate::Current()->TypeChecksEnabled()) &&
(bound_error != NULL) && bound_error->IsNull()) {
AbstractType& upper_bound = AbstractType::Handle(bound());
ASSERT(!upper_bound.IsObjectType() && !upper_bound.IsDynamicType());
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698