Index: src/mips/builtins-mips.cc |
diff --git a/src/mips/builtins-mips.cc b/src/mips/builtins-mips.cc |
index 44fe7c165a0491b07d0d2ea8b7ce7be804edbdd5..5b5afc9c79b44574894bf5e99e2072a759515423 100644 |
--- a/src/mips/builtins-mips.cc |
+++ b/src/mips/builtins-mips.cc |
@@ -655,6 +655,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 }; |
@@ -1705,7 +1712,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); |
} |
} |
@@ -1837,11 +1845,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); |
} |