Commit Graph

3328 Commits

Author SHA1 Message Date
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