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

Unified Diff: src/interpreter/bytecodes.cc

Issue 2100793003: [interpreter] Streamline bytecode array writing. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. Created 4 years, 6 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/unittests/interpreter/bytecodes-unittest.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 44c513893d6660c1542641287487d3fca8f86a96..5e44588cba196bbbcc039a8ad658e19e1ccb63e4 100644
--- a/src/interpreter/bytecodes.cc
+++ b/src/interpreter/bytecodes.cc
@@ -15,6 +15,7 @@ namespace v8 {
namespace internal {
namespace interpreter {
+STATIC_CONST_MEMBER_DEFINITION const int Bytecodes::kMaxOperands;
// static
const char* Bytecodes::ToString(Bytecode bytecode) {
@@ -342,37 +343,8 @@ const OperandTypeInfo* Bytecodes::GetOperandTypeInfos(Bytecode bytecode) {
OperandSize Bytecodes::GetOperandSize(Bytecode bytecode, int i,
OperandScale operand_scale) {
DCHECK_LT(i, NumberOfOperands(bytecode));
- return GetOperandSizes(bytecode, operand_scale)[i];
-}
-
-// static
-const OperandSize* Bytecodes::GetOperandSizes(Bytecode bytecode,
- OperandScale operand_scale) {
- DCHECK(bytecode <= Bytecode::kLast);
- switch (bytecode) {
-#define CASE(Name, ...) \
- case Bytecode::k##Name: \
- return BytecodeTraits<__VA_ARGS__>::GetOperandSizes(operand_scale);
- BYTECODE_LIST(CASE)
-#undef CASE
- }
- UNREACHABLE();
- return nullptr;
-}
-
-// static
-int Bytecodes::GetRegisterOperandBitmap(Bytecode bytecode) {
- DCHECK(bytecode <= Bytecode::kLast);
- switch (bytecode) {
-#define CASE(Name, ...) \
- case Bytecode::k##Name: \
- typedef BytecodeTraits<__VA_ARGS__> Name##Trait; \
- return Name##Trait::kRegisterOperandBitmap;
- BYTECODE_LIST(CASE)
-#undef CASE
- }
- UNREACHABLE();
- return false;
+ OperandType operand_type = GetOperandType(bytecode, i);
+ return SizeOfOperand(operand_type, operand_scale);
}
// static
@@ -603,7 +575,7 @@ int Bytecodes::GetNumberOfRegistersRepresentedBy(OperandType operand_type) {
case OperandType::kRegOutTriple:
return 3;
default:
- UNREACHABLE();
+ return 0;
}
return 0;
}
« no previous file with comments | « src/interpreter/bytecodes.h ('k') | test/unittests/interpreter/bytecodes-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698