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

Side by Side Diff: src/arm64/code-stubs-arm64.cc

Issue 2188993003: [stubs] Port CreateWeakCellStub to turbofan (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix stack overflow Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/api-arguments.h" 8 #include "src/api-arguments.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 1808 matching lines...) Expand 10 before | Expand all | Expand 10 after
1819 1819
1820 static void CallStubInRecordCallTarget(MacroAssembler* masm, CodeStub* stub, 1820 static void CallStubInRecordCallTarget(MacroAssembler* masm, CodeStub* stub,
1821 Register argc, Register function, 1821 Register argc, Register function,
1822 Register feedback_vector, Register index, 1822 Register feedback_vector, Register index,
1823 Register new_target) { 1823 Register new_target) {
1824 FrameScope scope(masm, StackFrame::INTERNAL); 1824 FrameScope scope(masm, StackFrame::INTERNAL);
1825 1825
1826 // Number-of-arguments register must be smi-tagged to call out. 1826 // Number-of-arguments register must be smi-tagged to call out.
1827 __ SmiTag(argc); 1827 __ SmiTag(argc);
1828 __ Push(argc, function, feedback_vector, index); 1828 __ Push(argc, function, feedback_vector, index);
1829 __ Push(cp);
1829 1830
1830 DCHECK(feedback_vector.Is(x2) && index.Is(x3)); 1831 DCHECK(feedback_vector.Is(x2) && index.Is(x3));
1831 __ CallStub(stub); 1832 __ CallStub(stub);
1832 1833
1834 __ Pop(cp);
1833 __ Pop(index, feedback_vector, function, argc); 1835 __ Pop(index, feedback_vector, function, argc);
1834 __ SmiUntag(argc); 1836 __ SmiUntag(argc);
1835 } 1837 }
1836 1838
1837 1839
1838 static void GenerateRecordCallTarget(MacroAssembler* masm, Register argc, 1840 static void GenerateRecordCallTarget(MacroAssembler* masm, Register argc,
1839 Register function, 1841 Register function,
1840 Register feedback_vector, Register index, 1842 Register feedback_vector, Register index,
1841 Register new_target, Register scratch1, 1843 Register new_target, Register scratch1,
1842 Register scratch2, Register scratch3) { 1844 Register scratch2, Register scratch3) {
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
2154 Operand::UntagSmiAndScale(index, kPointerSizeLog2)); 2156 Operand::UntagSmiAndScale(index, kPointerSizeLog2));
2155 __ Str(x5, FieldMemOperand(x4, FixedArray::kHeaderSize + kPointerSize)); 2157 __ Str(x5, FieldMemOperand(x4, FixedArray::kHeaderSize + kPointerSize));
2156 2158
2157 // Store the function. Use a stub since we need a frame for allocation. 2159 // Store the function. Use a stub since we need a frame for allocation.
2158 // x2 - vector 2160 // x2 - vector
2159 // x3 - slot 2161 // x3 - slot
2160 // x1 - function 2162 // x1 - function
2161 { 2163 {
2162 FrameScope scope(masm, StackFrame::INTERNAL); 2164 FrameScope scope(masm, StackFrame::INTERNAL);
2163 CreateWeakCellStub create_stub(masm->isolate()); 2165 CreateWeakCellStub create_stub(masm->isolate());
2164 __ Push(function); 2166 __ Push(cp, function);
2165 __ CallStub(&create_stub); 2167 __ CallStub(&create_stub);
2166 __ Pop(function); 2168 __ Pop(cp, function);
2167 } 2169 }
2168 2170
2169 __ B(&call_function); 2171 __ B(&call_function);
2170 2172
2171 // We are here because tracing is on or we encountered a MISS case we can't 2173 // We are here because tracing is on or we encountered a MISS case we can't
2172 // handle here. 2174 // handle here.
2173 __ bind(&miss); 2175 __ bind(&miss);
2174 GenerateMiss(masm); 2176 GenerateMiss(masm);
2175 2177
2176 __ B(&call); 2178 __ B(&call);
(...skipping 3403 matching lines...) Expand 10 before | Expand all | Expand 10 after
5580 kStackUnwindSpace, NULL, spill_offset, 5582 kStackUnwindSpace, NULL, spill_offset,
5581 return_value_operand, NULL); 5583 return_value_operand, NULL);
5582 } 5584 }
5583 5585
5584 #undef __ 5586 #undef __
5585 5587
5586 } // namespace internal 5588 } // namespace internal
5587 } // namespace v8 5589 } // namespace v8
5588 5590
5589 #endif // V8_TARGET_ARCH_ARM64 5591 #endif // V8_TARGET_ARCH_ARM64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698