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

Unified Diff: runtime/vm/intermediate_language.h

Issue 10079018: Introduce an equality compare node. Equality will need to be handled specially soon (not just an in… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.h
===================================================================
--- runtime/vm/intermediate_language.h (revision 6532)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -36,6 +36,7 @@
M(LoadLocal, LoadLocalComp) \
M(StoreLocal, StoreLocalComp) \
M(StrictCompare, StrictCompareComp) \
+ M(EqualityCompare, EqualityCompareComp) \
M(NativeCall, NativeCallComp) \
M(StoreIndexed, StoreIndexedComp) \
M(InstanceSetter, InstanceSetterComp) \
@@ -283,6 +284,41 @@
};
+class EqualityCompareComp : public Computation {
+ public:
+ EqualityCompareComp(intptr_t node_id,
+ intptr_t token_index,
+ intptr_t try_index,
+ Value* left,
+ Value* right)
+ : node_id_(node_id),
+ token_index_(token_index),
+ try_index_(try_index),
+ left_(left),
+ right_(right) {
+ ASSERT(left_ != NULL);
+ ASSERT(right_ != NULL);
+ }
+
+ DECLARE_COMPUTATION(EqualityCompareComp)
+
+ intptr_t node_id() const { return node_id_; }
+ intptr_t token_index() const { return token_index_; }
+ intptr_t try_index() const { return try_index_; }
+ Value* left() const { return left_; }
+ Value* right() const { return right_; }
+
+ private:
+ const intptr_t node_id_;
+ const intptr_t token_index_;
+ const intptr_t try_index_;
+ Value* left_;
+ Value* right_;
+
+ DISALLOW_COPY_AND_ASSIGN(EqualityCompareComp);
+};
+
+
class StaticCallComp : public Computation {
public:
StaticCallComp(intptr_t token_index,
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698