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

Unified Diff: src/deoptimizer.h

Issue 12917002: Pass Isolates explicitly in Deoptimizer-related code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Cleanup Created 7 years, 9 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.cc ('k') | src/deoptimizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/deoptimizer.h
diff --git a/src/deoptimizer.h b/src/deoptimizer.h
index 6231c7c4ae717c1a1206e68e853618dbd57f1ba1..db0cc0bdeb85f4c145a514d81dbd80b98927018e 100644
--- a/src/deoptimizer.h
+++ b/src/deoptimizer.h
@@ -100,7 +100,7 @@ class Deoptimizer;
class DeoptimizerData {
public:
- DeoptimizerData();
+ explicit DeoptimizerData(MemoryAllocator* allocator);
~DeoptimizerData();
#ifdef ENABLE_DEBUGGER_SUPPORT
@@ -111,6 +111,7 @@ class DeoptimizerData {
void RemoveDeoptimizingCode(Code* code);
private:
+ MemoryAllocator* allocator_;
int eager_deoptimization_entry_code_entries_;
int lazy_deoptimization_entry_code_entries_;
MemoryChunk* eager_deoptimization_entry_code_;
@@ -190,11 +191,12 @@ class Deoptimizer : public Malloced {
static void ReplaceCodeForRelatedFunctions(JSFunction* function, Code* code);
// Deoptimize all functions in the heap.
- static void DeoptimizeAll();
+ static void DeoptimizeAll(Isolate* isolate);
static void DeoptimizeGlobalObject(JSObject* object);
- static void DeoptimizeAllFunctionsWith(OptimizedFunctionFilter* filter);
+ static void DeoptimizeAllFunctionsWith(Isolate* isolate,
+ OptimizedFunctionFilter* filter);
static void DeoptimizeAllFunctionsForContext(
Context* context, OptimizedFunctionFilter* filter);
@@ -202,7 +204,8 @@ class Deoptimizer : public Malloced {
static void VisitAllOptimizedFunctionsForContext(
Context* context, OptimizedFunctionVisitor* visitor);
- static void VisitAllOptimizedFunctions(OptimizedFunctionVisitor* visitor);
+ static void VisitAllOptimizedFunctions(Isolate* isolate,
+ OptimizedFunctionVisitor* visitor);
// The size in bytes of the code required at a lazy deopt patch site.
static int patch_size();
@@ -259,7 +262,9 @@ class Deoptimizer : public Malloced {
int id,
BailoutType type,
GetEntryMode mode = ENSURE_ENTRY_CODE);
- static int GetDeoptimizationId(Address addr, BailoutType type);
+ static int GetDeoptimizationId(Isolate* isolate,
+ Address addr,
+ BailoutType type);
static int GetOutputInfo(DeoptimizationOutputData* data,
BailoutId node_id,
SharedFunctionInfo* shared);
@@ -321,6 +326,8 @@ class Deoptimizer : public Malloced {
BailoutType type,
int max_entry_id);
+ Isolate* isolate() const { return isolate_; }
+
private:
static const int kMinNumberOfEntries = 64;
static const int kMaxNumberOfEntries = 16384;
@@ -604,7 +611,7 @@ class TranslationBuffer BASE_EMBEDDED {
int CurrentIndex() const { return contents_.length(); }
void Add(int32_t value, Zone* zone);
- Handle<ByteArray> CreateByteArray();
+ Handle<ByteArray> CreateByteArray(Factory* factory);
private:
ZoneList<uint8_t> contents_;
« no previous file with comments | « src/debug.cc ('k') | src/deoptimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698