OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 %OptimizeFunctionOnNextCall(toarr); | 151 %OptimizeFunctionOnNextCall(toarr); |
152 assertArrayEquals([3, 2, 1], toarr(marker, 2, 4, 6)); | 152 assertArrayEquals([3, 2, 1], toarr(marker, 2, 4, 6)); |
153 delete marker.x; | 153 delete marker.x; |
154 assertArrayEquals([3, 2, 1], toarr(marker, 2, 4, 6)); | 154 assertArrayEquals([3, 2, 1], toarr(marker, 2, 4, 6)); |
155 } | 155 } |
156 | 156 |
157 test_toarr(toarr1); | 157 test_toarr(toarr1); |
158 test_toarr(toarr2); | 158 test_toarr(toarr2); |
159 | 159 |
160 // Test that arguments access from inlined function uses correct values. | 160 // Test that arguments access from inlined function uses correct values. |
161 // TODO(mstarzinger): Tests disabled, see bug 2261 | |
162 /* | |
163 (function () { | 161 (function () { |
164 function inner(x, y) { | 162 function inner(x, y) { |
165 "use strict"; | 163 "use strict"; |
166 x = 10; | 164 x = 10; |
167 y = 20; | 165 y = 20; |
168 for (var i = 0; i < 1; i++) { | 166 for (var i = 0; i < 1; i++) { |
169 for (var j = 1; j <= arguments.length; j++) { | 167 for (var j = 1; j <= arguments.length; j++) { |
170 return arguments[arguments.length - j]; | 168 return arguments[arguments.length - j]; |
171 } | 169 } |
172 } | 170 } |
(...skipping 24 matching lines...) Expand all Loading... |
197 function outer(x, y) { | 195 function outer(x, y) { |
198 return inner(x, y); | 196 return inner(x, y); |
199 } | 197 } |
200 | 198 |
201 assertEquals(2, outer(1, 2)); | 199 assertEquals(2, outer(1, 2)); |
202 assertEquals(2, outer(1, 2)); | 200 assertEquals(2, outer(1, 2)); |
203 assertEquals(2, outer(1, 2)); | 201 assertEquals(2, outer(1, 2)); |
204 %OptimizeFunctionOnNextCall(outer); | 202 %OptimizeFunctionOnNextCall(outer); |
205 assertEquals(2, outer(1, 2)); | 203 assertEquals(2, outer(1, 2)); |
206 })(); | 204 })(); |
207 */ | |
OLD | NEW |