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

Unified Diff: src/objects-inl.h

Issue 2592703002: abstract_code: return compiled code for compiled shared funcs (Closed)
Patch Set: Add missing negation Created 4 years 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index e3b47427e38251435c4d4ab36f7498d7ec34029b..be1fda0bc46c97cff6f9aa69bdc6191958cad7fc 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -6127,7 +6127,7 @@ BOOL_GETTER(SharedFunctionInfo,
kOptimizationDisabled)
AbstractCode* SharedFunctionInfo::abstract_code() {
- if (HasBytecodeArray()) {
+ if ((!is_compiled() && HasBytecodeArray()) || IsInterpreted()) {
return AbstractCode::cast(bytecode_array());
} else {
return AbstractCode::cast(code());
@@ -6545,7 +6545,7 @@ void Map::InobjectSlackTrackingStep() {
}
AbstractCode* JSFunction::abstract_code() {
- if (IsInterpreted()) {
+ if ((!is_compiled() && shared()->HasBytecodeArray()) || IsInterpreted()) {
return AbstractCode::cast(shared()->bytecode_array());
} else {
return AbstractCode::cast(code());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698