Skip to content

Commit

Permalink
Merge f1bac19 into 25c5ffa
Browse files Browse the repository at this point in the history
  • Loading branch information
bobzhang committed Dec 25, 2017
2 parents 25c5ffa + f1bac19 commit 85b962f
Show file tree
Hide file tree
Showing 13 changed files with 3,468 additions and 15 deletions.
18 changes: 11 additions & 7 deletions jscomp/core/lam.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1799,32 +1799,32 @@ let convert exports lam : _ * _ =
and convert_js_primitive (p: Primitive.description) (args : Lambda.lambda list) loc =
let s = p.prim_name in
match () with
| () when s = "#raw_expr" ->
| _ when s = "#raw_expr" ->
begin match args with
| [Lconst( Const_base (Const_string(s,_)))] ->
prim ~primitive:(Praw_js_code_exp s)
~args:[] loc
| _ -> assert false
end
| () when s = "#raw_stmt" ->
| _ when s = "#raw_stmt" ->
begin match args with
| [Lconst( Const_base (Const_string(s,_)))] ->
prim ~primitive:(Praw_js_code_stmt s)
~args:[] loc
| _ -> assert false
end
| () when s = "#debugger" ->
| _ when s = "#debugger" ->
(* ATT: Currently, the arity is one due to PPX *)
prim ~primitive:Pdebugger ~args:[] loc
| () when s = "#null" ->
| _ when s = "#null" ->
Lconst (Const_js_null)

| () when s = "#undefined" ->
| _ when s = "#undefined" ->
Lconst (Const_js_undefined)
| () ->
| _ ->
let primitive =
match s with
| "#apply" -> Pjs_runtime_apply
| "#apply" -> Pjs_runtime_apply
| "#apply1"
| "#apply2"
| "#apply3"
Expand All @@ -1833,6 +1833,10 @@ let convert exports lam : _ * _ =
| "#apply6"
| "#apply7"
| "#apply8" -> Pjs_apply
| "#makemutablelist" ->
Pmakeblock(0,Lambda.Blk_constructor("::",1),Mutable)
| "#setfield1" ->
Psetfield(1, true, Fld_set_na)
| "#undefined_to_opt" -> Pundefined_to_opt
| "#null_undefined_to_opt" -> Pnull_undefined_to_opt
| "#null_to_opt" -> Pnull_to_opt
Expand Down
4 changes: 4 additions & 0 deletions jscomp/others/.depend
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ bs_internalAVLtree.cmj :
bs_internalMutableAVLSet.cmj : bs_internalAVLset.cmj
bs_Hash.cmj : bs_Hash.cmi
bs_Queue.cmj : bs_Array.cmj bs_Queue.cmi
bs_internalLinkList.cmj :
bs_LinkList.cmj : bs_Array.cmj bs.cmj
bs_List.cmj : bs_Array.cmj bs_List.cmi
bs_internalBucketsType.cmj : bs_Array.cmj
bs_internalSetBuckets.cmj : bs_internalBucketsType.cmj bs_Array.cmj bs.cmj
bs_internalBuckets.cmj : bs_internalBucketsType.cmj bs_Array.cmj
Expand Down Expand Up @@ -68,6 +71,7 @@ js_mapperRt.cmi :
bs_Array.cmi :
bs_Hash.cmi :
bs_Queue.cmi :
bs_List.cmi :
bs_HashMap.cmi : bs_Hash.cmi bs_Bag.cmj
bs_HashSet.cmi : bs_Hash.cmi bs_Bag.cmj
bs_HashSetString.cmi :
Expand Down
1 change: 1 addition & 0 deletions jscomp/others/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ SOURCE_LIST= node_path node_fs node_process dict node_module js_array js_string
bs_internalMutableAVL\
bs_Hash\
bs_Queue\
bs_List\
bs_internalBucketsType\
bs_internalSetBuckets\
bs_internalBuckets\
Expand Down
2 changes: 1 addition & 1 deletion jscomp/others/bs.ml
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ module MapInt = Bs_MapInt
module MapString = Bs_MapString
module SetInt = Bs_SetInt
module SetString = Bs_SetString
module List = Bs_List

Loading

0 comments on commit 85b962f

Please sign in to comment.