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

Side by Side Diff: runtime/vm/intermediate_language_ia32.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_IA32. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32.
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 157
158 158
159 void StoreLocalComp::EmitNativeCode(FlowGraphCompiler* compiler) { 159 void StoreLocalComp::EmitNativeCode(FlowGraphCompiler* compiler) {
160 Register value = locs()->in(0).reg(); 160 Register value = locs()->in(0).reg();
161 Register result = locs()->out().reg(); 161 Register result = locs()->out().reg();
162 ASSERT(result == value); // Assert that register assignment is correct. 162 ASSERT(result == value); // Assert that register assignment is correct.
163 __ movl(Address(EBP, local().index() * kWordSize), value); 163 __ movl(Address(EBP, local().index() * kWordSize), value);
164 } 164 }
165 165
166 166
167 LocationSummary* ConstantVal::MakeLocationSummary() const { 167 LocationSummary* MaterializeComp::MakeLocationSummary() const {
168 return LocationSummary::Make(0, 168 return LocationSummary::Make(0,
169 Location::RequiresRegister(), 169 Location::RequiresRegister(),
170 LocationSummary::kNoCall); 170 LocationSummary::kNoCall);
171 } 171 }
172 172
173 173
174 void ConstantVal::EmitNativeCode(FlowGraphCompiler* compiler) { 174 void MaterializeComp::EmitNativeCode(FlowGraphCompiler* compiler) {
175 Register result = locs()->out().reg(); 175 Register result = locs()->out().reg();
176 __ LoadObject(result, value()); 176 __ LoadObject(result, constant_val()->value());
177 } 177 }
178 178
179 179
180 LocationSummary* AssertAssignableComp::MakeLocationSummary() const { 180 LocationSummary* AssertAssignableComp::MakeLocationSummary() const {
181 const intptr_t kNumInputs = 3; 181 const intptr_t kNumInputs = 3;
182 const intptr_t kNumTemps = 0; 182 const intptr_t kNumTemps = 0;
183 LocationSummary* summary = 183 LocationSummary* summary =
184 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); 184 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall);
185 summary->set_in(0, Location::RegisterLocation(EAX)); // Value. 185 summary->set_in(0, Location::RegisterLocation(EAX)); // Value.
186 summary->set_in(1, Location::RegisterLocation(ECX)); // Instantiator. 186 summary->set_in(1, Location::RegisterLocation(ECX)); // Instantiator.
(...skipping 2048 matching lines...) Expand 10 before | Expand all | Expand 10 after
2235 } 2235 }
2236 } 2236 }
2237 __ Bind(&is_ok); 2237 __ Bind(&is_ok);
2238 } 2238 }
2239 2239
2240 } // namespace dart 2240 } // namespace dart
2241 2241
2242 #undef __ 2242 #undef __
2243 2243
2244 #endif // defined TARGET_ARCH_X64 2244 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698