Chromium Code Reviews| 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. |