Skip to content

Commit 6d8d865

Browse files
committed
Runtime: missing array primitives
1 parent 9570d4a commit 6d8d865

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

runtime/js/array.js

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ function caml_floatarray_sub(a, i, len) {
3434
return caml_array_sub(a, i, len);
3535
}
3636

37+
//Provides: caml_uniform_array_sub mutable
38+
//Requires: caml_array_sub
39+
//Version: >= 5.3
40+
function caml_uniform_array_sub(a, i, len) {
41+
return caml_array_sub(a, i, len);
42+
}
43+
3744
//Provides: caml_array_append mutable
3845
function caml_array_append(a1, a2) {
3946
var l1 = a1.length,
@@ -55,6 +62,13 @@ function caml_floatarray_append(a1, a2) {
5562
return caml_array_append(a1, a2);
5663
}
5764

65+
//Provides: caml_uniform_array_append mutable
66+
//Requires: caml_array_append
67+
//Version: >= 5.3
68+
function caml_uniform_array_append(a1, a2) {
69+
return caml_array_append(a1, a2);
70+
}
71+
5872
//Provides: caml_array_concat mutable
5973
function caml_array_concat(l) {
6074
var a = [0];
@@ -82,6 +96,13 @@ function caml_floatarray_blit(a1, i1, a2, i2, len) {
8296
return caml_array_blit(a1, i1, a2, i2, len);
8397
}
8498

99+
//Provides: caml_uniform_array_blit
100+
//Requires: caml_array_blit
101+
//Version: >= 5.3
102+
function caml_uniform_array_blit(a1, i1, a2, i2, len) {
103+
return caml_array_blit(a1, i1, a2, i2, len);
104+
}
105+
85106
///////////// Pervasive
86107
//Provides: caml_array_set (mutable, const, mutable)
87108
//Requires: caml_array_bound_error
@@ -113,6 +134,20 @@ function caml_floatarray_fill(array, ofs, len, v) {
113134
return caml_array_fill(array, ofs, len, v);
114135
}
115136

137+
//Provides: caml_floatarray_fill_unboxed
138+
//Requires: caml_array_fill
139+
//Version: >= 5.3
140+
function caml_floatarray_fill_unboxed(array, ofs, len, v) {
141+
return caml_array_fill(array, ofs, len, v);
142+
}
143+
144+
//Provides: caml_uniform_array_fill
145+
//Requires: caml_array_fill
146+
//Version: >= 5.3
147+
function caml_uniform_array_fill(array, ofs, len, v) {
148+
return caml_array_fill(array, ofs, len, v);
149+
}
150+
116151
//Provides: caml_check_bound (mutable, const)
117152
//Requires: caml_array_bound_error
118153
function caml_check_bound(array, index) {
@@ -176,3 +211,17 @@ function caml_floatarray_create(len) {
176211
function caml_floatarray_make(len, init) {
177212
return caml_array_make(len, init);
178213
}
214+
215+
//Provides: caml_floatarray_make_unboxed const (const)
216+
//Requires: caml_array_make
217+
//Version: >= 5.3
218+
function caml_floatarray_make_unboxed(len, init) {
219+
return caml_array_make(len, init);
220+
}
221+
222+
//Provides: caml_uniform_array_make const (const)
223+
//Requires: caml_array_make
224+
//Version: >= 5.3
225+
function caml_uniform_array_make(len, init) {
226+
return caml_array_make(len, init);
227+
}

0 commit comments

Comments
 (0)