Skip to content

Commit e984329

Browse files
authored
Merge pull request #440 from bloomberg/bs_lambda
provide indirection for lambda -> bs_lambda
2 parents 285ae6e + cfc6dcf commit e984329

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+2684
-1272
lines changed

jscomp/bin/compiler.ml

Lines changed: 1524 additions & 814 deletions
Large diffs are not rendered by default.

jscomp/compiler.odocl

Lines changed: 0 additions & 1 deletion
This file was deleted.

jscomp/core.mllib

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ config_util
77

88

99

10-
10+
lam
1111
lam_mk
12-
lam_comb
12+
lam_print
1313
lam_compile_env
1414
lam_dispatch_primitive
1515
lam_stats

jscomp/js_cmj_format.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
(* TODO: add a magic number *)
3333
type cmj_value = {
3434
arity : Lam_stats.function_arities ;
35-
closed_lambda : Lambda.lambda option ;
35+
closed_lambda : Lam.t option ;
3636
(** Either constant or closed functor *)
3737
}
3838

jscomp/js_cmj_format.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454

5555
type cmj_value = {
5656
arity : Lam_stats.function_arities ;
57-
closed_lambda : Lambda.lambda option ;
57+
closed_lambda : Lam.t option ;
5858
(* Either constant or closed functor *)
5959
}
6060

jscomp/js_implementation.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ let implementation ppf sourcefile outputprefix =
7676
match
7777
Lam_compile_group.lambda_as_module
7878
finalenv current_signature
79-
sourcefile outputprefix lambda with
79+
sourcefile outputprefix ((* Obj.magic *) lambda ) with
8080
| e -> e
8181
| exception e ->
8282
(* Save to a file instead so that it will not scare user *)

jscomp/js_output.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ let handle_name_tail
8080
let handle_block_return
8181
(st : st)
8282
(should_return : Lam_compile_defs.return_type)
83-
(lam : Lambda.lambda) (block : J.block) exp : t =
83+
(lam : Lam.t) (block : J.block) exp : t =
8484
match st, should_return with
8585
| Declare (kind,n), False ->
8686
make (block @ [ S.define ~kind n exp])

jscomp/js_output.mli

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,12 @@ val dummy : t
6868
val handle_name_tail :
6969
Lam_compile_defs.st ->
7070
Lam_compile_defs.return_type ->
71-
Lambda.lambda -> J.expression -> t
71+
Lam.t -> J.expression -> t
7272

7373
val handle_block_return :
7474
Lam_compile_defs.st ->
7575
Lam_compile_defs.return_type ->
76-
Lambda.lambda ->
76+
Lam.t ->
7777
J.block -> J.expression -> t
7878

7979
val concat : t list -> t

jscomp/js_stmt_make.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ let try_ ?comment ?with_ ?finally body : t =
347347
comment
348348
}
349349

350-
let unknown_lambda ?(comment="unknown") (lam : Lambda.lambda ) : t =
350+
let unknown_lambda ?(comment="unknown") (lam : Lam.t ) : t =
351351
exp @@ E.str ~comment ~pure:false (Lam_util.string_of_lambda lam)
352352

353353
(* TODO:

jscomp/js_stmt_make.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ val exp : ?comment:string -> J.expression -> t
9595

9696
val return : ?comment:string -> J.expression -> t
9797

98-
val unknown_lambda : ?comment:string -> Lambda.lambda -> t
98+
val unknown_lambda : ?comment:string -> Lam.t -> t
9999

100100
val return_unit : ?comment:string -> unit -> t
101101
(** for ocaml function which returns unit

0 commit comments

Comments
 (0)