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

Unified Diff: src/ia32/code-stubs-ia32.cc

Issue 11817017: Additional work to get array literal allocation tracking working, even with --always-opt (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Quick adjustment to bit fields Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/code-stubs-ia32.cc
diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc
index 0828eb1a8c34da848658e3191266f33838aa9e96..4b71af66226ed584b1b719a7cffdba5003bb166e 100644
--- a/src/ia32/code-stubs-ia32.cc
+++ b/src/ia32/code-stubs-ia32.cc
@@ -323,7 +323,7 @@ static void GenerateFastCloneShallowArrayCommon(
MacroAssembler* masm,
int length,
FastCloneShallowArrayStub::Mode mode,
- AllocationSiteInfoMode allocation_site_info_mode,
+ AllocationSiteMode allocation_site_mode,
Label* fail) {
// Registers on entry:
//
@@ -339,7 +339,7 @@ static void GenerateFastCloneShallowArrayCommon(
}
int size = JSArray::kSize;
int allocation_info_start = size;
- if (allocation_site_info_mode == TRACK_ALLOCATION_SITE_INFO) {
+ if (allocation_site_mode == TRACK_ALLOCATION_SITE) {
size += AllocationSiteInfo::kSize;
}
size += elements_size;
@@ -352,7 +352,7 @@ static void GenerateFastCloneShallowArrayCommon(
}
__ AllocateInNewSpace(size, eax, ebx, edx, fail, flags);
- if (allocation_site_info_mode == TRACK_ALLOCATION_SITE_INFO) {
+ if (allocation_site_mode == TRACK_ALLOCATION_SITE) {
__ mov(FieldOperand(eax, allocation_info_start),
Immediate(Handle<Map>(masm->isolate()->heap()->
allocation_site_info_map())));
@@ -371,7 +371,7 @@ static void GenerateFastCloneShallowArrayCommon(
// Get hold of the elements array of the boilerplate and setup the
// elements pointer in the resulting object.
__ mov(ecx, FieldOperand(ecx, JSArray::kElementsOffset));
- if (allocation_site_info_mode == TRACK_ALLOCATION_SITE_INFO) {
+ if (allocation_site_mode == TRACK_ALLOCATION_SITE) {
__ lea(edx, Operand(eax, JSArray::kSize + AllocationSiteInfo::kSize));
} else {
__ lea(edx, Operand(eax, JSArray::kSize));
@@ -425,30 +425,21 @@ void FastCloneShallowArrayStub::Generate(MacroAssembler* masm) {
FastCloneShallowArrayStub::Mode mode = mode_;
// ecx is boilerplate object.
- AllocationSiteInfoMode allocation_site_info_mode =
- DONT_TRACK_ALLOCATION_SITE_INFO;
- if (mode == CLONE_ANY_ELEMENTS_WITH_ALLOCATION_SITE_INFO) {
- mode = CLONE_ANY_ELEMENTS;
- allocation_site_info_mode = TRACK_ALLOCATION_SITE_INFO;
- }
-
if (mode == CLONE_ANY_ELEMENTS) {
Label double_elements, check_fast_elements;
__ mov(ebx, FieldOperand(ecx, JSArray::kElementsOffset));
__ CheckMap(ebx, factory->fixed_cow_array_map(),
&check_fast_elements, DONT_DO_SMI_CHECK);
- GenerateFastCloneShallowArrayCommon(masm, 0,
- COPY_ON_WRITE_ELEMENTS,
- allocation_site_info_mode,
+ GenerateFastCloneShallowArrayCommon(masm, 0, COPY_ON_WRITE_ELEMENTS,
+ allocation_site_mode_,
&slow_case);
__ ret(3 * kPointerSize);
__ bind(&check_fast_elements);
__ CheckMap(ebx, factory->fixed_array_map(),
&double_elements, DONT_DO_SMI_CHECK);
- GenerateFastCloneShallowArrayCommon(masm, length_,
- CLONE_ELEMENTS,
- allocation_site_info_mode,
+ GenerateFastCloneShallowArrayCommon(masm, length_, CLONE_ELEMENTS,
+ allocation_site_mode_,
&slow_case);
__ ret(3 * kPointerSize);
@@ -479,7 +470,9 @@ void FastCloneShallowArrayStub::Generate(MacroAssembler* masm) {
}
GenerateFastCloneShallowArrayCommon(masm, length_, mode,
- allocation_site_info_mode, &slow_case);
+ allocation_site_mode_,
+ &slow_case);
+
// Return and remove the on-stack parameters.
__ ret(3 * kPointerSize);
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698