| 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 2377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2388 } | 2388 } |
| 2389 | 2389 |
| 2390 Handle<JSFunction> known_function_; | 2390 Handle<JSFunction> known_function_; |
| 2391 int formal_parameter_count_; | 2391 int formal_parameter_count_; |
| 2392 bool has_stack_check_; | 2392 bool has_stack_check_; |
| 2393 }; | 2393 }; |
| 2394 | 2394 |
| 2395 | 2395 |
| 2396 class HCallFunction final : public HBinaryCall { | 2396 class HCallFunction final : public HBinaryCall { |
| 2397 public: | 2397 public: |
| 2398 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P4(HCallFunction, HValue*, int, | 2398 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HCallFunction, HValue*, int, |
| 2399 ConvertReceiverMode, | 2399 ConvertReceiverMode); |
| 2400 TailCallMode); | |
| 2401 | 2400 |
| 2402 HValue* context() const { return first(); } | 2401 HValue* context() const { return first(); } |
| 2403 HValue* function() const { return second(); } | 2402 HValue* function() const { return second(); } |
| 2404 | 2403 |
| 2405 ConvertReceiverMode convert_mode() const { | 2404 ConvertReceiverMode convert_mode() const { |
| 2406 return ConvertReceiverModeField::decode(bit_field_); | 2405 return ConvertReceiverModeField::decode(bit_field_); |
| 2407 } | 2406 } |
| 2408 TailCallMode tail_call_mode() const { | |
| 2409 return TailCallModeField::decode(bit_field_); | |
| 2410 } | |
| 2411 FeedbackVectorSlot slot() const { return slot_; } | 2407 FeedbackVectorSlot slot() const { return slot_; } |
| 2412 Handle<TypeFeedbackVector> feedback_vector() const { | 2408 Handle<TypeFeedbackVector> feedback_vector() const { |
| 2413 return feedback_vector_; | 2409 return feedback_vector_; |
| 2414 } | 2410 } |
| 2415 bool HasVectorAndSlot() const { return !feedback_vector_.is_null(); } | 2411 bool HasVectorAndSlot() const { return !feedback_vector_.is_null(); } |
| 2416 void SetVectorAndSlot(Handle<TypeFeedbackVector> vector, | 2412 void SetVectorAndSlot(Handle<TypeFeedbackVector> vector, |
| 2417 FeedbackVectorSlot slot) { | 2413 FeedbackVectorSlot slot) { |
| 2418 feedback_vector_ = vector; | 2414 feedback_vector_ = vector; |
| 2419 slot_ = slot; | 2415 slot_ = slot; |
| 2420 } | 2416 } |
| 2421 | 2417 |
| 2422 DECLARE_CONCRETE_INSTRUCTION(CallFunction) | 2418 DECLARE_CONCRETE_INSTRUCTION(CallFunction) |
| 2423 | 2419 |
| 2424 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT | 2420 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT |
| 2425 | 2421 |
| 2426 int argument_delta() const override { return -argument_count(); } | 2422 int argument_delta() const override { return -argument_count(); } |
| 2427 | 2423 |
| 2428 private: | 2424 private: |
| 2429 HCallFunction(HValue* context, HValue* function, int argument_count, | 2425 HCallFunction(HValue* context, HValue* function, int argument_count, |
| 2430 ConvertReceiverMode convert_mode, TailCallMode tail_call_mode) | 2426 ConvertReceiverMode convert_mode) |
| 2431 : HBinaryCall(context, function, argument_count), | 2427 : HBinaryCall(context, function, argument_count), |
| 2432 bit_field_(ConvertReceiverModeField::encode(convert_mode) | | 2428 bit_field_(ConvertReceiverModeField::encode(convert_mode)) {} |
| 2433 TailCallModeField::encode(tail_call_mode)) {} | |
| 2434 Handle<TypeFeedbackVector> feedback_vector_; | 2429 Handle<TypeFeedbackVector> feedback_vector_; |
| 2435 FeedbackVectorSlot slot_; | 2430 FeedbackVectorSlot slot_; |
| 2436 | 2431 |
| 2437 class ConvertReceiverModeField : public BitField<ConvertReceiverMode, 0, 2> { | 2432 class ConvertReceiverModeField : public BitField<ConvertReceiverMode, 0, 2> { |
| 2438 }; | 2433 }; |
| 2439 class TailCallModeField | |
| 2440 : public BitField<TailCallMode, ConvertReceiverModeField::kNext, 1> {}; | |
| 2441 | 2434 |
| 2442 uint32_t bit_field_; | 2435 uint32_t bit_field_; |
| 2443 }; | 2436 }; |
| 2444 | 2437 |
| 2445 | 2438 |
| 2446 class HCallNewArray final : public HBinaryCall { | 2439 class HCallNewArray final : public HBinaryCall { |
| 2447 public: | 2440 public: |
| 2448 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P4(HCallNewArray, HValue*, int, | 2441 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P4(HCallNewArray, HValue*, int, |
| 2449 ElementsKind, | 2442 ElementsKind, |
| 2450 Handle<AllocationSite>); | 2443 Handle<AllocationSite>); |
| (...skipping 5350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7801 | 7794 |
| 7802 | 7795 |
| 7803 | 7796 |
| 7804 #undef DECLARE_INSTRUCTION | 7797 #undef DECLARE_INSTRUCTION |
| 7805 #undef DECLARE_CONCRETE_INSTRUCTION | 7798 #undef DECLARE_CONCRETE_INSTRUCTION |
| 7806 | 7799 |
| 7807 } // namespace internal | 7800 } // namespace internal |
| 7808 } // namespace v8 | 7801 } // namespace v8 |
| 7809 | 7802 |
| 7810 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 7803 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |