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

Unified Diff: src/liveedit.cc

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/liveedit.cc
diff --git a/src/liveedit.cc b/src/liveedit.cc
index f491e372047f9e7eadb376a7eb9f1b41d40b27d6..abb00993120dee48512ac48d997ecbe53c61ceae 100644
--- a/src/liveedit.cc
+++ b/src/liveedit.cc
@@ -1223,23 +1223,15 @@ static bool IsInlined(JSFunction* function, SharedFunctionInfo* candidate) {
}
-class DependentFunctionsDeoptimizingVisitor : public OptimizedFunctionVisitor {
+class DependentFunctionFilter : public OptimizedFunctionFilter {
public:
- explicit DependentFunctionsDeoptimizingVisitor(
+ explicit DependentFunctionFilter(
SharedFunctionInfo* function_info)
: function_info_(function_info) {}
- virtual void EnterContext(Context* context) {
- }
-
- virtual void VisitFunction(JSFunction* function) {
- if (function->shared() == function_info_ ||
- IsInlined(function, function_info_)) {
- Deoptimizer::DeoptimizeFunction(function);
- }
- }
-
- virtual void LeaveContext(Context* context) {
+ virtual bool TakeFunction(JSFunction* function) {
+ return (function->shared() == function_info_ ||
+ IsInlined(function, function_info_));
}
private:
@@ -1250,8 +1242,8 @@ class DependentFunctionsDeoptimizingVisitor : public OptimizedFunctionVisitor {
static void DeoptimizeDependentFunctions(SharedFunctionInfo* function_info) {
AssertNoAllocation no_allocation;
- DependentFunctionsDeoptimizingVisitor visitor(function_info);
- Deoptimizer::VisitAllOptimizedFunctions(&visitor);
+ DependentFunctionFilter filter(function_info);
+ Deoptimizer::DeoptimizeAllFunctionsWith(&filter);
}

Powered by Google App Engine
This is Rietveld 408576698