| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 } else { | 88 } else { |
| 89 d = o[i]; | 89 d = o[i]; |
| 90 } | 90 } |
| 91 if (test2) { | 91 if (test2) { |
| 92 d += 1; | 92 d += 1; |
| 93 } | 93 } |
| 94 if (test3) { | 94 if (test3) { |
| 95 d = d|0; | 95 d = d|0; |
| 96 } | 96 } |
| 97 a[d] = 1; | 97 a[d] = 1; |
| 98 assertEquals(1, a[d]); |
| 98 return d; | 99 return d; |
| 99 } | 100 } |
| 100 | 101 |
| 101 var a2 = new Int32Array(10); | 102 var a2 = new Int32Array(10); |
| 102 f_external(true, false, true, a2, 0); | 103 f_external(true, false, true, a2, 0); |
| 103 f_external(true, true, true, a2, 0); | 104 f_external(true, true, true, a2, 0); |
| 104 f_external(false, false, true, a2, 1); | 105 f_external(false, false, true, a2, 1); |
| 105 f_external(false, true, true, a2, 1); | 106 f_external(false, true, true, a2, 1); |
| 106 %OptimizeFunctionOnNextCall(f_external); | 107 %OptimizeFunctionOnNextCall(f_external); |
| 107 f_external(false, false, false, a2, 2); | 108 f_external(false, false, false, a2, 2); |
| 108 assertEquals(1, a2[undefined]); | 109 assertEquals(1, a2[undefined]); |
| OLD | NEW |