Commit Graph

244 Commits

Author SHA1 Message Date
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
Alex Beregszaszi
0db76a01da CREATE2 opcode has been moved from 0xfb to 0xf5 2018-09-18 23:04:57 +01:00
Alex Beregszaszi
c42dfc5b10
Merge pull request #4967 from ethereum/const-opt-cost
Move dataGas calculation helper to GasMeter
2018-09-18 15:46:15 +01:00
Alex Beregszaszi
0b68d093b4 Move dataGas calculation helper to GasMeter 2018-09-18 14:47:53 +01:00
Daniel Kirchner
a1d73a7bef Split simplification rules into two functions. 2018-09-18 14:28:21 +02:00
Alex Beregszaszi
0b6a26f854 Calculate the dataGas correctly in the constant optimiser
This may cause a wrong decision about cost (and as a result choosing the least efficient code),
but will not cause any miscompilation or invalid output.
2018-08-14 17:45:43 +02:00
Leonardo Alt
17cac588d0 Replace safety stop by invalid 2018-08-14 12:32:47 +02:00