Skip to content

Commit 7fa8959

Browse files
authored
Merge pull request #1125 from bloomberg/int_vec_spe
specialize int vector
2 parents 9bde380 + c6d50cf commit 7fa8959

15 files changed

+2355
-1324
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ _build
2424
*.jsx
2525
*.lambda
2626
*.rawlambda
27+
*.s
2728
*.o
2829
*.lam
2930
*.0.js

jscomp/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,13 +385,13 @@ bin/whole_compiler.ml:./bin/bspack.exe
385385
BS_DEBUG=false $< -bs-MD -prelude-str 'module Config = Config_whole_compiler' -bs-exclude-I config -o $@ -bs-main Js_main -I ../ocaml/utils/ -I ../ocaml/parsing/ -I ../ocaml/typing/ -I ../ocaml/bytecomp/ -I ../ocaml/driver/ -I stubs -I ext -I syntax -I depends -I common -I core
386386

387387
bin/bsdep.ml:./bin/bspack.exe
388-
BS_DEBUG=false BS_OCAMLDEP=true $< -bs-MD -prelude-str 'module Config = Config_bsdep' -bs-exclude-I config -I ../ocaml/utils/ -I ../ocaml/parsing/ -I ../ocaml/driver -I ../ocaml/tools -I common -I ext -I syntax -I depends -I core -bs-main Ocamldep -o $@
388+
BS_DEBUG=false BS_OCAMLDEP=true $< -bs-MD -prelude-str 'module Config = Config_bsdep' -bs-exclude-I config -I ../ocaml/utils/ -I ../ocaml/parsing/ -I ../ocaml/driver -I ../ocaml/tools -I common -I ext -I syntax -I depends -I core -I stubs -bs-main Ocamldep -o $@
389389

390390
bin/bsb_helper.ml:./bin/bspack.exe
391-
BS_DEBUG=false $< -bs-MD -I common -I ext -I syntax -I depends -I bsb -bs-main Bsb_helper_main -o $@
391+
BS_DEBUG=false $< -bs-MD -I stubs -I common -I ext -I syntax -I depends -I bsb -bs-main Bsb_helper_main -o $@
392392

393393
bin/bsb.ml:./bin/bspack.exe
394-
BS_DEBUG=false $< -bs-MD -I common -I ext -I syntax -I depends -I bsb -I ext -bs-main Bsb_main -o $@
394+
BS_DEBUG=false $< -bs-MD -I stubs -I common -I ext -I syntax -I depends -I bsb -I ext -bs-main Bsb_main -o $@
395395

396396
bin/bspp.ml:./bin/bspack.exe
397397
BS_DEBUG=false BS_MIN_LEX_DEPS=true $< -bs-MD -bs-exclude-I config -I ../ocaml/utils/ -I ../ocaml/parsing?parser -I common -I ext -I syntax -I depends -I bspp -I core -bs-main Bspp_main -o $@

jscomp/all.depend

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ ext/ext_int.cmx : ext/ext_int.cmi
44
ext/ext_array.cmx : ext/ext_array.cmi
55
ext/ext_bytes.cmx : ext/ext_bytes.cmi
66
ext/ext_char.cmx : ext/ext_char.cmi
7-
ext/vec_gen.cmx : ext/ext_array.cmx
8-
ext/resize_array.cmx : ext/vec_gen.cmx ext/resize_array.cmi
7+
ext/vec_gen.cmx :
8+
ext/resize_array.cmx : ext/vec_gen.cmx ext/ext_array.cmx \
9+
ext/resize_array.cmi
910
ext/string_vec.cmx : ext/resize_array.cmx ext/string_vec.cmi
10-
ext/int_vec.cmx : ext/vec_gen.cmx ext/int_vec.cmi
11+
ext/int_vec.cmx : ext/ext_array.cmx stubs/bs_hash_stubs.cmx ext/int_vec.cmi
1112
ext/int_vec_util.cmx : ext/int_vec.cmx ext/int_vec_util.cmi
1213
ext/int_vec_vec.cmx : ext/resize_array.cmx ext/int_vec.cmx \
1314
ext/int_vec_vec.cmi

jscomp/bin/Makefile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,15 @@ ifndef EXE
55
EXE := # empty
66
endif
77
NATIVE=ocamlopt.opt$(EXE)
8-
9-
OCAMLOPT_FLAGS= -inline 1000 -g -w -a ../stubs/ext_basic_hash_stubs.c
10-
8+
BSC_FLAGS= -w -a -I ../runtime -I ../stdlib -bs-files
9+
BSC=./bsc.exe
10+
OCAMLOPT_FLAGS= -g -w -a ../stubs/ext_basic_hash_stubs.c
11+
# -inline 1000 makes size too large
12+
# TODO: make sure it can be bootstrapped, at least is a very good
13+
# test case of our optimizations
1114
bsppx.exe: config_bsppx.mli config_bsppx.ml bsppx.mli bsppx.ml
1215
$(NATIVE) $(OCAMLOPT_FLAGS) $^ -o $@
13-
16+
1417
bspp.exe: bspp.mli bspp.ml
1518
$(NATIVE) $(OCAMLOPT_FLAGS) $^ -o $@
1619

@@ -31,5 +34,7 @@ bsc.exe: config_whole_compiler.mli config_whole_compiler.ml whole_compiler.mli
3134
bspack.exe: config_bspack.mli config_bspack.ml bspack.mli bspack.ml
3235
$(NATIVE) $(OCAMLOPT_FLAGS) unix.cmxa $^ -o $@
3336

37+
bspack.js: config_bspack.mli config_bspack.ml bspack.mli bspack.ml
38+
$(BSC) $(BSC_FLAGS) $^
3439

3540
all: bsppx.exe bspp.exe bsdep.exe bsc.exe bspack.exe bsb.exe bsb_helper.exe

0 commit comments

Comments
 (0)