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

Side by Side Diff: src/arm/code-stubs-arm.cc

Issue 768113007: convert another DCHECK into a STATIC_ASSERT (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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 | « no previous file | no next file » | 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 "src/v8.h" 5 #include "src/v8.h"
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/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 3690 matching lines...) Expand 10 before | Expand all | Expand 10 after
3701 // scratch0 points to properties hash. 3701 // scratch0 points to properties hash.
3702 // Compute the masked index: (hash + i + i * i) & mask. 3702 // Compute the masked index: (hash + i + i * i) & mask.
3703 Register index = scratch0; 3703 Register index = scratch0;
3704 // Capacity is smi 2^n. 3704 // Capacity is smi 2^n.
3705 __ ldr(index, FieldMemOperand(properties, kCapacityOffset)); 3705 __ ldr(index, FieldMemOperand(properties, kCapacityOffset));
3706 __ sub(index, index, Operand(1)); 3706 __ sub(index, index, Operand(1));
3707 __ and_(index, index, Operand( 3707 __ and_(index, index, Operand(
3708 Smi::FromInt(name->Hash() + NameDictionary::GetProbeOffset(i)))); 3708 Smi::FromInt(name->Hash() + NameDictionary::GetProbeOffset(i))));
3709 3709
3710 // Scale the index by multiplying by the entry size. 3710 // Scale the index by multiplying by the entry size.
3711 DCHECK(NameDictionary::kEntrySize == 3); 3711 STATIC_ASSERT(NameDictionary::kEntrySize == 3);
3712 __ add(index, index, Operand(index, LSL, 1)); // index *= 3. 3712 __ add(index, index, Operand(index, LSL, 1)); // index *= 3.
3713 3713
3714 Register entity_name = scratch0; 3714 Register entity_name = scratch0;
3715 // Having undefined at this place means the name is not contained. 3715 // Having undefined at this place means the name is not contained.
3716 DCHECK_EQ(kSmiTagSize, 1); 3716 DCHECK_EQ(kSmiTagSize, 1);
3717 Register tmp = properties; 3717 Register tmp = properties;
3718 __ add(tmp, properties, Operand(index, LSL, 1)); 3718 __ add(tmp, properties, Operand(index, LSL, 1));
3719 __ ldr(entity_name, FieldMemOperand(tmp, kElementsStartOffset)); 3719 __ ldr(entity_name, FieldMemOperand(tmp, kElementsStartOffset));
3720 3720
3721 DCHECK(!tmp.is(entity_name)); 3721 DCHECK(!tmp.is(entity_name));
(...skipping 996 matching lines...) Expand 10 before | Expand all | Expand 10 after
4718 MemOperand(fp, 6 * kPointerSize), 4718 MemOperand(fp, 6 * kPointerSize),
4719 NULL); 4719 NULL);
4720 } 4720 }
4721 4721
4722 4722
4723 #undef __ 4723 #undef __
4724 4724
4725 } } // namespace v8::internal 4725 } } // namespace v8::internal
4726 4726
4727 #endif // V8_TARGET_ARCH_ARM 4727 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698