 Chromium Code Reviews
 Chromium Code Reviews Issue 865833002:
  Add missing BailoutId and FrameState to with statements.  (Closed) 
  Base URL: https://chromium.googlesource.com/v8/v8.git@master
    
  
    Issue 865833002:
  Add missing BailoutId and FrameState to with statements.  (Closed) 
  Base URL: https://chromium.googlesource.com/v8/v8.git@master| Index: src/ast.h | 
| diff --git a/src/ast.h b/src/ast.h | 
| index dd4941673f7bf164c1285778ef46a20fba007bf1..a797272cec2d42432c94e6a7f09ad02c64a9a0f8 100644 | 
| --- a/src/ast.h | 
| +++ b/src/ast.h | 
| @@ -1102,19 +1102,32 @@ class WithStatement FINAL : public Statement { | 
| Expression* expression() const { return expression_; } | 
| Statement* statement() const { return statement_; } | 
| + void set_base_id(int id) { base_id_ = id; } | 
| 
Benedikt Meurer
2015/01/22 10:35:17
There are no words to describe how ugly this is...
 | 
| + static int num_ids() { return parent_num_ids() + 1; } | 
| + BailoutId EntryId() const { return BailoutId(local_id(0)); } | 
| + | 
| protected: | 
| - WithStatement( | 
| - Zone* zone, Scope* scope, | 
| - Expression* expression, Statement* statement, int pos) | 
| + WithStatement(Zone* zone, Scope* scope, Expression* expression, | 
| + Statement* statement, int pos) | 
| : Statement(zone, pos), | 
| scope_(scope), | 
| expression_(expression), | 
| - statement_(statement) { } | 
| + statement_(statement), | 
| + base_id_(BailoutId::None().ToInt()) {} | 
| + static int parent_num_ids() { return 0; } | 
| + | 
| + int base_id() const { | 
| + DCHECK(!BailoutId(base_id_).IsNone()); | 
| + return base_id_; | 
| + } | 
| private: | 
| + int local_id(int n) const { return base_id() + parent_num_ids() + n; } | 
| + | 
| Scope* scope_; | 
| Expression* expression_; | 
| Statement* statement_; | 
| + int base_id_; | 
| }; |