Commit Graph

981 Commits

Author SHA1 Message Date
nishant-sachdeva
e85bceb417 Types.h:872 had a comment /// String is interpreted as a subtype of
Bytes. - this was now incorrect after #12593 . That has been removed
now.
2022-02-04 15:49:08 +05:30
nishant-sachdeva
cc6344c03c Changed instaces of isByteArrayOrString() to isByteArray() where it's only supposed to return a True for Bytes Type 2022-02-02 17:05:26 +05:30
nishant-sachdeva
9043621747 Changed occurences of isByteArray() to isByteArrayOrString(). The idea
is to, in a future commit, replace such occurences of
isByteArrayOrString() which are required to return True only for Bytes
type with a new isByteArray() function.
2022-02-02 14:19:58 +05:30
Mathias L. Baumann
b6dbfdf79b
Merge pull request #12494 from ethereum/AST-ImportDirective-traversal-fix
Adds missing accepts to ImportDirective's SymbolAlias::symbol.
2022-01-24 13:27:00 +01:00
nishant-sachdeva
a0d6c11860 Equality operator allowed for external function types 2022-01-19 15:20:31 +05:30
Marenz
0004ad8764 Fix ICE when a constant variable declaration forward references a struct 2022-01-17 13:24:14 +01:00
Christian Parpart
f5ff358add Adds missing accepts to ImportDirective's SymbolAlias::symbol 2022-01-10 19:32:28 +01:00
chriseth
e3bb5ab7b2
Merge pull request #12431 from ethereum/fixFun2
Safer constructors for FunctionType
2022-01-04 18:18:21 +01:00
Marenz
b95db2db5e Remove unnecessary checks in modifier resolve function 2021-12-29 13:27:10 +01:00
chriseth
7620bfaad8 Add option member for function type. 2021-12-23 12:05:18 +01:00
chriseth
f94279a437 Use options struct for function type factory function. 2021-12-23 12:05:14 +01:00
chriseth
4fa8eee683 Use function names instead of members. 2021-12-23 11:55:33 +01:00
Marenz
7a96953e78 Implement typechecked abi.encodeCall() 2021-12-16 17:35:58 +01:00
hrkrshnn
8815d6f5f0 Moved a check related to constants to TypeChecker
And added a proper error message when constant types containing (nested) mapping types are used.
2021-10-26 18:43:04 +02:00
vowchick
5d985a24ac Use range-v3 loops: delete boost includes
An addition to issue #10738, couldn't change boost::for_each to
std::for_each, doesn't compile.

Build successful
./scripts/test.sh successful
2021-10-16 11:54:46 +03:00
Christian Parpart
86a7e19879 libsolidity: Adding a comment to nameLocation(). 2021-10-14 17:33:15 +02:00
Marenz
4368da0201 Fix ICE when printing an error message related to mappings 2021-10-06 17:02:36 +02:00
chriseth
ecfcca1a27
Merge pull request #12016 from ethereum/external-fp-10358
Add ``.address`` and ``.selector`` in inside assembly for external function pointers
2021-10-05 14:48:58 +02:00
Marenz
98dd78362e Add `.address and .selector` in inside assembly for external function pointers 2021-10-04 18:05:57 +02:00
Kamil Śliwak
7f7107405f Try out the new assertion macro variants with less arguments 2021-10-04 12:05:00 +02:00
chriseth
77932edb02 Consider non-external functions not left-aligned. 2021-09-29 11:44:17 +02:00
chriseth
da5c5928fe Properly handle fixed-byte-like types. 2021-09-29 11:41:47 +02:00
hrkrshnn
6109b5c3a1 UserDefinedValueType.storageBytes() is correctly set
Previously it returned 32 bytes for all types, which was wasteful. This commit changes it to return
the storage bytes of the underlying type.
2021-09-29 11:41:47 +02:00
chriseth
b6e62d61ec Export canonicalName 2021-09-28 12:00:30 +02:00
chriseth
1531863835 Split Common.h into Numeric.h. 2021-09-23 15:27:29 +02:00
chriseth
c8e6ef9657
Merge pull request #12004 from ethereum/disambiguateBytesRequired
Disambiguate bytesRequired
2021-09-23 15:25:44 +02:00
Kamil Śliwak
ce4420f857 Separate DebugData fields for Solidity and Yul source locations 2021-09-22 13:11:39 +02:00
chriseth
50ce1f5ddd Disambiguate bytesRequired 2021-09-22 11:22:07 +02:00
hrkrshnn
48e16ceb88 Changing the UserDefinedValueType::toString to userdefined <name> 2021-09-15 17:25:23 +02:00
hrkrshnn
de01822999 UserDefinedValueType: from simple name to canonical name. 2021-09-15 12:56:29 +02:00
Daniel Kirchner
be29ef70a7 Allow accessing user defined value type members via contract name. 2021-09-14 16:24:14 +02:00
Kamil Śliwak
14639efc5d Print code snippets next to source locations in IR output 2021-09-14 12:09:59 +02:00
hrkrshnn
a1d4d0125d Allow UserDefinedValueType.uwrap (and wrap) as RHS of constant decl
Needed to make `MyType.unwrap` and `MyType.unwrap` as pure in the process. This change affected some
existing tests ("statement has no effect").
2021-09-13 11:53:05 +02:00
hrkrshnn
d67391531e Implemented ASTJson import export for UserDefinedValueType
Also added a test.
2021-09-08 21:19:30 +02:00
hrkrshnn
15452371d4 Types for UserDefinedValueType 2021-09-07 19:42:51 +02:00
hrkrshnn
d3ae9cf71b Added AST node UserDefinedValueType 2021-09-07 19:42:51 +02:00
Marenz
2b28f87abf Add type().min/max for enums 2021-09-01 15:02:02 +02:00
soroosh-sdi
b0ce98bcb2 Using range-v3 instead of boost
Signed-off-by: soroosh-sdi <soroosh.sardari@gmail.com>
2021-08-24 23:50:23 +04:30
soroosh-sdi
0417ee2a21 Replace boost::adaptors with range-v3
Signed-off-by: soroosh-sdi <soroosh.sardari@gmail.com>
2021-08-24 13:07:26 +04:30
hrkrshnn
95091f6b58 Implemented block.basefee in Solidilty and basefee() in Yul.
Also added basefee to Yul grammar.
2021-08-09 16:18:08 +02:00
chriseth
ffc5cfd9a5 Remove scanner from compiler stack. 2021-08-03 15:43:17 +02:00
chriseth
01dc77e5a2 Properly assign source names for AST import. 2021-07-14 15:12:10 +02:00
chriseth
f75b55071e Remove CharStream from SourceLocation. 2021-07-14 15:12:07 +02:00
Kamil Śliwak
1d1d74bd0e RationalNumberType: Fix wrong docstring about m_compatibleBytesType being used for explicit conversions 2021-06-29 13:27:21 +02:00
a3d4
70b8b1c834 Do not warn about shadowing parameters in functions without implementation 2021-06-09 12:35:26 +02:00
chriseth
7d8a4e63d8
Merge pull request #11491 from TerranCivilian/fix-10269
Remove unneeded include files
2021-06-07 20:15:20 +02:00
TerranCivilian
c15501eea9 Remove unneeded include files 2021-06-07 12:53:18 -04:00
Mathias Baumann
6a0313c456 Unify function call resolve function used in Analysis & Yul CodeGen 2021-06-07 15:23:32 +02:00
chriseth
0d948ebf81 Cache functions by name. 2021-06-03 11:10:35 +02:00
Kamil Śliwak
d96cc3469a FunctionDefinition.resolveVirtual(): Skip unimplemented functions when lookup happens via super 2021-06-02 16:16:15 +02:00