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

Unified Diff: src/crankshaft/typing.h

Issue 2324783002: Include only stuff you need, part 9: variables.h (Closed)
Patch Set: rebased Created 4 years, 3 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/compiler/osr.cc ('k') | src/crankshaft/typing.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/typing.h
diff --git a/src/crankshaft/typing.h b/src/crankshaft/typing.h
index 707a268d0a668a7c3915dc48c8092784fd8fb33a..b21bfefc63bb4ef2ec0746bde6bdff168705a291 100644
--- a/src/crankshaft/typing.h
+++ b/src/crankshaft/typing.h
@@ -67,13 +67,7 @@ class AstTyper final : public AstVisitor<AstTyper> {
int parameter_index(int index) { return -index - 2; }
int stack_local_index(int index) { return index; }
- int variable_index(Variable* var) {
- // Stack locals have the range [0 .. l]
- // Parameters have the range [-1 .. p]
- // We map this to [-p-2 .. -1, 0 .. l]
- return var->IsStackLocal() ? stack_local_index(var->index()) :
- var->IsParameter() ? parameter_index(var->index()) : kNoVar;
- }
+ int variable_index(Variable* var);
void VisitDeclarations(ZoneList<Declaration*>* declarations);
void VisitStatements(ZoneList<Statement*>* statements);
« no previous file with comments | « src/compiler/osr.cc ('k') | src/crankshaft/typing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698