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 1559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1570 TransitionArray* transitions = map->transitions(); | 1570 TransitionArray* transitions = map->transitions(); |
1571 int transition = transitions->Search(*key); | 1571 int transition = transitions->Search(*key); |
1572 if (transition == TransitionArray::kNotFound) return Handle<Map>::null(); | 1572 if (transition == TransitionArray::kNotFound) return Handle<Map>::null(); |
1573 PropertyDetails target_details = transitions->GetTargetDetails(transition); | 1573 PropertyDetails target_details = transitions->GetTargetDetails(transition); |
1574 if (target_details.type() != FIELD) return Handle<Map>::null(); | 1574 if (target_details.type() != FIELD) return Handle<Map>::null(); |
1575 if (target_details.attributes() != NONE) return Handle<Map>::null(); | 1575 if (target_details.attributes() != NONE) return Handle<Map>::null(); |
1576 return Handle<Map>(transitions->GetTarget(transition)); | 1576 return Handle<Map>(transitions->GetTarget(transition)); |
1577 } | 1577 } |
1578 | 1578 |
1579 | 1579 |
1580 int JSObject::LastAddedFieldIndex() { | |
1581 Map* map = this->map(); | |
1582 int last_added = map->LastAdded(); | |
1583 return map->instance_descriptors()->GetFieldIndex(last_added); | |
1584 } | |
1585 | |
1586 | |
1587 ACCESSORS(Oddball, to_string, String, kToStringOffset) | 1580 ACCESSORS(Oddball, to_string, String, kToStringOffset) |
1588 ACCESSORS(Oddball, to_number, Object, kToNumberOffset) | 1581 ACCESSORS(Oddball, to_number, Object, kToNumberOffset) |
1589 | 1582 |
1590 | 1583 |
1591 byte Oddball::kind() { | 1584 byte Oddball::kind() { |
1592 return Smi::cast(READ_FIELD(this, kKindOffset))->value(); | 1585 return Smi::cast(READ_FIELD(this, kKindOffset))->value(); |
1593 } | 1586 } |
1594 | 1587 |
1595 | 1588 |
1596 void Oddball::set_kind(byte value) { | 1589 void Oddball::set_kind(byte value) { |
(...skipping 4662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6259 #undef WRITE_UINT32_FIELD | 6252 #undef WRITE_UINT32_FIELD |
6260 #undef READ_SHORT_FIELD | 6253 #undef READ_SHORT_FIELD |
6261 #undef WRITE_SHORT_FIELD | 6254 #undef WRITE_SHORT_FIELD |
6262 #undef READ_BYTE_FIELD | 6255 #undef READ_BYTE_FIELD |
6263 #undef WRITE_BYTE_FIELD | 6256 #undef WRITE_BYTE_FIELD |
6264 | 6257 |
6265 | 6258 |
6266 } } // namespace v8::internal | 6259 } } // namespace v8::internal |
6267 | 6260 |
6268 #endif // V8_OBJECTS_INL_H_ | 6261 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |