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

Unified Diff: src/arm/deoptimizer-arm.cc

Issue 11189091: Speed up function deoptimization by avoiding quadratic pass over optimized function list. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comments Created 8 years, 2 months 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 | src/deoptimizer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/deoptimizer-arm.cc
diff --git a/src/arm/deoptimizer-arm.cc b/src/arm/deoptimizer-arm.cc
index 5339be1d843c727d4f54e331da949338bee2ff79..19667b9d5f44bf9645bf3d5049d3081a191b795b 100644
--- a/src/arm/deoptimizer-arm.cc
+++ b/src/arm/deoptimizer-arm.cc
@@ -104,19 +104,7 @@ void Deoptimizer::DeoptimizeFunction(JSFunction* function) {
// ignore all slots that might have been recorded on it.
isolate->heap()->mark_compact_collector()->InvalidateCode(code);
- // Iterate over all the functions which share the same code object
- // and make them use unoptimized version.
- Context* context = function->context()->native_context();
- Object* element = context->get(Context::OPTIMIZED_FUNCTIONS_LIST);
- SharedFunctionInfo* shared = function->shared();
- while (!element->IsUndefined()) {
- JSFunction* func = JSFunction::cast(element);
- // Grab element before code replacement as ReplaceCode alters the list.
- element = func->next_function_link();
- if (func->code() == code) {
- func->ReplaceCode(shared->code());
- }
- }
+ ReplaceCodeForRelatedFunctions(function, code);
if (FLAG_trace_deopt) {
PrintF("[forced deoptimization: ");
« no previous file with comments | « no previous file | src/deoptimizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698