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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 Map* GetTransitionMapFromMap(Map* map) { | 321 Map* GetTransitionMapFromMap(Map* map) { |
322 ASSERT(IsTransition()); | 322 ASSERT(IsTransition()); |
323 return map->transitions()->GetTarget(number_); | 323 return map->transitions()->GetTarget(number_); |
324 } | 324 } |
325 | 325 |
326 int GetTransitionIndex() { | 326 int GetTransitionIndex() { |
327 ASSERT(IsTransition()); | 327 ASSERT(IsTransition()); |
328 return number_; | 328 return number_; |
329 } | 329 } |
330 | 330 |
| 331 int GetDescriptorIndex() { |
| 332 ASSERT(lookup_type_ == DESCRIPTOR_TYPE); |
| 333 return number_; |
| 334 } |
| 335 |
331 int GetFieldIndex() { | 336 int GetFieldIndex() { |
332 ASSERT(lookup_type_ == DESCRIPTOR_TYPE); | 337 ASSERT(lookup_type_ == DESCRIPTOR_TYPE); |
333 ASSERT(IsField()); | 338 ASSERT(IsField()); |
334 return Descriptor::IndexFromValue(GetValue()); | 339 return Descriptor::IndexFromValue(GetValue()); |
335 } | 340 } |
336 | 341 |
337 int GetLocalFieldIndexFromMap(Map* map) { | 342 int GetLocalFieldIndexFromMap(Map* map) { |
338 ASSERT(IsField()); | 343 ASSERT(IsField()); |
339 return Descriptor::IndexFromValue(GetValueFromMap(map)) - | 344 return Descriptor::IndexFromValue(GetValueFromMap(map)) - |
340 map->inobject_properties(); | 345 map->inobject_properties(); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 JSReceiver* holder_; | 406 JSReceiver* holder_; |
402 int number_; | 407 int number_; |
403 bool cacheable_; | 408 bool cacheable_; |
404 PropertyDetails details_; | 409 PropertyDetails details_; |
405 }; | 410 }; |
406 | 411 |
407 | 412 |
408 } } // namespace v8::internal | 413 } } // namespace v8::internal |
409 | 414 |
410 #endif // V8_PROPERTY_H_ | 415 #endif // V8_PROPERTY_H_ |
OLD | NEW |