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

Side by Side Diff: runtime/vm/intermediate_language_x64.cc

Issue 10933046: Cleanup: Replace LoadInstanceFieldInstr with LoadVMFieldInstr. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 const Object& constant = locs()->in(2).constant(); 959 const Object& constant = locs()->in(2).constant();
960 __ StoreObject(field_address, constant); 960 __ StoreObject(field_address, constant);
961 } else { 961 } else {
962 Register value = locs()->in(2).reg(); 962 Register value = locs()->in(2).reg();
963 __ StoreIntoObjectNoBarrier(array, field_address, value); 963 __ StoreIntoObjectNoBarrier(array, field_address, value);
964 } 964 }
965 } 965 }
966 } 966 }
967 967
968 968
969 LocationSummary* LoadInstanceFieldInstr::MakeLocationSummary() const {
970 // TODO(fschneider): For this instruction the input register may be
971 // reused for the result (but is not required to) because the input
972 // is not used after the result is defined. We should consider adding
973 // this information to the input policy.
974 return LocationSummary::Make(1,
975 Location::RequiresRegister(),
976 LocationSummary::kNoCall);
977 }
978
979
980 void LoadInstanceFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
981 Register instance_reg = locs()->in(0).reg();
982 Register result_reg = locs()->out().reg();
983 __ movq(result_reg, FieldAddress(instance_reg, field().Offset()));
984 }
985
986
987 LocationSummary* StoreInstanceFieldInstr::MakeLocationSummary() const { 969 LocationSummary* StoreInstanceFieldInstr::MakeLocationSummary() const {
988 const intptr_t kNumInputs = 2; 970 const intptr_t kNumInputs = 2;
989 const intptr_t num_temps = 0; 971 const intptr_t num_temps = 0;
990 LocationSummary* summary = 972 LocationSummary* summary =
991 new LocationSummary(kNumInputs, num_temps, LocationSummary::kNoCall); 973 new LocationSummary(kNumInputs, num_temps, LocationSummary::kNoCall);
992 summary->set_in(0, Location::RequiresRegister()); 974 summary->set_in(0, Location::RequiresRegister());
993 summary->set_in(1, 975 summary->set_in(1,
994 value()->NeedsStoreBuffer() ? Location::WritableRegister() 976 value()->NeedsStoreBuffer() ? Location::WritableRegister()
995 : Location::RequiresRegister()); 977 : Location::RequiresRegister());
996 return summary; 978 return summary;
(...skipping 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after
2305 __ j(ABOVE_EQUAL, deopt); 2287 __ j(ABOVE_EQUAL, deopt);
2306 } 2288 }
2307 } 2289 }
2308 2290
2309 2291
2310 } // namespace dart 2292 } // namespace dart
2311 2293
2312 #undef __ 2294 #undef __
2313 2295
2314 #endif // defined TARGET_ARCH_X64 2296 #endif // defined TARGET_ARCH_X64
OLDNEW
« runtime/vm/flow_graph_builder.cc ('K') | « runtime/vm/intermediate_language_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698