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

Unified Diff: runtime/vm/intermediate_language.h

Issue 189513003: Add alias disambiguation for VM fields. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 9 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') | no next file » | 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 33416)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -4017,8 +4017,7 @@
cls_(cls),
arguments_(arguments),
identity_(kUnknown),
- closure_function_(Function::ZoneHandle()),
- context_field_(Field::ZoneHandle()) {
+ closure_function_(Function::ZoneHandle()) {
// Either no arguments or one type-argument and one instantiator.
ASSERT(arguments->is_empty() || (arguments->length() == 1));
}
@@ -4039,11 +4038,6 @@
closure_function_ ^= function.raw();
}
- const Field& context_field() const { return context_field_; }
- void set_context_field(const Field& field) {
- context_field_ ^= field.raw();
- }
-
virtual void PrintOperandsTo(BufferFormatter* f) const;
virtual bool CanDeoptimize() const { return false; }
@@ -4070,7 +4064,6 @@
ZoneGrowableArray<PushArgumentInstr*>* const arguments_;
Identity identity_;
Function& closure_function_;
- Field& context_field_;
DISALLOW_COPY_AND_ASSIGN(AllocateObjectInstr);
};
@@ -4082,7 +4075,7 @@
class MaterializeObjectInstr : public Definition {
srdjan 2014/03/07 17:38:37 Please rename 'fields' to fields_or_offsets'. Such
Florian Schneider 2014/03/10 09:46:48 Done. Renamed to 'slots' since I prefer a concise
public:
MaterializeObjectInstr(const Class& cls,
- const ZoneGrowableArray<const Field*>& fields,
+ const ZoneGrowableArray<const Object*>& fields,
ZoneGrowableArray<Value*>* values)
: cls_(cls), fields_(fields), values_(values), locations_(NULL) {
ASSERT(fields_.length() == values_->length());
@@ -4094,7 +4087,9 @@
const Class& cls() const { return cls_; }
intptr_t FieldOffsetAt(intptr_t i) const {
- return fields_[i]->Offset();
+ return fields_[i]->IsField()
+ ? Field::Cast(*fields_[i]).Offset()
+ : Smi::Cast(*fields_[i]).Value();
}
const Location& LocationAt(intptr_t i) {
return locations_[i];
@@ -4135,7 +4130,7 @@
}
const Class& cls_;
- const ZoneGrowableArray<const Field*>& fields_;
+ const ZoneGrowableArray<const Object*>& fields_;
ZoneGrowableArray<Value*>* values_;
Location* locations_;
« no previous file with comments | « runtime/vm/il_printer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698