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 1718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1729 int length = subexprs->length(); | 1729 int length = subexprs->length(); |
1730 Handle<FixedArray> constant_elements = expr->constant_elements(); | 1730 Handle<FixedArray> constant_elements = expr->constant_elements(); |
1731 ASSERT_EQ(2, constant_elements->length()); | 1731 ASSERT_EQ(2, constant_elements->length()); |
1732 ElementsKind constant_elements_kind = | 1732 ElementsKind constant_elements_kind = |
1733 static_cast<ElementsKind>(Smi::cast(constant_elements->get(0))->value()); | 1733 static_cast<ElementsKind>(Smi::cast(constant_elements->get(0))->value()); |
1734 bool has_constant_fast_elements = | 1734 bool has_constant_fast_elements = |
1735 IsFastObjectElementsKind(constant_elements_kind); | 1735 IsFastObjectElementsKind(constant_elements_kind); |
1736 Handle<FixedArrayBase> constant_elements_values( | 1736 Handle<FixedArrayBase> constant_elements_values( |
1737 FixedArrayBase::cast(constant_elements->get(1))); | 1737 FixedArrayBase::cast(constant_elements->get(1))); |
1738 | 1738 |
1739 AllocationSiteMode allocation_site_mode = FLAG_track_allocation_sites | 1739 AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE; |
1740 ? TRACK_ALLOCATION_SITE : DONT_TRACK_ALLOCATION_SITE; | |
1741 if (has_constant_fast_elements && !FLAG_allocation_site_pretenuring) { | 1740 if (has_constant_fast_elements && !FLAG_allocation_site_pretenuring) { |
1742 // If the only customer of allocation sites is transitioning, then | 1741 // If the only customer of allocation sites is transitioning, then |
1743 // we can turn it off if we don't have anywhere else to transition to. | 1742 // we can turn it off if we don't have anywhere else to transition to. |
1744 allocation_site_mode = DONT_TRACK_ALLOCATION_SITE; | 1743 allocation_site_mode = DONT_TRACK_ALLOCATION_SITE; |
1745 } | 1744 } |
1746 | 1745 |
1747 Heap* heap = isolate()->heap(); | 1746 Heap* heap = isolate()->heap(); |
1748 if (has_constant_fast_elements && | 1747 if (has_constant_fast_elements && |
1749 constant_elements_values->map() == heap->fixed_cow_array_map()) { | 1748 constant_elements_values->map() == heap->fixed_cow_array_map()) { |
1750 // If the elements are already FAST_*_ELEMENTS, the boilerplate cannot | 1749 // If the elements are already FAST_*_ELEMENTS, the boilerplate cannot |
(...skipping 3150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4901 | 4900 |
4902 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 4901 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
4903 Assembler::target_address_at(call_target_address)); | 4902 Assembler::target_address_at(call_target_address)); |
4904 return OSR_AFTER_STACK_CHECK; | 4903 return OSR_AFTER_STACK_CHECK; |
4905 } | 4904 } |
4906 | 4905 |
4907 | 4906 |
4908 } } // namespace v8::internal | 4907 } } // namespace v8::internal |
4909 | 4908 |
4910 #endif // V8_TARGET_ARCH_X64 | 4909 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |