Convert empty_fixed_double_array to empty_fixed_array in call/construct
Bug: chromium:850005, chromium:852085, Change-Id: I777321306b1b68330e39e43aacc715478764649f Reviewed-on: https://chromium-review.googlesource.com/1104470 Commit-Queue: Camillo Bruni <cbruni@chromium.org> Reviewed-by: Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/master@{#54007}
This commit is contained in:
parent
d5e1d57c79
commit
2df4ba0263
@ -191,19 +191,32 @@ void CallOrConstructBuiltinsAssembler::CallOrConstructWithArrayLike(
|
||||
Label if_not_double(this), if_double(this);
|
||||
TNode<Int32T> args_count = Int32Constant(0); // args already on the stack
|
||||
|
||||
TNode<FixedArrayBase> elements = var_elements.value();
|
||||
TNode<Int32T> length = var_length.value();
|
||||
GotoIf(Word32Equal(length, Int32Constant(0)), &if_not_double);
|
||||
{
|
||||
Label normalize_done(this);
|
||||
GotoIfNot(Word32Equal(length, Int32Constant(0)), &normalize_done);
|
||||
// Make sure we don't accidentally pass along the
|
||||
// empty_fixed_double_array since the tailed-called stubs cannot handle
|
||||
// the normalization yet.
|
||||
var_elements = EmptyFixedArrayConstant();
|
||||
Goto(&normalize_done);
|
||||
|
||||
BIND(&normalize_done);
|
||||
}
|
||||
|
||||
TNode<FixedArrayBase> elements = var_elements.value();
|
||||
Branch(IsFixedDoubleArray(elements), &if_double, &if_not_double);
|
||||
|
||||
BIND(&if_not_double);
|
||||
{
|
||||
if (new_target == nullptr) {
|
||||
Callable callable = CodeFactory::CallVarargs(isolate());
|
||||
TailCallStub(callable, context, target, args_count, elements, length);
|
||||
} else {
|
||||
Callable callable = CodeFactory::ConstructVarargs(isolate());
|
||||
TailCallStub(callable, context, target, new_target, args_count, elements,
|
||||
length);
|
||||
TailCallStub(callable, context, target, new_target, args_count,
|
||||
elements, length);
|
||||
}
|
||||
}
|
||||
|
||||
BIND(&if_double);
|
||||
|
Loading…
Reference in New Issue
Block a user