OLD | NEW |
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 V(ApplyArguments) \ | 52 V(ApplyArguments) \ |
53 V(ArgumentsElements) \ | 53 V(ArgumentsElements) \ |
54 V(ArgumentsLength) \ | 54 V(ArgumentsLength) \ |
55 V(ArgumentsObject) \ | 55 V(ArgumentsObject) \ |
56 V(Bitwise) \ | 56 V(Bitwise) \ |
57 V(BlockEntry) \ | 57 V(BlockEntry) \ |
58 V(BoundsCheck) \ | 58 V(BoundsCheck) \ |
59 V(BoundsCheckBaseIndexInformation) \ | 59 V(BoundsCheckBaseIndexInformation) \ |
60 V(Branch) \ | 60 V(Branch) \ |
61 V(CallWithDescriptor) \ | 61 V(CallWithDescriptor) \ |
62 V(CallJSFunction) \ | |
63 V(CallNewArray) \ | 62 V(CallNewArray) \ |
64 V(CallRuntime) \ | 63 V(CallRuntime) \ |
65 V(CapturedObject) \ | 64 V(CapturedObject) \ |
66 V(Change) \ | 65 V(Change) \ |
67 V(CheckArrayBufferNotNeutered) \ | 66 V(CheckArrayBufferNotNeutered) \ |
68 V(CheckHeapObject) \ | 67 V(CheckHeapObject) \ |
69 V(CheckInstanceType) \ | 68 V(CheckInstanceType) \ |
70 V(CheckMaps) \ | 69 V(CheckMaps) \ |
71 V(CheckMapValue) \ | 70 V(CheckMapValue) \ |
72 V(CheckSmi) \ | 71 V(CheckSmi) \ |
(...skipping 2139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2212 | 2211 |
2213 Representation RequiredInputRepresentation(int index) final { | 2212 Representation RequiredInputRepresentation(int index) final { |
2214 return Representation::Tagged(); | 2213 return Representation::Tagged(); |
2215 } | 2214 } |
2216 | 2215 |
2217 HValue* first() const { return OperandAt(0); } | 2216 HValue* first() const { return OperandAt(0); } |
2218 HValue* second() const { return OperandAt(1); } | 2217 HValue* second() const { return OperandAt(1); } |
2219 }; | 2218 }; |
2220 | 2219 |
2221 | 2220 |
2222 class HCallJSFunction final : public HCall<1> { | |
2223 public: | |
2224 static HCallJSFunction* New(Isolate* isolate, Zone* zone, HValue* context, | |
2225 HValue* function, int argument_count); | |
2226 | |
2227 HValue* function() const { return OperandAt(0); } | |
2228 | |
2229 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT | |
2230 | |
2231 Representation RequiredInputRepresentation(int index) final { | |
2232 DCHECK(index == 0); | |
2233 return Representation::Tagged(); | |
2234 } | |
2235 | |
2236 bool HasStackCheck() final { return has_stack_check_; } | |
2237 | |
2238 DECLARE_CONCRETE_INSTRUCTION(CallJSFunction) | |
2239 | |
2240 private: | |
2241 // The argument count includes the receiver. | |
2242 HCallJSFunction(HValue* function, | |
2243 int argument_count, | |
2244 bool has_stack_check) | |
2245 : HCall<1>(argument_count), | |
2246 has_stack_check_(has_stack_check) { | |
2247 SetOperandAt(0, function); | |
2248 } | |
2249 | |
2250 bool has_stack_check_; | |
2251 }; | |
2252 | |
2253 | |
2254 enum CallMode { NORMAL_CALL, TAIL_CALL }; | 2221 enum CallMode { NORMAL_CALL, TAIL_CALL }; |
2255 | 2222 |
2256 | 2223 |
2257 class HCallWithDescriptor final : public HInstruction { | 2224 class HCallWithDescriptor final : public HInstruction { |
2258 public: | 2225 public: |
2259 static HCallWithDescriptor* New(Isolate* isolate, Zone* zone, HValue* context, | 2226 static HCallWithDescriptor* New(Isolate* isolate, Zone* zone, HValue* context, |
2260 HValue* target, int argument_count, | 2227 HValue* target, int argument_count, |
2261 CallInterfaceDescriptor descriptor, | 2228 CallInterfaceDescriptor descriptor, |
2262 const Vector<HValue*>& operands, | 2229 const Vector<HValue*>& operands, |
2263 CallMode call_mode = NORMAL_CALL) { | 2230 CallMode call_mode = NORMAL_CALL) { |
(...skipping 5360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7624 | 7591 |
7625 | 7592 |
7626 | 7593 |
7627 #undef DECLARE_INSTRUCTION | 7594 #undef DECLARE_INSTRUCTION |
7628 #undef DECLARE_CONCRETE_INSTRUCTION | 7595 #undef DECLARE_CONCRETE_INSTRUCTION |
7629 | 7596 |
7630 } // namespace internal | 7597 } // namespace internal |
7631 } // namespace v8 | 7598 } // namespace v8 |
7632 | 7599 |
7633 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 7600 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |