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

Unified Diff: src/interpreter/interpreter.cc

Issue 1512543002: [Interpreter] Save bytecode offset in interpreter stack frames. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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/interpreter.cc
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc
index 48b0f3ad12e74b18edb18e48621dce2e9911ad76..2d4b1bd889f51d43c3692df2aa88f1496e7d7fba 100644
--- a/src/interpreter/interpreter.cc
+++ b/src/interpreter/interpreter.cc
@@ -17,6 +17,8 @@ namespace internal {
namespace interpreter {
using compiler::Node;
+typedef compiler::InterpreterAssembler::SaveAccumulatorMode SaveAccumulatorMode;
+
#define __ assembler->
@@ -345,7 +347,7 @@ void Interpreter::DoStoreGlobal(Callable ic,
Node* smi_slot = __ SmiTag(raw_slot);
Node* type_feedback_vector = __ LoadTypeFeedbackVector();
__ CallIC(ic.descriptor(), code_target, global, name, value, smi_slot,
- type_feedback_vector);
+ type_feedback_vector, SaveAccumulatorMode::kSaveAccumulator);
__ Dispatch();
}
@@ -562,7 +564,7 @@ void Interpreter::DoStoreIC(Callable ic,
Node* smi_slot = __ SmiTag(raw_slot);
Node* type_feedback_vector = __ LoadTypeFeedbackVector();
__ CallIC(ic.descriptor(), code_target, object, name, value, smi_slot,
- type_feedback_vector);
+ type_feedback_vector, SaveAccumulatorMode::kSaveAccumulator);
__ Dispatch();
}
@@ -629,7 +631,7 @@ void Interpreter::DoKeyedStoreIC(Callable ic,
Node* smi_slot = __ SmiTag(raw_slot);
Node* type_feedback_vector = __ LoadTypeFeedbackVector();
__ CallIC(ic.descriptor(), code_target, object, name, value, smi_slot,
- type_feedback_vector);
+ type_feedback_vector, SaveAccumulatorMode::kSaveAccumulator);
__ Dispatch();
}
@@ -1199,9 +1201,10 @@ void Interpreter::DoJumpIfFalseConstant(
void Interpreter::DoJumpIfToBooleanTrue(
compiler::InterpreterAssembler* assembler) {
Node* accumulator = __ GetAccumulator();
- Node* relative_jump = __ BytecodeOperandImm(0);
Node* to_boolean_value =
- __ CallRuntime(Runtime::kInterpreterToBoolean, accumulator);
+ __ CallRuntime(Runtime::kInterpreterToBoolean, accumulator,
+ SaveAccumulatorMode::kSaveAccumulator);
+ Node* relative_jump = __ BytecodeOperandImm(0);
Node* true_value = __ BooleanConstant(true);
__ JumpIfWordEqual(to_boolean_value, true_value, relative_jump);
}
@@ -1216,7 +1219,8 @@ void Interpreter::DoJumpIfToBooleanTrueConstant(
compiler::InterpreterAssembler* assembler) {
Node* accumulator = __ GetAccumulator();
Node* to_boolean_value =
- __ CallRuntime(Runtime::kInterpreterToBoolean, accumulator);
+ __ CallRuntime(Runtime::kInterpreterToBoolean, accumulator,
+ SaveAccumulatorMode::kSaveAccumulator);
Node* index = __ BytecodeOperandIdx(0);
Node* constant = __ LoadConstantPoolEntry(index);
Node* relative_jump = __ SmiUntag(constant);
@@ -1232,9 +1236,10 @@ void Interpreter::DoJumpIfToBooleanTrueConstant(
void Interpreter::DoJumpIfToBooleanFalse(
compiler::InterpreterAssembler* assembler) {
Node* accumulator = __ GetAccumulator();
- Node* relative_jump = __ BytecodeOperandImm(0);
Node* to_boolean_value =
- __ CallRuntime(Runtime::kInterpreterToBoolean, accumulator);
+ __ CallRuntime(Runtime::kInterpreterToBoolean, accumulator,
+ SaveAccumulatorMode::kSaveAccumulator);
+ Node* relative_jump = __ BytecodeOperandImm(0);
Node* false_value = __ BooleanConstant(false);
__ JumpIfWordEqual(to_boolean_value, false_value, relative_jump);
}
@@ -1249,7 +1254,8 @@ void Interpreter::DoJumpIfToBooleanFalseConstant(
compiler::InterpreterAssembler* assembler) {
Node* accumulator = __ GetAccumulator();
Node* to_boolean_value =
- __ CallRuntime(Runtime::kInterpreterToBoolean, accumulator);
+ __ CallRuntime(Runtime::kInterpreterToBoolean, accumulator,
+ SaveAccumulatorMode::kSaveAccumulator);
Node* index = __ BytecodeOperandIdx(0);
Node* constant = __ LoadConstantPoolEntry(index);
Node* relative_jump = __ SmiUntag(constant);

Powered by Google App Engine
This is Rietveld 408576698