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

Unified Diff: src/scopeinfo.cc

Issue 2816006: [Isolates] KeyedLookupCache / DescriptorLookupCache / ContextSlotCache moved to Isolate. (Closed)
Patch Set: Created 10 years, 6 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/scopeinfo.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scopeinfo.cc
diff --git a/src/scopeinfo.cc b/src/scopeinfo.cc
index 651e4e982fb9d25528dba934b4458ee8e350b080..8d7f861d3a7e004da3494910c085d1d554533ff3 100644
--- a/src/scopeinfo.cc
+++ b/src/scopeinfo.cc
@@ -431,7 +431,8 @@ int ScopeInfo<Allocator>::ContextSlotIndex(Code* code,
String* name,
Variable::Mode* mode) {
ASSERT(name->IsSymbol());
- int result = ContextSlotCache::Lookup(code, name, mode);
+ Isolate* isolate = Isolate::Current();
+ int result = isolate->context_slot_cache()->Lookup(code, name, mode);
if (result != ContextSlotCache::kNotFound) return result;
if (code->sinfo_size() > 0) {
// Loop below depends on the NULL sentinel after the context slot names.
@@ -450,13 +451,13 @@ int ScopeInfo<Allocator>::ContextSlotIndex(Code* code,
Variable::Mode mode_value = static_cast<Variable::Mode>(v);
if (mode != NULL) *mode = mode_value;
result = static_cast<int>((p - p0) >> 1) + Context::MIN_CONTEXT_SLOTS;
- ContextSlotCache::Update(code, name, mode_value, result);
+ isolate->context_slot_cache()->Update(code, name, mode_value, result);
return result;
}
p += 2;
}
}
- ContextSlotCache::Update(code, name, Variable::INTERNAL, -1);
+ isolate->context_slot_cache()->Update(code, name, Variable::INTERNAL, -1);
return -1;
}
@@ -579,12 +580,6 @@ void ContextSlotCache::Clear() {
}
-ContextSlotCache::Key ContextSlotCache::keys_[ContextSlotCache::kLength];
-
-
-uint32_t ContextSlotCache::values_[ContextSlotCache::kLength];
-
-
#ifdef DEBUG
void ContextSlotCache::ValidateEntry(Code* code,
« no previous file with comments | « src/scopeinfo.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698