mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Commandline interface additions for webassembly binary.
This commit is contained in:
parent
e79a32e9d5
commit
587c87b15b
@ -7,6 +7,7 @@ Compiler Features:
|
||||
* Code Generator: Use SELFBALANCE for ``address(this).balance`` if using Istanbul EVM
|
||||
* SMTChecker: Add break/continue support to the CHC engine.
|
||||
* SMTChecker: Support assignments to multi-dimensional arrays and mappings.
|
||||
* EWasm: Experimental EWasm binary output.
|
||||
|
||||
|
||||
Bugfixes:
|
||||
|
@ -907,6 +907,8 @@ Json::Value StandardCompiler::compileSolidity(StandardCompiler::InputsAndSetting
|
||||
// eWasm
|
||||
if (compilationSuccess && isArtifactRequested(_inputsAndSettings.outputSelection, file, name, "ewasm.wast", wildcardMatchesExperimental))
|
||||
contractData["ewasm"]["wast"] = compilerStack.eWasm(contractName);
|
||||
if (compilationSuccess && isArtifactRequested(_inputsAndSettings.outputSelection, file, name, "ewasm.wasm", wildcardMatchesExperimental))
|
||||
contractData["ewasm"]["wasm"] = compilerStack.eWasmObject(contractName).toHex();
|
||||
|
||||
// EVM
|
||||
Json::Value evmData(Json::objectValue);
|
||||
|
@ -318,11 +318,18 @@ void CommandLineInterface::handleEWasm(string const& _contractName)
|
||||
if (m_args.count(g_argEWasm))
|
||||
{
|
||||
if (m_args.count(g_argOutputDir))
|
||||
{
|
||||
createFile(m_compiler->filesystemFriendlyName(_contractName) + ".wast", m_compiler->eWasm(_contractName));
|
||||
createFile(
|
||||
m_compiler->filesystemFriendlyName(_contractName) + ".wasm",
|
||||
asString(m_compiler->eWasmObject(_contractName).bytecode)
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
sout() << "eWasm: " << endl;
|
||||
sout() << "EWasm text: " << endl;
|
||||
sout() << m_compiler->eWasm(_contractName) << endl;
|
||||
sout() << "EWasm binary (hex): " << m_compiler->eWasmObject(_contractName).toHex() << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user