summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/bug652054.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/basic/bug652054.js')
-rw-r--r--js/src/jit-test/tests/basic/bug652054.js55
1 files changed, 55 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/bug652054.js b/js/src/jit-test/tests/basic/bug652054.js
new file mode 100644
index 000000000..3e43d3673
--- /dev/null
+++ b/js/src/jit-test/tests/basic/bug652054.js
@@ -0,0 +1,55 @@
+var M4x4 = {};
+M4x4.mul = function M4x4_mul(a, b, r) {
+ a11 = a[0]
+ a21 = a[1]
+ a31 = a[2]
+ a12 = a[4]
+ a22 = a[5]
+ a32 = a[6]
+ a13 = a[8]
+ a23 = a[9]
+ a33 = a[10]
+ a14 = a[12]
+ a24 = a[13]
+ a34 = a[14]
+ b[3]
+ b[4]
+ b13 = b[8]
+ b23 = b[9]
+ b33 = b[10]
+ b43 = b[11]
+ r[8] = a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43
+ r[9] = a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43
+ r[10] = a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43
+ return r;
+};
+M4x4.scale3 = function M4x4_scale3(x, y, z, m) {
+ m[0] *= x;
+ m[3] *= x;
+ m[4] *= y;
+ m[11] *= z;
+};
+M4x4.makeLookAt = function M4x4_makeLookAt() {
+ tm1 = new Float32Array(16);
+ tm2 = new Float32Array(16);
+ r = new Float32Array(16)
+ return M4x4.mul(tm1, tm2, r);
+};
+var jellyfish = {};
+jellyfish.order = [];
+function jellyfishInstance() {}
+jellyfishInstance.prototype.drawShadow = function () {
+ pMatrix = M4x4.makeLookAt();
+ M4x4.mul(M4x4.makeLookAt(), pMatrix, pMatrix);
+ M4x4.scale3(6, 180, 0, pMatrix);
+}
+function drawScene() {
+ jellyfish.order.push([0, 0])
+ jellyfish[0] = new jellyfishInstance()
+ for (var i = 0, j = 0; i < jellyfish.count, j < 30; ++j) {
+ jellyfish.order[i][0]
+ jellyfish[0].drawShadow();
+ }
+}
+drawScene();
+