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

Unified Diff: runtime/vm/intermediate_language.h

Issue 14215006: Re-apply r20377. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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
Index: runtime/vm/intermediate_language.h
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index 9ac45c16918933117c56e0a8724902d5175011fd..e8dc7219e315199e0eff8369047a2fa84b7965b0 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -623,11 +623,6 @@ class Instruction : public ZoneAllocated {
void Goto(JoinEntryInstr* entry);
- // Mutate assigned_vars to add the local variable index for all
- // frame-allocated locals assigned to by the instruction.
- virtual void RecordAssignedVars(BitVector* assigned_vars,
- intptr_t fixed_parameter_count);
-
virtual const char* DebugName() const = 0;
// Printing support.
@@ -991,7 +986,6 @@ class BlockEntryInstr : public Instruction {
GrowableArray<BlockEntryInstr*>* preorder,
GrowableArray<BlockEntryInstr*>* postorder,
GrowableArray<intptr_t>* parent,
- GrowableArray<BitVector*>* assigned_vars,
intptr_t variable_count,
intptr_t fixed_parameter_count);
@@ -1420,9 +1414,6 @@ class Definition : public Instruction {
// NULL iterator.
void ReplaceWith(Definition* other, ForwardInstructionIterator* iterator);
- virtual void RecordAssignedVars(BitVector* assigned_vars,
- intptr_t fixed_parameter_count);
-
// Printing support. These functions are sometimes overridden for custom
// formatting. Otherwise, it prints in the format "opcode(op1, op2, op3)".
virtual void PrintTo(BufferFormatter* f) const;
@@ -2855,7 +2846,8 @@ class StaticCallInstr : public TemplateDefinition<0> {
class LoadLocalInstr : public TemplateDefinition<0> {
public:
- explicit LoadLocalInstr(const LocalVariable& local) : local_(local) { }
+ explicit LoadLocalInstr(const LocalVariable& local)
+ : local_(local), is_last_(false) { }
DECLARE_INSTRUCTION(LoadLocal)
virtual CompileType ComputeType() const;
@@ -2871,8 +2863,12 @@ class LoadLocalInstr : public TemplateDefinition<0> {
return false;
}
+ void mark_last() { is_last_ = true; }
+ bool is_last() const { return is_last_; }
+
private:
const LocalVariable& local_;
+ bool is_last_;
DISALLOW_COPY_AND_ASSIGN(LoadLocalInstr);
};
@@ -2880,7 +2876,8 @@ class LoadLocalInstr : public TemplateDefinition<0> {
class StoreLocalInstr : public TemplateDefinition<1> {
public:
- StoreLocalInstr(const LocalVariable& local, Value* value) : local_(local) {
+ StoreLocalInstr(const LocalVariable& local, Value* value)
+ : local_(local), is_dead_(false), is_last_(false) {
SetInputAt(0, value);
}
@@ -2890,9 +2887,6 @@ class StoreLocalInstr : public TemplateDefinition<1> {
const LocalVariable& local() const { return local_; }
Value* value() const { return inputs_[0]; }
- virtual void RecordAssignedVars(BitVector* assigned_vars,
- intptr_t fixed_parameter_count);
-
virtual void PrintOperandsTo(BufferFormatter* f) const;
virtual bool CanDeoptimize() const { return false; }
@@ -2902,8 +2896,16 @@ class StoreLocalInstr : public TemplateDefinition<1> {
return false;
}
+ void mark_dead() { is_dead_ = true; }
+ bool is_dead() const { return is_dead_; }
+
+ void mark_last() { is_last_ = true; }
+ bool is_last() const { return is_last_; }
+
private:
const LocalVariable& local_;
+ bool is_dead_;
+ bool is_last_;
DISALLOW_COPY_AND_ASSIGN(StoreLocalInstr);
};

Powered by Google App Engine
This is Rietveld 408576698