Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Unified Diff: src/arm64/builtins-arm64.cc

Issue 1467473002: Install ConstructNonConstructable as construct stub for non-constructables. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm/builtins-arm.cc ('k') | src/bootstrapper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm64/builtins-arm64.cc
diff --git a/src/arm64/builtins-arm64.cc b/src/arm64/builtins-arm64.cc
index f7646588626411f2ceab1c927d055536d9e592ce..f3871f40d4d90c8fb84057f97935a68d717f792e 100644
--- a/src/arm64/builtins-arm64.cc
+++ b/src/arm64/builtins-arm64.cc
@@ -661,6 +661,13 @@ void Builtins::Generate_JSBuiltinsConstructStub(MacroAssembler* masm) {
}
+void Builtins::Generate_ConstructedNonConstructable(MacroAssembler* masm) {
+ FrameScope scope(masm, StackFrame::INTERNAL);
+ __ Push(x1);
+ __ CallRuntime(Runtime::kThrowConstructedNonConstructable, 1);
+}
+
+
enum IsTagged { kArgcIsSmiTagged, kArgcIsUntaggedInt };
@@ -1680,7 +1687,8 @@ void Builtins::Generate_CallFunction(MacroAssembler* masm,
__ bind(&class_constructor);
{
FrameScope frame(masm, StackFrame::INTERNAL);
- __ CallRuntime(Runtime::kThrowConstructorNonCallableError, 0);
+ __ Push(x1);
+ __ CallRuntime(Runtime::kThrowConstructorNonCallableError, 1);
}
}
@@ -1807,11 +1815,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(x1);
- __ CallRuntime(Runtime::kThrowCalledNonCallable, 1);
- }
+ __ Jump(masm->isolate()->builtins()->ConstructedNonConstructable(),
+ RelocInfo::CODE_TARGET);
}
« no previous file with comments | « src/arm/builtins-arm.cc ('k') | src/bootstrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698