| 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 1456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1467 ASSERT(!IsZombie()); | 1467 ASSERT(!IsZombie()); |
| 1468 Initialize(); | 1468 Initialize(); |
| 1469 set_pretenure_decision(kZombie); | 1469 set_pretenure_decision(kZombie); |
| 1470 } | 1470 } |
| 1471 | 1471 |
| 1472 | 1472 |
| 1473 // Heuristic: We only need to create allocation site info if the boilerplate | 1473 // Heuristic: We only need to create allocation site info if the boilerplate |
| 1474 // elements kind is the initial elements kind. | 1474 // elements kind is the initial elements kind. |
| 1475 AllocationSiteMode AllocationSite::GetMode( | 1475 AllocationSiteMode AllocationSite::GetMode( |
| 1476 ElementsKind boilerplate_elements_kind) { | 1476 ElementsKind boilerplate_elements_kind) { |
| 1477 if (IsFastSmiElementsKind(boilerplate_elements_kind)) { | 1477 if (FLAG_pretenuring_call_new || |
| 1478 IsFastSmiElementsKind(boilerplate_elements_kind)) { |
| 1478 return TRACK_ALLOCATION_SITE; | 1479 return TRACK_ALLOCATION_SITE; |
| 1479 } | 1480 } |
| 1480 | 1481 |
| 1481 return DONT_TRACK_ALLOCATION_SITE; | 1482 return DONT_TRACK_ALLOCATION_SITE; |
| 1482 } | 1483 } |
| 1483 | 1484 |
| 1484 | 1485 |
| 1485 AllocationSiteMode AllocationSite::GetMode(ElementsKind from, | 1486 AllocationSiteMode AllocationSite::GetMode(ElementsKind from, |
| 1486 ElementsKind to) { | 1487 ElementsKind to) { |
| 1487 if (IsFastSmiElementsKind(from) && | 1488 if (FLAG_pretenuring_call_new || |
| 1488 IsMoreGeneralElementsKindTransition(from, to)) { | 1489 (IsFastSmiElementsKind(from) && |
| 1490 IsMoreGeneralElementsKindTransition(from, to))) { |
| 1489 return TRACK_ALLOCATION_SITE; | 1491 return TRACK_ALLOCATION_SITE; |
| 1490 } | 1492 } |
| 1491 | 1493 |
| 1492 return DONT_TRACK_ALLOCATION_SITE; | 1494 return DONT_TRACK_ALLOCATION_SITE; |
| 1493 } | 1495 } |
| 1494 | 1496 |
| 1495 | 1497 |
| 1496 inline bool AllocationSite::CanTrack(InstanceType type) { | 1498 inline bool AllocationSite::CanTrack(InstanceType type) { |
| 1497 if (FLAG_allocation_site_pretenuring) { | 1499 if (FLAG_allocation_site_pretenuring) { |
| 1498 return type == JS_ARRAY_TYPE || | 1500 return type == JS_ARRAY_TYPE || |
| (...skipping 5284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6783 #undef READ_UINT32_FIELD | 6785 #undef READ_UINT32_FIELD |
| 6784 #undef WRITE_UINT32_FIELD | 6786 #undef WRITE_UINT32_FIELD |
| 6785 #undef READ_SHORT_FIELD | 6787 #undef READ_SHORT_FIELD |
| 6786 #undef WRITE_SHORT_FIELD | 6788 #undef WRITE_SHORT_FIELD |
| 6787 #undef READ_BYTE_FIELD | 6789 #undef READ_BYTE_FIELD |
| 6788 #undef WRITE_BYTE_FIELD | 6790 #undef WRITE_BYTE_FIELD |
| 6789 | 6791 |
| 6790 } } // namespace v8::internal | 6792 } } // namespace v8::internal |
| 6791 | 6793 |
| 6792 #endif // V8_OBJECTS_INL_H_ | 6794 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |