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

Side by Side Diff: src/arm64/stub-cache-arm64.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/arm/stub-cache-arm.cc ('k') | src/ia32/stub-cache-ia32.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 7 #if V8_TARGET_ARCH_ARM64
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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 170
171 // Check that the receiver isn't a smi. 171 // Check that the receiver isn't a smi.
172 __ JumpIfSmi(receiver, &miss); 172 __ JumpIfSmi(receiver, &miss);
173 173
174 // Compute the hash for primary table. 174 // Compute the hash for primary table.
175 __ Ldr(scratch, FieldMemOperand(name, Name::kHashFieldOffset)); 175 __ Ldr(scratch, FieldMemOperand(name, Name::kHashFieldOffset));
176 __ Ldr(extra, FieldMemOperand(receiver, HeapObject::kMapOffset)); 176 __ Ldr(extra, FieldMemOperand(receiver, HeapObject::kMapOffset));
177 __ Add(scratch, scratch, extra); 177 __ Add(scratch, scratch, extra);
178 __ Eor(scratch, scratch, flags); 178 __ Eor(scratch, scratch, flags);
179 // We shift out the last two bits because they are not part of the hash. 179 // We shift out the last two bits because they are not part of the hash.
180 __ Ubfx(scratch, scratch, kHeapObjectTagSize, 180 __ Ubfx(scratch, scratch, kCacheIndexShift,
181 CountTrailingZeros(kPrimaryTableSize, 64)); 181 CountTrailingZeros(kPrimaryTableSize, 64));
182 182
183 // Probe the primary table. 183 // Probe the primary table.
184 ProbeTable(isolate, masm, flags, kPrimary, receiver, name, 184 ProbeTable(isolate, masm, flags, kPrimary, receiver, name,
185 scratch, extra, extra2, extra3); 185 scratch, extra, extra2, extra3);
186 186
187 // Primary miss: Compute hash for secondary table. 187 // Primary miss: Compute hash for secondary table.
188 __ Sub(scratch, scratch, Operand(name, LSR, kHeapObjectTagSize)); 188 __ Sub(scratch, scratch, Operand(name, LSR, kCacheIndexShift));
189 __ Add(scratch, scratch, flags >> kHeapObjectTagSize); 189 __ Add(scratch, scratch, flags >> kCacheIndexShift);
190 __ And(scratch, scratch, kSecondaryTableSize - 1); 190 __ And(scratch, scratch, kSecondaryTableSize - 1);
191 191
192 // Probe the secondary table. 192 // Probe the secondary table.
193 ProbeTable(isolate, masm, flags, kSecondary, receiver, name, 193 ProbeTable(isolate, masm, flags, kSecondary, receiver, name,
194 scratch, extra, extra2, extra3); 194 scratch, extra, extra2, extra3);
195 195
196 // Cache miss: Fall-through and let caller handle the miss by 196 // Cache miss: Fall-through and let caller handle the miss by
197 // entering the runtime system. 197 // entering the runtime system.
198 __ Bind(&miss); 198 __ Bind(&miss);
199 __ IncrementCounter(counters->megamorphic_stub_cache_misses(), 1, 199 __ IncrementCounter(counters->megamorphic_stub_cache_misses(), 1,
(...skipping 1277 matching lines...) Expand 10 before | Expand all | Expand 10 after
1477 1477
1478 // Miss case, call the runtime. 1478 // Miss case, call the runtime.
1479 __ Bind(&miss); 1479 __ Bind(&miss);
1480 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 1480 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
1481 } 1481 }
1482 1482
1483 1483
1484 } } // namespace v8::internal 1484 } } // namespace v8::internal
1485 1485
1486 #endif // V8_TARGET_ARCH_ARM64 1486 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698