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

Unified Diff: src/scopeinfo.h

Issue 6685088: Merge isolates to bleeding_edge. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 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/scanner.cc ('k') | src/scopeinfo.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scopeinfo.h
===================================================================
--- src/scopeinfo.h (revision 7267)
+++ src/scopeinfo.h (working copy)
@@ -114,7 +114,7 @@
// Does this scope have an arguments shadow?
bool HasArgumentsShadow() {
- return StackSlotIndex(Heap::arguments_shadow_symbol()) >= 0;
+ return StackSlotIndex(GetHeap()->arguments_shadow_symbol()) >= 0;
}
// Return the number of stack slots for code.
@@ -173,28 +173,36 @@
public:
// Lookup context slot index for (data, name).
// If absent, kNotFound is returned.
- static int Lookup(Object* data,
- String* name,
- Variable::Mode* mode);
+ int Lookup(Object* data,
+ String* name,
+ Variable::Mode* mode);
// Update an element in the cache.
- static void Update(Object* data,
- String* name,
- Variable::Mode mode,
- int slot_index);
+ void Update(Object* data,
+ String* name,
+ Variable::Mode mode,
+ int slot_index);
// Clear the cache.
- static void Clear();
+ void Clear();
static const int kNotFound = -2;
private:
+ ContextSlotCache() {
+ for (int i = 0; i < kLength; ++i) {
+ keys_[i].data = NULL;
+ keys_[i].name = NULL;
+ values_[i] = kNotFound;
+ }
+ }
+
inline static int Hash(Object* data, String* name);
#ifdef DEBUG
- static void ValidateEntry(Object* data,
- String* name,
- Variable::Mode mode,
- int slot_index);
+ void ValidateEntry(Object* data,
+ String* name,
+ Variable::Mode mode,
+ int slot_index);
#endif
static const int kLength = 256;
@@ -228,8 +236,11 @@
uint32_t value_;
};
- static Key keys_[kLength];
- static uint32_t values_[kLength];
+ Key keys_[kLength];
+ uint32_t values_[kLength];
+
+ friend class Isolate;
+ DISALLOW_COPY_AND_ASSIGN(ContextSlotCache);
};
« no previous file with comments | « src/scanner.cc ('k') | src/scopeinfo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698