Commit Graph
943 Commits
Author SHA1 Message Date
Alex Beregszaszi 61ed1f1986 cleanup 2020-12-03 17:15:45 +01:00
Alex Beregszaszi 6c0a3bd043 Ensure that builtins must be executed 2020-12-03 17:15:44 +01:00
Alex Beregszaszi e2a756a705 Remove dead code 2020-12-03 17:15:44 +01:00
Alex Beregszaszi baa7251f1d More clean up 2020-12-03 17:14:49 +01:00
Alex Beregszaszi 75e0057388 Rename parseElementaryOperation to parseLiteralOrIdentifier 2020-12-03 17:14:49 +01:00
Alex Beregszaszi 3da2b67b67 simplify parser 2020-12-03 17:14:49 +01:00
hrkrshnn 3efac3eef0 NameSimplifier is removed from steps available to users. 2020-12-02 13:48:01 +01:00
hrkrshnn 5a15a4a6bd Fix a bug in NameSimplifier.
A new name created by NameSimplifier could also be created by NameDispenser, since the knowledge of
the new name was not stored in NameSimplifier.
2020-12-02 13:48:01 +01:00
chriseth 9a5902f9d7 Merge remote-tracking branch 'origin/develop' into breaking 2020-12-02 12:28:02 +01:00
chriseth e10712c173 Merge pull request #10454 from ethereum/ewasm-cleanup
[ewasm] Clean up some builtins and fix text representation of `select`
2020-12-01 17:34:48 +01:00
chriseth 8279d90ba2 Merge pull request #10403 from ethereum/rename-asmdata
Rename AsmData* to AST*
2020-12-01 14:33:11 +01:00
Alex Beregszaszi 04cf4867fe [ewasm] Clean up opcodes/builtins in the binary encoder
Also make sure that `i32.drop/i64.drop` won't silently drop its arguments, as they may have side-effects.
2020-12-01 12:50:54 +00:00
Alex Beregszaszi a29a7ad680 [ewasm] Properly encode i32/i64.select in the text format 2020-12-01 11:22:38 +00:00
chriseth 6de7eaba95 Merge remote-tracking branch 'origin/develop' into breaking 2020-12-01 10:50:13 +01:00
hrkrshnn cf6fe5a777 NameDispenser: Added three public functions.
The private function `illegalName` was converted into a public function.

A new public getter function `usedNames()` returns a reference to `m_usedNames`.

A public function reset that would change all `m_usedNames` to *only* the names that are used in the
AST. Also resets the counter. This will be used before the final NameSimplifier step in the
optimization phase.

The first two functions were added so that `NameSimplifier` could use it instead of traversing the AST
using `NameCollector` to find used names.
2020-11-30 14:02:57 +01:00
Alex Beregszaszi a7ee1355bd [ewasm] Use select instruction where appropriate 2020-11-30 12:10:32 +00:00
Alex Beregszaszi 9640cfd77e [ewasm] Add i32.select/i64.select 2020-11-30 11:58:33 +00:00
chriseth a5a560e163 Merge pull request #10417 from ethereum/onlyClearForAssignment
DataFlowAnalyzer: Only clear known values for assignment.
2020-11-30 12:02:28 +01:00
chriseth 75b1624180 Merge pull request #10404 from ethereum/ewasm-eq-simplify
[ewasm] Change eq() in polyfill to branch-less version
2020-11-30 11:54:45 +01:00
chriseth 45307a24d6 Merge pull request #10416 from ethereum/speedUpByMovingAssertion
Superspeed.
2020-11-30 11:35:20 +01:00
Alex Beregszaszi 06af2fb38a [ewasm] Change eq() in polyfill to branch-less version 2020-11-27 22:47:55 +00:00
chriseth 21c35924df Only clear for assignment. 2020-11-26 18:32:13 +01:00
chriseth 111eaa1e9b Superspeed. 2020-11-26 17:38:01 +01:00
chriseth ac9b31d623 Abort early if the optimizer sequence is empty. 2020-11-26 16:41:20 +01:00
Alex Beregszaszi a22077f736 Rename AsmData -> AST
Also attempt to only include ASTForward where appropriate.
2020-11-25 17:58:02 +00:00
chriseth a0a02f2307 Merge remote-tracking branch 'origin/develop' into breaking 2020-11-23 19:28:08 +01:00
Alex Beregszaszi f76ac0a753 [wasm] Document what StringLiteral is 2020-11-20 21:16:56 +00:00
Alexander Arlt 9d6296eca4 [ewasm] Polyfill: calldataload & calldatacopy. 2020-11-20 13:46:04 -05:00
chriseth a7db4fa4a5 Merge remote-tracking branch 'origin/develop' into breaking 2020-11-18 20:05:02 +01:00
Alexander Arlt c0d28492c3 [ewasm] Polyfill: Rename endian_swap -> bswap. 2020-11-17 21:30:06 -05:00
Alexander Arlt 19f764bf65 Split ewasm polyfill functions into different files. 2020-11-17 19:27:44 -05:00
chriseth 0a31a6bc36 Merge pull request #10258 from ethereum/develop
Merge develop into breaking.
2020-11-11 13:36:17 +01:00
Alex Beregszaszi 6f6bcdd526 [ewasm] Display custom sections as hex string in the text output 2020-11-10 23:48:24 +01:00
chriseth da92fe548e Merge remote-tracking branch 'origin/develop' into breaking 2020-11-10 13:48:32 +01:00
Alex Beregszaszi 6e11754c8b [ewasm] Support compiling data subobjects 2020-11-09 17:47:12 +00:00
Alex Beregszaszi e41700e5f7 [ewasm] Clarify custom section handling in BinaryTransform 2020-11-09 17:47:01 +00:00
Alex Beregszaszi cd08dab4e6 [ewasm] Allow compiling Yul without "main" 2020-11-09 16:36:29 +00:00
chriseth ce50f05fc1 Merge remote-tracking branch 'origin/develop' into HEAD 2020-10-29 16:44:47 +01:00
Alex Beregszaszi 1e7dcb0bbf Use yulAssert instead of astAssert 2020-10-29 14:21:12 +00:00
Alex Beregszaszi e4133815e9 Remove explicit yul:: namespacing in AsmJsonImporter 2020-10-29 14:07:43 +00:00
Alex Beregszaszi 1ab6340828 Move AsmJsonImporter from libsolidity to libyul
It is next to AsmJsonConverter now and interdependencies are shrunk.
2020-10-29 14:06:34 +00:00
chriseth e93a84ccd4 Merge remote-tracking branch 'origin/develop' into HEAD 2020-10-28 18:19:31 +01:00
chriseth b18d5ab257 Fix move bug. 2020-10-28 17:21:08 +01:00
chriseth fb40f29594 Merge pull request #10133 from ethereum/asm-error-codes
Split error codes for EVM opcodes
2020-10-28 13:00:23 +01:00
Alex Beregszaszi 24d8c2ed90 Split error codes for EVM opcodes 2020-10-28 11:45:46 +00:00
Alex Beregszaszi 13652bd4a9 [ewasm] Add assertion for datasize/dataoffset in BinaryTransform 2020-10-27 17:43:31 +00:00
Alex Beregszaszi 6d79a8885f [ewasm] Implement stop() in EVM->Ewasm translator 2020-10-27 17:09:30 +00:00
chriseth bfd267459c Panic codes. 2020-10-22 19:25:55 +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
Daniel Kirchner 61a03036fe Refactor stack to memory mover in preparation of moving function arguments. 2020-10-13 12:20:04 +02:00