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

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

Issue 1618613002: [for-in] Sanitize for-in optimizations and fix bailout points. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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/mips/macro-assembler-mips.h ('k') | src/mips64/macro-assembler-mips64.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 1
2 // Copyright 2012 the V8 project authors. All rights reserved. 2 // Copyright 2012 the V8 project authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 5
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_MIPS 8 #if V8_TARGET_ARCH_MIPS
9 9
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 5493 matching lines...) Expand 10 before | Expand all | Expand 10 after
5504 lw(dst, FieldMemOperand(holder, HeapObject::kMapOffset)); 5504 lw(dst, FieldMemOperand(holder, HeapObject::kMapOffset));
5505 LoadInstanceDescriptors(dst, dst); 5505 LoadInstanceDescriptors(dst, dst);
5506 lw(dst, 5506 lw(dst,
5507 FieldMemOperand(dst, DescriptorArray::GetValueOffset(accessor_index))); 5507 FieldMemOperand(dst, DescriptorArray::GetValueOffset(accessor_index)));
5508 int offset = accessor == ACCESSOR_GETTER ? AccessorPair::kGetterOffset 5508 int offset = accessor == ACCESSOR_GETTER ? AccessorPair::kGetterOffset
5509 : AccessorPair::kSetterOffset; 5509 : AccessorPair::kSetterOffset;
5510 lw(dst, FieldMemOperand(dst, offset)); 5510 lw(dst, FieldMemOperand(dst, offset));
5511 } 5511 }
5512 5512
5513 5513
5514 void MacroAssembler::CheckEnumCache(Register null_value, Label* call_runtime) { 5514 void MacroAssembler::CheckEnumCache(Label* call_runtime) {
5515 Register null_value = t1;
5515 Register empty_fixed_array_value = t2; 5516 Register empty_fixed_array_value = t2;
5516 LoadRoot(empty_fixed_array_value, Heap::kEmptyFixedArrayRootIndex); 5517 LoadRoot(empty_fixed_array_value, Heap::kEmptyFixedArrayRootIndex);
5517 Label next, start; 5518 Label next, start;
5518 mov(a2, a0); 5519 mov(a2, a0);
5519 5520
5520 // Check if the enum length field is properly initialized, indicating that 5521 // Check if the enum length field is properly initialized, indicating that
5521 // there is an enum cache. 5522 // there is an enum cache.
5522 lw(a1, FieldMemOperand(a2, HeapObject::kMapOffset)); 5523 lw(a1, FieldMemOperand(a2, HeapObject::kMapOffset));
5523 5524
5524 EnumLength(a3, a1); 5525 EnumLength(a3, a1);
5525 Branch( 5526 Branch(
5526 call_runtime, eq, a3, Operand(Smi::FromInt(kInvalidEnumCacheSentinel))); 5527 call_runtime, eq, a3, Operand(Smi::FromInt(kInvalidEnumCacheSentinel)));
5527 5528
5529 LoadRoot(null_value, Heap::kNullValueRootIndex);
5528 jmp(&start); 5530 jmp(&start);
5529 5531
5530 bind(&next); 5532 bind(&next);
5531 lw(a1, FieldMemOperand(a2, HeapObject::kMapOffset)); 5533 lw(a1, FieldMemOperand(a2, HeapObject::kMapOffset));
5532 5534
5533 // For all objects but the receiver, check that the cache is empty. 5535 // For all objects but the receiver, check that the cache is empty.
5534 EnumLength(a3, a1); 5536 EnumLength(a3, a1);
5535 Branch(call_runtime, ne, a3, Operand(Smi::FromInt(0))); 5537 Branch(call_runtime, ne, a3, Operand(Smi::FromInt(0)));
5536 5538
5537 bind(&start); 5539 bind(&start);
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
5766 if (mag.shift > 0) sra(result, result, mag.shift); 5768 if (mag.shift > 0) sra(result, result, mag.shift);
5767 srl(at, dividend, 31); 5769 srl(at, dividend, 31);
5768 Addu(result, result, Operand(at)); 5770 Addu(result, result, Operand(at));
5769 } 5771 }
5770 5772
5771 5773
5772 } // namespace internal 5774 } // namespace internal
5773 } // namespace v8 5775 } // namespace v8
5774 5776
5775 #endif // V8_TARGET_ARCH_MIPS 5777 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.h ('k') | src/mips64/macro-assembler-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698