Commit Graph

71 Commits

Author SHA1 Message Date
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
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
Alex Beregszaszi
70e89a5dac Introduce JumpdestRemover optimisation step 2017-08-25 10:42:36 +01:00
chriseth
e3f90565d8 Avoid some Json copy operations. 2017-08-21 16:28:30 +01:00
Alex Beregszaszi
f9d5f7e497 Introduce fine-grained optimiser settings in libevmasm 2017-07-27 12:40:28 +01:00
chriseth
168f64f4cb Fix negative stack size checks. 2017-06-28 16:55:49 +01:00
Alex Beregszaszi
becea47ac3 Use assertThrow where possible 2017-06-22 11:25:06 +01:00
Alex Beregszaszi
bc95da354d Replace obsolete assembly code in LLL 2017-06-21 21:23:39 +01:00
chriseth
3cb71ac516 Merge pull request #2398 from ethereum/assembly-cleanup
Remove obsolete features from libevmasm
2017-06-15 08:41:14 +02:00
Alex Beregszaszi
18fc667658 Remove obsolete Assembly::out 2017-06-14 21:21:26 +01:00
Alex Beregszaszi
398099f50e Remove obsolete errorTag() 2017-06-14 21:21:26 +01:00
Alex Beregszaszi
585b3ea3e3 Print auxiliary data in the assembly 2017-06-14 20:14:15 +01:00
Alex Beregszaszi
3273e865ec Print assembly even if there's no data section 2017-06-14 19:51:02 +01:00
chriseth
4d715e9055 Implement missing assembly output functions and do not use PushString for assembly. 2017-04-11 19:54:44 +02:00
chriseth
46d3c2dd3d Print source location before items. 2017-02-24 08:24:34 +01:00