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

Unified Diff: runtime/vm/intermediate_language.h

Issue 14106013: Further improve type optimization reusing the type argument vector of the (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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_optimizer.cc ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | 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 22154)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -3621,9 +3621,11 @@
public:
InstantiateTypeArgumentsInstr(intptr_t token_pos,
const AbstractTypeArguments& type_arguments,
+ const Class& instantiator_class,
Value* instantiator)
: token_pos_(token_pos),
- type_arguments_(type_arguments) {
+ type_arguments_(type_arguments),
+ instantiator_class_(instantiator_class) {
ASSERT(type_arguments.IsZoneHandle());
SetInputAt(0, instantiator);
}
@@ -3634,6 +3636,7 @@
const AbstractTypeArguments& type_arguments() const {
return type_arguments_;
}
+ const Class& instantiator_class() const { return instantiator_class_; }
intptr_t token_pos() const { return token_pos_; }
virtual void PrintOperandsTo(BufferFormatter* f) const;
@@ -3645,6 +3648,7 @@
private:
const intptr_t token_pos_;
const AbstractTypeArguments& type_arguments_;
+ const Class& instantiator_class_;
DISALLOW_COPY_AND_ASSIGN(InstantiateTypeArgumentsInstr);
};
@@ -3655,9 +3659,11 @@
ExtractConstructorTypeArgumentsInstr(
intptr_t token_pos,
const AbstractTypeArguments& type_arguments,
+ const Class& instantiator_class,
Value* instantiator)
: token_pos_(token_pos),
- type_arguments_(type_arguments) {
+ type_arguments_(type_arguments),
+ instantiator_class_(instantiator_class) {
SetInputAt(0, instantiator);
}
@@ -3667,6 +3673,7 @@
const AbstractTypeArguments& type_arguments() const {
return type_arguments_;
}
+ const Class& instantiator_class() const { return instantiator_class_; }
intptr_t token_pos() const { return token_pos_; }
virtual void PrintOperandsTo(BufferFormatter* f) const;
@@ -3678,6 +3685,7 @@
private:
const intptr_t token_pos_;
const AbstractTypeArguments& type_arguments_;
+ const Class& instantiator_class_;
DISALLOW_COPY_AND_ASSIGN(ExtractConstructorTypeArgumentsInstr);
};
@@ -3686,8 +3694,9 @@
class ExtractConstructorInstantiatorInstr : public TemplateDefinition<1> {
public:
ExtractConstructorInstantiatorInstr(ConstructorCallNode* ast_node,
+ const Class& instantiator_class,
Value* instantiator)
- : ast_node_(*ast_node) {
+ : ast_node_(*ast_node), instantiator_class_(instantiator_class) {
SetInputAt(0, instantiator);
}
@@ -3698,6 +3707,7 @@
return ast_node_.type_arguments();
}
const Function& constructor() const { return ast_node_.constructor(); }
+ const Class& instantiator_class() const { return instantiator_class_; }
intptr_t token_pos() const { return ast_node_.token_pos(); }
virtual bool CanDeoptimize() const { return false; }
@@ -3706,6 +3716,7 @@
private:
const ConstructorCallNode& ast_node_;
+ const Class& instantiator_class_;
DISALLOW_COPY_AND_ASSIGN(ExtractConstructorInstantiatorInstr);
};
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698