From d41552bc5370ed45bbdf6232b8a018ed4f1efe32 Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Wed, 4 Nov 2015 09:06:24 -0800 Subject: [PATCH] Fix format/style nits --- ml-proto/host/lexer.mll | 5 +++-- ml-proto/spec/check.ml | 2 +- ml-proto/spec/sugar.ml | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ml-proto/host/lexer.mll b/ml-proto/host/lexer.mll index 187f25e45c..357678418a 100644 --- a/ml-proto/host/lexer.mll +++ b/ml-proto/host/lexer.mll @@ -231,8 +231,6 @@ rule token = parse { CONVERT (floatop t Float32Op.ConvertSInt64 Float64Op.ConvertSInt64) } | (fxx as t)".convert_u/i64" { CONVERT (floatop t Float32Op.ConvertUInt64 Float64Op.ConvertUInt64) } - | (ixx as t)".select" { SELECT ( intop t Int32Op.Select Int64Op.Select) } - | (fxx as t)".select" { SELECT ( floatop t Float32Op.Select Float64Op.Select) } | "f64.promote/f32" { CONVERT (Values.Float64 Float64Op.PromoteFloat32) } | "f32.demote/f64" { CONVERT (Values.Float32 Float32Op.DemoteFloat64) } | "f32.reinterpret/i32" { CONVERT (Values.Float32 Float32Op.ReinterpretInt) } @@ -240,6 +238,9 @@ rule token = parse | "i32.reinterpret/f32" { CONVERT (Values.Int32 Int32Op.ReinterpretFloat) } | "i64.reinterpret/f64" { CONVERT (Values.Int64 Int64Op.ReinterpretFloat) } + | (ixx as t)".select" { SELECT ( intop t Int32Op.Select Int64Op.Select) } + | (fxx as t)".select" { SELECT ( floatop t Float32Op.Select Float64Op.Select) } + | "page_size" { PAGE_SIZE } | "memory_size" { MEMORY_SIZE } | "grow_memory" { GROW_MEMORY } diff --git a/ml-proto/spec/check.ml b/ml-proto/spec/check.ml index 405a2ed379..574e877eba 100644 --- a/ml-proto/spec/check.ml +++ b/ml-proto/spec/check.ml @@ -216,7 +216,7 @@ let rec check_expr c et e = let t = type_selectop selectop in check_expr c (Some Int32Type) e1; check_expr c (Some t) e2; - check_expr c (Some t) e3; + check_expr c (Some t) e3 | Host (hostop, es) -> let ({ins; out}, hasmem) = type_hostop hostop in diff --git a/ml-proto/spec/sugar.ml b/ml-proto/spec/sugar.ml index c625f1537a..7e0ad43c55 100644 --- a/ml-proto/spec/sugar.ml +++ b/ml-proto/spec/sugar.ml @@ -86,7 +86,7 @@ let convert (cvt, e) = Convert (cvt, e) let select (selectop, cond, e1, e2) = - Select(selectop, cond, e1, e2) + Select (selectop, cond, e1, e2) let host (hostop, es) = Host (hostop, es)