Commit 821ddecc authored by yangguo@chromium.org's avatar yangguo@chromium.org

MIPS: Optimize functions on a second thread.

Port r12148 (a553c67d)

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10802079
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12182 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 0cd21b43
......@@ -713,6 +713,43 @@ void Builtins::Generate_StringConstructCode(MacroAssembler* masm) {
}
static void GenerateTailCallToSharedCode(MacroAssembler* masm) {
__ lw(a2, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset));
__ lw(a2, FieldMemOperand(a2, SharedFunctionInfo::kCodeOffset));
__ Addu(at, a2, Operand(Code::kHeaderSize - kHeapObjectTag));
__ Jump(at);
}
void Builtins::Generate_InRecompileQueue(MacroAssembler* masm) {
GenerateTailCallToSharedCode(masm);
}
void Builtins::Generate_ParallelRecompile(MacroAssembler* masm) {
{
FrameScope scope(masm, StackFrame::INTERNAL);
// Push a copy of the function onto the stack.
__ push(a1);
// Push call kind information.
__ push(t1);
__ push(a1); // Function is also the parameter to the runtime call.
__ CallRuntime(Runtime::kParallelRecompile, 1);
// Restore call kind information.
__ pop(t1);
// Restore receiver.
__ pop(a1);
// Tear down internal frame.
}
GenerateTailCallToSharedCode(masm);
}
static void Generate_JSConstructStubHelper(MacroAssembler* masm,
bool is_api_function,
bool count_constructions) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment