Some wasm related type fixes.

This commit is contained in:
chriseth 2020-02-19 16:56:53 +01:00
parent a52305d3bd
commit 6b272faec0
2 changed files with 7 additions and 3 deletions

View File

@ -1251,8 +1251,12 @@ Object EVMToEwasmTranslator::run(Object const& _object)
AsmAnalyzer analyzer(*ret.analysisInfo, errorReporter, WasmDialect::instance(), {}, _object.dataNames());
if (!analyzer.analyze(*ret.code))
{
// TODO the errors here are "wrong" because they have invalid source references!
string message;
string message = "Invalid code generated after EVM to wasm translation.\n";
message += "Note that the source locations in the errors below will reference the original, not the translated code.\n";
message += "Translated code:\n";
message += "----------------------------------\n";
message += ret.toString(&WasmDialect::instance());
message += "----------------------------------\n";
for (auto const& err: errors)
message += langutil::SourceReferenceFormatter::formatErrorInformation(*err);
yulAssert(false, message);

View File

@ -53,7 +53,7 @@ namespace solidity::yul
* take four times the parameters and each of type u64.
* In addition, it uses a single other builtin function called `or_bool` that
* takes four u64 parameters and is supposed to return the logical disjunction
* of them as a u64 value. If this name is already used somewhere, it is renamed.
* of them as a i32 value. If this name is already used somewhere, it is renamed.
*
* Prerequisite: Disambiguator, ForLoopConditionIntoBody, ExpressionSplitter
*/