| OLD | NEW |
| 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 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1076 | 1076 |
| 1077 bool has_propagated_cid() const { return propagated_cid_ != kIllegalCid; } | 1077 bool has_propagated_cid() const { return propagated_cid_ != kIllegalCid; } |
| 1078 intptr_t propagated_cid() const { return propagated_cid_; } | 1078 intptr_t propagated_cid() const { return propagated_cid_; } |
| 1079 | 1079 |
| 1080 // May compute and set propagated cid. | 1080 // May compute and set propagated cid. |
| 1081 virtual intptr_t GetPropagatedCid(); | 1081 virtual intptr_t GetPropagatedCid(); |
| 1082 | 1082 |
| 1083 // Returns true if the propagated cid has changed. | 1083 // Returns true if the propagated cid has changed. |
| 1084 bool SetPropagatedCid(intptr_t cid); | 1084 bool SetPropagatedCid(intptr_t cid); |
| 1085 | 1085 |
| 1086 Value* input_use_list() { return input_use_list_; } | 1086 bool HasUses() const { |
| 1087 return (input_use_list_ != NULL) || (env_use_list_ != NULL); |
| 1088 } |
| 1089 |
| 1090 Value* input_use_list() const { return input_use_list_; } |
| 1087 void set_input_use_list(Value* head) { input_use_list_ = head; } | 1091 void set_input_use_list(Value* head) { input_use_list_ = head; } |
| 1088 | 1092 |
| 1089 Value* env_use_list() { return env_use_list_; } | 1093 Value* env_use_list() const { return env_use_list_; } |
| 1090 void set_env_use_list(Value* head) { env_use_list_ = head; } | 1094 void set_env_use_list(Value* head) { env_use_list_ = head; } |
| 1091 | 1095 |
| 1092 // Replace uses of this definition with uses of other definition or value. | 1096 // Replace uses of this definition with uses of other definition or value. |
| 1093 // Precondition: use lists must be properly calculated. | 1097 // Precondition: use lists must be properly calculated. |
| 1094 // Postcondition: use lists and use values are still valid. | 1098 // Postcondition: use lists and use values are still valid. |
| 1095 void ReplaceUsesWith(Definition* other); | 1099 void ReplaceUsesWith(Definition* other); |
| 1096 | 1100 |
| 1097 // Replace this definition and all uses with another definition. If | 1101 // Replace this definition and all uses with another definition. If |
| 1098 // replacing during iteration, pass the iterator so that the instruction | 1102 // replacing during iteration, pass the iterator so that the instruction |
| 1099 // can be replaced without affecting iteration order, otherwise pass a | 1103 // can be replaced without affecting iteration order, otherwise pass a |
| (...skipping 3236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4336 ForwardInstructionIterator* current_iterator_; | 4340 ForwardInstructionIterator* current_iterator_; |
| 4337 | 4341 |
| 4338 private: | 4342 private: |
| 4339 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); | 4343 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); |
| 4340 }; | 4344 }; |
| 4341 | 4345 |
| 4342 | 4346 |
| 4343 } // namespace dart | 4347 } // namespace dart |
| 4344 | 4348 |
| 4345 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 4349 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |