| 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 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 return number_; | 415 return number_; |
| 416 } | 416 } |
| 417 | 417 |
| 418 int GetDescriptorIndex() { | 418 int GetDescriptorIndex() { |
| 419 ASSERT(lookup_type_ == DESCRIPTOR_TYPE); | 419 ASSERT(lookup_type_ == DESCRIPTOR_TYPE); |
| 420 return number_; | 420 return number_; |
| 421 } | 421 } |
| 422 | 422 |
| 423 PropertyIndex GetFieldIndex() { | 423 PropertyIndex GetFieldIndex() { |
| 424 ASSERT(lookup_type_ == DESCRIPTOR_TYPE); | 424 ASSERT(lookup_type_ == DESCRIPTOR_TYPE); |
| 425 ASSERT(IsField()); | |
| 426 return PropertyIndex::NewFieldIndex(GetFieldIndexFromMap(holder()->map())); | 425 return PropertyIndex::NewFieldIndex(GetFieldIndexFromMap(holder()->map())); |
| 427 } | 426 } |
| 428 | 427 |
| 429 int GetLocalFieldIndexFromMap(Map* map) { | 428 int GetLocalFieldIndexFromMap(Map* map) { |
| 430 ASSERT(IsField()); | |
| 431 return GetFieldIndexFromMap(map) - map->inobject_properties(); | 429 return GetFieldIndexFromMap(map) - map->inobject_properties(); |
| 432 } | 430 } |
| 433 | 431 |
| 434 int GetDictionaryEntry() { | 432 int GetDictionaryEntry() { |
| 435 ASSERT(lookup_type_ == DICTIONARY_TYPE); | 433 ASSERT(lookup_type_ == DICTIONARY_TYPE); |
| 436 return number_; | 434 return number_; |
| 437 } | 435 } |
| 438 | 436 |
| 439 JSFunction* GetConstantFunction() { | 437 JSFunction* GetConstantFunction() { |
| 440 ASSERT(type() == CONSTANT); | 438 ASSERT(type() == CONSTANT); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 JSReceiver* holder_; | 502 JSReceiver* holder_; |
| 505 int number_; | 503 int number_; |
| 506 bool cacheable_; | 504 bool cacheable_; |
| 507 PropertyDetails details_; | 505 PropertyDetails details_; |
| 508 }; | 506 }; |
| 509 | 507 |
| 510 | 508 |
| 511 } } // namespace v8::internal | 509 } } // namespace v8::internal |
| 512 | 510 |
| 513 #endif // V8_PROPERTY_H_ | 511 #endif // V8_PROPERTY_H_ |
| OLD | NEW |