summaryrefslogtreecommitdiff
path: root/test/unit.asm.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit.asm.js')
-rw-r--r--test/unit.asm.js49
1 files changed, 48 insertions, 1 deletions
diff --git a/test/unit.asm.js b/test/unit.asm.js
index 491f90835..5bb84bdcd 100644
--- a/test/unit.asm.js
+++ b/test/unit.asm.js
@@ -8,6 +8,10 @@ function asm() {
var Math_abs = global.Math.abs;
var Math_ceil = global.Math.ceil;
+ var abort = env.abort;
+ var print = env.print;
+ var h = env.h;
+
function big_negative() {
var temp = 0.0;
temp = +-2147483648;
@@ -39,8 +43,9 @@ function asm() {
return !x;
}
function conversions() {
- var i = 0, d = 0.0;
+ var i = 0, d = 0.0, f = Math_fround(0);
i = ~~d;
+ i = ~~f;
d = +(i | 0);
d = +(i >>> 0);
}
@@ -50,6 +55,7 @@ function asm() {
}
function switcher(x) {
x = x | 0;
+ var waka = 0;
switch (x | 0) {
case 1: return 1;
case 2: return 2;
@@ -74,6 +80,32 @@ function asm() {
break;
}
}
+
+ L1 : while (1) {
+ L3 : while (1) switch (x) {
+ case -1:
+ {
+ break L1;
+ break;
+ }
+ case 116:
+ {
+ waka = 1;
+ break;
+ }
+ case 110:
+ {
+ break L3;
+ break;
+ }
+ default:
+ {
+ break L1;
+ }
+ }
+ h(120);
+ }
+
return 0;
}
function blocker() {
@@ -143,6 +175,21 @@ function asm() {
temp = Math_fround(Math_ceil(B));
temp = Math_fround(u * Math_fround(Math_ceil(Math_fround(B))));
}
+ function aborts() {
+ abort();
+ abort(55);
+ abort();
+ }
+ function continues() {
+ while (1) {
+ print(1);
+ do {
+ print(5);
+ if (0) continue;
+ } while (0);
+ print(2);
+ }
+ }
function z() {
}