| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 7161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7172 const char* data[] = { | 7172 const char* data[] = { |
| 7173 "let", | 7173 "let", |
| 7174 "let = 1", | 7174 "let = 1", |
| 7175 "for (let = 1; let < 1; let++) {}", | 7175 "for (let = 1; let < 1; let++) {}", |
| 7176 "for (let in {}) {}", | 7176 "for (let in {}) {}", |
| 7177 "for (var let = 1; let < 1; let++) {}", | 7177 "for (var let = 1; let < 1; let++) {}", |
| 7178 "for (var let in {}) {}", | 7178 "for (var let in {}) {}", |
| 7179 "for (var [let] = 1; let < 1; let++) {}", | 7179 "for (var [let] = 1; let < 1; let++) {}", |
| 7180 "for (var [let] in {}) {}", | 7180 "for (var [let] in {}) {}", |
| 7181 "var let", | 7181 "var let", |
| 7182 // Unrelated parser crash BUG(v8:4462) | 7182 "var [let]", |
| 7183 // "var [let]", | |
| 7184 "for (const let = 1; let < 1; let++) {}", | 7183 "for (const let = 1; let < 1; let++) {}", |
| 7185 "for (const let in {}) {}", | 7184 "for (const let in {}) {}", |
| 7186 "for (const [let] = 1; let < 1; let++) {}", | 7185 "for (const [let] = 1; let < 1; let++) {}", |
| 7187 // Unrelated parser crash BUG(v8:4461) | 7186 "for (const [let] in {}) {}", |
| 7188 // "for (const [let] in {}) {}", | |
| 7189 "const let", | 7187 "const let", |
| 7190 "const [let]", | 7188 "const [let]", |
| 7191 NULL | 7189 NULL |
| 7192 }; | 7190 }; |
| 7193 // clang-format on | 7191 // clang-format on |
| 7194 | 7192 |
| 7195 static const ParserFlag always_flags[] = { | 7193 static const ParserFlag always_flags[] = { |
| 7196 kAllowHarmonySloppy, kAllowHarmonySloppyLet, kAllowHarmonyDestructuring}; | 7194 kAllowHarmonySloppy, kAllowHarmonySloppyLet, kAllowHarmonyDestructuring}; |
| 7197 RunParserSyncTest(context_data, data, kSuccess, NULL, 0, always_flags, | 7195 RunParserSyncTest(context_data, data, kSuccess, NULL, 0, always_flags, |
| 7198 arraysize(always_flags)); | 7196 arraysize(always_flags)); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 7221 NULL | 7219 NULL |
| 7222 }; | 7220 }; |
| 7223 // clang-format on | 7221 // clang-format on |
| 7224 | 7222 |
| 7225 static const ParserFlag fail_flags[] = { | 7223 static const ParserFlag fail_flags[] = { |
| 7226 kAllowHarmonySloppy, kAllowHarmonySloppyLet, kNoLegacyConst, | 7224 kAllowHarmonySloppy, kAllowHarmonySloppyLet, kNoLegacyConst, |
| 7227 kAllowHarmonyDestructuring}; | 7225 kAllowHarmonyDestructuring}; |
| 7228 RunParserSyncTest(context_data, fail_data, kError, NULL, 0, fail_flags, | 7226 RunParserSyncTest(context_data, fail_data, kError, NULL, 0, fail_flags, |
| 7229 arraysize(fail_flags)); | 7227 arraysize(fail_flags)); |
| 7230 } | 7228 } |
| OLD | NEW |