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

Unified Diff: runtime/vm/intermediate_language.h

Issue 11642003: Create and cache method extraction stub in the ICData. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: ready for review. Created 8 years 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
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index dfe08ee185f248c8d61f23396314faa1b6750282..121f11bdb3d596145e98cba39208e2ba1b75a7d3 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -3044,16 +3044,18 @@ class CreateArrayInstr : public TemplateDefinition<1> {
class CreateClosureInstr : public TemplateDefinition<0> {
public:
- CreateClosureInstr(ClosureNode* node,
- ZoneGrowableArray<PushArgumentInstr*>* arguments)
- : ast_node_(*node),
- arguments_(arguments) { }
+ CreateClosureInstr(const Function& function,
+ ZoneGrowableArray<PushArgumentInstr*>* arguments,
+ intptr_t token_pos)
+ : function_(function),
+ arguments_(arguments),
+ token_pos_(token_pos) { }
DECLARE_INSTRUCTION(CreateClosure)
virtual RawAbstractType* CompileType() const;
- intptr_t token_pos() const { return ast_node_.token_pos(); }
- const Function& function() const { return ast_node_.function(); }
+ intptr_t token_pos() const { return token_pos_; }
+ const Function& function() const { return function_; }
virtual intptr_t ArgumentCount() const { return arguments_->length(); }
PushArgumentInstr* ArgumentAt(intptr_t index) const {
@@ -3069,8 +3071,9 @@ class CreateClosureInstr : public TemplateDefinition<0> {
virtual intptr_t ResultCid() const { return kDynamicCid; }
private:
- const ClosureNode& ast_node_;
+ const Function& function_;
ZoneGrowableArray<PushArgumentInstr*>* arguments_;
+ intptr_t token_pos_;
DISALLOW_COPY_AND_ASSIGN(CreateClosureInstr);
};

Powered by Google App Engine
This is Rietveld 408576698