Commit Graph
3800 Commits
Author SHA1 Message Date
chriseth 0b9c842656 Fix abstract without contract. 2020-02-05 12:14:14 +01:00
chriseth 527c011c2e Update tests. 2020-02-04 22:51:33 +01:00
chriseth 48933df18d Add some missing wasm functions. 2020-02-04 22:44:08 +01:00
chriseth a7624ffc45 Implement i32 builtins for the interpreter. 2020-02-04 22:44:08 +01:00
chriseth 7cca036f4c Merge pull request #8224 from a3d4/refactor-sourcelocation
Replaced SourceLocation::isEmpty() with isValid() and hasText().
2020-02-04 22:23:51 +01:00
alex 3416c029cf Relaxed assert in AsmJsonImporter::createAsmNode. 2020-02-04 20:37:51 +01:00
chriseth cafad3770d Update tests. 2020-02-04 18:27:01 +01:00
chriseth 9f0cef97c2 Specify default type for word size transform externally. 2020-02-04 18:13:37 +01:00
Daniel Kirchner d882b6fa83 Allow tests to be marked ABIEncoderV1Only. 2020-02-04 17:22:03 +01:00
Daniel Kirchner af9fc8b634 Mapping getters for Yul IR. 2020-02-04 17:22:03 +01:00
Daniel Kirchner d3cbfb0c5c Allow user-defined types as mapping keys in parser and restrict to contracts during type checking. 2020-02-04 17:22:03 +01:00
alex 211227f50b Modified SourceLocation::hasText() to allow empty source. 2020-02-04 04:19:28 +01:00
cameel 5fbc4d4afa [yulopti] Automate printing of the usage banner
- This now displays internal step names rather than human-readable ones but the internal ones are readable enough and it's not something worth creating another map.
- Options in the banner are now aligned in columns and thus easier to read.
2020-02-03 12:22:47 +01:00
cameel 4129c27495 [yulopti] Replace hard-coded step list with OptimiserSuite's maps 2020-02-03 12:22:47 +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
chriseth 2098dbade9 Merge pull request #7834 from ethereum/docstring-ast-node
[natspec] Introduce AST node for structured documentation
2020-01-30 19:04:52 +01:00
Erik Kundt 4a179056ed Adds JSON import / export for structured documentation. 2020-01-30 18:26:01 +01:00
Erik Kundt ec27c2e507 Introduce AST node for structured documentation. 2020-01-30 18:25:56 +01:00
chriseth 2afcfec77b Merge pull request #8220 from ethereum/remove-var-name-cleaner-from-optimiser-suite-step-list
Remove var name cleaner from optimiser suite step list
2020-01-30 17:58:43 +01:00
cameel ed5210490d [yulopti] Run disambiguator after VarNameCleaner
- This is a trivial change and it makes it safe to use in combination with other step.
2020-01-30 17:35:27 +01:00
chriseth d41e1db74a Adjust and add commandline tests for yul. 2020-01-29 19:10:53 +01:00
chriseth d3b53ee394 Make bool type optional for bool literals. 2020-01-29 19:01:28 +01:00
chriseth a66782537a Use old yul dialect only in tests. 2020-01-29 19:01:28 +01:00
chriseth d07dd55096 Update wasm tests. 2020-01-29 17:25:25 +01:00
chriseth 23667ce12d Update Yul optimizer tests. 2020-01-29 17:25:25 +01:00
chriseth e7b95de315 Tests for default type parsing. 2020-01-29 17:25:25 +01:00
chriseth fbe5bb0cce Parse default dialect and omit when printing. 2020-01-29 17:25:25 +01:00
chriseth e41155cf48 Merge pull request #8062 from imapp-pl/polyfill-part-2
Arithmetic functions implementation for EVM->EWasm translator.
2020-01-29 17:22:27 +01:00
chriseth 457cdecf6f Merge pull request #8135 from ethereum/fix-get-options-7112
TestFramework: Merge Options.h into Common.h
2020-01-29 16:05:55 +01:00
Mathias L. Baumann 5130a2b0ae Merge pull request #8063 from ethereum/yulvisit-7656
Use yul::AstWalker for assembly reference resolving
2020-01-29 14:56:19 +01:00
Mathias Baumann 00e4d13975 TestFramework: Merge Options.h into Common.h 2020-01-29 12:27:05 +01:00
chriseth a788ba14f3 Merge pull request #8173 from ethereum/fix-7859
yul proto fuzzer: Add EVM version field
2020-01-28 22:14:25 +01:00
chriseth 35820398c2 Merge pull request #8179 from pinkiebell/codegen
libsolidity/codegen: Use calldatacopy to cheaply zero memory..
2020-01-28 18:07:30 +01:00
Mathias Baumann b8e2baf5f4 Use yul::AstWalker to resolve assembly symbols 2020-01-28 17:57:48 +01:00
Mathias Baumann 2f1f8e25c1 TestFramework: Remove headers from Options.h 2020-01-28 17:29:22 +01:00
rodiazet f1004e712c [WASM] Add div, sdiv, mod, smod, exp, lt, sar, addmod, mulmod, signextend 2020-01-28 13:32:43 +01:00
Mathias Baumann 1027f6f78f Extract some semantic tests 2020-01-28 11:59:44 +01:00
Bhargava Shastry 8cbe1d4b1d yul proto fuzzer: Make function call generation optional 2020-01-24 12:31:43 +05:30
Bhargava Shastry a335fed189 yul proto fuzzer: Add EVM version field 2020-01-24 12:31:20 +05:30
chriseth 790c6d2cae Tests for salted create. 2020-01-23 21:20:01 +01:00
chriseth 2fa586beac Test that uses function call options on overloaded function. 2020-01-23 21:20:01 +01:00
Mathias Baumann a3f23d3158 Implement new with CREATE2 and function call options. 2020-01-23 21:20:01 +01:00
chriseth 679f729f2f Implement create2 for evmhost. 2020-01-23 21:20:01 +01:00
pinkiebell bb6fb675e0 libsolidity/codegen: Use calldatacopy to cheaply zero memory instead of
codecopy.

Motiviation:
  Zero'ing memory is commonplace in contracts, but with the upcoming
  Layer-2 EVM translation layers and other on-chain verification
  mechanisms, using `codecopy` becomes a `costly` operation in those
  sandboxes. Using `calldatacopy` achieves the same thing, gas costs
  are also the same as codecopy, and is significantly cheaper in the `sandbox` situation.
2020-01-22 17:56:56 +01:00
Jason Cobb 595f569e97 Update tests for interface inheritance 2020-01-22 09:40:40 -05:00
Jason Cobb 573a054d5d Prohibit interfaces inheriting from non-interfaces 2020-01-22 09:40:40 -05:00
chriseth 1b19524036 Merge pull request #8150 from ethereum/isoltest-alignment-output
[isoltest] Proper output of alignment in obtained test results
2020-01-20 12:38:12 +01:00
Bhargava Shastry 9befb4bdf0 yul proto fuzzer: Do not generate infinite for loops and limit total
number of for loops per test program to two
2020-01-20 16:27:01 +05:30
chriseth 470c19eb8c Merge pull request #8165 from imapp-pl/yulopti-missing-step
yulopti: Add missing ConditionalUnsimplifier step
2020-01-20 11:45:29 +01:00
Alex Beregszaszi 004f01a388 Add test case for gas metering of exp(n, 0) 2020-01-17 14:24:55 +01:00