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

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

Issue 10802079: MIPS: 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 | « no previous file | no next file » | 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 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 __ IncrementCounter(counters->string_ctor_gc_required(), 1, a3, t0); 706 __ IncrementCounter(counters->string_ctor_gc_required(), 1, a3, t0);
707 { 707 {
708 FrameScope scope(masm, StackFrame::INTERNAL); 708 FrameScope scope(masm, StackFrame::INTERNAL);
709 __ push(argument); 709 __ push(argument);
710 __ CallRuntime(Runtime::kNewStringWrapper, 1); 710 __ CallRuntime(Runtime::kNewStringWrapper, 1);
711 } 711 }
712 __ Ret(); 712 __ Ret();
713 } 713 }
714 714
715 715
716 static void GenerateTailCallToSharedCode(MacroAssembler* masm) {
717 __ lw(a2, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset));
718 __ lw(a2, FieldMemOperand(a2, SharedFunctionInfo::kCodeOffset));
719 __ Addu(at, a2, Operand(Code::kHeaderSize - kHeapObjectTag));
720 __ Jump(at);
721 }
722
723
724 void Builtins::Generate_InRecompileQueue(MacroAssembler* masm) {
725 GenerateTailCallToSharedCode(masm);
726 }
727
728
729 void Builtins::Generate_ParallelRecompile(MacroAssembler* masm) {
730 {
731 FrameScope scope(masm, StackFrame::INTERNAL);
732
733 // Push a copy of the function onto the stack.
734 __ push(a1);
735 // Push call kind information.
736 __ push(t1);
737
738 __ push(a1); // Function is also the parameter to the runtime call.
739 __ CallRuntime(Runtime::kParallelRecompile, 1);
740
741 // Restore call kind information.
742 __ pop(t1);
743 // Restore receiver.
744 __ pop(a1);
745
746 // Tear down internal frame.
747 }
748
749 GenerateTailCallToSharedCode(masm);
750 }
751
752
716 static void Generate_JSConstructStubHelper(MacroAssembler* masm, 753 static void Generate_JSConstructStubHelper(MacroAssembler* masm,
717 bool is_api_function, 754 bool is_api_function,
718 bool count_constructions) { 755 bool count_constructions) {
719 // ----------- S t a t e ------------- 756 // ----------- S t a t e -------------
720 // -- a0 : number of arguments 757 // -- a0 : number of arguments
721 // -- a1 : constructor function 758 // -- a1 : constructor function
722 // -- ra : return address 759 // -- ra : return address
723 // -- sp[...]: constructor arguments 760 // -- sp[...]: constructor arguments
724 // ----------------------------------- 761 // -----------------------------------
725 762
(...skipping 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after
1797 __ bind(&dont_adapt_arguments); 1834 __ bind(&dont_adapt_arguments);
1798 __ Jump(a3); 1835 __ Jump(a3);
1799 } 1836 }
1800 1837
1801 1838
1802 #undef __ 1839 #undef __
1803 1840
1804 } } // namespace v8::internal 1841 } } // namespace v8::internal
1805 1842
1806 #endif // V8_TARGET_ARCH_MIPS 1843 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698