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 789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
800 static void GenerateMakeCodeYoungAgainCommon(MacroAssembler* masm) { | 800 static void GenerateMakeCodeYoungAgainCommon(MacroAssembler* masm) { |
801 // For now, we are relying on the fact that make_code_young doesn't do any | 801 // For now, we are relying on the fact that make_code_young doesn't do any |
802 // garbage collection which allows us to save/restore the registers without | 802 // garbage collection which allows us to save/restore the registers without |
803 // worrying about which of them contain pointers. We also don't build an | 803 // worrying about which of them contain pointers. We also don't build an |
804 // internal frame to make the code faster, since we shouldn't have to do stack | 804 // internal frame to make the code faster, since we shouldn't have to do stack |
805 // crawls in MakeCodeYoung. This seems a bit fragile. | 805 // crawls in MakeCodeYoung. This seems a bit fragile. |
806 | 806 |
807 // The following registers must be saved and restored when calling through to | 807 // The following registers must be saved and restored when calling through to |
808 // the runtime: | 808 // the runtime: |
809 // r0 - contains return address (beginning of patch sequence) | 809 // r0 - contains return address (beginning of patch sequence) |
810 // r1 - isolate | 810 // r1 - function object |
811 FrameScope scope(masm, StackFrame::MANUAL); | 811 FrameScope scope(masm, StackFrame::MANUAL); |
812 __ stm(db_w, sp, r0.bit() | r1.bit() | fp.bit() | lr.bit()); | 812 __ stm(db_w, sp, r0.bit() | r1.bit() | fp.bit() | lr.bit()); |
813 __ PrepareCallCFunction(1, 0, r2); | 813 __ PrepareCallCFunction(1, 0, r1); |
814 __ mov(r1, Operand(ExternalReference::isolate_address(masm->isolate()))); | |
815 __ CallCFunction( | 814 __ CallCFunction( |
816 ExternalReference::get_make_code_young_function(masm->isolate()), 2); | 815 ExternalReference::get_make_code_young_function(masm->isolate()), 1); |
817 __ ldm(ia_w, sp, r0.bit() | r1.bit() | fp.bit() | lr.bit()); | 816 __ ldm(ia_w, sp, r0.bit() | r1.bit() | fp.bit() | lr.bit()); |
818 __ mov(pc, r0); | 817 __ mov(pc, r0); |
819 } | 818 } |
820 | 819 |
821 #define DEFINE_CODE_AGE_BUILTIN_GENERATOR(C) \ | 820 #define DEFINE_CODE_AGE_BUILTIN_GENERATOR(C) \ |
822 void Builtins::Generate_Make##C##CodeYoungAgainEvenMarking( \ | 821 void Builtins::Generate_Make##C##CodeYoungAgainEvenMarking( \ |
823 MacroAssembler* masm) { \ | 822 MacroAssembler* masm) { \ |
824 GenerateMakeCodeYoungAgainCommon(masm); \ | 823 GenerateMakeCodeYoungAgainCommon(masm); \ |
825 } \ | 824 } \ |
826 void Builtins::Generate_Make##C##CodeYoungAgainOddMarking( \ | 825 void Builtins::Generate_Make##C##CodeYoungAgainOddMarking( \ |
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1438 __ bind(&dont_adapt_arguments); | 1437 __ bind(&dont_adapt_arguments); |
1439 __ Jump(r3); | 1438 __ Jump(r3); |
1440 } | 1439 } |
1441 | 1440 |
1442 | 1441 |
1443 #undef __ | 1442 #undef __ |
1444 | 1443 |
1445 } } // namespace v8::internal | 1444 } } // namespace v8::internal |
1446 | 1445 |
1447 #endif // V8_TARGET_ARCH_ARM | 1446 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |