Skip to content

Commit 0a02658

Browse files
committed
paritially working Core_kernel build
1 parent ef450db commit 0a02658

File tree

4 files changed

+28
-4
lines changed

4 files changed

+28
-4
lines changed

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ JSC=js_of_ocaml
4747

4848
# js_of_ocaml
4949
ifeq ($(OPT),1)
50-
JS_OF_OCAML_OPTS=-opt 2 noinline -linkall
50+
JS_OF_OCAML_OPTS=-opt 2 -noinline -linkall
5151
else
5252
JS_OF_OCAML_OPTS=-noinline -linkall -pretty -debuginfo -tc none
5353
endif
@@ -135,7 +135,7 @@ min:
135135
make all OPT=1 EXT=".min"
136136

137137
core:
138-
make all EXT=".core" PACKAGES="core_kernel" PRIMJS="core_runtime.js" MODULES="Core_kernel"
138+
make all EXT=".core" OPT=1 PACKAGES="core_kernel" PRIMJS="core_runtime.js" MODULES="Core_kernel"
139139

140140
#######################################################################
141141
# build

core_runtime.js

+25
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,28 @@
33
function unix_gethostname() {
44
return caml_new_string('localhost');
55
}
6+
7+
//Provides: caml_hash_string
8+
//Requires: caml_hash
9+
function caml_hash_string(str) { return caml_hash(10,100,0,str); }
10+
11+
//Provides: caml_hash_double
12+
//Requires: caml_hash
13+
function caml_hash_double(num) { return caml_hash(10,100,0,num); }
14+
15+
//Provides: core_array_unsafe_float_blit
16+
//Requires: caml_array_blit
17+
function core_array_unsafe_float_blit(a1, i1, a2, i2, len) {
18+
return caml_array_blit(a1, i1, a2, i2, len);
19+
}
20+
21+
//Provides: core_array_unsafe_int_blit
22+
//Requires: caml_array_blit
23+
function core_array_unsafe_int_blit(a1, i1, a2, i2, len) {
24+
return caml_array_blit(a1, i1, a2, i2, len);
25+
}
26+
27+
//Provides: fixed_close_channel
28+
//Requires: caml_ml_close_channel
29+
function fixed_close_channel(num) { return caml_ml_close_channel(num); }
30+

iocaml.ml

-1
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,6 @@ let send_clear ?(wait=true) ?(stdout=true) ?(stderr=true) ?(other=true) () =
246246
let main () =
247247
(* automatically query server for files *)
248248
Sys_js.register_autoload "" load_from_server;
249-
(*let ipython : _iPython Js.t = Js.Unsafe.variable "IPython" in*)
250249
Firebug.console##log (Js.string "iocamljs");
251250
(* re-direct output to the notebook *)
252251
Sys.interactive := true;

notebooks/iocamljs-core_kernel.ipynb

+1-1
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)