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

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

Issue 10918144: Avoid allocating unnecessary result locations for some instructions. (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 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after
1048 Register result = locs()->out().reg(); 1048 Register result = locs()->out().reg();
1049 __ LoadObject(result, field()); 1049 __ LoadObject(result, field());
1050 __ movq(result, FieldAddress(result, Field::value_offset())); 1050 __ movq(result, FieldAddress(result, Field::value_offset()));
1051 } 1051 }
1052 1052
1053 1053
1054 LocationSummary* StoreStaticFieldInstr::MakeLocationSummary() const { 1054 LocationSummary* StoreStaticFieldInstr::MakeLocationSummary() const {
1055 LocationSummary* locs = new LocationSummary(1, 1, LocationSummary::kNoCall); 1055 LocationSummary* locs = new LocationSummary(1, 1, LocationSummary::kNoCall);
1056 locs->set_in(0, Location::RequiresRegister()); 1056 locs->set_in(0, Location::RequiresRegister());
1057 locs->set_temp(0, Location::RequiresRegister()); 1057 locs->set_temp(0, Location::RequiresRegister());
1058 locs->set_out(Location::SameAsFirstInput()); 1058 locs->set_out(is_used()
1059 ? Location::SameAsFirstInput()
1060 : Location::NoLocation());
1059 return locs; 1061 return locs;
1060 } 1062 }
1061 1063
1062 1064
1063 void StoreStaticFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 1065 void StoreStaticFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
1064 Register value = locs()->in(0).reg(); 1066 Register value = locs()->in(0).reg();
1065 Register temp = locs()->temp(0).reg(); 1067 Register temp = locs()->temp(0).reg();
1066 ASSERT(locs()->out().reg() == value); 1068 ASSERT(!is_used() || (locs()->out().reg() == value));
1067 1069
1068 __ LoadObject(temp, field()); 1070 __ LoadObject(temp, field());
1069 if (this->value()->NeedsStoreBuffer()) { 1071 if (this->value()->NeedsStoreBuffer()) {
1070 __ StoreIntoObject(temp, FieldAddress(temp, Field::value_offset()), value); 1072 __ StoreIntoObject(temp, FieldAddress(temp, Field::value_offset()), value);
1071 } else { 1073 } else {
1072 __ StoreIntoObjectNoBarrier( 1074 __ StoreIntoObjectNoBarrier(
1073 temp, FieldAddress(temp, Field::value_offset()), value); 1075 temp, FieldAddress(temp, Field::value_offset()), value);
1074 } 1076 }
1075 } 1077 }
1076 1078
(...skipping 1235 matching lines...) Expand 10 before | Expand all | Expand 10 after
2312 __ j(ABOVE_EQUAL, deopt); 2314 __ j(ABOVE_EQUAL, deopt);
2313 } 2315 }
2314 } 2316 }
2315 2317
2316 2318
2317 } // namespace dart 2319 } // namespace dart
2318 2320
2319 #undef __ 2321 #undef __
2320 2322
2321 #endif // defined TARGET_ARCH_X64 2323 #endif // defined TARGET_ARCH_X64
OLDNEW
« runtime/vm/intermediate_language_ia32.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