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

Unified Diff: runtime/vm/flow_graph_type_propagator.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/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_type_propagator.cc
===================================================================
--- runtime/vm/flow_graph_type_propagator.cc (revision 43472)
+++ runtime/vm/flow_graph_type_propagator.cc (working copy)
@@ -39,7 +39,7 @@
types_.Add(NULL);
}
- if (FLAG_enable_type_checks) {
+ if (Isolate::Current()->TypeChecksEnabled()) {
asserts_ = new ZoneGrowableArray<AssertAssignableInstr*>(
flow_graph->current_ssa_temp_index());
for (intptr_t i = 0; i < flow_graph->current_ssa_temp_index(); i++) {
@@ -121,7 +121,7 @@
const intptr_t rollback_point = rollback_.length();
- if (FLAG_enable_type_checks) {
+ if (Isolate::Current()->TypeChecksEnabled()) {
StrengthenAsserts(block);
}
@@ -895,7 +895,7 @@
return CompileType::FromCid(result_cid_);
}
- if (FLAG_enable_type_checks) {
+ if (Isolate::Current()->TypeChecksEnabled()) {
// Void functions are known to return null, which is checked at the return
// from the function.
const AbstractType& result_type =
@@ -910,7 +910,7 @@
CompileType LoadLocalInstr::ComputeType() const {
- if (FLAG_enable_type_checks) {
+ if (Isolate::Current()->TypeChecksEnabled()) {
return CompileType::FromAbstractType(local().type());
}
return CompileType::Dynamic();
@@ -954,7 +954,7 @@
intptr_t cid = kDynamicCid;
AbstractType* abstract_type = NULL;
const Field& field = this->StaticField();
- if (FLAG_enable_type_checks) {
+ if (Isolate::Current()->TypeChecksEnabled()) {
cid = kIllegalCid;
abstract_type = &AbstractType::ZoneHandle(field.type());
}
@@ -1009,7 +1009,7 @@
}
const AbstractType* abstract_type = NULL;
- if (FLAG_enable_type_checks) {
+ if (Isolate::Current()->TypeChecksEnabled()) {
ASSERT(!type().HasResolvedTypeClass() ||
!Field::IsExternalizableCid(Class::Handle(
type().type_class()).id()));
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698