Skip to content

Commit 6ae1f32

Browse files
committed
missing prims
1 parent 84da277 commit 6ae1f32

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

runtime/js/array.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,18 @@ function caml_floatarray_concat(l) {
9292
return a;
9393
}
9494

95+
//Provides: caml_uniform_array_concat mutable
96+
//Version: >= 5.4
97+
function caml_uniform_array_concat(l) {
98+
var a = [0];
99+
while (l !== 0) {
100+
var b = l[1];
101+
for (var i = 1; i < b.length; i++) a.push(b[i]);
102+
l = l[2];
103+
}
104+
return a;
105+
}
106+
95107
//Provides: caml_array_blit
96108
function caml_array_blit(a1, i1, a2, i2, len) {
97109
if (i2 <= i1) {

runtime/js/obj.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ function caml_update_dummy(x, y) {
3232

3333
//Provides: caml_alloc_dummy_infix
3434
//Requires: caml_call_gen
35+
//Version: < 5.4
3536
function caml_alloc_dummy_infix() {
3637
return function f(x) {
3738
return caml_call_gen(f.fun, [x]);
@@ -269,3 +270,18 @@ function caml_is_continuation_tag(t) {
269270
function caml_custom_identifier(o) {
270271
return caml_string_of_jsstring(o.caml_custom);
271272
}
273+
274+
//Provides: caml_ml_gc_ramp_up
275+
//Requires: caml_callback
276+
//Version: >= 5.4
277+
function caml_ml_gc_ramp_up(f) {
278+
var a = caml_callback(f, [0]);
279+
var suspended = 0;
280+
return [0, a, suspended];
281+
}
282+
283+
//Provides: caml_ml_gc_ramp_down
284+
//Version: >= 5.4
285+
function caml_ml_gc_ramp_down(_suspended_collection_work) {
286+
return 0;
287+
}

0 commit comments

Comments
 (0)