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 1317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1328 } | 1328 } |
1329 | 1329 |
1330 return DONT_TRACK_ALLOCATION_SITE; | 1330 return DONT_TRACK_ALLOCATION_SITE; |
1331 } | 1331 } |
1332 | 1332 |
1333 | 1333 |
1334 AllocationSiteMode AllocationSite::GetMode(ElementsKind from, | 1334 AllocationSiteMode AllocationSite::GetMode(ElementsKind from, |
1335 ElementsKind to) { | 1335 ElementsKind to) { |
1336 if (FLAG_track_allocation_sites && | 1336 if (FLAG_track_allocation_sites && |
1337 IsFastSmiElementsKind(from) && | 1337 IsFastSmiElementsKind(from) && |
1338 (IsFastObjectElementsKind(to) || IsFastDoubleElementsKind(to))) { | 1338 IsFastElementsKind(to) && |
1339 from != to) { | |
Toon Verwaest
2013/07/11 09:35:08
Use IsMoreGeneralElementsKind to ensure we never t
mvstanton
2013/07/11 13:01:33
Done.
| |
1339 return TRACK_ALLOCATION_SITE; | 1340 return TRACK_ALLOCATION_SITE; |
1340 } | 1341 } |
1341 | 1342 |
1342 return DONT_TRACK_ALLOCATION_SITE; | 1343 return DONT_TRACK_ALLOCATION_SITE; |
1343 } | 1344 } |
1344 | 1345 |
1345 | 1346 |
1346 MaybeObject* JSObject::EnsureCanContainHeapObjectElements() { | 1347 MaybeObject* JSObject::EnsureCanContainHeapObjectElements() { |
1347 ValidateElements(); | 1348 ValidateElements(); |
1348 ElementsKind elements_kind = map()->elements_kind(); | 1349 ElementsKind elements_kind = map()->elements_kind(); |
(...skipping 4833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6182 #undef WRITE_UINT32_FIELD | 6183 #undef WRITE_UINT32_FIELD |
6183 #undef READ_SHORT_FIELD | 6184 #undef READ_SHORT_FIELD |
6184 #undef WRITE_SHORT_FIELD | 6185 #undef WRITE_SHORT_FIELD |
6185 #undef READ_BYTE_FIELD | 6186 #undef READ_BYTE_FIELD |
6186 #undef WRITE_BYTE_FIELD | 6187 #undef WRITE_BYTE_FIELD |
6187 | 6188 |
6188 | 6189 |
6189 } } // namespace v8::internal | 6190 } } // namespace v8::internal |
6190 | 6191 |
6191 #endif // V8_OBJECTS_INL_H_ | 6192 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |