Index: src/compiler/instruction.h |
diff --git a/src/compiler/instruction.h b/src/compiler/instruction.h |
index 6d007841f42ad0b1dd010f6d03aa28adc9e62c4e..e2399b6e79f5df44855bb1f84d3e30d30d03a094 100644 |
--- a/src/compiler/instruction.h |
+++ b/src/compiler/instruction.h |
@@ -702,84 +702,55 @@ class Constant FINAL { |
class FrameStateDescriptor : public ZoneObject { |
public: |
FrameStateDescriptor(const FrameStateCallInfo& state_info, |
- size_t parameters_count, size_t locals_count, |
- size_t stack_count, |
+ int parameters_count, int locals_count, int stack_count, |
FrameStateDescriptor* outer_state = NULL) |
- : type_(state_info.type()), |
- bailout_id_(state_info.bailout_id()), |
+ : bailout_id_(state_info.bailout_id()), |
frame_state_combine_(state_info.state_combine()), |
parameters_count_(parameters_count), |
locals_count_(locals_count), |
stack_count_(stack_count), |
- outer_state_(outer_state), |
- jsfunction_(state_info.jsfunction()) {} |
+ outer_state_(outer_state) {} |
- FrameStateType type() const { return type_; } |
BailoutId bailout_id() const { return bailout_id_; } |
OutputFrameStateCombine state_combine() const { return frame_state_combine_; } |
- size_t parameters_count() const { return parameters_count_; } |
- size_t locals_count() const { return locals_count_; } |
- size_t stack_count() const { return stack_count_; } |
- FrameStateDescriptor* outer_state() const { return outer_state_; } |
- MaybeHandle<JSFunction> jsfunction() const { return jsfunction_; } |
+ int parameters_count() { return parameters_count_; } |
+ int locals_count() { return locals_count_; } |
+ int stack_count() { return stack_count_; } |
+ FrameStateDescriptor* outer_state() { return outer_state_; } |
+ void set_outer_state(FrameStateDescriptor* outer_state) { |
+ outer_state_ = outer_state; |
+ } |
- size_t size() const { |
+ int size() { |
return parameters_count_ + locals_count_ + stack_count_ + |
- (HasContext() ? 1 : 0); |
+ 1; // Includes context. |
} |
- size_t GetTotalSize() const { |
- size_t total_size = 0; |
- for (const FrameStateDescriptor* iter = this; iter != NULL; |
+ int total_size() { |
+ int total_size = 0; |
+ for (FrameStateDescriptor* iter = this; iter != NULL; |
iter = iter->outer_state_) { |
total_size += iter->size(); |
} |
return total_size; |
} |
- size_t GetHeight(OutputFrameStateCombine override) const { |
- size_t height = size() - parameters_count(); |
- switch (override) { |
- case kPushOutput: |
- ++height; |
- break; |
- case kIgnoreOutput: |
- break; |
- } |
- return height; |
- } |
- |
- size_t GetFrameCount() const { |
- size_t count = 0; |
- for (const FrameStateDescriptor* iter = this; iter != NULL; |
+ int GetFrameCount() { |
+ int count = 0; |
+ for (FrameStateDescriptor* iter = this; iter != NULL; |
iter = iter->outer_state_) { |
++count; |
} |
return count; |
} |
- size_t GetJSFrameCount() const { |
- size_t count = 0; |
- for (const FrameStateDescriptor* iter = this; iter != NULL; |
- iter = iter->outer_state_) { |
- if (iter->type_ == JS_FRAME) { |
- ++count; |
- } |
- } |
- return count; |
- } |
- |
- bool HasContext() const { return type_ == JS_FRAME; } |
- |
private: |
- FrameStateType type_; |
BailoutId bailout_id_; |
OutputFrameStateCombine frame_state_combine_; |
- size_t parameters_count_; |
- size_t locals_count_; |
- size_t stack_count_; |
+ int parameters_count_; |
+ int locals_count_; |
+ int stack_count_; |
FrameStateDescriptor* outer_state_; |
- MaybeHandle<JSFunction> jsfunction_; |
}; |
OStream& operator<<(OStream& os, const Constant& constant); |