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

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

Issue 1568493002: [Interpreter] Add support for calling runtime functions which return a pair. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address Michi's review comments. 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
« no previous file with comments | « src/compiler/interpreter-assembler.h ('k') | src/compiler/linkage.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/interpreter-assembler.cc
diff --git a/src/compiler/interpreter-assembler.cc b/src/compiler/interpreter-assembler.cc
index a04a93f1525cc023502dedd2c24d02696f50e5dc..7080d02120903237aa2803db368440e4429d6ebc 100644
--- a/src/compiler/interpreter-assembler.cc
+++ b/src/compiler/interpreter-assembler.cc
@@ -148,6 +148,12 @@ Node* InterpreterAssembler::StoreRegister(Node* value, Node* reg_index) {
}
+Node* InterpreterAssembler::NextRegister(Node* reg_index) {
+ // Register indexes are negative, so the next index is minus one.
+ return IntPtrAdd(reg_index, Int32Constant(-1));
+}
+
+
Node* InterpreterAssembler::BytecodeOperand(int operand_index) {
DCHECK_LT(operand_index, interpreter::Bytecodes::NumberOfOperands(bytecode_));
DCHECK_EQ(interpreter::OperandSize::kByte,
@@ -297,6 +303,7 @@ Node* InterpreterAssembler::BytecodeOperandIdx(int operand_index) {
Node* InterpreterAssembler::BytecodeOperandReg(int operand_index) {
switch (interpreter::Bytecodes::GetOperandType(bytecode_, operand_index)) {
case interpreter::OperandType::kReg8:
+ case interpreter::OperandType::kRegPair8:
case interpreter::OperandType::kMaybeReg8:
DCHECK_EQ(
interpreter::OperandSize::kByte,
@@ -555,11 +562,11 @@ Node* InterpreterAssembler::CallIC(CallInterfaceDescriptor descriptor,
Node* InterpreterAssembler::CallRuntime(Node* function_id, Node* first_arg,
- Node* arg_count) {
- Callable callable = CodeFactory::InterpreterCEntry(isolate());
+ Node* arg_count, int result_size) {
+ Callable callable = CodeFactory::InterpreterCEntry(isolate(), result_size);
CallDescriptor* descriptor = Linkage::GetStubCallDescriptor(
- isolate(), zone(), callable.descriptor(), 0, CallDescriptor::kNoFlags);
-
+ isolate(), zone(), callable.descriptor(), 0, CallDescriptor::kNoFlags,
+ Operator::kNoProperties, MachineType::AnyTagged(), result_size);
Node* code_target = HeapConstant(callable.code());
// Get the function entry from the function id.
« no previous file with comments | « src/compiler/interpreter-assembler.h ('k') | src/compiler/linkage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698