Commit 38f2363d authored by sgjesse@chromium.org's avatar sgjesse@chromium.org

Consistently return failure if the stub cache cannot deliver a code object

Some functions of the stub cache returned undefined if a code stub could not be generated. However the clients of these functions only cehcks for failure. Now all these functions return a failire object if no code stub can be made available
Review URL: http://codereview.chromium.org/652039

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3923 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 91a2fb7a
......@@ -105,7 +105,7 @@ Object* StubCache::ComputeLoadField(String* name,
if (code->IsFailure()) return code;
LOG(CodeCreateEvent(Logger::LOAD_IC_TAG, Code::cast(code), name));
Object* result = receiver->map()->UpdateCodeCache(name, Code::cast(code));
if (result->IsFailure()) return code;
if (result->IsFailure()) return result;
}
return Set(name, receiver->map(), Code::cast(code));
}
......@@ -124,7 +124,7 @@ Object* StubCache::ComputeLoadCallback(String* name,
if (code->IsFailure()) return code;
LOG(CodeCreateEvent(Logger::LOAD_IC_TAG, Code::cast(code), name));
Object* result = receiver->map()->UpdateCodeCache(name, Code::cast(code));
if (result->IsFailure()) return code;
if (result->IsFailure()) return result;
}
return Set(name, receiver->map(), Code::cast(code));
}
......@@ -143,7 +143,7 @@ Object* StubCache::ComputeLoadConstant(String* name,
if (code->IsFailure()) return code;
LOG(CodeCreateEvent(Logger::LOAD_IC_TAG, Code::cast(code), name));
Object* result = receiver->map()->UpdateCodeCache(name, Code::cast(code));
if (result->IsFailure()) return code;
if (result->IsFailure()) return result;
}
return Set(name, receiver->map(), Code::cast(code));
}
......@@ -160,7 +160,7 @@ Object* StubCache::ComputeLoadInterceptor(String* name,
if (code->IsFailure()) return code;
LOG(CodeCreateEvent(Logger::LOAD_IC_TAG, Code::cast(code), name));
Object* result = receiver->map()->UpdateCodeCache(name, Code::cast(code));
if (result->IsFailure()) return code;
if (result->IsFailure()) return result;
}
return Set(name, receiver->map(), Code::cast(code));
}
......@@ -189,7 +189,7 @@ Object* StubCache::ComputeLoadGlobal(String* name,
if (code->IsFailure()) return code;
LOG(CodeCreateEvent(Logger::LOAD_IC_TAG, Code::cast(code), name));
Object* result = receiver->map()->UpdateCodeCache(name, Code::cast(code));
if (result->IsFailure()) return code;
if (result->IsFailure()) return result;
}
return Set(name, receiver->map(), Code::cast(code));
}
......@@ -351,7 +351,7 @@ Object* StubCache::ComputeStoreGlobal(String* name,
if (code->IsFailure()) return code;
LOG(CodeCreateEvent(Logger::LOAD_IC_TAG, Code::cast(code), name));
Object* result = receiver->map()->UpdateCodeCache(name, Code::cast(code));
if (result->IsFailure()) return code;
if (result->IsFailure()) return result;
}
return Set(name, receiver->map(), Code::cast(code));
}
......@@ -566,7 +566,7 @@ Object* StubCache::ComputeCallGlobal(int argc,
ASSERT_EQ(flags, Code::cast(code)->flags());
LOG(CodeCreateEvent(Logger::CALL_IC_TAG, Code::cast(code), name));
Object* result = receiver->map()->UpdateCodeCache(name, Code::cast(code));
if (result->IsFailure()) return code;
if (result->IsFailure()) return result;
}
return Set(name, receiver->map(), Code::cast(code));
}
......
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