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

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

Issue 1688283003: [Interpreter] Implements calls through CallICStub in the interpreter. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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-builder.cc
diff --git a/src/interpreter/bytecode-array-builder.cc b/src/interpreter/bytecode-array-builder.cc
index f277d7ce187e0a5ba975b351e7190c731fea79ca..76b61d10520ddf44312e3bb1e44fd47f025243f6 100644
--- a/src/interpreter/bytecode-array-builder.cc
+++ b/src/interpreter/bytecode-array-builder.cc
@@ -1083,14 +1083,14 @@ void BytecodeArrayBuilder::EnsureReturn(FunctionLiteral* literal) {
}
}
-BytecodeArrayBuilder& BytecodeArrayBuilder::Call(Register callable,
- Register receiver_args,
- size_t receiver_args_count,
- int feedback_slot) {
+BytecodeArrayBuilder& BytecodeArrayBuilder::CallIC(Register callable,
+ Register receiver_args,
+ size_t receiver_args_count,
+ int feedback_slot) {
if (FitsInReg8Operand(callable) && FitsInReg8Operand(receiver_args) &&
FitsInIdx8Operand(receiver_args_count) &&
FitsInIdx8Operand(feedback_slot)) {
- Output(Bytecode::kCall, callable.ToRawOperand(),
+ Output(Bytecode::kCallIC, callable.ToRawOperand(),
receiver_args.ToRawOperand(),
static_cast<uint8_t>(receiver_args_count),
static_cast<uint8_t>(feedback_slot));
@@ -1098,7 +1098,7 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::Call(Register callable,
FitsInReg16Operand(receiver_args) &&
FitsInIdx16Operand(receiver_args_count) &&
FitsInIdx16Operand(feedback_slot)) {
- Output(Bytecode::kCallWide, callable.ToRawOperand(),
+ Output(Bytecode::kCallICWide, callable.ToRawOperand(),
receiver_args.ToRawOperand(),
static_cast<uint16_t>(receiver_args_count),
static_cast<uint16_t>(feedback_slot));
@@ -1108,6 +1108,25 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::Call(Register callable,
return *this;
}
+BytecodeArrayBuilder& BytecodeArrayBuilder::Call(Register callable,
+ Register receiver_args,
+ size_t receiver_args_count) {
+ if (FitsInReg8Operand(callable) && FitsInReg8Operand(receiver_args) &&
+ FitsInIdx8Operand(receiver_args_count)) {
+ Output(Bytecode::kCall, callable.ToRawOperand(),
+ receiver_args.ToRawOperand(),
+ static_cast<uint8_t>(receiver_args_count));
+ } else if (FitsInReg16Operand(callable) &&
+ FitsInReg16Operand(receiver_args) &&
+ FitsInIdx16Operand(receiver_args_count)) {
+ Output(Bytecode::kCallWide, callable.ToRawOperand(),
+ receiver_args.ToRawOperand(),
+ static_cast<uint16_t>(receiver_args_count));
+ } else {
+ UNIMPLEMENTED();
+ }
+ return *this;
+}
BytecodeArrayBuilder& BytecodeArrayBuilder::New(Register constructor,
Register first_arg,

Powered by Google App Engine
This is Rietveld 408576698