| OLD | NEW |
| 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/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/ic/handler-compiler.h" | 10 #include "src/ic/handler-compiler.h" |
| (...skipping 1780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1791 __ Mov(size, Operand(mapped_params, LSL, kPointerSizeLog2)); | 1791 __ Mov(size, Operand(mapped_params, LSL, kPointerSizeLog2)); |
| 1792 __ Add(size, size, kParameterMapHeaderSize); | 1792 __ Add(size, size, kParameterMapHeaderSize); |
| 1793 | 1793 |
| 1794 // If there are no mapped parameters, set the running size total to zero. | 1794 // If there are no mapped parameters, set the running size total to zero. |
| 1795 // Otherwise, use the parameter map size calculated earlier. | 1795 // Otherwise, use the parameter map size calculated earlier. |
| 1796 __ Cmp(mapped_params, 0); | 1796 __ Cmp(mapped_params, 0); |
| 1797 __ CzeroX(size, eq); | 1797 __ CzeroX(size, eq); |
| 1798 | 1798 |
| 1799 // 2. Add the size of the backing store and arguments object. | 1799 // 2. Add the size of the backing store and arguments object. |
| 1800 __ Add(size, size, Operand(arg_count, LSL, kPointerSizeLog2)); | 1800 __ Add(size, size, Operand(arg_count, LSL, kPointerSizeLog2)); |
| 1801 __ Add(size, size, | 1801 __ Add(size, size, FixedArray::kHeaderSize + JSSloppyArgumentsObject::kSize); |
| 1802 FixedArray::kHeaderSize + Heap::kSloppyArgumentsObjectSize); | |
| 1803 | 1802 |
| 1804 // Do the allocation of all three objects in one go. Assign this to x0, as it | 1803 // Do the allocation of all three objects in one go. Assign this to x0, as it |
| 1805 // will be returned to the caller. | 1804 // will be returned to the caller. |
| 1806 Register alloc_obj = x0; | 1805 Register alloc_obj = x0; |
| 1807 __ Allocate(size, alloc_obj, x11, x12, &runtime, TAG_OBJECT); | 1806 __ Allocate(size, alloc_obj, x11, x12, &runtime, TAG_OBJECT); |
| 1808 | 1807 |
| 1809 // Get the arguments boilerplate from the current (global) context. | 1808 // Get the arguments boilerplate from the current (global) context. |
| 1810 | 1809 |
| 1811 // x0 alloc_obj pointer to allocated objects (param map, backing | 1810 // x0 alloc_obj pointer to allocated objects (param map, backing |
| 1812 // store, arguments) | 1811 // store, arguments) |
| (...skipping 18 matching lines...) Expand all Loading... |
| 1831 __ Cmp(mapped_params, 0); | 1830 __ Cmp(mapped_params, 0); |
| 1832 __ CmovX(sloppy_args_map, aliased_args_map, ne); | 1831 __ CmovX(sloppy_args_map, aliased_args_map, ne); |
| 1833 | 1832 |
| 1834 // Copy the JS object part. | 1833 // Copy the JS object part. |
| 1835 __ Str(sloppy_args_map, FieldMemOperand(alloc_obj, JSObject::kMapOffset)); | 1834 __ Str(sloppy_args_map, FieldMemOperand(alloc_obj, JSObject::kMapOffset)); |
| 1836 __ LoadRoot(x10, Heap::kEmptyFixedArrayRootIndex); | 1835 __ LoadRoot(x10, Heap::kEmptyFixedArrayRootIndex); |
| 1837 __ Str(x10, FieldMemOperand(alloc_obj, JSObject::kPropertiesOffset)); | 1836 __ Str(x10, FieldMemOperand(alloc_obj, JSObject::kPropertiesOffset)); |
| 1838 __ Str(x10, FieldMemOperand(alloc_obj, JSObject::kElementsOffset)); | 1837 __ Str(x10, FieldMemOperand(alloc_obj, JSObject::kElementsOffset)); |
| 1839 | 1838 |
| 1840 // Set up the callee in-object property. | 1839 // Set up the callee in-object property. |
| 1841 STATIC_ASSERT(Heap::kArgumentsCalleeIndex == 1); | |
| 1842 const int kCalleeOffset = JSObject::kHeaderSize + | |
| 1843 Heap::kArgumentsCalleeIndex * kPointerSize; | |
| 1844 __ AssertNotSmi(function); | 1840 __ AssertNotSmi(function); |
| 1845 __ Str(function, FieldMemOperand(alloc_obj, kCalleeOffset)); | 1841 __ Str(function, |
| 1842 FieldMemOperand(alloc_obj, JSSloppyArgumentsObject::kCalleeOffset)); |
| 1846 | 1843 |
| 1847 // Use the length and set that as an in-object property. | 1844 // Use the length and set that as an in-object property. |
| 1848 STATIC_ASSERT(Heap::kArgumentsLengthIndex == 0); | 1845 __ Str(arg_count_smi, |
| 1849 const int kLengthOffset = JSObject::kHeaderSize + | 1846 FieldMemOperand(alloc_obj, JSSloppyArgumentsObject::kLengthOffset)); |
| 1850 Heap::kArgumentsLengthIndex * kPointerSize; | |
| 1851 __ Str(arg_count_smi, FieldMemOperand(alloc_obj, kLengthOffset)); | |
| 1852 | 1847 |
| 1853 // Set up the elements pointer in the allocated arguments object. | 1848 // Set up the elements pointer in the allocated arguments object. |
| 1854 // If we allocated a parameter map, "elements" will point there, otherwise | 1849 // If we allocated a parameter map, "elements" will point there, otherwise |
| 1855 // it will point to the backing store. | 1850 // it will point to the backing store. |
| 1856 | 1851 |
| 1857 // x0 alloc_obj pointer to allocated objects (param map, backing | 1852 // x0 alloc_obj pointer to allocated objects (param map, backing |
| 1858 // store, arguments) | 1853 // store, arguments) |
| 1859 // x1 function function pointer | 1854 // x1 function function pointer |
| 1860 // x2 arg_count_smi number of function arguments (smi) | 1855 // x2 arg_count_smi number of function arguments (smi) |
| 1861 // x3 recv_arg pointer to receiver arguments | 1856 // x3 recv_arg pointer to receiver arguments |
| 1862 // x4 mapped_params number of mapped parameters, min(params, args) | 1857 // x4 mapped_params number of mapped parameters, min(params, args) |
| 1863 // x5 elements pointer to parameter map or backing store (uninit) | 1858 // x5 elements pointer to parameter map or backing store (uninit) |
| 1864 // x6 backing_store pointer to backing store (uninit) | 1859 // x6 backing_store pointer to backing store (uninit) |
| 1865 // x7 param_count number of function parameters | 1860 // x7 param_count number of function parameters |
| 1866 // x14 arg_count number of function arguments | 1861 // x14 arg_count number of function arguments |
| 1867 | 1862 |
| 1868 Register elements = x5; | 1863 Register elements = x5; |
| 1869 __ Add(elements, alloc_obj, Heap::kSloppyArgumentsObjectSize); | 1864 __ Add(elements, alloc_obj, JSSloppyArgumentsObject::kSize); |
| 1870 __ Str(elements, FieldMemOperand(alloc_obj, JSObject::kElementsOffset)); | 1865 __ Str(elements, FieldMemOperand(alloc_obj, JSObject::kElementsOffset)); |
| 1871 | 1866 |
| 1872 // Initialize parameter map. If there are no mapped arguments, we're done. | 1867 // Initialize parameter map. If there are no mapped arguments, we're done. |
| 1873 Label skip_parameter_map; | 1868 Label skip_parameter_map; |
| 1874 __ Cmp(mapped_params, 0); | 1869 __ Cmp(mapped_params, 0); |
| 1875 // Set up backing store address, because it is needed later for filling in | 1870 // Set up backing store address, because it is needed later for filling in |
| 1876 // the unmapped arguments. | 1871 // the unmapped arguments. |
| 1877 Register backing_store = x6; | 1872 Register backing_store = x6; |
| 1878 __ CmovX(backing_store, elements, eq); | 1873 __ CmovX(backing_store, elements, eq); |
| 1879 __ B(eq, &skip_parameter_map); | 1874 __ B(eq, &skip_parameter_map); |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1996 // Everything is fine, call runtime. | 1991 // Everything is fine, call runtime. |
| 1997 __ Push(receiver, key); | 1992 __ Push(receiver, key); |
| 1998 __ TailCallRuntime(Runtime::kLoadElementWithInterceptor); | 1993 __ TailCallRuntime(Runtime::kLoadElementWithInterceptor); |
| 1999 | 1994 |
| 2000 __ Bind(&slow); | 1995 __ Bind(&slow); |
| 2001 PropertyAccessCompiler::TailCallBuiltin( | 1996 PropertyAccessCompiler::TailCallBuiltin( |
| 2002 masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC)); | 1997 masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC)); |
| 2003 } | 1998 } |
| 2004 | 1999 |
| 2005 | 2000 |
| 2006 void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) { | |
| 2007 // x1 : function | |
| 2008 // x2 : number of parameters (tagged) | |
| 2009 // x3 : parameters pointer | |
| 2010 // | |
| 2011 // Returns pointer to result object in x0. | |
| 2012 | |
| 2013 DCHECK(x1.is(ArgumentsAccessNewDescriptor::function())); | |
| 2014 DCHECK(x2.is(ArgumentsAccessNewDescriptor::parameter_count())); | |
| 2015 DCHECK(x3.is(ArgumentsAccessNewDescriptor::parameter_pointer())); | |
| 2016 | |
| 2017 // Make an untagged copy of the parameter count. | |
| 2018 Register function = x1; | |
| 2019 Register param_count_smi = x2; | |
| 2020 Register params = x3; | |
| 2021 Register param_count = x13; | |
| 2022 __ SmiUntag(param_count, param_count_smi); | |
| 2023 | |
| 2024 // Test if arguments adaptor needed. | |
| 2025 Register caller_fp = x11; | |
| 2026 Register caller_ctx = x12; | |
| 2027 Label try_allocate, runtime; | |
| 2028 __ Ldr(caller_fp, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); | |
| 2029 __ Ldr(caller_ctx, MemOperand(caller_fp, | |
| 2030 StandardFrameConstants::kContextOffset)); | |
| 2031 __ Cmp(caller_ctx, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)); | |
| 2032 __ B(ne, &try_allocate); | |
| 2033 | |
| 2034 // x1 function function pointer | |
| 2035 // x2 param_count_smi number of parameters passed to function (smi) | |
| 2036 // x3 params pointer to parameters | |
| 2037 // x11 caller_fp caller's frame pointer | |
| 2038 // x13 param_count number of parameters passed to function | |
| 2039 | |
| 2040 // Patch the argument length and parameters pointer. | |
| 2041 __ Ldr(param_count_smi, | |
| 2042 MemOperand(caller_fp, | |
| 2043 ArgumentsAdaptorFrameConstants::kLengthOffset)); | |
| 2044 __ SmiUntag(param_count, param_count_smi); | |
| 2045 __ Add(x10, caller_fp, Operand(param_count, LSL, kPointerSizeLog2)); | |
| 2046 __ Add(params, x10, StandardFrameConstants::kCallerSPOffset); | |
| 2047 | |
| 2048 // Try the new space allocation. Start out with computing the size of the | |
| 2049 // arguments object and the elements array in words. | |
| 2050 Register size = x10; | |
| 2051 __ Bind(&try_allocate); | |
| 2052 __ Add(size, param_count, FixedArray::kHeaderSize / kPointerSize); | |
| 2053 __ Cmp(param_count, 0); | |
| 2054 __ CzeroX(size, eq); | |
| 2055 __ Add(size, size, Heap::kStrictArgumentsObjectSize / kPointerSize); | |
| 2056 | |
| 2057 // Do the allocation of both objects in one go. Assign this to x0, as it will | |
| 2058 // be returned to the caller. | |
| 2059 Register alloc_obj = x0; | |
| 2060 __ Allocate(size, alloc_obj, x11, x12, &runtime, | |
| 2061 static_cast<AllocationFlags>(TAG_OBJECT | SIZE_IN_WORDS)); | |
| 2062 | |
| 2063 // Get the arguments boilerplate from the current (native) context. | |
| 2064 Register strict_args_map = x4; | |
| 2065 __ LoadNativeContextSlot(Context::STRICT_ARGUMENTS_MAP_INDEX, | |
| 2066 strict_args_map); | |
| 2067 | |
| 2068 // x0 alloc_obj pointer to allocated objects: parameter array and | |
| 2069 // arguments object | |
| 2070 // x1 function function pointer | |
| 2071 // x2 param_count_smi number of parameters passed to function (smi) | |
| 2072 // x3 params pointer to parameters | |
| 2073 // x4 strict_args_map offset to arguments map | |
| 2074 // x13 param_count number of parameters passed to function | |
| 2075 __ Str(strict_args_map, FieldMemOperand(alloc_obj, JSObject::kMapOffset)); | |
| 2076 __ LoadRoot(x5, Heap::kEmptyFixedArrayRootIndex); | |
| 2077 __ Str(x5, FieldMemOperand(alloc_obj, JSObject::kPropertiesOffset)); | |
| 2078 __ Str(x5, FieldMemOperand(alloc_obj, JSObject::kElementsOffset)); | |
| 2079 | |
| 2080 // Set the smi-tagged length as an in-object property. | |
| 2081 STATIC_ASSERT(Heap::kArgumentsLengthIndex == 0); | |
| 2082 const int kLengthOffset = JSObject::kHeaderSize + | |
| 2083 Heap::kArgumentsLengthIndex * kPointerSize; | |
| 2084 __ Str(param_count_smi, FieldMemOperand(alloc_obj, kLengthOffset)); | |
| 2085 | |
| 2086 // If there are no actual arguments, we're done. | |
| 2087 Label done; | |
| 2088 __ Cbz(param_count, &done); | |
| 2089 | |
| 2090 // Set up the elements pointer in the allocated arguments object and | |
| 2091 // initialize the header in the elements fixed array. | |
| 2092 Register elements = x5; | |
| 2093 __ Add(elements, alloc_obj, Heap::kStrictArgumentsObjectSize); | |
| 2094 __ Str(elements, FieldMemOperand(alloc_obj, JSObject::kElementsOffset)); | |
| 2095 __ LoadRoot(x10, Heap::kFixedArrayMapRootIndex); | |
| 2096 __ Str(x10, FieldMemOperand(elements, FixedArray::kMapOffset)); | |
| 2097 __ Str(param_count_smi, FieldMemOperand(elements, FixedArray::kLengthOffset)); | |
| 2098 | |
| 2099 // x0 alloc_obj pointer to allocated objects: parameter array and | |
| 2100 // arguments object | |
| 2101 // x1 function function pointer | |
| 2102 // x2 param_count_smi number of parameters passed to function (smi) | |
| 2103 // x3 params pointer to parameters | |
| 2104 // x4 array pointer to array slot (uninit) | |
| 2105 // x5 elements pointer to elements array of alloc_obj | |
| 2106 // x13 param_count number of parameters passed to function | |
| 2107 | |
| 2108 // Copy the fixed array slots. | |
| 2109 Label loop; | |
| 2110 Register array = x4; | |
| 2111 // Set up pointer to first array slot. | |
| 2112 __ Add(array, elements, FixedArray::kHeaderSize - kHeapObjectTag); | |
| 2113 | |
| 2114 __ Bind(&loop); | |
| 2115 // Pre-decrement the parameters pointer by kPointerSize on each iteration. | |
| 2116 // Pre-decrement in order to skip receiver. | |
| 2117 __ Ldr(x10, MemOperand(params, -kPointerSize, PreIndex)); | |
| 2118 // Post-increment elements by kPointerSize on each iteration. | |
| 2119 __ Str(x10, MemOperand(array, kPointerSize, PostIndex)); | |
| 2120 __ Sub(param_count, param_count, 1); | |
| 2121 __ Cbnz(param_count, &loop); | |
| 2122 | |
| 2123 // Return from stub. | |
| 2124 __ Bind(&done); | |
| 2125 __ Ret(); | |
| 2126 | |
| 2127 // Do the runtime call to allocate the arguments object. | |
| 2128 __ Bind(&runtime); | |
| 2129 __ Push(function, params, param_count_smi); | |
| 2130 __ TailCallRuntime(Runtime::kNewStrictArguments); | |
| 2131 } | |
| 2132 | |
| 2133 | |
| 2134 void RegExpExecStub::Generate(MacroAssembler* masm) { | 2001 void RegExpExecStub::Generate(MacroAssembler* masm) { |
| 2135 #ifdef V8_INTERPRETED_REGEXP | 2002 #ifdef V8_INTERPRETED_REGEXP |
| 2136 __ TailCallRuntime(Runtime::kRegExpExec); | 2003 __ TailCallRuntime(Runtime::kRegExpExec); |
| 2137 #else // V8_INTERPRETED_REGEXP | 2004 #else // V8_INTERPRETED_REGEXP |
| 2138 | 2005 |
| 2139 // Stack frame on entry. | 2006 // Stack frame on entry. |
| 2140 // jssp[0]: last_match_info (expected JSArray) | 2007 // jssp[0]: last_match_info (expected JSArray) |
| 2141 // jssp[8]: previous index | 2008 // jssp[8]: previous index |
| 2142 // jssp[16]: subject string | 2009 // jssp[16]: subject string |
| 2143 // jssp[24]: JSRegExp object | 2010 // jssp[24]: JSRegExp object |
| (...skipping 3334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5478 __ CallRuntime(Runtime::kAllocateInNewSpace); | 5345 __ CallRuntime(Runtime::kAllocateInNewSpace); |
| 5479 __ Mov(x3, x0); | 5346 __ Mov(x3, x0); |
| 5480 __ Pop(x2, x0); | 5347 __ Pop(x2, x0); |
| 5481 __ SmiUntag(x0); | 5348 __ SmiUntag(x0); |
| 5482 } | 5349 } |
| 5483 __ B(&done_allocate); | 5350 __ B(&done_allocate); |
| 5484 } | 5351 } |
| 5485 } | 5352 } |
| 5486 | 5353 |
| 5487 | 5354 |
| 5355 void FastNewStrictArgumentsStub::Generate(MacroAssembler* masm) { |
| 5356 // ----------- S t a t e ------------- |
| 5357 // -- x1 : function |
| 5358 // -- cp : context |
| 5359 // -- fp : frame pointer |
| 5360 // -- lr : return address |
| 5361 // ----------------------------------- |
| 5362 __ AssertFunction(x1); |
| 5363 |
| 5364 // For Ignition we need to skip all possible handler/stub frames until |
| 5365 // we reach the JavaScript frame for the function (similar to what the |
| 5366 // runtime fallback implementation does). So make x2 point to that |
| 5367 // JavaScript frame. |
| 5368 { |
| 5369 Label loop, loop_entry; |
| 5370 __ Mov(x2, fp); |
| 5371 __ B(&loop_entry); |
| 5372 __ Bind(&loop); |
| 5373 __ Ldr(x2, MemOperand(x2, StandardFrameConstants::kCallerFPOffset)); |
| 5374 __ Bind(&loop_entry); |
| 5375 __ Ldr(x3, MemOperand(x2, StandardFrameConstants::kMarkerOffset)); |
| 5376 __ Cmp(x3, x1); |
| 5377 __ B(ne, &loop); |
| 5378 } |
| 5379 |
| 5380 // Check if we have an arguments adaptor frame below the function frame. |
| 5381 Label arguments_adaptor, arguments_done; |
| 5382 __ Ldr(x3, MemOperand(x2, StandardFrameConstants::kCallerFPOffset)); |
| 5383 __ Ldr(x4, MemOperand(x3, StandardFrameConstants::kContextOffset)); |
| 5384 __ Cmp(x4, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)); |
| 5385 __ B(eq, &arguments_adaptor); |
| 5386 { |
| 5387 __ Ldr(x1, FieldMemOperand(x1, JSFunction::kSharedFunctionInfoOffset)); |
| 5388 __ Ldrsw(x0, FieldMemOperand( |
| 5389 x1, SharedFunctionInfo::kFormalParameterCountOffset)); |
| 5390 __ Add(x2, x2, Operand(x0, LSL, kPointerSizeLog2)); |
| 5391 __ Add(x2, x2, StandardFrameConstants::kCallerSPOffset - 1 * kPointerSize); |
| 5392 } |
| 5393 __ B(&arguments_done); |
| 5394 __ Bind(&arguments_adaptor); |
| 5395 { |
| 5396 __ Ldrsw(x0, UntagSmiMemOperand( |
| 5397 x3, ArgumentsAdaptorFrameConstants::kLengthOffset)); |
| 5398 __ Add(x2, x3, Operand(x0, LSL, kPointerSizeLog2)); |
| 5399 __ Add(x2, x2, StandardFrameConstants::kCallerSPOffset - 1 * kPointerSize); |
| 5400 } |
| 5401 __ Bind(&arguments_done); |
| 5402 |
| 5403 // ----------- S t a t e ------------- |
| 5404 // -- cp : context |
| 5405 // -- x0 : number of rest parameters |
| 5406 // -- x2 : pointer to first rest parameters |
| 5407 // -- lr : return address |
| 5408 // ----------------------------------- |
| 5409 |
| 5410 // Allocate space for the strict arguments object plus the backing store. |
| 5411 Label allocate, done_allocate; |
| 5412 __ Mov(x1, JSStrictArgumentsObject::kSize + FixedArray::kHeaderSize); |
| 5413 __ Add(x1, x1, Operand(x0, LSL, kPointerSizeLog2)); |
| 5414 __ Allocate(x1, x3, x4, x5, &allocate, TAG_OBJECT); |
| 5415 __ Bind(&done_allocate); |
| 5416 |
| 5417 // Compute arguments.length in x6. |
| 5418 __ SmiTag(x6, x0); |
| 5419 |
| 5420 // Setup the elements array in x3. |
| 5421 __ LoadRoot(x1, Heap::kFixedArrayMapRootIndex); |
| 5422 __ Str(x1, FieldMemOperand(x3, FixedArray::kMapOffset)); |
| 5423 __ Str(x6, FieldMemOperand(x3, FixedArray::kLengthOffset)); |
| 5424 __ Add(x4, x3, FixedArray::kHeaderSize); |
| 5425 { |
| 5426 Label loop, done_loop; |
| 5427 __ Add(x0, x4, Operand(x0, LSL, kPointerSizeLog2)); |
| 5428 __ Bind(&loop); |
| 5429 __ Cmp(x4, x0); |
| 5430 __ B(eq, &done_loop); |
| 5431 __ Ldr(x5, MemOperand(x2, 0 * kPointerSize)); |
| 5432 __ Str(x5, FieldMemOperand(x4, 0 * kPointerSize)); |
| 5433 __ Sub(x2, x2, Operand(1 * kPointerSize)); |
| 5434 __ Add(x4, x4, Operand(1 * kPointerSize)); |
| 5435 __ B(&loop); |
| 5436 __ Bind(&done_loop); |
| 5437 } |
| 5438 |
| 5439 // Setup the strict arguments object in x0. |
| 5440 __ LoadNativeContextSlot(Context::STRICT_ARGUMENTS_MAP_INDEX, x1); |
| 5441 __ Str(x1, FieldMemOperand(x0, JSStrictArgumentsObject::kMapOffset)); |
| 5442 __ LoadRoot(x1, Heap::kEmptyFixedArrayRootIndex); |
| 5443 __ Str(x1, FieldMemOperand(x0, JSStrictArgumentsObject::kPropertiesOffset)); |
| 5444 __ Str(x3, FieldMemOperand(x0, JSStrictArgumentsObject::kElementsOffset)); |
| 5445 __ Str(x6, FieldMemOperand(x0, JSStrictArgumentsObject::kLengthOffset)); |
| 5446 STATIC_ASSERT(JSStrictArgumentsObject::kSize == 4 * kPointerSize); |
| 5447 __ Ret(); |
| 5448 |
| 5449 // Fall back to %AllocateInNewSpace. |
| 5450 __ Bind(&allocate); |
| 5451 { |
| 5452 FrameScope scope(masm, StackFrame::INTERNAL); |
| 5453 __ SmiTag(x0); |
| 5454 __ SmiTag(x1); |
| 5455 __ Push(x0, x2, x1); |
| 5456 __ CallRuntime(Runtime::kAllocateInNewSpace); |
| 5457 __ Mov(x3, x0); |
| 5458 __ Pop(x2, x0); |
| 5459 __ SmiUntag(x0); |
| 5460 } |
| 5461 __ B(&done_allocate); |
| 5462 } |
| 5463 |
| 5464 |
| 5488 void LoadGlobalViaContextStub::Generate(MacroAssembler* masm) { | 5465 void LoadGlobalViaContextStub::Generate(MacroAssembler* masm) { |
| 5489 Register context = cp; | 5466 Register context = cp; |
| 5490 Register result = x0; | 5467 Register result = x0; |
| 5491 Register slot = x2; | 5468 Register slot = x2; |
| 5492 Label slow_case; | 5469 Label slow_case; |
| 5493 | 5470 |
| 5494 // Go up the context chain to the script context. | 5471 // Go up the context chain to the script context. |
| 5495 for (int i = 0; i < depth(); ++i) { | 5472 for (int i = 0; i < depth(); ++i) { |
| 5496 __ Ldr(result, ContextMemOperand(context, Context::PREVIOUS_INDEX)); | 5473 __ Ldr(result, ContextMemOperand(context, Context::PREVIOUS_INDEX)); |
| 5497 context = result; | 5474 context = result; |
| (...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5985 return_value_operand, NULL); | 5962 return_value_operand, NULL); |
| 5986 } | 5963 } |
| 5987 | 5964 |
| 5988 | 5965 |
| 5989 #undef __ | 5966 #undef __ |
| 5990 | 5967 |
| 5991 } // namespace internal | 5968 } // namespace internal |
| 5992 } // namespace v8 | 5969 } // namespace v8 |
| 5993 | 5970 |
| 5994 #endif // V8_TARGET_ARCH_ARM64 | 5971 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |