aboutsummaryrefslogtreecommitdiffstats
path: root/solc
diff options
context:
space:
mode:
Diffstat (limited to 'solc')
-rw-r--r--solc/CommandLineInterface.cpp24
-rw-r--r--solc/jsonCompiler.cpp6
2 files changed, 15 insertions, 15 deletions
diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp
index 6a90c69f..c34ffee0 100644
--- a/solc/CommandLineInterface.cpp
+++ b/solc/CommandLineInterface.cpp
@@ -123,31 +123,31 @@ void CommandLineInterface::handleBinary(string const& _contract)
if (m_args.count(g_argBinaryStr))
{
if (m_args.count("output-dir"))
- createFile(_contract + ".bin", toHex(m_compiler->bytecode(_contract)));
+ createFile(_contract + ".bin", m_compiler->object(_contract).toHex());
else
{
cout << "Binary: " << endl;
- cout << toHex(m_compiler->bytecode(_contract)) << endl;
+ cout << m_compiler->object(_contract).toHex() << endl;
}
}
if (m_args.count(g_argCloneBinaryStr))
{
if (m_args.count("output-dir"))
- createFile(_contract + ".clone_bin", toHex(m_compiler->cloneBytecode(_contract)));
+ createFile(_contract + ".clone_bin", m_compiler->cloneObject(_contract).toHex());
else
{
cout << "Clone Binary: " << endl;
- cout << toHex(m_compiler->cloneBytecode(_contract)) << endl;
+ cout << m_compiler->cloneObject(_contract).toHex() << endl;
}
}
if (m_args.count(g_argRuntimeBinaryStr))
{
if (m_args.count("output-dir"))
- createFile(_contract + ".bin", toHex(m_compiler->runtimeBytecode(_contract)));
+ createFile(_contract + ".bin", m_compiler->runtimeObject(_contract).toHex());
else
{
cout << "Binary of the runtime part: " << endl;
- cout << toHex(m_compiler->runtimeBytecode(_contract)) << endl;
+ cout << m_compiler->runtimeObject(_contract).toHex() << endl;
}
}
}
@@ -155,11 +155,11 @@ void CommandLineInterface::handleBinary(string const& _contract)
void CommandLineInterface::handleOpcode(string const& _contract)
{
if (m_args.count("output-dir"))
- createFile(_contract + ".opcode", eth::disassemble(m_compiler->bytecode(_contract)));
+ createFile(_contract + ".opcode", eth::disassemble(m_compiler->object(_contract).bytecode));
else
{
cout << "Opcodes: " << endl;
- cout << eth::disassemble(m_compiler->bytecode(_contract));
+ cout << eth::disassemble(m_compiler->object(_contract).bytecode);
cout << endl;
}
@@ -242,7 +242,7 @@ void CommandLineInterface::handleGasEstimation(string const& _contract)
if (eth::AssemblyItems const* items = m_compiler->assemblyItems(_contract))
{
Gas gas = GasEstimator::functionalEstimation(*items);
- u256 bytecodeSize(m_compiler->runtimeBytecode(_contract).size());
+ u256 bytecodeSize(m_compiler->runtimeObject(_contract).bytecode.size());
cout << "construction:" << endl;
cout << " " << gas << " + " << (bytecodeSize * eth::c_createDataGas) << " = ";
gas += bytecodeSize * eth::c_createDataGas;
@@ -500,11 +500,11 @@ void CommandLineInterface::handleCombinedJSON()
if (requests.count("abi"))
contractData["abi"] = m_compiler->interface(contractName);
if (requests.count("bin"))
- contractData["bin"] = toHex(m_compiler->bytecode(contractName));
+ contractData["bin"] = m_compiler->runtimeObject(contractName).toHex();
if (requests.count("clone-bin"))
- contractData["clone-bin"] = toHex(m_compiler->cloneBytecode(contractName));
+ contractData["clone-bin"] = m_compiler->cloneObject(contractName).toHex();
if (requests.count("opcodes"))
- contractData["opcodes"] = eth::disassemble(m_compiler->bytecode(contractName));
+ contractData["opcodes"] = eth::disassemble(m_compiler->object(contractName).bytecode);
if (requests.count("asm"))
{
ostringstream unused;
diff --git a/solc/jsonCompiler.cpp b/solc/jsonCompiler.cpp
index b6b9f512..b7bb9fe7 100644
--- a/solc/jsonCompiler.cpp
+++ b/solc/jsonCompiler.cpp
@@ -76,7 +76,7 @@ Json::Value estimateGas(CompilerStack const& _compiler, string const& _contract)
if (eth::AssemblyItems const* items = _compiler.assemblyItems(_contract))
{
Gas gas = GasEstimator::functionalEstimation(*items);
- u256 bytecodeSize(_compiler.runtimeBytecode(_contract).size());
+ u256 bytecodeSize(_compiler.runtimeObject(_contract).bytecode.size());
Json::Value creationGas(Json::arrayValue);
creationGas[0] = gasToJson(gas);
creationGas[1] = gasToJson(bytecodeSize * eth::c_createDataGas);
@@ -168,8 +168,8 @@ string compile(string _input, bool _optimize)
Json::Value contractData(Json::objectValue);
contractData["solidity_interface"] = compiler.solidityInterface(contractName);
contractData["interface"] = compiler.interface(contractName);
- contractData["bytecode"] = toHex(compiler.bytecode(contractName));
- contractData["opcodes"] = eth::disassemble(compiler.bytecode(contractName));
+ contractData["bytecode"] = compiler.object(contractName).toHex();
+ contractData["opcodes"] = eth::disassemble(compiler.object(contractName).bytecode);
contractData["functionHashes"] = functionHashes(compiler.contractDefinition(contractName));
contractData["gasEstimates"] = estimateGas(compiler, contractName);
ostringstream unused;