Index: src/mips64/builtins-mips64.cc |
diff --git a/src/mips64/builtins-mips64.cc b/src/mips64/builtins-mips64.cc |
index 7ddd5afa9900a83850311bd7f7cc557a02516a3e..d8709831cd9293cbee19855ad26ecd193f022e04 100644 |
--- a/src/mips64/builtins-mips64.cc |
+++ b/src/mips64/builtins-mips64.cc |
@@ -654,6 +654,13 @@ void Builtins::Generate_JSBuiltinsConstructStub(MacroAssembler* masm) { |
} |
+void Builtins::Generate_ConstructedNonConstructable(MacroAssembler* masm) { |
+ FrameScope scope(masm, StackFrame::INTERNAL); |
+ __ Push(a1); |
+ __ CallRuntime(Runtime::kThrowConstructedNonConstructable, 1); |
+} |
+ |
+ |
enum IsTagged { kArgcIsSmiTagged, kArgcIsUntaggedInt }; |
@@ -1702,7 +1709,8 @@ void Builtins::Generate_CallFunction(MacroAssembler* masm, |
__ bind(&class_constructor); |
{ |
FrameScope frame(masm, StackFrame::INTERNAL); |
- __ CallRuntime(Runtime::kThrowConstructorNonCallableError, 0); |
+ __ Push(a1); |
+ __ CallRuntime(Runtime::kThrowConstructorNonCallableError, 1); |
} |
} |
@@ -1833,11 +1841,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(a1); |
- __ CallRuntime(Runtime::kThrowCalledNonCallable, 1); |
- } |
+ __ Jump(masm->isolate()->builtins()->ConstructedNonConstructable(), |
+ RelocInfo::CODE_TARGET); |
} |