Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename 'neq' to 'ne'. #67

Merged
merged 1 commit into from
Sep 16, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ml-proto/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ var: <int> | $<name>

unop: ctz | clz | popcnt | ...
binop: add | sub | mul | ...
relop: eq | neq | lt | ...
relop: eq | ne | lt | ...
sign: s|u
align: 1|2|4|8|...
cvtop: trunc_s | trunc_u | extend_s | extend_u | ...
Expand Down
4 changes: 2 additions & 2 deletions ml-proto/src/host/lexer.mll
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ rule token = parse
{ BINARY (floatop t Float32Op.CopySign Float64Op.CopySign) }

| (ixx as t)".eq" { COMPARE (intop t Int32Op.Eq Int64Op.Eq) }
| (ixx as t)".neq" { COMPARE (intop t Int32Op.Neq Int64Op.Neq) }
| (ixx as t)".ne" { COMPARE (intop t Int32Op.Ne Int64Op.Ne) }
| (ixx as t)".lt_s" { COMPARE (intop t Int32Op.LtS Int64Op.LtS) }
| (ixx as t)".lt_u" { COMPARE (intop t Int32Op.LtU Int64Op.LtU) }
| (ixx as t)".le_s" { COMPARE (intop t Int32Op.LeS Int64Op.LeS) }
Expand All @@ -202,7 +202,7 @@ rule token = parse
| (ixx as t)".ge_s" { COMPARE (intop t Int32Op.GeS Int64Op.GeS) }
| (ixx as t)".ge_u" { COMPARE (intop t Int32Op.GeU Int64Op.GtU) }
| (fxx as t)".eq" { COMPARE (floatop t Float32Op.Eq Float64Op.Eq) }
| (fxx as t)".neq" { COMPARE (floatop t Float32Op.Neq Float64Op.Neq) }
| (fxx as t)".ne" { COMPARE (floatop t Float32Op.Ne Float64Op.Ne) }
| (fxx as t)".lt" { COMPARE (floatop t Float32Op.Lt Float64Op.Lt) }
| (fxx as t)".le" { COMPARE (floatop t Float32Op.Le Float64Op.Le) }
| (fxx as t)".gt" { COMPARE (floatop t Float32Op.Gt Float64Op.Gt) }
Expand Down
4 changes: 2 additions & 2 deletions ml-proto/src/spec/arithmetic.ml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ struct
let relop op =
let f = match op with
| Eq -> (=)
| Neq -> (<>)
| Ne -> (<>)
| LtS -> (<)
| LtU -> unsigned lt_big_int
| LeS -> (<=)
Expand Down Expand Up @@ -214,7 +214,7 @@ struct
let relop op =
let f = match op with
| Eq -> (=)
| Neq -> (<>)
| Ne -> (<>)
| Lt -> (<)
| Le -> (<=)
| Gt -> (>)
Expand Down
4 changes: 2 additions & 2 deletions ml-proto/src/spec/ast.ml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ struct
type unop = Clz | Ctz | Popcnt
type binop = Add | Sub | Mul | DivS | DivU | RemS | RemU
| And | Or | Xor | Shl | ShrU | ShrS
type relop = Eq | Neq | LtS | LtU | LeS | LeU | GtS | GtU | GeS | GeU
type relop = Eq | Ne | LtS | LtU | LeS | LeU | GtS | GtU | GeS | GeU
type cvt = ExtendSInt32 | ExtendUInt32 | WrapInt64
| TruncSFloat32 | TruncUFloat32 | TruncSFloat64 | TruncUFloat64
| ReinterpretFloat
Expand All @@ -47,7 +47,7 @@ module FloatOp () =
struct
type unop = Neg | Abs | Ceil | Floor | Trunc | Nearest | Sqrt
type binop = Add | Sub | Mul | Div | CopySign | Min | Max
type relop = Eq | Neq | Lt | Le | Gt | Ge
type relop = Eq | Ne | Lt | Le | Gt | Ge
type cvt = ConvertSInt32 | ConvertUInt32 | ConvertSInt64 | ConvertUInt64
| PromoteFloat32 | DemoteFloat64
| ReinterpretInt
Expand Down
4 changes: 2 additions & 2 deletions ml-proto/test/memory.wasm
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
(i32.store (get_local 2) (get_local 0))
(set_local 1 (i32.load (get_local 2)))
(if
(i32.neq (get_local 0) (get_local 1))
(i32.ne (get_local 0) (get_local 1))
(return (i32.const 0))
)
(set_local 0 (i32.sub (get_local 0) (i32.const 1)))
Expand All @@ -115,7 +115,7 @@
(f64.store/1 (get_local 0) (get_local 2))
(set_local 1 (f64.load/1 (get_local 0)))
(if
(f64.neq (get_local 2) (get_local 1))
(f64.ne (get_local 2) (get_local 1))
(return (i32.const 0))
)
(set_local 0 (i32.sub (get_local 0) (i32.const 1)))
Expand Down