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

Unified Diff: src/ia32/ic-ia32.cc

Issue 1332003: Port number dictionary probing in generated code to ARM.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm/ic-arm.cc ('k') | src/x64/ic-x64.cc » ('j') | src/x64/ic-x64.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/ic-ia32.cc
===================================================================
--- src/ia32/ic-ia32.cc (revision 4252)
+++ src/ia32/ic-ia32.cc (working copy)
@@ -73,11 +73,10 @@
// Check for the absence of an interceptor.
// Load the map into r0.
__ mov(r0, FieldOperand(receiver, JSObject::kMapOffset));
- // Test the has_named_interceptor bit in the map.
- __ test(FieldOperand(r0, Map::kInstanceAttributesOffset),
- Immediate(1 << (Map::kHasNamedInterceptor + (3 * 8))));
- // Jump to miss if the interceptor bit is set.
+ // Bail out if the receiver has a named interceptor.
+ __ test(FieldOperand(r0, Map::kBitFieldOffset),
+ Immediate(1 << Map::kHasNamedInterceptor));
__ j(not_zero, miss_label, not_taken);
// Bail out if we have a JS global proxy object.
@@ -202,17 +201,10 @@
__ xor_(r0, Operand(r1));
// Compute capacity mask.
- const int kCapacityOffset =
- NumberDictionary::kHeaderSize +
- NumberDictionary::kCapacityIndex * kPointerSize;
- __ mov(r1, FieldOperand(elements, kCapacityOffset));
+ __ mov(r1, FieldOperand(elements, NumberDictionary::kCapacityOffset));
__ shr(r1, kSmiTagSize); // convert smi to int
__ dec(r1);
- const int kElementsStartOffset =
- NumberDictionary::kHeaderSize +
- NumberDictionary::kElementsStartIndex * kPointerSize;
-
// Generate an unrolled loop that performs a few probes before giving up.
const int kProbes = 4;
for (int i = 0; i < kProbes; i++) {
@@ -232,7 +224,7 @@
__ cmp(key, FieldOperand(elements,
r2,
times_pointer_size,
- kElementsStartOffset));
+ NumberDictionary::kElementsStartOffset));
if (i != (kProbes - 1)) {
__ j(equal, &done, taken);
} else {
@@ -242,14 +234,16 @@
__ bind(&done);
// Check that the value is a normal propety.
- const int kDetailsOffset = kElementsStartOffset + 2 * kPointerSize;
+ const int kDetailsOffset =
+ NumberDictionary::kElementsStartOffset + 2 * kPointerSize;
ASSERT_EQ(NORMAL, 0);
__ test(FieldOperand(elements, r2, times_pointer_size, kDetailsOffset),
Immediate(PropertyDetails::TypeField::mask() << kSmiTagSize));
__ j(not_zero, miss);
// Get the value at the masked, scaled index.
- const int kValueOffset = kElementsStartOffset + kPointerSize;
+ const int kValueOffset =
+ NumberDictionary::kElementsStartOffset + kPointerSize;
__ mov(key, FieldOperand(elements, r2, times_pointer_size, kValueOffset));
}
« no previous file with comments | « src/arm/ic-arm.cc ('k') | src/x64/ic-x64.cc » ('j') | src/x64/ic-x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698