OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 2557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2568 } | 2568 } |
2569 | 2569 |
2570 private: | 2570 private: |
2571 Handle<JSGlobalPropertyCell> cell_; | 2571 Handle<JSGlobalPropertyCell> cell_; |
2572 bool check_hole_value_; | 2572 bool check_hole_value_; |
2573 }; | 2573 }; |
2574 | 2574 |
2575 | 2575 |
2576 class HStoreGlobal: public HUnaryOperation { | 2576 class HStoreGlobal: public HUnaryOperation { |
2577 public: | 2577 public: |
2578 HStoreGlobal(HValue* value, Handle<JSGlobalPropertyCell> cell) | 2578 HStoreGlobal(HValue* value, |
2579 : HUnaryOperation(value), cell_(cell) { | 2579 Handle<JSGlobalPropertyCell> cell, |
| 2580 bool check_hole_value) |
| 2581 : HUnaryOperation(value), |
| 2582 cell_(cell), |
| 2583 check_hole_value_(check_hole_value) { |
2580 SetFlag(kChangesGlobalVars); | 2584 SetFlag(kChangesGlobalVars); |
2581 } | 2585 } |
2582 | 2586 |
2583 Handle<JSGlobalPropertyCell> cell() const { return cell_; } | 2587 Handle<JSGlobalPropertyCell> cell() const { return cell_; } |
| 2588 bool check_hole_value() const { return check_hole_value_; } |
2584 | 2589 |
2585 virtual Representation RequiredInputRepresentation(int index) const { | 2590 virtual Representation RequiredInputRepresentation(int index) const { |
2586 return Representation::Tagged(); | 2591 return Representation::Tagged(); |
2587 } | 2592 } |
2588 virtual void PrintDataTo(StringStream* stream) const; | 2593 virtual void PrintDataTo(StringStream* stream) const; |
2589 | 2594 |
2590 DECLARE_CONCRETE_INSTRUCTION(StoreGlobal, "store_global") | 2595 DECLARE_CONCRETE_INSTRUCTION(StoreGlobal, "store_global") |
2591 | 2596 |
2592 private: | 2597 private: |
2593 Handle<JSGlobalPropertyCell> cell_; | 2598 Handle<JSGlobalPropertyCell> cell_; |
| 2599 bool check_hole_value_; |
2594 }; | 2600 }; |
2595 | 2601 |
2596 | 2602 |
2597 class HLoadContextSlot: public HInstruction { | 2603 class HLoadContextSlot: public HInstruction { |
2598 public: | 2604 public: |
2599 HLoadContextSlot(int context_chain_length , int slot_index) | 2605 HLoadContextSlot(int context_chain_length , int slot_index) |
2600 : context_chain_length_(context_chain_length), slot_index_(slot_index) { | 2606 : context_chain_length_(context_chain_length), slot_index_(slot_index) { |
2601 set_representation(Representation::Tagged()); | 2607 set_representation(Representation::Tagged()); |
2602 SetFlag(kUseGVN); | 2608 SetFlag(kUseGVN); |
2603 SetFlag(kDependsOnCalls); | 2609 SetFlag(kDependsOnCalls); |
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3098 HValue* object() const { return left(); } | 3104 HValue* object() const { return left(); } |
3099 HValue* key() const { return right(); } | 3105 HValue* key() const { return right(); } |
3100 }; | 3106 }; |
3101 | 3107 |
3102 #undef DECLARE_INSTRUCTION | 3108 #undef DECLARE_INSTRUCTION |
3103 #undef DECLARE_CONCRETE_INSTRUCTION | 3109 #undef DECLARE_CONCRETE_INSTRUCTION |
3104 | 3110 |
3105 } } // namespace v8::internal | 3111 } } // namespace v8::internal |
3106 | 3112 |
3107 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 3113 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |