Chromium Code Reviews| Index: runtime/vm/flow_graph_compiler.cc |
| =================================================================== |
| --- runtime/vm/flow_graph_compiler.cc (revision 35921) |
| +++ 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_incompatibility); |
| 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,9 @@ |
| return; |
| } |
| - if (is_optimizing()) { |
| + if (is_optimizing() && |
| + (!FLAG_warn_on_javascript_incompatibility || |
| + !Exceptions::MayIssueJSWarning(ic_data, false))) { |
|
srdjan
2014/05/08 18:11:05
Please add a brief comment why this is necessary.
regis
2014/05/09 21:03:42
Done.
|
| EmitMegamorphicInstanceCall(ic_data, argument_count, |
| deopt_id, token_pos, locs); |
| return; |