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

Side by Side Diff: src/mips/code-stubs-mips.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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 // Remove the on-stack argument and return. 322 // Remove the on-stack argument and return.
323 __ mov(cp, v0); 323 __ mov(cp, v0);
324 __ DropAndRet(2); 324 __ DropAndRet(2);
325 325
326 // Need to collect. Call into runtime system. 326 // Need to collect. Call into runtime system.
327 __ bind(&gc); 327 __ bind(&gc);
328 __ TailCallRuntime(Runtime::kPushBlockContext, 2, 1); 328 __ TailCallRuntime(Runtime::kPushBlockContext, 2, 1);
329 } 329 }
330 330
331 331
332 int FastCloneShallowArrayStub::MaximumClonedLength() {
333 return 8;
334 }
335
336
332 static void GenerateFastCloneShallowArrayCommon( 337 static void GenerateFastCloneShallowArrayCommon(
333 MacroAssembler* masm, 338 MacroAssembler* masm,
334 int length, 339 int length,
335 FastCloneShallowArrayStub::Mode mode, 340 FastCloneShallowArrayStub::Mode mode,
336 Label* fail) { 341 Label* fail) {
337 // Registers on entry: 342 // Registers on entry:
338 // a3: boilerplate literal array. 343 // a3: boilerplate literal array.
339 ASSERT(mode != FastCloneShallowArrayStub::CLONE_ANY_ELEMENTS); 344 ASSERT(mode != FastCloneShallowArrayStub::CLONE_ANY_ELEMENTS);
340 345
341 // All sizes here are multiples of kPointerSize. 346 // All sizes here are multiples of kPointerSize.
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 GenerateFastCloneShallowArrayCommon(masm, length_, mode, &slow_case); 451 GenerateFastCloneShallowArrayCommon(masm, length_, mode, &slow_case);
447 452
448 // Return and remove the on-stack parameters. 453 // Return and remove the on-stack parameters.
449 __ DropAndRet(3); 454 __ DropAndRet(3);
450 455
451 __ bind(&slow_case); 456 __ bind(&slow_case);
452 __ TailCallRuntime(Runtime::kCreateArrayLiteralShallow, 3, 1); 457 __ TailCallRuntime(Runtime::kCreateArrayLiteralShallow, 3, 1);
453 } 458 }
454 459
455 460
461 int FastCloneShallowObjectStub::MaximumClonedProperties() {
462 return 6;
463 }
464
465
456 void FastCloneShallowObjectStub::Generate(MacroAssembler* masm) { 466 void FastCloneShallowObjectStub::Generate(MacroAssembler* masm) {
457 // Stack layout on entry: 467 // Stack layout on entry:
458 // 468 //
459 // [sp]: object literal flags. 469 // [sp]: object literal flags.
460 // [sp + kPointerSize]: constant properties. 470 // [sp + kPointerSize]: constant properties.
461 // [sp + (2 * kPointerSize)]: literal index. 471 // [sp + (2 * kPointerSize)]: literal index.
462 // [sp + (3 * kPointerSize)]: literals array. 472 // [sp + (3 * kPointerSize)]: literals array.
463 473
464 // Load boilerplate object into a3 and check if we need to create a 474 // Load boilerplate object into a3 and check if we need to create a
465 // boilerplate. 475 // boilerplate.
(...skipping 7360 matching lines...) Expand 10 before | Expand all | Expand 10 after
7826 __ Pop(ra, t1, a1); 7836 __ Pop(ra, t1, a1);
7827 __ Ret(); 7837 __ Ret();
7828 } 7838 }
7829 7839
7830 7840
7831 #undef __ 7841 #undef __
7832 7842
7833 } } // namespace v8::internal 7843 } } // namespace v8::internal
7834 7844
7835 #endif // V8_TARGET_ARCH_MIPS 7845 #endif // V8_TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698