Commit 9dc664bb authored by Ross McIlroy's avatar Ross McIlroy Committed by Commit Bot

[Compile] Remove CompilationInfo::ExpectsJSReceiverAsReceiver.

Removes CompilationInfo::ExpectsJSReceiverAsReceiver and the associated
debug code in full-codegen which uses it. This avoids the need to check
language_mode from CompilationInfo and will enable decoupling of
ParseInfo and CompilationInfo in a followup CL.

BUG=v8:5203

Change-Id: Ib88252408e59ef321d16d5a1dd4b2b6cea609729
Reviewed-on: https://chromium-review.googlesource.com/593954Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47018}
parent 14e6a65a
......@@ -180,8 +180,6 @@ namespace internal {
V(kRememberedSetPointerInNewSpace, "Remembered set pointer is in new space") \
V(kRestParameter, "Rest parameters") \
V(kReturnAddressNotFoundInFrame, "Return address not found in frame") \
V(kSloppyFunctionExpectsJSReceiverReceiver, \
"Sloppy function expects JSReceiver as receiver.") \
V(kSmiAdditionOverflow, "Smi addition overflow") \
V(kSmiSubtractionOverflow, "Smi subtraction overflow") \
V(kSpreadCall, "Call with spread argument") \
......
......@@ -201,10 +201,6 @@ CompilationInfo::SourcePositionRecordingMode() const {
: SourcePositionTableBuilder::RECORD_SOURCE_POSITIONS;
}
bool CompilationInfo::ExpectsJSReceiverAsReceiver() {
return is_sloppy(parse_info()->language_mode()) && !parse_info()->is_native();
}
bool CompilationInfo::has_context() const { return !closure().is_null(); }
Context* CompilationInfo::context() const {
......
......@@ -237,8 +237,6 @@ class V8_EXPORT_PRIVATE CompilationInfo final {
// Deoptimization support.
bool ShouldEnsureSpaceForLazyDeopt() { return !IsStub(); }
bool ExpectsJSReceiverAsReceiver();
// Determines whether or not to insert a self-optimization header.
bool ShouldSelfOptimize();
......
......@@ -120,14 +120,6 @@ void FullCodeGenerator::Generate() {
ProfileEntryHookStub::MaybeCallEntryHook(masm_);
if (FLAG_debug_code && info->ExpectsJSReceiverAsReceiver()) {
int receiver_offset = info->scope()->num_parameters() * kPointerSize;
__ ldr(r2, MemOperand(sp, receiver_offset));
__ AssertNotSmi(r2);
__ CompareObjectType(r2, r2, no_reg, FIRST_JS_RECEIVER_TYPE);
__ Assert(ge, kSloppyFunctionExpectsJSReceiverReceiver);
}
// Open a frame scope to indicate that there is a frame on the stack. The
// MANUAL indicates that the scope shouldn't actually generate code to set up
// the frame (that is done below).
......
......@@ -119,14 +119,6 @@ void FullCodeGenerator::Generate() {
ProfileEntryHookStub::MaybeCallEntryHook(masm_);
if (FLAG_debug_code && info->ExpectsJSReceiverAsReceiver()) {
int receiver_offset = info->scope()->num_parameters() * kXRegSize;
__ Peek(x10, receiver_offset);
__ AssertNotSmi(x10);
__ CompareObjectType(x10, x10, x11, FIRST_JS_RECEIVER_TYPE);
__ Assert(ge, kSloppyFunctionExpectsJSReceiverReceiver);
}
// Open a frame scope to indicate that there is a frame on the stack.
// The MANUAL indicates that the scope shouldn't actually generate code
// to set up the frame because we do it manually below.
......
......@@ -102,14 +102,6 @@ void FullCodeGenerator::Generate() {
ProfileEntryHookStub::MaybeCallEntryHook(masm_);
if (FLAG_debug_code && info->ExpectsJSReceiverAsReceiver()) {
int receiver_offset = (info->scope()->num_parameters() + 1) * kPointerSize;
__ mov(ecx, Operand(esp, receiver_offset));
__ AssertNotSmi(ecx);
__ CmpObjectType(ecx, FIRST_JS_RECEIVER_TYPE, ecx);
__ Assert(above_equal, kSloppyFunctionExpectsJSReceiverReceiver);
}
// Open a frame scope to indicate that there is a frame on the stack. The
// MANUAL indicates that the scope shouldn't actually generate code to set up
// the frame (that is done below).
......
......@@ -121,15 +121,6 @@ void FullCodeGenerator::Generate() {
ProfileEntryHookStub::MaybeCallEntryHook(masm_);
if (FLAG_debug_code && info->ExpectsJSReceiverAsReceiver()) {
int receiver_offset = info->scope()->num_parameters() * kPointerSize;
__ lw(a2, MemOperand(sp, receiver_offset));
__ AssertNotSmi(a2);
__ GetObjectType(a2, a2, a2);
__ Check(ge, kSloppyFunctionExpectsJSReceiverReceiver, a2,
Operand(FIRST_JS_RECEIVER_TYPE));
}
// Open a frame scope to indicate that there is a frame on the stack. The
// MANUAL indicates that the scope shouldn't actually generate code to set up
// the frame (that is done below).
......
......@@ -121,15 +121,6 @@ void FullCodeGenerator::Generate() {
ProfileEntryHookStub::MaybeCallEntryHook(masm_);
if (FLAG_debug_code && info->ExpectsJSReceiverAsReceiver()) {
int receiver_offset = info->scope()->num_parameters() * kPointerSize;
__ Ld(a2, MemOperand(sp, receiver_offset));
__ AssertNotSmi(a2);
__ GetObjectType(a2, a2, a2);
__ Check(ge, kSloppyFunctionExpectsJSReceiverReceiver, a2,
Operand(FIRST_JS_RECEIVER_TYPE));
}
// Open a frame scope to indicate that there is a frame on the stack. The
// MANUAL indicates that the scope shouldn't actually generate code to set up
// the frame (that is done below).
......
......@@ -111,14 +111,6 @@ void FullCodeGenerator::Generate() {
ProfileEntryHookStub::MaybeCallEntryHook(masm_);
if (FLAG_debug_code && info->ExpectsJSReceiverAsReceiver()) {
int receiver_offset = info->scope()->num_parameters() * kPointerSize;
__ LoadP(r5, MemOperand(sp, receiver_offset), r0);
__ AssertNotSmi(r5);
__ CompareObjectType(r5, r5, no_reg, FIRST_JS_RECEIVER_TYPE);
__ Assert(ge, kSloppyFunctionExpectsJSReceiverReceiver);
}
// Open a frame scope to indicate that there is a frame on the stack. The
// MANUAL indicates that the scope shouldn't actually generate code to set up
// the frame (that is done below).
......
......@@ -117,14 +117,6 @@ void FullCodeGenerator::Generate() {
ProfileEntryHookStub::MaybeCallEntryHook(masm_);
if (FLAG_debug_code && info->ExpectsJSReceiverAsReceiver()) {
int receiver_offset = info->scope()->num_parameters() * kPointerSize;
__ LoadP(r4, MemOperand(sp, receiver_offset), r0);
__ AssertNotSmi(r4);
__ CompareObjectType(r4, r4, no_reg, FIRST_JS_RECEIVER_TYPE);
__ Assert(ge, kSloppyFunctionExpectsJSReceiverReceiver);
}
// Open a frame scope to indicate that there is a frame on the stack. The
// MANUAL indicates that the scope shouldn't actually generate code to set up
// the frame (that is done below).
......
......@@ -105,14 +105,6 @@ void FullCodeGenerator::Generate() {
ProfileEntryHookStub::MaybeCallEntryHook(masm_);
if (FLAG_debug_code && info->ExpectsJSReceiverAsReceiver()) {
StackArgumentsAccessor args(rsp, info->scope()->num_parameters());
__ movp(rcx, args.GetReceiverOperand());
__ AssertNotSmi(rcx);
__ CmpObjectType(rcx, FIRST_JS_RECEIVER_TYPE, rcx);
__ Assert(above_equal, kSloppyFunctionExpectsJSReceiverReceiver);
}
// Open a frame scope to indicate that there is a frame on the stack. The
// MANUAL indicates that the scope shouldn't actually generate code to set up
// the frame (that is done below).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment