Chromium Code Reviews| Index: src/full-codegen.h |
| diff --git a/src/full-codegen.h b/src/full-codegen.h |
| index ac74407e3f71fc80910eb8c30ae5c4dfb6884be1..d420cf7c0454ec74bfd5b45010cc0404a6317b02 100644 |
| --- a/src/full-codegen.h |
| +++ b/src/full-codegen.h |
| @@ -24,35 +24,6 @@ namespace internal { |
| // Forward declarations. |
| class JumpPatchSite; |
| -// AST node visitor which can tell whether a given statement will be breakable |
| -// when the code is compiled by the full compiler in the debugger. This means |
| -// that there will be an IC (load/store/call) in the code generated for the |
| -// debugger to piggybag on. |
| -class BreakableStatementChecker: public AstVisitor { |
| - public: |
| - BreakableStatementChecker(Isolate* isolate, Zone* zone) |
| - : is_breakable_(false) { |
| - InitializeAstVisitor(isolate, zone); |
| - } |
| - |
| - void Check(Statement* stmt); |
| - void Check(Expression* stmt); |
| - |
| - bool is_breakable() { return is_breakable_; } |
| - |
| - private: |
| - // AST node visit functions. |
| -#define DECLARE_VISIT(type) virtual void Visit##type(type* node) override; |
| - AST_NODE_LIST(DECLARE_VISIT) |
| -#undef DECLARE_VISIT |
| - |
| - bool is_breakable_; |
| - |
| - DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); |
| - DISALLOW_COPY_AND_ASSIGN(BreakableStatementChecker); |
| -}; |
| - |
| - |
| // ----------------------------------------------------------------------------- |
| // Full code generator. |
| @@ -688,9 +659,18 @@ class FullCodeGenerator: public AstVisitor { |
| void SetFunctionPosition(FunctionLiteral* fun); |
| void SetReturnPosition(FunctionLiteral* fun); |
| - void SetStatementPosition(Statement* stmt); |
| - void SetExpressionPosition(Expression* expr); |
| - void SetSourcePosition(int pos); |
| + |
| + enum InsertBreak { INSERT_BREAK, SKIP_BREAK }; |
| + |
| + void SetStatementPosition(Statement* stmt, |
|
ulan
2015/07/06 09:24:19
Can we make the insert_break explicit in SetStatem
Yang
2015/07/06 10:05:08
The background here is that we generally break at
|
| + InsertBreak insert_break = INSERT_BREAK); |
| + |
| + void SetExpressionPosition(Expression* expr, |
| + InsertBreak insert_break = SKIP_BREAK); |
| + |
| + // Emit statement position for an expression. Used in loop headers where we |
| + // want to be able to break at the header for each iteration. |
| + void SetExpressionAsStatementPosition(Expression* expr); |
| // Non-local control flow support. |
| void EnterTryBlock(int handler_index, Label* handler); |