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 28 matching lines...) Expand all Loading... |
39 // | 39 // |
40 // Each descriptor has a key, property attributes, property type, | 40 // Each descriptor has a key, property attributes, property type, |
41 // property index (in the actual instance-descriptor array) and | 41 // property index (in the actual instance-descriptor array) and |
42 // optionally a piece of data. | 42 // optionally a piece of data. |
43 // | 43 // |
44 | 44 |
45 class Descriptor BASE_EMBEDDED { | 45 class Descriptor BASE_EMBEDDED { |
46 public: | 46 public: |
47 MUST_USE_RESULT MaybeObject* KeyToUniqueName() { | 47 MUST_USE_RESULT MaybeObject* KeyToUniqueName() { |
48 if (!key_->IsUniqueName()) { | 48 if (!key_->IsUniqueName()) { |
49 MaybeObject* maybe_result = HEAP->InternalizeString(String::cast(key_)); | 49 MaybeObject* maybe_result = |
| 50 key_->GetIsolate()->heap()->InternalizeString(String::cast(key_)); |
50 if (!maybe_result->To(&key_)) return maybe_result; | 51 if (!maybe_result->To(&key_)) return maybe_result; |
51 } | 52 } |
52 return key_; | 53 return key_; |
53 } | 54 } |
54 | 55 |
55 Name* GetKey() { return key_; } | 56 Name* GetKey() { return key_; } |
56 Object* GetValue() { return value_; } | 57 Object* GetValue() { return value_; } |
57 PropertyDetails GetDetails() { return details_; } | 58 PropertyDetails GetDetails() { return details_; } |
58 | 59 |
59 #ifdef OBJECT_PRINT | 60 #ifdef OBJECT_PRINT |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
502 JSReceiver* holder_; | 503 JSReceiver* holder_; |
503 int number_; | 504 int number_; |
504 bool cacheable_; | 505 bool cacheable_; |
505 PropertyDetails details_; | 506 PropertyDetails details_; |
506 }; | 507 }; |
507 | 508 |
508 | 509 |
509 } } // namespace v8::internal | 510 } } // namespace v8::internal |
510 | 511 |
511 #endif // V8_PROPERTY_H_ | 512 #endif // V8_PROPERTY_H_ |
OLD | NEW |