| Index: src/x64/builtins-x64.cc
|
| diff --git a/src/x64/builtins-x64.cc b/src/x64/builtins-x64.cc
|
| index f88ca166cb89c31b615ef6f804306faec57f717a..a099efe15683109f11ed897b660069989bf53911 100644
|
| --- a/src/x64/builtins-x64.cc
|
| +++ b/src/x64/builtins-x64.cc
|
| @@ -392,6 +392,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 };
|
|
|
|
|
| @@ -1726,7 +1733,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);
|
| }
|
| }
|
|
|
| @@ -1857,11 +1865,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);
|
| }
|
|
|
|
|
|
|