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 "src/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 7432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7443 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { | 7443 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { |
7444 return Representation::Tagged(); | 7444 return Representation::Tagged(); |
7445 } | 7445 } |
7446 | 7446 |
7447 DECLARE_CONCRETE_INSTRUCTION(FunctionLiteral) | 7447 DECLARE_CONCRETE_INSTRUCTION(FunctionLiteral) |
7448 | 7448 |
7449 Handle<SharedFunctionInfo> shared_info() const { return shared_info_; } | 7449 Handle<SharedFunctionInfo> shared_info() const { return shared_info_; } |
7450 bool pretenure() const { return pretenure_; } | 7450 bool pretenure() const { return pretenure_; } |
7451 bool has_no_literals() const { return has_no_literals_; } | 7451 bool has_no_literals() const { return has_no_literals_; } |
7452 bool is_generator() const { return is_generator_; } | 7452 bool is_generator() const { return is_generator_; } |
| 7453 bool is_concise_method() const { return is_concise_method_; } |
7453 StrictMode strict_mode() const { return strict_mode_; } | 7454 StrictMode strict_mode() const { return strict_mode_; } |
7454 | 7455 |
7455 private: | 7456 private: |
7456 HFunctionLiteral(HValue* context, | 7457 HFunctionLiteral(HValue* context, Handle<SharedFunctionInfo> shared, |
7457 Handle<SharedFunctionInfo> shared, | |
7458 bool pretenure) | 7458 bool pretenure) |
7459 : HTemplateInstruction<1>(HType::JSObject()), | 7459 : HTemplateInstruction<1>(HType::JSObject()), |
7460 shared_info_(shared), | 7460 shared_info_(shared), |
7461 pretenure_(pretenure), | 7461 pretenure_(pretenure), |
7462 has_no_literals_(shared->num_literals() == 0), | 7462 has_no_literals_(shared->num_literals() == 0), |
7463 is_generator_(shared->is_generator()), | 7463 is_generator_(shared->is_generator()), |
| 7464 is_concise_method_(shared->is_concise_method()), |
7464 strict_mode_(shared->strict_mode()) { | 7465 strict_mode_(shared->strict_mode()) { |
7465 SetOperandAt(0, context); | 7466 SetOperandAt(0, context); |
7466 set_representation(Representation::Tagged()); | 7467 set_representation(Representation::Tagged()); |
7467 SetChangesFlag(kNewSpacePromotion); | 7468 SetChangesFlag(kNewSpacePromotion); |
7468 } | 7469 } |
7469 | 7470 |
7470 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 7471 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
7471 | 7472 |
7472 Handle<SharedFunctionInfo> shared_info_; | 7473 Handle<SharedFunctionInfo> shared_info_; |
7473 bool pretenure_ : 1; | 7474 bool pretenure_ : 1; |
7474 bool has_no_literals_ : 1; | 7475 bool has_no_literals_ : 1; |
7475 bool is_generator_ : 1; | 7476 bool is_generator_ : 1; |
| 7477 bool is_concise_method_ : 1; |
7476 StrictMode strict_mode_; | 7478 StrictMode strict_mode_; |
7477 }; | 7479 }; |
7478 | 7480 |
7479 | 7481 |
7480 class HTypeof V8_FINAL : public HTemplateInstruction<2> { | 7482 class HTypeof V8_FINAL : public HTemplateInstruction<2> { |
7481 public: | 7483 public: |
7482 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P1(HTypeof, HValue*); | 7484 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P1(HTypeof, HValue*); |
7483 | 7485 |
7484 HValue* context() const { return OperandAt(0); } | 7486 HValue* context() const { return OperandAt(0); } |
7485 HValue* value() const { return OperandAt(1); } | 7487 HValue* value() const { return OperandAt(1); } |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7860 }; | 7862 }; |
7861 | 7863 |
7862 | 7864 |
7863 | 7865 |
7864 #undef DECLARE_INSTRUCTION | 7866 #undef DECLARE_INSTRUCTION |
7865 #undef DECLARE_CONCRETE_INSTRUCTION | 7867 #undef DECLARE_CONCRETE_INSTRUCTION |
7866 | 7868 |
7867 } } // namespace v8::internal | 7869 } } // namespace v8::internal |
7868 | 7870 |
7869 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7871 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |