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

Port 8e28e851ee

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}
This commit is contained in:
mbrandy 2015-11-24 13:30:23 -08:00 committed by Commit bot
parent 1c1590e866
commit 340627ea26

View File

@ -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);
}