chriseth
2a85152463
Move constructor checks.
2018-11-30 16:30:19 +01:00
chriseth
b610be4882
Rename functions.
2018-11-30 16:30:19 +01:00
chriseth
d1cc731843
No need to visit structs early.
2018-11-30 16:30:19 +01:00
chriseth
2c2c976697
Move base constructor argument checks.
2018-11-30 16:30:19 +01:00
chriseth
57a62429c9
Move abstract function check.
2018-11-30 16:30:19 +01:00
chriseth
89cf6a5a38
Move override checks.
2018-11-30 16:30:19 +01:00
chriseth
d054a3b85d
Move duplication checks.
2018-11-30 16:30:19 +01:00
chriseth
0bd9db480f
Add skeleton for contract level checker.
2018-11-30 16:30:19 +01:00
chriseth
c445e7dfa4
Disallow inline arrays of mapping type.
2018-11-29 19:45:06 +01:00
Leonardo Alt
67bbcefe6c
Report deprecation error on functions sha3 and suicide also without call.
2018-11-29 14:29:13 +01:00
hydai
9326adc3db
Replace IntegerType(256) with static function IntegerType::uint256()
2018-11-29 17:07:18 +08:00
chriseth
b4086ac870
Merge pull request #5526 from ethereum/fixGetterNewCoder
...
Fix: Disallow structs in getters for old encoder.
2018-11-28 17:05:52 +01:00
chriseth
46f3da0b87
Properly check getter types to be old-abi-coder-compatible.
2018-11-28 14:08:25 +01:00
chriseth
4fa47322f9
Remove obsolete comment.
2018-11-28 11:49:00 +01:00
chriseth
240ad0e34e
Merge pull request #5382 from ethereum/libraryMappingPublic
...
Allow mapping arguments for public and external library functions.
2018-11-26 19:47:32 +01:00
chriseth
4d7799eed4
Properly disallow different return types for interface overloads with different visibilities.
2018-11-26 16:51:28 +01:00
Daniel Kirchner
30e6f8d3fb
Allow mapping arguments for public and external library functions.
2018-11-26 16:31:46 +01:00
chriseth
5ec634939e
Use asCallableFunction for definition clashes in the same contract.
2018-11-26 14:30:32 +01:00
chriseth
36a369d077
Use asCallableFunction for external interface clash check.
2018-11-26 14:30:32 +01:00
chriseth
939365a1d5
Use callable types for override check.
2018-11-26 14:30:32 +01:00
chriseth
9a4968ba1d
Use asCallableFunction in override check (part 1).
2018-11-26 14:30:32 +01:00
chriseth
0f0e466d36
Allow visibility change from external to public.
2018-11-26 12:41:26 +01: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
713d94476e
Reorder some include files and group <libyul/>'s together (as much as possible)
2018-11-23 12:37:19 +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
a781bda595
Correct style.
2018-11-22 17:15:25 +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
Daniel Kirchner
b5e9d849ef
Ignore unimplemented functions for storage returns.
2018-11-13 12:18:22 +01:00
Kristofer Peterson
f927da9182
Refactor of bool TypeChecker::visit(FunctionCall const& _functionCall).
...
Visit method now cleanly determines if node represents a function call,
struct construction or type conversion. Type checking, validation and
error message logic is moved to separate methods.
2018-11-09 16:35:54 +00:00
chriseth
674e17c2a8
Performance: Replace string by special single-copy YulString class.
2018-11-07 19:30:27 +01:00
Christian Parpart
f112377dd4
Refactor solidity::Token
into an enum class
with TokenTraits
helper namespace
2018-10-22 17:00:51 +02:00
chriseth
0778fb2dfc
Merge pull request #5208 from mestorlx/bug4156
...
[WIP] Bad identifier suggestion in certain cases
2018-10-15 13:03:49 +02:00
Christian Parpart
1304361b9c
Renaming namespace dev::julia to dev::yul.
2018-10-15 11:58:51 +02:00
Christian Parpart
6d815a142f
Fixes invalid function calls to literals inside tuple assignment's LHS.
2018-10-15 10:35:11 +02:00
mestorlx
1ce9566e50
Updated MAXIMUM_STRING_DISTANCE to non static maximumStringDistance taking into account length of the identifier
2018-10-13 09:54:07 -03:00
chriseth
2feaacba9d
Merge pull request #5195 from ethereum/unsigned-array-index
...
Do not crash on non-unsigned array index
2018-10-10 20:56:25 +02:00
Erik Kundt
763ae30023
Fixes crash on non-unsigned array index.
2018-10-10 19:49:25 +02:00
Martin Diz
ef25454a04
Improved error message for lookup in function types.
2018-10-10 11:53:53 -03:00
chriseth
06200b4b64
Merge pull request #5180 from ethereum/cpp-cleanup
...
Some C++ cleanup
2018-10-10 11:43:42 +02:00
Alex Beregszaszi
fa0ce6a7e7
Use empty() instead of size() == 0
2018-10-09 04:29:37 +01:00
chriseth
6a0b7759ba
Fix pragma error suggestion.
2018-10-09 03:15:53 +02:00
chriseth
d76bfcd935
Fix typos.
2018-10-04 13:28:16 +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
13cd7c3fed
Merge pull request #5061 from ethereum/fixedSizeArrayLength
...
Disallow fixed-size arrays with zero length
2018-09-26 14:55:07 +02:00
Erik Kundt
466e8f56e6
Removes unnecessary check of array type.
2018-09-26 12:46:08 +02:00
Nicolás Venturo
f8d43a4da5
Removed extra whitespace.
2018-09-25 14:40:39 -03:00
Khan M Rashedun-Naby
376ce07915
Use 'switch' instead of 'if..else if'
2018-09-24 08:31:44 +06:00
Erik Kundt
e6d87e54c8
Simplifies zero-length check for fixed-size arrays.
2018-09-22 03:07:12 +02:00
Erik Kundt
d821cbdff5
Moves length check to reference resolver.
2018-09-22 00:25:52 +02:00
Erik Kundt
ff5be17990
Disallows fixed-size multidim. arrays with zero-length.
2018-09-21 18:44:56 +02:00
chriseth
d0461c49fe
Make non-payable default for conversion to address.
2018-09-20 14:31:04 +02:00
liangdzou
f3cbdadec7
Do not set to ref for explicit conversion and add assertion for array
...
type conversion. Also, add some test cases for #4901 and #4948 .
2018-09-14 08:42:40 +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
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
chriseth
522174890f
Merge pull request #4872 from bakaoh/issue4716
...
Crash when array index value is too large
2018-09-05 21:47:42 +02:00
Daniel Kirchner
87804b6419
Split IntegerType into IntegerType and AddressType.
2018-09-05 12:19:14 +02:00
chriseth
a996ea266c
Merge pull request #4590 from ethereum/msgValueModifier
...
Warn if modifier uses msg.value in non-payable function
2018-09-05 10:32:10 +02:00
bakaoh
a7ffff6a29
Fix #4716 : Crash when array index value is too large
2018-09-05 10:54:38 +07:00
chriseth
624dbbe142
Fix abi.decode returning single value.
2018-09-04 18:19:00 +02:00
chriseth
9daac90cf7
Merge pull request #4888 from ethereum/disallow_single_statement_vardecl_if_while_for
...
Disallow single statement var decl in if/while/for without blocks
2018-09-04 17:24:06 +02:00
Leonardo Alt
ac8892e0e3
Review suggestions
2018-09-04 12:14:04 +02:00
Leonardo Alt
17176871ab
Changed error message and added tests
2018-09-04 11:48:58 +02:00
chriseth
431c2fbcf3
Turn warning into error.
2018-09-03 18:35:57 +02:00
Erik Kundt
75a92b0ffd
Warns if modifier uses msg.value in non-payable function.
2018-09-03 18:35:57 +02:00
Leonardo Alt
4522c804f3
Disallow single statement var decl in if/while/for without blocks
2018-09-03 18:21:57 +02:00
Chase McDermott
551e0bf47c
Rename Location::Default to Location::Unspecified.
2018-08-17 18:15:22 -05:00
Leonardo Alt
583e7156ba
Dynamic type as mapping key returns error instead of assertion fail
2018-08-16 11:59:41 +02:00
chriseth
cc6fa6d61f
Merge pull request #4822 from ethereum/addressStaticCall
...
Add ``staticcall`` to ``address``.
2018-08-16 00:13:21 +02:00
Leonardo Alt
faed71c6b1
Review suggestions
2018-08-15 17:11:18 +02:00
Leonardo Alt
b6c839e817
Disallow indexed reference types in events when using ABIEncoderV2
2018-08-15 17:11:18 +02:00
Daniel Kirchner
7ca0aaaf6f
Add `staticcall
to
address
`.
2018-08-15 16:06:48 +02:00
chriseth
6c0261e6ab
Merge pull request #4390 from ethereum/abidecode
...
Add abi.decode
2018-08-15 12:31:26 +02:00
chriseth
9328ea4c3c
Add abi.decode(bytes data, (...))
2018-08-15 10:45:16 +02:00
bakaoh
3fa8829845
Fixes #4718 : High CPU usage when using large variable names
2018-08-15 10:23:08 +02:00
chriseth
cc54f6c425
Merge pull request #4738 from ethereum/dataloc_merged
...
Enforce data location.
2018-08-14 21:38:07 +02:00
chriseth
8f27fb1f4a
Merge pull request #4542 from aarlt/constructor_natspec
...
Fix: natspec annotations on constructors
2018-08-14 19:13:25 +02:00
Chase McDermott
683bce1869
Refactor data location check.
2018-08-14 18:07:15 +02:00
Christian Parpart
81faafe7f2
Adds support for structs in interfaces.
...
Closes #4733 .
2018-08-14 15:36:03 +02:00
chriseth
6ca3973944
Merge pull request #4777 from ethereum/typeConversionMemory
...
Defaul data location for type conversions is memory.
2018-08-14 11:36:19 +02:00
chriseth
3dd31b704a
Merge pull request #4798 from ethereum/mappingArgumentsAndReturns
...
Mapping arguments and returns
2018-08-13 17:27:29 +02:00
Daniel Kirchner
341128962f
Allow mappings of arrays as arguments and return values of internal functions.
2018-08-13 16:33:37 +02:00
Daniel Kirchner
4ae59acc09
Consider mappings return values in control flow analysis.
2018-08-13 16:33:37 +02:00
Daniel Kirchner
a9f31da411
Allow mapping arguments and return values in all internal functions.
2018-08-13 15:50:22 +02:00
chriseth
bd567a22c9
Defaul data location for type conversions is memory.
2018-08-13 14:38:12 +02:00
Daniel Kirchner
57ada1d69e
Allow mapping arguments and return values in internal library functions.
2018-08-13 14:31:10 +02:00
Daniel Kirchner
7d7abeb149
Disallow ambiguous conversions between number literals and bytesXX types.
2018-08-13 14:27:01 +02:00
chriseth
c9ca083d14
Fix data location of external reference parameters.
2018-08-09 15:04:00 +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
Alexander Arlt
f76d4d5919
Fix: natspec annotations on constructors
...
- natspec annotations on constructore where ignored.
2018-08-08 21:53:35 +02: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
3c791d637d
Provide nicer error message when referencing overloaded references
2018-08-08 15:59:24 +01:00
chriseth
de8e9114fd
Merge pull request #4740 from ethereum/enforceNumberOfReturnValues
...
Disallow empty return in function with return arguments.
2018-08-08 14:59:09 +02:00
Christian Parpart
b9222808f6
Cleanup & polish numbers-with-underscores parsing, also improving tests.
2018-08-08 13:38:46 +02:00
chriseth
fd12c718f6
Merge pull request #4745 from ethereum/nameResolverNoEarlyExit
...
Do not stop after the first error in reference resolution.
2018-08-08 12:49:46 +02:00
Balajiganapathi S
09a36cba02
Add stricter hex underscore rules
2018-08-08 12:05:51 +02:00
chriseth
43d6a9d763
Do not stop after the first error in reference resolution.
2018-08-07 22:04:59 +02:00