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

Unified Diff: src/compiler/instruction.h

Issue 522873002: Removal of the deoptimization block from Turbofan (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Change constant capitalization 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/ia32/instruction-selector-ia32.cc ('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 98c85bc89d24e30c033cef10cc409954bf8ef0b2..8cd8ab9184d377e6a4119d1ffa37ec912bddebf1 100644
--- a/src/compiler/instruction.h
+++ b/src/compiler/instruction.h
@@ -701,22 +701,28 @@ class Constant V8_FINAL {
class FrameStateDescriptor : public ZoneObject {
public:
- FrameStateDescriptor(BailoutId bailout_id, int parameters_count,
- int locals_count, int stack_count)
- : bailout_id_(bailout_id),
+ FrameStateDescriptor(const FrameStateCallInfo& state_info,
+ int parameters_count, int locals_count, int stack_count)
+ : bailout_id_(state_info.bailout_id()),
+ frame_state_combine_(state_info.state_combine()),
parameters_count_(parameters_count),
locals_count_(locals_count),
stack_count_(stack_count) {}
BailoutId bailout_id() const { return bailout_id_; }
+ OutputFrameStateCombine state_combine() const { return frame_state_combine_; }
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_; }
+ int size() {
+ return parameters_count_ + locals_count_ + stack_count_ +
+ 1; // Includes context.
+ }
private:
BailoutId bailout_id_;
+ OutputFrameStateCombine frame_state_combine_;
int parameters_count_;
int locals_count_;
int stack_count_;
@@ -838,9 +844,19 @@ class InstructionSequence V8_FINAL {
return immediates_[index];
}
- int AddDeoptimizationEntry(FrameStateDescriptor* descriptor);
- FrameStateDescriptor* GetDeoptimizationEntry(int deoptimization_id);
- int GetDeoptimizationEntryCount();
+ class StateId {
+ public:
+ static StateId FromInt(int id) { return StateId(id); }
+ int ToInt() const { return id_; }
+
+ private:
+ explicit StateId(int id) : id_(id) {}
+ int id_;
+ };
+
+ StateId AddFrameStateDescriptor(FrameStateDescriptor* descriptor);
+ FrameStateDescriptor* GetFrameStateDescriptor(StateId deoptimization_id);
+ int GetFrameStateDescriptorCount();
private:
friend OStream& operator<<(OStream& os, const InstructionSequence& code);
« no previous file with comments | « src/compiler/ia32/instruction-selector-ia32.cc ('k') | src/compiler/instruction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698