| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 TestAll('NoConflict', 'eval("' + s + '")', "'NoConflict'"); | 73 TestAll('NoConflict', 'eval("' + s + '")', "'NoConflict'"); |
| 74 } | 74 } |
| 75 | 75 |
| 76 var letbinds = [ "let x", | 76 var letbinds = [ "let x", |
| 77 "let x = 0", | 77 "let x = 0", |
| 78 "let x = undefined", | 78 "let x = undefined", |
| 79 "function x() { }", | 79 "function x() { }", |
| 80 "let x = function() {}", | 80 "let x = function() {}", |
| 81 "let x, y", | 81 "let x, y", |
| 82 "let y, x", | 82 "let y, x", |
| 83 "const x = 0", |
| 84 "const x = undefined", |
| 85 "const x = function() {}", |
| 86 "const x = 2, y = 3", |
| 87 "const y = 4, x = 5", |
| 83 ]; | 88 ]; |
| 84 var varbinds = [ "var x", | 89 var varbinds = [ "var x", |
| 85 "var x = 0", | 90 "var x = 0", |
| 86 "var x = undefined", | 91 "var x = undefined", |
| 87 "var x = function() {}", | 92 "var x = function() {}", |
| 88 "var x, y", | 93 "var x, y", |
| 89 "var y, x", | 94 "var y, x", |
| 90 ]; | 95 ]; |
| 91 | 96 |
| 92 | 97 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 117 | 122 |
| 118 // Test conflicting catch/var bindings. | 123 // Test conflicting catch/var bindings. |
| 119 for (var v = 0; v < varbinds.length; ++v) { | 124 for (var v = 0; v < varbinds.length; ++v) { |
| 120 TestConflict('try {} catch (x) { ' + varbinds[v] + '; }'); | 125 TestConflict('try {} catch (x) { ' + varbinds[v] + '; }'); |
| 121 } | 126 } |
| 122 | 127 |
| 123 // Test conflicting parameter/var bindings. | 128 // Test conflicting parameter/var bindings. |
| 124 for (var v = 0; v < varbinds.length; ++v) { | 129 for (var v = 0; v < varbinds.length; ++v) { |
| 125 TestConflict('(function (x) { ' + varbinds[v] + '; })()'); | 130 TestConflict('(function (x) { ' + varbinds[v] + '; })()'); |
| 126 } | 131 } |
| OLD | NEW |