| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
| 8 | 8 |
| 9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 1719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1730 int length = subexprs->length(); | 1730 int length = subexprs->length(); |
| 1731 Handle<FixedArray> constant_elements = expr->constant_elements(); | 1731 Handle<FixedArray> constant_elements = expr->constant_elements(); |
| 1732 DCHECK_EQ(2, constant_elements->length()); | 1732 DCHECK_EQ(2, constant_elements->length()); |
| 1733 ElementsKind constant_elements_kind = | 1733 ElementsKind constant_elements_kind = |
| 1734 static_cast<ElementsKind>(Smi::cast(constant_elements->get(0))->value()); | 1734 static_cast<ElementsKind>(Smi::cast(constant_elements->get(0))->value()); |
| 1735 bool has_constant_fast_elements = | 1735 bool has_constant_fast_elements = |
| 1736 IsFastObjectElementsKind(constant_elements_kind); | 1736 IsFastObjectElementsKind(constant_elements_kind); |
| 1737 Handle<FixedArrayBase> constant_elements_values( | 1737 Handle<FixedArrayBase> constant_elements_values( |
| 1738 FixedArrayBase::cast(constant_elements->get(1))); | 1738 FixedArrayBase::cast(constant_elements->get(1))); |
| 1739 | 1739 |
| 1740 AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE; | 1740 AllocationSiteMode allocation_site_mode = |
| 1741 (FLAG_allocation_site_transitioning || FLAG_allocation_site_pretenuring) |
| 1742 ? TRACK_ALLOCATION_SITE |
| 1743 : DONT_TRACK_ALLOCATION_SITE; |
| 1744 |
| 1741 if (has_constant_fast_elements && !FLAG_allocation_site_pretenuring) { | 1745 if (has_constant_fast_elements && !FLAG_allocation_site_pretenuring) { |
| 1742 // If the only customer of allocation sites is transitioning, then | 1746 // 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. | 1747 // we can turn it off if we don't have anywhere else to transition to. |
| 1744 allocation_site_mode = DONT_TRACK_ALLOCATION_SITE; | 1748 allocation_site_mode = DONT_TRACK_ALLOCATION_SITE; |
| 1745 } | 1749 } |
| 1746 | 1750 |
| 1747 if (expr->depth() > 1 || length > JSObject::kInitialMaxFastElementArray) { | 1751 if (expr->depth() > 1 || length > JSObject::kInitialMaxFastElementArray) { |
| 1748 __ mov(ebx, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); | 1752 __ mov(ebx, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); |
| 1749 __ push(FieldOperand(ebx, JSFunction::kLiteralsOffset)); | 1753 __ push(FieldOperand(ebx, JSFunction::kLiteralsOffset)); |
| 1750 __ push(Immediate(Smi::FromInt(expr->literal_index()))); | 1754 __ push(Immediate(Smi::FromInt(expr->literal_index()))); |
| (...skipping 3228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4979 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 4983 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
| 4980 Assembler::target_address_at(call_target_address, | 4984 Assembler::target_address_at(call_target_address, |
| 4981 unoptimized_code)); | 4985 unoptimized_code)); |
| 4982 return OSR_AFTER_STACK_CHECK; | 4986 return OSR_AFTER_STACK_CHECK; |
| 4983 } | 4987 } |
| 4984 | 4988 |
| 4985 | 4989 |
| 4986 } } // namespace v8::internal | 4990 } } // namespace v8::internal |
| 4987 | 4991 |
| 4988 #endif // V8_TARGET_ARCH_IA32 | 4992 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |