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

Unified Diff: src/compiler/interpreter-assembler.cc

Issue 1294793002: [Interpreter] Add implementations for load immediate bytecodes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@interpreter_accum
Patch Set: Created 5 years, 4 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/compiler/interpreter-assembler.cc
diff --git a/src/compiler/interpreter-assembler.cc b/src/compiler/interpreter-assembler.cc
index bf985a787824a6967d4fba9ca239ddda902bc3c3..0eb8fe51b20378b26d85c430cbe91f6067b2fb71 100644
--- a/src/compiler/interpreter-assembler.cc
+++ b/src/compiler/interpreter-assembler.cc
@@ -134,6 +134,50 @@ Node* InterpreterAssembler::BytecodeOperandSignExtended(int delta) {
}
+Node* InterpreterAssembler::BytecodeOperandImm8(int delta) {
oth 2015/08/17 10:49:02 Suggest renaming delta for clarity - operand_index
rmcilroy 2015/08/18 13:06:22 Done.
+ DCHECK_EQ(interpreter::OperandType::kImm8,
+ interpreter::Bytecodes::GetOperandType(bytecode_, delta));
+ return BytecodeOperandSignExtended(delta);
+}
+
+
+Node* InterpreterAssembler::BytecodeOperandReg(int delta) {
+ DCHECK_EQ(interpreter::OperandType::kReg,
+ interpreter::Bytecodes::GetOperandType(bytecode_, delta));
+ return BytecodeOperandSignExtended(delta);
+}
+
+
+Node* InterpreterAssembler::Int32Constant(int value) {
+ return raw_assembler_->Int32Constant(value);
+}
+
+
+Node* InterpreterAssembler::NumberConstant(double value) {
+ return raw_assembler_->NumberConstant(value);
+}
+
+
+Node* InterpreterAssembler::HeapConstant(Unique<HeapObject> object) {
+ return raw_assembler_->HeapConstant(object);
+}
+
+
+Node* InterpreterAssembler::SmiShiftBitsConstant() {
+ return Int32Constant(kSmiShiftSize + kSmiTagSize);
+}
+
+
+Node* InterpreterAssembler::SmiTag(Node* value) {
+ return raw_assembler_->WordShl(value, SmiShiftBitsConstant());
+}
+
+
+Node* InterpreterAssembler::SmiUntag(Node* value) {
+ return raw_assembler_->WordSar(value, SmiShiftBitsConstant());
+}
+
+
void InterpreterAssembler::Return() {
Node* exit_trampoline_code_object =
HeapConstant(Unique<HeapObject>::CreateImmovable(
@@ -216,19 +260,6 @@ Schedule* InterpreterAssembler::schedule() {
}
-Node* InterpreterAssembler::Int32Constant(int value) {
- return raw_assembler_->Int32Constant(value);
-}
-
-
-Node* InterpreterAssembler::NumberConstant(double value) {
- return raw_assembler_->NumberConstant(value);
-}
-
-
-Node* InterpreterAssembler::HeapConstant(Unique<HeapObject> object) {
- return raw_assembler_->HeapConstant(object);
-}
} // namespace interpreter
} // namespace internal

Powered by Google App Engine
This is Rietveld 408576698