From: balazs.kilvady@imgtec.com Date: Tue, 9 Sep 2014 14:11:18 +0000 (+0000) Subject: MIPS: Do not use CodeStub::FindInCache if not necessary. X-Git-Tag: upstream/4.7.83~7035 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=48a91826e4648cae0674a50d56511bff6af30436;p=platform%2Fupstream%2Fv8.git MIPS: Do not use CodeStub::FindInCache if not necessary. Port r23795 (b41f4a7) Original commit message: GetCode does the FindInCache check as well. BUG= R=akos.palfi@imgtec.com, dusan.milosavljevic@imgtec.com Review URL: https://codereview.chromium.org/549403004 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23807 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc index 4c50e7c..899f278 100644 --- a/src/mips/code-stubs-mips.cc +++ b/src/mips/code-stubs-mips.cc @@ -1081,20 +1081,10 @@ void RestoreRegistersStateStub::GenerateAheadOfTime(Isolate* isolate) { void CodeStub::GenerateFPStubs(Isolate* isolate) { + // Generate if not already in cache. SaveFPRegsMode mode = kSaveFPRegs; - CEntryStub save_doubles(isolate, 1, mode); - StoreBufferOverflowStub stub(isolate, mode); - // These stubs might already be in the snapshot, detect that and don't - // regenerate, which would lead to code stub initialization state being messed - // up. - Code* save_doubles_code; - if (!save_doubles.FindCodeInCache(&save_doubles_code)) { - save_doubles_code = *save_doubles.GetCode(); - } - Code* store_buffer_overflow_code; - if (!stub.FindCodeInCache(&store_buffer_overflow_code)) { - store_buffer_overflow_code = *stub.GetCode(); - } + CEntryStub(isolate, 1, mode).GetCode(); + StoreBufferOverflowStub(isolate, mode).GetCode(); isolate->set_fp_stubs_generated(true); } diff --git a/src/mips64/code-stubs-mips64.cc b/src/mips64/code-stubs-mips64.cc index a98c8bd..bb81a4f 100644 --- a/src/mips64/code-stubs-mips64.cc +++ b/src/mips64/code-stubs-mips64.cc @@ -1076,20 +1076,10 @@ void RestoreRegistersStateStub::GenerateAheadOfTime(Isolate* isolate) { void CodeStub::GenerateFPStubs(Isolate* isolate) { + // Generate if not already in cache. SaveFPRegsMode mode = kSaveFPRegs; - CEntryStub save_doubles(isolate, 1, mode); - StoreBufferOverflowStub stub(isolate, mode); - // These stubs might already be in the snapshot, detect that and don't - // regenerate, which would lead to code stub initialization state being messed - // up. - Code* save_doubles_code; - if (!save_doubles.FindCodeInCache(&save_doubles_code)) { - save_doubles_code = *save_doubles.GetCode(); - } - Code* store_buffer_overflow_code; - if (!stub.FindCodeInCache(&store_buffer_overflow_code)) { - store_buffer_overflow_code = *stub.GetCode(); - } + CEntryStub(isolate, 1, mode).GetCode(); + StoreBufferOverflowStub(isolate, mode).GetCode(); isolate->set_fp_stubs_generated(true); }