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

Unified Diff: src/typing.h

Issue 105943007: Fix off-by-one error in AstTyper. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix comment Created 7 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 | « no previous file | test/mjsunit/regress/regress-param-local-type.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/typing.h
diff --git a/src/typing.h b/src/typing.h
index c942b0063278708d4c4828652ebd7d9365943717..6298e5a41b3d6824f45cc6879e408f48014ce9b0 100644
--- a/src/typing.h
+++ b/src/typing.h
@@ -84,7 +84,7 @@ class AstTyper: public AstVisitor {
int variable_index(Variable* var) {
return var->IsStackLocal() ? var->index() :
- var->IsParameter() ? -var->index() : kNoVar;
+ var->IsParameter() ? -var->index() - 1 : kNoVar;
}
void VisitDeclarations(ZoneList<Declaration*>* declarations);
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-param-local-type.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698