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

Side by Side Diff: src/arm/macro-assembler-arm.cc

Issue 2396353002: Revert "Add Smi::Zero and replace all Smi::FromInt(0) calls" (Closed)
Patch Set: Created 4 years, 2 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 | « src/arm/code-stubs-arm.cc ('k') | src/arm64/code-stubs-arm64.cc » ('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 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 #include <limits.h> // For LONG_MIN, LONG_MAX. 5 #include <limits.h> // For LONG_MIN, LONG_MAX.
6 6
7 #if V8_TARGET_ARCH_ARM 7 #if V8_TARGET_ARCH_ARM
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/division-by-constant.h" 10 #include "src/base/division-by-constant.h"
(...skipping 3635 matching lines...) Expand 10 before | Expand all | Expand 10 after
3646 TrySmiTag(index, index, &index_tag_bad); 3646 TrySmiTag(index, index, &index_tag_bad);
3647 b(&index_tag_ok); 3647 b(&index_tag_ok);
3648 bind(&index_tag_bad); 3648 bind(&index_tag_bad);
3649 Abort(kIndexIsTooLarge); 3649 Abort(kIndexIsTooLarge);
3650 bind(&index_tag_ok); 3650 bind(&index_tag_ok);
3651 3651
3652 ldr(ip, FieldMemOperand(string, String::kLengthOffset)); 3652 ldr(ip, FieldMemOperand(string, String::kLengthOffset));
3653 cmp(index, ip); 3653 cmp(index, ip);
3654 Check(lt, kIndexIsTooLarge); 3654 Check(lt, kIndexIsTooLarge);
3655 3655
3656 cmp(index, Operand(Smi::kZero)); 3656 cmp(index, Operand(Smi::FromInt(0)));
3657 Check(ge, kIndexIsNegative); 3657 Check(ge, kIndexIsNegative);
3658 3658
3659 SmiUntag(index, index); 3659 SmiUntag(index, index);
3660 } 3660 }
3661 3661
3662 3662
3663 void MacroAssembler::PrepareCallCFunction(int num_reg_arguments, 3663 void MacroAssembler::PrepareCallCFunction(int num_reg_arguments,
3664 int num_double_arguments, 3664 int num_double_arguments,
3665 Register scratch) { 3665 Register scratch) {
3666 int frame_alignment = ActivationFrameAlignment(); 3666 int frame_alignment = ActivationFrameAlignment();
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
3936 b(eq, call_runtime); 3936 b(eq, call_runtime);
3937 3937
3938 LoadRoot(null_value, Heap::kNullValueRootIndex); 3938 LoadRoot(null_value, Heap::kNullValueRootIndex);
3939 jmp(&start); 3939 jmp(&start);
3940 3940
3941 bind(&next); 3941 bind(&next);
3942 ldr(r1, FieldMemOperand(r2, HeapObject::kMapOffset)); 3942 ldr(r1, FieldMemOperand(r2, HeapObject::kMapOffset));
3943 3943
3944 // For all objects but the receiver, check that the cache is empty. 3944 // For all objects but the receiver, check that the cache is empty.
3945 EnumLength(r3, r1); 3945 EnumLength(r3, r1);
3946 cmp(r3, Operand(Smi::kZero)); 3946 cmp(r3, Operand(Smi::FromInt(0)));
3947 b(ne, call_runtime); 3947 b(ne, call_runtime);
3948 3948
3949 bind(&start); 3949 bind(&start);
3950 3950
3951 // Check that there are no elements. Register r2 contains the current JS 3951 // Check that there are no elements. Register r2 contains the current JS
3952 // object we've reached through the prototype chain. 3952 // object we've reached through the prototype chain.
3953 Label no_elements; 3953 Label no_elements;
3954 ldr(r2, FieldMemOperand(r2, JSObject::kElementsOffset)); 3954 ldr(r2, FieldMemOperand(r2, JSObject::kElementsOffset));
3955 cmp(r2, empty_fixed_array_value); 3955 cmp(r2, empty_fixed_array_value);
3956 b(eq, &no_elements); 3956 b(eq, &no_elements);
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
4167 } 4167 }
4168 } 4168 }
4169 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); 4169 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift));
4170 add(result, result, Operand(dividend, LSR, 31)); 4170 add(result, result, Operand(dividend, LSR, 31));
4171 } 4171 }
4172 4172
4173 } // namespace internal 4173 } // namespace internal
4174 } // namespace v8 4174 } // namespace v8
4175 4175
4176 #endif // V8_TARGET_ARCH_ARM 4176 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/arm64/code-stubs-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698