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

Side by Side Diff: src/arm/stub-cache-arm.cc

Issue 7043003: Version 3.3.8 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 9 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/assembler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1532 matching lines...) Expand 10 before | Expand all | Expand 10 after
1543 } else { 1543 } else {
1544 Label call_builtin; 1544 Label call_builtin;
1545 1545
1546 Register elements = r3; 1546 Register elements = r3;
1547 Register end_elements = r5; 1547 Register end_elements = r5;
1548 1548
1549 // Get the elements array of the object. 1549 // Get the elements array of the object.
1550 __ ldr(elements, FieldMemOperand(receiver, JSArray::kElementsOffset)); 1550 __ ldr(elements, FieldMemOperand(receiver, JSArray::kElementsOffset));
1551 1551
1552 // Check that the elements are in fast mode and writable. 1552 // Check that the elements are in fast mode and writable.
1553 __ CheckMap(elements, r0, 1553 __ CheckMap(elements,
1554 Heap::kFixedArrayMapRootIndex, &call_builtin, true); 1554 r0,
1555 Heap::kFixedArrayMapRootIndex,
1556 &call_builtin,
1557 DONT_DO_SMI_CHECK);
1555 1558
1556 if (argc == 1) { // Otherwise fall through to call the builtin. 1559 if (argc == 1) { // Otherwise fall through to call the builtin.
1557 Label exit, with_write_barrier, attempt_to_grow_elements; 1560 Label exit, with_write_barrier, attempt_to_grow_elements;
1558 1561
1559 // Get the array's length into r0 and calculate new length. 1562 // Get the array's length into r0 and calculate new length.
1560 __ ldr(r0, FieldMemOperand(receiver, JSArray::kLengthOffset)); 1563 __ ldr(r0, FieldMemOperand(receiver, JSArray::kLengthOffset));
1561 STATIC_ASSERT(kSmiTagSize == 1); 1564 STATIC_ASSERT(kSmiTagSize == 1);
1562 STATIC_ASSERT(kSmiTag == 0); 1565 STATIC_ASSERT(kSmiTag == 0);
1563 __ add(r0, r0, Operand(Smi::FromInt(argc))); 1566 __ add(r0, r0, Operand(Smi::FromInt(argc)));
1564 1567
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
1693 __ JumpIfSmi(receiver, &miss); 1696 __ JumpIfSmi(receiver, &miss);
1694 1697
1695 // Check that the maps haven't changed. 1698 // Check that the maps haven't changed.
1696 CheckPrototypes(JSObject::cast(object), 1699 CheckPrototypes(JSObject::cast(object),
1697 receiver, holder, elements, r4, r0, name, &miss); 1700 receiver, holder, elements, r4, r0, name, &miss);
1698 1701
1699 // Get the elements array of the object. 1702 // Get the elements array of the object.
1700 __ ldr(elements, FieldMemOperand(receiver, JSArray::kElementsOffset)); 1703 __ ldr(elements, FieldMemOperand(receiver, JSArray::kElementsOffset));
1701 1704
1702 // Check that the elements are in fast mode and writable. 1705 // Check that the elements are in fast mode and writable.
1703 __ CheckMap(elements, r0, Heap::kFixedArrayMapRootIndex, &call_builtin, true); 1706 __ CheckMap(elements,
1707 r0,
1708 Heap::kFixedArrayMapRootIndex,
1709 &call_builtin,
1710 DONT_DO_SMI_CHECK);
1704 1711
1705 // Get the array's length into r4 and calculate new length. 1712 // Get the array's length into r4 and calculate new length.
1706 __ ldr(r4, FieldMemOperand(receiver, JSArray::kLengthOffset)); 1713 __ ldr(r4, FieldMemOperand(receiver, JSArray::kLengthOffset));
1707 __ sub(r4, r4, Operand(Smi::FromInt(1)), SetCC); 1714 __ sub(r4, r4, Operand(Smi::FromInt(1)), SetCC);
1708 __ b(lt, &return_undefined); 1715 __ b(lt, &return_undefined);
1709 1716
1710 // Get the last element. 1717 // Get the last element.
1711 __ LoadRoot(r6, Heap::kTheHoleValueRootIndex); 1718 __ LoadRoot(r6, Heap::kTheHoleValueRootIndex);
1712 STATIC_ASSERT(kSmiTagSize == 1); 1719 STATIC_ASSERT(kSmiTagSize == 1);
1713 STATIC_ASSERT(kSmiTag == 0); 1720 STATIC_ASSERT(kSmiTag == 0);
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
2035 2042
2036 // Load the (only) argument into r0. 2043 // Load the (only) argument into r0.
2037 __ ldr(r0, MemOperand(sp, 0 * kPointerSize)); 2044 __ ldr(r0, MemOperand(sp, 0 * kPointerSize));
2038 2045
2039 // If the argument is a smi, just return. 2046 // If the argument is a smi, just return.
2040 STATIC_ASSERT(kSmiTag == 0); 2047 STATIC_ASSERT(kSmiTag == 0);
2041 __ tst(r0, Operand(kSmiTagMask)); 2048 __ tst(r0, Operand(kSmiTagMask));
2042 __ Drop(argc + 1, eq); 2049 __ Drop(argc + 1, eq);
2043 __ Ret(eq); 2050 __ Ret(eq);
2044 2051
2045 __ CheckMap(r0, r1, Heap::kHeapNumberMapRootIndex, &slow, true); 2052 __ CheckMap(r0, r1, Heap::kHeapNumberMapRootIndex, &slow, DONT_DO_SMI_CHECK);
2046 2053
2047 Label wont_fit_smi, no_vfp_exception, restore_fpscr_and_return; 2054 Label wont_fit_smi, no_vfp_exception, restore_fpscr_and_return;
2048 2055
2049 // If vfp3 is enabled, we use the fpu rounding with the RM (round towards 2056 // If vfp3 is enabled, we use the fpu rounding with the RM (round towards
2050 // minus infinity) mode. 2057 // minus infinity) mode.
2051 2058
2052 // Load the HeapNumber value. 2059 // Load the HeapNumber value.
2053 // We will need access to the value in the core registers, so we load it 2060 // We will need access to the value in the core registers, so we load it
2054 // with ldrd and move it to the fpu. It also spares a sub instruction for 2061 // with ldrd and move it to the fpu. It also spares a sub instruction for
2055 // updating the HeapNumber value address, as vldr expects a multiple 2062 // updating the HeapNumber value address, as vldr expects a multiple
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
2196 Label slow; 2203 Label slow;
2197 __ b(mi, &slow); 2204 __ b(mi, &slow);
2198 2205
2199 // Smi case done. 2206 // Smi case done.
2200 __ Drop(argc + 1); 2207 __ Drop(argc + 1);
2201 __ Ret(); 2208 __ Ret();
2202 2209
2203 // Check if the argument is a heap number and load its exponent and 2210 // Check if the argument is a heap number and load its exponent and
2204 // sign. 2211 // sign.
2205 __ bind(&not_smi); 2212 __ bind(&not_smi);
2206 __ CheckMap(r0, r1, Heap::kHeapNumberMapRootIndex, &slow, true); 2213 __ CheckMap(r0, r1, Heap::kHeapNumberMapRootIndex, &slow, DONT_DO_SMI_CHECK);
2207 __ ldr(r1, FieldMemOperand(r0, HeapNumber::kExponentOffset)); 2214 __ ldr(r1, FieldMemOperand(r0, HeapNumber::kExponentOffset));
2208 2215
2209 // Check the sign of the argument. If the argument is positive, 2216 // Check the sign of the argument. If the argument is positive,
2210 // just return it. 2217 // just return it.
2211 Label negative_sign; 2218 Label negative_sign;
2212 __ tst(r1, Operand(HeapNumber::kSignMask)); 2219 __ tst(r1, Operand(HeapNumber::kSignMask));
2213 __ b(ne, &negative_sign); 2220 __ b(ne, &negative_sign);
2214 __ Drop(argc + 1); 2221 __ Drop(argc + 1);
2215 __ Ret(); 2222 __ Ret();
2216 2223
(...skipping 1837 matching lines...) Expand 10 before | Expand all | Expand 10 after
4054 4061
4055 return GetCode(flags); 4062 return GetCode(flags);
4056 } 4063 }
4057 4064
4058 4065
4059 #undef __ 4066 #undef __
4060 4067
4061 } } // namespace v8::internal 4068 } } // namespace v8::internal
4062 4069
4063 #endif // V8_TARGET_ARCH_ARM 4070 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698