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

Unified Diff: src/compiler/instruction.h

Issue 442253002: Add deoptimization translations. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing review comments. Created 6 years, 4 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/common-operator.h ('k') | src/compiler/instruction.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/instruction.h
diff --git a/src/compiler/instruction.h b/src/compiler/instruction.h
index 8d9fdeb652f5409ab04fff469da167a4ccfd0c34..7b357639efd1d66774424c98a6f8f9cdf740ae0c 100644
--- a/src/compiler/instruction.h
+++ b/src/compiler/instruction.h
@@ -694,6 +694,30 @@ class Constant V8_FINAL {
int64_t value_;
};
+
+class FrameStateDescriptor : public ZoneObject {
+ public:
+ FrameStateDescriptor(BailoutId bailout_id, int parameters_count,
+ int locals_count, int stack_count)
+ : bailout_id_(bailout_id),
+ parameters_count_(parameters_count),
+ locals_count_(locals_count),
+ stack_count_(stack_count) {}
+
+ BailoutId bailout_id() const { return bailout_id_; }
+ int parameters_count() { return parameters_count_; }
+ int locals_count() { return locals_count_; }
+ int stack_count() { return stack_count_; }
+
+ int size() { return parameters_count_ + locals_count_ + stack_count_; }
+
+ private:
+ BailoutId bailout_id_;
+ int parameters_count_;
+ int locals_count_;
+ int stack_count_;
+};
+
OStream& operator<<(OStream& os, const Constant& constant);
typedef std::deque<Constant, zone_allocator<Constant> > ConstantDeque;
@@ -704,7 +728,8 @@ typedef std::map<int, Constant, std::less<int>,
typedef std::deque<Instruction*, zone_allocator<Instruction*> >
InstructionDeque;
typedef std::deque<PointerMap*, zone_allocator<PointerMap*> > PointerMapDeque;
-typedef std::vector<FrameStateDescriptor, zone_allocator<FrameStateDescriptor> >
+typedef std::vector<FrameStateDescriptor*,
+ zone_allocator<FrameStateDescriptor*> >
DeoptimizationVector;
@@ -814,8 +839,8 @@ class InstructionSequence V8_FINAL {
return immediates_[index];
}
- int AddDeoptimizationEntry(const FrameStateDescriptor& descriptor);
- FrameStateDescriptor GetDeoptimizationEntry(int deoptimization_id);
+ int AddDeoptimizationEntry(FrameStateDescriptor* descriptor);
+ FrameStateDescriptor* GetDeoptimizationEntry(int deoptimization_id);
int GetDeoptimizationEntryCount();
private:
« no previous file with comments | « src/compiler/common-operator.h ('k') | src/compiler/instruction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698