Chromium Code Reviews| Index: src/compiler/ast-graph-builder.h |
| diff --git a/src/compiler/ast-graph-builder.h b/src/compiler/ast-graph-builder.h |
| index f851a3003665bb85f1f1e343e664352dbcb415d3..b7ed350e569f10b05ad93e24058695b821b1ca52 100644 |
| --- a/src/compiler/ast-graph-builder.h |
| +++ b/src/compiler/ast-graph-builder.h |
| @@ -384,6 +384,7 @@ class AstGraphBuilder::Environment : public ZoneObject { |
| int parameters_count() const { return parameters_count_; } |
| int locals_count() const { return locals_count_; } |
| + int context_chain_length() { return static_cast<int>(contexts_.size()); } |
| int stack_height() { |
| return static_cast<int>(values()->size()) - parameters_count_ - |
| locals_count_; |
| @@ -394,9 +395,11 @@ class AstGraphBuilder::Environment : public ZoneObject { |
| Node* Lookup(Variable* variable); |
| void MarkAllLocalsLive(); |
| + // Operations on the context chain. |
| Node* Context() const { return contexts_.back(); } |
| void PushContext(Node* context) { contexts()->push_back(context); } |
| void PopContext() { contexts()->pop_back(); } |
| + void TrimContext(int trim_to_length) { contexts()->resize(trim_to_length); } |
|
titzer
2015/04/02 11:03:28
TrimContextChain?
Michael Starzinger
2015/04/02 11:29:20
Done.
|
| // Operations on the operand stack. |
| void Push(Node* node) { |
| @@ -478,8 +481,6 @@ class AstGraphBuilder::Environment : public ZoneObject { |
| return CopyAndShareLiveness(); |
| } |
| - int ContextStackDepth() { return static_cast<int>(contexts_.size()); } |
| - |
| private: |
| AstGraphBuilder* builder_; |
| int parameters_count_; |