Commit Graph

706 Commits

Author SHA1 Message Date
Jason Cobb
205063f86b
Delete copy and move operations for ASTVisitor and ASTConstVisitor 2020-04-03 23:47:10 -04:00
Leonardo Alt
39ff0deb05 Zero initialize memory arrays 2020-04-02 15:55:18 +02:00
Mathias Baumann
ac7b31e559 Validate immutable variables 2020-04-02 13:52:27 +02:00
Mathias Baumann
9a8ca6ca33 Always return this for EventDefinition::resolveVirtual
Instead of asserting.
2020-04-02 13:52:27 +02:00
chriseth
173f234860 Refactor: Replace inheritance hierarchy by most derived contract. 2020-03-26 18:27:39 +01:00
Daniel Kirchner
04d8ad2ae1 Legacy codegeneration for immutable state variables. 2020-03-24 16:45:25 +01:00
Daniel Kirchner
fe659ceb41 Anything outside storage is always a pointer. 2020-03-23 15:34:10 +01:00
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
chriseth
92d4bbb017 Salt should be bytes32. 2020-03-10 22:38:11 +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
chriseth
1488a1ceb8 Refactor isConstant to add "immutable". 2020-03-02 14:20:17 +01:00
Jason Cobb
6db0d50094
Don't use identifiers starting with an underscore followed by an uppercase letter 2020-02-17 12:44:39 -05: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
Erik Kundt
f2701db0aa Adds documentation for Solidity source upgrader. 2020-02-05 16:52:54 +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
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
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
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
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
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
eafcb42be7 Enable more compiler warnings in the build system
"-pedantic -Wno-unknown-pragmas -Wimplicit-fallthrough"
2020-01-15 14:33:27 +00: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
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
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
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
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