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

Unified Diff: src/interpreter/bytecodes.cc

Issue 1684113002: [Interpreter] Handle negative ints in generate-bytecode-expectations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Move IsImmediateOperandType. Created 4 years, 10 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') | test/cctest/interpreter/generate-bytecode-expectations.cc » ('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 7d06f29317218bd8fc4112b37c6026c2f0603737..f7b17965580c160371932a5ee6209c8741e1554f 100644
--- a/src/interpreter/bytecodes.cc
+++ b/src/interpreter/bytecodes.cc
@@ -264,17 +264,30 @@ bool Bytecodes::IsJumpOrReturn(Bytecode bytecode) {
return bytecode == Bytecode::kReturn || IsJump(bytecode);
}
-bool Bytecodes::IsMaybeRegisterOperandType(OperandType operand_type) {
- return (operand_type == OperandType::kMaybeReg8 ||
- operand_type == OperandType::kMaybeReg16);
+// static
+bool Bytecodes::IsIndexOperandType(OperandType operand_type) {
+ return operand_type == OperandType::kIdx8 ||
+ operand_type == OperandType::kIdx16;
+}
+
+// static
+bool Bytecodes::IsImmediateOperandType(OperandType operand_type) {
+ return operand_type == OperandType::kImm8;
}
+// static
bool Bytecodes::IsRegisterCountOperandType(OperandType operand_type) {
return (operand_type == OperandType::kRegCount8 ||
operand_type == OperandType::kRegCount16);
}
// static
+bool Bytecodes::IsMaybeRegisterOperandType(OperandType operand_type) {
+ return (operand_type == OperandType::kMaybeReg8 ||
+ operand_type == OperandType::kMaybeReg16);
+}
+
+// static
bool Bytecodes::IsRegisterOperandType(OperandType operand_type) {
switch (operand_type) {
#define CASE(Name, _) \
« no previous file with comments | « src/interpreter/bytecodes.h ('k') | test/cctest/interpreter/generate-bytecode-expectations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698