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

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

Issue 867093003: MIPS: convert compile-time checkable DCHECKs to STATIC_ASSERTs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | « src/mips/code-stubs-mips.cc ('k') | 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_MIPS64 7 #if V8_TARGET_ARCH_MIPS64
8 8
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 3975 matching lines...) Expand 10 before | Expand all | Expand 10 after
3986 // scratch0 points to properties hash. 3986 // scratch0 points to properties hash.
3987 // Compute the masked index: (hash + i + i * i) & mask. 3987 // Compute the masked index: (hash + i + i * i) & mask.
3988 Register index = scratch0; 3988 Register index = scratch0;
3989 // Capacity is smi 2^n. 3989 // Capacity is smi 2^n.
3990 __ SmiLoadUntag(index, FieldMemOperand(properties, kCapacityOffset)); 3990 __ SmiLoadUntag(index, FieldMemOperand(properties, kCapacityOffset));
3991 __ Dsubu(index, index, Operand(1)); 3991 __ Dsubu(index, index, Operand(1));
3992 __ And(index, index, 3992 __ And(index, index,
3993 Operand(name->Hash() + NameDictionary::GetProbeOffset(i))); 3993 Operand(name->Hash() + NameDictionary::GetProbeOffset(i)));
3994 3994
3995 // Scale the index by multiplying by the entry size. 3995 // Scale the index by multiplying by the entry size.
3996 DCHECK(NameDictionary::kEntrySize == 3); 3996 STATIC_ASSERT(NameDictionary::kEntrySize == 3);
3997 __ dsll(at, index, 1); 3997 __ dsll(at, index, 1);
3998 __ Daddu(index, index, at); // index *= 3. 3998 __ Daddu(index, index, at); // index *= 3.
3999 3999
4000 Register entity_name = scratch0; 4000 Register entity_name = scratch0;
4001 // Having undefined at this place means the name is not contained. 4001 // Having undefined at this place means the name is not contained.
4002 DCHECK_EQ(kSmiTagSize, 1); 4002 DCHECK_EQ(kSmiTagSize, 1);
4003 Register tmp = properties; 4003 Register tmp = properties;
4004 4004
4005 __ dsll(scratch0, index, kPointerSizeLog2); 4005 __ dsll(scratch0, index, kPointerSizeLog2);
4006 __ Daddu(tmp, properties, scratch0); 4006 __ Daddu(tmp, properties, scratch0);
(...skipping 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after
5182 kStackUnwindSpace, NULL, 5182 kStackUnwindSpace, NULL,
5183 MemOperand(fp, 6 * kPointerSize), NULL); 5183 MemOperand(fp, 6 * kPointerSize), NULL);
5184 } 5184 }
5185 5185
5186 5186
5187 #undef __ 5187 #undef __
5188 5188
5189 } } // namespace v8::internal 5189 } } // namespace v8::internal
5190 5190
5191 #endif // V8_TARGET_ARCH_MIPS64 5191 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698