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

Unified Diff: src/compiler/bytecode-graph-builder.cc

Issue 1731253003: Revert of [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
« no previous file with comments | « src/compiler/bytecode-graph-builder.h ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/bytecode-graph-builder.cc
diff --git a/src/compiler/bytecode-graph-builder.cc b/src/compiler/bytecode-graph-builder.cc
index 4e22e5b3ff49bc41123830777213e99982b2fd62..faea8c7cb02ca8f9a7d3d9e14edb1fc02d207b51 100644
--- a/src/compiler/bytecode-graph-builder.cc
+++ b/src/compiler/bytecode-graph-builder.cc
@@ -501,7 +501,10 @@
VectorSlotPair BytecodeGraphBuilder::CreateVectorSlotPair(int slot_id) {
- FeedbackVectorSlot slot = feedback_vector()->ToSlot(slot_id);
+ FeedbackVectorSlot slot;
+ if (slot_id >= TypeFeedbackVector::kReservedIndexCount) {
+ slot = feedback_vector()->ToSlot(slot_id);
+ }
return VectorSlotPair(feedback_vector(), slot);
}
@@ -989,8 +992,7 @@
return value;
}
-void BytecodeGraphBuilder::BuildCallWithFeedbackSlot(
- TailCallMode tail_call_mode) {
+void BytecodeGraphBuilder::BuildCall(TailCallMode tail_call_mode) {
FrameStateBeforeAndAfter states(this);
// TODO(rmcilroy): Set receiver_hint correctly based on whether the receiver
// register has been loaded with null / undefined explicitly or we are sure it
@@ -1000,44 +1002,11 @@
environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0));
interpreter::Register receiver = bytecode_iterator().GetRegisterOperand(1);
size_t arg_count = bytecode_iterator().GetRegisterCountOperand(2);
- int slot_id = bytecode_iterator().GetIndexOperand(3);
- VectorSlotPair feedback = CreateVectorSlotPair(slot_id);
+ VectorSlotPair feedback =
+ CreateVectorSlotPair(bytecode_iterator().GetIndexOperand(3));
const Operator* call = javascript()->CallFunction(
arg_count + 1, feedback, receiver_hint, tail_call_mode);
- Node* value = ProcessCallArguments(call, callee, receiver, arg_count + 1);
- environment()->BindAccumulator(value, &states);
-}
-
-void BytecodeGraphBuilder::VisitCallIC() {
- BuildCallWithFeedbackSlot(TailCallMode::kDisallow);
-}
-
-void BytecodeGraphBuilder::VisitCallICWide() {
- BuildCallWithFeedbackSlot(TailCallMode::kDisallow);
-}
-
-void BytecodeGraphBuilder::VisitTailCallIC() {
- BuildCallWithFeedbackSlot(TailCallMode::kAllow);
-}
-
-void BytecodeGraphBuilder::VisitTailCallICWide() {
- BuildCallWithFeedbackSlot(TailCallMode::kAllow);
-}
-
-void BytecodeGraphBuilder::BuildCall(TailCallMode tail_call_mode) {
- FrameStateBeforeAndAfter states(this);
- // TODO(rmcilroy): Set receiver_hint correctly based on whether the receiver
- // register has been loaded with null / undefined explicitly or we are sure it
- // is not null / undefined.
- ConvertReceiverMode receiver_hint = ConvertReceiverMode::kAny;
- Node* callee =
- environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0));
- interpreter::Register receiver = bytecode_iterator().GetRegisterOperand(1);
- size_t arg_count = bytecode_iterator().GetRegisterCountOperand(2);
-
- const Operator* call = javascript()->CallFunction(
- arg_count + 1, VectorSlotPair(), receiver_hint, tail_call_mode);
Node* value = ProcessCallArguments(call, callee, receiver, arg_count + 1);
environment()->BindAccumulator(value, &states);
}
« no previous file with comments | « src/compiler/bytecode-graph-builder.h ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698