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

Unified Diff: runtime/vm/intermediate_language.h

Issue 9700003: Implement more of allocation code using type arguments. Type argument extraction for non-factories … (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 5478)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -40,6 +40,8 @@
// | CreateArray <ArrayNode> <Value> ...
// | CreateClosure <ClosureNode>
// | AllocateObject <ConstructorCallNode>
+// | NativeLoadField <Value> <intptr_t>
+// | ExtractTypeArgumentsComp <ConstructorCallNode> <Value>
//
// <Value> ::=
// Temp <int>
@@ -76,6 +78,8 @@
M(CreateArray, CreateArrayComp) \
M(CreateClosure, CreateClosureComp) \
M(AllocateObject, AllocateObjectComp) \
+ M(NativeLoadField, NativeLoadFieldComp) \
+ M(ExtractTypeArguments, ExtractTypeArgumentsComp) \
#define FORWARD_DECLARATION(ShortName, ClassName) class ClassName;
@@ -635,6 +639,51 @@
};
+class NativeLoadFieldComp : public Computation {
+ public:
+ NativeLoadFieldComp(Value* value, intptr_t offset_in_bytes)
+ : value_(value), offset_in_bytes_(offset_in_bytes) {
+ ASSERT(value != NULL);
+ }
+
+ DECLARE_COMPUTATION(NativeLoadFieldComp)
+
+ Value* value() const { return value_; }
+ intptr_t offset_in_bytes() const { return offset_in_bytes_; }
+
+ private:
+ Value* value_;
+ intptr_t offset_in_bytes_;
+
+ DISALLOW_COPY_AND_ASSIGN(NativeLoadFieldComp);
+};
+
+
+class ExtractTypeArgumentsComp : public Computation {
+ public:
+ ExtractTypeArgumentsComp(ConstructorCallNode* ast_node, Value* instantiator)
+ : ast_node_(*ast_node), instantiator_(instantiator) {
+ ASSERT(instantiator_ != NULL);
+ }
+
+ DECLARE_COMPUTATION(ExtractTypeArgumentsComp)
+
+ Value* instantiator() const { return instantiator_; }
+ const AbstractTypeArguments& type_arguments() const {
+ return ast_node_.type_arguments();
+ }
+ const Function& constructor() const { return ast_node_.constructor(); }
+ intptr_t node_id() const { return ast_node_.id(); }
+ intptr_t token_index() const { return ast_node_.token_index(); }
+
+ private:
+ const ConstructorCallNode& ast_node_;
+ Value* instantiator_;
+
+ DISALLOW_COPY_AND_ASSIGN(ExtractTypeArgumentsComp);
+};
+
+
#undef DECLARE_COMPUTATION
« 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