chriseth
a00f824479
Merge pull request #7773 from ethereum/develop
...
Merge develop into develop_060
2019-11-21 21:49:22 +01:00
chriseth
a26dd5a428
Remove trailing spaces in output.
2019-11-21 20:09:03 +01:00
Leonardo Alt
389da5228e
Merge remote-tracking branch 'origin/develop' into merge_develop_060
2019-11-20 12:27:40 +01:00
Alex Beregszaszi
840aba8929
Add new gas price for deployed bytecode (EIP2028)
2019-11-19 17:09:18 +01:00
Alex Beregszaszi
21312f52f2
Add new gas prices for SLOAD/BALANCE/EXTCODEHASH for Istanbul (EIP1884)
2019-11-19 17:09:18 +01:00
Erik K
94272d44aa
Merge pull request #7745 from ethereum/develop
...
Merge develop into develop_060
2019-11-19 15:30:31 +01:00
chriseth
e70ef0b820
Simplify patterns.
2019-11-15 00:34:01 +01:00
chriseth
2e5a42836c
Merge pull request #7681 from ethereum/develop
...
Merge develop into develop_060
2019-11-11 16:42:03 +01:00
chriseth
4b6647f6e1
Generalize word.
2019-11-07 14:33:34 +01:00
chriseth
fa02667075
Generalize instructions.
2019-11-07 14:33:34 +01:00
Mathias Baumann
37d6fd9e21
Fix case-sensitivity depending on platform
2019-11-05 17:25:08 +01:00
chriseth
cb2096c82a
Add modifier depth to source mappings.
2019-11-05 16:50:38 +01:00
Mathias Baumann
6705420325
Fix case-sensitivity depending on platform
2019-11-04 17:00:48 +01:00
Mathias Baumann
b3a5c9c9c0
Fix failing tests on ArchLinux and potentially MacOS
2019-10-29 12:02:50 +01:00
chriseth
c224b09bb3
Fix reordering bug in optimizer.
2019-09-17 12:33:00 +02:00
Dimitry
fd3ae0b24a
add chainid and selfbalance to lllc
2019-09-09 23:35:36 +03:00
Bhargava Shastry
09fa31ccc5
yul: Add new optimizer rules for create and create2 builtins
2019-09-09 17:06:56 +02:00
Alex Beregszaszi
59df7dbc1b
Add upper bound assert for PushSub/PushSubSize
2019-09-03 16:40:34 +01:00
chriseth
e86b5cf14e
Replace byte(A, X) by zero if A >= 32
2019-08-29 15:35:34 +02:00
chriseth
633510eb04
Merge pull request #6935 from ethereum/subMaxValueXNotXRule
...
Add optimization rule SUB(~0, X) -> NOT(X).
2019-06-17 14:42:49 +02:00
Bhargava Shastry
e96003e709
optimizer: Remove redundant rule from the optimizer rule list
2019-06-17 13:41:48 +02:00
Daniel Kirchner
7f322c9433
Add optimization rule SUB(~0, X) -> NOT(X).
2019-06-14 14:07:46 +02:00
chriseth
afe887adc1
Split MovableChecker and introduce SideEffectsUpToMSize.
2019-05-28 12:54:32 +02:00
Alex Beregszaszi
5acd862b05
Document copyRoutine in ConstantOptimiser
2019-05-22 15:18:57 +01:00
chriseth
54ce3df321
Merge pull request #6755 from ethereum/useShiftDirectly
...
[Optimizer] Use shift directly instead of multiplication in constant optimizer.
2019-05-16 15:49:02 +02:00
chriseth
5824f5d42f
Use shift directly instead of multiplication in constant optimizer.
2019-05-16 12:50:53 +02:00
chriseth
e8a88b13e4
Introduce side-effect-free as relaxed version of movable.
2019-05-16 12:30:05 +02:00
chriseth
f6437a2016
Optimizer rules that combine shifts and masks.
2019-05-15 20:30:53 +02:00
Daniel Kirchner
a5427bc63a
Add optimizer rules for multiplication and division by left-shifted one.
2019-05-14 16:20:45 +02:00
chriseth
99e96c2d66
Refactor termination detection.
2019-05-13 18:58:36 +02:00
Mathias Baumann
e20acf5d0a
Yul Optimizer: Remove dead code
2019-04-01 17:16:04 +02:00
Mathias Baumann
5c66ccc179
Optimize obsolete ANDs in combination with certain SHIFTs
2019-03-29 10:08:05 +01:00
Alex Beregszaszi
84fbf605aa
Replace shifts by larger than 255 with 0
2019-03-29 10:07:54 +01:00
chriseth
30da62aa2c
Merge pull request #6408 from ethereum/includeCleanup
...
Include cleanup
2019-03-28 15:31:07 +01:00
chriseth
f2cee9ec0c
Include cleanup.
2019-03-28 14:32:48 +01:00
chriseth
2308904f68
Remove "using namespace" from header and move Instruction to dev::eth.
2019-03-28 13:48:11 +01:00
Bhargava Shastry
f7b5a27581
Fixes bug in byte optimization rule and adds tests.
2019-03-21 14:29:06 +01:00
Mathias Baumann
6b60e90cde
Fix commented debug output code
2019-03-19 16:15:05 +01:00
Alex Beregszaszi
f95388011b
Allow simplification patterns to signal failure
2019-03-19 15:51:52 +01:00
chriseth
4c1a9aa273
Merge pull request #6256 from ethereum/completeLtGtRules
...
Complete the GT/LT rules.
2019-03-13 12:08:34 +01:00
chriseth
571f400a3e
Complete the GT/LT rules.
2019-03-13 12:01:23 +01:00
Bhargava Shastry
515fa872c8
Fixes u256 overflow in logical shift optimization rule and adds tests.
2019-03-13 11:19:20 +01:00
chriseth
e0d1b2f5b3
Peephole optimizer for "iszero iszero <tag> jumpi".
2019-03-07 15:52:02 +01:00
chriseth
34082a2368
Merge pull request #6159 from ethereum/more-optims
...
More optimiser rules for LT/GT/AND/BYTE and address cleanups
2019-03-04 16:24:38 +01:00
Alex Beregszaszi
1272951bbb
Do not mask with 160-bits after CREATE/CREATE2
2019-03-04 14:42:29 +01:00
Alex Beregszaszi
7aa2ee1775
More optimiser rules for LT/GT/AND/BYTE
2019-03-04 14:42:29 +01:00
Alex Beregszaszi
a7c2dba681
Document the boost multiprecision shift bug in RuleList
2019-03-04 13:37:20 +01:00
chriseth
851dd635eb
Remove defaults in constructor arguments.
2019-03-04 11:41:52 +01:00
Alex Beregszaszi
cf5c13f9c7
Introduce global optimiser settings.
2019-03-04 11:40:28 +01:00
Alex Beregszaszi
4430fe6a54
Combine multiple shifts with constant shift-by values in the optimiser
2019-02-25 20:56:13 +00:00
chriseth
70bbdd8fac
Merge pull request #3464 from ethereum/iulia_interp
...
Yul interpreter
2019-02-25 15:38:41 +01:00
Leonardo Alt
2405b2151a
EVMVersion in langutil namespace instead of solidity
2019-02-25 15:29:57 +01:00
chriseth
cc88c517a2
Review changes.
2019-02-25 11:58:37 +01:00
Alex Beregszaszi
81d011335a
Support shifts in the constant optimiser when Constantinople is targeted
2019-02-22 11:55:43 +00:00
chriseth
7f6f958246
Fix: Also replace tags in the list of tags referenced from outside.
2019-02-20 15:06:23 +01:00
Alex Beregszaszi
fd936439a4
Add more optimisation rules for shifts
2019-02-20 11:59:15 +00:00
Daniel Kirchner
809b9a95f9
Even more style checks.
2019-02-14 11:53:00 +01:00
Alex Beregszaszi
6b11be8c69
Mark apropriate methods protected in ConstantOptimiser
2019-02-05 19:40:34 +00:00
Alex Beregszaszi
ae1cd252b0
Take only Assembly instance as an input to ConstantOptimiser
2019-01-31 16:02:29 +00:00
Alex Beregszaszi
4aa2d965dc
Remove once-off helper in ConstantOptimiser
...
For clarity. Makes code easier to understand.
2019-01-28 15:44:44 +00:00
Alex Beregszaszi
9d52325b29
Move ConstantOptimiser constructor to header
2019-01-28 11:20:46 +00:00
Daniel Kirchner
870b656eda
Split up rule list generation further to prevent issues in browsers with the emscripten build.
2019-01-18 17:02:47 +01:00
chriseth
ef59f35a14
Merge pull request #5693 from ethereum/assemblyitem
...
Use explicit break and do not coerce 0 into bool in AssemblyItem
2018-12-19 15:14:49 +01:00
Alex Beregszaszi
517beb6fa6
Use explicit break and do not coerce 0 into bool in AssemblyItem
2018-12-19 12:35:00 +00:00
Christian Parpart
62fe57479e
make use of C++ = default
constructor declarations as well as more non-static member initialization syntax.
2018-12-19 11:26:42 +01:00
chriseth
27e4e25a99
Optimize some instruction comparisons.
2018-12-18 17:25:49 +01:00
chriseth
01249984f2
Provide comparison shortcut.
2018-12-18 16:10:14 +01:00
chriseth
18efbb52c0
Use the move.
2018-12-18 16:10:14 +01:00
chriseth
68ad015714
Make swappable instructions static.
2018-12-18 12:39:24 +01:00
Daniel Kirchner
2353f73c39
Add headers to targets in CMakeLists.txt.
2018-12-17 15:01:02 +01:00
Mathias Baumann
cb935fe908
Use curly-brackets initialization
2018-12-10 19:03:47 +01:00
Mathias Baumann
2f6dc2e773
Replace push_back with emplace_back where it makes sense
2018-12-10 19:02:39 +01:00
chriseth
bc6ddbdd09
Remove w
parameter for toHex.
2018-12-05 22:51:49 +01:00
Christian Parpart
c48a5264be
liblangutil: SourceLocation: adds (shared) pointer to underlying CharStream source, eliminating sourceName
...
Also, adapted affecting code to those changes.
2018-11-30 17:07:12 +01:00
chriseth
fb2e471d00
Fix nondeterminism bug related to boost version.
2018-11-27 16:00:22 +01:00
Christian Parpart
cdd8c72c9d
CMake: Explicitly state which files to compile instead of relying on globbing.
...
Also remove header file lists, as there is no need to add them to
add_library() or add_executable(), which should lower maintenance of the cmake files.
2018-11-26 14:39:24 +01:00
chriseth
2e861bf1a0
Merge pull request #5472 from ethereum/assemblyAnnotationOutput
...
Jumps with annotations cannot be functional.
2018-11-23 17:02:03 +01:00
Christian Parpart
d67322a186
Introduce namespace langutil
in liblangutil directory.
...
Also:
- Use {}-style list initialisation for SourceLocation construction
- Introduce new system includes
- Changes the API of the Scanner to take source as value (with move) as opposed to as a reference
2018-11-21 19:13:44 +00:00
Christian Parpart
87821c53c3
Isolating files shared between Yul- and Solidity language frontend.
2018-11-21 18:58:12 +00:00
chriseth
82055cbb61
Jumps with annotations cannot be functional.
2018-11-21 19:28:41 +01:00
mordax
ea8b7d803e
Removing redundant virtual from override function declaration
...
Remove trailing whitespace
Remove changelog change
2018-11-21 14:37:32 +00:00
chriseth
6bbedab383
Merge pull request #5265 from ethereum/cleanupsha3
...
Simplify sha3.
2018-11-09 15:39:57 +01:00
Christian Parpart
ab0de38f16
Eliminate byte
-typedef and use uint8_t
in all their places instead.
...
This change is made to (easily) be forward compatible with future C++
standards, in order to allow compiling the code with newer standards at
some point in the future.
* Removed the `using byte = uint8_t;` line from Common.h
* Mechanically change all uses of `byte` to `uint8_t`.
Tested with GCC 7.3 in C++11/14/17 modes :-)
2018-11-07 12:17:57 +01:00
chriseth
e78b95d9d4
Renamed SHA3.{h,cpp} files.
2018-10-18 14:31:36 +02:00
chriseth
26c693aa92
Change library placeholder to __$<hash>$__
.
2018-10-12 15:15:02 +02:00
chriseth
4d6d224cf8
Prefix "0x" to library placeholder.
2018-10-12 15:15:01 +02:00
chriseth
6daeb39ecc
Use hash for library placeholders.
2018-10-12 15:15:01 +02:00
chriseth
d76bfcd935
Fix typos.
2018-10-04 13:28:16 +02:00
chriseth
7609710d4f
Merge pull request #5110 from codemascot/libevmasm/Assembly.cpp
...
Use 'switch' instead of 'else if'
2018-10-02 13:18:22 +02:00
Khan M Rashedun-Naby
14738d05e4
Use 'switch' instead of 'else if'
2018-09-27 17:46:53 +06:00
Alex Beregszaszi
6a1e79a8e3
Set the price of EXTCODEHASH properly
2018-09-26 16:11:02 +01:00
Jared Wasinger
c6bd2979b1
Add assembly support for EXTCODEHASH (EIP-1052)
2018-09-26 16:11:02 +01:00
Alex Beregszaszi
410d94c498
Merge pull request #5089 from ethereum/gasmeter
...
Small pathgasmeter cleanups
2018-09-26 15:16:38 +01:00
chriseth
2c860b7d74
Merge pull request #5094 from ethereum/evmasm-grouping
...
Group LLL only assembly features in libevmasm
2018-09-26 15:51:20 +02:00
Alex Beregszaszi
d7c3f197c4
Some cleanups in GasMeter
2018-09-26 14:25:40 +01:00
Alex Beregszaszi
d64be90497
Add PathGasMeter.estimateMax helper
2018-09-26 14:25:40 +01:00
Alex Beregszaszi
9be058eb70
Add explanation to GasMeter::dataGas
2018-09-26 14:25:40 +01:00
Alex Beregszaszi
913ddf158f
Group LLL only assembly features in libevmasm
2018-09-26 12:46:03 +01:00
Alex Beregszaszi
535026b492
Group append() functions in libevmasm
2018-09-26 11:14:40 +01:00
Alex Beregszaszi
21beba76e2
Add helpers for the LOG instruction
2018-09-25 20:39:35 +01:00