Index: src/typing.h |
diff --git a/src/typing.h b/src/typing.h |
index a111ae5fd1594d14868ba2db80df27a34e2caf1e..ec9132f161e9bbf808ab99e675bef7258f3ef3f2 100644 |
--- a/src/typing.h |
+++ b/src/typing.h |
@@ -58,6 +58,9 @@ class AstTyper: public AstVisitor { |
private: |
explicit AstTyper(CompilationInfo* info); |
+ Effect ObservedOnStack(Object* value); |
+ void ObserveTypesAtOsrEntry(IterationStatement* stmt); |
+ |
static const int kNoVar = INT_MIN; |
typedef v8::internal::Effects<int, kNoVar> Effects; |
typedef v8::internal::NestedEffects<int, kNoVar> Store; |
@@ -82,12 +85,15 @@ class AstTyper: public AstVisitor { |
} |
void ExitEffects() { store_ = store_.Pop(); } |
+ 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() ? var->index() : |
- var->IsParameter() ? -var->index() - 2 : kNoVar; |
+ return var->IsStackLocal() ? stack_local_index(var->index()) : |
+ var->IsParameter() ? parameter_index(var->index()) : kNoVar; |
} |
void VisitDeclarations(ZoneList<Declaration*>* declarations); |