| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_DEOPTIMIZER_H_ | 5 #ifndef V8_DEOPTIMIZER_H_ |
| 6 #define V8_DEOPTIMIZER_H_ | 6 #define V8_DEOPTIMIZER_H_ |
| 7 | 7 |
| 8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/macro-assembler.h" | 9 #include "src/macro-assembler.h" |
| 10 | 10 |
| (...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 946 | 946 |
| 947 void Skip(int n) { | 947 void Skip(int n) { |
| 948 for (int i = 0; i < n; i++) Next(); | 948 for (int i = 0; i < n; i++) Next(); |
| 949 } | 949 } |
| 950 | 950 |
| 951 private: | 951 private: |
| 952 ByteArray* buffer_; | 952 ByteArray* buffer_; |
| 953 int index_; | 953 int index_; |
| 954 }; | 954 }; |
| 955 | 955 |
| 956 | |
| 957 #define TRANSLATION_OPCODE_LIST(V) \ | 956 #define TRANSLATION_OPCODE_LIST(V) \ |
| 958 V(BEGIN) \ | 957 V(BEGIN) \ |
| 959 V(JS_FRAME) \ | 958 V(JS_FRAME) \ |
| 960 V(INTERPRETED_FRAME) \ | 959 V(INTERPRETED_FRAME) \ |
| 961 V(CONSTRUCT_STUB_FRAME) \ | 960 V(CONSTRUCT_STUB_FRAME) \ |
| 962 V(GETTER_STUB_FRAME) \ | 961 V(GETTER_STUB_FRAME) \ |
| 963 V(SETTER_STUB_FRAME) \ | 962 V(SETTER_STUB_FRAME) \ |
| 964 V(ARGUMENTS_ADAPTOR_FRAME) \ | 963 V(ARGUMENTS_ADAPTOR_FRAME) \ |
| 965 V(COMPILED_STUB_FRAME) \ | 964 V(COMPILED_STUB_FRAME) \ |
| 966 V(DUPLICATED_OBJECT) \ | 965 V(DUPLICATED_OBJECT) \ |
| 967 V(ARGUMENTS_OBJECT) \ | 966 V(ARGUMENTS_OBJECT) \ |
| 968 V(CAPTURED_OBJECT) \ | 967 V(CAPTURED_OBJECT) \ |
| 969 V(REGISTER) \ | 968 V(REGISTER) \ |
| 970 V(INT32_REGISTER) \ | 969 V(INT32_REGISTER) \ |
| 971 V(UINT32_REGISTER) \ | 970 V(UINT32_REGISTER) \ |
| 972 V(BOOL_REGISTER) \ | 971 V(BOOL_REGISTER) \ |
| 973 V(DOUBLE_REGISTER) \ | 972 V(DOUBLE_REGISTER) \ |
| 974 V(STACK_SLOT) \ | 973 V(STACK_SLOT) \ |
| 975 V(INT32_STACK_SLOT) \ | 974 V(INT32_STACK_SLOT) \ |
| 976 V(UINT32_STACK_SLOT) \ | 975 V(UINT32_STACK_SLOT) \ |
| 977 V(BOOL_STACK_SLOT) \ | 976 V(BOOL_STACK_SLOT) \ |
| 978 V(DOUBLE_STACK_SLOT) \ | 977 V(DOUBLE_STACK_SLOT) \ |
| 979 V(LITERAL) \ | 978 V(LITERAL) |
| 980 V(JS_FRAME_FUNCTION) | |
| 981 | |
| 982 | 979 |
| 983 class Translation BASE_EMBEDDED { | 980 class Translation BASE_EMBEDDED { |
| 984 public: | 981 public: |
| 985 #define DECLARE_TRANSLATION_OPCODE_ENUM(item) item, | 982 #define DECLARE_TRANSLATION_OPCODE_ENUM(item) item, |
| 986 enum Opcode { | 983 enum Opcode { |
| 987 TRANSLATION_OPCODE_LIST(DECLARE_TRANSLATION_OPCODE_ENUM) | 984 TRANSLATION_OPCODE_LIST(DECLARE_TRANSLATION_OPCODE_ENUM) |
| 988 LAST = LITERAL | 985 LAST = LITERAL |
| 989 }; | 986 }; |
| 990 #undef DECLARE_TRANSLATION_OPCODE_ENUM | 987 #undef DECLARE_TRANSLATION_OPCODE_ENUM |
| 991 | 988 |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1138 Object** expression_stack_; | 1135 Object** expression_stack_; |
| 1139 int source_position_; | 1136 int source_position_; |
| 1140 | 1137 |
| 1141 friend class Deoptimizer; | 1138 friend class Deoptimizer; |
| 1142 }; | 1139 }; |
| 1143 | 1140 |
| 1144 } // namespace internal | 1141 } // namespace internal |
| 1145 } // namespace v8 | 1142 } // namespace v8 |
| 1146 | 1143 |
| 1147 #endif // V8_DEOPTIMIZER_H_ | 1144 #endif // V8_DEOPTIMIZER_H_ |
| OLD | NEW |