Chromium Code Reviews| Index: runtime/vm/intermediate_language.h |
| =================================================================== |
| --- runtime/vm/intermediate_language.h (revision 5534) |
| +++ runtime/vm/intermediate_language.h (working copy) |
| @@ -43,7 +43,9 @@ |
| // | Throw <Value> |
| // | ReThrow <Value> <Value> |
| // | NativeLoadField <Value> <intptr_t> |
| -// | ExtractTypeArgumentsComp <ConstructorCallNode> <Value> |
| +// | ExtractFactoryTypeArgumentsComp <ConstructorCallNode> <Value> |
| +// | ExtractConstructorTypeArgumentsComp <ConstructorCallNode> <Value> |
| +// | ExtractConstructorInstantiatorComp <ConstructorCallNode> <Value> <Value> |
| // |
| // <Value> ::= |
| // Temp <int> |
| @@ -83,7 +85,9 @@ |
| M(Throw, ThrowComp) \ |
| M(ReThrow, ReThrowComp) \ |
| M(NativeLoadField, NativeLoadFieldComp) \ |
| - M(ExtractTypeArguments, ExtractTypeArgumentsComp) \ |
| + M(ExtractFactoryTypeArguments, ExtractFactoryTypeArgumentsComp) \ |
| + M(ExtractConstructorTypeArguments, ExtractConstructorTypeArgumentsComp) \ |
| + M(ExtractConstructorInstantiator, ExtractConstructorInstantiatorComp) \ |
| #define FORWARD_DECLARATION(ShortName, ClassName) class ClassName; |
| @@ -718,19 +722,46 @@ |
| }; |
| -class ExtractTypeArgumentsComp : public Computation { |
| +class ExtractFactoryTypeArgumentsComp : public Computation { |
| public: |
| - ExtractTypeArgumentsComp(ConstructorCallNode* ast_node, Value* instantiator) |
| + ExtractFactoryTypeArgumentsComp(ConstructorCallNode* ast_node, |
| + Value* instantiator) |
| : ast_node_(*ast_node), instantiator_(instantiator) { |
| ASSERT(instantiator_ != NULL); |
| } |
| - DECLARE_COMPUTATION(ExtractTypeArgumentsComp) |
| + DECLARE_COMPUTATION(ExtractFactoryTypeArgumentsComp) |
|
srdjan
2012/03/15 19:58:05
DEFCLARE_COMPUTATION(ExtractFactoryTypeArguments)
regis
2012/03/15 20:13:02
Done.
|
| Value* instantiator() const { return instantiator_; } |
| const AbstractTypeArguments& type_arguments() const { |
| return ast_node_.type_arguments(); |
| } |
| + const Function& factory() 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(ExtractFactoryTypeArgumentsComp); |
| +}; |
| + |
| + |
| +class ExtractConstructorTypeArgumentsComp : public Computation { |
| + public: |
| + ExtractConstructorTypeArgumentsComp(ConstructorCallNode* ast_node, |
| + Value* instantiator) |
| + : ast_node_(*ast_node), instantiator_(instantiator) { |
| + ASSERT(instantiator_ != NULL); |
| + } |
| + |
| + DECLARE_COMPUTATION(ExtractConstructorTypeArgumentsComp) |
|
regis
2012/03/15 20:13:02
Fixed this one too.
|
| + |
| + 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(); } |
| @@ -739,10 +770,41 @@ |
| const ConstructorCallNode& ast_node_; |
| Value* instantiator_; |
| - DISALLOW_COPY_AND_ASSIGN(ExtractTypeArgumentsComp); |
| + DISALLOW_COPY_AND_ASSIGN(ExtractConstructorTypeArgumentsComp); |
| }; |
| +class ExtractConstructorInstantiatorComp : public Computation { |
| + public: |
| + ExtractConstructorInstantiatorComp(ConstructorCallNode* ast_node, |
| + Value* instantiator, |
| + Value* discard_value) |
| + : ast_node_(*ast_node), |
| + instantiator_(instantiator), |
| + discard_value_(discard_value) { |
| + ASSERT(instantiator_ != NULL); |
| + } |
| + |
| + DECLARE_COMPUTATION(ExtractConstructorInstantiatorComp) |
|
srdjan
2012/03/15 19:58:05
ditto
regis
2012/03/15 20:13:02
Done.
|
| + |
| + Value* instantiator() const { return instantiator_; } |
| + Value* discard_value() const { return discard_value_; } |
| + 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_; |
| + Value* discard_value_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(ExtractConstructorInstantiatorComp); |
| +}; |
| + |
| + |
| #undef DECLARE_COMPUTATION |