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

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

Issue 10806047: Fix crash during parallel moves. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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
« no previous file with comments | « runtime/vm/locations.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/locations.h" 5 #include "vm/locations.h"
6 6
7 #include "vm/il_printer.h" 7 #include "vm/il_printer.h"
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 #include "vm/flow_graph_compiler.h" 9 #include "vm/flow_graph_compiler.h"
10 10
11 namespace dart { 11 namespace dart {
12 12
13 LocationSummary::LocationSummary(intptr_t input_count,
14 intptr_t temp_count,
15 ContainsCall call)
16 : input_locations_(input_count),
17 temp_locations_(temp_count),
18 output_location_(),
19 is_call_(call == kCall) {
20 for (intptr_t i = 0; i < input_count; i++) {
21 input_locations_.Add(Location());
22 }
23 for (intptr_t i = 0; i < temp_count; i++) {
24 temp_locations_.Add(Location());
25 }
26 }
27
28
13 LocationSummary* LocationSummary::Make(intptr_t input_count, 29 LocationSummary* LocationSummary::Make(intptr_t input_count,
14 Location out, 30 Location out,
15 ContainsCall contains_call) { 31 ContainsCall contains_call) {
16 LocationSummary* summary = new LocationSummary(input_count, 32 LocationSummary* summary = new LocationSummary(input_count,
17 0, 33 0,
18 contains_call); 34 contains_call);
19 for (intptr_t i = 0; i < input_count; i++) { 35 for (intptr_t i = 0; i < input_count; i++) {
20 summary->set_in(i, Location::RequiresRegister()); 36 summary->set_in(i, Location::RequiresRegister());
21 } 37 }
22 summary->set_out(out); 38 summary->set_out(out);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 if (!out().IsInvalid()) { 81 if (!out().IsInvalid()) {
66 f->Print(" => "); 82 f->Print(" => ");
67 f->Print("%s", out().Name()); 83 f->Print("%s", out().Name());
68 } 84 }
69 85
70 if (is_call()) f->Print(" C"); 86 if (is_call()) f->Print(" C");
71 } 87 }
72 88
73 } // namespace dart 89 } // namespace dart
74 90
OLDNEW
« no previous file with comments | « runtime/vm/locations.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698