Skip to content

Commit 0c874aa

Browse files
committed
Update test refs
1 parent b162168 commit 0c874aa

File tree

46 files changed

+518
-396
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+518
-396
lines changed

crates/swc/tests/fixture/issues-2xxx/2091/case1/output/index.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/swc/tests/tsc-references/fixSignatureCaching.2.minified.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/swc/tests/tsc-references/nonPrimitiveAssignError.2.minified.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ var a, x = {}, y = {
33
foo: "bar"
44
};
55
x = a, y = a, a = x, a = y;
6-
var s = "fooo";
7-
a = 123, a = !0, n = a = s, b = a, s = a, a = 123, a = !0, a = "string";
6+
var b = !0, s = "fooo";
7+
a = 123, a = b, n = a = s, b = a, s = a, a = 123, a = !0, a = "string";
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
//// [nonPrimitiveNarrow.ts]
2-
var a, b;
32
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
43
import _instanceof from "@swc/helpers/src/_instanceof.mjs";
5-
_instanceof(a, function Narrow() {
4+
var a, b, Narrow = function Narrow() {
65
"use strict";
76
_class_call_check(this, Narrow);
8-
}) && (a.narrowed, a = 123), "number" == typeof a && a.toFixed(), b.toString();
7+
};
8+
_instanceof(a, Narrow) && (a.narrowed, a = 123), "number" == typeof a && a.toFixed(), b.toString();
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
//// [symbolProperty55.ts]
2-
var M;
3-
M || (M = {}), (void 0).iterator;
2+
var M, obj = {
3+
[Symbol.iterator]: 0
4+
};
5+
M || (M = {}), obj[(void 0).iterator];
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
//// [symbolProperty56.ts]
2-
var M;
3-
M || (M = {}), (void 0).iterator;
2+
var M, obj = {
3+
[Symbol.iterator]: 0
4+
};
5+
M || (M = {}), obj[(void 0).iterator];

crates/swc/tests/vercel/full/next-31419/1/output/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ Promise.all(assignAll).then(function() {
3131
3,
3232
4
3333
];
34-
return [
34+
return u = i[o], [
3535
5,
36-
t(e(u = i[o]))
36+
t(e(u))
3737
];
3838
case 2:
3939
a.label = 3;

crates/swc/tests/vercel/full/utf8-1/output/index.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ import r from "./on-demand-entries-client";
55
import { addMessageListener as n, connectHMR as c } from "./error-overlay/websocket";
66
var o = JSON.parse(document.getElementById("__NEXT_DATA__").textContent);
77
window.__NEXT_DATA__ = o;
8-
var s = o.assetPrefix, i = o.page, _ = null, u = __webpack_hash__, d = (s = s || "") + (s.endsWith("/") ? "" : "/") + "_next/static/webpack/";
8+
var s = o.assetPrefix, i = o.page;
9+
s = s || "";
10+
var _ = null, u = __webpack_hash__, d = s + (s.endsWith("/") ? "" : "/") + "_next/static/webpack/";
911
function p() {
1012
return (p = e(function() {
1113
var e, a, r, n, c;

crates/swc_ecma_minifier/tests/benches-full/d3.js

+37-37
Large diffs are not rendered by default.

crates/swc_ecma_minifier/tests/benches-full/echarts.js

+83-55
Large diffs are not rendered by default.

crates/swc_ecma_minifier/tests/benches-full/terser.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5427,7 +5427,7 @@
54275427
get: function(num) {
54285428
var ret = "", base = 54;
54295429
num++;
5430-
do ret += chars[--num % base], num = Math.floor(num / base), base = 64;
5430+
do num--, ret += chars[num % base], num = Math.floor(num / base), base = 64;
54315431
while (num > 0)
54325432
return ret;
54335433
},

crates/swc_ecma_minifier/tests/benches-full/three.js

+14-7
Original file line numberDiff line numberDiff line change
@@ -5951,7 +5951,9 @@
59515951
var useMorphing = !1;
59525952
!0 === material.morphTargets && (useMorphing = geometry.morphAttributes && geometry.morphAttributes.position && geometry.morphAttributes.position.length > 0);
59535953
var useSkinning = !1;
5954-
!0 === object.isSkinnedMesh && (!0 === material.skinning ? useSkinning = !0 : console.warn('THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:', object)), result = getMaterialVariant(useMorphing, useSkinning, !0 === object.isInstancedMesh);
5954+
!0 === object.isSkinnedMesh && (!0 === material.skinning ? useSkinning = !0 : console.warn('THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:', object));
5955+
var useInstancing = !0 === object.isInstancedMesh;
5956+
result = getMaterialVariant(useMorphing, useSkinning, useInstancing);
59555957
} else result = customMaterial;
59565958
if (_renderer.localClippingEnabled && !0 === material.clipShadows && 0 !== material.clippingPlanes.length) {
59575959
var keyA = result.uuid, keyB = material.uuid, materialsForVariant = _materialCache[keyA];
@@ -6685,7 +6687,7 @@
66856687
for(var i = 0; i < cameras.length; i++)updateCamera(cameras[i], parent);
66866688
camera.matrixWorld.copy(cameraVR.matrixWorld);
66876689
for(var children = camera.children, _i3 = 0, l = children.length; _i3 < l; _i3++)children[_i3].updateMatrixWorld(!0);
6688-
return 2 === cameras.length ? (camera1 = cameraVR, cameraL1 = cameraL, cameraR1 = cameraR, cameraLPos.setFromMatrixPosition(cameraL1.matrixWorld), cameraRPos.setFromMatrixPosition(cameraR1.matrixWorld), ipd = cameraLPos.distanceTo(cameraRPos), projL = cameraL1.projectionMatrix.elements, projR = cameraR1.projectionMatrix.elements, near = projL[14] / (projL[10] - 1), far = projL[14] / (projL[10] + 1), topFov = (projL[9] + 1) / projL[5], bottomFov = (projL[9] - 1) / projL[5], xOffset = -((zOffset = ipd / (-(leftFov = (projL[8] - 1) / projL[0]) + (rightFov = (projR[8] + 1) / projR[0]))) * leftFov), cameraL1.matrixWorld.decompose(camera1.position, camera1.quaternion, camera1.scale), camera1.translateX(xOffset), camera1.translateZ(zOffset), camera1.matrixWorld.compose(camera1.position, camera1.quaternion, camera1.scale), camera1.matrixWorldInverse.copy(camera1.matrixWorld).invert(), near2 = near + zOffset, far2 = far + zOffset, camera1.projectionMatrix.makePerspective(near * leftFov - xOffset, near * rightFov + (ipd - xOffset), topFov * far / far2 * near2, bottomFov * far / far2 * near2, near2, far2)) : cameraVR.projectionMatrix.copy(cameraL.projectionMatrix), cameraVR;
6690+
return 2 === cameras.length ? (camera1 = cameraVR, cameraL1 = cameraL, cameraR1 = cameraR, cameraLPos.setFromMatrixPosition(cameraL1.matrixWorld), cameraRPos.setFromMatrixPosition(cameraR1.matrixWorld), ipd = cameraLPos.distanceTo(cameraRPos), projL = cameraL1.projectionMatrix.elements, projR = cameraR1.projectionMatrix.elements, near = projL[14] / (projL[10] - 1), far = projL[14] / (projL[10] + 1), topFov = (projL[9] + 1) / projL[5], bottomFov = (projL[9] - 1) / projL[5], leftFov = (projL[8] - 1) / projL[0], xOffset = -((zOffset = ipd / (-leftFov + (rightFov = (projR[8] + 1) / projR[0]))) * leftFov), cameraL1.matrixWorld.decompose(camera1.position, camera1.quaternion, camera1.scale), camera1.translateX(xOffset), camera1.translateZ(zOffset), camera1.matrixWorld.compose(camera1.position, camera1.quaternion, camera1.scale), camera1.matrixWorldInverse.copy(camera1.matrixWorld).invert(), near2 = near + zOffset, far2 = far + zOffset, camera1.projectionMatrix.makePerspective(near * leftFov - xOffset, near * rightFov + (ipd - xOffset), topFov * far / far2 * near2, bottomFov * far / far2 * near2, near2, far2)) : cameraVR.projectionMatrix.copy(cameraL.projectionMatrix), cameraVR;
66896691
};
66906692
var onAnimationFrameCallback = null, animation = new WebGLAnimation();
66916693
animation.setAnimationLoop(function(time, frame) {
@@ -8783,7 +8785,7 @@
87838785
return a.x - b.x;
87848786
}
87858787
function zOrder(x, y, minX, minY, invSize) {
8786-
return (x = ((x = ((x = ((x = ((x = 32767 * (x - minX) * invSize) | x << 8) & 0x00FF00FF) | x << 4) & 0x0F0F0F0F) | x << 2) & 0x33333333) | x << 1) & 0x55555555) | (y = ((y = ((y = ((y = ((y = 32767 * (y - minY) * invSize) | y << 8) & 0x00FF00FF) | y << 4) & 0x0F0F0F0F) | y << 2) & 0x33333333) | y << 1) & 0x55555555) << 1;
8788+
return x = 32767 * (x - minX) * invSize, y = 32767 * (y - minY) * invSize, x = ((x = ((x = ((x = (x | x << 8) & 0x00FF00FF) | x << 4) & 0x0F0F0F0F) | x << 2) & 0x33333333) | x << 1) & 0x55555555, y = ((y = ((y = ((y = (y | y << 8) & 0x00FF00FF) | y << 4) & 0x0F0F0F0F) | y << 2) & 0x33333333) | y << 1) & 0x55555555, x | y << 1;
87878789
}
87888790
function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {
87898791
return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 && (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 && (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;
@@ -8878,7 +8880,9 @@
88788880
function getBevelVec(inPt, inPrev, inNext) {
88798881
var v_trans_x, v_trans_y, shrink_by, v_prev_x = inPt.x - inPrev.x, v_prev_y = inPt.y - inPrev.y, v_next_x = inNext.x - inPt.x, v_next_y = inNext.y - inPt.y, v_prev_lensq = v_prev_x * v_prev_x + v_prev_y * v_prev_y;
88808882
if (Math.abs(v_prev_x * v_next_y - v_prev_y * v_next_x) > Number.EPSILON) {
8881-
var v_prev_len = Math.sqrt(v_prev_lensq), v_next_len = Math.sqrt(v_next_x * v_next_x + v_next_y * v_next_y), ptPrevShift_x = inPrev.x - v_prev_y / v_prev_len, ptPrevShift_y = inPrev.y + v_prev_x / v_prev_len, sf = ((inNext.x - v_next_y / v_next_len - ptPrevShift_x) * v_next_y - (inNext.y + v_next_x / v_next_len - ptPrevShift_y) * v_next_x) / (v_prev_x * v_next_y - v_prev_y * v_next_x), v_trans_lensq = (v_trans_x = ptPrevShift_x + v_prev_x * sf - inPt.x) * v_trans_x + (v_trans_y = ptPrevShift_y + v_prev_y * sf - inPt.y) * v_trans_y;
8883+
var v_prev_len = Math.sqrt(v_prev_lensq), v_next_len = Math.sqrt(v_next_x * v_next_x + v_next_y * v_next_y), ptPrevShift_x = inPrev.x - v_prev_y / v_prev_len, ptPrevShift_y = inPrev.y + v_prev_x / v_prev_len, sf = ((inNext.x - v_next_y / v_next_len - ptPrevShift_x) * v_next_y - (inNext.y + v_next_x / v_next_len - ptPrevShift_y) * v_next_x) / (v_prev_x * v_next_y - v_prev_y * v_next_x);
8884+
v_trans_x = ptPrevShift_x + v_prev_x * sf - inPt.x, v_trans_y = ptPrevShift_y + v_prev_y * sf - inPt.y;
8885+
var v_trans_lensq = v_trans_x * v_trans_x + v_trans_y * v_trans_y;
88828886
if (v_trans_lensq <= 2) return new Vector2(v_trans_x, v_trans_y);
88838887
shrink_by = Math.sqrt(v_trans_lensq / 2);
88848888
} else {
@@ -10474,7 +10478,7 @@
1047410478
},
1047510479
initNonuniformCatmullRom: function(x0, x1, x2, x3, dt0, dt1, dt2) {
1047610480
var t1 = (x1 - x0) / dt0 - (x2 - x0) / (dt0 + dt1) + (x2 - x1) / dt1, t2 = (x2 - x1) / dt1 - (x3 - x1) / (dt1 + dt2) + (x3 - x2) / dt2;
10477-
init(x1, x2, t1 *= dt1, t2 *= dt1);
10481+
t1 *= dt1, t2 *= dt1, init(x1, x2, t1, t2);
1047810482
},
1047910483
calc: function(t) {
1048010484
var t2 = t * t;
@@ -10710,7 +10714,7 @@
1071010714
this.needsUpdate = !1;
1071110715
var current, cache = [], last = this.getPoint(0), sum = 0;
1071210716
cache.push(0);
10713-
for(var p = 1; p <= divisions; p++)cache.push(sum += (current = this.getPoint(p / divisions)).distanceTo(last)), last = current;
10717+
for(var p = 1; p <= divisions; p++)current = this.getPoint(p / divisions), cache.push(sum += current.distanceTo(last)), last = current;
1071410718
return this.cacheArcLengths = cache, cache;
1071510719
},
1071610720
updateArcLengths: function() {
@@ -12935,7 +12939,10 @@
1293512939
if (!this.paused) {
1293612940
timeScale = this.timeScale;
1293712941
var interpolant = this._timeScaleInterpolant;
12938-
null !== interpolant && (timeScale *= interpolant.evaluate(time)[0], time > interpolant.parameterPositions[1] && (this.stopWarping(), 0 === timeScale ? this.paused = !0 : this.timeScale = timeScale));
12942+
if (null !== interpolant) {
12943+
var interpolantValue = interpolant.evaluate(time)[0];
12944+
timeScale *= interpolantValue, time > interpolant.parameterPositions[1] && (this.stopWarping(), 0 === timeScale ? this.paused = !0 : this.timeScale = timeScale);
12945+
}
1293912946
}
1294012947
return this._effectiveTimeScale = timeScale, timeScale;
1294112948
}, _proto._updateTime = function(deltaTime) {

0 commit comments

Comments
 (0)