| 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 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1319 set_transition_info(Smi::FromInt(0)); | 1319 set_transition_info(Smi::FromInt(0)); |
| 1320 set_dependent_code(DependentCode::cast(GetHeap()->empty_fixed_array()), | 1320 set_dependent_code(DependentCode::cast(GetHeap()->empty_fixed_array()), |
| 1321 SKIP_WRITE_BARRIER); | 1321 SKIP_WRITE_BARRIER); |
| 1322 } | 1322 } |
| 1323 | 1323 |
| 1324 | 1324 |
| 1325 // Heuristic: We only need to create allocation site info if the boilerplate | 1325 // Heuristic: We only need to create allocation site info if the boilerplate |
| 1326 // elements kind is the initial elements kind. | 1326 // elements kind is the initial elements kind. |
| 1327 AllocationSiteMode AllocationSite::GetMode( | 1327 AllocationSiteMode AllocationSite::GetMode( |
| 1328 ElementsKind boilerplate_elements_kind) { | 1328 ElementsKind boilerplate_elements_kind) { |
| 1329 if (FLAG_track_allocation_sites && | 1329 if (IsFastSmiElementsKind(boilerplate_elements_kind)) { |
| 1330 IsFastSmiElementsKind(boilerplate_elements_kind)) { | |
| 1331 return TRACK_ALLOCATION_SITE; | 1330 return TRACK_ALLOCATION_SITE; |
| 1332 } | 1331 } |
| 1333 | 1332 |
| 1334 return DONT_TRACK_ALLOCATION_SITE; | 1333 return DONT_TRACK_ALLOCATION_SITE; |
| 1335 } | 1334 } |
| 1336 | 1335 |
| 1337 | 1336 |
| 1338 AllocationSiteMode AllocationSite::GetMode(ElementsKind from, | 1337 AllocationSiteMode AllocationSite::GetMode(ElementsKind from, |
| 1339 ElementsKind to) { | 1338 ElementsKind to) { |
| 1340 if (FLAG_track_allocation_sites && | 1339 if (IsFastSmiElementsKind(from) && |
| 1341 IsFastSmiElementsKind(from) && | |
| 1342 IsMoreGeneralElementsKindTransition(from, to)) { | 1340 IsMoreGeneralElementsKindTransition(from, to)) { |
| 1343 return TRACK_ALLOCATION_SITE; | 1341 return TRACK_ALLOCATION_SITE; |
| 1344 } | 1342 } |
| 1345 | 1343 |
| 1346 return DONT_TRACK_ALLOCATION_SITE; | 1344 return DONT_TRACK_ALLOCATION_SITE; |
| 1347 } | 1345 } |
| 1348 | 1346 |
| 1349 | 1347 |
| 1350 inline bool AllocationSite::CanTrack(InstanceType type) { | 1348 inline bool AllocationSite::CanTrack(InstanceType type) { |
| 1351 if (FLAG_allocation_site_pretenuring) { | 1349 if (FLAG_allocation_site_pretenuring) { |
| (...skipping 5128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6480 #undef WRITE_UINT32_FIELD | 6478 #undef WRITE_UINT32_FIELD |
| 6481 #undef READ_SHORT_FIELD | 6479 #undef READ_SHORT_FIELD |
| 6482 #undef WRITE_SHORT_FIELD | 6480 #undef WRITE_SHORT_FIELD |
| 6483 #undef READ_BYTE_FIELD | 6481 #undef READ_BYTE_FIELD |
| 6484 #undef WRITE_BYTE_FIELD | 6482 #undef WRITE_BYTE_FIELD |
| 6485 | 6483 |
| 6486 | 6484 |
| 6487 } } // namespace v8::internal | 6485 } } // namespace v8::internal |
| 6488 | 6486 |
| 6489 #endif // V8_OBJECTS_INL_H_ | 6487 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |