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

Unified Diff: src/heap.h

Issue 491004: Reapply keyed load cache probing in generated code. I introduced a... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years 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/assembler.cc ('k') | src/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.h
===================================================================
--- src/heap.h (revision 3447)
+++ src/heap.h (working copy)
@@ -1300,19 +1300,35 @@
// Clear the cache.
static void Clear();
+
+ static const int kLength = 64;
+ static const int kCapacityMask = kLength - 1;
+ static const int kMapHashShift = 2;
+
private:
static inline int Hash(Map* map, String* name);
- static const int kLength = 64;
+
+ // Get the address of the keys and field_offsets arrays. Used in
+ // generated code to perform cache lookups.
+ static Address keys_address() {
+ return reinterpret_cast<Address>(&keys_);
+ }
+
+ static Address field_offsets_address() {
+ return reinterpret_cast<Address>(&field_offsets_);
+ }
+
struct Key {
Map* map;
String* name;
};
static Key keys_[kLength];
static int field_offsets_[kLength];
+
+ friend class ExternalReference;
};
-
// Cache for mapping (array, property name) into descriptor index.
// The cache contains both positive and negative results.
// Descriptor index equals kNotFound means the property is absent.
« no previous file with comments | « src/assembler.cc ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698