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_HYDROGEN_INSTRUCTIONS_H_ | 5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_ |
6 #define V8_HYDROGEN_INSTRUCTIONS_H_ | 6 #define V8_HYDROGEN_INSTRUCTIONS_H_ |
7 | 7 |
8 #include <cstring> | 8 #include <cstring> |
9 #include <iosfwd> | 9 #include <iosfwd> |
10 | 10 |
(...skipping 2416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2427 bool has_stack_check_; | 2427 bool has_stack_check_; |
2428 }; | 2428 }; |
2429 | 2429 |
2430 | 2430 |
2431 class HCallFunction FINAL : public HBinaryCall { | 2431 class HCallFunction FINAL : public HBinaryCall { |
2432 public: | 2432 public: |
2433 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HCallFunction, HValue*, int); | 2433 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HCallFunction, HValue*, int); |
2434 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3( | 2434 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3( |
2435 HCallFunction, HValue*, int, CallFunctionFlags); | 2435 HCallFunction, HValue*, int, CallFunctionFlags); |
2436 | 2436 |
2437 HValue* context() { return first(); } | 2437 HValue* context() const { return first(); } |
2438 HValue* function() { return second(); } | 2438 HValue* function() const { return second(); } |
2439 CallFunctionFlags function_flags() const { return function_flags_; } | 2439 CallFunctionFlags function_flags() const { return function_flags_; } |
2440 | 2440 |
| 2441 FeedbackVectorICSlot slot() const { return slot_; } |
| 2442 Handle<TypeFeedbackVector> feedback_vector() const { |
| 2443 return feedback_vector_; |
| 2444 } |
| 2445 bool HasVectorAndSlot() const { return !feedback_vector_.is_null(); } |
| 2446 void SetVectorAndSlot(Handle<TypeFeedbackVector> vector, |
| 2447 FeedbackVectorICSlot slot) { |
| 2448 feedback_vector_ = vector; |
| 2449 slot_ = slot; |
| 2450 } |
| 2451 |
2441 DECLARE_CONCRETE_INSTRUCTION(CallFunction) | 2452 DECLARE_CONCRETE_INSTRUCTION(CallFunction) |
2442 | 2453 |
| 2454 std::ostream& PrintDataTo(std::ostream& os) const OVERRIDE; // NOLINT |
| 2455 |
2443 int argument_delta() const OVERRIDE { return -argument_count(); } | 2456 int argument_delta() const OVERRIDE { return -argument_count(); } |
2444 | 2457 |
2445 private: | 2458 private: |
2446 HCallFunction(HValue* context, | 2459 HCallFunction(HValue* context, HValue* function, int argument_count, |
2447 HValue* function, | |
2448 int argument_count, | |
2449 CallFunctionFlags flags = NO_CALL_FUNCTION_FLAGS) | 2460 CallFunctionFlags flags = NO_CALL_FUNCTION_FLAGS) |
2450 : HBinaryCall(context, function, argument_count), function_flags_(flags) { | 2461 : HBinaryCall(context, function, argument_count), |
2451 } | 2462 function_flags_(flags), |
| 2463 slot_(FeedbackVectorICSlot::Invalid()) {} |
2452 CallFunctionFlags function_flags_; | 2464 CallFunctionFlags function_flags_; |
| 2465 Handle<TypeFeedbackVector> feedback_vector_; |
| 2466 FeedbackVectorICSlot slot_; |
2453 }; | 2467 }; |
2454 | 2468 |
2455 | 2469 |
2456 class HCallNew FINAL : public HBinaryCall { | 2470 class HCallNew FINAL : public HBinaryCall { |
2457 public: | 2471 public: |
2458 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HCallNew, HValue*, int); | 2472 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HCallNew, HValue*, int); |
2459 | 2473 |
2460 HValue* context() { return first(); } | 2474 HValue* context() { return first(); } |
2461 HValue* constructor() { return second(); } | 2475 HValue* constructor() { return second(); } |
2462 | 2476 |
(...skipping 5512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7975 }; | 7989 }; |
7976 | 7990 |
7977 | 7991 |
7978 | 7992 |
7979 #undef DECLARE_INSTRUCTION | 7993 #undef DECLARE_INSTRUCTION |
7980 #undef DECLARE_CONCRETE_INSTRUCTION | 7994 #undef DECLARE_CONCRETE_INSTRUCTION |
7981 | 7995 |
7982 } } // namespace v8::internal | 7996 } } // namespace v8::internal |
7983 | 7997 |
7984 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7998 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |