chriseth
fa148f2483
Parsing of immutable state variable.
2020-03-12 17:11:24 +01:00
a3d4
a86c511713
Replaced "assert" with "if" (incorrect contract code is not supposed to trigger asserts).
2020-03-12 14:03:27 +01:00
Daniel Kirchner
bdd8045db5
Merge pull request #8183 from ethereum/functionOptionsYulIR
...
[YulIR] Function call options for Yul IR
2020-03-12 10:49:51 +01:00
Leonardo
07ab4c80c4
Merge pull request #8323 from ethereum/smt_split_3
...
[SMTChecker] CHC support to internal function calls
2020-03-11 18:37:45 +01:00
Leonardo Alt
07368c2e1e
Add support to internal function calls
2020-03-11 16:29:07 +01:00
Djordje Mijovic
37878cf8d2
Adding support for ipfs large files.
2020-03-11 13:55:46 +01:00
chriseth
6a896f766a
Function call options for YulIR.
2020-03-10 22:38:11 +01:00
chriseth
92d4bbb017
Salt should be bytes32.
2020-03-10 22:38:11 +01:00
chriseth
5fd5465f66
Merge pull request #8471 from a3d4/fix-controlflowbuilder-compilation-error
...
Fixed ControlFlowBuilder compilation error.
2020-03-10 14:12:59 +01:00
a3d4
437ab3d24c
Fixed ControlFlowBuilder compilation error.
2020-03-10 14:02:16 +01:00
Christian Parpart
bb29a7e497
Merge pull request #8460 from ethereum/yulutil-convert-array
...
YulUtilFunctions: convertionFunction() to also handle array string/memory casts
2020-03-10 14:00:34 +01:00
Christian Parpart
5d7a370248
YulUtilFunctions: convertionFunction() to also handle array string/memory casts.
2020-03-10 11:21:12 +01:00
Daniel Kirchner
809e3503ba
Control flow analysis for inline assembly.
2020-03-09 16:23:10 +01:00
chriseth
b7c001eb7f
Merge pull request #8416 from ethereum/reuseYulCalldataTailAccess
...
Fix yul calldata tail access functions and reuse them for old codegen.
2020-03-09 15:10:48 +01:00
chriseth
37e01a19c0
Fix scoping following try/catch.
2020-03-09 13:14:13 +01:00
Christian Parpart
105d89bea8
Compilation fix.
2020-03-09 11:42:34 +01:00
Christian Parpart
988bd6780b
Merge pull request #8414 from ethereum/sol2yul-func-type-conversion
...
[Sol2Yul] Implements function-to-function cast.
2020-03-09 11:31:44 +01:00
Christian Parpart
d33376cce6
Merge pull request #8409 from ethereum/multiUseYulFunctionNoSharedPtr
...
Use plain members and references instead of shared pointers for MultiUseYulFunctionCollector
2020-03-09 11:18:40 +01:00
Christian Parpart
e210026e74
[Sol2Yul] Implements function-to-function cast.
2020-03-09 10:40:57 +01:00
Christian Parpart
c8cbb98002
[Sol2Yul] Fixes appendExternalFunctionCall for argumentStrings.size() == 0.
2020-03-09 10:30:07 +01:00
chriseth
a328e940b5
Merge pull request #8429 from ethereum/astJsonImportYulBlock
...
Fix yul ast import for blocks, switches and string literals.
2020-03-08 17:06:05 +01:00
Daniel Kirchner
e58a1de57f
Merge pull request #8431 from mijovic/sol2YulSelectorAddress
...
Adding sol->yul for f.selector and f.address
2020-03-06 22:48:38 +01:00
Djordje Mijovic
092827b7ad
Adding sol->yul for f.selector and f.address
2020-03-06 21:43:14 +01:00
Daniel Kirchner
2df5ca0774
Merge pull request #8385 from ethereum/immutable
...
Immutable state variables (1)
2020-03-06 14:20:13 +01:00
Daniel Kirchner
7f38cbb91d
Fix calling unimplemented base function.
2020-03-06 10:51:16 +01:00
Daniel Kirchner
420f57aec3
Fix yul ast import for blocks, switches and string literals.
2020-03-05 14:09:13 +01:00
Daniel Kirchner
9318dae42c
Merge pull request #8420 from mijovic/iceStackTooDeepFix
...
Throwing stack too deep ICE in case of calling encode with too many a…
2020-03-04 17:41:59 +01:00
Djordje Mijovic
38b219d140
Throwing stack too deep ICE in case of calling encode with too many arguments instead of invalid opcode
2020-03-04 16:29:07 +01:00
Daniel Kirchner
857ed12b05
Use plain members and references instead of shared pointers for MultiUseYulFunctionCollector
2020-03-04 16:16:34 +01:00
Daniel Kirchner
b10f12a395
Merge pull request #8413 from mijovic/depratateValueCalls
...
Deprecated warning for .value() and .gas() on function and constructr…
2020-03-04 14:43:06 +01:00
Daniel Kirchner
919888ddbc
Use yul function for calldata tail access, fix checks and add additional revert reason.
2020-03-04 14:39:36 +01:00
Christian Parpart
27a4670ad8
Merge pull request #8408 from ethereum/utilFunctionsFromOldCodegen
...
Allow using YulUtilFunctions from old codegen
2020-03-04 14:27:26 +01:00
Djordje Mijovic
58c6b90705
Deprecated warning for .value() and .gas() on function and constructror calls
2020-03-04 12:51:49 +01:00
Daniel Kirchner
561e5d9b27
Rename variables and review suggestion.
2020-03-03 15:12:00 +01:00
Daniel Kirchner
24d6e6295e
Reuse the mechanism for abi functions and move tracking of used functions to CompilerContext
2020-03-03 15:11:18 +01:00
Leonardo
32ca1a5e26
Merge pull request #8311 from ethereum/smt_split_2
...
[SMTChecker] Change CHC encoding from explicit CFG to function forests
2020-03-03 13:16:14 +01:00
Leonardo Alt
3bee348525
Change CHC encoding to functions forest instead of explicit CFG
2020-03-03 12:12:26 +01:00
Leonardo Alt
96a230af50
[SMTChecker] Fix ICEs with tuples
2020-03-03 11:35:58 +01:00
Daniel Kirchner
90fa56c719
Allow use of yul util functions in legacy code generation.
2020-03-02 16:32:30 +01:00
chriseth
1488a1ceb8
Refactor isConstant to add "immutable".
2020-03-02 14:20:17 +01:00
chriseth
bb09787bd0
Merge pull request #8378 from mijovic/yulSourceLocations
...
Adding source location support to AssemblyStack
2020-02-25 22:34:57 +01:00
Djordje Mijovic
ec083c4878
Adding source location support to AssemblyStack and thus debugging Yul sources
2020-02-25 22:19:03 +01:00
chriseth
c5a0a434e2
Merge pull request #8374 from ethereum/writeAccessToSlot
...
Allow access to ``_slot`` for local storage pointer variables.
2020-02-25 22:11:13 +01:00
chriseth
45041e5d3a
Allow access to `_slot
` for local storage pointer variables.
2020-02-25 14:28:04 +01:00
Djordje Mijovic
8524e3f48d
Standard-JSON-Interface: Fix a bug ( #8371 ) related to empty filenames and imports.
2020-02-25 01:07:36 +01:00
chriseth
c2e22d4cab
Merge pull request #8221 from ethereum/structured-docs-error-locations
...
[parser] Source locations for structured documentation errors
2020-02-18 14:57:28 +01:00
chriseth
663a9f892f
Merge pull request #8333 from ethereum/fix-8332
...
Use explicit variant constructor in direct list initializer
2020-02-18 14:46:31 +01:00
chriseth
64f9dc351e
Merge pull request #8337 from mijovic/assembly-multifile
...
Assembly: Added missing source field to legacy assembly json output
2020-02-18 12:47:19 +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
Bhargava Shastry
786c63ec3c
Use explicit type for variant constructor that is part of direct list initializer
2020-02-18 10:42:08 +05:30
Jason Cobb
6db0d50094
Don't use identifiers starting with an underscore followed by an uppercase letter
2020-02-17 12:44:39 -05:00
Erik Kundt
b43751d65e
Reports source location for structured documentation errors.
2020-02-14 15:21:39 +01:00
chriseth
99f88742d6
Merge pull request #8263 from ethereum/functionSelectorPure
...
Mark function selectors accessed via declaration as pure.
2020-02-14 12:34:39 +01:00
Daniel Kirchner
9f094d59b9
Mark function selector accesses as pure for pure expressions and mark function accesses via contract name as pure.
2020-02-14 12:33:33 +01:00
Christian Parpart
c92fe69a60
Finishes external call implementation.
2020-02-14 11:59:04 +01:00
Leonardo Alt
3800391a1a
[Yul] Support conditionals
2020-02-13 17:02:15 -04:00
Mathias L. Baumann
c635377450
Merge pull request #8313 from ethereum/checkFunctionsExistInIsoltest
...
Make type error fatal to prevent assert failure at later point
2020-02-13 16:08:13 +01:00
Mathias Baumann
8911b58a6d
Make type error fatal to prevent assert failure at later point
2020-02-13 15:16:28 +01:00
Leonardo
2cadf7ec5a
Merge pull request #8307 from ethereum/smt_split_1
...
[SMTChecker] Some refactoring
2020-02-12 15:25:56 -03:00
chriseth
1ea66fd1f8
Merge pull request #8301 from ethereum/fixPostTypeChecker
...
PostTypeChecker: ConstStateVarCircularReferenceChecker on function type state variables.
2020-02-12 18:40:19 +01:00
Daniel Kirchner
45f80e9895
Move assertion in PostTypeChecker's ConstStateVarCircularReferenceChecker to account for function type variables
2020-02-12 17:42:27 +01:00
Alexander Arlt
d0eeca8014
Fix CompilerStack::loadMissingSources()
...
- FatalError Exception was not caught
- fixes #8102
2020-02-12 11:22:11 -05:00
Leonardo Alt
d31a2a8d21
CHC clears indices so that initial is 0 and current is 1
2020-02-12 11:47:58 -03:00
Leonardo Alt
34d64761d9
Extract symbolicArguments function
2020-02-12 11:47:58 -03:00
Leonardo Alt
6451a4d2a0
Move VerificationTarget and add BMCVerificationTarget
2020-02-12 11:47:58 -03:00
Leonardo Alt
ba576bc6c3
Fix new namespaces
2020-02-12 10:35:44 -03:00
Daniel Kirchner
df0873d138
Implement calldata arrays for Yul IR
2020-02-12 14:00:29 +01:00
Daniel Kirchner
3c9f18b749
Use IRVariable's in IR code generation and implement tuples.
2020-02-12 12:36:14 +01:00
Daniel Kirchner
6abe0a50b1
Define stack slot names in types.
2020-02-12 12:36:14 +01:00
Daniel Kirchner
e786650bef
Merge pull request #8274 from ethereum/structRecursionMapping
...
Move mapping key checks to ReferencesResolver and make errors fatal.
2020-02-12 11:19:07 +01:00
Mathias Baumann
80bd0f47cc
Unify optimize yul code in CompilerContext/ContractCompiler
2020-02-11 13:55:47 +01:00
Mathias Baumann
1a3998648c
Run yul optimizer on user code without refs
2020-02-11 13:55:47 +01:00
Daniel Kirchner
9c3151748e
Move mapping key checks to ReferencesResolver and make them fatal.
2020-02-11 13:35:23 +01:00
chriseth
d033c2f767
Merge pull request #8178 from ethereum/internal_revert_strings
...
Internal reverts with reason in debug mode
2020-02-10 17:35:41 +01:00
Leonardo Alt
36928c7a35
Add reason string for internal reverts
2020-02-10 11:57:20 -03:00
a3d4
b3b8441aa4
Fix printing source for missing pragma.
2020-02-09 02:28:47 +01:00
chriseth
a41f5e91f6
Merge pull request #8251 from a3d4/refactor-currentlocation
...
Refactor currentlocation
2020-02-06 09:57:41 +01:00
Daniel Kirchner
e07274a96f
Disallow libraries as mapping keys.
2020-02-06 09:09:43 +01:00
a3d4
4ec4d23886
Replaced ParserBase::position() and ParserBase::endPosition() with ParserBase::currentLocation().
...
It might be simpler to pass `SourceLocation` object instead of splitting it into `start` and `end`, and creating another SourceLocation object using the same `start` and `end` later.
2020-02-06 03:34:49 +01:00
Mathias L. Baumann
bd54176c1a
Merge pull request #8248 from ethereum/functionCallOptionFollowUp
...
Fix function call option parsing and add to grammar.
2020-02-05 18:01:54 +01:00
chriseth
5247a6600e
Fix function call option parsing and add to grammar.
2020-02-05 16:59:02 +01:00
Erik Kundt
f2701db0aa
Adds documentation for Solidity source upgrader.
2020-02-05 16:52:54 +01:00
chriseth
0b9c842656
Fix abstract without contract.
2020-02-05 12:14:14 +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
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
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
ada0cef150
Merge pull request #8068 from ethereum/evmTypedDialect
...
[Yul] EVM typed dialect
2020-01-30 14:53:25 +01:00
cameel
642653ea04
Make yul::Parser::parse() return unique_ptr rather than shared_ptr
...
- unique_ptr is more flexible and generally recommended for factory methods. It gets automatically converted to shared_ptr if necessary. Returning shared_ptr, on the other hand, forces the caller to use shared_ptr because a conversion to unique_ptr is not possible.
2020-01-29 20:07:08 +01:00
chriseth
fbe5bb0cce
Parse default dialect and omit when printing.
2020-01-29 17:25:25 +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
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
chriseth
6ded158739
Change expression parts to use strings instead of numbers.
2020-01-27 08:55:11 +01:00
Erik Kundt
893fb4d05b
Implements AST JSON import for function call options.
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
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
573a054d5d
Prohibit interfaces inheriting from non-interfaces
2020-01-22 09:40:40 -05:00
Jason Cobb
1cc8ce1656
Don't prohibit interface inheritance
2020-01-22 09:40:40 -05:00
Daniel Kirchner
ee5ff4df4e
Clean up visibility via contract name and fix ICE on calling unimplemented base function.
2020-01-16 19:13:04 +01:00
chriseth
185a736e13
Merge pull request #7918 from ethereum/compilerstack-fqdn
...
Add assertion for contract name clash in the resolver in CompilerStack
2020-01-15 18:00:58 +01:00
chriseth
c017072bac
Merge pull request #8013 from ethereum/warnings
...
Enable more warnings in the build system
2020-01-15 18:00:14 +01:00
Daniel Kirchner
c450b18673
Remove remaining instances of new.
2020-01-15 17:25:08 +01:00
Alex Beregszaszi
1d7f25e809
Remove unnecessary statement
2020-01-15 14:33:27 +00:00
Alex Beregszaszi
eafcb42be7
Enable more compiler warnings in the build system
...
"-pedantic -Wno-unknown-pragmas -Wimplicit-fallthrough"
2020-01-15 14:33:27 +00:00
chriseth
ed87b08911
Merge pull request #8066 from ethereum/removeAsmFlavour
...
Remove asm flavour
2020-01-15 14:21:54 +01:00
Nicolás Venturo
9649c92e12
Fix error message suggestion for receive
2020-01-14 23:24:27 +01:00
chriseth
b3fe84a6ea
Merge pull request #7153 from djudjuu/newImportAST
...
import ast from JSON
2020-01-14 17:56:53 +01:00
chriseth
123ea0a250
Remove asm flavour.
2020-01-14 17:16:09 +01:00
djudjuu
e8556fa1b2
Ast-Import from standard-json
2020-01-14 17:15:53 +01:00
Mathias Baumann
adc4774d4a
ASTJSON: Export evm version
2020-01-14 12:51:21 +01:00
Christian Parpart
abb9f1eed7
CMake: Renaming devcore static library to solutil (to match source code paths)
2020-01-13 15:52:46 +01:00
Alex Beregszaszi
b85d478931
Add assertion for contract name clash in the resolver in CompilerStack
2020-01-10 11:49:44 +01:00
chriseth
a4e34b378a
Merge pull request #8105 from ethereum/functionTypeRefactor
...
Add a new Function Type referring to FunctionDefinition's without calling context and use it to allow selector lookup.
2020-01-09 17:15:46 +01:00
Daniel Kirchner
9535c0f520
Introduce FunctionKind::Declaration and allow accessing function signatures via contract name.
2020-01-09 15:40:41 +01:00
Jason Cobb
3726f7448e
Remove now-unused abstractAnnotation helper
2020-01-09 08:44:24 -05:00
Jason Cobb
dc380f017f
Make CallableDeclaration::annotation pure virtual
2020-01-09 08:37:32 -05:00
Jason Cobb
dc6c19cafa
Add methods for AST annotation implementation
2020-01-09 08:37:32 -05:00
Leonardo Alt
a02308cfa5
Replace void cast by maybe_unused
2020-01-09 13:41:30 +01:00
Mathias Baumann
2179562785
Move variables-in-interfaces checker to PostTypeChecker
...
refs #7566
2020-01-08 14:05:08 +01:00
Mathias Baumann
21844aa545
Move event-outside-emit check to PostTypeChecker
...
refs #7566
2020-01-08 14:05:08 +01:00
Mathias Baumann
9f8d49e358
Move modifier context check to PostTypeChecker
...
refs #7566
2020-01-08 14:05:08 +01:00
chriseth
5ca3abd7cb
Merge pull request #8106 from random-internet-cat/move-contract-kind
...
Move ContractKind from ContractDefinition to file-scope
2020-01-08 13:06:26 +01:00
chriseth
d1a7ff0fbc
Merge pull request #8008 from ethereum/large-code
...
Issue warning if codesize exceeds EIP-170 limits
2020-01-08 09:48:59 +01:00
Christian Parpart
345f9928ab
Library libdevcore renamed to libsolutil.
2020-01-07 15:51:50 +01:00
Christian Parpart
6b23412fae
C++ namespace cleanup (except tests).
2020-01-07 15:51:50 +01:00
Jason Cobb
529405deb6
Move ContractKind from ContractDefinition to file-scope
2020-01-07 09:11:29 -05:00
Leonardo
f7624e254c
Merge pull request #8098 from ethereum/smt_fix_shared_ptr
...
[SMTChecker] Replace some shared_ptr by unique_ptr/raw
2020-01-06 14:58:37 +01:00
Mathias L. Baumann
20cf9d9fef
Merge pull request #8038 from ethereum/statless-typechecker-7566
...
Refactor PostTypeChecker into multiple classes per usecase
2020-01-06 14:39:58 +01:00
Leonardo Alt
f4f83690f3
Replace some shared_ptr by unique_ptr or raw pointers
2020-01-06 14:16:49 +01:00
Alex Beregszaszi
4d791b2679
Issue warning if codesize exceeds EIP-170 limits
2019-12-25 19:51:35 +01:00
chriseth
ece6463f56
Merge pull request #8069 from random-internet-cat/set-scope
...
Move scope of Scopable into new ScopableAnnotation
2019-12-20 08:22:36 +01:00
Jason Cobb
6679f92c8a
Move all references to scope into annotation
2019-12-19 21:45:16 -05:00
Jason Cobb
69fd185903
Add new annotations for Scopables
2019-12-19 21:45:16 -05:00
Jason Cobb
30b1b39901
Have other annotations subclass DeclarationAnnotation
2019-12-19 21:45:16 -05:00
Jason Cobb
be14d5f28d
Add DeclarationAnnotation
2019-12-19 21:45:16 -05:00
Jason Cobb
bc71f61467
Add ScopableAnnotation
2019-12-19 20:50:43 -05:00
chriseth
7db88cfedd
Remove yul::Instruction
.
2019-12-19 23:22:19 +01:00
Alex Beregszaszi
65e59ecd06
Rename EWasm/ewasm/eWasm to Ewasm
2019-12-19 11:36:08 +00:00
Mathias Baumann
a8ca96cd3e
Refactor PostTypeChecker into multiple classes per usecase
2019-12-19 10:43:27 +00:00
Alex Beregszaszi
018960ebb1
Rename EWasmObjectCompiler to WasmObjectCompiler
2019-12-18 15:59:31 +00:00
chriseth
bdd338a8de
Merge pull request #7921 from ghallak/func-selector-ast-json
...
Add function selector to FunctionDefinition AST JSON
2019-12-16 14:07:35 +01:00
Gaith Hallak
371e6a4801
Add function selector to FunctionDefinition AST JSON
2019-12-16 15:16:54 +03:00
Erik Kundt
cc1b28b12e
Fixes segfault on empty contract w/ error recovery.
2019-12-13 15:39:19 +01:00
Alex Beregszaszi
4a2a2eb635
Remove Boost <1.55 workaround for multiprecision::msb()
2019-12-13 00:15:15 +00:00
chriseth
c175a468ab
Do not call ABIEncoderV2 experimental.
2019-12-12 10:59:07 +01:00
chriseth
f1e7bec11d
Include public state variables' base functions in the AST.
2019-12-11 15:32:28 +01:00
Leonardo Alt
1fb62b91d2
Add more override tests with public state variables
2019-12-11 15:15:51 +01:00
chriseth
70623665bf
Move helper structs and clean code.
2019-12-11 15:15:51 +01:00
chriseth
30732269f6
Consider state vars.
2019-12-11 15:15:51 +01:00
chriseth
57824566e6
Use proxies.
2019-12-11 15:15:51 +01:00
chriseth
3e1b00b459
Introduce proxies.
2019-12-11 15:15:51 +01:00
chriseth
90feb8f72a
Move Visibility out of Declaration.
2019-12-11 00:38:59 +01:00
chriseth
a66b5ea0ad
Fix visitor.
2019-12-10 16:54:04 +01:00
chriseth
93d84f3554
Split out override checker into its own file.
2019-12-10 16:00:05 +01:00
chriseth
a5f7661075
Ambigous overrides for modifiers.
2019-12-09 18:43:59 +01:00
chriseth
152f42c6b2
Make ambigous override checker generic.
2019-12-09 18:41:39 +01:00
chriseth
e1d6ce2b66
Override checks for modifiers.
2019-12-09 18:41:39 +01:00
chriseth
f6916a637e
Merge remote-tracking branch 'origin/develop' into develop_060
2019-12-09 17:16:58 +01:00
Daniel Kirchner
4c7f9f9751
Do not require overriding for functions in common base with unique implementation.
2019-12-09 16:04:45 +01:00
Leonardo Alt
225041738e
Add SMTCheckerTest for isoltest
2019-12-09 15:32:08 +01:00
chriseth
0176c97626
Merge pull request #7923 from ethereum/assertAddressName
...
Fix wrong construction of ElementaryTypeNameToken
2019-12-09 14:36:01 +01:00
Mathias Baumann
be615d4f2b
Fix wrong construction of ElementaryTypeNameToken
...
And add an assert to prevent it in the future
2019-12-09 13:24:33 +00:00
Mathias Baumann
e999409c89
Sync & update AST exporting according to AST changes
2019-12-09 10:42:24 +00:00
chriseth
e061f1e743
Merge remote-tracking branch 'origin/develop' into HEAD
2019-12-05 16:44:26 +01:00
Mathias Baumann
b7d5de59c5
Implement overridding of functions by public variables
2019-12-05 12:48:52 +00:00
Gaith Hallak
4d90180e24
Support referencing other constants in inline assembly
2019-12-05 13:27:17 +03:00
Daniel Kirchner
426f04b389
Implement and fix overriding unimplemented and implemented functions with unimplemented functions.
2019-12-05 09:26:43 +01:00
Daniel Kirchner
8b35918ad0
Replace superFunction by baseFunctions in AST annotations and JSON AST.
2019-12-05 03:33:32 +01:00
chriseth
d34b0b76b1
Merge pull request #7837 from ethereum/docstring-named-return
...
Report DocString error on named return paramater mismatch
2019-12-04 17:57:52 +01:00
Leonardo Alt
7be6b54fc7
Add comment
2019-12-04 17:31:44 +01:00
Leonardo Alt
48c3a5c225
[SMTChecker] Create options to choose SMT solver in runtime
2019-12-04 17:31:44 +01:00
chriseth
42d9a8e962
Merge remote-tracking branch 'origin/develop' into develop_060
2019-12-04 17:01:44 +01:00
Erik Kundt
19d466d6fb
Fixes named return natspec errors in compilation tests.
2019-12-04 15:38:12 +01:00
Erik Kundt
e5cb0fe839
Reports doctring error on named return mismatch.
2019-12-04 15:38:11 +01:00
Leonardo Alt
67d82fc8a7
[SMTChecker] Use rlimit instead of tlimit for SMT queries
2019-12-04 11:52:18 +01:00
chriseth
e3ee67da6c
Merge pull request #7792 from ethereum/enableYulOptimizer
...
Enable yul optimizer by default.
2019-12-03 21:24:22 +01:00
chriseth
2d42da3b7d
Merge pull request #7817 from ethereum/bail-on-shadowing-state-vars
...
Report error on shadowing state variables
2019-12-03 21:22:39 +01:00
Christian Parpart
7bbdfe070f
Make shadowing of inherited state variables an error.
2019-12-03 21:20:03 +01:00
chriseth
2f11ac3590
Merge remote-tracking branch 'origin/develop' into develop_060
2019-12-03 21:17:15 +01:00
chriseth
19a6f09cc8
Merge commit '4d2f20570' into develop_060
2019-12-03 21:01:31 +01:00
chriseth
96d777d7f1
Merge commit 'a7d481fb9' into develop_060
2019-12-03 20:47:30 +01:00
Alex Beregszaszi
9140a7d64e
Support catching YulException nicely in StandardCompiler
2019-12-03 19:06:21 +01:00
Leonardo Alt
b1577f5e46
[SMTChecker] Fix ICE in array of structs type
2019-12-03 01:12:30 +01:00
Daniel Kirchner
05baa23e8a
Require unimplemented functions to be virtual.
2019-12-02 21:59:00 +01:00
Daniel Kirchner
77a9e91443
Enable yul optimizer by default.
2019-12-02 19:30:14 +01:00
chriseth
c61ed0b22d
Merge pull request #7797 from ethereum/allowTranslationInAssemblyMode
...
Allow EVM to EWasm translation in assembly mode.
2019-12-02 13:15:06 +01:00
Leonardo
a7d481fb94
Merge pull request #7851 from ethereum/smt_fix_function_type
...
[SMTChecker] Fix ICE for arrays and mappings of functions.
2019-11-30 13:15:08 +01:00
Leonardo
767ce4417f
Merge pull request #7850 from ethereum/smt_fix_typetype
...
[SMTChecker] Fix visit to IndexAccess that has type Type
2019-11-29 18:18:26 +01:00
Leonardo Alt
5adc2a40b9
[SMTChecker] Fix ICE for arrays and mappings of functions.
2019-11-29 18:06:44 +01:00
Leonardo Alt
9eda95caf9
[SMTChecker] Fix visit to IndexAccess that has type Type
2019-11-29 17:20:50 +01:00
Leonardo Alt
c09da092d2
[SMTChecker] Fix constructors with local vars
2019-11-29 16:59:15 +01:00
Daniel Kirchner
025a696bb0
Fix unrelated test failure.
2019-11-28 20:01:36 +01:00
Daniel Kirchner
7d1b0c6023
Fix Yul IR push
2019-11-28 18:11:38 +01:00
chriseth
ccfc1840a9
Allow assembly stack to translate its source.
2019-11-28 16:15:15 +01:00
Leonardo Alt
a352abe00d
[SMTChecker] Add support to constructors
2019-11-28 14:43:23 +01:00
chriseth
f7fc42d8c3
Merge pull request #7826 from ethereum/develop
...
Merge develop into develop_060
2019-11-28 13:37:19 +01:00
Leonardo Alt
240ff30878
[SMTChecker] Do not visit the name of a modifier invocation
2019-11-27 22:34:33 +01:00
chriseth
1ebcc757e1
Merge remote-tracking branch 'origin/develop' into develop_060
2019-11-27 19:14:08 +01:00
Mathias Baumann
7bc6645218
Disallow use of virtual and private together
2019-11-27 18:52:41 +01:00
chriseth
23181f549e
Remove plain new operators from AST.
2019-11-27 18:03:09 +01:00
chriseth
0bb88dabb7
Restrict usage of plain "new".
2019-11-27 17:55:11 +01:00
chriseth
b0db64ff5b
Merge remote-tracking branch 'origin/develop' into develop_060
2019-11-26 16:19:35 +01:00
chriseth
41177bc75c
Merge pull request #7770 from ethereum/yul_string_format
...
[Yul] Format string literals back to quoted string literals
2019-11-26 15:51:54 +01:00
chriseth
0973ae751a
Do not warn about enabled ABIEncoderV2 anymore.
2019-11-26 15:49:42 +01:00
Leonardo Alt
ce83bfb088
[Yul] Format string literals back to quoted string literals
2019-11-26 15:28:39 +01:00
Gaith Hallak
4a1e85436b
Allow splitting string literals into multiple parts
2019-11-26 14:41:30 +03:00
Leonardo Alt
ddc478e3e4
Add CallbackKind and use it for the SMT solver
2019-11-21 22:10:21 +00:00
chriseth
a00f824479
Merge pull request #7773 from ethereum/develop
...
Merge develop into develop_060
2019-11-21 21:49:22 +01:00
chriseth
a26dd5a428
Remove trailing spaces in output.
2019-11-21 20:09:03 +01:00
chriseth
d5e9271592
Merge pull request #7350 from ethereum/array-length-rvalue
...
Make `length` member read-only
2019-11-21 19:22:42 +01:00
chriseth
8f2595957b
Merge pull request #7719 from ethereum/librarySignatuŕes
...
Add selector member to public and external library functions.
2019-11-20 18:43:14 +01:00
Leonardo Alt
389da5228e
Merge remote-tracking branch 'origin/develop' into merge_develop_060
2019-11-20 12:27:40 +01:00
Daniel Kirchner
372df6b9e1
Implement array push and pop for yul and replace assignments in via yul tests.
2019-11-20 12:04:42 +01:00
chriseth
5deaac0849
Merge pull request #7740 from ethereum/istanbul
...
Enable support for Istanbul
2019-11-20 10:49:27 +01:00
chriseth
32f321e416
Merge pull request #7751 from ethereum/replace_boost_variant_std
...
Replace boost::variant by std::variant in libyul
2019-11-19 19:40:39 +01:00
chriseth
d696b3c92b
Merge pull request #7743 from ethereum/fixice-7558
...
Disallow conversion from ``super``
2019-11-19 18:52:33 +01:00
Leonardo Alt
be849b3c47
Replace boost::variant by std::variant in libyul
2019-11-19 17:23:18 +01:00
Mathias Baumann
23cad71c88
Disallow conversion from `super
`
2019-11-19 17:14:11 +01:00
Alex Beregszaszi
840aba8929
Add new gas price for deployed bytecode (EIP2028)
2019-11-19 17:09:18 +01:00
Erik Kundt
ecaed1030f
Makes array length access read-only.
2019-11-19 16:09:21 +01:00
Erik K
94272d44aa
Merge pull request #7745 from ethereum/develop
...
Merge develop into develop_060
2019-11-19 15:30:31 +01:00
chriseth
6797879128
Merge pull request #7647 from ethereum/virtual-5424
...
Implement virtual keyword
2019-11-19 13:21:27 +01:00
Leonardo Alt
d818746e0c
[SMTChecker] Fix ICE in abi.decode
2019-11-18 13:15:10 +01:00
Daniel Kirchner
a0ae36ba70
Add selector member to public and external library functions.
2019-11-15 16:12:29 +01:00
chriseth
216e1749f4
Merge remote-tracking branch 'origin/develop' into develop_060
2019-11-14 13:42:46 +01:00
chriseth
766309b6e4
Merge pull request #7713 from ethereum/no-lib-instance-7625
...
Disallow variables of library types
2019-11-14 13:39:56 +01:00
Mathias Baumann
0891b9451b
Disallow variables of library types
2019-11-14 13:20:31 +01:00
chriseth
a667384517
Merge pull request #7712 from ethereum/fixIstanbulAsmParsing
...
Fix assembly parsing by passing evm version.
2019-11-14 13:20:15 +01:00
chriseth
b099374d8c
Fix assembly parsing by passing evm version.
2019-11-14 13:06:36 +01:00
chriseth
8d46f39643
Merge pull request #7707 from ethereum/smt_ice_implicit_conversion
...
[SMTChecker] Fix ICE in string literal to fixed bytes conversion
2019-11-14 11:52:58 +01:00
Mathias Baumann
5b8ff78176
Implement virtual keyword
2019-11-14 11:49:39 +01:00
chriseth
f6191a7183
Merge pull request #7709 from ethereum/overloadMsgForMagic
...
Reconstruct function definition for magic variables in overload error message.
2019-11-14 11:24:54 +01:00
Leonardo Alt
5f43b8dbeb
Output the storage layout of a contract via storageLayout artifact
2019-11-14 10:19:17 +01:00
chriseth
06588cde76
Reconstruct function definition for magic variables in overload error message.
2019-11-14 10:13:22 +01:00
Leonardo Alt
8efacfb545
[SMTChecker] Fix ICE in string literal to fixed bytes implicit conversion
2019-11-13 22:25:18 +01:00
chriseth
c4441bac5b
Merge pull request #7705 from ethereum/list-overloads-7146
...
List candidates when overload failed
2019-11-13 17:35:37 +01:00
Mathias Baumann
15df2b30d7
List candidates when overload failed
...
fixes #7146
2019-11-13 15:54:36 +01:00
Leonardo Alt
e3652627fd
[SMTChecker] Fix ICE in CHC when function used as argument
2019-11-13 15:11:30 +01:00
Mathias Baumann
7d4e4b6088
Parse "virtual" keyword
2019-11-13 13:28:01 +01:00
djudjuu
e437443645
Inline assembly to AST json export
2019-11-13 12:13:22 +01:00
Daniel Kirchner
ce7268272d
Allow obtaining the address of a library by conversion to `address
`.
2019-11-12 17:09:13 +01:00
Daniel Kirchner
8148619d5b
Merge branch 'develop' into develop_060
2019-11-12 10:32:41 +01:00
Mathias Baumann
e35a23bbcc
Add `switch (..)
to style checker
2019-11-11 17:44:21 +01:00
Mathias Baumann
e643c4ca28
Add `while (..)
to style checker
2019-11-11 17:28:41 +01:00
chriseth
2e5a42836c
Merge pull request #7681 from ethereum/develop
...
Merge develop into develop_060
2019-11-11 16:42:03 +01:00
Christian Parpart
f15d47f165
Yul: Remove obsoleted FunctionalInstruction.
2019-11-11 16:04:39 +01:00
Alexander Arlt
ce0cef7cbc
Output which functions are not implemented
2019-11-08 14:06:57 -05:00
Leonardo Alt
5dacaf57bc
Fix ICE in FixedBytes IndexAccess
2019-11-08 17:29:40 +01:00
chriseth
138ee647f1
Provide different options for reason strings.
2019-11-07 14:13:53 +01:00
Daniel Kirchner
108992c335
Merge pull request #7640 from ethereum/smt_fix_060
...
[SMTChecker] Fix override tests
2019-11-07 14:10:10 +01:00
chriseth
c0b27d0bc1
Merge pull request #7648 from ethereum/inlineAssemblyShadowing
...
Error on shadowing and invalid names in inline assembly
2019-11-07 13:31:09 +01:00
Daniel Kirchner
0556f64722
Analyze inline assembly variable declarations for invalid or shadowing names.
2019-11-07 13:04:37 +01:00
Leonardo Alt
fc945880d1
[SMTChecker] Fix override tests
2019-11-07 11:49:32 +01:00
Leonardo Alt
6b10efff8c
Add CHCSmtLib2Interface
2019-11-07 11:12:11 +01:00
chriseth
21e65076b3
Merge pull request #7650 from ethereum/develop
...
Merge develop into develop_060
2019-11-06 21:56:55 +01:00
cd10012
a94d22e5fe
Add documentation for extractReturnParameterDocs
2019-11-06 21:45:01 +01:00
cd10012
16fe59b7b4
Implement @erak review notes by creating function and adding constructor test
...
Update 060 doc with natspec change
Add two more tests with mixed usage
Fix solc-js
fix changelog
2019-11-06 21:44:59 +01:00
cd10012
f598b1515f
Give unamed parameters unique keys and update tests to new spec
...
Fix whitespace
2019-11-06 21:44:34 +01:00
cd10012
18fe693fdd
Add unamed return param test and check size in conditional
2019-11-06 21:44:09 +01:00
cd10012
b3ae601e88
Refactor to have multiple return params
2019-11-06 21:44:09 +01:00
chriseth
30ea41c36d
Merge pull request #7526 from ethereum/modifierDepth
...
Add modifier depth to source mappings.
2019-11-06 13:03:40 +01:00
Leonardo Alt
10e70b8603
[SMTChecker] Support inheritance and resolve overrides
2019-11-06 11:00:06 +01:00
chriseth
587c87b15b
Commandline interface additions for webassembly binary.
2019-11-05 20:05:57 +01:00
chriseth
e79a32e9d5
Wasm to binary assembly stack.
2019-11-05 20:02:42 +01:00
chriseth
4d99bf68f4
Merge pull request #7638 from ethereum/develop
...
Merge develop into develop_060
2019-11-05 17:33:54 +01:00
chriseth
cb2096c82a
Add modifier depth to source mappings.
2019-11-05 16:50:38 +01:00
chriseth
5388c919f0
Some changes to "abstract".
2019-11-05 13:55:31 +01:00
Leonardo Alt
c5e081dc8c
[SMTChecker] Refactor CHC loops and add if blocks
2019-11-05 09:28:59 +01:00
chriseth
46ac16d25c
Merge remote-tracking branch 'origin/develop' into develop_060
2019-11-04 19:09:11 +01:00
Leonardo
1eac3d1d83
Merge pull request #7582 from ethereum/smt_multid_array_assignment
...
[SMTChecker] Support assignments to m-d arrays and mappings
2019-11-04 17:37:33 +01:00
Daniel Kirchner
3321fc56ea
Split fallback function and introduce "fallback()" and "receive()" syntax.
2019-11-04 17:17:58 +01:00
chriseth
5392532d70
Fix override error message.
2019-11-04 13:37:23 +01:00
Alexander Arlt
f3f652e290
Update TypeChecker.cpp
2019-11-01 14:54:47 -05:00
Alexander Arlt
c908c16acd
Remove InternalCompilerError on abstract contract instantiation.
2019-11-01 14:54:47 -05:00
Alexander Arlt
62950a9234
Support for abstract contracts.
2019-11-01 14:54:47 -05:00
Mathias Baumann
6c6a9054b2
Implement override checking
2019-10-30 17:31:33 +01:00
Mathias Baumann
5ff02c12e2
Add reference to contract in FunctionDefinition annotation
2019-10-30 17:31:33 +01:00
Mathias Baumann
20e227afb5
Ensure list of overrides consists of contracts
2019-10-30 17:31:33 +01:00
Mathias Baumann
b76106fc4a
Parse override keyword for modifier definitions
2019-10-30 17:31:33 +01:00
Mathias Baumann
f4c40080c4
Move if-condition to function for re-use
2019-10-30 17:31:33 +01:00
chriseth
c30839888f
Use `leave
` in code generator.
2019-10-29 14:32:16 +01:00
chriseth
ceb8ee9124
[Yul] leave statement.
2019-10-29 14:32:16 +01:00
Leonardo Alt
8a42e3f87a
[SMTChecker] Support assignments to m-d arrays and mappings
2019-10-28 17:27:39 +01:00
chriseth
edf1e83fda
Merge remote-tracking branch 'origin/develop' into develop_060
2019-10-28 15:21:49 +01:00
chriseth
607bf24afe
Merge pull request #7386 from ethereum/060-strict-inline-assembly
...
Defaulting to strict inline assembly (instead of loose)
2019-10-28 12:48:58 +01:00
chriseth
9719f099aa
Merge pull request #7551 from ethereum/060-cxx17-std-optional
...
Use `std::optional<>` rather than `boost::optional<>`
2019-10-28 12:17:31 +01:00
chriseth
07c67b98f6
Merge remote-tracking branch 'origin/develop' into HEAD
2019-10-28 12:12:52 +01:00
Christian Parpart
df729b3084
Make use of C++17 std::optional<> instead of boost::optional<>.
2019-10-28 11:39:30 +01:00
Henry Lee
24cbb4dd17
Treat magic variables as unknown identifiers in inline assembly
...
This fixes #4575 . For keywords such as 'super' and 'this', will be
treated as unknown identifiers.
2019-10-28 14:59:50 +11:00
Christian Parpart
3c1d12b16c
Assembly: Remove errorTypeForLoose property from AsmAnalyzer.
2019-10-25 15:01:26 +02:00
Christian Parpart
dc2adb3d9d
Assembly: Removing EVMDialect::looseAssemblyForEVM().
2019-10-25 15:01:26 +02:00
Christian Parpart
e23998fc6e
Assembly: Remove Label instruction.
2019-10-25 15:01:25 +02:00
Christian Parpart
5e8d348f66
Assembly: Remove StackAssignment instruction.
2019-10-25 15:01:25 +02:00
Christian Parpart
5a52fa547e
Assembly: Changed parser to use strict assembly mode.
2019-10-25 15:01:25 +02:00
chriseth
15e39f7d65
Merge pull request #7556 from ethereum/ice-7550
...
Check for use of modifiers in invalid contexts
2019-10-24 10:32:49 +02:00
Christian Parpart
76c72ba89f
Fixes signedness (causes compilation failure on MSVC).
2019-10-23 16:32:41 +02:00
Mathias Baumann
c3e8023ad5
Fix wrong assert in overflow check
2019-10-23 14:59:34 +02:00
Christian Parpart
c6152b8059
Compile fix.
2019-10-23 13:08:17 +02:00
Mathias Baumann
8c5d1da5a5
Check for use of modifiers in invalid contexts
2019-10-23 12:36:20 +02:00
Mathias Baumann
ad7cf42aad
Add missing dots in deprecation warning
2019-10-23 12:23:21 +02:00
Mathias Baumann
6ac12afd06
Disallow call of same-class-ctor as modifier
2019-10-23 10:29:41 +02:00
Mathias L. Baumann
7e01696030
Merge pull request #7554 from ethereum/develop
...
Merge develop into develop_060
2019-10-21 17:05:12 +02:00
chriseth
ebfe7391ff
Use selfbalance for `address(this).balance
`.
2019-10-16 14:25:56 +02:00
Gaith Hallak
62a62555bc
Remove trailing spaces from JSON output
2019-10-02 19:02:35 +02:00
Gaith Hallak
9d34d7de2f
Remove trailing spaces from JSON output
2019-10-02 18:01:47 +03:00
chriseth
f884373142
Merge branch 'origin/develop' into develop_060
2019-10-02 16:29:36 +02:00
Daniel Kirchner
7202ebb5b2
Fix internal compiler error for arrays of recursive structs.
2019-10-01 16:51:14 +02:00
Christian Parpart
00d7dac15f
Fixes source location in warning for shadowing import delcarations.
2019-09-30 11:45:46 +02:00
Leonardo
ca714a2d3d
Merge pull request #7485 from ethereum/develop
...
Merge develop into develop_060
2019-09-26 15:43:12 +02:00
chriseth
387cb620e9
Merge pull request #7452 from ethereum/smt_fix_function_name
...
[SMTChecker] Fix SMT name for function identifiers
2019-09-24 15:55:14 +02:00
chriseth
cda23d63e9
Merge pull request #7458 from ethereum/fixErrorMessage
...
Fix error message about accessing storage pointers.
2019-09-24 15:11:03 +02:00
Leonardo Alt
83ef34f41d
[SMTChecker] Fix SMT name for function identifiers
2019-09-24 11:23:10 +02:00
chriseth
ca21659749
Fix error message about accessing storage pointers.
2019-09-24 10:52:02 +02:00
chriseth
b5d6d5fcf9
Create.
2019-09-23 17:22:56 +02:00
chriseth
70b796bd1a
Code generator for try/catch.
2019-09-23 17:22:56 +02:00
chriseth
8e736a9f49
Type Checker for try/catch.
2019-09-23 17:22:56 +02:00
chriseth
b5bc52f2a7
Control flow for try statements.
2019-09-23 17:22:56 +02:00
chriseth
6d6914f98f
Parser for try/catch.
2019-09-23 17:22:42 +02:00
chriseth
a66c354698
AST for try and catch.
2019-09-23 17:22:09 +02:00
Leonardo Alt
ed9674be8d
[SMTChecker] Add as const function to SMTLib2Interface
2019-09-18 22:57:14 +02:00
chriseth
9ecd51c54d
Refactor.
2019-09-18 14:06:03 +02:00
Leonardo Alt
43d6e00b14
Add push() for dynamic storage arrays
2019-09-17 13:47:33 +02:00
chriseth
5b3efee93b
Merge pull request #7442 from ethereum/develop
...
Merge develop into develop_060
2019-09-17 12:16:27 +02:00
Leonardo Alt
eab9f65610
Fix ICE when pop dyn storage array of mapping
2019-09-16 16:33:17 +02:00
Leonardo Alt
d685554980
Create option for metadata hash
2019-09-13 18:59:12 +02:00
Leonardo Alt
e1c238e25f
[SMTChecker] Add loop support
2019-09-13 12:40:53 +02:00
Daniel Kirchner
4782c800ec
Initial introduction of array slices with partial implementation for dynamic calldata arrays.
2019-09-13 10:57:53 +02:00
Leonardo Alt
5cfe0b7670
Allow explicit conversion from address to address payable
2019-09-09 23:46:00 +02:00
Daniel Kirchner
f4d990e5be
Drop constant and payable fields from ABI.
2019-09-06 14:42:09 +02:00
Daniel Kirchner
5d69bdf81e
Remove ASTPrinter.
2019-09-06 12:38:55 +02:00
chriseth
ea0a952a69
Merge pull request #7362 from ethereum/develop
...
Merge develop into develop_060
2019-09-05 16:50:44 +02:00
Daniel Kirchner
7148792b8a
Refactor ExpressionCompiler with acceptAndConvert.
2019-09-05 15:05:59 +02:00
chriseth
fd687f50ff
Merge pull request #7353 from ethereum/develop
...
Update 0.6.0 from develop
2019-09-04 20:21:37 +02:00
krk
33f7f960cf
Allow exponentials with signed base and unsigned power.
2019-09-04 17:32:47 +02:00
chriseth
8485a1abec
Change ABI sorting order.
2019-09-04 13:06:09 +02:00
Leonardo Alt
a51577facf
Fix Windows build
2019-09-02 22:37:30 +02:00
Leonardo Alt
a774b2d905
[SMTChecker] Zero-initialize arrays
2019-09-02 22:37:30 +02:00
chriseth
c499758cd8
Merge pull request #7326 from ethereum/develop
...
Merge develop into 0.6.0 branch.
2019-09-02 16:11:20 +02:00
Daniel Kirchner
2b938d703c
Allow global enum definitions.
2019-09-02 11:52:51 +02:00
Daniel Kirchner
872d21f527
Allow global struct definitions.
2019-09-02 11:17:42 +02:00
Leonardo Alt
214e5c6369
[SMTChecker] Fix index access type type error
2019-08-27 16:39:19 +02:00
Mathias Baumann
24716404f8
Parse override keyword
2019-08-26 17:34:21 +02:00
Mathias L. Baumann
502bf01be2
Merge pull request #7278 from ethereum/develop
...
Merge develop into develop_060
2019-08-26 10:26:48 +02:00
Mathias Baumann
0e3ff25b4e
Make sure json output array order is consistent
...
The source of the "contractDependencies" value was an std::map, thus
order was more or less random.
2019-08-19 17:42:03 +02:00
Daniel Kirchner
4354ef2ef4
Add update suggestion.
2019-08-19 14:58:05 +02:00
Daniel Kirchner
42f30981db
Add unimplemented assertion to IR generation when accessing address member of external function types.
2019-08-19 14:56:04 +02:00
Daniel Kirchner
9f6fff2120
Replace casting of external functions to address by a member named "address".
2019-08-19 14:56:04 +02:00
chriseth
c047803b80
Change BreadthFirstSearch to use value types instead of pointers.
2019-08-15 16:10:10 +02:00
Leonardo Alt
1a70a46f9b
[CHC] Add function blocks and check asserts
2019-08-15 12:25:15 +02:00
Daniel Kirchner
e545103ec8
Extract reasonOfFailure to lambda function.
2019-08-14 17:59:48 +02:00
Daniel Kirchner
b0a5666b43
Better error messages when writing to expressions that cannot be written to.
2019-08-14 17:59:48 +02:00
chriseth
0c2f8ddfae
Merge pull request #7231 from ethereum/extractMSize
...
[Yul] Remove ContainsMSize from side-effect-collector.
2019-08-13 18:03:51 +02:00
chriseth
57125de9ef
Remove ContainsMSize from side-effect-collector.
2019-08-13 13:34:33 +02:00
Mathias Baumann
444395960f
Fix link to Contract ABI in source code
2019-08-13 12:43:04 +02:00
Leonardo
cbac3a4208
Merge pull request #7107 from ethereum/smt_chc_constructor_interface
...
[SMTChecker] Add CHC constructor/interface/error blocks
2019-08-12 15:06:08 +02:00
Leonardo Alt
bef6228810
[SMTChecker] Create CHC constructor/interface/error blocks
2019-08-12 12:34:57 +02:00
Leonardo Alt
360f868836
[SMTChecker] Fix literal string type mismatch
2019-08-10 21:51:46 +02:00
Leonardo Alt
4214cd1354
[SMTChecker] Fix ICE when reporting cex concerning state vars from different source files
2019-08-10 20:56:52 +02:00
Leonardo
67c855e93e
Merge pull request #7170 from ethereum/smt_fix_other_contract_state_var
...
[SMTChecker] Fix ICE when inlining functions from different source
2019-08-09 19:14:28 +02:00
Leonardo Alt
7b22496b1f
[SMTChecker] Fix ICE when inlining functions that use state vars and are in a different source
2019-08-09 17:50:52 +02:00
Leonardo Alt
11d8cf588e
[SMTChecker] Set unknown values for return variables of recursive functions
2019-08-09 17:01:08 +02:00
chriseth
74f16ef186
Refactor IRLValue so that it does not require IRGenerationContext.
2019-08-08 17:27:35 +02:00
chriseth
9955c51769
Merge pull request #7077 from ethereum/sol-yul-delete-fixed-storage
...
[Sol->Yul] Implement delete for fixed-sized storage arrays
2019-08-08 16:47:16 +02:00
mingchuan
15631a7fbe
Split calldataEncodedSize into calldataEncodedSize, calldataEncodedTailSize and calldataHeadSize and fix all usages.
2019-08-08 15:52:21 +02:00
Mathias Baumann
e072885031
[Sol->Yul] Implement delete for fixed-sized storage arrays
2019-08-07 18:28:52 +02:00
chriseth
6166dc8e8f
Merge pull request #6856 from rocky/recoveringParser1-ast
...
Produce AST even when there are parser errors
2019-08-07 15:56:45 +02:00
chriseth
c8f04b88bf
Merge pull request #7176 from ethereum/decodeMemoryLocation
...
Always copy dynamically-sized memory arrays during CompilerUtils::abiDecode
2019-08-07 15:42:14 +02:00
rocky
7fd7cc1e76
Produce AST even when there are parser errors
2019-08-07 15:25:53 +02:00
Daniel Kirchner
efb34bdf22
Always copy dynamically-sized memory arrays during CompilerUtils::abiDecode.
2019-08-06 14:11:14 +02:00
Leonardo Alt
369f8cd97f
[SMTChecker] CHC create function return variables
2019-08-05 12:36:51 +02:00
Leonardo
11632966c9
Merge pull request #7171 from ethereum/smt_fix_compound_bitwise
...
[SMTChecker] Fix ICE compound bitwise op inside branch
2019-08-05 12:15:01 +02:00
chriseth
9b375edfe3
Merge pull request #6787 from ethereum/sol2yul-ctor-code
...
Improve constructor-code codegen (wrt. state variable initialization)
2019-08-05 11:50:34 +02:00
Christian Parpart
235638b3fc
Implements constructor code for state variables.
2019-08-05 11:23:01 +02:00
Leonardo Alt
d5fb8cf58a
[SMTChecker] Fix ICE compound bitwise op inside branch
2019-08-02 20:02:39 +02:00
Leonardo Alt
7b5863e583
Do not erase knowledge about storage pointers when another pointer is assigned
2019-08-02 13:09:06 +02:00
chriseth
2a25d7461f
Merge pull request #7123 from rocky/tolerate-pragma-mismatch
...
A pragma version mismatch is not fatal if ...
2019-08-01 14:48:24 +02:00
chriseth
6730a59f74
Merge pull request #7157 from ethereum/fix-7155
...
FunctionType: Return correct stacksize for transfer/send
2019-08-01 14:40:35 +02:00
Mathias Baumann
e887c06f6b
FunctionType: Return correct stacksize for transfer/send
2019-08-01 13:56:09 +02:00
chriseth
04f298fd0e
Merge pull request #7132 from ethereum/smt_acc_solver
...
[SMTChecker] EncodingContext config flag to accumulate assertions
2019-08-01 13:04:37 +02:00
chriseth
aa87a607fd
Merge pull request #7152 from ethereum/smt_fix_pointer_cleanup
...
[SMTChecker] Erase pointer knowledge properly inside loops
2019-08-01 12:46:20 +02:00
Leonardo Alt
44d7c6976a
Erase pointer knowledge properly inside loops
2019-07-30 12:47:50 +02:00
Mathias Baumann
d9addbcf49
Fix error in g++7 with -O2 flag
2019-07-29 16:17:41 +02:00
Leonardo
00accd9daa
Merge pull request #7141 from ethereum/smt_fix_json
...
[SMTChecker] Reset SSA index to 0 instead of increasing in context reset
2019-07-29 10:20:06 +02:00
Leonardo
0197a200cd
Merge pull request #7142 from ethereum/smt_init_numbers
...
[SMTChecker] Initialize all number types with 0
2019-07-29 10:19:17 +02:00
Leonardo Alt
847f574e22
[SMTChecker] Fix ICE when inlining function with tuple expression
2019-07-26 16:29:29 +02:00
Leonardo Alt
cd5a5b3686
[SMTChecker] Initialize all number types with 0
2019-07-25 15:15:18 +02:00
Leonardo Alt
6bcbeb1d23
[SMTChecker] Reset SSA index to 0 instead of increasing in context reset
2019-07-25 14:16:34 +02:00
Leonardo
264035f0dd
Merge pull request #7120 from ethereum/smt_refactor_inlining
...
[SMTChecker] Refactor function inlining
2019-07-22 14:20:32 +02:00
Leonardo Alt
b204f27047
[SMTChecker] EncodingContext config flag to accumulate assertions
2019-07-19 19:31:25 +02:00
Leonardo
508cf66da2
Merge pull request #7062 from ethereum/smt_chc_checker
...
[SMTChecker] Add skeleton for CHC
2019-07-19 15:41:43 +02:00
Leonardo Alt
03cc124f32
Add CHC skeleton
2019-07-19 11:52:05 +02:00
chriseth
a30be56c27
Additional type info for ABI.
2019-07-18 16:54:11 +02:00
Leonardo Alt
382df64899
[SMTChecker] Refactor function inlining
2019-07-18 13:56:48 +02:00
rocky
f9b631f410
A pragma version mismatch is not fatal if ...
...
error recovery is desired.
Fixes #7085
2019-07-17 19:01:01 -04:00
Leonardo Alt
71144d0d39
[CHCChecker] Add CHCSolverInterface and Z3CHCSolverInterface
2019-07-15 17:31:39 +02:00
chriseth
579bdaddb9
Merge pull request #7088 from ethereum/diffLegYul
...
Document differences between legacy Solidity and Solidity via Yul.
2019-07-11 17:59:01 +02:00
chriseth
76d7ea888b
Document differences between legacy Solidity and Solidity via Yul.
2019-07-11 17:48:06 +02:00
chriseth
869d69d293
Supply full object to stack compressor and Optimizer Suite.
2019-07-10 18:49:42 +02:00
Mathias Baumann
d264e3e0ba
[Sol->Yul] Implement getter functions
2019-07-10 13:42:39 +02:00
Mathias Baumann
37f04976a2
[Sol->Yul] Implement keccak256
2019-07-09 18:25:07 +02:00
chriseth
15eb8fec50
Merge pull request #7015 from ethereum/sol-yul-arrays
...
[Sol->Yul] Implement uint256[] memory arrays
2019-07-09 17:34:46 +02:00
Mathias Baumann
0f24fcea17
[Sol->Yul] Implement uint256[] memory arrays
2019-07-09 15:36:02 +02:00
chriseth
859dbaa2a3
Merge pull request #7053 from djudjuu/moveSuffixHelper
...
move SuffixHelper to StringUtils
2019-07-09 14:32:05 +02:00
djudjuu
cafa01cbf6
moved SuffixHelper to StringUtils
2019-07-09 13:50:07 +02:00
chriseth
9cb9021c36
Cope with constants without value in inline assembly.
2019-07-09 11:12:13 +02:00
Leonardo
75eb67c3e0
Merge pull request #7050 from ethereum/smt_set_solver
...
[SMTChecker] EncodingContext's solver needs to be set dynamically
2019-07-08 15:19:55 +02:00
Leonardo Alt
96b0c4c148
[SMTChecker] New VariableUsage flag to inline functions
2019-07-08 14:40:33 +02:00
Leonardo Alt
01570bbc8c
EncodingContext's solver needs to be set dynamically
2019-07-08 14:40:15 +02:00
chriseth
18072586c9
Remove trailing whitespace in error message.
2019-07-08 14:28:38 +02:00
chriseth
25928767b7
Merge pull request #7058 from ethereum/smt_reset_context
...
[SMTChecker] Clear encoding context before engine starts
2019-07-08 12:36:50 +02:00
chriseth
aac226f7c1
Merge pull request #7041 from ethereum/smt_function_sort
...
[SMTChecker] Allow symbolic functions to be created via Sort
2019-07-08 12:33:38 +02:00
chriseth
7267873a96
Merge pull request #7038 from ethereum/addSecondaryLocationToStandardIO
...
Provide secondary source location for error messages in standard json.
2019-07-08 12:00:09 +02:00
Leonardo Alt
be663680d4
[SMTChecker] Clear encoding context before engine starts
2019-07-08 11:56:04 +02:00
chriseth
2e01816c6b
Merge pull request #7042 from ethereum/make-whiskers-fail-early
...
Make Whiskers fail early when called with int
2019-07-04 12:19:54 +02:00
Leonardo Alt
4aebdcc442
[SMTChecker] Allow FunctionSort to be created via sort and not type
2019-07-04 12:00:24 +02:00
chriseth
d3e542d32c
Provide secondary source location for error messages in standard json.
2019-07-04 10:54:01 +02:00
Mathias Baumann
3e51d14c6d
Fix missing int -> string conversion
2019-07-04 09:31:24 +02:00
Leonardo Alt
934e00d235
[SMTChecker] SymbolicVariables use EncodingContext to declare SMT vars
2019-07-03 16:05:56 +02:00
chriseth
b837705259
Merge pull request #7018 from ethereum/compile_only_requested
...
Compile only requested sources and contracts
2019-07-03 14:11:42 +02:00
chriseth
2b91022b25
Fix view/pure checker for access to base.
2019-07-03 11:19:57 +02:00
chriseth
60525dbf52
Merge pull request #7026 from ethereum/asmConstants
...
Support direct constants in inline assembly.
2019-07-02 14:21:24 +02:00
chriseth
817852c650
Merge pull request #7030 from ethereum/smt_move_solver
...
[SMTChecker] Move solver from SMTEncoder to BMC
2019-07-02 14:08:55 +02:00
chriseth
e542e46163
Merge pull request #7022 from ethereum/smt_create_expr
...
[SMTChecker] Always create symbolic expression
2019-07-02 14:07:24 +02:00
chriseth
cdd137e3d1
Support constant numbers in inline assembly.
2019-07-02 14:01:05 +02:00
chriseth
ca10b59b25
Merge pull request #7020 from ethereum/smt_fix_callstack_message
...
[SMTChecker] Fix wrong assertion in callstack message
2019-07-02 13:47:49 +02:00
Leonardo Alt
b0818bd002
[SMTChecker] Move solver pointer from SMTEncoder to BMC
2019-07-02 12:06:52 +02:00
Leonardo Alt
6f8fd309a2
Compile only requested sources and contracts
2019-07-01 18:52:21 +02:00
Leonardo Alt
fb3c85633b
Always create symbolic expression
2019-07-01 16:25:33 +02:00
Leonardo Alt
75663dc91e
[SMTChecker] Fix require with message
2019-07-01 16:17:06 +02:00
Leonardo Alt
6606a13ed2
[SMTChecker] Remove unsound assertion (too strong)
2019-07-01 16:16:39 +02:00
Leonardo Alt
3cb4ed83c1
[SMTChecker] Split SMTChecker into SMTEncoder and BMC
2019-07-01 15:05:03 +02:00
chriseth
3be21800ac
Merge pull request #6683 from ethereum/updateSwarm
...
Update swarm hash.
2019-06-27 13:18:29 +02:00
chriseth
53f37f487f
Merge pull request #6994 from ethereum/smt_refactor_targets
...
[SMTChecker] Delay all checks
2019-06-27 12:56:34 +02:00
chriseth
89f0e1e6da
Use updated swarm hash.
2019-06-27 12:49:06 +02:00
chriseth
aa11ad7d0a
Update swarm hash.
2019-06-27 12:48:51 +02:00
chriseth
8d18003808
Merge pull request #6716 from ethereum/wasmTranslation
...
[Yul] EVM to Wasm translation
2019-06-27 12:31:35 +02:00
Leonardo Alt
a28b84fdc3
[SMTChecker] Add a more general VerificationTarget
2019-06-27 10:31:50 +02:00
chriseth
b4a0a79398
Merge pull request #6993 from ethereum/smt_false_positives
...
[SMTChecker] Remove overflow check for assignments
2019-06-26 13:06:31 +02:00
chriseth
c6f7f5b2b0
Enable EWasm output.
2019-06-25 19:07:38 +02:00
chriseth
fe9aa59b8f
Fix conversion during storing.
2019-06-25 13:00:02 +02:00
Leonardo Alt
48d6729164
[SMTChecker] Remove overflow check for assignments
2019-06-24 17:58:56 +02:00
chriseth
efd8d8fe5e
Merge pull request #6991 from ethereum/check_style-no-space-before-range-based-for-loop-colon
...
Adds a test to check_style.sh to check for spaces before colon (:) in range based for loops.
2019-06-24 17:42:06 +02:00
Christian Parpart
7b3aba81fb
Adds a test to check_style.sh to check for spaces before colon (:) in range based for loops.
2019-06-24 17:32:58 +02:00
chriseth
2563178a0a
Merge pull request #6990 from ethereum/sol-yul-storage-array-index
...
Enable yul for more end to end tests
2019-06-24 16:30:33 +02:00
Leonardo Alt
ed275fd760
[SMTChecker] Collect assertions in EncodingContext
2019-06-24 15:03:00 +02:00
Mathias Baumann
0e812b16c2
Minor indent fix
2019-06-24 14:51:04 +02:00
chriseth
9c129a4087
Merge pull request #6984 from ethereum/yul-reindent
...
yul: adds reindent() function to reindent yul source code and makes us of it in IRGenerator
2019-06-24 12:54:40 +02:00
Christian Parpart
0fd1db533e
yul: adds reindent() function to reindent yul source code and makes use of it in IRGenerator.
...
This function does count curly and round braces and reindents
accordingly the beginning of each line.
It does consider line-comments (// and ///) but not multiline comments (/* ... */).
2019-06-24 12:53:50 +02:00
chriseth
350631ae0d
Merge pull request #6940 from ethereum/sol-yul-storage-array-index
...
[Sol->Yul] Implement index access for storage arrays
2019-06-24 12:49:19 +02:00
Mathias Baumann
1dd63f416e
[Sol->Yul] Implement index access for storage arrays
2019-06-20 16:14:51 +02:00
Mathias Baumann
346c512cd7
[Sol->Yul] Implement _slot/_offset suffix for storage variables
2019-06-20 14:50:52 +02:00
chriseth
9bb7160c4c
Merge pull request #6958 from sifmelcara/fix-abiencoderv2-codegen
...
Fix incorrect abi encoding of storage array of data type that occupy multiple storage slots
2019-06-20 13:08:42 +02:00
Daniel Kirchner
fcd3410f26
Implement checked mod for sol->yul code generation.
2019-06-20 12:30:32 +02:00
Daniel Kirchner
a5b9f634ef
Implement signed multiplication for sol->yul code generation.
2019-06-20 12:30:30 +02:00
Daniel Kirchner
e4c884ae13
Unify style of checked integer division for sol->yul code generation.
2019-06-20 12:18:18 +02:00
Daniel Kirchner
5f6af8b374
Implement signed subtraction for sol->yul code generation.
2019-06-20 12:16:56 +02:00
Daniel Kirchner
88988af561
Implement signed addition for sol->yul code generation.
2019-06-20 11:42:50 +02:00
Mathias Baumann
b03cb2bce6
YulUtilFuncs: Add missing/adjust existing documentation
2019-06-19 18:09:23 +02:00
Mathias Baumann
910cb8d329
[Sol->Yul] Implement .length for storage arrays
2019-06-19 18:09:23 +02:00
Mathias Baumann
c5b50039d2
[Sol->Yul] Report error after Ir code
...
this way less scrolling is required
2019-06-19 18:09:23 +02:00
mingchuan
ae273ff3bd
Move code that access calldata array element to separate function
2019-06-19 17:26:35 +08:00
mingchuan
492f945973
Coding style fix
2019-06-19 17:26:34 +08:00
chriseth
53f26d9719
Merge pull request #6963 from ethereum/runOptimizerOnAllDialects
...
[Yul] Run optimizer on all dialects.
2019-06-19 10:51:24 +02:00
chriseth
cc5045a56e
[Yul] Run optimizer on all dialects.
2019-06-19 10:01:16 +02:00
mingchuan
bfe074b2b1
Fix storage array abi encoding
...
Fix incorrect abi encoding of storage array of data type that occupy multiple storage slots
2019-06-19 10:46:05 +08:00
chriseth
56db792ad9
Merge pull request #6876 from rocky/recoveringParser1-StandardCompiler
...
Add parser errorRecovery (including StandardCompiler)
2019-06-18 22:40:35 +02:00
rocky
1a7e09ab7a
Add errorRecovery boolean to StandardCompiler
2019-06-18 15:54:05 -04:00
chriseth
05a67c486e
Use "what" in exception reports.
2019-06-18 17:34:10 +02:00
chriseth
6cb6fe35ef
Make Yul optimizer not fail for wasm.
2019-06-17 18:42:47 +02:00
chriseth
d7211c17e9
Merge pull request #6953 from ethereum/fix-comments-in-pr
...
[Sol->Yul] Style fixes
2019-06-17 17:29:05 +02:00
Mathias Baumann
8ca27c2bb0
[Sol->Yul] Style fixes
...
addresses the points @chriseth mentioned in #6909
2019-06-17 15:26:40 +02:00
rocky
ca3afea1d7
Add Steve Johnson-style parser recovery rules:
...
SourceUnit = Error $
Block = '{' Error '}'
ContractDefinition = '{' Error '}'
Statement = Error ';'
Co-Authored-By: chriseth <chris@ethereum.org>
2019-06-17 14:47:07 +02:00
Daniel Kirchner
4d38df6920
Set state mutability of function type members `gas
and
value
` to pure.
2019-06-13 18:27:53 +02:00
Leonardo
7a42ae2b7b
Merge pull request #6894 from ethereum/smt_catch_expr
...
[SMTChecker] Catch malformed expressions
2019-06-12 21:17:10 +02:00
Leonardo
d2019f49ea
Merge pull request #6906 from ethereum/delegatecall_value_msg
...
Improve error message for delegatecall.value
2019-06-12 21:14:54 +02:00
Daniel Kirchner
2849169bff
Merge pull request #6909 from ethereum/yul-delete-operation
...
[Sol->Yul] Make IRStorageItem work with dynamic offsets
2019-06-12 16:46:00 +02:00
Mathias Baumann
6a0976ed5e
[Sol->Yul] Refactor shift functions to be consistent
2019-06-11 17:44:36 +02:00
Mathias Baumann
89c435a167
[Sol->Yul] Make IRStorageItem work with dynamic offsets
2019-06-11 17:44:36 +02:00
Daniel Kirchner
226f8bb64d
Use imported cmake targets for boost.
2019-06-06 18:49:34 +02:00
Daniel Kirchner
2dbdddc7e5
Fix argument count for require with message and string literals.
2019-06-06 13:17:08 +02:00
Leonardo Alt
b7634faa3d
Improve error message for delegatecall.value
2019-06-06 12:55:12 +02:00
Leonardo Alt
1221eeebf1
[SMTChecker] Report malformed expressions more precisely
2019-06-06 11:54:29 +02:00
Leonardo Alt
f281c94b42
[SMTChecker] Test that non-Boolean literals are actually integers
2019-06-05 10:51:05 +02:00
Daniel Kirchner
d99c37e1ee
Merge pull request #6891 from ethereum/z3cmake
...
Build System: Try to find Z3 using CONFIG_MODE and stock cmake files before manual search.
2019-06-05 10:46:50 +02:00
Leonardo
3a3316393e
Merge pull request #6897 from ethereum/smt_check_pragma_earlier
...
[SMTChecker] Exit early if no pragma
2019-06-05 10:26:25 +02:00
Leonardo
c39ea56f93
Merge pull request #6896 from ethereum/smt_use_portfolio
...
[SMTChecker] Use SMTPortfolio directly
2019-06-05 10:26:05 +02:00
Leonardo
155af48b9d
Merge pull request #6895 from ethereum/smt_keep_assertions
...
[SMTChecker] Keep a copy of assertions that are added to the solvers
2019-06-05 10:25:45 +02:00
Leonardo Alt
4de1e20954
[SMTChecker] Exit early if no pragma
2019-06-04 17:12:15 +02:00
Leonardo Alt
91653526bb
[SMTChecker] Use SMTPortfolio directly instead of pointer to SolverInterface
2019-06-04 17:10:52 +02:00
Leonardo Alt
31ef421fff
[SMTChecker] Keep a copy of assertions that are added to the solvers
2019-06-04 17:09:04 +02:00
Daniel Kirchner
9f5340fa53
Try to find Z3 using CONFIG_MODE before manual search.
2019-06-04 15:58:03 +02:00
Leonardo Alt
d9ce9cab99
[SMTChecker] Use smtlib's implies instead of \!a or b
2019-06-04 14:23:44 +02:00
chriseth
4ee703e6e5
Revert "Add Steve Johnson-style parser recovery rules:"
...
This reverts commit 97f8ee0d1b
.
2019-05-28 18:09:24 +02:00
chriseth
f9dca1f282
Merge pull request #6681 from rocky/recoveringParser1
...
Add Steve Johnson-style parser recovery rules:
2019-05-28 15:36:45 +02:00