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

Unified Diff: src/heap.h

Issue 460142: Probe keyed load cache in generic keyed load stub.... (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') | src/ia32/ic-ia32.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.h
===================================================================
--- src/heap.h (revision 3428)
+++ src/heap.h (working copy)
@@ -1293,19 +1293,35 @@
// Clear the cache.
static void Clear();
+
+ static const int kLength = 64;
Erik Corry 2009/12/09 10:43:40 On a related note we should run a few performance
Mads Ager (chromium) 2009/12/10 09:18:18 Makes sense, yes.
+ 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') | src/ia32/ic-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698