Commit Graph

169 Commits

Author SHA1 Message Date
Alex Beregszaszi
037b97ef4a Replace MOD with AND if constant is power of 2 2018-02-12 22:47:04 +00:00
chriseth
c961a3079d Turn simplification rule tuple into struct. 2018-02-06 22:51:30 +01:00
chriseth
65c31ecaeb Remove recursive call to simplify with reversed arguments.
(We now have explicit rules for that).
2018-02-06 22:51:30 +01:00
chriseth
295f8c07ad Explicitly add reversed operands for commutative operations. 2018-02-06 22:51:30 +01:00
chriseth
9eea3f29ba Expression simplifier. 2018-02-06 22:51:30 +01:00
chriseth
b8074cdf78 Add flag to indicate whether it can be applied to expressions with side-effects. 2018-02-06 22:51:30 +01:00
chriseth
491d6d3e0c Move out the rule list. 2018-02-06 22:51:30 +01:00
chriseth
6807010dc7 Prevent libraries from being called. 2018-01-19 16:27:44 +01:00
chriseth
95cf9266ab Movability. 2018-01-12 17:48:51 +01:00
Isaac van Bakel
83f326525e Replaced solAssert in Jumpdest optimization
This is the only use of solAssert in libevmasm, and the only dependency
on libsolidity.
There is no justification for why the illegal state is checked here.
2017-11-25 21:51:27 +00:00
chriseth
7989fc4c35 Merge pull request #3077 from ethereum/optimze_pops
Assume peephole optimizer was successful if number of pops increased.
2017-10-16 22:11:45 +02:00
chriseth
f5e91e4a94 Throw on too many peephole optimizer iterations. 2017-10-16 18:45:21 +02:00
chriseth
082e7b6a9e Allow `gas` in view functions. 2017-10-16 13:28:44 +02:00
chriseth
7c94e5462a Assume peephole optimizer was successful if number of pops increased. 2017-10-13 19:00:56 +02:00
Alex Beregszaszi
4d1c48eeee Remove duplicate EVMSchedule 2017-10-03 11:59:53 +01:00
Alex Beregszaszi
43719839bf Use isDup/SwapInstruction helper 2017-10-03 11:45:44 +01:00
Alex Beregszaszi
8a32d7c3d7 Add helpers for isPush/isDup/isSwap 2017-10-02 10:34:54 +01:00
Paweł Bylica
ffd440ccff
CMake: Cleanup include paths 2017-09-26 22:44:57 +02:00
Alex Beregszaszi
aad829948a Ensure parameter names match between headers and implementation 2017-09-20 01:23:21 +01:00
chriseth
068a593d9c Merge pull request #2922 from ethereum/asm-bytes-required
Properly calculate bytesRequired for subs
2017-09-18 16:38:02 +02:00
Alex Beregszaszi
20ffa1db43 Properly calculate bytesRequired for subs 2017-09-18 11:39:49 +01:00
Alex Beregszaszi
f4b87548c8 Add useful messages to exceptions in the assembler 2017-09-18 11:32:56 +01:00
chriseth
73771f5bb2 Named assembly labels. 2017-09-15 20:44:49 +01:00
chriseth
3f3bcc4f8a Merge pull request #2848 from ethereum/checkViewPure
Enforce view and pure.
2017-09-13 18:29:13 +02:00
chriseth
66c01301fe Rename to invalidInPureFunctions 2017-09-13 17:18:22 +02:00
Alex Beregszaszi
bbfb16cf5c Introduce assemblyString 2017-09-11 15:53:20 +01:00
Alex Beregszaszi
50570c6c79 Do not return the stream in asssemblyStream 2017-09-11 15:48:58 +01:00
Alex Beregszaszi
a535a8b06e Split out the JSON functionality from assembly.stream() 2017-09-11 15:48:52 +01:00
Alex Beregszaszi
55d2a459a9 Mark functions static in libevmasm 2017-09-11 15:15:02 +01:00
chriseth
15bdc48a73 Rename and add anonymous namespace. 2017-09-06 13:52:29 +02:00
chriseth
d6861d909c Analyze assembly. 2017-09-06 13:52:29 +02:00
chriseth
7c61a6daf2 Add view/pure information about instructions. 2017-09-06 13:52:29 +02:00
chriseth
2d39a42d37 Merge pull request #2843 from ethereum/anonymous-cleanup
Move all file specific globals to anonymous namespace
2017-08-29 14:07:24 +02:00
Alex Beregszaszi
7fb4a64136 Move all file specific globals to anonymous namespace 2017-08-29 11:09:18 +01:00
gcolvin
7da86daa17 Reconcile EVM 1.5 instruction numbers with working draft EIP615 2017-08-28 23:27:13 +01:00
chriseth
6951a371ec Cleanup of vector_ref.h 2017-08-25 19:36:48 +02:00
chriseth
82e4f6f604 Cleanup of FixedHash.h 2017-08-25 16:05:28 +02:00
chriseth
4b0e30d259 Cleanup of Common.h 2017-08-25 14:54:23 +02:00
Alex Beregszaszi
70e89a5dac Introduce JumpdestRemover optimisation step 2017-08-25 10:42:36 +01:00
Alex Beregszaszi
3b07c4d38e Merge pull request #2757 from ethereum/cmake
Static linking
2017-08-23 12:36:24 +01:00
chriseth
c5f11d938f Merge pull request #2656 from ethereum/performance1
Avoid some Json copy operations.
2017-08-23 13:26:43 +02:00
Paweł Bylica
388fc983fa
CMake: Cleanup "local" include path 2017-08-22 22:50:25 +02:00
Alex Beregszaszi
f2d6226718 Some smaller issues found by Covertiy Scan 2017-08-22 13:55:28 +01:00
Alex Beregszaszi
f38429fef8 Switch stream properties back after temporary modification 2017-08-22 13:55:01 +01:00
Alex Beregszaszi
9897c56b2c Mark a lot of functions static (where possible) 2017-08-22 10:51:46 +01:00
Alex Beregszaszi
2a5772cff7 Mark appropriate constructors explicit 2017-08-22 10:51:46 +01:00
Alex Beregszaszi
e2cfc9ee92 Mark a lot of functions const (where possible) 2017-08-22 10:51:46 +01:00
chriseth
e3f90565d8 Avoid some Json copy operations. 2017-08-21 16:28:30 +01:00
Paweł Bylica
63372e4a85
CMake: Simplify libevmasm config 2017-08-18 13:32:35 +02:00
Paweł Bylica
d1f4d110fb
CMake: Build static libs by default 2017-08-18 13:32:35 +02:00