mirror of
https://github.com/swc-project/swc.git
synced 2024-12-30 00:52:29 +03:00
ef6a745599
swc_ecma_minifier: - Implement `evaluate` partially. - Store 'expected output' from terser along with our result. swc_ecma_transforms_base: - `fixer`: Don't wrap `+ (a % b)`. swc_ecma_transforms_optimization: - `expr_simplifier`: Preserve this in calls.
43 lines
704 B
JavaScript
43 lines
704 B
JavaScript
function f0() {
|
|
var b = 2;
|
|
b++;
|
|
console.log(2);
|
|
console.log(4);
|
|
}
|
|
function f1() {
|
|
var b = 2;
|
|
--b;
|
|
console.log(2);
|
|
console.log(2);
|
|
}
|
|
function f2() {
|
|
3;
|
|
console.log(4);
|
|
console.log(6);
|
|
console.log(4);
|
|
console.log(7);
|
|
}
|
|
function f3() {
|
|
var b = 2;
|
|
b *= 3;
|
|
console.log(7);
|
|
console.log(9);
|
|
console.log(4);
|
|
console.log(10);
|
|
}
|
|
function f4() {
|
|
var b = 2,
|
|
c = 3;
|
|
b = c;
|
|
console.log(1 + b);
|
|
console.log(b + c);
|
|
console.log(1 + c);
|
|
console.log(1 + b + c);
|
|
}
|
|
function f5(a) {
|
|
B = a;
|
|
console.log(typeof A ? "yes" : "no");
|
|
console.log(typeof B ? "yes" : "no");
|
|
}
|
|
f0(), f1(), f2(), f3(), f4(), f5();
|