| 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 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 } | 533 } |
| 534 | 534 |
| 535 GenerateFastCloneShallowArrayCommon(masm, length_, mode, | 535 GenerateFastCloneShallowArrayCommon(masm, length_, mode, |
| 536 allocation_site_mode_, | 536 allocation_site_mode_, |
| 537 &slow_case); | 537 &slow_case); |
| 538 | 538 |
| 539 // Return and remove the on-stack parameters. | 539 // Return and remove the on-stack parameters. |
| 540 __ ret(3 * kPointerSize); | 540 __ ret(3 * kPointerSize); |
| 541 | 541 |
| 542 __ bind(&slow_case); | 542 __ bind(&slow_case); |
| 543 __ TailCallRuntime(Runtime::kCreateArrayLiteralShallow, 3, 1); | 543 |
| 544 // Add a flags argument, carefully preserving the return address on the stack. |
| 545 int flags = allocation_site_mode_ == TRACK_ALLOCATION_SITE |
| 546 ? ArrayLiteral::kCreateAllocationSiteInfos |
| 547 : ArrayLiteral::kNoFlags; |
| 548 __ pop(ecx); |
| 549 __ push(Immediate(Smi::FromInt(flags))); |
| 550 __ push(ecx); |
| 551 __ TailCallRuntime(Runtime::kCreateArrayLiteralShallow, 4, 1); |
| 544 } | 552 } |
| 545 | 553 |
| 546 | 554 |
| 547 // The stub expects its argument on the stack and returns its result in tos_: | 555 // The stub expects its argument on the stack and returns its result in tos_: |
| 548 // zero for false, and a non-zero value for true. | 556 // zero for false, and a non-zero value for true. |
| 549 void ToBooleanStub::Generate(MacroAssembler* masm) { | 557 void ToBooleanStub::Generate(MacroAssembler* masm) { |
| 550 // This stub overrides SometimesSetsUpAFrame() to return false. That means | 558 // This stub overrides SometimesSetsUpAFrame() to return false. That means |
| 551 // we cannot call anything that could cause a GC from this stub. | 559 // we cannot call anything that could cause a GC from this stub. |
| 552 Label patch; | 560 Label patch; |
| 553 Factory* factory = masm->isolate()->factory(); | 561 Factory* factory = masm->isolate()->factory(); |
| (...skipping 7306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7860 // Restore ecx. | 7868 // Restore ecx. |
| 7861 __ pop(ecx); | 7869 __ pop(ecx); |
| 7862 __ ret(0); | 7870 __ ret(0); |
| 7863 } | 7871 } |
| 7864 | 7872 |
| 7865 #undef __ | 7873 #undef __ |
| 7866 | 7874 |
| 7867 } } // namespace v8::internal | 7875 } } // namespace v8::internal |
| 7868 | 7876 |
| 7869 #endif // V8_TARGET_ARCH_IA32 | 7877 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |