| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 // | 4 // |
| 5 // Review notes: | 5 // Review notes: |
| 6 // | 6 // |
| 7 // - The use of macros in these inline functions may seem superfluous | 7 // - The use of macros in these inline functions may seem superfluous |
| 8 // but it is absolutely needed to make sure gcc generates optimal | 8 // but it is absolutely needed to make sure gcc generates optimal |
| 9 // code. gcc is not happy when attempting to inline too deep. | 9 // code. gcc is not happy when attempting to inline too deep. |
| 10 // | 10 // |
| (...skipping 1868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1879 TransitionArray::kSimpleTransitionIndex)); | 1879 TransitionArray::kSimpleTransitionIndex)); |
| 1880 } | 1880 } |
| 1881 | 1881 |
| 1882 | 1882 |
| 1883 Handle<Map> Map::FindTransitionToField(Handle<Map> map, Handle<Name> key) { | 1883 Handle<Map> Map::FindTransitionToField(Handle<Map> map, Handle<Name> key) { |
| 1884 DisallowHeapAllocation no_allocation; | 1884 DisallowHeapAllocation no_allocation; |
| 1885 if (!map->HasTransitionArray()) return Handle<Map>::null(); | 1885 if (!map->HasTransitionArray()) return Handle<Map>::null(); |
| 1886 TransitionArray* transitions = map->transitions(); | 1886 TransitionArray* transitions = map->transitions(); |
| 1887 int transition = transitions->Search(FIELD, *key, NONE); | 1887 int transition = transitions->Search(FIELD, *key, NONE); |
| 1888 if (transition == TransitionArray::kNotFound) return Handle<Map>::null(); | 1888 if (transition == TransitionArray::kNotFound) return Handle<Map>::null(); |
| 1889 DCHECK_EQ(FIELD, transitions->GetTargetDetails(transition).type()); | 1889 PropertyDetails details = transitions->GetTargetDetails(transition); |
| 1890 DCHECK_EQ(NONE, transitions->GetTargetDetails(transition).attributes()); | 1890 if (details.type() != FIELD) return Handle<Map>::null(); |
| 1891 DCHECK_EQ(NONE, details.attributes()); |
| 1891 return Handle<Map>(transitions->GetTarget(transition)); | 1892 return Handle<Map>(transitions->GetTarget(transition)); |
| 1892 } | 1893 } |
| 1893 | 1894 |
| 1894 | 1895 |
| 1895 ACCESSORS(Oddball, to_string, String, kToStringOffset) | 1896 ACCESSORS(Oddball, to_string, String, kToStringOffset) |
| 1896 ACCESSORS(Oddball, to_number, Object, kToNumberOffset) | 1897 ACCESSORS(Oddball, to_number, Object, kToNumberOffset) |
| 1897 | 1898 |
| 1898 | 1899 |
| 1899 byte Oddball::kind() const { | 1900 byte Oddball::kind() const { |
| 1900 return Smi::cast(READ_FIELD(this, kKindOffset))->value(); | 1901 return Smi::cast(READ_FIELD(this, kKindOffset))->value(); |
| (...skipping 5438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7339 #undef READ_SHORT_FIELD | 7340 #undef READ_SHORT_FIELD |
| 7340 #undef WRITE_SHORT_FIELD | 7341 #undef WRITE_SHORT_FIELD |
| 7341 #undef READ_BYTE_FIELD | 7342 #undef READ_BYTE_FIELD |
| 7342 #undef WRITE_BYTE_FIELD | 7343 #undef WRITE_BYTE_FIELD |
| 7343 #undef NOBARRIER_READ_BYTE_FIELD | 7344 #undef NOBARRIER_READ_BYTE_FIELD |
| 7344 #undef NOBARRIER_WRITE_BYTE_FIELD | 7345 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 7345 | 7346 |
| 7346 } } // namespace v8::internal | 7347 } } // namespace v8::internal |
| 7347 | 7348 |
| 7348 #endif // V8_OBJECTS_INL_H_ | 7349 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |