| 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 860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 871 // Not simply an InstanceCall because it has somewhat more complicated | 871 // Not simply an InstanceCall because it has somewhat more complicated |
| 872 // semantics: the value operand is preserved before the call. | 872 // semantics: the value operand is preserved before the call. |
| 873 class StoreIndexedComp : public TemplateComputation<3> { | 873 class StoreIndexedComp : public TemplateComputation<3> { |
| 874 public: | 874 public: |
| 875 StoreIndexedComp(intptr_t token_index, | 875 StoreIndexedComp(intptr_t token_index, |
| 876 intptr_t try_index, | 876 intptr_t try_index, |
| 877 Value* array, | 877 Value* array, |
| 878 Value* index, | 878 Value* index, |
| 879 Value* value) | 879 Value* value) |
| 880 : token_index_(token_index), | 880 : token_index_(token_index), |
| 881 try_index_(try_index) { | 881 try_index_(try_index), |
| 882 receiver_type_(kIllegalObjectKind) { |
| 882 inputs_[0] = array; | 883 inputs_[0] = array; |
| 883 inputs_[1] = index; | 884 inputs_[1] = index; |
| 884 inputs_[2] = value; | 885 inputs_[2] = value; |
| 885 } | 886 } |
| 886 | 887 |
| 887 DECLARE_COMPUTATION(StoreIndexed) | 888 DECLARE_COMPUTATION(StoreIndexed) |
| 888 | 889 |
| 889 intptr_t token_index() const { return token_index_; } | 890 intptr_t token_index() const { return token_index_; } |
| 890 intptr_t try_index() const { return try_index_; } | 891 intptr_t try_index() const { return try_index_; } |
| 891 Value* array() const { return inputs_[0]; } | 892 Value* array() const { return inputs_[0]; } |
| 892 Value* index() const { return inputs_[1]; } | 893 Value* index() const { return inputs_[1]; } |
| 893 Value* value() const { return inputs_[2]; } | 894 Value* value() const { return inputs_[2]; } |
| 894 | 895 |
| 896 void set_receiver_type(ObjectKind receiver_type) { |
| 897 receiver_type_ = receiver_type; |
| 898 } |
| 899 |
| 900 ObjectKind receiver_type() const { |
| 901 return receiver_type_; |
| 902 } |
| 903 |
| 895 private: | 904 private: |
| 896 const intptr_t token_index_; | 905 const intptr_t token_index_; |
| 897 const intptr_t try_index_; | 906 const intptr_t try_index_; |
| 907 ObjectKind receiver_type_; |
| 898 | 908 |
| 899 DISALLOW_COPY_AND_ASSIGN(StoreIndexedComp); | 909 DISALLOW_COPY_AND_ASSIGN(StoreIndexedComp); |
| 900 }; | 910 }; |
| 901 | 911 |
| 902 | 912 |
| 903 // Not simply an InstanceCall because it has somewhat more complicated | 913 // Not simply an InstanceCall because it has somewhat more complicated |
| 904 // semantics: the value operand is preserved before the call. | 914 // semantics: the value operand is preserved before the call. |
| 905 class InstanceSetterComp : public TemplateComputation<2> { | 915 class InstanceSetterComp : public TemplateComputation<2> { |
| 906 public: | 916 public: |
| 907 InstanceSetterComp(intptr_t token_index, | 917 InstanceSetterComp(intptr_t token_index, |
| (...skipping 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2160 const GrowableArray<BlockEntryInstr*>& block_order_; | 2170 const GrowableArray<BlockEntryInstr*>& block_order_; |
| 2161 | 2171 |
| 2162 private: | 2172 private: |
| 2163 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); | 2173 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); |
| 2164 }; | 2174 }; |
| 2165 | 2175 |
| 2166 | 2176 |
| 2167 } // namespace dart | 2177 } // namespace dart |
| 2168 | 2178 |
| 2169 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 2179 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |