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

Side by Side Diff: runtime/vm/flow_graph_builder.cc

Issue 575443002: Refactor generating lazy deoptimization descriptors. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/flow_graph_builder.h" 5 #include "vm/flow_graph_builder.h"
6 6
7 #include "lib/invocation_mirror.h" 7 #include "lib/invocation_mirror.h"
8 #include "vm/ast_printer.h" 8 #include "vm/ast_printer.h"
9 #include "vm/bit_vector.h" 9 #include "vm/bit_vector.h"
10 #include "vm/class_finalizer.h" 10 #include "vm/class_finalizer.h"
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 if (block->IsTargetEntry()) { 292 if (block->IsTargetEntry()) {
293 block->AsTargetEntry()->adjust_edge_weight(scale_factor); 293 block->AsTargetEntry()->adjust_edge_weight(scale_factor);
294 } 294 }
295 Instruction* instr = block; 295 Instruction* instr = block;
296 for (ForwardInstructionIterator it(block); !it.Done(); it.Advance()) { 296 for (ForwardInstructionIterator it(block); !it.Done(); it.Advance()) {
297 instr = it.Current(); 297 instr = it.Current();
298 // TODO(zerny): Avoid creating unnecessary environments. Note that some 298 // TODO(zerny): Avoid creating unnecessary environments. Note that some
299 // optimizations need deoptimization info for non-deoptable instructions, 299 // optimizations need deoptimization info for non-deoptable instructions,
300 // eg, LICM on GOTOs. 300 // eg, LICM on GOTOs.
301 if (instr->env() != NULL) { 301 if (instr->env() != NULL) {
302 call_->env()->DeepCopyToOuter(callee_graph->isolate(), instr); 302 call_->env()->DeepCopyToOuter(
303 callee_graph->isolate(), instr, call_->InputCount());
303 } 304 }
304 } 305 }
305 if (instr->IsGoto()) { 306 if (instr->IsGoto()) {
306 instr->AsGoto()->adjust_edge_weight(scale_factor); 307 instr->AsGoto()->adjust_edge_weight(scale_factor);
307 } 308 }
308 } 309 }
309 } 310 }
310 311
311 312
312 void InlineExitCollector::AddExit(ReturnInstr* exit) { 313 void InlineExitCollector::AddExit(ReturnInstr* exit) {
(...skipping 3910 matching lines...) Expand 10 before | Expand all | Expand 10 after
4223 Report::MessageF(Report::kBailout, 4224 Report::MessageF(Report::kBailout,
4224 Script::Handle(function.script()), 4225 Script::Handle(function.script()),
4225 function.token_pos(), 4226 function.token_pos(),
4226 "FlowGraphBuilder Bailout: %s %s", 4227 "FlowGraphBuilder Bailout: %s %s",
4227 String::Handle(function.name()).ToCString(), 4228 String::Handle(function.name()).ToCString(),
4228 reason); 4229 reason);
4229 UNREACHABLE(); 4230 UNREACHABLE();
4230 } 4231 }
4231 4232
4232 } // namespace dart 4233 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698