Debian Codegraph @

js/src/jit-test/tests/modules/namespace-import-compilation.js

raw
1 // |jit-test| module
2
3 import * as ns from 'module1.js';
4
5 let other = ns;
6
7 const iterations = 10000;
8
9 let x = 0;
10 for (let i = 0; i < iterations; i++) {
11 if (i == iterations / 2)
12 other = { a: 0 };
13 x += other.a;
14 }
15
16 assertEq(other.a, 0);
17 assertEq(x, iterations / 2);