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

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

Issue 10894034: Make constants computations instead of values. (Closed) Base URL: https://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_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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 153
154 154
155 void StoreLocalComp::EmitNativeCode(FlowGraphCompiler* compiler) { 155 void StoreLocalComp::EmitNativeCode(FlowGraphCompiler* compiler) {
156 Register value = locs()->in(0).reg(); 156 Register value = locs()->in(0).reg();
157 Register result = locs()->out().reg(); 157 Register result = locs()->out().reg();
158 ASSERT(result == value); // Assert that register assignment is correct. 158 ASSERT(result == value); // Assert that register assignment is correct.
159 __ movl(Address(EBP, local().index() * kWordSize), value); 159 __ movl(Address(EBP, local().index() * kWordSize), value);
160 } 160 }
161 161
162 162
163 LocationSummary* MaterializeComp::MakeLocationSummary() const { 163 LocationSummary* ConstantComp::MakeLocationSummary() const {
164 return LocationSummary::Make(0, 164 return LocationSummary::Make(0,
165 Location::RequiresRegister(), 165 Location::RequiresRegister(),
166 LocationSummary::kNoCall); 166 LocationSummary::kNoCall);
167 } 167 }
168 168
169 169
170 void MaterializeComp::EmitNativeCode(FlowGraphCompiler* compiler) { 170 void ConstantComp::EmitNativeCode(FlowGraphCompiler* compiler) {
171 Register result = locs()->out().reg(); 171 Register result = locs()->out().reg();
172 __ LoadObject(result, constant_val()->value()); 172 __ LoadObject(result, value());
173 } 173 }
174 174
175 175
176 LocationSummary* AssertAssignableComp::MakeLocationSummary() const { 176 LocationSummary* AssertAssignableComp::MakeLocationSummary() const {
177 const intptr_t kNumInputs = 3; 177 const intptr_t kNumInputs = 3;
178 const intptr_t kNumTemps = 0; 178 const intptr_t kNumTemps = 0;
179 LocationSummary* summary = 179 LocationSummary* summary =
180 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); 180 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall);
181 summary->set_in(0, Location::RegisterLocation(EAX)); // Value. 181 summary->set_in(0, Location::RegisterLocation(EAX)); // Value.
182 summary->set_in(1, Location::RegisterLocation(ECX)); // Instantiator. 182 summary->set_in(1, Location::RegisterLocation(ECX)); // Instantiator.
(...skipping 2248 matching lines...) Expand 10 before | Expand all | Expand 10 after
2431 __ testl(value, Immediate(kSmiTagMask)); 2431 __ testl(value, Immediate(kSmiTagMask));
2432 __ j(NOT_ZERO, deopt); 2432 __ j(NOT_ZERO, deopt);
2433 } 2433 }
2434 2434
2435 2435
2436 } // namespace dart 2436 } // namespace dart
2437 2437
2438 #undef __ 2438 #undef __
2439 2439
2440 #endif // defined TARGET_ARCH_X64 2440 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698