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

Side by Side Diff: src/arm/deoptimizer-arm.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
« no previous file with comments | « no previous file | src/ia32/deoptimizer-ia32.cc » ('j') | src/spaces.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 destroyer.masm()->bkpt(0); 111 destroyer.masm()->bkpt(0);
112 } 112 }
113 #endif 113 #endif
114 114
115 // Add the deoptimizing code to the list. 115 // Add the deoptimizing code to the list.
116 DeoptimizingCodeListNode* node = new DeoptimizingCodeListNode(code); 116 DeoptimizingCodeListNode* node = new DeoptimizingCodeListNode(code);
117 DeoptimizerData* data = code->GetIsolate()->deoptimizer_data(); 117 DeoptimizerData* data = code->GetIsolate()->deoptimizer_data();
118 node->set_next(data->deoptimizing_code_list_); 118 node->set_next(data->deoptimizing_code_list_);
119 data->deoptimizing_code_list_ = node; 119 data->deoptimizing_code_list_ = node;
120 120
121 // We might be in the middle of incremental marking with compaction.
122 // Tell collector to treat this code object in a special way and
123 // ignore all slots that might have been recorded on it.
124 isolate->heap()->mark_compact_collector()->InvalidateCode(code);
125
121 // Set the code for the function to non-optimized version. 126 // Set the code for the function to non-optimized version.
122 function->ReplaceCode(function->shared()->code()); 127 function->ReplaceCode(function->shared()->code());
123 128
124 if (FLAG_trace_deopt) { 129 if (FLAG_trace_deopt) {
125 PrintF("[forced deoptimization: "); 130 PrintF("[forced deoptimization: ");
126 function->PrintName(); 131 function->PrintName();
127 PrintF(" / %x]\n", reinterpret_cast<uint32_t>(function)); 132 PrintF(" / %x]\n", reinterpret_cast<uint32_t>(function));
128 #ifdef DEBUG 133 #ifdef DEBUG
129 if (FLAG_print_code) { 134 if (FLAG_print_code) {
130 code->PrintLn(); 135 code->PrintLn();
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 __ push(ip); 787 __ push(ip);
783 __ b(&done); 788 __ b(&done);
784 ASSERT(masm()->pc_offset() - start == table_entry_size_); 789 ASSERT(masm()->pc_offset() - start == table_entry_size_);
785 } 790 }
786 __ bind(&done); 791 __ bind(&done);
787 } 792 }
788 793
789 #undef __ 794 #undef __
790 795
791 } } // namespace v8::internal 796 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/ia32/deoptimizer-ia32.cc » ('j') | src/spaces.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698