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

Side by Side Diff: src/mips64/stub-cache-mips64.cc

Issue 401613003: Unravel kHeapObjectTagSize from the stub cache. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « src/mips/stub-cache-mips.cc ('k') | src/stub-cache.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 // 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/codegen.h" 9 #include "src/codegen.h"
10 #include "src/ic-inl.h" 10 #include "src/ic-inl.h"
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 // Check that the receiver isn't a smi. 190 // Check that the receiver isn't a smi.
191 __ JumpIfSmi(receiver, &miss); 191 __ JumpIfSmi(receiver, &miss);
192 192
193 // Get the map of the receiver and compute the hash. 193 // Get the map of the receiver and compute the hash.
194 __ ld(scratch, FieldMemOperand(name, Name::kHashFieldOffset)); 194 __ ld(scratch, FieldMemOperand(name, Name::kHashFieldOffset));
195 __ ld(at, FieldMemOperand(receiver, HeapObject::kMapOffset)); 195 __ ld(at, FieldMemOperand(receiver, HeapObject::kMapOffset));
196 __ Daddu(scratch, scratch, at); 196 __ Daddu(scratch, scratch, at);
197 uint64_t mask = kPrimaryTableSize - 1; 197 uint64_t mask = kPrimaryTableSize - 1;
198 // We shift out the last two bits because they are not part of the hash and 198 // We shift out the last two bits because they are not part of the hash and
199 // they are always 01 for maps. 199 // they are always 01 for maps.
200 __ dsrl(scratch, scratch, kHeapObjectTagSize); 200 __ dsrl(scratch, scratch, kCacheIndexShift);
201 __ Xor(scratch, scratch, Operand((flags >> kHeapObjectTagSize) & mask)); 201 __ Xor(scratch, scratch, Operand((flags >> kCacheIndexShift) & mask));
202 __ And(scratch, scratch, Operand(mask)); 202 __ And(scratch, scratch, Operand(mask));
203 203
204 // Probe the primary table. 204 // Probe the primary table.
205 ProbeTable(isolate, 205 ProbeTable(isolate,
206 masm, 206 masm,
207 flags, 207 flags,
208 kPrimary, 208 kPrimary,
209 receiver, 209 receiver,
210 name, 210 name,
211 scratch, 211 scratch,
212 extra, 212 extra,
213 extra2, 213 extra2,
214 extra3); 214 extra3);
215 215
216 // Primary miss: Compute hash for secondary probe. 216 // Primary miss: Compute hash for secondary probe.
217 __ dsrl(at, name, kHeapObjectTagSize); 217 __ dsrl(at, name, kCacheIndexShift);
218 __ Dsubu(scratch, scratch, at); 218 __ Dsubu(scratch, scratch, at);
219 uint64_t mask2 = kSecondaryTableSize - 1; 219 uint64_t mask2 = kSecondaryTableSize - 1;
220 __ Daddu(scratch, scratch, Operand((flags >> kHeapObjectTagSize) & mask2)); 220 __ Daddu(scratch, scratch, Operand((flags >> kCacheIndexShift) & mask2));
221 __ And(scratch, scratch, Operand(mask2)); 221 __ And(scratch, scratch, Operand(mask2));
222 222
223 // Probe the secondary table. 223 // Probe the secondary table.
224 ProbeTable(isolate, 224 ProbeTable(isolate,
225 masm, 225 masm,
226 flags, 226 flags,
227 kSecondary, 227 kSecondary,
228 receiver, 228 receiver,
229 name, 229 name,
230 scratch, 230 scratch,
(...skipping 1269 matching lines...) Expand 10 before | Expand all | Expand 10 after
1500 1500
1501 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 1501 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
1502 } 1502 }
1503 1503
1504 1504
1505 #undef __ 1505 #undef __
1506 1506
1507 } } // namespace v8::internal 1507 } } // namespace v8::internal
1508 1508
1509 #endif // V8_TARGET_ARCH_MIPS64 1509 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/stub-cache-mips.cc ('k') | src/stub-cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698