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

Unified Diff: runtime/vm/intermediate_language_x64.cc

Issue 10451006: - Rename NativeLoadField/NativeStoreField to LoadVMField/StoreVMField. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
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
Index: runtime/vm/intermediate_language_x64.cc
===================================================================
--- runtime/vm/intermediate_language_x64.cc (revision 7935)
+++ runtime/vm/intermediate_language_x64.cc (working copy)
@@ -415,23 +415,31 @@
}
-LocationSummary* NativeLoadFieldComp::MakeLocationSummary() const {
- return NULL;
+LocationSummary* LoadVMFieldComp::MakeLocationSummary() const {
+ return MakeSimpleLocationSummary(1, Location::RequiresRegister());
}
-void NativeLoadFieldComp::EmitNativeCode(FlowGraphCompiler* compiler) {
- UNIMPLEMENTED();
+void LoadVMFieldComp::EmitNativeCode(FlowGraphCompiler* compiler) {
+ Register obj = locs()->in(0).reg();
+ Register result = locs()->out().reg();
+
+ __ movq(result, FieldAddress(obj, offset_in_bytes()));
}
-LocationSummary* NativeStoreFieldComp::MakeLocationSummary() const {
- return NULL;
+LocationSummary* StoreVMFieldComp::MakeLocationSummary() const {
+ return MakeSimpleLocationSummary(2, Location::SameAsFirstInput());
}
-void NativeStoreFieldComp::EmitNativeCode(FlowGraphCompiler* compiler) {
- UNIMPLEMENTED();
+void StoreVMFieldComp::EmitNativeCode(FlowGraphCompiler* compiler) {
+ Register value_reg = locs()->in(0).reg();
+ Register dest_reg = locs()->in(1).reg();
+ ASSERT(value_reg == locs()->out().reg());
+
+ __ StoreIntoObject(dest_reg, FieldAddress(dest_reg, offset_in_bytes()),
+ value_reg);
}

Powered by Google App Engine
This is Rietveld 408576698