From be4e3e0025df1b82996554d98785bd23dde107bd Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Wed, 18 Mar 2015 12:56:50 +0100 Subject: [PATCH] Extensive pathway for reporting transaction execution results. --- libevmjit-cpp/JitVM.cpp | 4 ++-- libevmjit/Common.h | 2 +- libevmjit/Compiler.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libevmjit-cpp/JitVM.cpp b/libevmjit-cpp/JitVM.cpp index e28fcd39f..84cc41dd1 100644 --- a/libevmjit-cpp/JitVM.cpp +++ b/libevmjit-cpp/JitVM.cpp @@ -69,8 +69,8 @@ bytesConstRef JitVM::go(ExtVMFace& _ext, OnOpFunc const& _onOp, uint64_t _step) BOOST_THROW_EXCEPTION(BadJumpDestination()); case ReturnCode::OutOfGas: BOOST_THROW_EXCEPTION(OutOfGas()); - case ReturnCode::StackTooSmall: - BOOST_THROW_EXCEPTION(StackTooSmall()); + case ReturnCode::StackUnderflow: + BOOST_THROW_EXCEPTION(StackUnderflow()); case ReturnCode::BadInstruction: BOOST_THROW_EXCEPTION(BadInstruction()); case ReturnCode::LinkerWorkaround: // never happens diff --git a/libevmjit/Common.h b/libevmjit/Common.h index 62731292f..e564e0702 100644 --- a/libevmjit/Common.h +++ b/libevmjit/Common.h @@ -33,7 +33,7 @@ enum class ReturnCode // Standard error codes OutOfGas = -1, - StackTooSmall = -2, + StackUnderflow = -2, BadJumpDestination = -3, BadInstruction = -4, Rejected = -5, ///< Input data (code, gas, block info, etc.) does not meet JIT requirement and execution request has been rejected diff --git a/libevmjit/Compiler.cpp b/libevmjit/Compiler.cpp index de48e8ef9..2039b5d10 100644 --- a/libevmjit/Compiler.cpp +++ b/libevmjit/Compiler.cpp @@ -516,7 +516,7 @@ void Compiler::compileBasicBlock(BasicBlock& _basicBlock, RuntimeManager& _runti auto val = stack.pop(); static_cast(val); // Generate a dummy use of val to make sure that a get(0) will be emitted at this point, - // so that StackTooSmall will be thrown + // so that StackUnderflow will be thrown // m_builder.CreateICmpEQ(val, val, "dummy"); break; }