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

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

Issue 768683006: convert compile-time checkable DCHECKs to STATIC_ASSERTs (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase on master Created 5 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 | « no previous file | src/code-stubs-hydrogen.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 #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 3726 matching lines...) Expand 10 before | Expand all | Expand 10 after
3737 // scratch0 points to properties hash. 3737 // scratch0 points to properties hash.
3738 // Compute the masked index: (hash + i + i * i) & mask. 3738 // Compute the masked index: (hash + i + i * i) & mask.
3739 Register index = scratch0; 3739 Register index = scratch0;
3740 // Capacity is smi 2^n. 3740 // Capacity is smi 2^n.
3741 __ ldr(index, FieldMemOperand(properties, kCapacityOffset)); 3741 __ ldr(index, FieldMemOperand(properties, kCapacityOffset));
3742 __ sub(index, index, Operand(1)); 3742 __ sub(index, index, Operand(1));
3743 __ and_(index, index, Operand( 3743 __ and_(index, index, Operand(
3744 Smi::FromInt(name->Hash() + NameDictionary::GetProbeOffset(i)))); 3744 Smi::FromInt(name->Hash() + NameDictionary::GetProbeOffset(i))));
3745 3745
3746 // Scale the index by multiplying by the entry size. 3746 // Scale the index by multiplying by the entry size.
3747 DCHECK(NameDictionary::kEntrySize == 3); 3747 STATIC_ASSERT(NameDictionary::kEntrySize == 3);
3748 __ add(index, index, Operand(index, LSL, 1)); // index *= 3. 3748 __ add(index, index, Operand(index, LSL, 1)); // index *= 3.
3749 3749
3750 Register entity_name = scratch0; 3750 Register entity_name = scratch0;
3751 // Having undefined at this place means the name is not contained. 3751 // Having undefined at this place means the name is not contained.
3752 DCHECK_EQ(kSmiTagSize, 1); 3752 DCHECK_EQ(kSmiTagSize, 1);
3753 Register tmp = properties; 3753 Register tmp = properties;
3754 __ add(tmp, properties, Operand(index, LSL, 1)); 3754 __ add(tmp, properties, Operand(index, LSL, 1));
3755 __ ldr(entity_name, FieldMemOperand(tmp, kElementsStartOffset)); 3755 __ ldr(entity_name, FieldMemOperand(tmp, kElementsStartOffset));
3756 3756
3757 DCHECK(!tmp.is(entity_name)); 3757 DCHECK(!tmp.is(entity_name));
(...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after
4928 kStackUnwindSpace, NULL, 4928 kStackUnwindSpace, NULL,
4929 MemOperand(fp, 6 * kPointerSize), NULL); 4929 MemOperand(fp, 6 * kPointerSize), NULL);
4930 } 4930 }
4931 4931
4932 4932
4933 #undef __ 4933 #undef __
4934 4934
4935 } } // namespace v8::internal 4935 } } // namespace v8::internal
4936 4936
4937 #endif // V8_TARGET_ARCH_ARM 4937 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698