Commit b4375d92 authored by zhengxing.li's avatar zhengxing.li Committed by Commit bot

X87: Install ConstructNonConstructable as construct stub for non-constructables.

    port 8e28e851 (r32223)

    original commit message:

BUG=

Review URL: https://codereview.chromium.org/1475933002

Cr-Commit-Position: refs/heads/master@{#32252}
parent ec3548ae
......@@ -410,6 +410,13 @@ void Builtins::Generate_JSBuiltinsConstructStub(MacroAssembler* masm) {
}
void Builtins::Generate_ConstructedNonConstructable(MacroAssembler* masm) {
FrameScope scope(masm, StackFrame::INTERNAL);
__ push(edi);
__ CallRuntime(Runtime::kThrowConstructedNonConstructable, 1);
}
enum IsTagged { kEaxIsSmiTagged, kEaxIsUntaggedInt };
......@@ -1543,7 +1550,8 @@ void Builtins::Generate_CallFunction(MacroAssembler* masm,
__ bind(&class_constructor);
{
FrameScope frame(masm, StackFrame::INTERNAL);
__ CallRuntime(Runtime::kThrowConstructorNonCallableError, 0);
__ push(edi);
__ CallRuntime(Runtime::kThrowConstructorNonCallableError, 1);
}
}
......@@ -1670,11 +1678,8 @@ void Builtins::Generate_Construct(MacroAssembler* masm) {
// Called Construct on an Object that doesn't have a [[Construct]] internal
// method.
__ bind(&non_constructor);
{
FrameScope scope(masm, StackFrame::INTERNAL);
__ Push(edi);
__ CallRuntime(Runtime::kThrowCalledNonCallable, 1);
}
__ Jump(masm->isolate()->builtins()->ConstructedNonConstructable(),
RelocInfo::CODE_TARGET);
}
......
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