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

Unified Diff: runtime/vm/intermediate_language.h

Issue 9456033: Added LoadLiteralComp, StrictCompareComp; implement InstanceCallNode. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 10 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
===================================================================
--- runtime/vm/intermediate_language.h (revision 4552)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -21,7 +21,9 @@
// | InstanceCall <cstring> <Value> ...
// | StaticCall <Function> <Value> ...
// | LoadLocal <LocalVariable>
+// | LoadLiteral <Instance>
Kevin Millikin (Google) 2012/02/24 10:53:04 Class has LoadLiteral <Value>. The grammar and th
srdjan 2012/02/24 22:16:24 LoadLiteral has been removed
// | StoreLocal <LocalVariable> <Value>
+// | StrictCompare <Token::kind> <Value> ...
Kevin Millikin (Google) 2012/02/24 10:53:04 This one has only two Value subparts, so let's wri
srdjan 2012/02/24 22:16:24 Done.
//
// <Value> ::= Temp <int>
// | Constant <Instance>
@@ -77,6 +79,24 @@
};
+class StrictCompareComp : public Computation {
+ public:
+ StrictCompareComp(Token::Kind kind, Value* left, Value* right)
+ : kind_(kind), left_(left), right_(right) {
+ ASSERT((kind_ == Token::kEQ_STRICT) || (kind_ == Token::kNE_STRICT));
+ }
+
+ virtual void Print() const;
+
+ private:
+ const Token::Kind kind_;
+ Value* left_;
+ Value* right_;
+
+ DISALLOW_COPY_AND_ASSIGN(StrictCompareComp);
+};
+
+
class StaticCallComp : public Computation {
public:
StaticCallComp(const Function& function, ZoneGrowableArray<Value*>* arguments)
@@ -94,6 +114,19 @@
};
+class LoadLiteralComp : public Computation {
+ public:
+ explicit LoadLiteralComp(Value* literal) : literal_(literal) {}
+
+ virtual void Print() const;
+
+ private:
+ const Value* literal_;
+
+ DISALLOW_COPY_AND_ASSIGN(LoadLiteralComp);
+};
+
+
class LoadLocalComp : public Computation {
public:
explicit LoadLocalComp(const LocalVariable& local) : local_(local) { }
@@ -137,7 +170,9 @@
class ConstantValue: public Value {
public:
- explicit ConstantValue(const Instance& instance) : instance_(instance) { }
+ explicit ConstantValue(const Instance& instance) : instance_(instance) {
+ ASSERT(instance.IsZoneHandle());
+ }
virtual void Print() const;

Powered by Google App Engine
This is Rietveld 408576698