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

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

Issue 10960053: Remove caller arguments from nested deoptimization environments. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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 | runtime/vm/intermediate_language.cc » ('j') | 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 builder.AddReturnAddressAfter(current->function(), 101 builder.AddReturnAddressAfter(current->function(),
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, note that outgoing arguments are not in the environment.
112 ASSERT(current->Length() >= inner->fixed_parameter_count()); 112 for (intptr_t i = current->Length() - 1;
113 for (intptr_t i = current->Length() - inner->fixed_parameter_count() - 1;
114 i >= current->fixed_parameter_count(); 113 i >= current->fixed_parameter_count();
115 i--) { 114 i--) {
116 builder.AddCopy(current->LocationAt(i), *current->ValueAt(i), slot_ix++); 115 builder.AddCopy(current->LocationAt(i), *current->ValueAt(i), slot_ix++);
117 } 116 }
118 117
119 // PC marker and caller FP. 118 // PC marker and caller FP.
120 builder.AddPcMarker(current->function(), slot_ix++); 119 builder.AddPcMarker(current->function(), slot_ix++);
121 builder.AddCallerFp(slot_ix++); 120 builder.AddCallerFp(slot_ix++);
122 121
123 // Iterate on the outer environment. 122 // Iterate on the outer environment.
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 case ABOVE: return unsigned_left > unsigned_right; 898 case ABOVE: return unsigned_left > unsigned_right;
900 case ABOVE_EQUAL: return unsigned_left >= unsigned_right; 899 case ABOVE_EQUAL: return unsigned_left >= unsigned_right;
901 default: 900 default:
902 UNIMPLEMENTED(); 901 UNIMPLEMENTED();
903 return false; 902 return false;
904 } 903 }
905 } 904 }
906 905
907 906
908 } // namespace dart 907 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698