Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2701)

Unified Diff: src/interpreter/bytecodes.cc

Issue 1546683002: [Interpreter] Add support for jumps using constants with wide operands. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Incorporate comments on patchset 13. Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/interpreter/bytecodes.h ('k') | src/interpreter/constant-array-builder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecodes.cc
diff --git a/src/interpreter/bytecodes.cc b/src/interpreter/bytecodes.cc
index b7d044ac39aae3e1149d081f5d111d91e75fac55..2a21c8a5315a12a7f97f7079dbf0f6341c8ce46f 100644
--- a/src/interpreter/bytecodes.cc
+++ b/src/interpreter/bytecodes.cc
@@ -181,9 +181,21 @@ bool Bytecodes::IsConditionalJumpConstant(Bytecode bytecode) {
// static
+bool Bytecodes::IsConditionalJumpConstantWide(Bytecode bytecode) {
+ return bytecode == Bytecode::kJumpIfTrueConstantWide ||
+ bytecode == Bytecode::kJumpIfFalseConstantWide ||
+ bytecode == Bytecode::kJumpIfToBooleanTrueConstantWide ||
+ bytecode == Bytecode::kJumpIfToBooleanFalseConstantWide ||
+ bytecode == Bytecode::kJumpIfNullConstantWide ||
+ bytecode == Bytecode::kJumpIfUndefinedConstantWide;
+}
+
+
+// static
bool Bytecodes::IsConditionalJump(Bytecode bytecode) {
return IsConditionalJumpImmediate(bytecode) ||
- IsConditionalJumpConstant(bytecode);
+ IsConditionalJumpConstant(bytecode) ||
+ IsConditionalJumpConstantWide(bytecode);
}
@@ -201,8 +213,16 @@ bool Bytecodes::IsJumpConstant(Bytecode bytecode) {
// static
+bool Bytecodes::IsJumpConstantWide(Bytecode bytecode) {
+ return bytecode == Bytecode::kJumpConstantWide ||
+ IsConditionalJumpConstantWide(bytecode);
+}
+
+
+// static
bool Bytecodes::IsJump(Bytecode bytecode) {
- return IsJumpImmediate(bytecode) || IsJumpConstant(bytecode);
+ return IsJumpImmediate(bytecode) || IsJumpConstant(bytecode) ||
+ IsJumpConstantWide(bytecode);
}
« no previous file with comments | « src/interpreter/bytecodes.h ('k') | src/interpreter/constant-array-builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698