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

Unified Diff: runtime/vm/compiler.cc

Issue 15904010: Fix issue 3874: non-deterministic AST generation caused by exceptions being thrown during parsing (… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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
« no previous file with comments | « no previous file | runtime/vm/flow_graph_inliner.cc » ('j') | runtime/vm/parser.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler.cc
===================================================================
--- runtime/vm/compiler.cc (revision 23328)
+++ runtime/vm/compiler.cc (working copy)
@@ -242,6 +242,9 @@
// Return false if bailed out.
static bool CompileParsedFunctionHelper(const ParsedFunction& parsed_function,
bool optimized) {
+ if (optimized && !parsed_function.function().is_optimizable()) {
+ return false;
+ }
TimerScope timer(FLAG_compiler_stats, &CompilerStats::codegen_timer);
bool is_compiled = false;
Isolate* isolate = Isolate::Current();
@@ -281,6 +284,11 @@
flow_graph = builder.BuildGraph();
}
+ if (FLAG_print_flow_graph ||
+ (optimized && FLAG_print_flow_graph_optimized)) {
+ FlowGraphPrinter::PrintGraph("Before Optimizations", flow_graph);
+ }
+
if (optimized) {
TimerScope timer(FLAG_compiler_stats,
&CompilerStats::ssa_timer,
@@ -288,12 +296,11 @@
// Transform to SSA (virtual register 0 and no inlining arguments).
flow_graph->ComputeSSA(0, NULL);
DEBUG_ASSERT(flow_graph->VerifyUseLists());
+ if (FLAG_print_flow_graph || FLAG_print_flow_graph_optimized) {
+ FlowGraphPrinter::PrintGraph("After SSA", flow_graph);
+ }
}
- if (FLAG_print_flow_graph ||
- (optimized && FLAG_print_flow_graph_optimized)) {
- FlowGraphPrinter::PrintGraph("Before Optimizations", flow_graph);
- }
// Collect all instance fields that are loaded in the graph and
// have non-generic type feedback attached to them that can
« no previous file with comments | « no previous file | runtime/vm/flow_graph_inliner.cc » ('j') | runtime/vm/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698