Chromium Code Reviews| Index: src/compiler/instruction.h |
| diff --git a/src/compiler/instruction.h b/src/compiler/instruction.h |
| index 98c85bc89d24e30c033cef10cc409954bf8ef0b2..47497265caa4285a0cfb0c2154cfdbe87f139176 100644 |
| --- a/src/compiler/instruction.h |
| +++ b/src/compiler/instruction.h |
| @@ -702,24 +702,38 @@ class Constant V8_FINAL { |
| class FrameStateDescriptor : public ZoneObject { |
| public: |
| FrameStateDescriptor(BailoutId bailout_id, int parameters_count, |
| - int locals_count, int stack_count) |
| + int locals_count, int stack_count, |
| + FrameStateDescriptor* parent = NULL) |
|
Jarin
2014/08/29 15:07:07
Perhaps rename 'parent -> 'outer_state' (or 'outer
sigurds
2014/09/01 08:48:18
Done.
|
| : bailout_id_(bailout_id), |
| parameters_count_(parameters_count), |
| locals_count_(locals_count), |
| - stack_count_(stack_count) {} |
| + stack_count_(stack_count), |
| + parent_(parent) {} |
| BailoutId bailout_id() const { return bailout_id_; } |
| int parameters_count() { return parameters_count_; } |
| int locals_count() { return locals_count_; } |
| int stack_count() { return stack_count_; } |
| + FrameStateDescriptor* parent() { return parent_; } |
| + void set_parent(FrameStateDescriptor* parent) { parent_ = parent; } |
| int size() { return parameters_count_ + locals_count_ + stack_count_; } |
| + int GetFrameCount() { |
| + int count = 0; |
| + for (FrameStateDescriptor* iter = this; iter != NULL; |
| + iter = iter->parent_) { |
| + ++count; |
| + } |
| + return count; |
| + } |
| + |
| private: |
| BailoutId bailout_id_; |
| int parameters_count_; |
| int locals_count_; |
| int stack_count_; |
| + FrameStateDescriptor* parent_; |
| }; |
| OStream& operator<<(OStream& os, const Constant& constant); |