Index: src/deoptimizer.h |
diff --git a/src/deoptimizer.h b/src/deoptimizer.h |
index f67f986ba1b13467517265619a1f512801904f64..4aa38cefee08263bf926186d89617e223964a0a2 100644 |
--- a/src/deoptimizer.h |
+++ b/src/deoptimizer.h |
@@ -100,8 +100,10 @@ class DeoptimizerData { |
#endif |
private: |
- MemoryChunk* eager_deoptimization_entry_code_; |
- MemoryChunk* lazy_deoptimization_entry_code_; |
+ int eager_deoptimization_entry_code_entries_; |
+ int lazy_deoptimization_entry_code_entries_; |
+ VirtualMemory* eager_deoptimization_entry_code_; |
+ VirtualMemory* lazy_deoptimization_entry_code_; |
Deoptimizer* current_; |
#ifdef ENABLE_DEBUGGER_SUPPORT |
@@ -226,7 +228,17 @@ class Deoptimizer : public Malloced { |
static void ComputeOutputFrames(Deoptimizer* deoptimizer); |
- static Address GetDeoptimizationEntry(int id, BailoutType type); |
+ |
+ enum GetEntryMode { |
+ CALCULATE_ENTRY_ADDRESS, |
+ ENSURE_ENTRY_CODE |
+ }; |
+ |
+ |
+ static Address GetDeoptimizationEntry( |
+ int id, |
+ BailoutType type, |
+ GetEntryMode mode = ENSURE_ENTRY_CODE); |
static int GetDeoptimizationId(Address addr, BailoutType type); |
static int GetOutputInfo(DeoptimizationOutputData* data, |
BailoutId node_id, |
@@ -283,8 +295,11 @@ class Deoptimizer : public Malloced { |
int ConvertJSFrameIndexToFrameIndex(int jsframe_index); |
+ static size_t GetMaxDeoptTableSize(); |
+ |
private: |
- static const int kNumberOfEntries = 16384; |
+ static const int kMinNumberOfEntries = 64; |
+ static const int kMaxNumberOfEntries = 16384; |
Deoptimizer(Isolate* isolate, |
JSFunction* function, |
@@ -327,7 +342,8 @@ class Deoptimizer : public Malloced { |
void AddArgumentsObjectValue(intptr_t value); |
void AddDoubleValue(intptr_t slot_address, double value); |
- static MemoryChunk* CreateCode(BailoutType type); |
+ static void EnsureCodeForDeoptimizationEntry(BailoutType type, |
+ int max_entry_id); |
static void GenerateDeoptimizationEntries( |
MacroAssembler* masm, int count, BailoutType type); |