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

Unified Diff: src/scopeinfo.cc

Issue 1215423002: Fix ScopeInfo::StackSlotIndex to skip over non-locals (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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/objects.h ('k') | src/scopes.cc » ('j') | 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 f77ef96ebac4cd8da6bd33f1bd58936a021f354f..c82a6792fc665a755284d0c16753be755aecb74f 100644
--- a/src/scopeinfo.cc
+++ b/src/scopeinfo.cc
@@ -467,11 +467,11 @@ int ScopeInfo::StrongModeFreeVariableEndPosition(int var) {
}
-int ScopeInfo::StackSlotIndex(String* name) {
+int ScopeInfo::StackLocalSlotIndex(String* name) {
DCHECK(name->IsInternalizedString());
if (length() > 0) {
int first_slot_index = Smi::cast(get(StackLocalFirstSlotIndex()))->value();
- int start = StackLocalEntriesIndex();
+ int start = StackLocalEntriesIndex() + first_slot_index;
int end = StackLocalEntriesIndex() + StackLocalCount();
for (int i = start; i < end; ++i) {
if (name == get(i)) {
« no previous file with comments | « src/objects.h ('k') | src/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698