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

Unified Diff: src/ast/scopeinfo.cc

Issue 2280933002: Always deserialize scope infos for parsing (Closed)
Patch Set: updates Created 4 years, 4 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/ast/context-slot-cache.cc ('k') | src/ast/scopes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/scopeinfo.cc
diff --git a/src/ast/scopeinfo.cc b/src/ast/scopeinfo.cc
index a9e824f415bae54881eb5dc84c3787905418756c..c5c771f595a92e65b981c58d4cd46c81e2f3605d 100644
--- a/src/ast/scopeinfo.cc
+++ b/src/ast/scopeinfo.cc
@@ -4,7 +4,6 @@
#include <stdlib.h>
-#include "src/ast/context-slot-cache.h"
#include "src/ast/scopes.h"
#include "src/bootstrapper.h"
@@ -479,15 +478,6 @@ int ScopeInfo::ContextSlotIndex(Handle<ScopeInfo> scope_info,
DCHECK_NOT_NULL(maybe_assigned_flag);
if (scope_info->length() > 0) {
- ContextSlotCache* context_slot_cache =
- scope_info->GetIsolate()->context_slot_cache();
- int result = context_slot_cache->Lookup(*scope_info, *name, mode, init_flag,
- maybe_assigned_flag);
- if (result != ContextSlotCache::kNotFound) {
- DCHECK(result < scope_info->ContextLength());
- return result;
- }
-
int start = scope_info->ContextLocalNameEntriesIndex();
int end = start + scope_info->ContextLocalCount();
for (int i = start; i < end; ++i) {
@@ -496,17 +486,11 @@ int ScopeInfo::ContextSlotIndex(Handle<ScopeInfo> scope_info,
*mode = scope_info->ContextLocalMode(var);
*init_flag = scope_info->ContextLocalInitFlag(var);
*maybe_assigned_flag = scope_info->ContextLocalMaybeAssignedFlag(var);
- result = Context::MIN_CONTEXT_SLOTS + var;
-
- context_slot_cache->Update(scope_info, name, *mode, *init_flag,
- *maybe_assigned_flag, result);
+ int result = Context::MIN_CONTEXT_SLOTS + var;
DCHECK(result < scope_info->ContextLength());
return result;
}
}
- // Cache as not found. Mode, init flag and maybe assigned flag don't matter.
- context_slot_cache->Update(scope_info, name, TEMPORARY,
- kNeedsInitialization, kNotAssigned, -1);
}
return -1;
« no previous file with comments | « src/ast/context-slot-cache.cc ('k') | src/ast/scopes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698