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

Side by Side Diff: src/arm/lithium-codegen-arm.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 4212 matching lines...) Expand 10 before | Expand all | Expand 10 after
4223 4223
4224 4224
4225 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { 4225 void LCodeGen::DoCallNewArray(LCallNewArray* instr) {
4226 ASSERT(ToRegister(instr->constructor()).is(r1)); 4226 ASSERT(ToRegister(instr->constructor()).is(r1));
4227 ASSERT(ToRegister(instr->result()).is(r0)); 4227 ASSERT(ToRegister(instr->result()).is(r0));
4228 ASSERT(FLAG_optimize_constructed_arrays); 4228 ASSERT(FLAG_optimize_constructed_arrays);
4229 4229
4230 __ mov(r0, Operand(instr->arity())); 4230 __ mov(r0, Operand(instr->arity()));
4231 __ mov(r2, Operand(instr->hydrogen()->property_cell())); 4231 __ mov(r2, Operand(instr->hydrogen()->property_cell()));
4232 ElementsKind kind = instr->hydrogen()->elements_kind(); 4232 ElementsKind kind = instr->hydrogen()->elements_kind();
4233 bool disable_allocation_sites =
4234 (AllocationSiteInfo::GetMode(kind) == TRACK_ALLOCATION_SITE);
4235
4233 if (instr->arity() == 0) { 4236 if (instr->arity() == 0) {
4234 ArrayNoArgumentConstructorStub stub(kind); 4237 ArrayNoArgumentConstructorStub stub(kind, disable_allocation_sites);
4235 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); 4238 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr);
4236 } else if (instr->arity() == 1) { 4239 } else if (instr->arity() == 1) {
4237 ArraySingleArgumentConstructorStub stub(kind); 4240 ArraySingleArgumentConstructorStub stub(kind, disable_allocation_sites);
4238 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); 4241 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr);
4239 } else { 4242 } else {
4240 ArrayNArgumentsConstructorStub stub(kind); 4243 ArrayNArgumentsConstructorStub stub(kind, disable_allocation_sites);
4241 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); 4244 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr);
4242 } 4245 }
4243 } 4246 }
4244 4247
4245 4248
4246 void LCodeGen::DoCallRuntime(LCallRuntime* instr) { 4249 void LCodeGen::DoCallRuntime(LCallRuntime* instr) {
4247 CallRuntime(instr->function(), instr->arity(), instr); 4250 CallRuntime(instr->function(), instr->arity(), instr);
4248 } 4251 }
4249 4252
4250 4253
(...skipping 1749 matching lines...) Expand 10 before | Expand all | Expand 10 after
6000 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); 6003 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index));
6001 __ ldr(result, FieldMemOperand(scratch, 6004 __ ldr(result, FieldMemOperand(scratch,
6002 FixedArray::kHeaderSize - kPointerSize)); 6005 FixedArray::kHeaderSize - kPointerSize));
6003 __ bind(&done); 6006 __ bind(&done);
6004 } 6007 }
6005 6008
6006 6009
6007 #undef __ 6010 #undef __
6008 6011
6009 } } // namespace v8::internal 6012 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/code-stubs.h » ('j') | src/code-stubs.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698