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

Unified Diff: src/deoptimizer.h

Issue 20680002: Rebase of partial ia32 implementation of optimized try/catch (started by Kevin Millikin, continued … (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix detection of CATCH frames (fixes debuger exception reporting anf breaks another assertion...). Created 7 years, 5 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/compiler.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 5ca635cff16f60b65d5cda69db6460b240edf691..7b0ec078ee735dda58064561e990428e1cd72fdf 100644
--- a/src/deoptimizer.h
+++ b/src/deoptimizer.h
@@ -105,6 +105,26 @@ class OptimizedFunctionVisitor BASE_EMBEDDED {
};
+// Linked list holding deoptimizing code objects. The deoptimizing code objects
+// are kept as weak handles until they are no longer activated on the stack.
+class DeoptimizingCodeListNode : public Malloced {
+ public:
+ explicit DeoptimizingCodeListNode(Code* code);
+ ~DeoptimizingCodeListNode();
+
+ DeoptimizingCodeListNode* next() const { return next_; }
+ void set_next(DeoptimizingCodeListNode* next) { next_ = next; }
+ Handle<Code> code() const { return code_; }
+
+ private:
+ // Global (weak) handle to the deoptimizing code object.
+ Handle<Code> code_;
+
+ // Next pointer for linked list.
+ DeoptimizingCodeListNode* next_;
+};
+
+
class OptimizedFunctionFilter BASE_EMBEDDED {
public:
virtual ~OptimizedFunctionFilter() {}
@@ -113,9 +133,6 @@ class OptimizedFunctionFilter BASE_EMBEDDED {
};
-class Deoptimizer;
-
-
class Deoptimizer : public Malloced {
public:
enum BailoutType {
@@ -333,6 +350,9 @@ class Deoptimizer : public Malloced {
int ConvertJSFrameIndexToFrameIndex(int jsframe_index);
+ // Unregister a code object from lazy deoptimization.
+ static void RemoveDeoptimizingCode(Code* code);
+
static size_t GetMaxDeoptTableSize();
static void EnsureCodeForDeoptimizationEntry(Isolate* isolate,
@@ -395,6 +415,7 @@ class Deoptimizer : public Malloced {
unsigned ComputeIncomingArgumentSize(JSFunction* function) const;
unsigned ComputeOutgoingArgumentSize() const;
+ unsigned ComputeHandlersSize() const;
Object* ComputeLiteral(int index) const;
@@ -590,6 +611,8 @@ class FrameDescription {
return OFFSET_OF(FrameDescription, frame_content_);
}
+ unsigned frame_size() { return static_cast<unsigned>(frame_size_); }
+
private:
static const uint32_t kZapUint32 = 0xbeeddead;
@@ -637,6 +660,12 @@ class DeoptimizerData {
Code* FindDeoptimizingCode(Address addr);
void RemoveDeoptimizingCode(Code* code);
+ void append_deoptimizing_code(Code* code) {
+ DeoptimizingCodeListNode* head = new DeoptimizingCodeListNode(code);
+ head->set_next(deoptimizing_code_list_);
+ deoptimizing_code_list_ = head;
+ }
+
private:
MemoryAllocator* allocator_;
int deopt_entry_code_entries_[Deoptimizer::kBailoutTypesWithCodeEntry];
@@ -654,6 +683,7 @@ class DeoptimizerData {
DeoptimizingCodeListNode* deoptimizing_code_list_;
friend class Deoptimizer;
+ friend class Isolate;
DISALLOW_COPY_AND_ASSIGN(DeoptimizerData);
};
@@ -733,7 +763,10 @@ class Translation BASE_EMBEDDED {
int index() const { return index_; }
// Commands.
- void BeginJSFrame(BailoutId node_id, int literal_id, unsigned height);
+ void BeginJSFrame(BailoutId node_id,
+ int literal_id,
+ unsigned height,
+ int handler_count);
void BeginCompiledStubFrame();
void BeginArgumentsAdaptorFrame(int literal_id, unsigned height);
void BeginConstructStubFrame(int literal_id, unsigned height);
@@ -769,26 +802,6 @@ class Translation BASE_EMBEDDED {
};
-// Linked list holding deoptimizing code objects. The deoptimizing code objects
-// are kept as weak handles until they are no longer activated on the stack.
-class DeoptimizingCodeListNode : public Malloced {
- public:
- explicit DeoptimizingCodeListNode(Code* code);
- ~DeoptimizingCodeListNode();
-
- DeoptimizingCodeListNode* next() const { return next_; }
- void set_next(DeoptimizingCodeListNode* next) { next_ = next; }
- Handle<Code> code() const { return code_; }
-
- private:
- // Global (weak) handle to the deoptimizing code object.
- Handle<Code> code_;
-
- // Next pointer for linked list.
- DeoptimizingCodeListNode* next_;
-};
-
-
class SlotRef BASE_EMBEDDED {
public:
enum SlotRepresentation {
« no previous file with comments | « src/compiler.cc ('k') | src/deoptimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698