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

Side by Side Diff: src/s390/macro-assembler-s390.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/s390/code-stubs-s390.cc ('k') | src/snapshot/deserializer.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 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_S390 8 #if V8_TARGET_ARCH_S390
9 9
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 3153 matching lines...) Expand 10 before | Expand all | Expand 10 after
3164 b(&index_tag_ok); 3164 b(&index_tag_ok);
3165 bind(&index_tag_bad); 3165 bind(&index_tag_bad);
3166 Abort(kIndexIsTooLarge); 3166 Abort(kIndexIsTooLarge);
3167 bind(&index_tag_ok); 3167 bind(&index_tag_ok);
3168 #endif 3168 #endif
3169 3169
3170 LoadP(ip, FieldMemOperand(string, String::kLengthOffset)); 3170 LoadP(ip, FieldMemOperand(string, String::kLengthOffset));
3171 CmpP(index, ip); 3171 CmpP(index, ip);
3172 Check(lt, kIndexIsTooLarge); 3172 Check(lt, kIndexIsTooLarge);
3173 3173
3174 DCHECK(Smi::kZero == 0); 3174 DCHECK(Smi::FromInt(0) == 0);
3175 CmpP(index, Operand::Zero()); 3175 CmpP(index, Operand::Zero());
3176 Check(ge, kIndexIsNegative); 3176 Check(ge, kIndexIsNegative);
3177 3177
3178 SmiUntag(index, index); 3178 SmiUntag(index, index);
3179 } 3179 }
3180 3180
3181 void MacroAssembler::PrepareCallCFunction(int num_reg_arguments, 3181 void MacroAssembler::PrepareCallCFunction(int num_reg_arguments,
3182 int num_double_arguments, 3182 int num_double_arguments,
3183 Register scratch) { 3183 Register scratch) {
3184 int frame_alignment = ActivationFrameAlignment(); 3184 int frame_alignment = ActivationFrameAlignment();
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
3489 beq(call_runtime); 3489 beq(call_runtime);
3490 3490
3491 LoadRoot(null_value, Heap::kNullValueRootIndex); 3491 LoadRoot(null_value, Heap::kNullValueRootIndex);
3492 b(&start, Label::kNear); 3492 b(&start, Label::kNear);
3493 3493
3494 bind(&next); 3494 bind(&next);
3495 LoadP(r3, FieldMemOperand(r4, HeapObject::kMapOffset)); 3495 LoadP(r3, FieldMemOperand(r4, HeapObject::kMapOffset));
3496 3496
3497 // For all objects but the receiver, check that the cache is empty. 3497 // For all objects but the receiver, check that the cache is empty.
3498 EnumLength(r5, r3); 3498 EnumLength(r5, r3);
3499 CmpSmiLiteral(r5, Smi::kZero, r0); 3499 CmpSmiLiteral(r5, Smi::FromInt(0), r0);
3500 bne(call_runtime); 3500 bne(call_runtime);
3501 3501
3502 bind(&start); 3502 bind(&start);
3503 3503
3504 // Check that there are no elements. Register r4 contains the current JS 3504 // Check that there are no elements. Register r4 contains the current JS
3505 // object we've reached through the prototype chain. 3505 // object we've reached through the prototype chain.
3506 Label no_elements; 3506 Label no_elements;
3507 LoadP(r4, FieldMemOperand(r4, JSObject::kElementsOffset)); 3507 LoadP(r4, FieldMemOperand(r4, JSObject::kElementsOffset));
3508 CmpP(r4, empty_fixed_array_value); 3508 CmpP(r4, empty_fixed_array_value);
3509 beq(&no_elements, Label::kNear); 3509 beq(&no_elements, Label::kNear);
(...skipping 2023 matching lines...) Expand 10 before | Expand all | Expand 10 after
5533 } 5533 }
5534 if (mag.shift > 0) ShiftRightArith(result, result, Operand(mag.shift)); 5534 if (mag.shift > 0) ShiftRightArith(result, result, Operand(mag.shift));
5535 ExtractBit(r0, dividend, 31); 5535 ExtractBit(r0, dividend, 31);
5536 AddP(result, r0); 5536 AddP(result, r0);
5537 } 5537 }
5538 5538
5539 } // namespace internal 5539 } // namespace internal
5540 } // namespace v8 5540 } // namespace v8
5541 5541
5542 #endif // V8_TARGET_ARCH_S390 5542 #endif // V8_TARGET_ARCH_S390
OLDNEW
« no previous file with comments | « src/s390/code-stubs-s390.cc ('k') | src/snapshot/deserializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698