nested-while-empty-str-is-valid-assign-expr.js (1103B)
1 // This file was procedurally generated from the following sources: 2 // - src/dynamic-import/empty-str-is-valid-assign-expr.case 3 // - src/dynamic-import/syntax/valid/nested-while.template 4 /*--- 5 description: Calling import('') (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 25 let x = 0; 26 while (!x) { 27 x++; 28 import(''); 29 }; 30 31 reportCompare(0, 0);