Skip to content

Commit

Permalink
update upstream ocaml compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
bobzhang committed Jul 25, 2016
1 parent 66e2260 commit cc68004
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 14 deletions.
5 changes: 2 additions & 3 deletions jscomp/lam.ml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ type primitive =
(* Force lazy values *)
| Plazyforce
(* External call *)
| Pccall of Types.type_expr option Primitive.description
| Pccall of Primitive.description
(* Exceptions *)
| Praise
(* Boolean operations *)
Expand Down Expand Up @@ -200,9 +200,8 @@ module Prim = struct
prim_native_name = "" ;
prim_alloc = false;
prim_native_float = false;
prim_attributes = [];
prim_arity = arity;
prim_ty = None

}
let js_is_nil : t =
mk "js_is_nil" 1
Expand Down
2 changes: 1 addition & 1 deletion jscomp/lam.mli
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ type primitive =
| Psetfloatfield of int * Lambda.set_field_dbg_info
| Pduprecord of Types.record_representation * int
| Plazyforce
| Pccall of Types.type_expr option Primitive.description
| Pccall of Primitive.description
| Praise
| Psequand | Psequor | Pnot
| Pnegint | Paddint | Psubint | Pmulint | Pdivint | Pmodint
Expand Down
6 changes: 3 additions & 3 deletions jscomp/lam_analysis.ml
Original file line number Diff line number Diff line change
Expand Up @@ -318,13 +318,13 @@ let rec eq_lambda (l1 : Lam.t) (l2 : Lam.t) =
and eq_primitive (p : Lam.primitive) (p1 : Lam.primitive) =
match p, p1 with
| Pccall {prim_name = n0 ;
prim_attributes = [];
prim_native_name = nn0;
},
Pccall {prim_name = n1;
prim_attributes = [] ;
prim_native_name = nn1;

} ->
n0 = n1 (* No attributes, should be class api, comparison by name is good *)
n0 = n1 && nn0 = nn1 (* No attributes, should be class api, comparison by name is good *)
| Pfield (n0, _dbg_info0), Pfield (n1, _dbg_info1)
-> n0 = n1
| Psetfield(i0, b0, _dbg_info0), Psetfield(i1, b1, _dbg_info1)
Expand Down
2 changes: 1 addition & 1 deletion jscomp/lam_compile_env.ml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ type module_info = {
pure : bool
}

type primitive_description = Types.type_expr option Primitive.description
type primitive_description = Primitive.description

type key =

Expand Down
2 changes: 1 addition & 1 deletion jscomp/lam_compile_env.mli
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

(** Helper for global Ocaml module index into meaningful names *)

type primitive_description = Types.type_expr option Primitive.description
type primitive_description = Primitive.description

type key =
Ident.t * Env.t * bool
Expand Down
2 changes: 1 addition & 1 deletion jscomp/lam_compile_external_call.ml
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ let translate_ffi (ffi : Ast_external_attributes.ffi ) prim_name


let translate cxt
({prim_name ; prim_attributes; prim_native_name}
({prim_name ; prim_native_name}
: Ast_external_attributes.prim) args =
if Ast_external_attributes.is_bs_external_prefix prim_native_name then
begin
Expand Down
2 changes: 1 addition & 1 deletion jscomp/lam_compile_external_call.mli
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@

val translate :
Lam_compile_defs.cxt ->
Types.type_expr option Primitive.description ->
Primitive.description ->
J.expression list ->
J.expression
2 changes: 1 addition & 1 deletion jscomp/syntax/ast_external_attributes.ml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ type ffi =
| Js_get_index
| Js_set_index

type prim = Types.type_expr option Primitive.description
type prim = Primitive.description

let check_external_module_name ?loc x =
match x with
Expand Down
2 changes: 1 addition & 1 deletion jscomp/syntax/ast_external_attributes.mli
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ type t =
| Bs of arg_kind list * arg_type * ffi
| Normal

type prim = Types.type_expr option Primitive.description
type prim = Primitive.description



Expand Down
2 changes: 1 addition & 1 deletion ocaml
Submodule ocaml updated from be3068 to 4694ee

0 comments on commit cc68004

Please sign in to comment.