OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 | 137 |
138 HarvestTodo(root_old_node); | 138 HarvestTodo(root_old_node); |
139 | 139 |
140 // Collect shared infos for functions whose code need to be patched. | 140 // Collect shared infos for functions whose code need to be patched. |
141 var replaced_function_infos = new Array(); | 141 var replaced_function_infos = new Array(); |
142 for (var i = 0; i < replace_code_list.length; i++) { | 142 for (var i = 0; i < replace_code_list.length; i++) { |
143 var live_shared_function_infos = | 143 var live_shared_function_infos = |
144 replace_code_list[i].live_shared_function_infos; | 144 replace_code_list[i].live_shared_function_infos; |
145 | 145 |
146 if (live_shared_function_infos) { | 146 if (live_shared_function_infos) { |
147 for (var i = 0; i < live_shared_function_infos.length; i++) { | 147 for (var j = 0; j < live_shared_function_infos.length; j++) { |
148 replaced_function_infos.push(live_shared_function_infos[i]); | 148 replaced_function_infos.push(live_shared_function_infos[j]); |
149 } | 149 } |
150 } | 150 } |
151 } | 151 } |
152 | 152 |
153 // We haven't changed anything before this line yet. | 153 // We haven't changed anything before this line yet. |
154 // Committing all changes. | 154 // Committing all changes. |
155 | 155 |
156 // Check that function being patched is not currently on stack or drop them. | 156 // Check that function being patched is not currently on stack or drop them. |
157 var dropped_functions_number = | 157 var dropped_functions_number = |
158 CheckStackActivations(replaced_function_infos, change_log); | 158 CheckStackActivations(replaced_function_infos, change_log); |
(...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1073 } | 1073 } |
1074 | 1074 |
1075 | 1075 |
1076 // Functions are public for tests. | 1076 // Functions are public for tests. |
1077 this.TestApi = { | 1077 this.TestApi = { |
1078 PosTranslator: PosTranslator, | 1078 PosTranslator: PosTranslator, |
1079 CompareStringsLinewise: CompareStringsLinewise, | 1079 CompareStringsLinewise: CompareStringsLinewise, |
1080 ApplySingleChunkPatch: ApplySingleChunkPatch | 1080 ApplySingleChunkPatch: ApplySingleChunkPatch |
1081 } | 1081 } |
1082 } | 1082 } |
OLD | NEW |