Commit Graph

657 Commits

Author SHA1 Message Date
Alexander Arlt
19f764bf65 Split ewasm polyfill functions into different files. 2020-11-17 19:27:44 -05:00
Alex Beregszaszi
6f6bcdd526 [ewasm] Display custom sections as hex string in the text output 2020-11-10 23:48:24 +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
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
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
Daniel Kirchner
61a03036fe Refactor stack to memory mover in preparation of moving function arguments. 2020-10-13 12:20:04 +02:00
chriseth
d513e05ce9
Merge pull request #9961 from ethereum/stackLimitEvaderRefactor2
StackToMemoryMover: encapsulate memory offset tracking into its own class.
2020-10-08 19:56:44 +02:00
chriseth
70ebc0a13c
Merge pull request #9960 from ethereum/stackLimitEvaderRefactor
StackLimitEvader: Track unreachable variables globally instead of per function.
2020-10-08 19:01:26 +02:00
Daniel Kirchner
5442a7ade2 Always run the FunctionHoister as part of the optimizer Suite. 2020-10-06 22:30:37 +02:00
Daniel Kirchner
c8a7098f2f StackToMemoryMover: encapsulate memory offset tracking into its own class. 2020-10-06 11:10:43 +02:00
Daniel Kirchner
0b87849bcb Track unreachable variables globally instead of per function. 2020-10-06 10:38:26 +02:00
Alexander Arlt
b6e1415509 Add LEB128 encoding functions & tests. 2020-09-28 16:06:19 -05:00
Daniel Kirchner
f3c2d6cfdc Move memory load and store functions to the dialect. 2020-09-17 22:13:27 +02:00
Daniel Kirchner
48f620fb50 Reverse the order of the memory offsets assigned to variables. 2020-09-17 22:13:27 +02:00
Daniel Kirchner
976abf4715 Easy review fixes. 2020-09-17 22:13:27 +02:00
Daniel Kirchner
f4b42d1c72 Add stack limit evader. 2020-09-17 22:13:27 +02:00
chriseth
6e2d2feb10 Small fixes wrt ReasoningBasedSimplifier. 2020-09-16 18:08:54 +02:00
chriseth
bfd3ab23e2 Disallow optimizer steps that require SMT if none is available. 2020-09-15 15:57:59 +02:00
chriseth
9bcc2f1713 Make ReasoningBasedSimplifier available as step. 2020-09-15 15:57:59 +02:00
chriseth
f73fb726af Reasoning based optimizer. 2020-09-15 15:57:58 +02:00
chriseth
552a5f0913
Merge pull request #9314 from ethereum/inlineStartingFromLeaves
Handle "leaf functions" first in full inliner.
2020-09-14 20:22:48 +02:00
chriseth
8e39110a30 Remove flag. 2020-09-14 17:35:04 +02:00
chriseth
42c26e0bf5 Inline tiny functions first. 2020-09-10 17:01:20 +02:00
chriseth
f102feaf09 Handle "leaf functions" first in full inliner. 2020-09-10 17:01:19 +02:00
chriseth
6101bdf7e2 Name simplifier. 2020-09-10 16:23:29 +02:00
Harikrishnan Mulackal
d166c2540a Fix typo block 2020-09-07 17:24:03 +02:00
Harikrishnan Mulackal
e2fd41f097 Implemented UnusedFunctionArgumentPruner 2020-09-03 13:15:38 +02:00
Alex Beregszaszi
2426616859 Disallow language keywords to be used as identifiers by NameDispenser and VarNameCleaner
Also introduce isRestrictedIdentifier helper in OptimizerUtilities
2020-08-31 12:52:17 +01:00
Alex Beregszaszi
7ef9591e64 Expose hex literal to the Yul parser
This allows nicer error messages.
2020-08-28 19:34:52 +01:00
Alex Beregszaszi
4366ede889 Introduce Leave as a keyword for Yul 2020-08-28 19:34:52 +01:00
Alex Beregszaszi
caa329066e Do not emit Solidity-only tokens in the Scanner for Yul
And simplfiy AsmParser greatly.
2020-08-28 19:34:52 +01:00
Alex Beregszaszi
64c73baee9 Use only advance() and not with a mix of m_scanner->next() 2020-08-28 19:34:52 +01:00
Alex Beregszaszi
dd44fc1f06 Use explicit yul namespace in WasmCodeTransform 2020-08-27 19:49:30 +01:00
Alex Beregszaszi
fdf68a9525 Add some asserts to WasmCodeTransform 2020-08-27 19:49:30 +01:00
Alex Beregszaszi
4e5b403c37 Introduce RightArrow (->) token in the scanner 2020-08-27 12:28:27 +01:00
chriseth
e72afcba47 Fix inlining order to correspond to source order. 2020-08-26 10:20:18 +02:00
Harikrishnan Mulackal
5c6e7f03b4 Extended LoopInvariantCodeMotion for storage and state 2020-08-19 12:41:29 +02:00
Harikrishnan Mulackal
3cbe65e4f3 Refactor SideEffects struct 2020-08-18 14:53:59 +02:00
Alex Beregszaszi
3a617f9cf2 Validate expected literal kind for yul::Dialect builtins
Co-authored-by: Daniel Kirchner <daniel@ekpyron.org>
2020-08-05 11:37:04 +01:00
Alex Beregszaszi
f6a57af809 Add LiteralKind to Dialect.literalArguments
Co-authored-by: Daniel Kirchner <daniel@ekpyron.org>
2020-08-05 11:37:00 +01:00
Alex Beregszaszi
24bb6252ac Merge Parser::instructions() into EVMDialect 2020-07-29 13:15:54 +01:00
Alex Beregszaszi
d41fc31046 Do not use Parser::instructions() but depend on the dialect in NameDispenser and VarNameCleaner 2020-07-29 13:15:54 +01:00