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

Unified Diff: runtime/vm/flow_graph_optimizer.cc

Issue 1690903003: Remove support for Javascript warnings in the VM. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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_compiler.cc ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_optimizer.cc
diff --git a/runtime/vm/flow_graph_optimizer.cc b/runtime/vm/flow_graph_optimizer.cc
index 460295d4b194459612c2a1f629a73605fd316e73..82541e0f72bfcb65ad6cad5626eb18fabdb3bb09 100644
--- a/runtime/vm/flow_graph_optimizer.cc
+++ b/runtime/vm/flow_graph_optimizer.cc
@@ -52,7 +52,6 @@ DECLARE_FLAG(bool, precompilation);
DECLARE_FLAG(bool, polymorphic_with_deopt);
DECLARE_FLAG(bool, trace_cha);
DECLARE_FLAG(bool, trace_field_guards);
-DECLARE_FLAG(bool, warn_on_javascript_compatibility);
// Quick access to the current isolate and zone.
#define I (isolate())
@@ -164,14 +163,6 @@ bool FlowGraphOptimizer::TryCreateICData(InstanceCallInstr* call) {
// to megamorphic call.
return false;
}
- if (FLAG_warn_on_javascript_compatibility) {
- // Do not make the instance call megamorphic if the callee needs to decode
- // the calling code sequence to lookup the ic data and verify if a warning
- // has already been issued or not.
- if (call->ic_data()->MayCheckForJSWarning()) {
- return false;
- }
- }
GrowableArray<intptr_t> class_ids(call->ic_data()->NumArgsTested());
ASSERT(call->ic_data()->NumArgsTested() <= call->ArgumentCount());
for (intptr_t i = 0; i < call->ic_data()->NumArgsTested(); i++) {
@@ -2980,15 +2971,6 @@ void FlowGraphOptimizer::ReplaceWithInstanceOf(InstanceCallInstr* call) {
}
const ICData& unary_checks =
ICData::ZoneHandle(Z, call->ic_data()->AsUnaryClassChecks());
- if (FLAG_warn_on_javascript_compatibility &&
- !unary_checks.IssuedJSWarning() &&
- (type.IsIntType() || type.IsDoubleType() || !type.IsInstantiated())) {
- // No warning was reported yet for this type check, either because it has
- // not been executed yet, or because no problematic combinations of instance
- // type and test type have been encountered so far. A warning may still be
- // reported, so do not replace the instance call.
- return;
- }
if ((unary_checks.NumberOfChecks() > 0) &&
(unary_checks.NumberOfChecks() <= FLAG_max_polymorphic_checks)) {
ZoneGrowableArray<intptr_t>* results =
@@ -3070,15 +3052,6 @@ void FlowGraphOptimizer::ReplaceWithTypeCast(InstanceCallInstr* call) {
ASSERT(!type.IsMalformedOrMalbounded());
const ICData& unary_checks =
ICData::ZoneHandle(Z, call->ic_data()->AsUnaryClassChecks());
- if (FLAG_warn_on_javascript_compatibility &&
- !unary_checks.IssuedJSWarning() &&
- (type.IsIntType() || type.IsDoubleType() || !type.IsInstantiated())) {
- // No warning was reported yet for this type check, either because it has
- // not been executed yet, or because no problematic combinations of instance
- // type and test type have been encountered so far. A warning may still be
- // reported, so do not replace the instance call.
- return;
- }
if ((unary_checks.NumberOfChecks() > 0) &&
(unary_checks.NumberOfChecks() <= FLAG_max_polymorphic_checks)) {
ZoneGrowableArray<intptr_t>* results =
« no previous file with comments | « runtime/vm/flow_graph_compiler.cc ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698