| Index: src/compiler/ast-graph-builder.h
|
| diff --git a/src/compiler/ast-graph-builder.h b/src/compiler/ast-graph-builder.h
|
| index c79d9c37a2ea0e25c3af5cfcef0f9d2d14355726..aa874be5bdff7122b26fb78568d49b8536d6eaf3 100644
|
| --- a/src/compiler/ast-graph-builder.h
|
| +++ b/src/compiler/ast-graph-builder.h
|
| @@ -290,7 +290,7 @@ class AstGraphBuilder : public AstVisitor {
|
| void VisitForValues(ZoneList<Expression*>* exprs);
|
|
|
| // Common for all IterationStatement bodies.
|
| - void VisitIterationBody(IterationStatement* stmt, LoopBuilder* loop, int);
|
| + void VisitIterationBody(IterationStatement* stmt, LoopBuilder* loop);
|
|
|
| // Dispatched from VisitCallRuntime.
|
| void VisitCallJSRuntime(CallRuntime* expr);
|
| @@ -400,6 +400,11 @@ class AstGraphBuilder::Environment : public ZoneObject {
|
| DCHECK(depth >= 0 && depth <= stack_height());
|
| values()->erase(values()->end() - depth, values()->end());
|
| }
|
| + void Trim(int trim_to_height) {
|
| + int depth = stack_height() - trim_to_height;
|
| + DCHECK(depth >= 0 && depth <= stack_height());
|
| + values()->erase(values()->end() - depth, values()->end());
|
| + }
|
|
|
| // Preserve a checkpoint of the environment for the IR graph. Any
|
| // further mutation of the environment will not affect checkpoints.
|
|
|