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

Unified Diff: runtime/vm/intermediate_language.h

Issue 9726011: Implement StaticGetter and StaticSetter in new compiler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 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 5662)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -16,39 +16,6 @@
class FlowGraphVisitor;
class LocalVariable;
-// Computations and values.
-//
-// <Computation> ::=
-// <Value>
-// | AssertAssignable <Value> <AbstractType>
-// | CurrentContext
-// | ClosureCall <ClosureCallNode> <Value> <Value> ...
-// | InstanceCall <String> <Value> ...
-// | StaticCall <StaticCallNode> <Value> ...
-// | LoadLocal <LocalVariable>
-// | StoreLocal <LocalVariable> <Value>
-// | StrictCompare <Token::kind> <Value> <Value>
-// | NativeCall <NativeBodyNode>
-// | StoreIndexed <Value> <Value> <Value>
-// | InstanceSetter <String> <Value> <Value>
-// | LoadInstanceField <LoadInstanceFieldNode> <Value>
-// | StoreInstanceField <StoreInstanceFieldNode> <Value> <Value>
-// | LoadStaticField <Field>
-// | StoreStaticField <Field> <Value>
-// | BooleanNegate <Value>
-// | InstanceOf <Value> <Type>
-// | CreateArray <ArrayNode> <Value> ...
-// | CreateClosure <ClosureNode>
-// | AllocateObject <ConstructorCallNode>
-// | NativeLoadField <Value> <intptr_t>
-// | ExtractFactoryTypeArgumentsComp <ConstructorCallNode> <Value>
-// | ExtractConstructorTypeArgumentsComp <ConstructorCallNode> <Value>
-// | ExtractConstructorInstantiatorComp <ConstructorCallNode> <Value> <Value>
-//
-// <Value> ::=
-// Temp <int>
-// | Constant <Instance>
-
// M is a two argument macro. It is applied to each concrete value's
// typename and classname.
#define FOR_EACH_VALUE(M) \
@@ -71,6 +38,7 @@
M(NativeCall, NativeCallComp) \
M(StoreIndexed, StoreIndexedComp) \
M(InstanceSetter, InstanceSetterComp) \
+ M(StaticSetter, StaticSetterComp) \
M(LoadInstanceField, LoadInstanceFieldComp) \
M(StoreInstanceField, StoreInstanceFieldComp) \
M(LoadStaticField, LoadStaticFieldComp) \
@@ -535,6 +503,32 @@
};
+// Not simply a StaticCall because it has somewhat more complicated
+// semantics: the value operand is preserved before the call.
+class StaticSetterComp : public Computation {
+ public:
+ StaticSetterComp(intptr_t token_index,
+ const Function& setter_function,
+ Value* value)
+ : token_index_(token_index),
+ setter_function_(setter_function),
+ value_(value) { }
+
+ DECLARE_COMPUTATION(StaticSetter)
+
+ intptr_t token_index() const { return token_index_; }
+ const Function& setter_function() const { return setter_function_; }
+ Value* value() const { return value_; }
+
+ private:
+ const intptr_t token_index_;
+ const Function& setter_function_;
+ Value* const value_;
+
+ DISALLOW_COPY_AND_ASSIGN(StaticSetterComp);
+};
+
+
// Note overrideable, built-in: value? false : true.
class BooleanNegateComp : public Computation {
public:
« 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