Michelson: removes NOP instruction from surface syntax

This commit is contained in:
Milo Davis 2017-07-20 15:51:07 +02:00 committed by Benjamin Canou
parent b52d4a78d9
commit b320d43259
4 changed files with 3 additions and 8 deletions

View File

@ -133,7 +133,6 @@ with the following JSON script description.
| "EXEC" | "EXEC"
| { "DIP": [ [ /* instruction */ ... ] ] } | { "DIP": [ [ /* instruction */ ... ] ] }
| "FAIL" | "FAIL"
| "NOP"
| "CONCAT" | "CONCAT"
| "ADD" | "ADD"
| "SUB" | "SUB"

View File

@ -1810,7 +1810,6 @@ X - Full grammar
| EXEC | EXEC
| DIP { <instruction> ... } | DIP { <instruction> ... }
| FAIL | FAIL
| NOP
| CONCAT | CONCAT
| ADD | ADD
| SUB | SUB

View File

@ -333,7 +333,7 @@ let rec interp
| Fail, _ -> | Fail, _ ->
fail (Reject loc) fail (Reject loc)
| Nop, stack -> | Nop, stack ->
logged_return (stack, qta - 1, ctxt) logged_return (stack, qta, ctxt)
(* comparison *) (* comparison *)
| Compare Bool_key, Item (a, Item (b, rest)) -> | Compare Bool_key, Item (a, Item (b, rest)) ->
let cmpres = Compare.Bool.compare a b in let cmpres = Compare.Bool.compare a b in

View File

@ -1041,9 +1041,6 @@ and parse_instr
bef -> bef ->
let descr aft = { loc ; instr = Fail ; bef ; aft } in let descr aft = { loc ; instr = Fail ; bef ; aft } in
return (Failed { descr }) return (Failed { descr })
| Prim (loc, "NOP", []),
stack ->
return (typed loc (Nop, stack))
(* timestamp operations *) (* timestamp operations *)
| Prim (loc, "ADD", []), | Prim (loc, "ADD", []),
Item_t (Timestamp_t, Item_t (Int_t kind, rest)) -> Item_t (Timestamp_t, Item_t (Int_t kind, rest)) ->
@ -1290,7 +1287,7 @@ and parse_instr
| Prim (loc, ("DROP" | "DUP" | "SWAP" | "SOME" | "UNIT" | Prim (loc, ("DROP" | "DUP" | "SWAP" | "SOME" | "UNIT"
| "PAIR" | "CAR" | "CDR" | "CONS" | "PAIR" | "CAR" | "CDR" | "CONS"
| "MEM" | "UPDATE" | "MAP" | "REDUCE" | "MEM" | "UPDATE" | "MAP" | "REDUCE"
| "GET" | "EXEC" | "FAIL" | "NOP" | "GET" | "EXEC" | "FAIL"
| "CONCAT" | "ADD" | "SUB" | "CONCAT" | "ADD" | "SUB"
| "MUL" | "DIV" | "MOD" | "OR" | "AND" | "XOR" | "MUL" | "DIV" | "MOD" | "OR" | "AND" | "XOR"
| "NOT" | "CHECKED_ABS" | "CHECKED_NEG" | "NOT" | "CHECKED_ABS" | "CHECKED_NEG"
@ -1362,7 +1359,7 @@ and parse_instr
[ "DROP" ; "DUP" ; "SWAP" ; "SOME" ; "UNIT" ; [ "DROP" ; "DUP" ; "SWAP" ; "SOME" ; "UNIT" ;
"PAIR" ; "CAR" ; "CDR" ; "CONS" ; "PAIR" ; "CAR" ; "CDR" ; "CONS" ;
"MEM" ; "UPDATE" ; "MAP" ; "REDUCE" ; "MEM" ; "UPDATE" ; "MAP" ; "REDUCE" ;
"GET" ; "EXEC" ; "FAIL" ; "NOP" ; "GET" ; "EXEC" ; "FAIL" ;
"CONCAT" ; "ADD" ; "SUB" ; "CONCAT" ; "ADD" ; "SUB" ;
"MUL" ; "DIV" ; "MOD" ; "OR" ; "AND" ; "XOR" ; "MUL" ; "DIV" ; "MOD" ; "OR" ; "AND" ; "XOR" ;
"NOT" ; "CHECKED_ABS" ; "CHECKED_NEG" ; "NOT" ; "CHECKED_ABS" ; "CHECKED_NEG" ;