Commit 11c55d9c authored by Benedikt Meurer's avatar Benedikt Meurer Committed by Commit Bot

[cleanup] Properly tail call from GrowArrayElementsStub.

Now that Crankshaft is gone we no longer need to worry about parameter
mismatch for safepoints and we can just tail-call to %GrowArrayElements
from the GrowArrayElementsStub.

Bug: chromium:608675, v8:5269, v8:6408
Change-Id: I1b11d7d00cad02749a0ebc0a7de5e608de6d91c9
Reviewed-on: https://chromium-review.googlesource.com/778861Reviewed-by: 's avatarDaniel Clifford <danno@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49474}
parent f24a7e75
......@@ -722,16 +722,7 @@ TF_STUB(GrowArrayElementsStub, CodeStubAssembler) {
Return(new_elements);
BIND(&runtime);
// TODO(danno): Make this a tail call when the stub is only used from TurboFan
// code. This musn't be a tail call for now, since the caller site in lithium
// creates a safepoint. This safepoint musn't have a different number of
// arguments on the stack in the case that a GC happens from the slow-case
// allocation path (zero, since all the stubs inputs are in registers) and
// when the call happens (it would be two in the tail call case due to the
// tail call pushing the arguments on the stack for the runtime call). By not
// tail-calling, the runtime call case also has zero arguments on the stack
// for the stub frame.
Return(CallRuntime(Runtime::kGrowArrayElements, context, object, key));
TailCallRuntime(Runtime::kGrowArrayElements, context, object, key);
}
ArrayConstructorStub::ArrayConstructorStub(Isolate* isolate)
......
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