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

Unified Diff: runtime/vm/class_finalizer.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/ast.cc ('k') | runtime/vm/code_generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/class_finalizer.cc
===================================================================
--- runtime/vm/class_finalizer.cc (revision 43472)
+++ runtime/vm/class_finalizer.cc (working copy)
@@ -25,6 +25,7 @@
DECLARE_FLAG(bool, enable_type_checks);
DECLARE_FLAG(bool, use_cha);
+
bool ClassFinalizer::AllClassesFinalized() {
ObjectStore* object_store = Isolate::Current()->object_store();
const GrowableObjectArray& classes =
@@ -373,7 +374,7 @@
return;
}
- if (FLAG_error_on_bad_override) {
+ if (Isolate::Current()->ErrorOnBadOverrideEnabled()) {
// Verify that the target is compatible with the redirecting factory.
Error& error = Error::Handle();
if (!target.HasCompatibleParametersWith(factory, &error)) {
@@ -983,7 +984,7 @@
TypeArguments::Handle(isolate, parameterized_type.arguments());
if (!arguments.IsNull() && (arguments.Length() != num_type_parameters)) {
// Wrong number of type arguments. The type is mapped to the raw type.
- if (FLAG_error_on_bad_type) {
+ if (Isolate::Current()->ErrorOnBadTypeEnabled()) {
const String& type_class_name =
String::Handle(isolate, type_class.Name());
ReportError(cls, parameterized_type.token_pos(),
@@ -1354,7 +1355,7 @@
!const_value.IsInstanceOf(type,
Object::null_type_arguments(),
&error))) {
- if (FLAG_error_on_bad_type) {
+ if (Isolate::Current()->ErrorOnBadTypeEnabled()) {
const AbstractType& const_value_type = AbstractType::Handle(
I, const_value.GetType());
const String& const_value_type_name = String::Handle(
@@ -1417,7 +1418,8 @@
function ^= array.At(i);
ResolveAndFinalizeSignature(cls, function);
name = function.name();
- if (FLAG_error_on_bad_override && // Report signature conflicts only.
+ // Report signature conflicts only.
+ if (Isolate::Current()->ErrorOnBadOverrideEnabled() &&
!function.is_static() && !function.IsConstructor()) {
// A constructor cannot override anything.
for (intptr_t i = 0; i < interfaces.Length(); i++) {
@@ -2565,7 +2567,7 @@
}
return;
}
- if (FLAG_error_on_bad_type) {
+ if (Isolate::Current()->ErrorOnBadTypeEnabled()) {
const String& type_class_name = String::Handle(type_class.Name());
ReportError(cls, type.token_pos(),
"wrong number of type arguments for class '%s'",
@@ -2988,7 +2990,7 @@
prev_error, script, type.token_pos(),
Report::kMalformedType, Heap::kOld,
format, args));
- if (FLAG_error_on_bad_type) {
+ if (Isolate::Current()->ErrorOnBadTypeEnabled()) {
ReportError(error);
}
type.set_error(error);
@@ -3050,7 +3052,7 @@
Report::kMalboundedType, Heap::kOld,
format, args));
va_end(args);
- if (FLAG_error_on_bad_type) {
+ if (Isolate::Current()->ErrorOnBadTypeEnabled()) {
ReportError(error);
}
type.set_error(error);
« no previous file with comments | « runtime/vm/ast.cc ('k') | runtime/vm/code_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698