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

Unified Diff: vm/intermediate_language.h

Issue 10826097: Use explicit push-argument for InstanceSetter instruction. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 5 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 10115)
+++ vm/intermediate_language.h (working copy)
@@ -1059,36 +1059,38 @@
};
-// Not simply an InstanceCall because it has somewhat more complicated
-// semantics: the value operand is preserved before the call.
-class InstanceSetterComp : public TemplateComputation<2> {
+// TODO(fschneider): Make this an instance call.
+class InstanceSetterComp : public Computation {
public:
InstanceSetterComp(intptr_t token_pos,
intptr_t try_index,
const String& field_name,
- Value* receiver,
- Value* value)
+ ZoneGrowableArray<PushArgumentInstr*>* arguments)
: token_pos_(token_pos),
try_index_(try_index),
- field_name_(field_name) {
- inputs_[0] = receiver;
- inputs_[1] = value;
- }
+ field_name_(field_name),
+ arguments_(arguments) { }
- DECLARE_COMPUTATION(InstanceSetter)
+ DECLARE_CALL_COMPUTATION(InstanceSetter)
intptr_t token_pos() const { return token_pos_; }
intptr_t try_index() const { return try_index_; }
const String& field_name() const { return field_name_; }
- Value* receiver() const { return inputs_[0]; }
- Value* value() const { return inputs_[1]; }
+ intptr_t ArgumentCount() const { return arguments_->length(); }
+ PushArgumentInstr* ArgumentAt(intptr_t index) const {
+ return (*arguments_)[index];
+ }
+
virtual bool CanDeoptimize() const { return true; }
+ virtual void PrintOperandsTo(BufferFormatter* f) const;
+
private:
const intptr_t token_pos_;
const intptr_t try_index_;
const String& field_name_;
+ ZoneGrowableArray<PushArgumentInstr*>* arguments_;
DISALLOW_COPY_AND_ASSIGN(InstanceSetterComp);
};
@@ -2645,8 +2647,8 @@
public:
BranchInstr(intptr_t token_pos,
intptr_t try_index,
- Value* left,
- Value* right,
+ Value* left,
+ Value* right,
Token::Kind kind)
: InstructionWithInputs(),
token_pos_(token_pos),
« 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