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

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: Reorder methods in i::interpreter::Bytecodes. 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..798004ce794253845a93acd957805b4de4eca48b 100644
--- a/src/interpreter/bytecodes.cc
+++ b/src/interpreter/bytecodes.cc
@@ -264,17 +264,25 @@ 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::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, _) \
@@ -327,6 +335,11 @@ bool Bytecodes::IsRegisterOutputOperandType(OperandType operand_type) {
return false;
}
+// static
+bool Bytecodes::IsImmediateOperandType(OperandType operand_type) {
rmcilroy 2016/02/10 16:43:14 nit - move above IsRegisterCountOperandType
Stefano Sanfilippo 2016/02/10 16:49:30 Done.
+ return operand_type == OperandType::kImm8;
+}
+
namespace {
static Register DecodeRegister(const uint8_t* operand_start,
OperandType operand_type) {
« 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