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

Unified Diff: runtime/vm/flow_graph_compiler.cc

Issue 260713008: Add support for javascript incompatibility warnings. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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
Index: runtime/vm/flow_graph_compiler.cc
===================================================================
--- runtime/vm/flow_graph_compiler.cc (revision 36000)
+++ runtime/vm/flow_graph_compiler.cc (working copy)
@@ -10,6 +10,7 @@
#include "vm/dart_entry.h"
#include "vm/debugger.h"
#include "vm/deopt_instructions.h"
+#include "vm/exceptions.h"
#include "vm/flow_graph_allocator.h"
#include "vm/il_printer.h"
#include "vm/intrinsifier.h"
@@ -37,6 +38,7 @@
DECLARE_FLAG(charp, stacktrace_filter);
DECLARE_FLAG(int, deoptimize_every);
DECLARE_FLAG(charp, deoptimize_filter);
+DECLARE_FLAG(bool, warn_on_javascript_compatibility);
DEFINE_FLAG(bool, enable_simd_inline, true,
"Enable inlining of SIMD related method calls.");
@@ -338,12 +340,13 @@
LanguageError::NewFormatted(Error::Handle(), // No previous error.
Script::Handle(function.script()),
function.token_pos(),
- LanguageError::kError,
+ LanguageError::kBailout,
Heap::kNew,
"FlowGraphCompiler Bailout: %s %s",
String::Handle(function.name()).ToCString(),
reason));
Isolate::Current()->long_jump_base()->Jump(1, error);
+ UNREACHABLE();
}
@@ -828,7 +831,12 @@
return;
}
- if (is_optimizing()) {
+ if (is_optimizing() &&
+ // 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 JS
+ // warning has already been issued or not.
+ (!FLAG_warn_on_javascript_compatibility ||
+ !ic_data.MayCheckForJSWarning())) {
EmitMegamorphicInstanceCall(ic_data, argument_count,
deopt_id, token_pos, locs);
return;

Powered by Google App Engine
This is Rietveld 408576698