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

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

Issue 14942010: Eliminate temporary locals for some expressions (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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
« no previous file with comments | « runtime/vm/flow_graph_compiler.cc ('k') | runtime/vm/flow_graph_type_propagator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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_optimizer.h" 5 #include "vm/flow_graph_optimizer.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/cha.h" 8 #include "vm/cha.h"
9 #include "vm/flow_graph_builder.h" 9 #include "vm/flow_graph_builder.h"
10 #include "vm/flow_graph_compiler.h" 10 #include "vm/flow_graph_compiler.h"
(...skipping 5043 matching lines...) Expand 10 before | Expand all | Expand 10 after
5054 SetValue(instr, non_constant_); 5054 SetValue(instr, non_constant_);
5055 } 5055 }
5056 5056
5057 5057
5058 void ConstantPropagator::VisitLoadLocal(LoadLocalInstr* instr) { 5058 void ConstantPropagator::VisitLoadLocal(LoadLocalInstr* instr) {
5059 // Instruction is eliminated when translating to SSA. 5059 // Instruction is eliminated when translating to SSA.
5060 UNREACHABLE(); 5060 UNREACHABLE();
5061 } 5061 }
5062 5062
5063 5063
5064 void ConstantPropagator::VisitPushTemp(PushTempInstr* instr) {
5065 // Instruction is eliminated when translating to SSA.
5066 UNREACHABLE();
5067 }
5068
5069
5070 void ConstantPropagator::VisitDropTemps(DropTempsInstr* instr) {
5071 // Instruction is eliminated when translating to SSA.
5072 UNREACHABLE();
5073 }
5074
5075
5064 void ConstantPropagator::VisitStoreLocal(StoreLocalInstr* instr) { 5076 void ConstantPropagator::VisitStoreLocal(StoreLocalInstr* instr) {
5065 // Instruction is eliminated when translating to SSA. 5077 // Instruction is eliminated when translating to SSA.
5066 UNREACHABLE(); 5078 UNREACHABLE();
5067 } 5079 }
5068 5080
5069 5081
5070 void ConstantPropagator::VisitIfThenElse(IfThenElseInstr* instr) { 5082 void ConstantPropagator::VisitIfThenElse(IfThenElseInstr* instr) {
5071 ASSERT(Token::IsEqualityOperator(instr->kind())); 5083 ASSERT(Token::IsEqualityOperator(instr->kind()));
5072 5084
5073 const Object& left = instr->left()->definition()->constant_value(); 5085 const Object& left = instr->left()->definition()->constant_value();
(...skipping 1461 matching lines...) Expand 10 before | Expand all | Expand 10 after
6535 6547
6536 // Insert materializations at environment uses. 6548 // Insert materializations at environment uses.
6537 const Class& cls = Class::Handle(alloc->constructor().Owner()); 6549 const Class& cls = Class::Handle(alloc->constructor().Owner());
6538 for (intptr_t i = 0; i < exits.length(); i++) { 6550 for (intptr_t i = 0; i < exits.length(); i++) {
6539 CreateMaterializationAt(exits[i], alloc, cls, *fields); 6551 CreateMaterializationAt(exits[i], alloc, cls, *fields);
6540 } 6552 }
6541 } 6553 }
6542 6554
6543 6555
6544 } // namespace dart 6556 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler.cc ('k') | runtime/vm/flow_graph_type_propagator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698