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

Side by Side Diff: src/arm/code-stubs-arm.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
« no previous file with comments | « no previous file | src/arm64/code-stubs-arm64.cc » ('j') | src/interpreter/interpreter-assembler.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_ARM 5 #if V8_TARGET_ARCH_ARM
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/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 1616 matching lines...) Expand 10 before | Expand all | Expand 10 after
1627 static void CallStubInRecordCallTarget(MacroAssembler* masm, CodeStub* stub) { 1627 static void CallStubInRecordCallTarget(MacroAssembler* masm, CodeStub* stub) {
1628 // r0 : number of arguments to the construct function 1628 // r0 : number of arguments to the construct function
1629 // r1 : the function to call 1629 // r1 : the function to call
1630 // r2 : feedback vector 1630 // r2 : feedback vector
1631 // r3 : slot in feedback vector (Smi) 1631 // r3 : slot in feedback vector (Smi)
1632 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); 1632 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
1633 1633
1634 // Number-of-arguments register must be smi-tagged to call out. 1634 // Number-of-arguments register must be smi-tagged to call out.
1635 __ SmiTag(r0); 1635 __ SmiTag(r0);
1636 __ Push(r3, r2, r1, r0); 1636 __ Push(r3, r2, r1, r0);
1637 __ Push(cp);
1637 1638
1638 __ CallStub(stub); 1639 __ CallStub(stub);
1639 1640
1641 __ Pop(cp);
1640 __ Pop(r3, r2, r1, r0); 1642 __ Pop(r3, r2, r1, r0);
1641 __ SmiUntag(r0); 1643 __ SmiUntag(r0);
1642 } 1644 }
1643 1645
1644 1646
1645 static void GenerateRecordCallTarget(MacroAssembler* masm) { 1647 static void GenerateRecordCallTarget(MacroAssembler* masm) {
1646 // Cache the called function in a feedback vector slot. Cache states 1648 // Cache the called function in a feedback vector slot. Cache states
1647 // are uninitialized, monomorphic (indicated by a JSFunction), and 1649 // are uninitialized, monomorphic (indicated by a JSFunction), and
1648 // megamorphic. 1650 // megamorphic.
1649 // r0 : number of arguments to the construct function 1651 // r0 : number of arguments to the construct function
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
1929 __ add(r4, r2, Operand::PointerOffsetFromSmiKey(r3)); 1931 __ add(r4, r2, Operand::PointerOffsetFromSmiKey(r3));
1930 __ str(r5, FieldMemOperand(r4, FixedArray::kHeaderSize + kPointerSize)); 1932 __ str(r5, FieldMemOperand(r4, FixedArray::kHeaderSize + kPointerSize));
1931 1933
1932 // Store the function. Use a stub since we need a frame for allocation. 1934 // Store the function. Use a stub since we need a frame for allocation.
1933 // r2 - vector 1935 // r2 - vector
1934 // r3 - slot 1936 // r3 - slot
1935 // r1 - function 1937 // r1 - function
1936 { 1938 {
1937 FrameScope scope(masm, StackFrame::INTERNAL); 1939 FrameScope scope(masm, StackFrame::INTERNAL);
1938 CreateWeakCellStub create_stub(masm->isolate()); 1940 CreateWeakCellStub create_stub(masm->isolate());
1939 __ Push(r1); 1941 __ Push(cp, r1);
1940 __ CallStub(&create_stub); 1942 __ CallStub(&create_stub);
1941 __ Pop(r1); 1943 __ Pop(cp, r1);
1942 } 1944 }
1943 1945
1944 __ jmp(&call_function); 1946 __ jmp(&call_function);
1945 1947
1946 // We are here because tracing is on or we encountered a MISS case we can't 1948 // We are here because tracing is on or we encountered a MISS case we can't
1947 // handle here. 1949 // handle here.
1948 __ bind(&miss); 1950 __ bind(&miss);
1949 GenerateMiss(masm); 1951 GenerateMiss(masm);
1950 1952
1951 __ jmp(&call); 1953 __ jmp(&call);
(...skipping 3267 matching lines...) Expand 10 before | Expand all | Expand 10 after
5219 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, 5221 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref,
5220 kStackUnwindSpace, NULL, return_value_operand, NULL); 5222 kStackUnwindSpace, NULL, return_value_operand, NULL);
5221 } 5223 }
5222 5224
5223 #undef __ 5225 #undef __
5224 5226
5225 } // namespace internal 5227 } // namespace internal
5226 } // namespace v8 5228 } // namespace v8
5227 5229
5228 #endif // V8_TARGET_ARCH_ARM 5230 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm64/code-stubs-arm64.cc » ('j') | src/interpreter/interpreter-assembler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698