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

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

Issue 10829451: Make Value not a subclass of Computation. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: rebased Created 8 years, 4 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 166
167 167
168 void StoreLocalComp::EmitNativeCode(FlowGraphCompiler* compiler) { 168 void StoreLocalComp::EmitNativeCode(FlowGraphCompiler* compiler) {
169 Register value = locs()->in(0).reg(); 169 Register value = locs()->in(0).reg();
170 Register result = locs()->out().reg(); 170 Register result = locs()->out().reg();
171 ASSERT(result == value); // Assert that register assignment is correct. 171 ASSERT(result == value); // Assert that register assignment is correct.
172 __ movq(Address(RBP, local().index() * kWordSize), value); 172 __ movq(Address(RBP, local().index() * kWordSize), value);
173 } 173 }
174 174
175 175
176 LocationSummary* ConstantVal::MakeLocationSummary() const { 176 LocationSummary* MaterializeComp::MakeLocationSummary() const {
177 return LocationSummary::Make(0, 177 return LocationSummary::Make(0,
178 Location::RequiresRegister(), 178 Location::RequiresRegister(),
179 LocationSummary::kNoCall); 179 LocationSummary::kNoCall);
180 } 180 }
181 181
182 182
183 void ConstantVal::EmitNativeCode(FlowGraphCompiler* compiler) { 183 void MaterializeComp::EmitNativeCode(FlowGraphCompiler* compiler) {
184 Register result = locs()->out().reg(); 184 Register result = locs()->out().reg();
185 __ LoadObject(result, value()); 185 __ LoadObject(result, constant_val()->value());
186 } 186 }
187 187
188 188
189 LocationSummary* AssertAssignableComp::MakeLocationSummary() const { 189 LocationSummary* AssertAssignableComp::MakeLocationSummary() const {
190 const intptr_t kNumInputs = 3; 190 const intptr_t kNumInputs = 3;
191 const intptr_t kNumTemps = 0; 191 const intptr_t kNumTemps = 0;
192 LocationSummary* summary = 192 LocationSummary* summary =
193 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); 193 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall);
194 summary->set_in(0, Location::RegisterLocation(RAX)); // Value. 194 summary->set_in(0, Location::RegisterLocation(RAX)); // Value.
195 summary->set_in(1, Location::RegisterLocation(RCX)); // Instantiator. 195 summary->set_in(1, Location::RegisterLocation(RCX)); // Instantiator.
(...skipping 2052 matching lines...) Expand 10 before | Expand all | Expand 10 after
2248 } 2248 }
2249 } 2249 }
2250 __ Bind(&is_ok); 2250 __ Bind(&is_ok);
2251 } 2251 }
2252 2252
2253 } // namespace dart 2253 } // namespace dart
2254 2254
2255 #undef __ 2255 #undef __
2256 2256
2257 #endif // defined TARGET_ARCH_X64 2257 #endif // defined TARGET_ARCH_X64
OLDNEW
« runtime/vm/intermediate_language.h ('K') | « runtime/vm/intermediate_language_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698