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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 | 100 |
101 class DeoptimizerData { | 101 class DeoptimizerData { |
102 public: | 102 public: |
103 DeoptimizerData(); | 103 DeoptimizerData(); |
104 ~DeoptimizerData(); | 104 ~DeoptimizerData(); |
105 | 105 |
106 #ifdef ENABLE_DEBUGGER_SUPPORT | 106 #ifdef ENABLE_DEBUGGER_SUPPORT |
107 void Iterate(ObjectVisitor* v); | 107 void Iterate(ObjectVisitor* v); |
108 #endif | 108 #endif |
109 | 109 |
| 110 Code* FindDeoptimizingCode(Address addr); |
| 111 void RemoveDeoptimizingCode(Code* code); |
| 112 |
110 private: | 113 private: |
111 int eager_deoptimization_entry_code_entries_; | 114 int eager_deoptimization_entry_code_entries_; |
112 int lazy_deoptimization_entry_code_entries_; | 115 int lazy_deoptimization_entry_code_entries_; |
113 VirtualMemory* eager_deoptimization_entry_code_; | 116 VirtualMemory* eager_deoptimization_entry_code_; |
114 VirtualMemory* lazy_deoptimization_entry_code_; | 117 VirtualMemory* lazy_deoptimization_entry_code_; |
115 Deoptimizer* current_; | 118 Deoptimizer* current_; |
116 | 119 |
117 #ifdef ENABLE_DEBUGGER_SUPPORT | 120 #ifdef ENABLE_DEBUGGER_SUPPORT |
118 DeoptimizedFrameInfo* deoptimized_frame_info_; | 121 DeoptimizedFrameInfo* deoptimized_frame_info_; |
119 #endif | 122 #endif |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 void AddArgumentsObject(intptr_t slot_address, int argc); | 361 void AddArgumentsObject(intptr_t slot_address, int argc); |
359 void AddArgumentsObjectValue(intptr_t value); | 362 void AddArgumentsObjectValue(intptr_t value); |
360 void AddDoubleValue(intptr_t slot_address, double value); | 363 void AddDoubleValue(intptr_t slot_address, double value); |
361 | 364 |
362 static void GenerateDeoptimizationEntries( | 365 static void GenerateDeoptimizationEntries( |
363 MacroAssembler* masm, int count, BailoutType type); | 366 MacroAssembler* masm, int count, BailoutType type); |
364 | 367 |
365 // Weak handle callback for deoptimizing code objects. | 368 // Weak handle callback for deoptimizing code objects. |
366 static void HandleWeakDeoptimizedCode( | 369 static void HandleWeakDeoptimizedCode( |
367 v8::Persistent<v8::Value> obj, void* data); | 370 v8::Persistent<v8::Value> obj, void* data); |
368 static Code* FindDeoptimizingCodeFromAddress(Address addr); | |
369 static void RemoveDeoptimizingCode(Code* code); | |
370 | 371 |
371 // Deoptimize function assuming that function->next_function_link() points | 372 // Deoptimize function assuming that function->next_function_link() points |
372 // to a list that contains all functions that share the same optimized code. | 373 // to a list that contains all functions that share the same optimized code. |
373 static void DeoptimizeFunctionWithPreparedFunctionList(JSFunction* function); | 374 static void DeoptimizeFunctionWithPreparedFunctionList(JSFunction* function); |
374 | 375 |
375 // Fill the input from from a JavaScript frame. This is used when | 376 // Fill the input from from a JavaScript frame. This is used when |
376 // the debugger needs to inspect an optimized frame. For normal | 377 // the debugger needs to inspect an optimized frame. For normal |
377 // deoptimizations the input frame is filled in generated code. | 378 // deoptimizations the input frame is filled in generated code. |
378 void FillInputFrame(Address tos, JavaScriptFrame* frame); | 379 void FillInputFrame(Address tos, JavaScriptFrame* frame); |
379 | 380 |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
867 Object** expression_stack_; | 868 Object** expression_stack_; |
868 int source_position_; | 869 int source_position_; |
869 | 870 |
870 friend class Deoptimizer; | 871 friend class Deoptimizer; |
871 }; | 872 }; |
872 #endif | 873 #endif |
873 | 874 |
874 } } // namespace v8::internal | 875 } } // namespace v8::internal |
875 | 876 |
876 #endif // V8_DEOPTIMIZER_H_ | 877 #endif // V8_DEOPTIMIZER_H_ |
OLD | NEW |