chriseth
9b20c9840a
Merge pull request #10885 from ethereum/heuristic-revamp
...
Yul Backend: Get rid of heuristics for finding the matching runtime
2021-02-10 00:49:56 +01:00
Daniel Kirchner
cb74a45fd6
Add inlining for old optimizer.
2021-02-09 19:08:58 +01:00
Mathias Baumann
e4f1257c83
Yul Backend: Get rid of heuristics for finding the matching runtime
2021-02-09 14:50:25 +01:00
chriseth
d46da8e53c
Optimize iszero(sub(x, y)) to eq(x, y).
2020-12-22 15:11:48 +01:00
Alex Beregszaszi
97173247c0
Improve the Error class with a constructor for secondaryLocation
...
Remove occurances of Error construction using the boost helpers.
2020-12-17 13:50:04 +00:00
Daniel Kirchner
588535566f
Mark chainid as view.
2020-12-09 16:55:51 +01:00
chriseth
806453aca9
Merge remote-tracking branch 'origin/develop' into breaking
2020-12-08 21:00:09 +01:00
Alex Beregszaszi
7e88ba8da0
Enable the -Wconversion warning
2020-12-08 16:45:24 +00:00
chriseth
e93a84ccd4
Merge remote-tracking branch 'origin/develop' into HEAD
2020-10-28 18:19:31 +01:00
Alex Beregszaszi
e5faea5f35
Make use of pushInstruction() helper in libevmasm
2020-10-28 10:11:54 +00:00
Daniel Kirchner
68667f0e84
Remove POPs from ASSIGNIMMUTABLE generated bytecode, if possible.
2020-10-15 18:14:41 +02:00
Daniel Kirchner
0dca223b45
Add another argument to setimmutable and the AssignImmutable opcode, allowing to modify code at any memory offset.
2020-10-15 18:14:41 +02:00
Harikrishnan Mulackal
2b9f040c48
Optimize exp when base is -1
2020-09-29 17:44:09 +02:00
chriseth
684fff34a9
Replace exp by shl.
2020-09-17 16:06:52 +02:00
chriseth
233604f94b
Remove ineffective rules.
2020-09-14 17:35:04 +02:00
chriseth
8e39110a30
Remove flag.
2020-09-14 17:35:04 +02:00
Harikrishnan Mulackal
3cbe65e4f3
Refactor SideEffects struct
2020-08-18 14:53:59 +02:00
chriseth
a3a9630d8b
Optimize byte-after-shr for shift amounts that are not multiples of 8.
2020-08-04 12:16:23 +02:00
Bhargava Shastry
5100effeec
yul: Set non movable flag to true in simplification rule for byte of right-shifted expression
2020-08-03 17:30:52 +02:00
a3d4
5b54cfbed3
Report an error if immutables not assigned
2020-07-23 16:38:54 +02:00
Djordje Mijovic
6f97e6153c
[yul] Adding support for accessing subobjects via .
...
Co-authored-by: Kamil Śliwak <kamil.sliwak@codepoets.it>
2020-07-21 17:56:11 +02:00
chriseth
1c9179683e
Merge pull request #9433 from ethereum/reportAllStackErrors
...
Report all stack errors
2020-07-20 15:44:51 +02:00
Sachin Grover
b7adb2aa42
Add SPDX license identifier if not present already in source file
...
Fixes : #9220
2020-07-17 20:24:12 +05:30
Daniel Kirchner
92cd1ddb7d
Add markAsInvalid to the various assemblies.
2020-07-16 17:38:13 +02:00
Alex Beregszaszi
870ea98c21
Prefix EIP-615 opcodes with EIP615 in Instructions
2020-07-13 17:34:19 +01:00
chriseth
a783449195
Merge pull request #9362 from ethereum/swappedTagConjunctions
...
Remove unneccessary masking of tags.
2020-07-13 17:35:06 +02:00
chriseth
080f33a72c
Remove swap after dup.
2020-07-13 15:05:01 +02:00
chriseth
59f4989966
Optimize combination of byte and shl.
2020-07-08 20:26:46 +02:00
chriseth
d3abbd5610
Remove unneccessary masking of tags.
2020-07-08 20:16:39 +02:00
Djordje Mijovic
9e92fbccee
Refactoring bytesRequired to accept and return size_t
2020-06-11 08:26:57 +02:00
Djordje Mijovic
e4e3f49844
Fixing signedness conversion warnings in libevmasm
...
Co-authored-by: Harikrishnan Mulackal <webmail.hari@gmail.com>
2020-06-03 13:25:43 +02:00
chriseth
eb923af09c
Do not set source locations for small internal assembly routines.
2020-05-27 18:26:46 +02:00
Alexander Arlt
a7b89065ca
[yul] Add support for EVM version-dependent rules.
2020-05-27 11:57:08 +02:00
a3d4
a499ef16fa
Fix spelling errors
2020-05-25 02:54:37 +02:00
chriseth
f92a4f1965
Provide runtime object in Yul mode.
2020-05-18 13:48:23 +02:00
Harikrishnan Mulackal
a9fa9429d5
Fixed bug in BlockDeDuplicator
2020-05-18 11:39:45 +05:30
chriseth
6fb112fa8e
Remove some unneeded headers.
2020-05-07 01:49:46 +02:00
chriseth
d136e7dc95
Rules for optimizing idempotency for bitwise operations.
2020-04-23 14:21:00 +02:00
Alexander Arlt
aac7a1e434
Apply modernize-pass-by-value.
2020-04-14 10:32:13 -05:00
Daniel Kirchner
81652686be
Debug information for immutable references.
2020-04-06 10:56:42 +02:00
Daniel Kirchner
04d8ad2ae1
Legacy codegeneration for immutable state variables.
2020-03-24 16:45:25 +01:00
Daniel Kirchner
809e3503ba
Control flow analysis for inline assembly.
2020-03-09 16:23:10 +01:00
Djordje Mijovic
ec083c4878
Adding source location support to AssemblyStack and thus debugging Yul sources
2020-02-25 22:19:03 +01:00
chriseth
64f9dc351e
Merge pull request #8337 from mijovic/assembly-multifile
...
Assembly: Added missing source field to legacy assembly json output
2020-02-18 12:47:19 +01:00
Djordje Mijovic
18dea6b69c
Assembly: Added missing source field to legacy assembly json output to complete the source reference
2020-02-18 10:22:34 +01:00
Jason Cobb
6db0d50094
Don't use identifiers starting with an underscore followed by an uppercase letter
2020-02-17 12:44:39 -05:00
alex
e4b18e85e6
Replaced SourceLocation::isEmpty() with isValid() and hasText().
...
The function SourceLocation::isEmpty() had somewhat dual role.
Sometimes it indicates that the SourceLocation is invalid.
Sometimes it means that there is no corresponding source text.
Hence the proposal is to replace it with two functions, isValid() and hasText().
I also removed Scanner::sourceAt(). (Do we have a rule of thumb to remove unused code?)
Since hasText() checks that start and end are valid indices for source, I adjusted a couple of tests to avoid empty source strings.
2020-02-03 08:04:21 +01:00
Alex Beregszaszi
00f3c42d17
Use multiprecision::msb() in GasMeter and remove FixedHash dependency
2020-01-17 14:24:55 +01:00
Alex Beregszaszi
eafcb42be7
Enable more compiler warnings in the build system
...
"-pedantic -Wno-unknown-pragmas -Wimplicit-fallthrough"
2020-01-15 14:33:27 +00:00
Alex Beregszaszi
9c19b93c37
Remove LLL specific features from libevmasm
2020-01-15 13:27:51 +00:00
Christian Parpart
abb9f1eed7
CMake: Renaming devcore static library to solutil (to match source code paths)
2020-01-13 15:52:46 +01:00
Christian Parpart
345f9928ab
Library libdevcore renamed to libsolutil.
2020-01-07 15:51:50 +01:00
Christian Parpart
6b23412fae
C++ namespace cleanup (except tests).
2020-01-07 15:51:50 +01:00
chriseth
1ebcc757e1
Merge remote-tracking branch 'origin/develop' into develop_060
2019-11-27 19:14:08 +01:00
chriseth
0bb88dabb7
Restrict usage of plain "new".
2019-11-27 17:55:11 +01:00
chriseth
b0db64ff5b
Merge remote-tracking branch 'origin/develop' into develop_060
2019-11-26 16:19:35 +01:00
Alex Beregszaszi
991fbd2956
Replace uses of BOOST_THROW_EXCEPTION with assertThrow
...
Where appropriate.
2019-11-26 13:07:42 +01:00
Alex Beregszaszi
fc10fc3073
Move InvalidDeposit/InvalidOpcode from Instructions.h to Exceptions.h
2019-11-26 12:21:06 +01:00
chriseth
b6ad8f06e7
Merge pull request #7782 from ethereum/develop
...
Merge develop into develop_060
2019-11-25 17:58:09 +01:00
Alex Beregszaszi
ae428dc2a0
Clarify some notes in LinkerObject and assert that linkReferences are always correct
2019-11-22 16:48:23 +00:00
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