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

Unified Diff: vm/intermediate_language.h

Issue 10409043: Make saving and restoring of the context around closure calls explicit. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 7 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 | « vm/il_printer.cc ('k') | vm/intermediate_language.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/intermediate_language.h
===================================================================
--- vm/intermediate_language.h (revision 7782)
+++ vm/intermediate_language.h (working copy)
@@ -364,14 +364,8 @@
public:
ClosureCallComp(ClosureCallNode* node,
intptr_t try_index,
- Value* context,
ZoneGrowableArray<Value*>* arguments)
- : ast_node_(*node),
- try_index_(try_index),
- context_(context),
- arguments_(arguments) {
- ASSERT(context->IsUse());
- }
+ : ast_node_(*node), try_index_(try_index), arguments_(arguments) { }
DECLARE_COMPUTATION(ClosureCall)
@@ -379,21 +373,17 @@
intptr_t token_index() const { return ast_node_.token_index(); }
intptr_t try_index() const { return try_index_; }
- Value* context() const { return context_; }
intptr_t ArgumentCount() const { return arguments_->length(); }
Value* ArgumentAt(intptr_t index) const { return (*arguments_)[index]; }
virtual intptr_t InputCount() const;
- virtual Value* InputAt(intptr_t i) const {
- return i == 0 ? context() : ArgumentAt(i - 1);
- }
+ virtual Value* InputAt(intptr_t i) const { return ArgumentAt(i); }
virtual void PrintOperandsTo(BufferFormatter* f) const;
private:
const ClosureCallNode& ast_node_;
const intptr_t try_index_;
- Value* context_;
ZoneGrowableArray<Value*>* arguments_;
DISALLOW_COPY_AND_ASSIGN(ClosureCallComp);
« no previous file with comments | « vm/il_printer.cc ('k') | vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698