diff --git a/src/ppc/builtins-ppc.cc b/src/ppc/builtins-ppc.cc index 55671cdea7..dba44d2540 100644 --- a/src/ppc/builtins-ppc.cc +++ b/src/ppc/builtins-ppc.cc @@ -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); }