Index: src/deoptimizer.h |
diff --git a/src/deoptimizer.h b/src/deoptimizer.h |
index edf6c504f1c1340ae9345dd510a7dbc8c34d5f11..d4d3c48698a10d0d4fdd9b53d567f5bd45e76cd0 100644 |
--- a/src/deoptimizer.h |
+++ b/src/deoptimizer.h |
@@ -98,53 +98,34 @@ class OptimizedFunctionFilter BASE_EMBEDDED { |
class Deoptimizer; |
-class DeoptimizerData { |
- public: |
- explicit DeoptimizerData(MemoryAllocator* allocator); |
- ~DeoptimizerData(); |
- |
-#ifdef ENABLE_DEBUGGER_SUPPORT |
- void Iterate(ObjectVisitor* v); |
-#endif |
- |
- Code* FindDeoptimizingCode(Address addr); |
- void RemoveDeoptimizingCode(Code* code); |
- |
- private: |
- MemoryAllocator* allocator_; |
- int eager_deoptimization_entry_code_entries_; |
- int lazy_deoptimization_entry_code_entries_; |
- MemoryChunk* eager_deoptimization_entry_code_; |
- MemoryChunk* lazy_deoptimization_entry_code_; |
- Deoptimizer* current_; |
- |
-#ifdef ENABLE_DEBUGGER_SUPPORT |
- DeoptimizedFrameInfo* deoptimized_frame_info_; |
-#endif |
- |
- // 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 { |
EAGER, |
LAZY, |
+ SOFT, |
OSR, |
// This last bailout type is not really a bailout, but used by the |
// debugger to deoptimize stack frames to allow inspection. |
DEBUGGER |
}; |
+ static const int kBailoutTypesWithCodeEntry = SOFT + 1; |
+ |
+ struct JumpTableEntry { |
+ inline JumpTableEntry(Address entry, |
+ Deoptimizer::BailoutType type, |
+ bool frame) |
+ : label(), |
+ address(entry), |
+ bailout_type(type), |
+ needs_frame(frame) { } |
+ Label label; |
+ Address address; |
+ Deoptimizer::BailoutType bailout_type; |
+ bool needs_frame; |
+ }; |
+ |
static bool TraceEnabledFor(BailoutType deopt_type, |
StackFrame::Type frame_type); |
static const char* MessageFor(BailoutType type); |
@@ -626,6 +607,40 @@ class FrameDescription { |
}; |
+class DeoptimizerData { |
+ public: |
+ explicit DeoptimizerData(MemoryAllocator* allocator); |
+ ~DeoptimizerData(); |
+ |
+#ifdef ENABLE_DEBUGGER_SUPPORT |
+ void Iterate(ObjectVisitor* v); |
+#endif |
+ |
+ Code* FindDeoptimizingCode(Address addr); |
+ void RemoveDeoptimizingCode(Code* code); |
+ |
+ private: |
+ MemoryAllocator* allocator_; |
+ int deopt_entry_code_entries_[Deoptimizer::kBailoutTypesWithCodeEntry]; |
+ MemoryChunk* deopt_entry_code_[Deoptimizer::kBailoutTypesWithCodeEntry]; |
+ Deoptimizer* current_; |
+ |
+#ifdef ENABLE_DEBUGGER_SUPPORT |
+ DeoptimizedFrameInfo* deoptimized_frame_info_; |
+#endif |
+ |
+ // 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 TranslationBuffer BASE_EMBEDDED { |
public: |
explicit TranslationBuffer(Zone* zone) : contents_(256, zone) { } |