mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-21 20:26:41 +00:00
Got rid of some gcc warnings
This commit is contained in:
parent
e24c9c2286
commit
af0530ba3d
3 changed files with 6 additions and 29 deletions
|
|
@ -31,14 +31,13 @@ struct ExtData
|
||||||
};
|
};
|
||||||
|
|
||||||
Ext::Ext(RuntimeManager& _runtimeManager):
|
Ext::Ext(RuntimeManager& _runtimeManager):
|
||||||
RuntimeHelper(_runtimeManager)
|
RuntimeHelper(_runtimeManager),
|
||||||
|
m_data()
|
||||||
{
|
{
|
||||||
auto&& ctx = m_builder.getContext();
|
auto&& ctx = m_builder.getContext();
|
||||||
auto module = getModule();
|
auto module = getModule();
|
||||||
|
|
||||||
auto i256Ty = m_builder.getIntNTy(256);
|
auto i256Ty = m_builder.getIntNTy(256);
|
||||||
auto i256PtrTy = i256Ty->getPointerTo();
|
|
||||||
auto i8PtrTy = m_builder.getInt8PtrTy();
|
|
||||||
|
|
||||||
m_args[0] = m_builder.CreateAlloca(i256Ty, nullptr, "ext.index");
|
m_args[0] = m_builder.CreateAlloca(i256Ty, nullptr, "ext.index");
|
||||||
m_args[1] = m_builder.CreateAlloca(i256Ty, nullptr, "ext.value");
|
m_args[1] = m_builder.CreateAlloca(i256Ty, nullptr, "ext.value");
|
||||||
|
|
@ -266,7 +265,7 @@ extern "C"
|
||||||
*_ret = *reinterpret_cast<i256*>(&hash);
|
*_ret = *reinterpret_cast<i256*>(&hash);
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT void ext_exp(Runtime* _rt, i256* _left, i256* _right, i256* _ret)
|
EXPORT void ext_exp(Runtime*, i256* _left, i256* _right, i256* _ret)
|
||||||
{
|
{
|
||||||
bigint left = llvm2eth(*_left);
|
bigint left = llvm2eth(*_left);
|
||||||
bigint right = llvm2eth(*_right);
|
bigint right = llvm2eth(*_right);
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ llvm::Function* Memory::createRequireFunc(GasMeter& _gasMeter, RuntimeManager& _
|
||||||
return func;
|
return func;
|
||||||
}
|
}
|
||||||
|
|
||||||
llvm::Function* Memory::createFunc(bool _isStore, llvm::Type* _valueType, GasMeter& _gasMeter)
|
llvm::Function* Memory::createFunc(bool _isStore, llvm::Type* _valueType, GasMeter&)
|
||||||
{
|
{
|
||||||
auto isWord = _valueType == Type::i256;
|
auto isWord = _valueType == Type::i256;
|
||||||
|
|
||||||
|
|
@ -228,28 +228,4 @@ extern "C"
|
||||||
return memory.data();
|
return memory.data();
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT void evmccrt_memory_dump(uint64_t _begin, uint64_t _end)
|
|
||||||
{
|
|
||||||
//if (_end == 0)
|
|
||||||
// _end = Runtime::getMemory().size();
|
|
||||||
|
|
||||||
//std::cerr << "MEMORY: active size: " << std::dec
|
|
||||||
// << Runtime::getMemory().size() / 32 << " words\n";
|
|
||||||
//std::cerr << "MEMORY: dump from " << std::dec
|
|
||||||
// << _begin << " to " << _end << ":";
|
|
||||||
//if (_end <= _begin)
|
|
||||||
// return;
|
|
||||||
|
|
||||||
//_begin = _begin / 16 * 16;
|
|
||||||
//for (size_t i = _begin; i < _end; i++)
|
|
||||||
//{
|
|
||||||
// if ((i - _begin) % 16 == 0)
|
|
||||||
// std::cerr << '\n' << std::dec << i << ": ";
|
|
||||||
|
|
||||||
// auto b = Runtime::getMemory()[i];
|
|
||||||
// std::cerr << std::hex << std::setw(2) << static_cast<int>(b) << ' ';
|
|
||||||
//}
|
|
||||||
//std::cerr << std::endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // extern "C"
|
} // extern "C"
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,8 @@ bytesConstRef VM::go(ExtVMFace& _ext, OnOpFunc const&, uint64_t)
|
||||||
BOOST_THROW_EXCEPTION(StackTooSmall(1, 0));
|
BOOST_THROW_EXCEPTION(StackTooSmall(1, 0));
|
||||||
case ReturnCode::BadInstruction:
|
case ReturnCode::BadInstruction:
|
||||||
BOOST_THROW_EXCEPTION(BadInstruction());
|
BOOST_THROW_EXCEPTION(BadInstruction());
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_output = std::move(engine.returnData);
|
m_output = std::move(engine.returnData);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue