chriseth
f7aba45457
Merge pull request #8592 from random-internet-cat/ast-visitor-constructor
...
Delete copy and move operations for ASTVisitor and ASTConstVisitor
2020-04-06 14:16:20 +02:00
Jason Cobb
205063f86b
Delete copy and move operations for ASTVisitor and ASTConstVisitor
2020-04-03 23:47:10 -04:00
Jason Cobb
7f5857a146
Delete copy/move on annotation polymorphic bases
2020-04-02 22:33:21 -04:00
Alexander Arlt
90bb1d8a7c
Apply modernize-use-emplace.
2020-04-02 17:35:48 -05: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
Jason Cobb
bc71f61467
Add ScopableAnnotation
2019-12-19 20:50:43 -05: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
Alex Beregszaszi
4a2a2eb635
Remove Boost <1.55 workaround for multiprecision::msb()
2019-12-13 00:15:15 +00:00
chriseth
f1e7bec11d
Include public state variables' base functions in the AST.
2019-12-11 15:32:28 +01:00
chriseth
57824566e6
Use 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
152f42c6b2
Make ambigous override checker generic.
2019-12-09 18:41:39 +01: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
Gaith Hallak
4d90180e24
Support referencing other constants in inline assembly
2019-12-05 13:27:17 +03:00
Daniel Kirchner
8b35918ad0
Replace superFunction by baseFunctions in AST annotations and JSON AST.
2019-12-05 03:33:32 +01:00
chriseth
1ebcc757e1
Merge remote-tracking branch 'origin/develop' into develop_060
2019-11-27 19:14:08 +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
0973ae751a
Do not warn about enabled ABIEncoderV2 anymore.
2019-11-26 15:49:42 +01:00
Gaith Hallak
4a1e85436b
Allow splitting string literals into multiple parts
2019-11-26 14:41:30 +03:00
chriseth
a00f824479
Merge pull request #7773 from ethereum/develop
...
Merge develop into develop_060
2019-11-21 21:49:22 +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
Mathias Baumann
23cad71c88
Disallow conversion from `super
`
2019-11-19 17:14:11 +01:00
chriseth
6797879128
Merge pull request #7647 from ethereum/virtual-5424
...
Implement virtual keyword
2019-11-19 13:21:27 +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
Mathias Baumann
5b8ff78176
Implement virtual keyword
2019-11-14 11:49:39 +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
chriseth
5388c919f0
Some changes to "abstract".
2019-11-05 13:55:31 +01:00
Daniel Kirchner
3321fc56ea
Split fallback function and introduce "fallback()" and "receive()" syntax.
2019-11-04 17:17:58 +01: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
b76106fc4a
Parse override keyword for modifier definitions
2019-10-30 17:31:33 +01:00
chriseth
edf1e83fda
Merge remote-tracking branch 'origin/develop' into develop_060
2019-10-28 15:21:49 +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
Mathias Baumann
c3e8023ad5
Fix wrong assert in overflow check
2019-10-23 14:59:34 +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
chriseth
8e736a9f49
Type Checker for try/catch.
2019-09-23 17:22:56 +02:00
chriseth
a66c354698
AST for try and catch.
2019-09-23 17:22:09 +02:00
Leonardo Alt
43d6e00b14
Add push() for dynamic storage arrays
2019-09-17 13:47:33 +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
5d69bdf81e
Remove ASTPrinter.
2019-09-06 12:38:55 +02:00
krk
33f7f960cf
Allow exponentials with signed base and unsigned power.
2019-09-04 17:32:47 +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
9f6fff2120
Replace casting of external functions to address by a member named "address".
2019-08-19 14:56:04 +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
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
mingchuan
15631a7fbe
Split calldataEncodedSize into calldataEncodedSize, calldataEncodedTailSize and calldataHeadSize and fix all usages.
2019-08-08 15:52:21 +02:00
rocky
7fd7cc1e76
Produce AST even when there are parser errors
2019-08-07 15:25:53 +02:00
Mathias Baumann
e887c06f6b
FunctionType: Return correct stacksize for transfer/send
2019-08-01 13:56:09 +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
Daniel Kirchner
4d38df6920
Set state mutability of function type members `gas
and
value
` to pure.
2019-06-13 18:27:53 +02:00
mingchuan
bf8af89bba
Fix assignment of struct containing array of mappings
2019-05-25 01:33:49 +08:00
chriseth
9a00729ce7
Provide dialect to Parser and InlineAssembly AST nodes.
2019-05-23 00:24:58 +02:00
Leonardo Alt
dcd6cb94bf
Add function that retrieves first FunctionDefinition up the scope path
2019-05-09 09:15:11 +02:00
Leonardo Alt
371b37b660
Fix direct call to base class overloaded functions
2019-04-26 09:34:15 +02:00
chriseth
fb302c1c4f
Merge pull request #6473 from ethereum/libeventhash-6435
...
Fix external ABI type name for contracts
2019-04-18 12:53:34 +02:00
Mathias Baumann
0f4b53e9a0
Fix external ABI type name for contracts
2019-04-18 11:39:48 +02:00
Christian Parpart
9733ae7483
[libsolidity] TypeProvider: cleanup unnecessary std:: qualifiers
2019-04-17 14:45:29 +02:00
Christian Parpart
721bf367a3
[libsolidity] TypeProvider: eliminate redundant "Type" suffix in provider function signatures.
2019-04-17 14:42:07 +02:00
Christian Parpart
862b65d6e3
[libsolidity] remove ReferenceType::copyForLocationIfReference (use TypeProvider instead)
2019-04-17 13:25:03 +02:00
Christian Parpart
b83097bdc6
[libsolidity] Types: eliminate redundant MagicType::metaType() (use TypeProvider instead)
2019-04-17 12:59:48 +02:00
Christian Parpart
a99a460c79
[libsolidity] Types: remove some old comments
2019-04-17 12:00:33 +02:00
chriseth
4e2d4f02b0
Make data location explicit.
2019-04-16 23:22:08 +02:00
chriseth
2761aed1d3
Lazy-initialize string and bytes types.
2019-04-16 23:22:08 +02:00
chriseth
4656d7ca7d
Change pre-created types to unique_ptr to avoid copying and moving.
2019-04-16 23:22:08 +02:00
Christian Parpart
58a45f2cb6
[libsolidity] TypeProvider: adds explicit uint256() accessor and removes default params in integerType(...).
2019-04-16 18:28:40 +02:00
Christian Parpart
59d4f54729
libsolidity: Be more restrictive to not allow any copy constructors at all in Type system.
...
This enforces us to be a little bit more historical in how to initialize
our std::array<>'s in TypeProvider.
2019-04-16 18:26:46 +02:00
Christian Parpart
a2a3b007f3
TypeProvider: storageType() to make all parameters explicit
2019-04-16 18:26:46 +02:00
Christian Parpart
bf43eebea9
libsolidity: Introducing TypeProvider API, for clear type system ownership.
2019-04-16 18:26:45 +02:00
chriseth
6b69c31703
Fix ABIEncoderV2 array overwrite bug.
2019-03-25 18:28:43 +01:00
Mathias Baumann
4c2b1c1f29
ArrayType::interfaceType(): Rename local variable to make more sense
2019-03-21 07:25:59 +01:00
Mathias Baumann
7d809df91a
Add back StructType::recursive()
2019-03-21 07:25:59 +01:00
Mathias Baumann
8e899a0d32
Disallow internal function types as parameters for public/external library function
2019-03-21 07:25:57 +01:00
Mathias Baumann
0fbea8a1a0
Change return type for interfaceType() to ResultType
2019-03-21 07:25:28 +01:00
Mathias Baumann
84b68006ba
Fix function calls with named arguments for overloaded functions
2019-03-20 14:54:41 +01:00
chriseth
48f0d41cc5
Merge pull request #6294 from ethereum/merge-canBeUsedExternally-and-interfaceType-6223
...
Merge interfaceType() canBeUsedExternally()
2019-03-14 18:12:07 +01:00
Mathias Baumann
4d060ef991
Merge interfaceType() canBeUsedExternally()
...
And cache the result for expensive calls.
2019-03-14 17:19:59 +01:00
Mathias Baumann
3b546acd57
Clarify documentation of ContractType::m_super
2019-03-14 15:59:26 +01:00
Erik Kundt
b9a7a88346
Improves Result<T> in order to prevent defects.
2019-03-14 14:33:28 +01:00
Mathias Baumann
e411a502fd
Fix missing trailing dot in error message
2019-03-11 16:15:18 +01:00
Mathias Baumann
d70cb375cf
isImplicitlyConvertibleTo(): Add better error messages
2019-03-11 13:38:02 +01:00
Mathias Baumann
9052a8f050
Move FunctionType::returnParameters() to CallableDeclaration
...
all the other functions of that type are also found there.
2019-03-06 11:13:01 +01:00
Mathias Baumann
b2262d67f0
Remove unused variable Contractdefinition::m_linearizedBaseContracts
2019-03-06 11:13:01 +01:00
Alex Beregszaszi
d2f493268b
Provide access to the name of contracts.
2019-02-26 14:07:03 +00:00
Mathias Baumann
c65a96d189
Small documentation fixes in the code
2019-02-21 12:54:39 +01:00
chriseth
fb07462d82
Fix: Do use actual ABI signatures for events also in libraries instead of internal signature.
2019-02-20 14:35:24 +01:00
Daniel Kirchner
d74198b3cc
Remove misleading note in Type::calldataEncodedSize.
2019-02-18 16:18:40 +01:00
Daniel Kirchner
0408130338
Merge pull request #6003 from ethereum/moreStyleChecks
...
Even more style checks.
2019-02-15 11:52:32 +01:00
Daniel Kirchner
809b9a95f9
Even more style checks.
2019-02-14 11:53:00 +01:00
Daniel Kirchner
32190dac48
Add stride helpers to ArrayType.
2019-02-14 10:51:39 +01:00
chriseth
1a823f0bf8
Fix tabs/spaces.
2019-02-13 17:05:48 +01:00
chriseth
17ea467e5b
Fix style of "const".
2019-02-13 16:34:53 +01:00
Daniel Kirchner
0e4912a203
ABIEncoderV2: Implement calldata structs without dynamically encoded members.
2019-02-11 15:46:58 +01:00
chriseth
b5a2c66771
Merge pull request #5957 from ethereum/function-param-fix
...
Ensure function parameter names always matches parameter types length
2019-02-11 15:45:28 +01:00
chriseth
0c2d623ee4
Enable struct encoding.
2019-02-11 11:37:47 +01:00
Mathias Baumann
57c1c8b46c
Ensure function parameter names always matches parameter types length
2019-02-11 10:57:57 +01:00
Alex Beregszaszi
ee09d54525
Change FIXMEs into TODOs where appropriate
2019-01-29 00:35:23 +00:00
chriseth
e3791d6dcf
Fix reported packed encoded size for arrays and structs.
2019-01-23 11:13:22 +01:00
Alex Beregszaszi
7b759866cb
Merge pull request #5817 from ethereum/refactoring
...
Refactoring in TypeChecker and ContractDefinition
2019-01-18 11:36:49 +00:00
Daniel Kirchner
a766efc79f
Add ContractDefinition::isInterface.
2019-01-18 12:11:35 +01:00
chriseth
a9fa2658d8
Add helper to show if contract can be deployed.
2019-01-17 20:36:48 +01:00
chriseth
e6fee257e6
Code generation for access to contract code.
2019-01-17 20:36:48 +01:00
chriseth
2fcfb216b5
Syntax for meta type information.
2019-01-17 20:36:48 +01:00
Christian Parpart
62fe57479e
make use of C++ = default
constructor declarations as well as more non-static member initialization syntax.
2018-12-19 11:26:42 +01:00
Leonardo Alt
b185d01a26
Sort includes in libsolidity/ast
2018-12-17 15:33:15 +01:00
chriseth
baaefb4b42
Merge pull request #5619 from ethereum/cleanup-abc
...
Some code cleanup
2018-12-10 19:22:02 +01:00
Mathias Baumann
2f6dc2e773
Replace push_back with emplace_back where it makes sense
2018-12-10 19:02:39 +01:00
Yi Huang
81f703427e
Add tests for implcit conversions from literals to fixed-point numbers.
2018-12-10 17:31:20 +01:00
Erik Kundt
e2395a3dcf
Adds more detailed type errors and tests.
2018-12-07 12:35:35 +01:00
Erik Kundt
b2afb8cdda
Adds an additional message to failing type conversions.
2018-12-07 11:55:53 +01:00
chriseth
5fde279d2a
Merge pull request #5514 from corollari/develop
...
Remove unary + from the type system
2018-12-06 10:27:09 +01:00
Albert
df08d79623
Fix #5470
...
Remove unary + from the type system
2018-12-06 01:54:04 +01:00
chriseth
3a378eae1a
Restrict toHex to bytes
.
2018-12-05 22:37:05 +01:00
Erik Kundt
e3accc6aa6
Simplifies Result<T> and prevents undefined behaviour.
2018-12-05 10:33:34 +01:00
Erik Kundt
05e74d096e
Introduces Result<T> for operator and implicit conversion type checks.
2018-12-05 10:33:34 +01:00
Anurag Dashputre
82f5763e7a
Fix internal compiler error for unimplemented base contract function.
2018-12-03 12:25:31 +01:00
chriseth
aaeb74f592
Merge pull request #5537 from ethereum/cp-SourceLocation-related-refactoring
...
[1/3] SourceLocation related refactoring.
2018-11-30 23:45:31 +01:00
Christian Parpart
c48a5264be
liblangutil: SourceLocation: adds (shared) pointer to underlying CharStream source, eliminating sourceName
...
Also, adapted affecting code to those changes.
2018-11-30 17:07:12 +01:00
chriseth
f6d013237d
Merge pull request #5538 from hydai/static_uint256
...
Replace IntegerType(256) with static function IntegerType::uint256()
2018-11-29 11:17:33 +01:00
Leonardo Alt
1d47919c0c
Fix ICE when function type struct parameter has field of non-existent type
2018-11-29 10:38:47 +01:00
hydai
9326adc3db
Replace IntegerType(256) with static function IntegerType::uint256()
2018-11-29 17:07:18 +08:00
chriseth
bc137c2eeb
Merge pull request #5485 from ethereum/refactorCallableFunction
...
Refactor callable function
2018-11-26 12:34:43 +01:00
Christian Parpart
ec47c8946b
Isolating libyul library API into its own namespace yul
.
2018-11-23 14:29:00 +01:00
Christian Parpart
0f4ed52a71
Rewrite header paths to adapt to recent git mv
of libsolidity/inlineasm to libyul
2018-11-23 11:18:57 +01:00
chriseth
92ba8a95f6
Make asCallableFunction to never fail and assert abount parameter size if bound instead.
2018-11-22 15:47:45 +01:00
chriseth
9e964852cc
Rename 'asMemberFunction' to widen its purpose.
2018-11-22 15:24:45 +01:00
Christian Parpart
d67322a186
Introduce namespace langutil
in liblangutil directory.
...
Also:
- Use {}-style list initialisation for SourceLocation construction
- Introduce new system includes
- Changes the API of the Scanner to take source as value (with move) as opposed to as a reference
2018-11-21 19:13:44 +00:00
Christian Parpart
87821c53c3
Isolating files shared between Yul- and Solidity language frontend.
2018-11-21 18:58:12 +00:00
mordax
ea8b7d803e
Removing redundant virtual from override function declaration
...
Remove trailing whitespace
Remove changelog change
2018-11-21 14:37:32 +00:00
chriseth
2cc304fd3f
Fix for style.
2018-11-12 09:15:22 +01:00
chriseth
6bbedab383
Merge pull request #5265 from ethereum/cleanupsha3
...
Simplify sha3.
2018-11-09 15:39:57 +01:00
chriseth
cc2de07bc6
Merge pull request #5348 from ethereum/boostRationalNegativeDenominatorFix
...
Fix negative denominator in ``boost::rational`` during exponentiation.
2018-11-08 11:25:30 +01:00
chriseth
674e17c2a8
Performance: Replace string by special single-copy YulString class.
2018-11-07 19:30:27 +01:00
Daniel Kirchner
e036133d1b
Fix negative denominator in `boost::rational
` during exponentiation.
2018-11-06 10:52:10 +01:00
Erik Kundt
1d8e9af407
Fixes crash while encoding too large arrays.
2018-10-30 15:14:57 +01:00
chriseth
39687cf110
Remove unused AST utils.
2018-10-25 14:02:09 +02:00
Christian Parpart
f112377dd4
Refactor solidity::Token
into an enum class
with TokenTraits
helper namespace
2018-10-22 17:00:51 +02:00
chriseth
e78b95d9d4
Renamed SHA3.{h,cpp} files.
2018-10-18 14:31:36 +02:00
Christian Parpart
4d5216c2e0
Fixes large rational number literals being wrongly interpreted.
...
Fixes #5052 .
2018-10-09 14:36:49 +02:00
chriseth
7ff9a27979
Merge pull request #4734 from ethereum/astUpdate
...
JSON AST: replace ``isConstructor`` by ``kind`` which also supports fallbacks
2018-10-08 21:47:27 +02:00
Christian Parpart
9fb835b710
Fixes #5051 (introduced in #4684 ), effectively allowing underscores in address literals.
2018-10-02 15:37:15 +02:00
chriseth
db4f780283
Merge pull request #4962 from anurag-git/anurag_issue_3667-1
...
Removed default case from "ExpressionCompiler::visit(FunctionCall...)".
2018-10-01 13:24:26 +02:00
Anurag Dashputre
3321000f67
Removing extra default cases to force compile time error, instead of runtime.
2018-09-30 12:40:38 +05:30
Alex Beregszaszi
00b1b96eb4
Use better assertion messages for RationalNumberType::literalValue
2018-09-26 13:05:58 +01:00
chriseth
32112d6480
Merge pull request #5041 from liangdzou/fix_typo_in_doc
...
fix typo in docs and comments
2018-09-24 13:52:33 +02:00
Alex Beregszaszi
8f96fe698d
Merge pull request #5049 from ethereum/structtype-assert-annotation
...
Add assertion for annotated type in Structtype::canBeUsedExternally
2018-09-21 15:02:26 +01:00
Alex Beregszaszi
69ff61d149
Add assertion for annotated type in Structtype::canBeUsedExternally
2018-09-21 14:25:05 +01:00
liangdzou
f347dee812
fix typo
2018-09-21 09:27:33 +08:00
chriseth
dc9853bb6e
Merge pull request #5030 from ethereum/payableConversion
...
Make non-payable default for conversion to address.
2018-09-20 21:20:46 +02:00
liangdzou
44e8dfd393
fix typo
2018-09-20 22:54:57 +08:00
chriseth
d0461c49fe
Make non-payable default for conversion to address.
2018-09-20 14:31:04 +02:00
Jordan Last
d0497aacc0
fixing rebase conflicts
...
add ElementaryTypes::BytesMemory and ElementaryTypes::StringMemory
fix rebase conflicts
fixing rebase conflicts
use make_shared instead of new
fix tabs and StateMutability parameter
create address and addressType functions, fix spaces in comment
fix typo and switch nonpayable to payable
fix spaces
fix comment again
2018-09-13 15:53:06 -06:00
Daniel Kirchner
ae35a58124
Add `stateMutability
field to JSON AST for
address
` types.
2018-09-13 15:15:49 +02:00
Daniel Kirchner
12aaca1645
Add payable and non-payable state mutability to AddressType.
2018-09-13 15:15:49 +02:00
Daniel Kirchner
1ce3581a52
Accept `address payable
` during parsing.
2018-09-11 14:52:23 +02:00
Daniel Kirchner
a434896458
Restore `isConstructor
` in the legacy AST.
2018-09-11 14:47:25 +02:00
Daniel Kirchner
395ab9a872
Replace `isConstructor
field in the JSON AST by a
kind
` field.
2018-09-11 14:47:25 +02:00
Daniel Kirchner
87804b6419
Split IntegerType into IntegerType and AddressType.
2018-09-05 12:19:14 +02:00
Daniel Kirchner
82f512a7d4
Add return data to bare calls.
2018-09-04 13:31:10 +02:00
chriseth
2783905bab
Merge pull request #4837 from chase1745/default-to-unspecified
...
Rename `Location::Default` to `Location::Unspecified`
2018-09-03 18:44:41 +02:00
chriseth
758bc1614c
Merge pull request #4851 from anurag-git/anurag_issue_4824
...
Removed unused "FunctionType::Kind::CallCode"
2018-09-03 16:51:05 +02:00
Anurag Dashputre
94c327c1ae
Removed unused "FunctionType::Kind::CallCode" from Types.h and all its usage
2018-08-23 13:09:00 +05:30
Anurag Dashputre
8497dcd721
Merge branch 'develop' into anurag_issue_3667
2018-08-23 11:56:45 +05:30
Anurag Dashputre
55524788e2
Removed the default cases related to assertion to detect the problem at compile-time instead of run-time
2018-08-23 11:47:00 +05:30
Chase McDermott
551e0bf47c
Rename Location::Default to Location::Unspecified.
2018-08-17 18:15:22 -05:00
Anurag Dashputre
435cd95c54
Default case removed to detect errors at comoile time rather than run time
2018-08-17 18:37:35 +05:30
chriseth
c274af0770
Merge pull request #4825 from ethereum/expressionCompBareCall
...
More safeguards for (library) function types.
2018-08-16 14:38:44 +02:00
liangdzou
74c37935f0
fix a typo: declaratoion => declaration
2018-08-16 13:42:46 +08:00
chriseth
455345871d
More safeguards for (library) function types.
2018-08-15 17:11:43 +02:00
Daniel Kirchner
7ca0aaaf6f
Add `staticcall
to
address
`.
2018-08-15 16:06:48 +02:00
chriseth
9328ea4c3c
Add abi.decode(bytes data, (...))
2018-08-15 10:45:16 +02:00
Chase McDermott
683bce1869
Refactor data location check.
2018-08-14 18:07:15 +02:00
chriseth
3f42118d19
Merge pull request #4765 from ethereum/fixes-issue-4673
...
[WIP] Fixes issue where computing storage size for a number would take too long (or even cause a crash).
2018-08-14 17:34:04 +02:00
Jesse Busman
c059119145
Add implicit convertibility to function pointer with higher state mutability
2018-08-14 17:13:10 +02:00
chriseth
ec7ccbdf86
Merge pull request #4782 from ethereum/encodePackedArrayOfStructs
...
Encode packed array of structs
2018-08-14 16:32:57 +02:00
Christian Parpart
43bda53410
Fixes issue where computing storage size for a number would take too long.
...
Fixes #4673 .
2018-08-14 15:38:10 +02:00
Daniel Kirchner
7d7abeb149
Disallow ambiguous conversions between number literals and bytesXX types.
2018-08-13 14:27:01 +02:00
chriseth
0b65b2dff6
Disallow packed encoding of arrays of structs.
2018-08-09 21:16:51 +02:00
Alex Beregszaszi
ed52f422b7
Rename FunctionKind SHA3 to KECCAK256 (as the instruction was renamed in libevmasm)
2018-08-08 22:37:40 +01:00
chriseth
d634d20b5b
Merge pull request #4684 from ethereum/underscores_in_numeric_literals
...
[BREAKING] Underscores in numeric literals
2018-08-08 21:36:57 +02:00
Alex Beregszaszi
9062704054
Merge pull request #4753 from mattaereal/boost-to-string-patch
...
Replace boost:lexical_cast<std::string> for std::to_string.
2018-08-08 16:07:25 +01:00
Matías Aereal Aeón
e902ce1aa0
Removing std:: from std::to_string and include for boost/lexical_cast
2018-08-08 11:26:30 -03:00
Alex Beregszaszi
1bfb841771
Remove experimental 0.5.0 pragma
2018-08-08 14:05:36 +01:00
Christian Parpart
b9222808f6
Cleanup & polish numbers-with-underscores parsing, also improving tests.
2018-08-08 13:38:46 +02:00
chriseth
d0863f4994
Merge pull request #4748 from ethereum/validate-identifier
...
Assert that type identifier contains only valid characters
2018-08-08 12:50:45 +02:00
Balajiganapathi S
09a36cba02
Add stricter hex underscore rules
2018-08-08 12:05:51 +02:00
Alex Beregszaszi
3064bd17bc
Assert that type identifier contains only valid characters
2018-08-07 22:29:21 +01:00
Daniel Kirchner
b11e39e25e
Remove remaining instances of `fillRight
` left over from tuple wildcards assignments.
2018-08-07 18:51:53 +02:00
chriseth
a949cffd24
Merge pull request #4699 from ethereum/cleanup_VariableDeclaration
...
libsolidity: Remove dead code wrt. VariableDeclaration::canHaveAutoType
2018-08-07 16:14:41 +02:00
chriseth
c61cc98d0d
Merge pull request #4726 from ethereum/moveNothrow
...
Make MemberList nothrow move constructible.
2018-08-07 16:11:59 +02:00
Alex Beregszaszi
b0f9fc5af0
Fix type identifiers for RationalNumberType
2018-08-07 13:23:14 +01:00
chriseth
133fd3d302
Make MemberList nothrow move constructible.
2018-08-07 14:20:18 +02:00
Christian Parpart
4c90ddf64a
libsolidity: Remove dead code wrt. VariableDeclaration::canHaveAutoType()
...
Closes #4667
2018-08-07 11:34:13 +02:00
Alex Beregszaszi
bd75d4268b
Move fullyQualifiedName to ContractDefinition only
2018-08-06 18:58:27 +02:00
chriseth
276724dedc
Merge pull request #4663 from ethereum/dropConstantAST
...
[BREAKING] Drop constant field from JSON AST
2018-08-06 18:55:12 +02:00
Jesse Busman
3fcd62921e
Renamed FunctionType::hasEqualArgumentTypes to FunctionType::hasEqualParameterTypes
2018-08-06 13:05:06 +02:00
Daniel Kirchner
44374a5846
Remove "constant" from JSON AST.
2018-08-06 11:15:25 +02:00
chriseth
90a5928b88
Merge pull request #4522 from ethereum/fullEncodingType
...
Isolate determining the encoding type into its own function.
2018-08-02 15:01:38 +02:00
Christian Parpart
38f9667e09
Guard CycleDetector against recursion exhaustion.
...
fixes #3935 .
2018-08-01 12:02:59 +01:00
chriseth
7a8a243eef
Isolate determining the encoding type into its own function.
2018-08-01 11:55:57 +01:00
chriseth
c8232d9759
Disallow conversion between unrelated contract types.
2018-08-01 11:04:35 +01:00
chriseth
e3c2f20f6e
Merge pull request #4439 from ethereum/address_members
...
[BREAKING] Enforce address members not accessible by contract instance
2018-07-19 09:24:27 +02:00
Erik Kundt
182a0a9551
Disallows old constructor syntax.
2018-07-18 14:29:01 +02:00
Leonardo Alt
0075f4239a
Address members not accessible by contract instance
2018-07-17 13:33:23 +01:00
Daniel Kirchner
fc370591f0
Disallow multi variable declarations with mismatching number of values.
2018-07-12 20:33:51 +02:00
Daniel Kirchner
e8e5e12ad2
Fix literals with exponents with mantissa of zero.
2018-07-11 15:34:17 +02:00
Cryptomental
140dbfdbd8
Code, Changelog, ReleaseChecklist: Fix typos.
...
Refs: #4442
2018-07-11 00:26:23 +02:00
chriseth
0e9415bc31
Merge pull request #4468 from ethereum/variableDeclarationClenaup
...
Remove mentions of ``var`` in VariableDeclarationStatement comment.
2018-07-10 17:50:02 +02:00
chriseth
187eef36ad
Remove mentions of `var
` in VariableDeclarationStatement comment.
2018-07-10 14:55:50 +02:00
Daniel Kirchner
ece9afef8f
Check for matching number of components in TupleType::isImplicitlyConvertibleTo instead of the TypeChecker.
2018-07-10 12:17:01 +02:00
chriseth
4a842ecc82
Merge pull request #4097 from ethereum/noPackedExceptForPacked
...
[BREAKING] call only takes a single argument and does not pad
2018-06-27 18:29:01 +02:00
chriseth
503eb8caa5
Merge pull request #4342 from rnaby/l/a/Types
...
RationalNumberType::isImplicitlyConvertibleTo Refactor
2018-06-26 17:54:09 +02:00
chriseth
033672cc48
Fix: Call functions do not take variable arguments.
2018-06-25 17:17:48 +02:00
chriseth
23c4142005
Bare functions take single bytes argument.
2018-06-25 17:01:45 +02:00
chriseth
0e66a1ddde
Single bytes argument.
...
In 0.5.0 mode, only accept a single bytes argument for ``.call``,
``keccak256`` and others and do not pad when encoding.
2018-06-25 17:01:45 +02:00
Jason Cobb
3d88eca531
Disallow implicit conversion from rational (literal) to address
2018-06-25 16:17:50 +02:00
Khan M Rashedun-Naby
097a3fabf4
RationalNumberType::isImplicitlyConvertibleTo Refactor
2018-06-24 08:15:25 +06:00
Alex Beregszaszi
4cdb6c809a
Change comments
2018-06-14 09:31:28 +01:00
Daniel Kirchner
510f227bd7
Additional test and more explanation.
2018-06-12 15:53:15 +02:00
Daniel Kirchner
f33dc92cbd
Use proper SAR for signed right shifts and emulate on pre-constantinople.
2018-06-12 09:32:19 +01:00
Alex Beregszaszi
8d38d4d296
Use boost::multiprecision::pow explicitly
2018-06-11 19:31:26 +01:00
chriseth
7cf36331a6
Fix bug related to byte array pop.
2018-05-31 14:53:33 +02:00
chriseth
5a73044fa7
Merge pull request #3743 from ethereum/popStorageArray
...
pop() for storage arrays
2018-05-30 18:32:08 +02:00
Erik Kundt
34b5eca1f8
Improves assembly and adds more tests.
2018-05-30 17:40:33 +02:00
mingchuan
b7cafcbdf9
Allow using calldata
keyword to specify data location
2018-05-30 18:05:55 +08:00
bitshift
e9dcfb0b62
Implements pop() for value type arrays.
2018-05-29 12:53:02 +02:00
chriseth
9d5064d04d
Merge pull request #4173 from sifmelcara/add/allow-storage-calldata-suffix
...
Allow data location suffix for internal elementary type parsing
2018-05-28 22:52:45 +02:00
chriseth
5ee2ce353e
Merge pull request #4067 from ethereum/050
...
[BREAKING] Version 0.5.0
2018-05-23 18:11:20 +02:00
mingchuan
9865012f7b
Allow data location suffix for internal elementary type parsing
2018-05-22 23:28:12 +08:00
mingchuan
3cd57866a9
Fix assert message about function visibility
2018-05-20 22:29:11 +08:00
Daniel Kirchner
5c59d56335
Disallow conversions between bytesX and uintY of different size.
2018-05-16 18:32:47 +02:00
Leonardo Alt
0b6eea0c55
Bool variables should not allow arithmetic comparison
2018-05-16 18:32:47 +02:00
chriseth
894122c508
Warn/enforce single bytes argument for certain builtins (hashing functions).
...
In 0.5.0 mode, only accept a single bytes argument for ``.call``,
``keccak256`` and others and do not pad when encoding.
2018-05-16 09:48:03 +02:00
chriseth
dac0029d16
ABI encoding functions are pure and should be usable in constants.
2018-05-15 14:45:54 +02:00
daniel
aa1542a9e1
Change bytes to unsigned in FixedBytesType
2018-05-03 23:11:34 +01:00
Alex Beregszaszi
b34428249a
Change numBits to unsigned IntegerType
2018-05-02 23:22:25 -07:00
Alex Beregszaszi
2c00ebbee1
Change totalBits and fractionalDigits to unsigned in FixedPointType
2018-05-02 23:22:25 -07:00
chriseth
8debded743
Revert "BREAKING: Bool variables should not allow arithmetic comparison"
2018-05-02 15:56:59 +02:00
chriseth
42289b642f
Merge pull request #4003 from ethereum/bool_vars_comparison
...
BREAKING: Bool variables should not allow arithmetic comparison
2018-05-02 15:56:06 +02:00
Alexander Arlt
f94b793472
Add virtual destructors on base classes.
2018-05-02 13:29:16 +02:00
chriseth
15024154ab
Merge pull request #4018 from ethereum/disable-bytes0
...
Disable FixedBytesType(0) aka bytes0
2018-04-30 18:19:07 +02:00
Alex Beregszaszi
548bf2ff28
Remove unused function smallestTypeForLiteral
2018-04-30 14:35:26 +01:00
Alex Beregszaszi
e0b178e1c5
Disable FixedBytesType(0) aka bytes0
2018-04-30 12:23:30 +01:00
Leonardo Alt
ab251c7e7d
Bool variables should not allow arithmetic comparison
2018-04-27 11:35:58 +02:00
Alex Beregszaszi
5423974e87
Remove category check in FixedPointType:binaryOperatorResult as commonType handles the same
2018-04-20 17:54:34 +01:00
Jason Cobb
57003c534a
Types changes for fixed points
2018-04-20 17:53:42 +01:00
Alex Beregszaszi
754d79edfa
Disallow explicit conversion of bytesXX to contract
2018-04-19 15:58:14 +02:00
Erik Kundt
33fbf88707
Limits rational numbers to 4096 bits.
2018-04-16 11:45:55 +02:00
Erik Kundt
8935c0dd2f
Uses short string representation of TypePointer
2018-04-12 21:14:50 +02:00
chriseth
7054defdd6
Merge pull request #3364 from ethereum/revertWithReason
...
Revert with reason
2018-04-12 21:01:08 +02:00
chriseth
44416d1ac6
Merge pull request #2980 from ethereum/abi-api
...
Add abi.encode and abi.encodePacked
2018-04-12 20:55:03 +02:00
chriseth
f00bb43593
Allow function overloads involving MagicVariableDeclarations.
2018-04-12 13:09:37 +02:00
chriseth
17fc0f54b5
Use FunctionTypePointer (adds `const
`).
2018-04-12 13:09:37 +02:00
Alex Beregszaszi
d56acb68ab
Add abi.encode, abi.encodePacked, abi.encodeWithSelector and abi.encodeWithSignature.
2018-04-11 22:32:10 +02:00
Daniel Kirchner
daa69df447
Error on invalid arithmetic with constant expressions.
2018-04-11 21:17:10 +02:00
Jason Cobb
3b7b962b66
Fix bug in typechecking when comparing rational literals
2018-04-11 12:03:08 +02:00
Daniel Kirchner
3eedbc6a9c
Error when using no parentheses in modifier-style constructor calls.
2018-04-10 12:09:34 +02:00
chriseth
b52614116e
Merge pull request #3821 from ethereum/warn-constructor-override
...
Warn constructor override
2018-04-10 11:39:31 +02:00
hydai
aaa8edc36d
Fixed typos
2018-04-10 13:41:35 +08:00
Daniel Kirchner
b918a105a4
Move constructor argument override check to TypeChecker and reuse annotations in ContractCompiler.
2018-04-09 15:26:08 +02:00
chriseth
5b1c0506fa
Allow `memory
` suffix for internal elementary type parsing.
2018-04-05 16:06:04 +02:00
Daniel Kirchner
037eba20fc
Merge pull request #3824 from ethereum/baseArgumentsEmptyParenthesis
...
Error when using empty parentheses for base class constructors that r…
2018-04-05 14:43:28 +02:00
Alex Beregszaszi
36d6c27e68
Merge pull request #3745 from ethereum/fixRecursion
...
Fix invalid recursion errors for structs
2018-04-05 12:04:54 +02:00
Daniel Kirchner
96eff0ff6a
Error when using empty parenthesis for base class constructors that require arguments.
2018-04-05 11:52:22 +02:00
Daniel Kirchner
d664a599e6
Constructors are defined using the `constructor
` keyword.
2018-04-03 18:21:55 +02:00
chriseth
eb5b18e814
Generalize cycle detection.
2018-04-03 16:29:18 +02:00
chriseth
5bdadff0d8
Fix detection of recursive structs.
2018-04-03 16:27:28 +02:00
chriseth
6777f7a57f
Optimize across MLOAD if MSIZE is not used.
2018-04-03 14:34:32 +02:00
Jason Cobb
e37b619593
Set default fixed point decimal places to 18
2018-03-31 00:56:36 +01:00
chriseth
5c8a6aac69
Prevent encoding of weird types and support packed encoding of external function types.
2018-03-29 09:57:11 +01:00
chriseth
3bb54e8bd5
Merge pull request #3775 from federicobond/improve-error-fractional-shift
...
Improve error message when attempting to shift by fractional number
2018-03-28 11:16:44 +02:00
Alex Beregszaszi
8bae2dba7c
Introduce inContractKind helper on FunctionDefinition
2018-03-26 11:37:38 +01:00
Federico Bond
b79531bebf
Improve error message when trying to shift by fractional number
2018-03-22 10:05:49 -03:00
chriseth
cc2f71e4ac
Move dynamic type removal out of the type system.
2018-03-21 14:53:29 +00:00
chriseth
eecc26deec
Make external library functions accessible.
2018-03-13 17:18:46 +01:00
chriseth
95ca829750
Merge pull request #3663 from ethereum/gasleftEmscripten
...
Add gasleft to FunctionType::richIdentifier().
2018-03-06 18:06:30 +01:00
Daniel Kirchner
fb4d01e2cd
Add gasleft to FunctionType::richIdentifier().
2018-03-06 17:29:04 +01:00
Alex Beregszaszi
14b12ae745
Merge pull request #2966 from ethereum/useStaticCall
...
Use STATICCALL for pure function calls.
2018-03-06 17:07:03 +01:00
Alex Beregszaszi
83dacbf669
Merge pull request #3549 from ethereum/fixmultidim
...
Properly detect which array and struct types are unsupported by the old ABI encoder.
2018-03-06 15:51:17 +01:00
chriseth
b467116ea8
Use STATICCALL for pure function calls if EVM version supports it and 0.5.0 is activated.
2018-03-06 15:30:18 +01:00
chriseth
f6c0daec14
Merge pull request #3652 from ethereum/gasleft_v2
...
Use StaticAnalyzer to deprecate msg.gas instead of conditionally remo…
2018-03-06 09:26:14 +01:00
Daniel Kirchner
91b13b734d
Use StaticAnalyzer to deprecate msg.gas instead of conditionally removing it in MagicType.
2018-03-05 23:16:26 +01:00
chriseth
3793aa405b
Merge pull request #3643 from ethereum/gasleft
...
Move msg.gas to global function gasleft(). Closes #2971 .
2018-03-05 20:11:37 +01:00
Daniel Kirchner
3340053fd9
Style improvements.
2018-03-05 17:00:37 +01:00
chriseth
477571e190
Do not warn about 0.5.0 experimental pragma.
2018-03-05 12:14:44 +01:00
Daniel Kirchner
c633c0eacb
Move msg.gas to global function gasleft(). Closes #2971 .
2018-03-05 11:18:04 +01:00
chriseth
08b6a72d37
Fix multi-dimensional arrays in the ABI.
2018-03-01 14:28:27 +01:00
chriseth
6b9dda06f3
Enable C99-scoping with the 0.5.0-experimental pragma.
2018-02-27 12:17:25 +01:00
chriseth
e6d48bb72a
Blocks and for loops can be scopes.
2018-02-27 12:17:25 +01:00
chriseth
5f20129e65
Scopes do not have to be declarations.
2018-02-27 12:17:25 +01:00
Alex Beregszaszi
b62d43912b
Merge pull request #3589 from ethereum/identifiers
...
Clean up type identifiers
2018-02-26 20:27:26 +01:00
Alex Beregszaszi
b471983e3c
Use new escaping helpers for type identifiers
2018-02-26 19:09:43 +01:00
Alex Beregszaszi
2e7067fbe4
Rename Types::identifier to Types::richIdentifier
2018-02-26 19:09:43 +01:00
Alex Beregszaszi
751705978e
Add helpers escapeIdentifier to Types
2018-02-26 19:09:39 +01:00
chriseth
4da20bdf01
Fix: Function types for getters should not have storage pointers.
2018-02-26 11:17:40 +01:00
chriseth
917dd28eef
Simplify FunctionType constructors.
2018-02-26 10:45:41 +01:00
chriseth
388718b59f
Introduce emit statement.
2018-02-22 15:17:30 +01:00
Emilio Almansi
ca6957da37
Added property _documentation_ to Function, Event, and Modifier definition classes.
2018-02-19 16:45:38 +01:00
chriseth
560fbd0df1
Always use shortened literal number representation.
2018-02-13 11:43:47 +01:00
Federico Bond
a320ffeafd
Avoid output messages size blow-up using huge bignums literals
2018-02-12 22:53:33 +00:00
Alex Beregszaszi
5226d54ed1
Improve error message for constant evaluator
2017-12-12 09:39:26 +00:00
Alex Beregszaszi
8d26894841
Show checksummed address always (prepend with 0)
2017-11-17 00:46:45 +00:00
Alex Beregszaszi
1d5dd909b4
Do not try to display checksummed address for too-short/long address literals
2017-11-17 00:46:45 +00:00
wadeAlexC
8a6692b2cf
Improves address literal checksum error message
2017-11-17 00:46:44 +00:00
Kwang Yul Seo
02db1ad584
Print using for directive in ASTPrinter
2017-11-16 01:36:57 +09:00
Alex Beregszaszi
ed3ce43d6d
Merge pull request #3189 from kseo/unused
...
Remove unused method
2017-11-15 16:31:22 +00:00
Kwang Yul Seo
d70ff5f8c3
Remove a redundant check
...
m_type can't be FunctionType::Kind::DelegateCall.
2017-11-13 09:54:55 +09:00
Kwang Yul Seo
486647fd38
Remove unused method
...
The body of Function::functionIdentifier is missing and is not used.
2017-11-12 22:27:05 +09:00
chriseth
114983e079
Missing forward declaration.
2017-10-17 18:30:04 +01:00
Alex Beregszaszi
475b818801
Remove obsolete createTypeError in AST
2017-10-05 20:18:46 +01:00
Alex Beregszaszi
09276cb9d3
Do not add members of address to contracts in experimental 0.5.0
2017-10-05 11:42:34 +01:00
Alex Beregszaszi
a9847c9551
Use solAssert and not assert
2017-10-04 13:05:55 +01:00
Alex Beregszaszi
d5d1a08b09
Pull out helper to apply address member to contract members
2017-09-28 14:54:15 +01:00
Alex Beregszaszi
aa6de49457
Simplify address overloading
2017-09-28 14:53:41 +01:00
Alex Beregszaszi
ee65ecfb3b
Ensure that address types are always declared as 160bit
2017-09-26 22:46:33 +01:00
Alex Beregszaszi
efa4598c23
Mark functions static
2017-09-20 01:23:21 +01:00
chriseth
0696545808
Check for interface types of members and cache recursion check.
2017-09-16 12:31:13 +01:00
chriseth
70d70e7816
Implement struct encoder.
2017-09-16 12:31:12 +01:00
chriseth
6385641f6e
Fix tests.
2017-09-16 12:31:12 +01:00
chriseth
36a90289e6
Fix interface type conversion internal to structs.
2017-09-16 12:12:43 +01:00
chriseth
080be885f8
Function signatures containing structs.
2017-09-16 12:12:43 +01:00
chriseth
59ea19b3b9
Check for recursive structs.
2017-09-16 12:12:43 +01:00
chriseth
2e72bd163a
Allow structs as part of function interfaces.
2017-09-16 12:12:43 +01:00
Alex Beregszaszi
5b5367dc12
Warn if no visibility is specified on contract functions.
2017-09-14 15:58:04 +01:00
Alex Beregszaszi
06c2ddfd50
Add experimental feature 'v0.5.0'
2017-09-13 19:22:03 +01:00
Alex Beregszaszi
5c9dbd5083
Merge pull request #2473 from ethereum/functiontype-sig
...
Add .selector member on function types
2017-09-13 17:35:48 +01:00
Alex Beregszaszi
fd1f8ab38b
Rename .sig to .selector on function types
2017-09-13 11:40:57 +01:00
Alex Beregszaszi
58f7a27ee0
Add sig member on function type
2017-09-13 11:40:57 +01:00
chriseth
342367d5dc
Store super function.
2017-09-06 13:50:49 +02:00
chriseth
5470da4d9a
View-pure checker.
2017-09-06 13:50:49 +02:00
Alex Beregszaszi
eb33e76416
Use Json::valueToQuotedString directly
2017-08-29 15:51:37 +01:00
chriseth
cd22da1d9e
Remove escape function.
2017-08-29 15:50:28 +01:00
chriseth
93b1cc9702
Merge pull request #2833 from ethereum/statemutability-builtins
...
Mark all built in functions with appropriate statemutability
2017-08-29 15:24:51 +02:00