| OLD | NEW |
| 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 1640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1651 | 1651 |
| 1652 bool HasUses() const { | 1652 bool HasUses() const { |
| 1653 return (input_use_list_ != NULL) || (env_use_list_ != NULL); | 1653 return (input_use_list_ != NULL) || (env_use_list_ != NULL); |
| 1654 } | 1654 } |
| 1655 bool HasOnlyUse(Value* use) const; | 1655 bool HasOnlyUse(Value* use) const; |
| 1656 bool HasOnlyInputUse(Value* use) const; | 1656 bool HasOnlyInputUse(Value* use) const; |
| 1657 | 1657 |
| 1658 | 1658 |
| 1659 Value* input_use_list() const { return input_use_list_; } | 1659 Value* input_use_list() const { return input_use_list_; } |
| 1660 void set_input_use_list(Value* head) { input_use_list_ = head; } | 1660 void set_input_use_list(Value* head) { input_use_list_ = head; } |
| 1661 intptr_t InputUseListLength() const { | |
| 1662 intptr_t length = 0; | |
| 1663 Value* use = input_use_list_; | |
| 1664 while (use != NULL) { | |
| 1665 length++; | |
| 1666 use = use->next_use(); | |
| 1667 } | |
| 1668 return length; | |
| 1669 } | |
| 1670 | 1661 |
| 1671 Value* env_use_list() const { return env_use_list_; } | 1662 Value* env_use_list() const { return env_use_list_; } |
| 1672 void set_env_use_list(Value* head) { env_use_list_ = head; } | 1663 void set_env_use_list(Value* head) { env_use_list_ = head; } |
| 1673 | 1664 |
| 1674 void AddInputUse(Value* value) { Value::AddToList(value, &input_use_list_); } | 1665 void AddInputUse(Value* value) { Value::AddToList(value, &input_use_list_); } |
| 1675 void AddEnvUse(Value* value) { Value::AddToList(value, &env_use_list_); } | 1666 void AddEnvUse(Value* value) { Value::AddToList(value, &env_use_list_); } |
| 1676 | 1667 |
| 1677 // Replace uses of this definition with uses of other definition or value. | 1668 // Replace uses of this definition with uses of other definition or value. |
| 1678 // Precondition: use lists must be properly calculated. | 1669 // Precondition: use lists must be properly calculated. |
| 1679 // Postcondition: use lists and use values are still valid. | 1670 // Postcondition: use lists and use values are still valid. |
| (...skipping 6060 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7740 Isolate* isolate, bool opt) const { \ | 7731 Isolate* isolate, bool opt) const { \ |
| 7741 UNIMPLEMENTED(); \ | 7732 UNIMPLEMENTED(); \ |
| 7742 return NULL; \ | 7733 return NULL; \ |
| 7743 } \ | 7734 } \ |
| 7744 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } | 7735 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } |
| 7745 | 7736 |
| 7746 | 7737 |
| 7747 } // namespace dart | 7738 } // namespace dart |
| 7748 | 7739 |
| 7749 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 7740 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |