aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2017-01-13 00:52:23 +0800
committerchriseth <c@ethdev.com>2017-01-13 00:53:06 +0800
commit3cfa851f6f4175ef17c4fc1079cda67b516a2d72 (patch)
treef9e385002d1a97f5c88733f13669ba0d28420658
parenta32def5c42af6785ca83842fb583f9bf9d427fd4 (diff)
downloaddexon-solidity-3cfa851f6f4175ef17c4fc1079cda67b516a2d72.tar.gz
dexon-solidity-3cfa851f6f4175ef17c4fc1079cda67b516a2d72.tar.zst
dexon-solidity-3cfa851f6f4175ef17c4fc1079cda67b516a2d72.zip
Minor changes from review.
-rw-r--r--Changelog.md2
-rw-r--r--cmake/EthCompilerSettings.cmake2
-rw-r--r--libevmasm/AssemblyItem.h1
-rw-r--r--libevmasm/ConstantOptimiser.cpp2
4 files changed, 3 insertions, 4 deletions
diff --git a/Changelog.md b/Changelog.md
index af484517..3e999d13 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -1,7 +1,7 @@
### 0.4.8 (unreleased)
Features:
- * Optimiser: Performance improments.
+ * Optimiser: Performance improvements.
* Output: Print assembly in new standardized Solidity assembly format.
Bugfixes:
diff --git a/cmake/EthCompilerSettings.cmake b/cmake/EthCompilerSettings.cmake
index 65742dfb..c734423b 100644
--- a/cmake/EthCompilerSettings.cmake
+++ b/cmake/EthCompilerSettings.cmake
@@ -71,7 +71,7 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA
add_compile_options(-fPIC)
# Configuration-specific compiler settings.
- set(CMAKE_CXX_FLAGS_DEBUG " -g -DETH_DEBUG")
+ set(CMAKE_CXX_FLAGS_DEBUG "-Og -g -DETH_DEBUG")
set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
diff --git a/libevmasm/AssemblyItem.h b/libevmasm/AssemblyItem.h
index 7fcaa145..002b3c87 100644
--- a/libevmasm/AssemblyItem.h
+++ b/libevmasm/AssemblyItem.h
@@ -86,7 +86,6 @@ public:
AssemblyItemType type() const { return m_type; }
u256 const& data() const { assertThrow(m_type != Operation, Exception, ""); return *m_data; }
- //void setType(AssemblyItemType const _type) { m_type = _type; }
void setData(u256 const& _data) { assertThrow(m_type != Operation, Exception, ""); m_data = std::make_shared<u256>(_data); }
/// @returns the instruction of this item (only valid if type() == Operation)
diff --git a/libevmasm/ConstantOptimiser.cpp b/libevmasm/ConstantOptimiser.cpp
index 601ce812..86244e17 100644
--- a/libevmasm/ConstantOptimiser.cpp
+++ b/libevmasm/ConstantOptimiser.cpp
@@ -60,7 +60,7 @@ unsigned ConstantOptimisationMethod::optimiseConstants(
replacement = copy.execute(_assembly);
optimisations++;
}
- else if (computeGas < literalGas && computeGas < copyGas)
+ else if (computeGas < literalGas && computeGas <= copyGas)
{
replacement = compute.execute(_assembly);
optimisations++;