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

Side by Side Diff: runtime/vm/intermediate_language.h

Issue 12313033: Revert "Change the SSA construction pass to also construct def-use chains." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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_optimizer.cc ('k') | no next file » | 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 #ifndef VM_INTERMEDIATE_LANGUAGE_H_ 5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_
6 #define VM_INTERMEDIATE_LANGUAGE_H_ 6 #define VM_INTERMEDIATE_LANGUAGE_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/ast.h" 9 #include "vm/ast.h"
10 #include "vm/growable_array.h" 10 #include "vm/growable_array.h"
(...skipping 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after
1107 intptr_t phi_count_; 1107 intptr_t phi_count_;
1108 1108
1109 DISALLOW_COPY_AND_ASSIGN(JoinEntryInstr); 1109 DISALLOW_COPY_AND_ASSIGN(JoinEntryInstr);
1110 }; 1110 };
1111 1111
1112 1112
1113 class PhiIterator : public ValueObject { 1113 class PhiIterator : public ValueObject {
1114 public: 1114 public:
1115 explicit PhiIterator(JoinEntryInstr* join) 1115 explicit PhiIterator(JoinEntryInstr* join)
1116 : phis_(join->phis()), index_(-1) { 1116 : phis_(join->phis()), index_(-1) {
1117 if (!Done()) Advance(); // Advance to the first phi. 1117 if (!Done()) Advance(); // Advance to the first smi.
1118 } 1118 }
1119 1119
1120 void Advance() { 1120 void Advance() {
1121 ASSERT(!Done()); 1121 ASSERT(!Done());
1122 do { 1122 do {
1123 index_++; 1123 index_++;
1124 } while (!Done() && (Current() == NULL)); 1124 } while (!Done() && (Current() == NULL));
1125 } 1125 }
1126 1126
1127 bool Done() const { 1127 bool Done() const {
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
1355 1355
1356 void SetInputAt(intptr_t i, Value* value) { inputs_[i] = value; } 1356 void SetInputAt(intptr_t i, Value* value) { inputs_[i] = value; }
1357 1357
1358 virtual bool CanDeoptimize() const { return false; } 1358 virtual bool CanDeoptimize() const { return false; }
1359 1359
1360 virtual bool HasSideEffect() const { return false; } 1360 virtual bool HasSideEffect() const { return false; }
1361 1361
1362 // Phi is alive if it reaches a non-environment use. 1362 // Phi is alive if it reaches a non-environment use.
1363 bool is_alive() const { return is_alive_; } 1363 bool is_alive() const { return is_alive_; }
1364 void mark_alive() { is_alive_ = true; } 1364 void mark_alive() { is_alive_ = true; }
1365 void mark_dead() { is_alive_ = false; }
1365 1366
1366 virtual Representation RequiredInputRepresentation(intptr_t i) const { 1367 virtual Representation RequiredInputRepresentation(intptr_t i) const {
1367 return representation_; 1368 return representation_;
1368 } 1369 }
1369 1370
1370 virtual Representation representation() const { 1371 virtual Representation representation() const {
1371 return representation_; 1372 return representation_;
1372 } 1373 }
1373 1374
1374 virtual void set_representation(Representation r) { 1375 virtual void set_representation(Representation r) {
(...skipping 3098 matching lines...) Expand 10 before | Expand all | Expand 10 after
4473 ForwardInstructionIterator* current_iterator_; 4474 ForwardInstructionIterator* current_iterator_;
4474 4475
4475 private: 4476 private:
4476 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 4477 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
4477 }; 4478 };
4478 4479
4479 4480
4480 } // namespace dart 4481 } // namespace dart
4481 4482
4482 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 4483 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698