Merge pull request #8015 from ethereum/yul-trace-unreachable

Add trace for unreachable in Yul Ewasm translation tests
This commit is contained in:
chriseth 2019-12-17 17:42:44 +01:00 committed by GitHub
commit 85a503725c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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)