| OLD | NEW |
| 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 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 } | 483 } |
| 484 | 484 |
| 485 GenerateFastCloneShallowArrayCommon(masm, length_, mode, | 485 GenerateFastCloneShallowArrayCommon(masm, length_, mode, |
| 486 allocation_site_mode_, | 486 allocation_site_mode_, |
| 487 &slow_case); | 487 &slow_case); |
| 488 | 488 |
| 489 // Return and remove the on-stack parameters. | 489 // Return and remove the on-stack parameters. |
| 490 __ ret(3 * kPointerSize); | 490 __ ret(3 * kPointerSize); |
| 491 | 491 |
| 492 __ bind(&slow_case); | 492 __ bind(&slow_case); |
| 493 __ TailCallRuntime(Runtime::kCreateArrayLiteralShallow, 3, 1); | 493 |
| 494 // Add a flags argument, carefully preserving the return address on the stack. |
| 495 int flags = allocation_site_mode_ == TRACK_ALLOCATION_SITE |
| 496 ? ArrayLiteral::kAllocationSiteInfoAllowed |
| 497 : ArrayLiteral::kNoFlags; |
| 498 __ pop(ecx); |
| 499 __ push(Immediate(Smi::FromInt(flags))); |
| 500 __ push(ecx); |
| 501 __ TailCallRuntime(Runtime::kCreateArrayLiteralShallow, 4, 1); |
| 494 } | 502 } |
| 495 | 503 |
| 496 | 504 |
| 497 void FastCloneShallowObjectStub::Generate(MacroAssembler* masm) { | 505 void FastCloneShallowObjectStub::Generate(MacroAssembler* masm) { |
| 498 // Stack layout on entry: | 506 // Stack layout on entry: |
| 499 // | 507 // |
| 500 // [esp + kPointerSize]: object literal flags. | 508 // [esp + kPointerSize]: object literal flags. |
| 501 // [esp + (2 * kPointerSize)]: constant properties. | 509 // [esp + (2 * kPointerSize)]: constant properties. |
| 502 // [esp + (3 * kPointerSize)]: literal index. | 510 // [esp + (3 * kPointerSize)]: literal index. |
| 503 // [esp + (4 * kPointerSize)]: literals array. | 511 // [esp + (4 * kPointerSize)]: literals array. |
| (...skipping 7183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7687 // Restore ecx. | 7695 // Restore ecx. |
| 7688 __ pop(ecx); | 7696 __ pop(ecx); |
| 7689 __ ret(0); | 7697 __ ret(0); |
| 7690 } | 7698 } |
| 7691 | 7699 |
| 7692 #undef __ | 7700 #undef __ |
| 7693 | 7701 |
| 7694 } } // namespace v8::internal | 7702 } } // namespace v8::internal |
| 7695 | 7703 |
| 7696 #endif // V8_TARGET_ARCH_IA32 | 7704 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |