| 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" |
| 11 #include "vm/handles_impl.h" | 11 #include "vm/handles_impl.h" |
| 12 #include "vm/locations.h" | 12 #include "vm/locations.h" |
| 13 #include "vm/object.h" | 13 #include "vm/object.h" |
| 14 | 14 |
| 15 namespace dart { | 15 namespace dart { |
| 16 | 16 |
| 17 // TODO(srdjan): Add _ByteArrayBase, get:length. | 17 // TODO(srdjan): Add _ByteArrayBase, get:length. |
| 18 | 18 |
| 19 #define RECOGNIZED_LIST(V) \ | 19 #define RECOGNIZED_LIST(V) \ |
| 20 V(ObjectArray, get:length, ObjectArrayLength) \ | 20 V(ObjectArray, get:length, ObjectArrayLength) \ |
| 21 V(ImmutableArray, get:length, ImmutableArrayLength) \ | 21 V(ImmutableArray, get:length, ImmutableArrayLength) \ |
| 22 V(GrowableObjectArray, get:length, GrowableArrayLength) \ | 22 V(GrowableObjectArray, get:length, GrowableArrayLength) \ |
| 23 V(StringBase, get:length, StringBaseLength) \ | 23 V(StringBase, get:length, StringBaseLength) \ |
| 24 V(IntegerImplementation, toDouble, IntegerToDouble) \ | 24 V(IntegerImplementation, toDouble, IntegerToDouble) \ |
| 25 V(Double, toDouble, DoubleToDouble) \ | 25 V(Double, toDouble, DoubleToDouble) \ |
| 26 V(Math, sqrt, MathSqrt) \ | 26 V(::, sqrt, MathSqrt) \ |
| 27 | 27 |
| 28 // Class that recognizes the name and owner of a function and returns the | 28 // Class that recognizes the name and owner of a function and returns the |
| 29 // corresponding enum. See RECOGNIZED_LIST above for list of recognizable | 29 // corresponding enum. See RECOGNIZED_LIST above for list of recognizable |
| 30 // functions. | 30 // functions. |
| 31 class MethodRecognizer : public AllStatic { | 31 class MethodRecognizer : public AllStatic { |
| 32 public: | 32 public: |
| 33 enum Kind { | 33 enum Kind { |
| 34 kUnknown, | 34 kUnknown, |
| 35 #define DEFINE_ENUM_LIST(class_name, function_name, enum_name) k##enum_name, | 35 #define DEFINE_ENUM_LIST(class_name, function_name, enum_name) k##enum_name, |
| 36 RECOGNIZED_LIST(DEFINE_ENUM_LIST) | 36 RECOGNIZED_LIST(DEFINE_ENUM_LIST) |
| (...skipping 3072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3109 ForwardInstructionIterator* current_iterator_; | 3109 ForwardInstructionIterator* current_iterator_; |
| 3110 | 3110 |
| 3111 private: | 3111 private: |
| 3112 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); | 3112 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); |
| 3113 }; | 3113 }; |
| 3114 | 3114 |
| 3115 | 3115 |
| 3116 } // namespace dart | 3116 } // namespace dart |
| 3117 | 3117 |
| 3118 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 3118 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |