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

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

Issue 11151005: Improve FastCloneShallowArray/ObjectStubs with VFP copying on ARM (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 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
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 5021 matching lines...) Expand 10 before | Expand all | Expand 10 after
5032 // Pick the right runtime function or stub to call. 5032 // Pick the right runtime function or stub to call.
5033 int length = instr->hydrogen()->length(); 5033 int length = instr->hydrogen()->length();
5034 if (instr->hydrogen()->IsCopyOnWrite()) { 5034 if (instr->hydrogen()->IsCopyOnWrite()) {
5035 ASSERT(instr->hydrogen()->depth() == 1); 5035 ASSERT(instr->hydrogen()->depth() == 1);
5036 FastCloneShallowArrayStub::Mode mode = 5036 FastCloneShallowArrayStub::Mode mode =
5037 FastCloneShallowArrayStub::COPY_ON_WRITE_ELEMENTS; 5037 FastCloneShallowArrayStub::COPY_ON_WRITE_ELEMENTS;
5038 FastCloneShallowArrayStub stub(mode, length); 5038 FastCloneShallowArrayStub stub(mode, length);
5039 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); 5039 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
5040 } else if (instr->hydrogen()->depth() > 1) { 5040 } else if (instr->hydrogen()->depth() > 1) {
5041 CallRuntime(Runtime::kCreateArrayLiteral, 3, instr); 5041 CallRuntime(Runtime::kCreateArrayLiteral, 3, instr);
5042 } else if (length > FastCloneShallowArrayStub::kMaximumClonedLength) { 5042 } else if (length > FastCloneShallowArrayStub::MaximumClonedLength()) {
5043 CallRuntime(Runtime::kCreateArrayLiteralShallow, 3, instr); 5043 CallRuntime(Runtime::kCreateArrayLiteralShallow, 3, instr);
5044 } else { 5044 } else {
5045 FastCloneShallowArrayStub::Mode mode = 5045 FastCloneShallowArrayStub::Mode mode =
5046 boilerplate_elements_kind == FAST_DOUBLE_ELEMENTS 5046 boilerplate_elements_kind == FAST_DOUBLE_ELEMENTS
5047 ? FastCloneShallowArrayStub::CLONE_DOUBLE_ELEMENTS 5047 ? FastCloneShallowArrayStub::CLONE_DOUBLE_ELEMENTS
5048 : FastCloneShallowArrayStub::CLONE_ELEMENTS; 5048 : FastCloneShallowArrayStub::CLONE_ELEMENTS;
5049 FastCloneShallowArrayStub stub(mode, length); 5049 FastCloneShallowArrayStub stub(mode, length);
5050 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); 5050 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
5051 } 5051 }
5052 } 5052 }
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
5208 ? ObjectLiteral::kFastElements 5208 ? ObjectLiteral::kFastElements
5209 : ObjectLiteral::kNoFlags; 5209 : ObjectLiteral::kNoFlags;
5210 __ mov(r1, Operand(Smi::FromInt(flags))); 5210 __ mov(r1, Operand(Smi::FromInt(flags)));
5211 __ Push(r4, r3, r2, r1); 5211 __ Push(r4, r3, r2, r1);
5212 5212
5213 // Pick the right runtime function or stub to call. 5213 // Pick the right runtime function or stub to call.
5214 int properties_count = constant_properties->length() / 2; 5214 int properties_count = constant_properties->length() / 2;
5215 if (instr->hydrogen()->depth() > 1) { 5215 if (instr->hydrogen()->depth() > 1) {
5216 CallRuntime(Runtime::kCreateObjectLiteral, 4, instr); 5216 CallRuntime(Runtime::kCreateObjectLiteral, 4, instr);
5217 } else if (flags != ObjectLiteral::kFastElements || 5217 } else if (flags != ObjectLiteral::kFastElements ||
5218 properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) { 5218 properties_count >
5219 FastCloneShallowObjectStub::MaximumClonedProperties()) {
5219 CallRuntime(Runtime::kCreateObjectLiteralShallow, 4, instr); 5220 CallRuntime(Runtime::kCreateObjectLiteralShallow, 4, instr);
5220 } else { 5221 } else {
5221 FastCloneShallowObjectStub stub(properties_count); 5222 FastCloneShallowObjectStub stub(properties_count);
5222 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); 5223 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
5223 } 5224 }
5224 } 5225 }
5225 5226
5226 5227
5227 void LCodeGen::DoToFastProperties(LToFastProperties* instr) { 5228 void LCodeGen::DoToFastProperties(LToFastProperties* instr) {
5228 ASSERT(ToRegister(instr->InputAt(0)).is(r0)); 5229 ASSERT(ToRegister(instr->InputAt(0)).is(r0));
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
5656 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); 5657 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize));
5657 __ ldr(result, FieldMemOperand(scratch, 5658 __ ldr(result, FieldMemOperand(scratch,
5658 FixedArray::kHeaderSize - kPointerSize)); 5659 FixedArray::kHeaderSize - kPointerSize));
5659 __ bind(&done); 5660 __ bind(&done);
5660 } 5661 }
5661 5662
5662 5663
5663 #undef __ 5664 #undef __
5664 5665
5665 } } // namespace v8::internal 5666 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698