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

Unified Diff: src/deoptimizer.h

Issue 11547015: Use a filter instead of a visitor to deoptimize selected functions in a context. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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
Index: src/deoptimizer.h
diff --git a/src/deoptimizer.h b/src/deoptimizer.h
index 89955b38bde84d67790ef01e5d3c87d7ad9b260a..a91aeb997205678380cc235d935b803dfae7e05c 100644
--- a/src/deoptimizer.h
+++ b/src/deoptimizer.h
@@ -87,6 +87,14 @@ class OptimizedFunctionVisitor BASE_EMBEDDED {
};
+class OptimizedFunctionFilter BASE_EMBEDDED {
Sven Panne 2012/12/12 14:31:48 This is what is commonly called a predicate (even
Michael Starzinger 2012/12/12 14:39:42 I am fine with both solutions (a templetized filte
ulan_google 2012/12/12 15:00:46 After offline discussion, I am leaving this as it
+ public:
+ virtual ~OptimizedFunctionFilter() {}
+
+ virtual bool TakeFunction(JSFunction* function) = 0;
+};
+
+
class Deoptimizer;
@@ -177,12 +185,14 @@ class Deoptimizer : public Malloced {
static void DeoptimizeGlobalObject(JSObject* object);
+ static void DeoptimizeAllFunctionsWith(OptimizedFunctionFilter* filter);
+
+ static void DeoptimizeAllFunctionsForContext(
+ Context* context, OptimizedFunctionFilter* filter);
+
static void VisitAllOptimizedFunctionsForContext(
Context* context, OptimizedFunctionVisitor* visitor);
- static void VisitAllOptimizedFunctionsForGlobalObject(
- JSObject* object, OptimizedFunctionVisitor* visitor);
-
static void VisitAllOptimizedFunctions(OptimizedFunctionVisitor* visitor);
// The size in bytes of the code required at a lazy deopt patch site.
@@ -353,6 +363,10 @@ class Deoptimizer : public Malloced {
static Code* FindDeoptimizingCodeFromAddress(Address addr);
static void RemoveDeoptimizingCode(Code* code);
+ // Deoptimize function assuming that function->next_function_link() points
+ // to a list that contains all functions that share the same optimized code.
+ static void DeoptimizeFunctionWithPreparedFunctionList(JSFunction* function);
+
// Fill the input from from a JavaScript frame. This is used when
// the debugger needs to inspect an optimized frame. For normal
// deoptimizations the input frame is filled in generated code.
« src/arm/deoptimizer-arm.cc ('K') | « src/arm/deoptimizer-arm.cc ('k') | src/deoptimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698