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

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

Issue 1659023002: [interpreter] Unify meaning of register count operands. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase 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/interpreter/bytecode-array-builder.h ('k') | src/interpreter/bytecode-array-iterator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-array-builder.cc
diff --git a/src/interpreter/bytecode-array-builder.cc b/src/interpreter/bytecode-array-builder.cc
index 4403c8e14178f08db52e7cd8fe1b12039155559a..aff34053fc7b1b0be0b0af35d5f7763a80c8ec88 100644
--- a/src/interpreter/bytecode-array-builder.cc
+++ b/src/interpreter/bytecode-array-builder.cc
@@ -1051,21 +1051,24 @@ void BytecodeArrayBuilder::EnsureReturn() {
}
}
-
BytecodeArrayBuilder& BytecodeArrayBuilder::Call(Register callable,
- Register receiver,
- size_t arg_count,
+ Register receiver_args,
+ size_t receiver_args_count,
int feedback_slot) {
- if (FitsInReg8Operand(callable) && FitsInReg8Operand(receiver) &&
- FitsInIdx8Operand(arg_count) && FitsInIdx8Operand(feedback_slot)) {
- Output(Bytecode::kCall, callable.ToRawOperand(), receiver.ToRawOperand(),
- static_cast<uint8_t>(arg_count),
+ if (FitsInReg8Operand(callable) && FitsInReg8Operand(receiver_args) &&
+ FitsInIdx8Operand(receiver_args_count) &&
+ FitsInIdx8Operand(feedback_slot)) {
+ Output(Bytecode::kCall, callable.ToRawOperand(),
+ receiver_args.ToRawOperand(),
+ static_cast<uint8_t>(receiver_args_count),
static_cast<uint8_t>(feedback_slot));
- } else if (FitsInReg16Operand(callable) && FitsInReg16Operand(receiver) &&
- FitsInIdx16Operand(arg_count) &&
+ } else if (FitsInReg16Operand(callable) &&
+ FitsInReg16Operand(receiver_args) &&
+ FitsInIdx16Operand(receiver_args_count) &&
FitsInIdx16Operand(feedback_slot)) {
Output(Bytecode::kCallWide, callable.ToRawOperand(),
- receiver.ToRawOperand(), static_cast<uint16_t>(arg_count),
+ receiver_args.ToRawOperand(),
+ static_cast<uint16_t>(receiver_args_count),
static_cast<uint16_t>(feedback_slot));
} else {
UNIMPLEMENTED();
@@ -1142,17 +1145,19 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::CallRuntimeForPair(
return *this;
}
-
-BytecodeArrayBuilder& BytecodeArrayBuilder::CallJSRuntime(int context_index,
- Register receiver,
- size_t arg_count) {
+BytecodeArrayBuilder& BytecodeArrayBuilder::CallJSRuntime(
+ int context_index, Register receiver_args, size_t receiver_args_count) {
DCHECK(FitsInIdx16Operand(context_index));
- if (FitsInReg8Operand(receiver) && FitsInIdx8Operand(arg_count)) {
+ if (FitsInReg8Operand(receiver_args) &&
+ FitsInIdx8Operand(receiver_args_count)) {
Output(Bytecode::kCallJSRuntime, static_cast<uint16_t>(context_index),
- receiver.ToRawOperand(), static_cast<uint8_t>(arg_count));
- } else if (FitsInReg16Operand(receiver) && FitsInIdx16Operand(arg_count)) {
+ receiver_args.ToRawOperand(),
+ static_cast<uint8_t>(receiver_args_count));
+ } else if (FitsInReg16Operand(receiver_args) &&
+ FitsInIdx16Operand(receiver_args_count)) {
Output(Bytecode::kCallJSRuntimeWide, static_cast<uint16_t>(context_index),
- receiver.ToRawOperand(), static_cast<uint16_t>(arg_count));
+ receiver_args.ToRawOperand(),
+ static_cast<uint16_t>(receiver_args_count));
} else {
UNIMPLEMENTED();
}
« no previous file with comments | « src/interpreter/bytecode-array-builder.h ('k') | src/interpreter/bytecode-array-iterator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698