Skip to content

Commit be53efe

Browse files
committed
improve stubs
1 parent bd9e500 commit be53efe

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

runtime/stubs.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,28 @@ function unix_setitimer(which, newval) {
1212
}
1313

1414
//Provides: unix_times
15+
//only used for timing statistics in Goblint
1516
function unix_times(x) {
16-
return x;
17+
return 0;
1718
}
1819

1920
//Provides: max_float
21+
//from Goblint specific stubs for C float operations
2022
function max_float(x) {
21-
return x;
23+
return Number.MAX_VALUE;
2224
}
2325

2426
//Provides: smallest_float
27+
//from Goblint specific stubs for C float operations
28+
//returns the smallest positive and normalized float
2529
function smallest_float(x) {
26-
return x;
30+
return 2.2250738585072014e-308;
2731
}
2832

2933
//Provides: ml_z_of_int
34+
//Requires: ml_z_of_int64, ml_z_to_int64
3035
function ml_z_of_int(x) {
31-
return x | 0;
36+
return ml_z_of_int64(ml_z_to_int64(x));
3237
}
3338

3439
//Provides: caml_thread_initialize const

0 commit comments

Comments
 (0)