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

Side by Side Diff: src/ia32/macro-assembler-ia32.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/ia32/code-stubs-ia32.cc ('k') | src/ic/arm64/ic-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 #if V8_TARGET_ARCH_IA32 5 #if V8_TARGET_ARCH_IA32
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/base/division-by-constant.h" 8 #include "src/base/division-by-constant.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 3072 matching lines...) Expand 10 before | Expand all | Expand 10 after
3083 3083
3084 // The index is assumed to be untagged coming in, tag it to compare with the 3084 // The index is assumed to be untagged coming in, tag it to compare with the
3085 // string length without using a temp register, it is restored at the end of 3085 // string length without using a temp register, it is restored at the end of
3086 // this function. 3086 // this function.
3087 SmiTag(index); 3087 SmiTag(index);
3088 Check(no_overflow, kIndexIsTooLarge); 3088 Check(no_overflow, kIndexIsTooLarge);
3089 3089
3090 cmp(index, FieldOperand(string, String::kLengthOffset)); 3090 cmp(index, FieldOperand(string, String::kLengthOffset));
3091 Check(less, kIndexIsTooLarge); 3091 Check(less, kIndexIsTooLarge);
3092 3092
3093 cmp(index, Immediate(Smi::kZero)); 3093 cmp(index, Immediate(Smi::FromInt(0)));
3094 Check(greater_equal, kIndexIsNegative); 3094 Check(greater_equal, kIndexIsNegative);
3095 3095
3096 // Restore the index 3096 // Restore the index
3097 SmiUntag(index); 3097 SmiUntag(index);
3098 } 3098 }
3099 3099
3100 3100
3101 void MacroAssembler::PrepareCallCFunction(int num_arguments, Register scratch) { 3101 void MacroAssembler::PrepareCallCFunction(int num_arguments, Register scratch) {
3102 int frame_alignment = base::OS::ActivationFrameAlignment(); 3102 int frame_alignment = base::OS::ActivationFrameAlignment();
3103 if (frame_alignment != 0) { 3103 if (frame_alignment != 0) {
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
3336 cmp(edx, Immediate(Smi::FromInt(kInvalidEnumCacheSentinel))); 3336 cmp(edx, Immediate(Smi::FromInt(kInvalidEnumCacheSentinel)));
3337 j(equal, call_runtime); 3337 j(equal, call_runtime);
3338 3338
3339 jmp(&start); 3339 jmp(&start);
3340 3340
3341 bind(&next); 3341 bind(&next);
3342 mov(ebx, FieldOperand(ecx, HeapObject::kMapOffset)); 3342 mov(ebx, FieldOperand(ecx, HeapObject::kMapOffset));
3343 3343
3344 // For all objects but the receiver, check that the cache is empty. 3344 // For all objects but the receiver, check that the cache is empty.
3345 EnumLength(edx, ebx); 3345 EnumLength(edx, ebx);
3346 cmp(edx, Immediate(Smi::kZero)); 3346 cmp(edx, Immediate(Smi::FromInt(0)));
3347 j(not_equal, call_runtime); 3347 j(not_equal, call_runtime);
3348 3348
3349 bind(&start); 3349 bind(&start);
3350 3350
3351 // Check that there are no elements. Register rcx contains the current JS 3351 // Check that there are no elements. Register rcx contains the current JS
3352 // object we've reached through the prototype chain. 3352 // object we've reached through the prototype chain.
3353 Label no_elements; 3353 Label no_elements;
3354 mov(ecx, FieldOperand(ecx, JSObject::kElementsOffset)); 3354 mov(ecx, FieldOperand(ecx, JSObject::kElementsOffset));
3355 cmp(ecx, isolate()->factory()->empty_fixed_array()); 3355 cmp(ecx, isolate()->factory()->empty_fixed_array());
3356 j(equal, &no_elements); 3356 j(equal, &no_elements);
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
3457 mov(eax, dividend); 3457 mov(eax, dividend);
3458 shr(eax, 31); 3458 shr(eax, 31);
3459 add(edx, eax); 3459 add(edx, eax);
3460 } 3460 }
3461 3461
3462 3462
3463 } // namespace internal 3463 } // namespace internal
3464 } // namespace v8 3464 } // namespace v8
3465 3465
3466 #endif // V8_TARGET_ARCH_IA32 3466 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/ic/arm64/ic-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698