| Index: src/compiler/frame-states.h
|
| diff --git a/src/compiler/frame-states.h b/src/compiler/frame-states.h
|
| index 20cb6427e76ce2369795f3c4a88f484f7ab89881..42c41f910733ddc0bceacad40a6bdd2f88a9345b 100644
|
| --- a/src/compiler/frame-states.h
|
| +++ b/src/compiler/frame-states.h
|
| @@ -70,40 +70,73 @@ class OutputFrameStateCombine {
|
|
|
|
|
| // The type of stack frame that a FrameState node represents.
|
| -enum FrameStateType {
|
| - JS_FRAME, // Represents an unoptimized JavaScriptFrame.
|
| - ARGUMENTS_ADAPTOR // Represents an ArgumentsAdaptorFrame.
|
| +enum class FrameStateType {
|
| + kJavaScriptFunction, // Represents an unoptimized JavaScriptFrame.
|
| + kArgumentsAdaptor // Represents an ArgumentsAdaptorFrame.
|
| };
|
|
|
|
|
| -class FrameStateCallInfo final {
|
| +class FrameStateFunctionInfo {
|
| public:
|
| - FrameStateCallInfo(FrameStateType type, BailoutId bailout_id,
|
| - OutputFrameStateCombine state_combine,
|
| - MaybeHandle<SharedFunctionInfo> shared_info)
|
| + FrameStateFunctionInfo(FrameStateType type, int parameter_count,
|
| + int local_count,
|
| + Handle<SharedFunctionInfo> shared_info)
|
| : type_(type),
|
| - bailout_id_(bailout_id),
|
| - frame_state_combine_(state_combine),
|
| + parameter_count_(parameter_count),
|
| + local_count_(local_count),
|
| shared_info_(shared_info) {}
|
|
|
| + int local_count() const { return local_count_; }
|
| + int parameter_count() const { return parameter_count_; }
|
| + Handle<SharedFunctionInfo> shared_info() const { return shared_info_; }
|
| FrameStateType type() const { return type_; }
|
| +
|
| + private:
|
| + FrameStateType const type_;
|
| + int const parameter_count_;
|
| + int const local_count_;
|
| + Handle<SharedFunctionInfo> const shared_info_;
|
| +};
|
| +
|
| +
|
| +class FrameStateInfo final {
|
| + public:
|
| + FrameStateInfo(BailoutId bailout_id, OutputFrameStateCombine state_combine,
|
| + const FrameStateFunctionInfo* info)
|
| + : bailout_id_(bailout_id),
|
| + frame_state_combine_(state_combine),
|
| + info_(info) {}
|
| +
|
| + FrameStateType type() const {
|
| + return info_ == nullptr ? FrameStateType::kJavaScriptFunction
|
| + : info_->type();
|
| + }
|
| BailoutId bailout_id() const { return bailout_id_; }
|
| OutputFrameStateCombine state_combine() const { return frame_state_combine_; }
|
| - MaybeHandle<SharedFunctionInfo> shared_info() const { return shared_info_; }
|
| + MaybeHandle<SharedFunctionInfo> shared_info() const {
|
| + return info_ == nullptr ? MaybeHandle<SharedFunctionInfo>()
|
| + : info_->shared_info();
|
| + }
|
| + int parameter_count() const {
|
| + return info_ == nullptr ? 0 : info_->parameter_count();
|
| + }
|
| + int local_count() const {
|
| + return info_ == nullptr ? 0 : info_->local_count();
|
| + }
|
| + const FrameStateFunctionInfo* function_info() const { return info_; }
|
|
|
| private:
|
| - FrameStateType const type_;
|
| BailoutId const bailout_id_;
|
| OutputFrameStateCombine const frame_state_combine_;
|
| - MaybeHandle<SharedFunctionInfo> const shared_info_;
|
| + const FrameStateFunctionInfo* const info_;
|
| };
|
|
|
| -bool operator==(FrameStateCallInfo const&, FrameStateCallInfo const&);
|
| -bool operator!=(FrameStateCallInfo const&, FrameStateCallInfo const&);
|
| +bool operator==(FrameStateInfo const&, FrameStateInfo const&);
|
| +bool operator!=(FrameStateInfo const&, FrameStateInfo const&);
|
|
|
| -size_t hash_value(FrameStateCallInfo const&);
|
| +size_t hash_value(FrameStateInfo const&);
|
|
|
| -std::ostream& operator<<(std::ostream&, FrameStateCallInfo const&);
|
| +std::ostream& operator<<(std::ostream&, FrameStateInfo const&);
|
|
|
| static const int kFrameStateParametersInput = 0;
|
| static const int kFrameStateLocalsInput = 1;
|
|
|