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

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

Issue 16206007: Turn off allocation site info for crankshafted array constructor calls. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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
OLDNEW
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 4221 matching lines...) Expand 10 before | Expand all | Expand 10 after
4232 4232
4233 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { 4233 void LCodeGen::DoCallNewArray(LCallNewArray* instr) {
4234 ASSERT(ToRegister(instr->context()).is(esi)); 4234 ASSERT(ToRegister(instr->context()).is(esi));
4235 ASSERT(ToRegister(instr->constructor()).is(edi)); 4235 ASSERT(ToRegister(instr->constructor()).is(edi));
4236 ASSERT(ToRegister(instr->result()).is(eax)); 4236 ASSERT(ToRegister(instr->result()).is(eax));
4237 ASSERT(FLAG_optimize_constructed_arrays); 4237 ASSERT(FLAG_optimize_constructed_arrays);
4238 4238
4239 __ Set(eax, Immediate(instr->arity())); 4239 __ Set(eax, Immediate(instr->arity()));
4240 __ mov(ebx, instr->hydrogen()->property_cell()); 4240 __ mov(ebx, instr->hydrogen()->property_cell());
4241 ElementsKind kind = instr->hydrogen()->elements_kind(); 4241 ElementsKind kind = instr->hydrogen()->elements_kind();
4242 bool disable_allocation_sites =
4243 (AllocationSiteInfo::GetMode(kind) == TRACK_ALLOCATION_SITE);
4244
4242 if (instr->arity() == 0) { 4245 if (instr->arity() == 0) {
4243 ArrayNoArgumentConstructorStub stub(kind); 4246 ArrayNoArgumentConstructorStub stub(kind, disable_allocation_sites);
4244 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); 4247 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr);
4245 } else if (instr->arity() == 1) { 4248 } else if (instr->arity() == 1) {
4246 ArraySingleArgumentConstructorStub stub(kind); 4249 ArraySingleArgumentConstructorStub stub(kind, disable_allocation_sites);
4247 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); 4250 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr);
4248 } else { 4251 } else {
4249 ArrayNArgumentsConstructorStub stub(kind); 4252 ArrayNArgumentsConstructorStub stub(kind, disable_allocation_sites);
4250 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); 4253 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr);
4251 } 4254 }
4252 } 4255 }
4253 4256
4254 4257
4255 void LCodeGen::DoCallRuntime(LCallRuntime* instr) { 4258 void LCodeGen::DoCallRuntime(LCallRuntime* instr) {
4256 CallRuntime(instr->function(), instr->arity(), instr); 4259 CallRuntime(instr->function(), instr->arity(), instr);
4257 } 4260 }
4258 4261
4259 4262
(...skipping 2341 matching lines...) Expand 10 before | Expand all | Expand 10 after
6601 FixedArray::kHeaderSize - kPointerSize)); 6604 FixedArray::kHeaderSize - kPointerSize));
6602 __ bind(&done); 6605 __ bind(&done);
6603 } 6606 }
6604 6607
6605 6608
6606 #undef __ 6609 #undef __
6607 6610
6608 } } // namespace v8::internal 6611 } } // namespace v8::internal
6609 6612
6610 #endif // V8_TARGET_ARCH_IA32 6613 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« src/code-stubs.h ('K') | « src/ia32/code-stubs-ia32.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698