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

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

Issue 5988008: Implement Lithium ARM support for ArrayLiteral. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 2155 matching lines...) Expand 10 before | Expand all | Expand 10 after
2166 } 2166 }
2167 2167
2168 // Check the holder map. 2168 // Check the holder map.
2169 __ ldr(temp2, FieldMemOperand(temp1, HeapObject::kMapOffset)); 2169 __ ldr(temp2, FieldMemOperand(temp1, HeapObject::kMapOffset));
2170 __ cmp(temp2, Operand(Handle<Map>(current_prototype->map()))); 2170 __ cmp(temp2, Operand(Handle<Map>(current_prototype->map())));
2171 DeoptimizeIf(ne, instr->environment()); 2171 DeoptimizeIf(ne, instr->environment());
2172 } 2172 }
2173 2173
2174 2174
2175 void LCodeGen::DoArrayLiteral(LArrayLiteral* instr) { 2175 void LCodeGen::DoArrayLiteral(LArrayLiteral* instr) {
2176 Abort("DoArrayLiteral unimplemented."); 2176 __ ldr(r3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
2177 __ ldr(r3, FieldMemOperand(r3, JSFunction::kLiteralsOffset));
2178 __ mov(r2, Operand(Smi::FromInt(instr->hydrogen()->literal_index())));
2179 __ mov(r1, Operand(instr->hydrogen()->constant_elements()));
2180 __ Push(r3, r2, r1);
2181
2182 // Pick the right runtime function or stub to call.
2183 int length = instr->hydrogen()->length();
2184 if (instr->hydrogen()->IsCopyOnWrite()) {
2185 ASSERT(instr->hydrogen()->depth() == 1);
2186 FastCloneShallowArrayStub::Mode mode =
2187 FastCloneShallowArrayStub::COPY_ON_WRITE_ELEMENTS;
2188 FastCloneShallowArrayStub stub(mode, length);
2189 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
2190 } else if (instr->hydrogen()->depth() > 1) {
2191 CallRuntime(Runtime::kCreateArrayLiteral, 3, instr);
2192 } else if (length > FastCloneShallowArrayStub::kMaximumClonedLength) {
2193 CallRuntime(Runtime::kCreateArrayLiteralShallow, 3, instr);
2194 } else {
2195 FastCloneShallowArrayStub::Mode mode =
2196 FastCloneShallowArrayStub::CLONE_ELEMENTS;
2197 FastCloneShallowArrayStub stub(mode, length);
2198 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
2199 }
2177 } 2200 }
2178 2201
2179 2202
2180 void LCodeGen::DoObjectLiteral(LObjectLiteral* instr) { 2203 void LCodeGen::DoObjectLiteral(LObjectLiteral* instr) {
2181 Abort("DoObjectLiteral unimplemented."); 2204 Abort("DoObjectLiteral unimplemented.");
2182 } 2205 }
2183 2206
2184 2207
2185 void LCodeGen::DoRegExpLiteral(LRegExpLiteral* instr) { 2208 void LCodeGen::DoRegExpLiteral(LRegExpLiteral* instr) {
2186 Abort("DoRegExpLiteral unimplemented."); 2209 Abort("DoRegExpLiteral unimplemented.");
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
2329 2352
2330 2353
2331 void LCodeGen::DoOsrEntry(LOsrEntry* instr) { 2354 void LCodeGen::DoOsrEntry(LOsrEntry* instr) {
2332 Abort("DoOsrEntry unimplemented."); 2355 Abort("DoOsrEntry unimplemented.");
2333 } 2356 }
2334 2357
2335 2358
2336 #undef __ 2359 #undef __
2337 2360
2338 } } // namespace v8::internal 2361 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698