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

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

Issue 10964042: Fix for off-by-one error in assertion for r12715. (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
« no previous file with comments | « no previous file | 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/globals.h" // Needed here to get TARGET_ARCH_XXX. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX.
6 6
7 #include "vm/flow_graph_compiler.h" 7 #include "vm/flow_graph_compiler.h"
8 8
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/debugger.h" 10 #include "vm/debugger.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 current->deopt_id(), 102 current->deopt_id(),
103 slot_ix++); 103 slot_ix++);
104 104
105 // The values of outgoing arguments can be changed from the inlined call so 105 // The values of outgoing arguments can be changed from the inlined call so
106 // we must read them from the inner environment. 106 // we must read them from the inner environment.
107 for (intptr_t i = inner->fixed_parameter_count() - 1; i >= 0; i--) { 107 for (intptr_t i = inner->fixed_parameter_count() - 1; i >= 0; i--) {
108 builder.AddCopy(inner->LocationAt(i), *inner->ValueAt(i), slot_ix++); 108 builder.AddCopy(inner->LocationAt(i), *inner->ValueAt(i), slot_ix++);
109 } 109 }
110 110
111 // Set the locals, not including the outgoing arguments. 111 // Set the locals, not including the outgoing arguments.
112 ASSERT(current->Length() > inner->fixed_parameter_count()); 112 ASSERT(current->Length() >= inner->fixed_parameter_count());
113 for (intptr_t i = current->Length() - inner->fixed_parameter_count() - 1; 113 for (intptr_t i = current->Length() - inner->fixed_parameter_count() - 1;
114 i >= current->fixed_parameter_count(); 114 i >= current->fixed_parameter_count();
115 i--) { 115 i--) {
116 builder.AddCopy(current->LocationAt(i), *current->ValueAt(i), slot_ix++); 116 builder.AddCopy(current->LocationAt(i), *current->ValueAt(i), slot_ix++);
117 } 117 }
118 118
119 // PC marker and caller FP. 119 // PC marker and caller FP.
120 builder.AddPcMarker(current->function(), slot_ix++); 120 builder.AddPcMarker(current->function(), slot_ix++);
121 builder.AddCallerFp(slot_ix++); 121 builder.AddCallerFp(slot_ix++);
122 122
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 case ABOVE: return unsigned_left > unsigned_right; 899 case ABOVE: return unsigned_left > unsigned_right;
900 case ABOVE_EQUAL: return unsigned_left >= unsigned_right; 900 case ABOVE_EQUAL: return unsigned_left >= unsigned_right;
901 default: 901 default:
902 UNIMPLEMENTED(); 902 UNIMPLEMENTED();
903 return false; 903 return false;
904 } 904 }
905 } 905 }
906 906
907 907
908 } // namespace dart 908 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698