Commit Graph

184 Commits

Author SHA1 Message Date
chriseth
fba7e055d9 Follow highest gas usage only for gas estimation. 2018-05-09 10:53:30 +02:00
chriseth
e681f4ee79
Merge pull request #4028 from ethereum/asm-tags-32bit
Restrict assembly tags to 32-bit
2018-05-02 17:34:13 +02:00
Alexander Arlt
f94b793472 Add virtual destructors on base classes. 2018-05-02 13:29:16 +02:00
Alex Beregszaszi
d569ad91e4 Restrict assembly tags to 32-bit 2018-04-30 18:47:57 +01:00
Alex Beregszaszi
3ac3018e1d Ensure that subId and tag handling is correct on all compilers in AssemblyItem 2018-04-30 15:57:17 +01:00
Omar Boukli-Hacene
090f9995f2 Fix comment typos 2018-04-27 19:31:30 +04:00
Alexander Arlt
70fcf1a8e0 CMake: remove direct jsoncpp dependency in libevmasm 2018-04-20 20:37:26 +01:00
Alex Beregszaszi
38460d8b47 Remove unnecessary masking of the result of known short instructions 2018-04-19 23:59:06 +01:00
Alex Beregszaszi
cb352edd26 Add constant optimiser for SHR/SHL instructions 2018-04-09 20:07:44 +01:00
Alex Beregszaszi
02ea0e547f Replace comparison operators with opposites if preceded by SWAP1 2018-04-04 17:47:58 +02:00
Alex Beregszaszi
17bcabb6cf Remove useless SWAP1 in front of commutative operations 2018-04-03 18:57:07 +02:00
chriseth
6777f7a57f Optimize across MLOAD if MSIZE is not used. 2018-04-03 14:34:32 +02:00
chriseth
6ec4517929 Use EVM version in gas meter and optimizer. 2018-03-05 11:36:33 +01:00
Alex Beregszaszi
afa4a48e37 Remove ROL/ROR as they are not part of EIP145 anymore 2018-02-27 13:42:41 +01:00
Alex Beregszaszi
59e6ea601b Add bitwise shift operators to libevmasm (EIP145) 2018-02-27 12:03:18 +01:00
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