| 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 1426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1437 if (transition == TransitionArray::kNotFound) return false; | 1437 if (transition == TransitionArray::kNotFound) return false; |
| 1438 PropertyDetails target_details = transitions->GetTargetDetails(transition); | 1438 PropertyDetails target_details = transitions->GetTargetDetails(transition); |
| 1439 if (target_details.type() != FIELD) return false; | 1439 if (target_details.type() != FIELD) return false; |
| 1440 if (target_details.attributes() != NONE) return false; | 1440 if (target_details.attributes() != NONE) return false; |
| 1441 Handle<Map> target(transitions->GetTarget(transition)); | 1441 Handle<Map> target(transitions->GetTarget(transition)); |
| 1442 JSObject::AddFastPropertyUsingMap(object, target); | 1442 JSObject::AddFastPropertyUsingMap(object, target); |
| 1443 return true; | 1443 return true; |
| 1444 } | 1444 } |
| 1445 | 1445 |
| 1446 | 1446 |
| 1447 int JSObject::LastAddedFieldIndex() { |
| 1448 Map* map = this->map(); |
| 1449 int last_added = map->LastAdded(); |
| 1450 return map->instance_descriptors()->GetFieldIndex(last_added); |
| 1451 } |
| 1452 |
| 1453 |
| 1447 ACCESSORS(Oddball, to_string, String, kToStringOffset) | 1454 ACCESSORS(Oddball, to_string, String, kToStringOffset) |
| 1448 ACCESSORS(Oddball, to_number, Object, kToNumberOffset) | 1455 ACCESSORS(Oddball, to_number, Object, kToNumberOffset) |
| 1449 | 1456 |
| 1450 | 1457 |
| 1451 byte Oddball::kind() { | 1458 byte Oddball::kind() { |
| 1452 return Smi::cast(READ_FIELD(this, kKindOffset))->value(); | 1459 return Smi::cast(READ_FIELD(this, kKindOffset))->value(); |
| 1453 } | 1460 } |
| 1454 | 1461 |
| 1455 | 1462 |
| 1456 void Oddball::set_kind(byte value) { | 1463 void Oddball::set_kind(byte value) { |
| (...skipping 4076 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5533 #undef WRITE_UINT32_FIELD | 5540 #undef WRITE_UINT32_FIELD |
| 5534 #undef READ_SHORT_FIELD | 5541 #undef READ_SHORT_FIELD |
| 5535 #undef WRITE_SHORT_FIELD | 5542 #undef WRITE_SHORT_FIELD |
| 5536 #undef READ_BYTE_FIELD | 5543 #undef READ_BYTE_FIELD |
| 5537 #undef WRITE_BYTE_FIELD | 5544 #undef WRITE_BYTE_FIELD |
| 5538 | 5545 |
| 5539 | 5546 |
| 5540 } } // namespace v8::internal | 5547 } } // namespace v8::internal |
| 5541 | 5548 |
| 5542 #endif // V8_OBJECTS_INL_H_ | 5549 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |