Chromium Code Reviews| 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 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 474 __ Assert(equal, message); | 474 __ Assert(equal, message); |
| 475 __ pop(rcx); | 475 __ pop(rcx); |
| 476 } | 476 } |
| 477 | 477 |
| 478 GenerateFastCloneShallowArrayCommon(masm, length_, mode, | 478 GenerateFastCloneShallowArrayCommon(masm, length_, mode, |
| 479 allocation_site_mode_, | 479 allocation_site_mode_, |
| 480 &slow_case); | 480 &slow_case); |
| 481 __ ret(3 * kPointerSize); | 481 __ ret(3 * kPointerSize); |
| 482 | 482 |
| 483 __ bind(&slow_case); | 483 __ bind(&slow_case); |
| 484 __ TailCallRuntime(Runtime::kCreateArrayLiteralShallow, 3, 1); | 484 |
| 485 // Add a flags argument, carefully preserving the return address on the stack. | |
| 486 int flags = allocation_site_mode_ == TRACK_ALLOCATION_SITE | |
|
danno
2013/02/11 15:05:21
Check FLAG_track_allocation_sites here, never sett
mvstanton
2013/02/15 07:36:43
With some other changes already present, I think I
| |
| 487 ? ArrayLiteral::kAllocationSiteInfoAllowed | |
| 488 : ArrayLiteral::kNoFlags; | |
| 489 __ pop(rcx); | |
| 490 __ Push(Smi::FromInt(flags)); | |
| 491 __ push(rcx); | |
| 492 __ TailCallRuntime(Runtime::kCreateArrayLiteralShallow, 4, 1); | |
| 485 } | 493 } |
| 486 | 494 |
| 487 | 495 |
| 488 void FastCloneShallowObjectStub::Generate(MacroAssembler* masm) { | 496 void FastCloneShallowObjectStub::Generate(MacroAssembler* masm) { |
| 489 // Stack layout on entry: | 497 // Stack layout on entry: |
| 490 // | 498 // |
| 491 // [rsp + kPointerSize]: object literal flags. | 499 // [rsp + kPointerSize]: object literal flags. |
| 492 // [rsp + (2 * kPointerSize)]: constant properties. | 500 // [rsp + (2 * kPointerSize)]: constant properties. |
| 493 // [rsp + (3 * kPointerSize)]: literal index. | 501 // [rsp + (3 * kPointerSize)]: literal index. |
| 494 // [rsp + (4 * kPointerSize)]: literals array. | 502 // [rsp + (4 * kPointerSize)]: literals array. |
| (...skipping 6217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6712 #endif | 6720 #endif |
| 6713 | 6721 |
| 6714 __ Ret(); | 6722 __ Ret(); |
| 6715 } | 6723 } |
| 6716 | 6724 |
| 6717 #undef __ | 6725 #undef __ |
| 6718 | 6726 |
| 6719 } } // namespace v8::internal | 6727 } } // namespace v8::internal |
| 6720 | 6728 |
| 6721 #endif // V8_TARGET_ARCH_X64 | 6729 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |