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 2455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2466 elements_kind_(elements_kind), | 2466 elements_kind_(elements_kind), |
2467 site_(site) {} | 2467 site_(site) {} |
2468 | 2468 |
2469 ElementsKind elements_kind_; | 2469 ElementsKind elements_kind_; |
2470 Handle<AllocationSite> site_; | 2470 Handle<AllocationSite> site_; |
2471 }; | 2471 }; |
2472 | 2472 |
2473 | 2473 |
2474 class HCallRuntime final : public HCall<1> { | 2474 class HCallRuntime final : public HCall<1> { |
2475 public: | 2475 public: |
2476 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HCallRuntime, | 2476 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HCallRuntime, |
2477 Handle<String>, | 2477 const Runtime::Function*, int); |
2478 const Runtime::Function*, | |
2479 int); | |
2480 | 2478 |
2481 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT | 2479 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT |
2482 | 2480 |
2483 HValue* context() { return OperandAt(0); } | 2481 HValue* context() { return OperandAt(0); } |
2484 const Runtime::Function* function() const { return c_function_; } | 2482 const Runtime::Function* function() const { return c_function_; } |
2485 Handle<String> name() const { return name_; } | |
2486 SaveFPRegsMode save_doubles() const { return save_doubles_; } | 2483 SaveFPRegsMode save_doubles() const { return save_doubles_; } |
2487 void set_save_doubles(SaveFPRegsMode save_doubles) { | 2484 void set_save_doubles(SaveFPRegsMode save_doubles) { |
2488 save_doubles_ = save_doubles; | 2485 save_doubles_ = save_doubles; |
2489 } | 2486 } |
2490 | 2487 |
2491 Representation RequiredInputRepresentation(int index) override { | 2488 Representation RequiredInputRepresentation(int index) override { |
2492 return Representation::Tagged(); | 2489 return Representation::Tagged(); |
2493 } | 2490 } |
2494 | 2491 |
2495 DECLARE_CONCRETE_INSTRUCTION(CallRuntime) | 2492 DECLARE_CONCRETE_INSTRUCTION(CallRuntime) |
2496 | 2493 |
2497 private: | 2494 private: |
2498 HCallRuntime(HValue* context, | 2495 HCallRuntime(HValue* context, const Runtime::Function* c_function, |
2499 Handle<String> name, | |
2500 const Runtime::Function* c_function, | |
2501 int argument_count) | 2496 int argument_count) |
2502 : HCall<1>(argument_count), c_function_(c_function), name_(name), | 2497 : HCall<1>(argument_count), |
| 2498 c_function_(c_function), |
2503 save_doubles_(kDontSaveFPRegs) { | 2499 save_doubles_(kDontSaveFPRegs) { |
2504 SetOperandAt(0, context); | 2500 SetOperandAt(0, context); |
2505 } | 2501 } |
2506 | 2502 |
2507 const Runtime::Function* c_function_; | 2503 const Runtime::Function* c_function_; |
2508 Handle<String> name_; | |
2509 SaveFPRegsMode save_doubles_; | 2504 SaveFPRegsMode save_doubles_; |
2510 }; | 2505 }; |
2511 | 2506 |
2512 | 2507 |
2513 class HMapEnumLength final : public HUnaryOperation { | 2508 class HMapEnumLength final : public HUnaryOperation { |
2514 public: | 2509 public: |
2515 DECLARE_INSTRUCTION_FACTORY_P1(HMapEnumLength, HValue*); | 2510 DECLARE_INSTRUCTION_FACTORY_P1(HMapEnumLength, HValue*); |
2516 | 2511 |
2517 Representation RequiredInputRepresentation(int index) override { | 2512 Representation RequiredInputRepresentation(int index) override { |
2518 return Representation::Tagged(); | 2513 return Representation::Tagged(); |
(...skipping 5545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8064 }; | 8059 }; |
8065 | 8060 |
8066 | 8061 |
8067 | 8062 |
8068 #undef DECLARE_INSTRUCTION | 8063 #undef DECLARE_INSTRUCTION |
8069 #undef DECLARE_CONCRETE_INSTRUCTION | 8064 #undef DECLARE_CONCRETE_INSTRUCTION |
8070 | 8065 |
8071 } } // namespace v8::internal | 8066 } } // namespace v8::internal |
8072 | 8067 |
8073 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 8068 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |