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 (IsFastSmiElementsKind(boilerplate_elements_kind)) { | 1329 if (FLAG_track_allocation_sites && |
| 1330 IsFastSmiElementsKind(boilerplate_elements_kind)) { |
1330 return TRACK_ALLOCATION_SITE; | 1331 return TRACK_ALLOCATION_SITE; |
1331 } | 1332 } |
1332 | 1333 |
1333 return DONT_TRACK_ALLOCATION_SITE; | 1334 return DONT_TRACK_ALLOCATION_SITE; |
1334 } | 1335 } |
1335 | 1336 |
1336 | 1337 |
1337 AllocationSiteMode AllocationSite::GetMode(ElementsKind from, | 1338 AllocationSiteMode AllocationSite::GetMode(ElementsKind from, |
1338 ElementsKind to) { | 1339 ElementsKind to) { |
1339 if (IsFastSmiElementsKind(from) && | 1340 if (FLAG_track_allocation_sites && |
| 1341 IsFastSmiElementsKind(from) && |
1340 IsMoreGeneralElementsKindTransition(from, to)) { | 1342 IsMoreGeneralElementsKindTransition(from, to)) { |
1341 return TRACK_ALLOCATION_SITE; | 1343 return TRACK_ALLOCATION_SITE; |
1342 } | 1344 } |
1343 | 1345 |
1344 return DONT_TRACK_ALLOCATION_SITE; | 1346 return DONT_TRACK_ALLOCATION_SITE; |
1345 } | 1347 } |
1346 | 1348 |
1347 | 1349 |
1348 inline bool AllocationSite::CanTrack(InstanceType type) { | 1350 inline bool AllocationSite::CanTrack(InstanceType type) { |
1349 if (FLAG_allocation_site_pretenuring) { | 1351 if (FLAG_allocation_site_pretenuring) { |
(...skipping 5112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6462 #undef WRITE_UINT32_FIELD | 6464 #undef WRITE_UINT32_FIELD |
6463 #undef READ_SHORT_FIELD | 6465 #undef READ_SHORT_FIELD |
6464 #undef WRITE_SHORT_FIELD | 6466 #undef WRITE_SHORT_FIELD |
6465 #undef READ_BYTE_FIELD | 6467 #undef READ_BYTE_FIELD |
6466 #undef WRITE_BYTE_FIELD | 6468 #undef WRITE_BYTE_FIELD |
6467 | 6469 |
6468 | 6470 |
6469 } } // namespace v8::internal | 6471 } } // namespace v8::internal |
6470 | 6472 |
6471 #endif // V8_OBJECTS_INL_H_ | 6473 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |