Commit Graph

1017 Commits

Author SHA1 Message Date
Alex Beregszaszi
3bce2a2294 Remove the legacy AST JSON output 2020-11-25 11:40:33 +00:00
chriseth
a0a02f2307 Merge remote-tracking branch 'origin/develop' into breaking 2020-11-23 19:28:08 +01:00
chriseth
f87edb6efc Bound functions. 2020-11-23 18:58:23 +01:00
Leonardo
ae8f484ed4
Merge pull request #10234 from ethereum/smt_named_arguments
[SMTChecker] Support named arguments in function calls
2020-11-20 12:24:51 -01:00
Leonardo Alt
e4339b0526 [SMTChecker] Support named arguments in function calls 2020-11-20 11:52:26 -01:00
Alex Beregszaszi
82997fbf5e Change AST::interfaceId() to uint32_t 2020-11-19 23:33:08 +00:00
chriseth
a7db4fa4a5 Merge remote-tracking branch 'origin/develop' into breaking 2020-11-18 20:05:02 +01:00
chriseth
2665eaa4fa Support .offset and .length for calldata bytes and string arrays. 2020-11-18 01:45:56 +01:00
Kamil Śliwak
ade71d58f8 Assume that enums always take 1-byte in the codegen and type system 2020-11-16 18:58:19 +01:00
hrkrshnn
9eafa1fa1a Change type of super to TypeType 2020-11-10 15:38:21 +01:00
hrkrshnn
03f58c6b52 Strict explicit conversion between literals and enums
Explicit conversions between literals and enums are only allowed if the literal can represent a
value in the enum.
2020-11-06 19:15:02 +01:00
hrkrshnn
a555556559 Stricter explicit conversions from Literals to Integers.
Explicit conversions from Literals to Integers will now be as strict as implicit conversions between
the same.
2020-11-03 14:31:44 +01:00
chriseth
5ffee049fa Merge remote-tracking branch 'origin/develop' into breaking 2020-11-03 14:05:14 +01:00
chriseth
834da7be90 Introduce abicoder pragma. 2020-11-03 13:31:50 +01:00
Leonardo Alt
94e2506132 Fix inherited state vars for BMC 2020-11-02 11:42:39 +00:00
chriseth
ce50f05fc1 Merge remote-tracking branch 'origin/develop' into HEAD 2020-10-29 16:44:47 +01:00
Alex Beregszaszi
1ab6340828 Move AsmJsonImporter from libsolidity to libyul
It is next to AsmJsonConverter now and interdependencies are shrunk.
2020-10-29 14:06:34 +00:00
chriseth
bfc8e26007 Remove low-level log functions. 2020-10-22 17:50:14 +02:00
chriseth
527c073bb9 Checked arithmetic by default. 2020-10-19 16:58:37 +02:00
chriseth
00fb152316
Merge pull request #10048 from ethereum/develop
Merge develop into breaking
2020-10-15 17:30:11 +02:00
Daniel Kirchner
20072918d9 Make sure lValueOfOrdinaryAssignment does not have an undefined value. 2020-10-14 21:00:18 +02:00
chriseth
979d3062bc
Merge pull request #10033 from ethereum/develop
Merge develop into breaking
2020-10-14 14:12:20 +02:00
Djordje Mijovic
1272c474ba Fixing ICE when returning Struct from library 2020-10-13 20:00:11 +02:00
Mathias Baumann
006e5f2e1f Allow path syntax for super constructor calls 2020-10-13 14:32:11 +02:00
Mathias Baumann
0b7b174945 Add AST Node IdentifierPath 2020-10-13 14:32:11 +02:00
chriseth
0ea4bdafcd
Merge pull request #10017 from ethereum/develop
Merge develop into breaking.
2020-10-13 12:58:23 +02:00
chriseth
cb0d1134b7 Extract function to compute function selector from signature. 2020-10-12 17:57:34 +02:00
chriseth
14352ed921 Merge remote-tracking branch 'origin/develop' into HEAD 2020-10-08 20:18:04 +02:00
chriseth
346fe1c6c5 Constants at file-level. 2020-10-08 18:56:17 +02:00
chriseth
e16811e79f Merge remote-tracking branch 'origin/develop' into HEAD 2020-10-08 14:56:52 +02:00
Harikrishnan Mulackal
a309669f75 Disallow explicit conversions from negative literals to `address` 2020-10-07 16:06:02 +02:00
Mathias Baumann
6114cd8e8e Add missing annotation assignments 2020-10-07 14:52:35 +02:00
Christian Parpart
99d48348de Eliminate dead ASTReduce. 2020-10-07 13:38:46 +02:00
chriseth
b401093679
Merge pull request #9967 from ethereum/develop
Merge develop into breaking.
2020-10-06 17:45:53 +02:00
chriseth
fda8bde2d7 Stop after parsing. 2020-09-30 16:57:49 +02:00
chriseth
9a28dbfebd
Merge pull request #9925 from ethereum/develop
Merge develop into breaking.
2020-09-29 16:42:56 +02:00
chriseth
2037b7d6b8
Merge pull request #9820 from ethereum/new-annotation-field-virtual
Add annotation field ``requiresVirtualLookup``
2020-09-29 15:33:54 +02:00
chriseth
4bdec8107c Merge remote-tracking branch 'origin/develop' into HEAD 2020-09-29 09:53:50 +02:00
Harikrishnan Mulackal
d23aff4cbb
Merge pull request #9918 from ethereum/isStateScopeCheck
Make isStateVariable regular scope check.
2020-09-29 09:33:03 +02:00
chriseth
cb82d8239c Make isStateVariable regular scope check. 2020-09-28 19:31:54 +02:00
Mathias Baumann
8584c98b6a Add annotation field `requiresVirtualLookup` 2020-09-28 17:36:23 +02:00
a3d4
9b740b03ff Simplify DeclarationRegistrationHelper 2020-09-28 13:21:57 +02:00
chriseth
763282343f
Merge pull request #9883 from ethereum/develop
Merge develop into breaking.
2020-09-24 16:05:51 +02:00
Alex Beregszaszi
e54110ff17 Return UTF-8 error in BoolResult and remove it from string type 2020-09-23 17:35:05 +01:00
Alex Beregszaszi
a154594de6 Display string literal as hex in error messages if it is not printable ASCII 2020-09-23 17:33:39 +01:00
Alex Beregszaszi
ca743191b7 Report why assigning oversized hex strings to bytes fail 2020-09-23 16:46:47 +01:00
chriseth
0c6dc1dce4
Merge pull request #9862 from ethereum/develop
Merge develop into breaking
2020-09-23 12:22:32 +02:00
chriseth
9c5e14e309
Merge pull request #9839 from ethereum/annotations-optional
Make annotations ``SetOnce`` or ``optional`` where feasible
2020-09-23 11:44:21 +02:00
Mathias Baumann
dd81d05559 Make annotations `SetOnce or optional` where feasible 2020-09-22 17:38:21 +02:00
chriseth
700cc4c9d3
Merge pull request #9836 from ethereum/fix-missing-check-for-nested-dynamic-arrays-with-abi-encode-decode-v1
Add missing check for nested dynamic arrays in abi.encode()/decode() functions in ABIEncoderV1
2020-09-22 15:49:17 +02:00
a3d4
6b77a20134 Introduce CompositeType 2020-09-21 16:18:04 +02:00
Kamil Śliwak
1a4cc4e64d Fix type check for nested arrays in abi.encode/decode functions in ABIEncoderV1
- Without this fix, nested arrays are not detected as unsupported and compiler fails on an UnimplementedError.
- Now it's consistent with how structs are handled in ABIEncoderV1.
2020-09-17 17:29:16 +02:00
chriseth
aa7a6922e7 Restrict unary negation to signed integers. 2020-09-17 15:01:53 +02:00
chriseth
5000785ff8
Merge pull request #9822 from ethereum/fix-ice-on-returning-string-literal-in-calldata
Mark string literals as not implicitly convertible to calldata arrays
2020-09-16 14:23:47 +02:00
Kamil Śliwak
3ba3bde65e Mark string literals as not implicitly convertible to calldata arrays 2020-09-16 12:44:57 +02:00
Kamil Śliwak
2916ae5bda Fix static arrays with dynamic elements not being treated as dynamic in FunctionType::returnParameterTypesWithoutDynamicTypes() 2020-09-16 11:15:52 +02:00
Alex Beregszaszi
9aa9962f71 Add ContractDefinition::interfaceId() helper 2020-09-14 20:34:52 +01:00
a3d4
e7a6534d4f Unify collision warnings 2020-09-14 02:17:53 +02:00
Leonardo
72f8a753a9
Merge pull request #9586 from ethereum/scoper
Assign scopes as a separate step.
2020-09-11 10:45:54 +02:00
Kamil Śliwak
5e9dd67a0a FunctionType::canTakeArguments(): Use the correct index when comparing named parameter types 2020-09-09 14:45:58 +02:00
Kamil Śliwak
41bcb97e36 Don't consider contracts implicitly convertible to the type of super
- `super` for all intents and purposes behaves like a type and should be a TypeType rather than ContractType. We have an issue to fix it but it's a breaking change. Until then let's at least not treat other contracts as convertible to the ContractType that `super` represents.
2020-09-08 00:29:44 +02:00
Kamil Śliwak
7681c7dddf Remove dead code from ContractType::isImplicitlyConvertibleTo() 2020-09-08 00:26:29 +02:00
chriseth
2934a1f037 Assign scopes as a separate step. 2020-09-02 20:45:33 +02:00
Harikrishnan Mulackal
7826564226 Fix infinite loop for structs in library function parameter 2020-08-27 14:18:07 +02:00
Harikrishnan Mulackal
1c066b1059 Allow type(Contract).name for abstract contracts and interfaces 2020-08-27 13:37:08 +02:00
Harikrishnan Mulackal
6f22899153 Disallow the exponent to be a signed integer literal 2020-08-27 12:08:45 +02:00
chriseth
7b8cc0c49b Remove null values from AST also in standard-json mode. 2020-08-19 11:06:14 +02:00
chriseth
2ff954ec2d Use kind in json AST for free function. 2020-08-18 11:46:59 +02:00
chriseth
e9f91edc4b Update existing tests. 2020-08-18 11:46:59 +02:00
chriseth
9324fb4f20 Free functions. 2020-08-18 11:46:59 +02:00
Jason Cobb
888d7037cd
Make FunctionCallAnnotation::kind a SetOnce 2020-08-12 11:57:01 -04:00
chriseth
c96e997a3c Fix member lookup for constructor in library. 2020-08-04 10:51:40 +02:00
Alex Beregszaszi
6eb60bc8cd Add check that regular and unicode string literals are well formatted 2020-07-27 18:21:17 +01:00
Alex Beregszaszi
6fe8e63eee Remove inconsistently used isValidUTF8 helper 2020-07-27 18:21:17 +01:00
chriseth
5812cd8213
Merge pull request #9511 from ethereum/ast-hex-string
[BREAKING] Distinguish between stringLiteral and hexStringLiteral in the JSON AST
2020-07-27 12:34:40 +02:00
Alex Beregszaszi
5ecc84e92e Distinguish between stringLiteral and hexStringLiteral in the JSON AST 2020-07-27 10:19:24 +01:00
chriseth
42063f2158
Merge pull request #9490 from ethereum/renameSlotToSelector
Rename external function slot to selector.
2020-07-27 10:42:47 +02:00
Djordje Mijovic
e7d5a7da10 [TypeChecker] Remove function input and return parameter names from mobileType 2020-07-23 14:39:49 +02:00
chriseth
147a80aa24 Rename external function slot to selector. 2020-07-23 14:19:15 +02:00
chriseth
9be5ed1220 Merge remote-tracking branch 'origin/develop' into breaking 2020-07-21 11:35:28 +02:00
Mathias Baumann
ba0a4de50d NatSpec: Implement `@inheritdoc` 2020-07-20 18:32:18 +02:00
chriseth
93c792c696 Remove special treatment of `var`. 2020-07-20 17:22:04 +02:00
Sachin Grover
b7adb2aa42 Add SPDX license identifier if not present already in source file
Fixes: #9220
2020-07-17 20:24:12 +05:30
chriseth
f945163909
Merge pull request #9432 from ethereum/develop
Merge develop into breaking.
2020-07-16 17:14:45 +02:00
chriseth
f28bede34a Refactor storageSizeUpperBound. 2020-07-14 10:45:02 +02:00
Daniel Kirchner
38c6ecbbe2 Remove finney and szabo denominations. 2020-07-13 18:07:10 +02:00
chriseth
8eee3ed3a2
Merge pull request #9388 from ethereum/develop
Merge develop into breaking.
2020-07-13 14:55:21 +02:00
a3d4
efc5ee207d Fix internal compiler error caused by oversized objects 2020-07-10 11:39:07 +02:00
Mathias Baumann
6b37f1c025 Remove visiblity of libraries in inherited contracts. 2020-07-09 16:38:29 +02:00
chriseth
747aeb4999 Assert that visibility of constructor is not queried. 2020-07-07 11:49:44 +02:00
chriseth
da36400576 Disallow visibility for constructors. 2020-07-07 11:49:44 +02:00
chriseth
982a269b2b
Merge pull request #9325 from ethereum/develop
Merge develop into breaking.
2020-07-06 19:11:02 +02:00
chriseth
f372ba6fea Constructors cannot have calldata parameters. 2020-07-06 16:52:51 +02:00
chriseth
3e3f9a472f Merge remote-tracking branch 'origin/develop' into breaking 2020-06-30 18:56:51 +02:00
Harikrishnan Mulackal
d41eaeba56 Added containsNestedMapping() 2020-06-30 16:15:03 +05:30
Mathias Baumann
02328f3bbb Add unit denomination `gwei` 2020-06-24 18:24:56 +02:00
chriseth
af0cd4ab98
Merge pull request #9252 from ethereum/develop
Merge develop into breaking.
2020-06-23 18:28:24 +02:00
chriseth
98e5923e3a Do now disallow assigning to external parameters. 2020-06-22 18:36:32 +02:00
chriseth
71cb7551f4
Merge pull request #9208 from ethereum/develop
Merge develop into breaking.
2020-06-16 16:11:41 +02:00
chriseth
645c3508a8 Prepare for allowing bound functions and using for everywhere. 2020-06-15 21:20:18 +02:00
chriseth
8155ad2187 Merge remote-tracking branch 'origin/develop' into breaking 2020-06-15 17:11:41 +02:00
chriseth
012ba9537b
Merge pull request #9184 from ethereum/fixUsingForStorage
Fix using for with explicit reference types.
2020-06-11 14:00:28 +02:00
chriseth
5c71b3fbb0
Merge pull request #9173 from ethereum/fixBoundCalldata
Fix bound functions with calldata parameters.
2020-06-11 13:31:30 +02:00
chriseth
549c90612c Fix using for with explicit reference types. 2020-06-11 13:04:41 +02:00
chriseth
d4e3491f35
Merge pull request #9177 from ethereum/fixYulStructMemberAccess
[Sol -> Yul] Fix struct member access for memory and implement for calldata.
2020-06-11 09:41:04 +02:00
Leonardo
d7f29a33b9
Merge pull request #9096 from ethereum/conversionWarningsLibSol
Adding fixes for signedness warnings in libsolidity
2020-06-11 01:06:32 +02:00
Daniel Kirchner
90b66a7362 Fix struct member access for memory and implement for calldata. 2020-06-10 20:01:30 +02:00
chriseth
baabe65a84 Fix bound functions with calldata parameters. 2020-06-10 17:37:59 +02:00
Djordje Mijovic
e73fe17277 Fixing ICE on calling externally a function that returns calldata pointers
Co-authored-by: chriseth <chris@ethereum.org>
2020-06-10 14:41:45 +02:00
chriseth
6b3171c38b Merge remote-tracking branch 'origin/develop' into breaking 2020-06-10 11:30:50 +02:00
Djordje Mijovic
c6e4943089 Adding fixes for signedness warnings in libsolidity
Co-authored-by: Kamil Śliwak <kamil.sliwak@codepoets.it>
2020-06-10 10:41:55 +02:00
chriseth
e5c19d8a2c Replace inContractKind by libraryFunction. 2020-06-09 17:56:58 +02:00
chriseth
d12db7ec52
Merge pull request #8994 from ethereum/fixInvertedBinaryOp
Fix type inversion for shift and exp operators.
2020-06-03 14:11:16 +02:00
chriseth
c8b9d24eba
Merge pull request #9106 from ethereum/develop
Merge develop into breaking.
2020-06-03 13:51:28 +02:00
chriseth
a6c773bd96 Fix type inversion for shift and exp operators. 2020-06-03 13:46:26 +02:00
a3d4
c959341720 Add errorId to Error class 2020-05-28 15:00:33 +02:00
chriseth
894478ff8c
Merge pull request #9038 from ethereum/develop
Merge develop into breaking.
2020-05-27 15:24:27 +02:00
chriseth
e4b31e7230 Introduce named concept for types. 2020-05-26 18:17:25 +02:00
Mathias Baumann
b3cafe4583 Fix ICE by avoiding copyForLocation() on ArraySliceType 2020-05-26 17:27:46 +02:00
chriseth
9604174151 Rename asCallableFunction. 2020-05-26 11:35:12 +02:00
chriseth
499cb0526f Calldata variables. 2020-05-26 10:51:13 +02:00
Djordje Mijovic
4c3e78d046 Disallowing shifts by signed types 2020-05-26 10:18:21 +02:00
chriseth
69a028b49c Merge remote-tracking branch 'origin/develop' into breaking 2020-05-26 10:11:23 +02:00
a3d4
a499ef16fa Fix spelling errors 2020-05-25 02:54:37 +02:00
chriseth
74b9b094c0 Merge remote-tracking branch 'origin/develop' into HEAD 2020-05-20 17:22:47 +02:00
hrkrshnn
4a001d568e Removed null members from JSON output 2020-05-20 16:56:33 +05:30
Alexander Arlt
af8bb5fb60 Allow natspec comments on state variables. 2020-05-19 11:01:52 -05:00
Erik Kundt
7d37ed4531 Adds structured docs for variable declarations.
- adds natspec generation for state variables.
- exports structured docs for state variables to JSON.
2020-05-19 11:01:52 -05:00
chriseth
2d1e7d9504
Merge pull request #8931 from random-internet-cat/lazy-init
Add LazyInit
2020-05-14 18:54:19 +02:00
Jason Cobb
cffd1eaff1
Use LazyInit for ContractDefinition::m_interfaceFunctionList 2020-05-14 10:32:01 -04:00
Jason Cobb
413fa92cee
Use LazyInit for ContractDefinition::m_interfaceEvents 2020-05-14 10:29:29 -04:00
Jason Cobb
0e26700f65
Use LazyInit for MemberList::m_storageOffsets 2020-05-14 10:29:26 -04:00
chriseth
504b8d29c9
Merge pull request #8907 from ethereum/licenseIdentifier
Check for SPDX license identifiers.
2020-05-14 01:21:24 +02:00
Daniel Kirchner
97296d8622 Allow ABI encoding for array slices without explicit casts. 2020-05-13 18:20:07 +02:00
chriseth
3872a1f000 Add support for SPDX license identifiers. 2020-05-13 18:16:59 +02:00
Harikrishnan Mulackal
47e9a13e8a Fix exponentiation bug 2020-05-13 13:53:06 +05:30
Harikrishnan Mulackal
e54c4eecfc implemented type(X).min and type(X).max for all integer types 2020-05-11 14:51:13 +05:30
hrkrshnn
e2e32d372f virtual modifiers (in Abstract contracts) allow empty bodies 2020-04-23 17:26:59 +05:30
chriseth
a371910674
Merge pull request #8642 from ethereum/interfaceid
Add support for interfaceId.
2020-04-23 12:24:49 +02:00
chriseth
264c4264a1
Merge pull request #8644 from ethereum/refactor-lValueRequested
Replaced all instances of lValueRequested to willBeWrittenTo
2020-04-20 15:03:50 +02:00
hrkrshnn
4760b8589d Replaced all instances of lValueRequested to willBeWrittenTo 2020-04-20 12:33:30 +05:30
Alexander Arlt
3754a86ab2 Add support for interfaceID. 2020-04-16 12:17:40 -05:00
Daniel Kirchner
150497c12a Stricter bounds for memory arrays. 2020-04-16 17:51:18 +02:00
Daniel Kirchner
f6d1cee06b Ensure that public callable parameters are valid for calldata. 2020-04-16 17:23:20 +02:00
Daniel Kirchner
6093982606 Review suggestions. 2020-04-16 16:42:12 +02:00
Daniel Kirchner
b744a56801 Refactoring of errors and fixes for various ICEs. 2020-04-16 16:42:12 +02:00
Daniel Kirchner
df1809f8da Annotate struct definitions with a recursive flag. 2020-04-16 16:42:12 +02:00
chriseth
aff1e93caa
Merge pull request #8571 from aarlt/clang-tidy-apply-modernize-pass-by-value
clang-tidy: Apply modernize-pass-by-value.
2020-04-15 12:06:25 +02:00
Christian Parpart
3b83365b42 [libsolidity] TryStatement: Adding AST accessors for success/structured/fail clauses. 2020-04-14 18:39:08 +02:00
Alexander Arlt
aac7a1e434 Apply modernize-pass-by-value. 2020-04-14 10:32:13 -05:00
Daniel Kirchner
3af43fd350 Extract typing. 2020-04-14 10:59:28 +02:00
chriseth
748afe0edd
Merge pull request #8630 from ethereum/encoding-bug-functionCallOption
TypeChecker error when encoding functions with call options; tests
2020-04-08 16:33:24 +02:00
chriseth
baefab78d8
Merge pull request #8628 from ethereum/fiximmutableastexport
Export immutability.
2020-04-07 18:37:09 +02:00
hrkrshnn
229587672f TypeChecker error when encoding functions with call options; tests 2020-04-07 21:11:46 +05:30
chriseth
236eff8416 Export immutability. 2020-04-07 17:30:54 +02:00
chriseth
823a119117
Merge pull request #8570 from aarlt/clang-tidy-apply-modernize-use-emplace
clang-tidy: Apply modernize-use-emplace.
2020-04-07 17:28:50 +02:00
chriseth
398c515982
Merge pull request #8618 from mijovic/nextConstructorRefactor
Refactoring nextConstructor by moving it from CompilerContext to ContractDefinition
2020-04-06 19:31:12 +02:00
Djordje Mijovic
8cc16eb128 Refactoring nextConstructor by moving it from CompilerContext to ContractDefinition 2020-04-06 17:35:08 +02:00
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