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

Unified Diff: runtime/vm/intermediate_language.h

Issue 304703002: Split GuardField into GuardFieldType and GuardFieldLength instructions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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 bc2b3cfdbf0ce0d6457cb1245cf6f3e12f60e62b..e10c9e6efada5b2bea63c1ad7505f205dc422592 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -747,7 +747,8 @@ class EmbeddedArray<T, 0> {
M(StringInterpolate) \
M(InvokeMathCFunction) \
M(MergedMath) \
- M(GuardField) \
+ M(GuardFieldClass) \
+ M(GuardFieldLength) \
M(IfThenElse) \
M(BinaryFloat32x4Op) \
M(Simd32x4Shuffle) \
@@ -3815,23 +3816,18 @@ class GuardFieldInstr : public TemplateInstruction<1> {
const Field& field() const { return field_; }
- DECLARE_INSTRUCTION(GuardField)
-
virtual intptr_t ArgumentCount() const { return 0; }
virtual bool CanDeoptimize() const { return true; }
- virtual Instruction* Canonicalize(FlowGraph* flow_graph);
-
- virtual void PrintOperandsTo(BufferFormatter* f) const;
-
virtual bool AllowsCSE() const { return true; }
virtual EffectSet Effects() const { return EffectSet::None(); }
virtual EffectSet Dependencies() const { return EffectSet::None(); }
- virtual bool AttributesEqual(Instruction* other) const;
virtual bool MayThrow() const { return false; }
+ virtual void PrintOperandsTo(BufferFormatter* f) const;
+
private:
const Field& field_;
@@ -3839,6 +3835,42 @@ class GuardFieldInstr : public TemplateInstruction<1> {
};
+class GuardFieldClassInstr : public GuardFieldInstr {
+ public:
+ GuardFieldClassInstr(Value* value,
+ const Field& field,
+ intptr_t deopt_id)
+ : GuardFieldInstr(value, field, deopt_id) { }
+
+ DECLARE_INSTRUCTION(GuardFieldClass)
+
+ virtual Instruction* Canonicalize(FlowGraph* flow_graph);
+
+ virtual bool AttributesEqual(Instruction* other) const;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(GuardFieldClassInstr);
+};
+
+
+class GuardFieldLengthInstr : public GuardFieldInstr {
+ public:
+ GuardFieldLengthInstr(Value* value,
+ const Field& field,
+ intptr_t deopt_id)
+ : GuardFieldInstr(value, field, deopt_id) { }
+
+ DECLARE_INSTRUCTION(GuardFieldLength)
+
+ virtual Instruction* Canonicalize(FlowGraph* flow_graph);
+
+ virtual bool AttributesEqual(Instruction* other) const;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(GuardFieldLengthInstr);
+};
+
+
class LoadStaticFieldInstr : public TemplateDefinition<1> {
public:
explicit LoadStaticFieldInstr(Value* field_value) {

Powered by Google App Engine
This is Rietveld 408576698