nested-while-script-code-valid.js (1325B)
1 // This file was procedurally generated from the following sources: 2 // - src/dynamic-import/script-code-valid.case 3 // - src/dynamic-import/syntax/valid/nested-while.template 4 /*--- 5 description: import() can be used in script code (nested while syntax) 6 esid: sec-import-call-runtime-semantics-evaluation 7 features: [dynamic-import] 8 flags: [generated] 9 info: | 10 ImportCall : 11 import( AssignmentExpression ) 12 13 1. Let referencingScriptOrModule be ! GetActiveScriptOrModule(). 14 2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null). 15 3. Let argRef be the result of evaluating AssignmentExpression. 16 4. Let specifier be ? GetValue(argRef). 17 5. Let promiseCapability be ! NewPromiseCapability(%Promise%). 18 6. Let specifierString be ToString(specifier). 19 7. IfAbruptRejectPromise(specifierString, promiseCapability). 20 8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability). 21 9. Return promiseCapability.[[Promise]]. 22 23 ---*/ 24 // This is still valid in script code, and should not be valid for module code 25 // https://tc39.github.io/ecma262/#sec-scripts-static-semantics-lexicallydeclarednames 26 var smoosh; function smoosh() {} 27 28 29 let x = 0; 30 while (!x) { 31 x++; 32 import('./empty_FIXTURE.js'); 33 }; 34 35 reportCompare(0, 0);