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

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: lazyly inject extractors as getters into class Created 7 years, 11 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/il_printer.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.h
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index 9ef1368179d8d2769d4b58de2029e2652c8c71ec..9f66f5b7aa127ede8243c236f0ecfc7bd893ef3d 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -3027,16 +3027,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 {
@@ -3052,8 +3054,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);
};
« no previous file with comments | « runtime/vm/il_printer.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698