Chromium Code Reviews| Index: runtime/vm/intermediate_language.h |
| diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h |
| index 280847c7f3fbb41833ab7caf66c386b965260151..02bdb6c0d6898df2f4483f9bff3593a0ae8d7f11 100644 |
| --- a/runtime/vm/intermediate_language.h |
| +++ b/runtime/vm/intermediate_language.h |
| @@ -1431,7 +1431,7 @@ FOR_EACH_INSTRUCTION(INSTRUCTION_TYPE_CHECK) |
| // Returns structure describing location constraints required |
| // to emit native code for this instruction. |
| - virtual LocationSummary* locs() const { |
| + virtual LocationSummary* locs() { |
| // TODO(vegorov): This should be pure virtual method. |
| // However we are temporary using NULL for instructions that |
| // were not converted to the location based code generation yet. |
| @@ -1651,7 +1651,7 @@ class DoInstr : public Instruction { |
| virtual void RecordAssignedVars(BitVector* assigned_vars); |
| - virtual LocationSummary* locs() const { |
| + virtual LocationSummary* locs() { |
| return computation()->locs(); |
| } |
| @@ -1702,7 +1702,7 @@ class BindInstr : public Instruction { |
| virtual void RecordAssignedVars(BitVector* assigned_vars); |
| - virtual LocationSummary* locs() const { |
| + virtual LocationSummary* locs() { |
| return computation()->locs(); |
| } |
| @@ -1748,7 +1748,8 @@ class ThrowInstr : public Instruction { |
| : token_index_(token_index), |
| try_index_(try_index), |
| exception_(exception), |
| - successor_(NULL) { |
| + successor_(NULL), |
| + locs_(NULL) { |
| ASSERT(exception_ != NULL); |
| } |
| @@ -1765,11 +1766,23 @@ class ThrowInstr : public Instruction { |
| ASSERT(successor_ == NULL); |
| } |
| + LocationSummary* locs() { |
| + if (locs_ == NULL) { |
| + locs_ = MakeLocationSummary(); |
| + } |
| + return locs_; |
| + } |
| + |
| + static LocationSummary* MakeLocationSummary(); |
| + |
| + virtual void EmitNativeCode(FlowGraphCompiler* compiler); |
| + |
| private: |
| const intptr_t token_index_; |
| const intptr_t try_index_; |
| Value* exception_; |
| Instruction* successor_; |
| + LocationSummary* locs_; |
| DISALLOW_COPY_AND_ASSIGN(ThrowInstr); |
| }; |
| @@ -1785,7 +1798,8 @@ class ReThrowInstr : public Instruction { |
| try_index_(try_index), |
| exception_(exception), |
| stack_trace_(stack_trace), |
| - successor_(NULL) { |
| + successor_(NULL), |
| + locs_(NULL) { |
| ASSERT(exception_ != NULL); |
| ASSERT(stack_trace_ != NULL); |
| } |
| @@ -1806,12 +1820,24 @@ class ReThrowInstr : public Instruction { |
| ASSERT(successor_ == NULL); |
| } |
| + LocationSummary* locs() { |
| + if (locs_ == NULL) { |
| + locs_ = MakeLocationSummary(); |
| + } |
| + return locs_; |
| + } |
| + |
| + static LocationSummary* MakeLocationSummary(); |
| + |
| + virtual void EmitNativeCode(FlowGraphCompiler* compiler); |
| + |
| private: |
| const intptr_t token_index_; |
| const intptr_t try_index_; |
| Value* exception_; |
| Value* stack_trace_; |
| Instruction* successor_; |
| + LocationSummary* locs_; |
|
Florian Schneider
2012/05/31 13:32:26
Can this be just a member of Instruction instead o
|
| DISALLOW_COPY_AND_ASSIGN(ReThrowInstr); |
| }; |