Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(218)

Side by Side Diff: src/hydrogen-instructions.h

Issue 22819011: Fix replaying of captured objects during chunk building. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Copied^H^H^HPorted to other architectures. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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_; }
3222 3223
3223 DECLARE_CONCRETE_INSTRUCTION(CapturedObject) 3224 DECLARE_CONCRETE_INSTRUCTION(CapturedObject)
3225
3226 private:
3227 int capture_id_;
3224 }; 3228 };
3225 3229
3226 3230
3227 class HConstant V8_FINAL : public HTemplateInstruction<0> { 3231 class HConstant V8_FINAL : public HTemplateInstruction<0> {
3228 public: 3232 public:
3229 DECLARE_INSTRUCTION_FACTORY_P1(HConstant, int32_t); 3233 DECLARE_INSTRUCTION_FACTORY_P1(HConstant, int32_t);
3230 DECLARE_INSTRUCTION_FACTORY_P2(HConstant, int32_t, Representation); 3234 DECLARE_INSTRUCTION_FACTORY_P2(HConstant, int32_t, Representation);
3231 DECLARE_INSTRUCTION_FACTORY_P1(HConstant, double); 3235 DECLARE_INSTRUCTION_FACTORY_P1(HConstant, double);
3232 DECLARE_INSTRUCTION_FACTORY_P1(HConstant, Handle<Object>); 3236 DECLARE_INSTRUCTION_FACTORY_P1(HConstant, Handle<Object>);
3233 DECLARE_INSTRUCTION_FACTORY_P1(HConstant, ExternalReference); 3237 DECLARE_INSTRUCTION_FACTORY_P1(HConstant, ExternalReference);
(...skipping 3559 matching lines...) Expand 10 before | Expand all | Expand 10 after
6793 virtual bool IsDeletable() const V8_OVERRIDE { return true; } 6797 virtual bool IsDeletable() const V8_OVERRIDE { return true; }
6794 }; 6798 };
6795 6799
6796 6800
6797 #undef DECLARE_INSTRUCTION 6801 #undef DECLARE_INSTRUCTION
6798 #undef DECLARE_CONCRETE_INSTRUCTION 6802 #undef DECLARE_CONCRETE_INSTRUCTION
6799 6803
6800 } } // namespace v8::internal 6804 } } // namespace v8::internal
6801 6805
6802 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 6806 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698