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

Side by Side Diff: src/x64/deoptimizer-x64.cc

Issue 7983045: Notify collector about lazily deoptimized code objects. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: clear lo from rescan flag, avoid ShouldSweepLazily predicate in preparation Created 9 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 // Destroy the code which is not supposed to run again. 197 // Destroy the code which is not supposed to run again.
198 ZapCodeRange(previous_pc, jump_table_address); 198 ZapCodeRange(previous_pc, jump_table_address);
199 #endif 199 #endif
200 200
201 // Add the deoptimizing code to the list. 201 // Add the deoptimizing code to the list.
202 DeoptimizingCodeListNode* node = new DeoptimizingCodeListNode(code); 202 DeoptimizingCodeListNode* node = new DeoptimizingCodeListNode(code);
203 DeoptimizerData* data = code->GetIsolate()->deoptimizer_data(); 203 DeoptimizerData* data = code->GetIsolate()->deoptimizer_data();
204 node->set_next(data->deoptimizing_code_list_); 204 node->set_next(data->deoptimizing_code_list_);
205 data->deoptimizing_code_list_ = node; 205 data->deoptimizing_code_list_ = node;
206 206
207 // We might be in the middle of incremental marking with compaction.
208 // Tell collector to treat this code object in a special way and
209 // ignore all slots that might have been recorded on it.
210 isolate->heap()->mark_compact_collector()->InvalidateCode(code);
211
207 // Set the code for the function to non-optimized version. 212 // Set the code for the function to non-optimized version.
208 function->ReplaceCode(function->shared()->code()); 213 function->ReplaceCode(function->shared()->code());
209 214
210 if (FLAG_trace_deopt) { 215 if (FLAG_trace_deopt) {
211 PrintF("[forced deoptimization: "); 216 PrintF("[forced deoptimization: ");
212 function->PrintName(); 217 function->PrintName();
213 PrintF(" / %" V8PRIxPTR "]\n", reinterpret_cast<intptr_t>(function)); 218 PrintF(" / %" V8PRIxPTR "]\n", reinterpret_cast<intptr_t>(function));
214 #ifdef DEBUG 219 #ifdef DEBUG
215 if (FLAG_print_code) { 220 if (FLAG_print_code) {
216 code->PrintLn(); 221 code->PrintLn();
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 } 859 }
855 __ bind(&done); 860 __ bind(&done);
856 } 861 }
857 862
858 #undef __ 863 #undef __
859 864
860 865
861 } } // namespace v8::internal 866 } } // namespace v8::internal
862 867
863 #endif // V8_TARGET_ARCH_X64 868 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/spaces.cc ('K') | « src/spaces.cc ('k') | test/mjsunit/regress/regress-1713.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698