From 308e665982a7910309917552e9a3b9614b9947b4 Mon Sep 17 00:00:00 2001 From: "svenpanne@chromium.org" Date: Fri, 15 Mar 2013 11:52:58 +0000 Subject: [PATCH] Pass Isolate through CompilingCallsToThisStubIsGCSafe calls BUG=v8:2487 Review URL: https://codereview.chromium.org/12732010 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13950 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/arm/macro-assembler-arm.cc | 5 +++-- src/code-stubs.h | 4 ++-- src/ia32/macro-assembler-ia32.cc | 5 +++-- src/mips/macro-assembler-mips.cc | 5 +++-- src/x64/macro-assembler-x64.cc | 5 +++-- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc index c60e6bb..e0e77cf 100644 --- a/src/arm/macro-assembler-arm.cc +++ b/src/arm/macro-assembler-arm.cc @@ -2225,7 +2225,8 @@ void MacroAssembler::CallStub(CodeStub* stub, void MacroAssembler::TailCallStub(CodeStub* stub, Condition cond) { - ASSERT(allow_stub_calls_ || stub->CompilingCallsToThisStubIsGCSafe()); + ASSERT(allow_stub_calls_ || + stub->CompilingCallsToThisStubIsGCSafe(isolate())); Jump(stub->GetCode(isolate()), RelocInfo::CODE_TARGET, cond); } @@ -2335,7 +2336,7 @@ void MacroAssembler::CallApiFunctionAndReturn(ExternalReference function, bool MacroAssembler::AllowThisStubCall(CodeStub* stub) { if (!has_frame_ && stub->SometimesSetsUpAFrame()) return false; - return allow_stub_calls_ || stub->CompilingCallsToThisStubIsGCSafe(); + return allow_stub_calls_ || stub->CompilingCallsToThisStubIsGCSafe(isolate()); } diff --git a/src/code-stubs.h b/src/code-stubs.h index 151a51c..e91b241 100644 --- a/src/code-stubs.h +++ b/src/code-stubs.h @@ -149,10 +149,10 @@ class CodeStub BASE_EMBEDDED { virtual ~CodeStub() {} - bool CompilingCallsToThisStubIsGCSafe() { + bool CompilingCallsToThisStubIsGCSafe(Isolate* isolate) { bool is_pregenerated = IsPregenerated(); Code* code = NULL; - CHECK(!is_pregenerated || FindCodeInCache(&code, Isolate::Current())); + CHECK(!is_pregenerated || FindCodeInCache(&code, isolate)); return is_pregenerated; } diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc index 4aaaf98..f832f6f 100644 --- a/src/ia32/macro-assembler-ia32.cc +++ b/src/ia32/macro-assembler-ia32.cc @@ -1810,7 +1810,8 @@ void MacroAssembler::CallStub(CodeStub* stub, TypeFeedbackId ast_id) { void MacroAssembler::TailCallStub(CodeStub* stub) { - ASSERT(allow_stub_calls_ || stub->CompilingCallsToThisStubIsGCSafe()); + ASSERT(allow_stub_calls_ || + stub->CompilingCallsToThisStubIsGCSafe(isolate())); jmp(stub->GetCode(isolate()), RelocInfo::CODE_TARGET); } @@ -1823,7 +1824,7 @@ void MacroAssembler::StubReturn(int argc) { bool MacroAssembler::AllowThisStubCall(CodeStub* stub) { if (!has_frame_ && stub->SometimesSetsUpAFrame()) return false; - return allow_stub_calls_ || stub->CompilingCallsToThisStubIsGCSafe(); + return allow_stub_calls_ || stub->CompilingCallsToThisStubIsGCSafe(isolate()); } diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc index ae14f67..af436b6 100644 --- a/src/mips/macro-assembler-mips.cc +++ b/src/mips/macro-assembler-mips.cc @@ -3960,7 +3960,8 @@ void MacroAssembler::CallStub(CodeStub* stub, void MacroAssembler::TailCallStub(CodeStub* stub) { - ASSERT(allow_stub_calls_ || stub->CompilingCallsToThisStubIsGCSafe()); + ASSERT(allow_stub_calls_ || + stub->CompilingCallsToThisStubIsGCSafe(isolate())); Jump(stub->GetCode(isolate()), RelocInfo::CODE_TARGET); } @@ -4078,7 +4079,7 @@ void MacroAssembler::CallApiFunctionAndReturn(ExternalReference function, bool MacroAssembler::AllowThisStubCall(CodeStub* stub) { if (!has_frame_ && stub->SometimesSetsUpAFrame()) return false; - return allow_stub_calls_ || stub->CompilingCallsToThisStubIsGCSafe(); + return allow_stub_calls_ || stub->CompilingCallsToThisStubIsGCSafe(isolate()); } diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc index 9f1e13b..42c2024 100644 --- a/src/x64/macro-assembler-x64.cc +++ b/src/x64/macro-assembler-x64.cc @@ -551,7 +551,8 @@ void MacroAssembler::CallStub(CodeStub* stub, TypeFeedbackId ast_id) { void MacroAssembler::TailCallStub(CodeStub* stub) { - ASSERT(allow_stub_calls_ || stub->CompilingCallsToThisStubIsGCSafe()); + ASSERT(allow_stub_calls_ || + stub->CompilingCallsToThisStubIsGCSafe(isolate())); Jump(stub->GetCode(isolate()), RelocInfo::CODE_TARGET); } @@ -564,7 +565,7 @@ void MacroAssembler::StubReturn(int argc) { bool MacroAssembler::AllowThisStubCall(CodeStub* stub) { if (!has_frame_ && stub->SometimesSetsUpAFrame()) return false; - return allow_stub_calls_ || stub->CompilingCallsToThisStubIsGCSafe(); + return allow_stub_calls_ || stub->CompilingCallsToThisStubIsGCSafe(isolate()); } -- 2.7.4