| 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 1649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1660 AllocationSiteMode AllocationSite::GetMode( | 1660 AllocationSiteMode AllocationSite::GetMode( |
| 1661 ElementsKind boilerplate_elements_kind) { | 1661 ElementsKind boilerplate_elements_kind) { |
| 1662 if (IsFastSmiElementsKind(boilerplate_elements_kind)) { | 1662 if (IsFastSmiElementsKind(boilerplate_elements_kind)) { |
| 1663 return TRACK_ALLOCATION_SITE; | 1663 return TRACK_ALLOCATION_SITE; |
| 1664 } | 1664 } |
| 1665 | 1665 |
| 1666 return DONT_TRACK_ALLOCATION_SITE; | 1666 return DONT_TRACK_ALLOCATION_SITE; |
| 1667 } | 1667 } |
| 1668 | 1668 |
| 1669 inline bool AllocationSite::CanTrack(InstanceType type) { | 1669 inline bool AllocationSite::CanTrack(InstanceType type) { |
| 1670 if (FLAG_turbo) { |
| 1671 // TurboFan doesn't care at all about String pretenuring feedback, |
| 1672 // so don't bother even trying to track that. |
| 1673 return type == JS_ARRAY_TYPE || type == JS_OBJECT_TYPE; |
| 1674 } |
| 1670 if (FLAG_allocation_site_pretenuring) { | 1675 if (FLAG_allocation_site_pretenuring) { |
| 1671 return type == JS_ARRAY_TYPE || | 1676 return type == JS_ARRAY_TYPE || |
| 1672 type == JS_OBJECT_TYPE || | 1677 type == JS_OBJECT_TYPE || |
| 1673 type < FIRST_NONSTRING_TYPE; | 1678 type < FIRST_NONSTRING_TYPE; |
| 1674 } | 1679 } |
| 1675 return type == JS_ARRAY_TYPE; | 1680 return type == JS_ARRAY_TYPE; |
| 1676 } | 1681 } |
| 1677 | 1682 |
| 1678 | 1683 |
| 1679 AllocationSite::PretenureDecision AllocationSite::pretenure_decision() { | 1684 AllocationSite::PretenureDecision AllocationSite::pretenure_decision() { |
| (...skipping 6575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8255 #undef WRITE_INT64_FIELD | 8260 #undef WRITE_INT64_FIELD |
| 8256 #undef READ_BYTE_FIELD | 8261 #undef READ_BYTE_FIELD |
| 8257 #undef WRITE_BYTE_FIELD | 8262 #undef WRITE_BYTE_FIELD |
| 8258 #undef NOBARRIER_READ_BYTE_FIELD | 8263 #undef NOBARRIER_READ_BYTE_FIELD |
| 8259 #undef NOBARRIER_WRITE_BYTE_FIELD | 8264 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 8260 | 8265 |
| 8261 } // namespace internal | 8266 } // namespace internal |
| 8262 } // namespace v8 | 8267 } // namespace v8 |
| 8263 | 8268 |
| 8264 #endif // V8_OBJECTS_INL_H_ | 8269 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |