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

Unified Diff: src/x64/code-stubs-x64.cc

Issue 997063003: Version 4.2.77.5 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@4.2
Patch Set: Created 5 years, 9 months 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/runtime/runtime-array.cc ('k') | test/mjsunit/harmony/classes-subclass-arrays.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/code-stubs-x64.cc
diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc
index 9ef0c0330cb4270f25fc0e885a2b6bf518b5f86a..2a287670109d5567744b482e79c60810cd8e3f20 100644
--- a/src/x64/code-stubs-x64.cc
+++ b/src/x64/code-stubs-x64.cc
@@ -4615,8 +4615,30 @@ void ArrayConstructorStub::Generate(MacroAssembler* masm) {
__ bind(&no_info);
GenerateDispatchToArrayStub(masm, DISABLE_ALLOCATION_SITES);
+ // Subclassing
__ bind(&subclassing);
- __ TailCallRuntime(Runtime::kThrowArrayNotSubclassableError, 0, 1);
+ __ Pop(rcx); // return address.
+ __ Push(rdi);
+ __ Push(rdx);
+
+ // Adjust argc.
+ switch (argument_count()) {
+ case ANY:
+ case MORE_THAN_ONE:
+ __ addp(rax, Immediate(2));
+ break;
+ case NONE:
+ __ movp(rax, Immediate(2));
+ break;
+ case ONE:
+ __ movp(rax, Immediate(3));
+ break;
+ }
+
+ __ Push(rcx);
+ __ JumpToExternalReference(
+ ExternalReference(Runtime::kArrayConstructorWithSubclassing, isolate()),
+ 1);
}
« no previous file with comments | « src/runtime/runtime-array.cc ('k') | test/mjsunit/harmony/classes-subclass-arrays.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698