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

Unified Diff: runtime/vm/flow_graph_optimizer.cc

Issue 1683363002: Remove support for Javascript warnings in the VM. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: address comment 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 c93a8d67f908c10309915090730c4c594d37dbb9..36a16907f2a9f3e54181698714e4922faf2dab44 100644
--- a/runtime/vm/flow_graph_optimizer.cc
+++ b/runtime/vm/flow_graph_optimizer.cc
@@ -51,7 +51,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())
@@ -170,14 +169,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++) {
@@ -4018,15 +4009,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 =
@@ -4108,15 +4090,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