From cc6800424b5d97526080b09565a3b85cac37d8ac Mon Sep 17 00:00:00 2001 From: Hongbo Zhang Date: Sun, 24 Jul 2016 22:05:19 -0400 Subject: [PATCH] update upstream ocaml compiler --- jscomp/lam.ml | 5 ++--- jscomp/lam.mli | 2 +- jscomp/lam_analysis.ml | 6 +++--- jscomp/lam_compile_env.ml | 2 +- jscomp/lam_compile_env.mli | 2 +- jscomp/lam_compile_external_call.ml | 2 +- jscomp/lam_compile_external_call.mli | 2 +- jscomp/syntax/ast_external_attributes.ml | 2 +- jscomp/syntax/ast_external_attributes.mli | 2 +- ocaml | 2 +- 10 files changed, 13 insertions(+), 14 deletions(-) diff --git a/jscomp/lam.ml b/jscomp/lam.ml index 6af13f98a1..3e1ba20acb 100644 --- a/jscomp/lam.ml +++ b/jscomp/lam.ml @@ -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 *) @@ -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 diff --git a/jscomp/lam.mli b/jscomp/lam.mli index 71db1cab62..7d0647d0b2 100644 --- a/jscomp/lam.mli +++ b/jscomp/lam.mli @@ -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 diff --git a/jscomp/lam_analysis.ml b/jscomp/lam_analysis.ml index c735bfb5a8..a8fc4a367d 100644 --- a/jscomp/lam_analysis.ml +++ b/jscomp/lam_analysis.ml @@ -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) diff --git a/jscomp/lam_compile_env.ml b/jscomp/lam_compile_env.ml index 8c7a9b2e0d..7e21345558 100644 --- a/jscomp/lam_compile_env.ml +++ b/jscomp/lam_compile_env.ml @@ -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 = diff --git a/jscomp/lam_compile_env.mli b/jscomp/lam_compile_env.mli index 852038b2fb..0a1c27f2b2 100644 --- a/jscomp/lam_compile_env.mli +++ b/jscomp/lam_compile_env.mli @@ -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 diff --git a/jscomp/lam_compile_external_call.ml b/jscomp/lam_compile_external_call.ml index f5d40a3813..2fd0ac22c3 100644 --- a/jscomp/lam_compile_external_call.ml +++ b/jscomp/lam_compile_external_call.ml @@ -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 diff --git a/jscomp/lam_compile_external_call.mli b/jscomp/lam_compile_external_call.mli index 826756300a..bcf402c809 100644 --- a/jscomp/lam_compile_external_call.mli +++ b/jscomp/lam_compile_external_call.mli @@ -45,6 +45,6 @@ val translate : Lam_compile_defs.cxt -> - Types.type_expr option Primitive.description -> + Primitive.description -> J.expression list -> J.expression diff --git a/jscomp/syntax/ast_external_attributes.ml b/jscomp/syntax/ast_external_attributes.ml index 24969f1375..a0741a19b2 100644 --- a/jscomp/syntax/ast_external_attributes.ml +++ b/jscomp/syntax/ast_external_attributes.ml @@ -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 diff --git a/jscomp/syntax/ast_external_attributes.mli b/jscomp/syntax/ast_external_attributes.mli index 2a4695c6e1..02ec867f14 100644 --- a/jscomp/syntax/ast_external_attributes.mli +++ b/jscomp/syntax/ast_external_attributes.mli @@ -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 diff --git a/ocaml b/ocaml index be3068f776..4694eed709 160000 --- a/ocaml +++ b/ocaml @@ -1 +1 @@ -Subproject commit be3068f776b609045f859a80f04c382c74f8cfb1 +Subproject commit 4694eed709645580b684131cae903d6887f1d73a