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

Unified Diff: src/objects.h

Issue 2481433002: [Interpreter] Add IsInterpreted() to JSFunction and use to fix test-heap tests. (Closed)
Patch Set: Rebase Created 4 years, 1 month 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 | « src/ic/ic.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 25fdb80915346ed079062b81da68e3c9b7013e36..cfc2d12ad1ffeead5cfbab9390acb701aac40e01 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -7319,6 +7319,14 @@ class SharedFunctionInfo: public HeapObject {
// a Code object or a BytecodeArray.
inline AbstractCode* abstract_code();
+ // Tells whether or not this shared function info is interpreted.
+ //
+ // Note: function->IsInterpreted() does not necessarily return the same value
+ // as function->shared()->IsInterpreted() because the shared function info
+ // could tier up to baseline via a different function closure. The interpreter
+ // entry stub will "self-heal" this divergence when the function is executed.
+ inline bool IsInterpreted() const;
+
inline void ReplaceCode(Code* code);
inline bool HasBaselineCode() const;
@@ -8353,6 +8361,14 @@ class JSFunction: public JSObject {
// Tells whether this function inlines the given shared function info.
bool Inlines(SharedFunctionInfo* candidate);
+ // Tells whether or not this function is interpreted.
+ //
+ // Note: function->IsInterpreted() does not necessarily return the same value
+ // as function->shared()->IsInterpreted() because the shared function info
+ // could tier up to baseline via a different function closure. The interpreter
+ // entry stub will "self-heal" this divergence when the function is executed.
+ inline bool IsInterpreted();
+
// Tells whether or not this function has been optimized.
inline bool IsOptimized();
« no previous file with comments | « src/ic/ic.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698