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

Side by Side Diff: src/deoptimizer.h

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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/deoptimizer-arm.cc ('k') | src/deoptimizer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 // patching. If there is not enough room a new relocation 159 // patching. If there is not enough room a new relocation
160 // information object is allocated and comments are added until it 160 // information object is allocated and comments are added until it
161 // is big enough. 161 // is big enough.
162 static void EnsureRelocSpaceForLazyDeoptimization(Handle<Code> code); 162 static void EnsureRelocSpaceForLazyDeoptimization(Handle<Code> code);
163 163
164 // Deoptimize the function now. Its current optimized code will never be run 164 // Deoptimize the function now. Its current optimized code will never be run
165 // again and any activations of the optimized code will get deoptimized when 165 // again and any activations of the optimized code will get deoptimized when
166 // execution returns. 166 // execution returns.
167 static void DeoptimizeFunction(JSFunction* function); 167 static void DeoptimizeFunction(JSFunction* function);
168 168
169 // Iterate over all the functions which share the same code object
170 // and make them use unoptimized version.
171 static void ReplaceCodeForRelatedFunctions(JSFunction* function, Code* code);
172
169 // Deoptimize all functions in the heap. 173 // Deoptimize all functions in the heap.
170 static void DeoptimizeAll(); 174 static void DeoptimizeAll();
171 175
172 static void DeoptimizeGlobalObject(JSObject* object); 176 static void DeoptimizeGlobalObject(JSObject* object);
173 177
174 static void VisitAllOptimizedFunctionsForContext( 178 static void VisitAllOptimizedFunctionsForContext(
175 Context* context, OptimizedFunctionVisitor* visitor); 179 Context* context, OptimizedFunctionVisitor* visitor);
176 180
177 static void VisitAllOptimizedFunctionsForGlobalObject( 181 static void VisitAllOptimizedFunctionsForGlobalObject(
178 JSObject* object, OptimizedFunctionVisitor* visitor); 182 JSObject* object, OptimizedFunctionVisitor* visitor);
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
829 Object** expression_stack_; 833 Object** expression_stack_;
830 int source_position_; 834 int source_position_;
831 835
832 friend class Deoptimizer; 836 friend class Deoptimizer;
833 }; 837 };
834 #endif 838 #endif
835 839
836 } } // namespace v8::internal 840 } } // namespace v8::internal
837 841
838 #endif // V8_DEOPTIMIZER_H_ 842 #endif // V8_DEOPTIMIZER_H_
OLDNEW
« no previous file with comments | « src/arm/deoptimizer-arm.cc ('k') | src/deoptimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698