Skip to content

Commit

Permalink
Runtime: adjust runtime for 5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
hhugo committed Nov 19, 2024
1 parent a1c6cc9 commit 2143524
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 deletions.
1 change: 1 addition & 0 deletions runtime/js/domain.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ function caml_atomic_exchange(ref, v) {
}

//Provides: caml_atomic_make_contended
//Version: >= 5.2
function caml_atomic_make_contended(a) {
return [0, a];
}
Expand Down
1 change: 1 addition & 0 deletions runtime/js/gc.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ function caml_memprof_stop(unit) {
}

//Provides: caml_memprof_discard
//Version: >= 5.2
function caml_memprof_discard(t) {
return 0;
}
Expand Down
2 changes: 2 additions & 0 deletions runtime/js/io.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ function caml_ml_input(chanid, b, i, l) {
//Provides: caml_ml_input_bigarray
//Requires: caml_ml_input_block
//Requires: caml_ba_to_typed_array
//Version: >= 5.2
function caml_ml_input_bigarray(chanid, b, i, l) {
var ba = caml_ba_to_typed_array(b);
return caml_ml_input_block(chanid, ba, i, l);
Expand Down Expand Up @@ -584,6 +585,7 @@ function caml_ml_output_bytes(chanid, buffer, offset, len) {

//Provides: caml_ml_output_bigarray
//Requires: caml_ba_to_typed_array, caml_ml_output_ta
//Version: >= 5.2
function caml_ml_output_bigarray(chanid, buffer, offset, len) {
var buffer = caml_ba_to_typed_array(buffer);
return caml_ml_output_ta(chanid, buffer, offset, len);
Expand Down
24 changes: 21 additions & 3 deletions runtime/js/runtime_events.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,43 @@ function caml_runtime_events_user_resolve() {
}

//Provides: caml_ml_runtime_events_start
//Alias: caml_runtime_events_start
//Version: >= 5.2
function caml_ml_runtime_events_start() {
return 0;
}

//Provides: caml_runtime_events_start
//Version: < 5.2
function caml_runtime_events_start() {
return 0;
}

//Provides: caml_ml_runtime_events_pause
//Alias: caml_runtime_events_pause
//Version: >= 5.2
function caml_ml_runtime_events_pause() {
return 0;
}

//Provides: caml_runtime_events_pause
//Version: < 5.2
function caml_runtime_events_pause() {
return 0;
}

//Provides: caml_ml_runtime_events_are_active
//Version: >= 5.2
function caml_ml_runtime_events_are_active() {
return 0;
}

//Provides: caml_runtime_events_resume
//Version: < 5.2
function caml_runtime_events_resume() {
return 0;
}

//Provides: caml_ml_runtime_events_resume
//Alias: caml_runtime_events_resume
//Version: >= 5.2
function caml_ml_runtime_events_resume() {
return 0;
}
Expand Down

0 comments on commit 2143524

Please sign in to comment.