Commit Graph

86 Commits

Author SHA1 Message Date
Daniel Kirchner
cb74a45fd6 Add inlining for old optimizer. 2021-02-09 19:08:58 +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
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
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
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
a3d4
a499ef16fa Fix spelling errors 2020-05-25 02:54:37 +02: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
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
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
9c19b93c37 Remove LLL specific features from libevmasm 2020-01-15 13:27:51 +00:00
Christian Parpart
6b23412fae C++ namespace cleanup (except tests). 2020-01-07 15:51:50 +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
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
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
Alex Beregszaszi
59df7dbc1b Add upper bound assert for PushSub/PushSubSize 2019-09-03 16:40:34 +01:00
chriseth
f2cee9ec0c Include cleanup. 2019-03-28 14:32:48 +01: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
ae1cd252b0 Take only Assembly instance as an input to ConstantOptimiser 2019-01-31 16:02:29 +00: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
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
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
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
Khan M Rashedun-Naby
14738d05e4 Use 'switch' instead of 'else if' 2018-09-27 17:46:53 +06:00
Alex Beregszaszi
535026b492 Group append() functions in libevmasm 2018-09-26 11:14:40 +01:00
Leonardo Alt
17cac588d0 Replace safety stop by invalid 2018-08-14 12:32:47 +02:00
Alex Beregszaszi
d3c3fd2079 Use dev::toString() in Assembly instead of misusing string{} for u256 2018-08-08 20:52:19 +01: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
chriseth
6807010dc7 Prevent libraries from being called. 2018-01-19 16:27:44 +01:00
chriseth
f5e91e4a94 Throw on too many peephole optimizer iterations. 2017-10-16 18:45:21 +02:00
chriseth
7c94e5462a Assume peephole optimizer was successful if number of pops increased. 2017-10-13 19:00:56 +02: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
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