Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Side by Side Diff: src/ia32/full-codegen-ia32.cc

Issue 619863002: Introduce flag --allocation-site-transitioning Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Removed extra work happening when !transitioning && pretenuring. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698