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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 58 |
59 String* GetKey() { return key_; } | 59 String* GetKey() { return key_; } |
60 Object* GetValue() { return value_; } | 60 Object* GetValue() { return value_; } |
61 PropertyDetails GetDetails() { return details_; } | 61 PropertyDetails GetDetails() { return details_; } |
62 | 62 |
63 #ifdef OBJECT_PRINT | 63 #ifdef OBJECT_PRINT |
64 void Print(FILE* out); | 64 void Print(FILE* out); |
65 #endif | 65 #endif |
66 | 66 |
67 void SetEnumerationIndex(int index) { | 67 void SetEnumerationIndex(int index) { |
68 ASSERT(PropertyDetails::IsValidIndex(index)); | |
69 details_ = PropertyDetails(details_.attributes(), details_.type(), index); | 68 details_ = PropertyDetails(details_.attributes(), details_.type(), index); |
70 } | 69 } |
71 | 70 |
| 71 void SetSortedKey(int index) { details_ = details_.set_pointer(index); } |
| 72 |
72 private: | 73 private: |
73 String* key_; | 74 String* key_; |
74 Object* value_; | 75 Object* value_; |
75 PropertyDetails details_; | 76 PropertyDetails details_; |
76 | 77 |
77 protected: | 78 protected: |
78 Descriptor() : details_(Smi::FromInt(0)) {} | 79 Descriptor() : details_(Smi::FromInt(0)) {} |
79 | 80 |
80 void Init(String* key, Object* value, PropertyDetails details) { | 81 void Init(String* key, Object* value, PropertyDetails details) { |
81 key_ = key; | 82 key_ = key; |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 JSReceiver* holder_; | 407 JSReceiver* holder_; |
407 int number_; | 408 int number_; |
408 bool cacheable_; | 409 bool cacheable_; |
409 PropertyDetails details_; | 410 PropertyDetails details_; |
410 }; | 411 }; |
411 | 412 |
412 | 413 |
413 } } // namespace v8::internal | 414 } } // namespace v8::internal |
414 | 415 |
415 #endif // V8_PROPERTY_H_ | 416 #endif // V8_PROPERTY_H_ |
OLD | NEW |