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

Unified Diff: src/interpreter/bytecode-array-iterator.cc

Issue 1640213002: [Interpreter] Add option to trace bytecode execution. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
Index: src/interpreter/bytecode-array-iterator.cc
diff --git a/src/interpreter/bytecode-array-iterator.cc b/src/interpreter/bytecode-array-iterator.cc
index 6fde67f938cff42bf0689c9db010931e2ff602c7..2839fe46942f5de1edade2a5900ff6653c7d3dff 100644
--- a/src/interpreter/bytecode-array-iterator.cc
+++ b/src/interpreter/bytecode-array-iterator.cc
@@ -100,6 +100,33 @@ Register BytecodeArrayIterator::GetRegisterOperand(int operand_index) const {
return Register();
}
+int BytecodeArrayIterator::GetRegisterOperandRange(int operand_index) const {
+ interpreter::OperandType operand_type =
+ Bytecodes::GetOperandType(current_bytecode(), operand_index);
+ DCHECK(Bytecodes::IsRegisterOperandType(operand_type));
+ switch (operand_type) {
+ case OperandType::kRegPair8:
+ case OperandType::kRegPair16:
+ case OperandType::kRegOutPair8:
+ case OperandType::kRegOutPair16:
+ return 2;
+ case OperandType::kRegOutTriple8:
+ case OperandType::kRegOutTriple16:
+ return 3;
+ default: {
+ if (operand_index + 1 !=
+ Bytecodes::NumberOfOperands(current_bytecode())) {
+ OperandType next_operand_type =
oth 2016/01/27 15:10:09 Can you add a TODO(oth) here to update bytecodes s
rmcilroy 2016/01/28 16:39:51 Done.
+ Bytecodes::GetOperandType(current_bytecode(), operand_index + 1);
+ if (next_operand_type == OperandType::kRegCount8 ||
+ next_operand_type == OperandType::kRegCount16) {
+ return GetCountOperand(operand_index + 1);
+ }
+ }
+ return 1;
+ }
+ }
+}
Handle<Object> BytecodeArrayIterator::GetConstantForIndexOperand(
int operand_index) const {

Powered by Google App Engine
This is Rietveld 408576698