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
parent 44c059f1
......@@ -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());
}
......
......@@ -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;
}
......
......@@ -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());
}
......
......@@ -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());
}
......
......@@ -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());
}
......
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