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

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

Issue 10809047: Cleanups. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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_builder.cc ('k') | runtime/vm/intermediate_language.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) 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 #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 2017 matching lines...) Expand 10 before | Expand all | Expand 10 after
2028 DECLARE_INSTRUCTION(JoinEntry) 2028 DECLARE_INSTRUCTION(JoinEntry)
2029 2029
2030 virtual intptr_t PredecessorCount() const { return predecessors_.length(); } 2030 virtual intptr_t PredecessorCount() const { return predecessors_.length(); }
2031 virtual BlockEntryInstr* PredecessorAt(intptr_t index) const { 2031 virtual BlockEntryInstr* PredecessorAt(intptr_t index) const {
2032 return predecessors_[index]; 2032 return predecessors_[index];
2033 } 2033 }
2034 virtual void AddPredecessor(BlockEntryInstr* predecessor) { 2034 virtual void AddPredecessor(BlockEntryInstr* predecessor) {
2035 predecessors_.Add(predecessor); 2035 predecessors_.Add(predecessor);
2036 } 2036 }
2037 2037
2038 // Returns -1 if pred is not in the list.
2039 intptr_t IndexOfPredecessor(BlockEntryInstr* pred) const;
2040
2038 ZoneGrowableArray<PhiInstr*>* phis() const { return phis_; } 2041 ZoneGrowableArray<PhiInstr*>* phis() const { return phis_; }
2039 2042
2040 virtual void PrepareEntry(FlowGraphCompiler* compiler); 2043 virtual void PrepareEntry(FlowGraphCompiler* compiler);
2041 2044
2042 void InsertPhi(intptr_t var_index, intptr_t var_count); 2045 void InsertPhi(intptr_t var_index, intptr_t var_count);
2043 2046
2044 intptr_t phi_count() const { return phi_count_; } 2047 intptr_t phi_count() const { return phi_count_; }
2045 2048
2046 private: 2049 private:
2047 ZoneGrowableArray<BlockEntryInstr*> predecessors_; 2050 GrowableArray<BlockEntryInstr*> predecessors_;
2048 ZoneGrowableArray<PhiInstr*>* phis_; 2051 ZoneGrowableArray<PhiInstr*>* phis_;
2049 intptr_t phi_count_; 2052 intptr_t phi_count_;
2050 2053
2051 DISALLOW_COPY_AND_ASSIGN(JoinEntryInstr); 2054 DISALLOW_COPY_AND_ASSIGN(JoinEntryInstr);
2052 }; 2055 };
2053 2056
2054 2057
2055 class TargetEntryInstr : public BlockEntryInstr { 2058 class TargetEntryInstr : public BlockEntryInstr {
2056 public: 2059 public:
2057 TargetEntryInstr() 2060 TargetEntryInstr()
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
2526 const GrowableArray<BlockEntryInstr*>& block_order_; 2529 const GrowableArray<BlockEntryInstr*>& block_order_;
2527 2530
2528 private: 2531 private:
2529 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 2532 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
2530 }; 2533 };
2531 2534
2532 2535
2533 } // namespace dart 2536 } // namespace dart
2534 2537
2535 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 2538 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698