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

Side by Side Diff: vm/intermediate_language.cc

Issue 10831176: Make CreateArrayComp a call by using explicit push-argument instructions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: 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/intermediate_language.h" 5 #include "vm/intermediate_language.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/dart_entry.h" 8 #include "vm/dart_entry.h"
9 #include "vm/flow_graph_builder.h" 9 #include "vm/flow_graph_builder.h"
10 #include "vm/flow_graph_compiler.h" 10 #include "vm/flow_graph_compiler.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 intptr_t AllocateObjectComp::InputCount() const { 181 intptr_t AllocateObjectComp::InputCount() const {
182 return arguments().length(); 182 return arguments().length();
183 } 183 }
184 184
185 185
186 intptr_t AllocateObjectWithBoundsCheckComp::InputCount() const { 186 intptr_t AllocateObjectWithBoundsCheckComp::InputCount() const {
187 return arguments().length(); 187 return arguments().length();
188 } 188 }
189 189
190 190
191 intptr_t CreateArrayComp::InputCount() const {
192 return ElementCount() + 1;
193 }
194
195
196 Value* CreateArrayComp::InputAt(intptr_t i) const {
197 if (i == 0) {
198 return element_type();
199 } else {
200 return ElementAt(i - 1);
201 }
202 }
203
204
205 void CreateArrayComp::SetInputAt(intptr_t i, Value* value) {
206 if (i == 0) {
207 inputs_[0] = value;
208 } else {
209 (*elements_)[i - 1] = value;
210 }
211 }
212
213
214 intptr_t BranchInstr::InputCount() const { 191 intptr_t BranchInstr::InputCount() const {
215 return 2; 192 return 2;
216 } 193 }
217 194
218 195
219 Value* BranchInstr::InputAt(intptr_t i) const { 196 Value* BranchInstr::InputAt(intptr_t i) const {
220 if (i == 0) return left(); 197 if (i == 0) return left();
221 if (i == 1) return right(); 198 if (i == 1) return right();
222 UNREACHABLE(); 199 UNREACHABLE();
223 return NULL; 200 return NULL;
(...skipping 1157 matching lines...) Expand 10 before | Expand all | Expand 10 after
1381 if (compiler->is_ssa()) { 1358 if (compiler->is_ssa()) {
1382 ASSERT(locs()->in(0).IsRegister()); 1359 ASSERT(locs()->in(0).IsRegister());
1383 __ PushRegister(locs()->in(0).reg()); 1360 __ PushRegister(locs()->in(0).reg());
1384 } 1361 }
1385 } 1362 }
1386 1363
1387 1364
1388 #undef __ 1365 #undef __
1389 1366
1390 } // namespace dart 1367 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698