| Index: src/x64/builtins-x64.cc
|
| diff --git a/src/x64/builtins-x64.cc b/src/x64/builtins-x64.cc
|
| index 64bb39a2872fdf95f9da4198d9488b151e8ee5a3..d553f1ad4049198db070a26e64de0e13903f35d2 100644
|
| --- a/src/x64/builtins-x64.cc
|
| +++ b/src/x64/builtins-x64.cc
|
| @@ -385,6 +385,13 @@ void Builtins::Generate_JSBuiltinsConstructStub(MacroAssembler* masm) {
|
| }
|
|
|
|
|
| +void Builtins::Generate_ConstructedNonConstructable(MacroAssembler* masm) {
|
| + FrameScope scope(masm, StackFrame::INTERNAL);
|
| + __ Push(rdi);
|
| + __ CallRuntime(Runtime::kThrowConstructedNonConstructable, 1);
|
| +}
|
| +
|
| +
|
| enum IsTagged { kRaxIsSmiTagged, kRaxIsUntaggedInt };
|
|
|
|
|
| @@ -1717,7 +1724,8 @@ void Builtins::Generate_CallFunction(MacroAssembler* masm,
|
| __ bind(&class_constructor);
|
| {
|
| FrameScope frame(masm, StackFrame::INTERNAL);
|
| - __ CallRuntime(Runtime::kThrowConstructorNonCallableError, 0);
|
| + __ Push(rdi);
|
| + __ CallRuntime(Runtime::kThrowConstructorNonCallableError, 1);
|
| }
|
| }
|
|
|
| @@ -1847,11 +1855,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(rdi);
|
| - __ CallRuntime(Runtime::kThrowCalledNonCallable, 1);
|
| - }
|
| + __ Jump(masm->isolate()->builtins()->ConstructedNonConstructable(),
|
| + RelocInfo::CODE_TARGET);
|
| }
|
|
|
|
|
|
|