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 3190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3201 HArgumentsObject(int count, Zone* zone) | 3201 HArgumentsObject(int count, Zone* zone) |
3202 : HDematerializedObject(count, zone) { | 3202 : HDematerializedObject(count, zone) { |
3203 set_representation(Representation::Tagged()); | 3203 set_representation(Representation::Tagged()); |
3204 SetFlag(kIsArguments); | 3204 SetFlag(kIsArguments); |
3205 } | 3205 } |
3206 }; | 3206 }; |
3207 | 3207 |
3208 | 3208 |
3209 class HCapturedObject V8_FINAL : public HDematerializedObject { | 3209 class HCapturedObject V8_FINAL : public HDematerializedObject { |
3210 public: | 3210 public: |
3211 HCapturedObject(int length, Zone* zone) | 3211 HCapturedObject(int length, int id, Zone* zone) |
3212 : HDematerializedObject(length, zone) { | 3212 : HDematerializedObject(length, zone), capture_id_(id) { |
3213 set_representation(Representation::Tagged()); | 3213 set_representation(Representation::Tagged()); |
3214 values_.AddBlock(NULL, length, zone); // Resize list. | 3214 values_.AddBlock(NULL, length, zone); // Resize list. |
3215 } | 3215 } |
3216 | 3216 |
3217 // The values contain a list of all in-object properties inside the | 3217 // The values contain a list of all in-object properties inside the |
3218 // captured object and is index by field index. Properties in the | 3218 // captured object and is index by field index. Properties in the |
3219 // properties or elements backing store are not tracked here. | 3219 // properties or elements backing store are not tracked here. |
3220 const ZoneList<HValue*>* values() const { return &values_; } | 3220 const ZoneList<HValue*>* values() const { return &values_; } |
3221 int length() const { return values_.length(); } | 3221 int length() const { return values_.length(); } |
| 3222 int capture_id() const { return capture_id_; } |
| 3223 |
| 3224 // Replay effects of this instruction on the given environment. |
| 3225 void ReplayEnvironment(HEnvironment* env); |
3222 | 3226 |
3223 DECLARE_CONCRETE_INSTRUCTION(CapturedObject) | 3227 DECLARE_CONCRETE_INSTRUCTION(CapturedObject) |
| 3228 |
| 3229 private: |
| 3230 int capture_id_; |
3224 }; | 3231 }; |
3225 | 3232 |
3226 | 3233 |
3227 class HConstant V8_FINAL : public HTemplateInstruction<0> { | 3234 class HConstant V8_FINAL : public HTemplateInstruction<0> { |
3228 public: | 3235 public: |
3229 DECLARE_INSTRUCTION_FACTORY_P1(HConstant, int32_t); | 3236 DECLARE_INSTRUCTION_FACTORY_P1(HConstant, int32_t); |
3230 DECLARE_INSTRUCTION_FACTORY_P2(HConstant, int32_t, Representation); | 3237 DECLARE_INSTRUCTION_FACTORY_P2(HConstant, int32_t, Representation); |
3231 DECLARE_INSTRUCTION_FACTORY_P1(HConstant, double); | 3238 DECLARE_INSTRUCTION_FACTORY_P1(HConstant, double); |
3232 DECLARE_INSTRUCTION_FACTORY_P1(HConstant, Handle<Object>); | 3239 DECLARE_INSTRUCTION_FACTORY_P1(HConstant, Handle<Object>); |
3233 DECLARE_INSTRUCTION_FACTORY_P1(HConstant, ExternalReference); | 3240 DECLARE_INSTRUCTION_FACTORY_P1(HConstant, ExternalReference); |
(...skipping 3559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6793 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 6800 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
6794 }; | 6801 }; |
6795 | 6802 |
6796 | 6803 |
6797 #undef DECLARE_INSTRUCTION | 6804 #undef DECLARE_INSTRUCTION |
6798 #undef DECLARE_CONCRETE_INSTRUCTION | 6805 #undef DECLARE_CONCRETE_INSTRUCTION |
6799 | 6806 |
6800 } } // namespace v8::internal | 6807 } } // namespace v8::internal |
6801 | 6808 |
6802 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 6809 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |