Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Side by Side Diff: src/compiler/instruction.h

Issue 1134713004: [turbofan] Pass closure as node to FrameState. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_COMPILER_INSTRUCTION_H_ 5 #ifndef V8_COMPILER_INSTRUCTION_H_
6 #define V8_COMPILER_INSTRUCTION_H_ 6 #define V8_COMPILER_INSTRUCTION_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <iosfwd> 9 #include <iosfwd>
10 #include <map> 10 #include <map>
(...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 } 855 }
856 856
857 private: 857 private:
858 Type type_; 858 Type type_;
859 int64_t value_; 859 int64_t value_;
860 }; 860 };
861 861
862 862
863 class FrameStateDescriptor : public ZoneObject { 863 class FrameStateDescriptor : public ZoneObject {
864 public: 864 public:
865 FrameStateDescriptor(Zone* zone, const FrameStateCallInfo& state_info, 865 FrameStateDescriptor(Zone* zone, FrameStateType type, BailoutId bailout_id,
866 OutputFrameStateCombine state_combine,
866 size_t parameters_count, size_t locals_count, 867 size_t parameters_count, size_t locals_count,
867 size_t stack_count, 868 size_t stack_count,
868 FrameStateDescriptor* outer_state = NULL); 869 FrameStateDescriptor* outer_state = nullptr);
869 870
870 FrameStateType type() const { return type_; } 871 FrameStateType type() const { return type_; }
871 BailoutId bailout_id() const { return bailout_id_; } 872 BailoutId bailout_id() const { return bailout_id_; }
872 OutputFrameStateCombine state_combine() const { return frame_state_combine_; } 873 OutputFrameStateCombine state_combine() const { return frame_state_combine_; }
873 size_t parameters_count() const { return parameters_count_; } 874 size_t parameters_count() const { return parameters_count_; }
874 size_t locals_count() const { return locals_count_; } 875 size_t locals_count() const { return locals_count_; }
875 size_t stack_count() const { return stack_count_; } 876 size_t stack_count() const { return stack_count_; }
876 FrameStateDescriptor* outer_state() const { return outer_state_; } 877 FrameStateDescriptor* outer_state() const { return outer_state_; }
877 MaybeHandle<JSFunction> jsfunction() const { return jsfunction_; }
878 bool HasContext() const { return type_ == JS_FRAME; } 878 bool HasContext() const { return type_ == JS_FRAME; }
879 879
880 size_t GetSize(OutputFrameStateCombine combine = 880 size_t GetSize(OutputFrameStateCombine combine =
881 OutputFrameStateCombine::Ignore()) const; 881 OutputFrameStateCombine::Ignore()) const;
882 size_t GetTotalSize() const; 882 size_t GetTotalSize() const;
883 size_t GetFrameCount() const; 883 size_t GetFrameCount() const;
884 size_t GetJSFrameCount() const; 884 size_t GetJSFrameCount() const;
885 885
886 MachineType GetType(size_t index) const; 886 MachineType GetType(size_t index) const;
887 void SetType(size_t index, MachineType type); 887 void SetType(size_t index, MachineType type);
888 888
889 private: 889 private:
890 FrameStateType type_; 890 FrameStateType type_;
891 BailoutId bailout_id_; 891 BailoutId bailout_id_;
892 OutputFrameStateCombine frame_state_combine_; 892 OutputFrameStateCombine frame_state_combine_;
893 size_t parameters_count_; 893 size_t parameters_count_;
894 size_t locals_count_; 894 size_t locals_count_;
895 size_t stack_count_; 895 size_t stack_count_;
896 ZoneVector<MachineType> types_; 896 ZoneVector<MachineType> types_;
897 FrameStateDescriptor* outer_state_; 897 FrameStateDescriptor* outer_state_;
898 MaybeHandle<JSFunction> jsfunction_;
899 }; 898 };
900 899
901 std::ostream& operator<<(std::ostream& os, const Constant& constant); 900 std::ostream& operator<<(std::ostream& os, const Constant& constant);
902 901
903 902
904 class PhiInstruction final : public ZoneObject { 903 class PhiInstruction final : public ZoneObject {
905 public: 904 public:
906 typedef ZoneVector<InstructionOperand> Inputs; 905 typedef ZoneVector<InstructionOperand> Inputs;
907 906
908 PhiInstruction(Zone* zone, int virtual_register, size_t input_count); 907 PhiInstruction(Zone* zone, int virtual_register, size_t input_count);
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
1188 1187
1189 1188
1190 std::ostream& operator<<(std::ostream& os, 1189 std::ostream& operator<<(std::ostream& os,
1191 const PrintableInstructionSequence& code); 1190 const PrintableInstructionSequence& code);
1192 1191
1193 } // namespace compiler 1192 } // namespace compiler
1194 } // namespace internal 1193 } // namespace internal
1195 } // namespace v8 1194 } // namespace v8
1196 1195
1197 #endif // V8_COMPILER_INSTRUCTION_H_ 1196 #endif // V8_COMPILER_INSTRUCTION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698