| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 6532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6543 DECLARE_INSTRUCTION_FACTORY_P1(HToFastProperties, HValue*); | 6543 DECLARE_INSTRUCTION_FACTORY_P1(HToFastProperties, HValue*); |
| 6544 | 6544 |
| 6545 virtual Representation RequiredInputRepresentation(int index) { | 6545 virtual Representation RequiredInputRepresentation(int index) { |
| 6546 return Representation::Tagged(); | 6546 return Representation::Tagged(); |
| 6547 } | 6547 } |
| 6548 | 6548 |
| 6549 DECLARE_CONCRETE_INSTRUCTION(ToFastProperties) | 6549 DECLARE_CONCRETE_INSTRUCTION(ToFastProperties) |
| 6550 | 6550 |
| 6551 private: | 6551 private: |
| 6552 explicit HToFastProperties(HValue* value) : HUnaryOperation(value) { | 6552 explicit HToFastProperties(HValue* value) : HUnaryOperation(value) { |
| 6553 // This instruction is not marked as having side effects, but | 6553 set_representation(Representation::Tagged()); |
| 6554 // changes the map of the input operand. Use it only when creating | 6554 SetGVNFlag(kChangesNewSpacePromotion); |
| 6555 |
| 6556 // This instruction is not marked as kChangesMaps, but does |
| 6557 // change the map of the input operand. Use it only when creating |
| 6555 // object literals via a runtime call. | 6558 // object literals via a runtime call. |
| 6556 ASSERT(value->IsCallRuntime()); | 6559 ASSERT(value->IsCallRuntime()); |
| 6557 #ifdef DEBUG | 6560 #ifdef DEBUG |
| 6558 const Runtime::Function* function = HCallRuntime::cast(value)->function(); | 6561 const Runtime::Function* function = HCallRuntime::cast(value)->function(); |
| 6559 ASSERT(function->function_id == Runtime::kCreateObjectLiteral || | 6562 ASSERT(function->function_id == Runtime::kCreateObjectLiteral || |
| 6560 function->function_id == Runtime::kCreateObjectLiteralShallow); | 6563 function->function_id == Runtime::kCreateObjectLiteralShallow); |
| 6561 #endif | 6564 #endif |
| 6562 set_representation(Representation::Tagged()); | |
| 6563 } | 6565 } |
| 6564 | 6566 |
| 6565 virtual bool IsDeletable() const { return true; } | 6567 virtual bool IsDeletable() const { return true; } |
| 6566 }; | 6568 }; |
| 6567 | 6569 |
| 6568 | 6570 |
| 6569 class HValueOf: public HUnaryOperation { | 6571 class HValueOf: public HUnaryOperation { |
| 6570 public: | 6572 public: |
| 6571 explicit HValueOf(HValue* value) : HUnaryOperation(value) { | 6573 explicit HValueOf(HValue* value) : HUnaryOperation(value) { |
| 6572 set_representation(Representation::Tagged()); | 6574 set_representation(Representation::Tagged()); |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6773 virtual bool IsDeletable() const { return true; } | 6775 virtual bool IsDeletable() const { return true; } |
| 6774 }; | 6776 }; |
| 6775 | 6777 |
| 6776 | 6778 |
| 6777 #undef DECLARE_INSTRUCTION | 6779 #undef DECLARE_INSTRUCTION |
| 6778 #undef DECLARE_CONCRETE_INSTRUCTION | 6780 #undef DECLARE_CONCRETE_INSTRUCTION |
| 6779 | 6781 |
| 6780 } } // namespace v8::internal | 6782 } } // namespace v8::internal |
| 6781 | 6783 |
| 6782 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 6784 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |