Commit 340627ea authored by mbrandy's avatar mbrandy Committed by Commit bot

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

Port 8e28e851

R=verwaest@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#32232}
parent 1c1590e8
......@@ -650,6 +650,13 @@ void Builtins::Generate_JSBuiltinsConstructStub(MacroAssembler* masm) {
}
void Builtins::Generate_ConstructedNonConstructable(MacroAssembler* masm) {
FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
__ push(r4);
__ CallRuntime(Runtime::kThrowConstructedNonConstructable, 1);
}
enum IsTagged { kArgcIsSmiTagged, kArgcIsUntaggedInt };
......@@ -1708,7 +1715,8 @@ void Builtins::Generate_CallFunction(MacroAssembler* masm,
__ bind(&class_constructor);
{
FrameAndConstantPoolScope frame(masm, StackFrame::INTERNAL);
__ CallRuntime(Runtime::kThrowConstructorNonCallableError, 0);
__ push(r4);
__ CallRuntime(Runtime::kThrowConstructorNonCallableError, 1);
}
}
......@@ -1839,11 +1847,8 @@ void Builtins::Generate_Construct(MacroAssembler* masm) {
// Called Construct on an Object that doesn't have a [[Construct]] internal
// method.
__ bind(&non_constructor);
{
FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
__ Push(r4);
__ 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