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:
parent
1c1590e866
commit
340627ea26
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user