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
This commit is contained in:
svenpanne@chromium.org 2013-03-15 11:52:58 +00:00
parent 44c059f1c1
commit 308e665982
5 changed files with 14 additions and 10 deletions

View File

@ -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());
}

View File

@ -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;
}

View File

@ -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());
}

View File

@ -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());
}

View File

@ -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());
}