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

Side by Side Diff: src/ppc/macro-assembler-ppc.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/ppc/code-stubs-ppc.cc ('k') | src/property.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 <assert.h> // For assert 5 #include <assert.h> // For assert
6 #include <limits.h> // For LONG_MIN, LONG_MAX. 6 #include <limits.h> // For LONG_MIN, LONG_MAX.
7 7
8 #if V8_TARGET_ARCH_PPC 8 #if V8_TARGET_ARCH_PPC
9 9
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 3433 matching lines...) Expand 10 before | Expand all | Expand 10 after
3444 b(&index_tag_ok); 3444 b(&index_tag_ok);
3445 bind(&index_tag_bad); 3445 bind(&index_tag_bad);
3446 Abort(kIndexIsTooLarge); 3446 Abort(kIndexIsTooLarge);
3447 bind(&index_tag_ok); 3447 bind(&index_tag_ok);
3448 #endif 3448 #endif
3449 3449
3450 LoadP(ip, FieldMemOperand(string, String::kLengthOffset)); 3450 LoadP(ip, FieldMemOperand(string, String::kLengthOffset));
3451 cmp(index, ip); 3451 cmp(index, ip);
3452 Check(lt, kIndexIsTooLarge); 3452 Check(lt, kIndexIsTooLarge);
3453 3453
3454 DCHECK(Smi::kZero == 0); 3454 DCHECK(Smi::FromInt(0) == 0);
3455 cmpi(index, Operand::Zero()); 3455 cmpi(index, Operand::Zero());
3456 Check(ge, kIndexIsNegative); 3456 Check(ge, kIndexIsNegative);
3457 3457
3458 SmiUntag(index, index); 3458 SmiUntag(index, index);
3459 } 3459 }
3460 3460
3461 3461
3462 void MacroAssembler::PrepareCallCFunction(int num_reg_arguments, 3462 void MacroAssembler::PrepareCallCFunction(int num_reg_arguments,
3463 int num_double_arguments, 3463 int num_double_arguments,
3464 Register scratch) { 3464 Register scratch) {
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
3821 beq(call_runtime); 3821 beq(call_runtime);
3822 3822
3823 LoadRoot(null_value, Heap::kNullValueRootIndex); 3823 LoadRoot(null_value, Heap::kNullValueRootIndex);
3824 b(&start); 3824 b(&start);
3825 3825
3826 bind(&next); 3826 bind(&next);
3827 LoadP(r4, FieldMemOperand(r5, HeapObject::kMapOffset)); 3827 LoadP(r4, FieldMemOperand(r5, HeapObject::kMapOffset));
3828 3828
3829 // For all objects but the receiver, check that the cache is empty. 3829 // For all objects but the receiver, check that the cache is empty.
3830 EnumLength(r6, r4); 3830 EnumLength(r6, r4);
3831 CmpSmiLiteral(r6, Smi::kZero, r0); 3831 CmpSmiLiteral(r6, Smi::FromInt(0), r0);
3832 bne(call_runtime); 3832 bne(call_runtime);
3833 3833
3834 bind(&start); 3834 bind(&start);
3835 3835
3836 // Check that there are no elements. Register r5 contains the current JS 3836 // Check that there are no elements. Register r5 contains the current JS
3837 // object we've reached through the prototype chain. 3837 // object we've reached through the prototype chain.
3838 Label no_elements; 3838 Label no_elements;
3839 LoadP(r5, FieldMemOperand(r5, JSObject::kElementsOffset)); 3839 LoadP(r5, FieldMemOperand(r5, JSObject::kElementsOffset));
3840 cmp(r5, empty_fixed_array_value); 3840 cmp(r5, empty_fixed_array_value);
3841 beq(&no_elements); 3841 beq(&no_elements);
(...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after
4875 } 4875 }
4876 if (mag.shift > 0) srawi(result, result, mag.shift); 4876 if (mag.shift > 0) srawi(result, result, mag.shift);
4877 ExtractBit(r0, dividend, 31); 4877 ExtractBit(r0, dividend, 31);
4878 add(result, result, r0); 4878 add(result, result, r0);
4879 } 4879 }
4880 4880
4881 } // namespace internal 4881 } // namespace internal
4882 } // namespace v8 4882 } // namespace v8
4883 4883
4884 #endif // V8_TARGET_ARCH_PPC 4884 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/ppc/code-stubs-ppc.cc ('k') | src/property.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698