Add trace for unreachable in Yul Ewasm translation tests

This commit is contained in:
Alex Beregszaszi 2019-12-15 13:26:43 +00:00
parent 1c01c69eab
commit 2a808e4f32
25 changed files with 27 additions and 0 deletions

View File

@ -4,6 +4,7 @@
}
// ----
// Trace:
// INVALID()
// Memory dump:
// 0: 0000000000000000000000000000000011111111000000000000000000000000
// Storage dump:

View File

@ -3,5 +3,6 @@
}
// ----
// Trace:
// INVALID()
// Memory dump:
// Storage dump:

View File

@ -5,5 +5,6 @@
// EVMVersion: >=istanbul
// ----
// Trace:
// INVALID()
// Memory dump:
// Storage dump:

View File

@ -3,5 +3,6 @@
}
// ----
// Trace:
// INVALID()
// Memory dump:
// Storage dump:

View File

@ -4,6 +4,7 @@
}
// ----
// Trace:
// INVALID()
// Memory dump:
// 0: 0000000000000000000000000000000011111111000000000000000000000000
// Storage dump:

View File

@ -5,6 +5,7 @@
// EVMVersion: >=constantinople
// ----
// Trace:
// INVALID()
// Memory dump:
// 0: 0000000000000000000000000000000011111111000000000000000000000000
// Storage dump:

View File

@ -3,6 +3,7 @@
}
// ----
// Trace:
// INVALID()
// Memory dump:
// 0: 0000000000000000000000000000000011111111000000000000000000000000
// Storage dump:

View File

@ -7,6 +7,7 @@
}
// ----
// Trace:
// INVALID()
// Memory dump:
// 20: 0000000000000000000000000000000000000000000000000000000000001234
// Storage dump:

View File

@ -4,5 +4,6 @@
}
// ----
// Trace:
// INVALID()
// Memory dump:
// Storage dump:

View File

@ -3,5 +3,6 @@
}
// ----
// Trace:
// INVALID()
// Memory dump:
// Storage dump:

View File

@ -3,5 +3,6 @@
}
// ----
// Trace:
// INVALID()
// Memory dump:
// Storage dump:

View File

@ -3,5 +3,6 @@
}
// ----
// Trace:
// INVALID()
// Memory dump:
// Storage dump:

View File

@ -3,5 +3,6 @@
}
// ----
// Trace:
// INVALID()
// Memory dump:
// Storage dump:

View File

@ -3,5 +3,6 @@
}
// ----
// Trace:
// INVALID()
// Memory dump:
// Storage dump:

View File

@ -7,5 +7,6 @@
}
// ----
// Trace:
// INVALID()
// Memory dump:
// Storage dump:

View File

@ -8,6 +8,7 @@
}
// ----
// Trace:
// INVALID()
// Memory dump:
// 60: 00000000000000000000000000000000ffffffffffffffffffffffffffffffff
// 80: ffffffffffffffffffffffffffffffff00000000000000000000000000000000

View File

@ -3,5 +3,6 @@
}
// ----
// Trace:
// INVALID()
// Memory dump:
// Storage dump:

View File

@ -5,5 +5,6 @@
// EVMVersion: >=istanbul
// ----
// Trace:
// INVALID()
// Memory dump:
// Storage dump:

View File

@ -3,6 +3,7 @@
}
// ----
// Trace:
// INVALID()
// Memory dump:
// 0: 0000000000000000000000000000000011111111000000000000000000000000
// Storage dump:

View File

@ -3,6 +3,7 @@
}
// ----
// Trace:
// INVALID()
// Memory dump:
// 0: 0000000000000000000000000000000011111111000000000000000000000000
// Storage dump:

View File

@ -5,6 +5,7 @@
}
// ----
// Trace:
// INVALID()
// Memory dump:
// 0: 0000000000000000000000000000000000000000000000000000000000000014
// 40: 636f6465636f6465636f6465636f6465636f6465000000000000000000000000

View File

@ -7,6 +7,7 @@
// EVMVersion: >=constantinople
// ----
// Trace:
// INVALID()
// Memory dump:
// 0: 0000000000000000000000000000000000000000000000000000000000000014
// 80: 636f6465636f6465636f6465636f6465636f6465000000000000000000000000

View File

@ -3,6 +3,7 @@
}
// ----
// Trace:
// INVALID()
// Memory dump:
// 0: 0000000000000000000000000000000011111111000000000000000000000000
// Storage dump:

View File

@ -5,6 +5,7 @@
// EVMVersion: >=byzantium
// ----
// Trace:
// INVALID()
// Memory dump:
// 0: 0000000000000000000000000000000011111111000000000000000000000000
// Storage dump:

View File

@ -79,7 +79,10 @@ u256 EWasmBuiltinInterpreter::evalBuiltin(YulString _fun, vector<u256> const& _a
else if (_fun == "drop"_yulstring)
return {};
else if (_fun == "unreachable"_yulstring)
{
logTrace(eth::Instruction::INVALID, {});
throw ExplicitlyTerminated();
}
else if (_fun == "i64.add"_yulstring)
return arg[0] + arg[1];
else if (_fun == "i64.sub"_yulstring)