| Index: src/deoptimizer.h
|
| ===================================================================
|
| --- src/deoptimizer.h (revision 7563)
|
| +++ src/deoptimizer.h (working copy)
|
| @@ -93,6 +93,31 @@
|
| };
|
|
|
|
|
| +class Deoptimizer;
|
| +
|
| +
|
| +class DeoptimizerData {
|
| + public:
|
| + DeoptimizerData();
|
| + ~DeoptimizerData();
|
| +
|
| + private:
|
| + MemoryChunk* eager_deoptimization_entry_code_;
|
| + MemoryChunk* lazy_deoptimization_entry_code_;
|
| + Deoptimizer* current_;
|
| +
|
| + // List of deoptimized code which still have references from active stack
|
| + // frames. These code objects are needed by the deoptimizer when deoptimizing
|
| + // a frame for which the code object for the function function has been
|
| + // changed from the code present when deoptimizing was done.
|
| + DeoptimizingCodeListNode* deoptimizing_code_list_;
|
| +
|
| + friend class Deoptimizer;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(DeoptimizerData);
|
| +};
|
| +
|
| +
|
| class Deoptimizer : public Malloced {
|
| public:
|
| enum BailoutType {
|
| @@ -107,8 +132,9 @@
|
| BailoutType type,
|
| unsigned bailout_id,
|
| Address from,
|
| - int fp_to_sp_delta);
|
| - static Deoptimizer* Grab();
|
| + int fp_to_sp_delta,
|
| + Isolate* isolate);
|
| + static Deoptimizer* Grab(Isolate* isolate);
|
|
|
| // Deoptimize the function now. Its current optimized code will never be run
|
| // again and any activations of the optimized code will get deoptimized when
|
| @@ -160,7 +186,7 @@
|
|
|
| void InsertHeapNumberValues(int index, JavaScriptFrame* frame);
|
|
|
| - static void ComputeOutputFrames(Deoptimizer* deoptimizer);
|
| + static void ComputeOutputFrames(Deoptimizer* deoptimizer, Isolate* isolate);
|
|
|
| static Address GetDeoptimizationEntry(int id, BailoutType type);
|
| static int GetDeoptimizationId(Address addr, BailoutType type);
|
| @@ -168,9 +194,6 @@
|
| unsigned node_id,
|
| SharedFunctionInfo* shared);
|
|
|
| - static void Setup();
|
| - static void TearDown();
|
| -
|
| // Code generation support.
|
| static int input_offset() { return OFFSET_OF(Deoptimizer, input_); }
|
| static int output_count_offset() {
|
| @@ -178,7 +201,7 @@
|
| }
|
| static int output_offset() { return OFFSET_OF(Deoptimizer, output_); }
|
|
|
| - static int GetDeoptimizedCodeCount();
|
| + static int GetDeoptimizedCodeCount(Isolate* isolate);
|
|
|
| static const int kNotDeoptimizationEntry = -1;
|
|
|
| @@ -219,7 +242,8 @@
|
| private:
|
| static const int kNumberOfEntries = 4096;
|
|
|
| - Deoptimizer(JSFunction* function,
|
| + Deoptimizer(Isolate* isolate,
|
| + JSFunction* function,
|
| BailoutType type,
|
| unsigned bailout_id,
|
| Address from,
|
| @@ -265,16 +289,7 @@
|
| static Code* FindDeoptimizingCodeFromAddress(Address addr);
|
| static void RemoveDeoptimizingCode(Code* code);
|
|
|
| - static MemoryChunk* eager_deoptimization_entry_code_;
|
| - static MemoryChunk* lazy_deoptimization_entry_code_;
|
| - static Deoptimizer* current_;
|
| -
|
| - // List of deoptimized code which still have references from active stack
|
| - // frames. These code objects are needed by the deoptimizer when deoptimizing
|
| - // a frame for which the code object for the function function has been
|
| - // changed from the code present when deoptimizing was done.
|
| - static DeoptimizingCodeListNode* deoptimizing_code_list_;
|
| -
|
| + Isolate* isolate_;
|
| JSFunction* function_;
|
| Code* optimized_code_;
|
| unsigned bailout_id_;
|
|
|