Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(403)

Unified Diff: src/ic/ic.cc

Issue 885333002: CallIC used an invalid mechanism to detect if it was in optimized code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-453481.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/ic.cc
diff --git a/src/ic/ic.cc b/src/ic/ic.cc
index a4dce6a66ac64952aaa5a4e9d398aba79a0392e5..f34c2fdfc346ddfb8841b74a784c90a5582aa2f6 100644
--- a/src/ic/ic.cc
+++ b/src/ic/ic.cc
@@ -224,13 +224,9 @@ Code* IC::GetOriginalCode() const {
bool IC::AddressIsOptimizedCode() const {
- Object* maybe_function =
- Memory::Object_at(fp() + JavaScriptFrameConstants::kFunctionOffset);
- if (maybe_function->IsJSFunction()) {
- JSFunction* function = JSFunction::cast(maybe_function);
- return function->IsOptimized();
- }
- return false;
+ Code* host =
+ isolate()->inner_pointer_to_code_cache()->GetCacheEntry(address())->code;
+ return host->kind() == Code::OPTIMIZED_FUNCTION;
}
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-453481.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698