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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 adapt4to2(1, 2, 3, 4); | 108 adapt4to2(1, 2, 3, 4); |
109 } | 109 } |
110 | 110 |
111 test_adaptation(); | 111 test_adaptation(); |
112 test_adaptation(); | 112 test_adaptation(); |
113 %OptimizeFunctionOnNextCall(test_adaptation); | 113 %OptimizeFunctionOnNextCall(test_adaptation); |
114 test_adaptation(); | 114 test_adaptation(); |
115 })(); | 115 })(); |
116 | 116 |
117 // Test arguments access from the inlined function. | 117 // Test arguments access from the inlined function. |
| 118 %NeverOptimizeFunction(uninlinable); |
118 function uninlinable(v) { | 119 function uninlinable(v) { |
119 assertEquals(0, v); | 120 assertEquals(0, v); |
120 %NeverOptimize(); | |
121 return 0; | 121 return 0; |
122 } | 122 } |
123 | 123 |
124 function toarr_inner() { | 124 function toarr_inner() { |
125 var a = arguments; | 125 var a = arguments; |
126 var marker = a[0]; | 126 var marker = a[0]; |
127 uninlinable(uninlinable(0, 0), marker.x); | 127 uninlinable(uninlinable(0, 0), marker.x); |
128 | 128 |
129 var r = new Array(); | 129 var r = new Array(); |
130 for (var i = a.length - 1; i >= 1; i--) { | 130 for (var i = a.length - 1; i >= 1; i--) { |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 ); | 302 ); |
303 } | 303 } |
304 | 304 |
305 outer(); | 305 outer(); |
306 outer(); | 306 outer(); |
307 %OptimizeFunctionOnNextCall(outer); | 307 %OptimizeFunctionOnNextCall(outer); |
308 outer(); | 308 outer(); |
309 delete forceDeopt.deopt; | 309 delete forceDeopt.deopt; |
310 outer(); | 310 outer(); |
311 })(); | 311 })(); |
OLD | NEW |