Protocol/Michelson: UNPAIR instruction
This MR adds an UNPAIR
instruction that behaves as the current UNPAIR
macro.
Motivations for doing it:
- the
UNPAIR
macro is very widely used, promoting it as an instruction diminishes its gas cost which profits almost all contracts (this was the purpose of the incorrect implementation of the peephole optimisation that Carthage removes) - providing an alternative to the
CAR
andCDR
instructions seems required for linear typing; a feature that might be desirable for value stamping (see https://forum.tezosagora.org/t/contract-signatures/1458). Note however that linear alternatives toGET
andUPDATE
should also be added.
Because of the ubiquitous use of the UNPAIR
macro in the testsuite, the difference in the regression log is unfortunately too big to be checked by a human reviewer.
Edited by Raphaël Cauderlier