OLD | NEW |
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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 static void ReplaceCodeForRelatedFunctions(JSFunction* function, Code* code); | 190 static void ReplaceCodeForRelatedFunctions(JSFunction* function, Code* code); |
191 | 191 |
192 // Deoptimize all functions in the heap. | 192 // Deoptimize all functions in the heap. |
193 static void DeoptimizeAll(Isolate* isolate); | 193 static void DeoptimizeAll(Isolate* isolate); |
194 | 194 |
195 static void DeoptimizeGlobalObject(JSObject* object); | 195 static void DeoptimizeGlobalObject(JSObject* object); |
196 | 196 |
197 static void DeoptimizeAllFunctionsWith(Isolate* isolate, | 197 static void DeoptimizeAllFunctionsWith(Isolate* isolate, |
198 OptimizedFunctionFilter* filter); | 198 OptimizedFunctionFilter* filter); |
199 | 199 |
| 200 static void DeoptimizeCodeList(Isolate* isolate, ZoneList<Code*>* codes); |
| 201 |
200 static void DeoptimizeAllFunctionsForContext( | 202 static void DeoptimizeAllFunctionsForContext( |
201 Context* context, OptimizedFunctionFilter* filter); | 203 Context* context, OptimizedFunctionFilter* filter); |
202 | 204 |
203 static void VisitAllOptimizedFunctionsForContext( | 205 static void VisitAllOptimizedFunctionsForContext( |
204 Context* context, OptimizedFunctionVisitor* visitor); | 206 Context* context, OptimizedFunctionVisitor* visitor); |
205 | 207 |
206 static void VisitAllOptimizedFunctions(Isolate* isolate, | 208 static void VisitAllOptimizedFunctions(Isolate* isolate, |
207 OptimizedFunctionVisitor* visitor); | 209 OptimizedFunctionVisitor* visitor); |
208 | 210 |
209 // The size in bytes of the code required at a lazy deopt patch site. | 211 // The size in bytes of the code required at a lazy deopt patch site. |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 void AddDoubleValue(intptr_t slot_address, double value); | 406 void AddDoubleValue(intptr_t slot_address, double value); |
405 | 407 |
406 static void GenerateDeoptimizationEntries( | 408 static void GenerateDeoptimizationEntries( |
407 MacroAssembler* masm, int count, BailoutType type); | 409 MacroAssembler* masm, int count, BailoutType type); |
408 | 410 |
409 // Weak handle callback for deoptimizing code objects. | 411 // Weak handle callback for deoptimizing code objects. |
410 static void HandleWeakDeoptimizedCode(v8::Isolate* isolate, | 412 static void HandleWeakDeoptimizedCode(v8::Isolate* isolate, |
411 v8::Persistent<v8::Value>* obj, | 413 v8::Persistent<v8::Value>* obj, |
412 void* data); | 414 void* data); |
413 | 415 |
414 // Deoptimize function assuming that function->next_function_link() points | 416 // Deoptimize the given code and add to appropriate deoptimization lists. |
415 // to a list that contains all functions that share the same optimized code. | 417 static void DeoptimizeCode(Isolate* isolate, Code* code); |
416 static void DeoptimizeFunctionWithPreparedFunctionList(JSFunction* function); | 418 |
| 419 // Patch the given code so that it will deoptimize itself. |
| 420 static void PatchCodeForDeoptimization(Isolate* isolate, Code* code); |
417 | 421 |
418 // Fill the input from from a JavaScript frame. This is used when | 422 // Fill the input from from a JavaScript frame. This is used when |
419 // the debugger needs to inspect an optimized frame. For normal | 423 // the debugger needs to inspect an optimized frame. For normal |
420 // deoptimizations the input frame is filled in generated code. | 424 // deoptimizations the input frame is filled in generated code. |
421 void FillInputFrame(Address tos, JavaScriptFrame* frame); | 425 void FillInputFrame(Address tos, JavaScriptFrame* frame); |
422 | 426 |
423 // Fill the given output frame's registers to contain the failure handler | 427 // Fill the given output frame's registers to contain the failure handler |
424 // address and the number of parameters for a stub failure trampoline. | 428 // address and the number of parameters for a stub failure trampoline. |
425 void SetPlatformCompiledStubRegisters(FrameDescription* output_frame, | 429 void SetPlatformCompiledStubRegisters(FrameDescription* output_frame, |
426 CodeStubInterfaceDescriptor* desc); | 430 CodeStubInterfaceDescriptor* desc); |
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
946 Object** expression_stack_; | 950 Object** expression_stack_; |
947 int source_position_; | 951 int source_position_; |
948 | 952 |
949 friend class Deoptimizer; | 953 friend class Deoptimizer; |
950 }; | 954 }; |
951 #endif | 955 #endif |
952 | 956 |
953 } } // namespace v8::internal | 957 } } // namespace v8::internal |
954 | 958 |
955 #endif // V8_DEOPTIMIZER_H_ | 959 #endif // V8_DEOPTIMIZER_H_ |
OLD | NEW |