summaryrefslogtreecommitdiff
path: root/deps/v8/src/deoptimizer/translation-opcode.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/deoptimizer/translation-opcode.h')
-rw-r--r--deps/v8/src/deoptimizer/translation-opcode.h24
1 files changed, 17 insertions, 7 deletions
diff --git a/deps/v8/src/deoptimizer/translation-opcode.h b/deps/v8/src/deoptimizer/translation-opcode.h
index 1f83738ec4..31e8e54203 100644
--- a/deps/v8/src/deoptimizer/translation-opcode.h
+++ b/deps/v8/src/deoptimizer/translation-opcode.h
@@ -14,7 +14,8 @@ namespace internal {
#define TRANSLATION_OPCODE_LIST(V) \
V(ARGUMENTS_ELEMENTS, 1) \
V(ARGUMENTS_LENGTH, 0) \
- V(BEGIN, 3) \
+ V(BEGIN_WITHOUT_FEEDBACK, 3) \
+ V(BEGIN_WITH_FEEDBACK, 3) \
V(BOOL_REGISTER, 1) \
V(BOOL_STACK_SLOT, 1) \
V(BUILTIN_CONTINUATION_FRAME, 3) \
@@ -34,7 +35,8 @@ namespace internal {
V(SIGNED_BIGINT64_STACK_SLOT, 1) \
V(UNSIGNED_BIGINT64_REGISTER, 1) \
V(UNSIGNED_BIGINT64_STACK_SLOT, 1) \
- V(INTERPRETED_FRAME, 5) \
+ V(INTERPRETED_FRAME_WITH_RETURN, 5) \
+ V(INTERPRETED_FRAME_WITHOUT_RETURN, 3) \
V(JAVA_SCRIPT_BUILTIN_CONTINUATION_FRAME, 3) \
V(JAVA_SCRIPT_BUILTIN_CONTINUATION_WITH_CATCH_FRAME, 3) \
IF_WASM(V, JS_TO_WASM_BUILTIN_CONTINUATION_FRAME, 4) \
@@ -44,7 +46,8 @@ namespace internal {
V(STACK_SLOT, 1) \
V(UINT32_REGISTER, 1) \
V(UINT32_STACK_SLOT, 1) \
- V(UPDATE_FEEDBACK, 2)
+ V(UPDATE_FEEDBACK, 2) \
+ V(MATCH_PREVIOUS_TRANSLATION, 1)
enum class TranslationOpcode {
#define CASE(name, ...) name,
@@ -57,10 +60,6 @@ static constexpr int kNumTranslationOpcodes =
0 TRANSLATION_OPCODE_LIST(PLUS_ONE);
#undef PLUS_ONE
-constexpr TranslationOpcode TranslationOpcodeFromInt(uint32_t i) {
- return static_cast<TranslationOpcode>(i);
-}
-
inline int TranslationOpcodeOperandCount(TranslationOpcode o) {
#define CASE(name, operand_count) operand_count,
static const int counts[] = {TRANSLATION_OPCODE_LIST(CASE)};
@@ -75,6 +74,17 @@ inline const char* TranslationOpcodeToString(TranslationOpcode o) {
return names[static_cast<int>(o)];
}
+constexpr int kMaxTranslationOperandCount = 5;
+#define CASE(name, operand_count) \
+ static_assert(operand_count <= kMaxTranslationOperandCount);
+TRANSLATION_OPCODE_LIST(CASE)
+#undef CASE
+
+inline bool TranslationOpcodeIsBegin(TranslationOpcode o) {
+ return o == TranslationOpcode::BEGIN_WITH_FEEDBACK ||
+ o == TranslationOpcode::BEGIN_WITHOUT_FEEDBACK;
+}
+
#undef TRANSLATION_OPCODE_LIST
} // namespace internal