Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(194)

Unified Diff: src/deoptimizer.h

Issue 6880010: Merge (7265, 7271] from bleeding_edge to experimental/gc branch.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: '' Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/debug-debugger.js ('k') | src/deoptimizer.cc » ('j') | src/heap.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « src/debug-debugger.js ('k') | src/deoptimizer.cc » ('j') | src/heap.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698