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

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

Issue 12079096: Make use lists into doubly-linked lists. (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') | 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) 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 static Kind RecognizeKind(const Function& function); 67 static Kind RecognizeKind(const Function& function);
68 static const char* KindToCString(Kind kind); 68 static const char* KindToCString(Kind kind);
69 }; 69 };
70 70
71 71
72 class Value : public ZoneAllocated { 72 class Value : public ZoneAllocated {
73 public: 73 public:
74 explicit Value(Definition* definition) 74 explicit Value(Definition* definition)
75 : definition_(definition), 75 : definition_(definition),
76 previous_use_(NULL),
76 next_use_(NULL), 77 next_use_(NULL),
77 instruction_(NULL), 78 instruction_(NULL),
78 use_index_(-1), 79 use_index_(-1),
79 reaching_cid_(kIllegalCid) { } 80 reaching_cid_(kIllegalCid) { }
80 81
81 Definition* definition() const { return definition_; } 82 Definition* definition() const { return definition_; }
82 void set_definition(Definition* definition) { definition_ = definition; } 83 void set_definition(Definition* definition) { definition_ = definition; }
83 84
85 Value* previous_use() const { return previous_use_; }
86 void set_previous_use(Value* previous) { previous_use_ = previous; }
87
84 Value* next_use() const { return next_use_; } 88 Value* next_use() const { return next_use_; }
85 void set_next_use(Value* next) { next_use_ = next; } 89 void set_next_use(Value* next) { next_use_ = next; }
86 90
87 Instruction* instruction() const { return instruction_; } 91 Instruction* instruction() const { return instruction_; }
88 void set_instruction(Instruction* instruction) { instruction_ = instruction; } 92 void set_instruction(Instruction* instruction) { instruction_ = instruction; }
89 93
90 intptr_t use_index() const { return use_index_; } 94 intptr_t use_index() const { return use_index_; }
91 void set_use_index(intptr_t index) { use_index_ = index; } 95 void set_use_index(intptr_t index) { use_index_ = index; }
92 96
93 void AddToInputUseList(); 97 void AddToInputUseList();
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 // the store buffer. 130 // the store buffer.
127 bool NeedsStoreBuffer() const; 131 bool NeedsStoreBuffer() const;
128 132
129 bool Equals(Value* other) const; 133 bool Equals(Value* other) const;
130 134
131 void set_reaching_cid(intptr_t cid) { reaching_cid_ = cid; } 135 void set_reaching_cid(intptr_t cid) { reaching_cid_ = cid; }
132 intptr_t reaching_cid() const { return reaching_cid_; } 136 intptr_t reaching_cid() const { return reaching_cid_; }
133 137
134 private: 138 private:
135 Definition* definition_; 139 Definition* definition_;
140 Value* previous_use_;
136 Value* next_use_; 141 Value* next_use_;
137 Instruction* instruction_; 142 Instruction* instruction_;
138 intptr_t use_index_; 143 intptr_t use_index_;
139 144
140 intptr_t reaching_cid_; 145 intptr_t reaching_cid_;
141 146
142 DISALLOW_COPY_AND_ASSIGN(Value); 147 DISALLOW_COPY_AND_ASSIGN(Value);
143 }; 148 };
144 149
145 150
(...skipping 4319 matching lines...) Expand 10 before | Expand all | Expand 10 after
4465 ForwardInstructionIterator* current_iterator_; 4470 ForwardInstructionIterator* current_iterator_;
4466 4471
4467 private: 4472 private:
4468 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 4473 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
4469 }; 4474 };
4470 4475
4471 4476
4472 } // namespace dart 4477 } // namespace dart
4473 4478
4474 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 4479 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698