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 2376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2387 } | 2387 } |
2388 | 2388 |
2389 Handle<JSFunction> known_function_; | 2389 Handle<JSFunction> known_function_; |
2390 int formal_parameter_count_; | 2390 int formal_parameter_count_; |
2391 bool has_stack_check_; | 2391 bool has_stack_check_; |
2392 }; | 2392 }; |
2393 | 2393 |
2394 | 2394 |
2395 class HCallFunction final : public HBinaryCall { | 2395 class HCallFunction final : public HBinaryCall { |
2396 public: | 2396 public: |
2397 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HCallFunction, HValue*, int); | 2397 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HCallFunction, HValue*, int, |
| 2398 ConvertReceiverMode); |
2398 | 2399 |
2399 HValue* context() const { return first(); } | 2400 HValue* context() const { return first(); } |
2400 HValue* function() const { return second(); } | 2401 HValue* function() const { return second(); } |
2401 | 2402 |
| 2403 ConvertReceiverMode convert_mode() const { return convert_mode_; } |
2402 FeedbackVectorSlot slot() const { return slot_; } | 2404 FeedbackVectorSlot slot() const { return slot_; } |
2403 Handle<TypeFeedbackVector> feedback_vector() const { | 2405 Handle<TypeFeedbackVector> feedback_vector() const { |
2404 return feedback_vector_; | 2406 return feedback_vector_; |
2405 } | 2407 } |
2406 bool HasVectorAndSlot() const { return !feedback_vector_.is_null(); } | 2408 bool HasVectorAndSlot() const { return !feedback_vector_.is_null(); } |
2407 void SetVectorAndSlot(Handle<TypeFeedbackVector> vector, | 2409 void SetVectorAndSlot(Handle<TypeFeedbackVector> vector, |
2408 FeedbackVectorSlot slot) { | 2410 FeedbackVectorSlot slot) { |
2409 feedback_vector_ = vector; | 2411 feedback_vector_ = vector; |
2410 slot_ = slot; | 2412 slot_ = slot; |
2411 } | 2413 } |
2412 | 2414 |
2413 DECLARE_CONCRETE_INSTRUCTION(CallFunction) | 2415 DECLARE_CONCRETE_INSTRUCTION(CallFunction) |
2414 | 2416 |
2415 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT | 2417 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT |
2416 | 2418 |
2417 int argument_delta() const override { return -argument_count(); } | 2419 int argument_delta() const override { return -argument_count(); } |
2418 | 2420 |
2419 private: | 2421 private: |
2420 HCallFunction(HValue* context, HValue* function, int argument_count) | 2422 HCallFunction(HValue* context, HValue* function, int argument_count, |
2421 : HBinaryCall(context, function, argument_count) {} | 2423 ConvertReceiverMode convert_mode) |
| 2424 : HBinaryCall(context, function, argument_count), |
| 2425 convert_mode_(convert_mode) {} |
2422 Handle<TypeFeedbackVector> feedback_vector_; | 2426 Handle<TypeFeedbackVector> feedback_vector_; |
2423 FeedbackVectorSlot slot_; | 2427 FeedbackVectorSlot slot_; |
| 2428 ConvertReceiverMode convert_mode_; |
2424 }; | 2429 }; |
2425 | 2430 |
2426 | 2431 |
2427 class HCallNew final : public HBinaryCall { | 2432 class HCallNew final : public HBinaryCall { |
2428 public: | 2433 public: |
2429 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HCallNew, HValue*, int); | 2434 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HCallNew, HValue*, int); |
2430 | 2435 |
2431 HValue* context() { return first(); } | 2436 HValue* context() { return first(); } |
2432 HValue* constructor() { return second(); } | 2437 HValue* constructor() { return second(); } |
2433 | 2438 |
(...skipping 5476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7910 | 7915 |
7911 | 7916 |
7912 | 7917 |
7913 #undef DECLARE_INSTRUCTION | 7918 #undef DECLARE_INSTRUCTION |
7914 #undef DECLARE_CONCRETE_INSTRUCTION | 7919 #undef DECLARE_CONCRETE_INSTRUCTION |
7915 | 7920 |
7916 } // namespace internal | 7921 } // namespace internal |
7917 } // namespace v8 | 7922 } // namespace v8 |
7918 | 7923 |
7919 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 7924 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |