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

Side by Side Diff: src/crankshaft/hydrogen-instructions.h

Issue 2396023002: [crankshaft] Remove HLoadGlobalGeneric and use HCallWithDescriptor instead to call LoadGlobalIC. (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | src/crankshaft/hydrogen-instructions.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ 5 #ifndef V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_
6 #define V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ 6 #define V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_
7 7
8 #include <cstring> 8 #include <cstring>
9 #include <iosfwd> 9 #include <iosfwd>
10 10
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 V(InnerAllocatedObject) \ 98 V(InnerAllocatedObject) \
99 V(InvokeFunction) \ 99 V(InvokeFunction) \
100 V(HasInPrototypeChainAndBranch) \ 100 V(HasInPrototypeChainAndBranch) \
101 V(IsStringAndBranch) \ 101 V(IsStringAndBranch) \
102 V(IsSmiAndBranch) \ 102 V(IsSmiAndBranch) \
103 V(IsUndetectableAndBranch) \ 103 V(IsUndetectableAndBranch) \
104 V(LeaveInlined) \ 104 V(LeaveInlined) \
105 V(LoadContextSlot) \ 105 V(LoadContextSlot) \
106 V(LoadFieldByIndex) \ 106 V(LoadFieldByIndex) \
107 V(LoadFunctionPrototype) \ 107 V(LoadFunctionPrototype) \
108 V(LoadGlobalGeneric) \
109 V(LoadKeyed) \ 108 V(LoadKeyed) \
110 V(LoadKeyedGeneric) \ 109 V(LoadKeyedGeneric) \
111 V(LoadNamedField) \ 110 V(LoadNamedField) \
112 V(LoadNamedGeneric) \ 111 V(LoadNamedGeneric) \
113 V(LoadRoot) \ 112 V(LoadRoot) \
114 V(MathFloorOfDiv) \ 113 V(MathFloorOfDiv) \
115 V(MathMinMax) \ 114 V(MathMinMax) \
116 V(MaybeGrowElements) \ 115 V(MaybeGrowElements) \
117 V(Mod) \ 116 V(Mod) \
118 V(Mul) \ 117 V(Mul) \
(...skipping 4699 matching lines...) Expand 10 before | Expand all | Expand 10 after
4818 index_(index), 4817 index_(index),
4819 incoming_value_(NULL) { 4818 incoming_value_(NULL) {
4820 set_representation(Representation::Tagged()); 4819 set_representation(Representation::Tagged());
4821 } 4820 }
4822 4821
4823 HEnvironment* environment_; 4822 HEnvironment* environment_;
4824 int index_; 4823 int index_;
4825 HPhi* incoming_value_; 4824 HPhi* incoming_value_;
4826 }; 4825 };
4827 4826
4828 class HLoadGlobalGeneric final : public HTemplateInstruction<1> {
4829 public:
4830 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P4(HLoadGlobalGeneric,
4831 Handle<String>, TypeofMode,
4832 Handle<TypeFeedbackVector>,
4833 FeedbackVectorSlot);
4834
4835 HValue* context() { return OperandAt(0); }
4836 Handle<String> name() const { return name_; }
4837 TypeofMode typeof_mode() const { return typeof_mode_; }
4838 FeedbackVectorSlot slot() const { return slot_; }
4839 Handle<TypeFeedbackVector> feedback_vector() const {
4840 return feedback_vector_;
4841 }
4842
4843 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT
4844
4845 Representation RequiredInputRepresentation(int index) override {
4846 return Representation::Tagged();
4847 }
4848
4849 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric)
4850
4851 private:
4852 HLoadGlobalGeneric(HValue* context, Handle<String> name,
4853 TypeofMode typeof_mode, Handle<TypeFeedbackVector> vector,
4854 FeedbackVectorSlot slot)
4855 : name_(name),
4856 typeof_mode_(typeof_mode),
4857 feedback_vector_(vector),
4858 slot_(slot) {
4859 SetOperandAt(0, context);
4860 set_representation(Representation::Tagged());
4861 SetAllSideEffects();
4862 }
4863
4864 Handle<String> name_;
4865 TypeofMode typeof_mode_;
4866 Handle<TypeFeedbackVector> feedback_vector_;
4867 FeedbackVectorSlot slot_;
4868 };
4869
4870 class HAllocate final : public HTemplateInstruction<3> { 4827 class HAllocate final : public HTemplateInstruction<3> {
4871 public: 4828 public:
4872 static bool CompatibleInstanceTypes(InstanceType type1, 4829 static bool CompatibleInstanceTypes(InstanceType type1,
4873 InstanceType type2) { 4830 InstanceType type2) {
4874 return ComputeFlags(TENURED, type1) == ComputeFlags(TENURED, type2) && 4831 return ComputeFlags(TENURED, type1) == ComputeFlags(TENURED, type2) &&
4875 ComputeFlags(NOT_TENURED, type1) == ComputeFlags(NOT_TENURED, type2); 4832 ComputeFlags(NOT_TENURED, type1) == ComputeFlags(NOT_TENURED, type2);
4876 } 4833 }
4877 4834
4878 static HAllocate* New( 4835 static HAllocate* New(
4879 Isolate* isolate, Zone* zone, HValue* context, HValue* size, HType type, 4836 Isolate* isolate, Zone* zone, HValue* context, HValue* size, HType type,
(...skipping 2157 matching lines...) Expand 10 before | Expand all | Expand 10 after
7037 bool IsDeletable() const override { return true; } 6994 bool IsDeletable() const override { return true; }
7038 }; 6995 };
7039 6996
7040 #undef DECLARE_INSTRUCTION 6997 #undef DECLARE_INSTRUCTION
7041 #undef DECLARE_CONCRETE_INSTRUCTION 6998 #undef DECLARE_CONCRETE_INSTRUCTION
7042 6999
7043 } // namespace internal 7000 } // namespace internal
7044 } // namespace v8 7001 } // namespace v8
7045 7002
7046 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ 7003 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | src/crankshaft/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698