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

Side by Side Diff: src/arm/builtins-arm.cc

Issue 10807024: Optimize functions on a second thread. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 5 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
« no previous file with comments | « src/SConscript ('k') | src/ast.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 __ IncrementCounter(counters->string_ctor_gc_required(), 1, r3, r4); 690 __ IncrementCounter(counters->string_ctor_gc_required(), 1, r3, r4);
691 { 691 {
692 FrameScope scope(masm, StackFrame::INTERNAL); 692 FrameScope scope(masm, StackFrame::INTERNAL);
693 __ push(argument); 693 __ push(argument);
694 __ CallRuntime(Runtime::kNewStringWrapper, 1); 694 __ CallRuntime(Runtime::kNewStringWrapper, 1);
695 } 695 }
696 __ Ret(); 696 __ Ret();
697 } 697 }
698 698
699 699
700 static void GenerateTailCallToSharedCode(MacroAssembler* masm) {
701 __ ldr(r2, FieldMemOperand(r1, JSFunction::kSharedFunctionInfoOffset));
702 __ ldr(r2, FieldMemOperand(r2, SharedFunctionInfo::kCodeOffset));
703 __ add(r2, r2, Operand(Code::kHeaderSize - kHeapObjectTag));
704 __ mov(pc, r2);
705 }
706
707
708 void Builtins::Generate_InRecompileQueue(MacroAssembler* masm) {
709 GenerateTailCallToSharedCode(masm);
710 }
711
712
713 void Builtins::Generate_ParallelRecompile(MacroAssembler* masm) {
714 {
715 FrameScope scope(masm, StackFrame::INTERNAL);
716
717 // Push a copy of the function onto the stack.
718 __ push(r1);
719 // Push call kind information.
720 __ push(r5);
721
722 __ push(r1); // Function is also the parameter to the runtime call.
723 __ CallRuntime(Runtime::kParallelRecompile, 1);
724
725 // Restore call kind information.
726 __ pop(r5);
727 // Restore receiver.
728 __ pop(r1);
729
730 // Tear down internal frame.
731 }
732
733 GenerateTailCallToSharedCode(masm);
734 }
735
736
700 static void Generate_JSConstructStubHelper(MacroAssembler* masm, 737 static void Generate_JSConstructStubHelper(MacroAssembler* masm,
701 bool is_api_function, 738 bool is_api_function,
702 bool count_constructions) { 739 bool count_constructions) {
703 // ----------- S t a t e ------------- 740 // ----------- S t a t e -------------
704 // -- r0 : number of arguments 741 // -- r0 : number of arguments
705 // -- r1 : constructor function 742 // -- r1 : constructor function
706 // -- lr : return address 743 // -- lr : return address
707 // -- sp[...]: constructor arguments 744 // -- sp[...]: constructor arguments
708 // ----------------------------------- 745 // -----------------------------------
709 746
(...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after
1760 __ bind(&dont_adapt_arguments); 1797 __ bind(&dont_adapt_arguments);
1761 __ Jump(r3); 1798 __ Jump(r3);
1762 } 1799 }
1763 1800
1764 1801
1765 #undef __ 1802 #undef __
1766 1803
1767 } } // namespace v8::internal 1804 } } // namespace v8::internal
1768 1805
1769 #endif // V8_TARGET_ARCH_ARM 1806 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/SConscript ('k') | src/ast.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698