From 2ff954ec2dd00adfe511e5e9951ce230335355d4 Mon Sep 17 00:00:00 2001 From: chriseth Date: Thu, 6 Aug 2020 14:10:42 +0200 Subject: [PATCH] Use kind in json AST for free function. --- libsolidity/ast/ASTJsonConverter.cpp | 3 +-- libsolidity/ast/ASTJsonImporter.cpp | 17 +++++++---------- .../recovery_ast_constructor/output | 2 -- .../standard_only_ast_requested/output.json | 2 +- test/libsolidity/ASTJSON/abstract_contract.json | 1 - .../ASTJSON/abstract_contract_legacy.json | 1 - test/libsolidity/ASTJSON/address_payable.json | 1 - .../ASTJSON/address_payable_legacy.json | 1 - test/libsolidity/ASTJSON/assembly/call.json | 1 - .../ASTJSON/assembly/call_legacy.json | 1 - .../ASTJSON/assembly/empty_block.json | 1 - .../ASTJSON/assembly/empty_block_legacy.json | 1 - test/libsolidity/ASTJSON/assembly/function.json | 1 - .../ASTJSON/assembly/function_legacy.json | 1 - test/libsolidity/ASTJSON/assembly/leave.json | 1 - .../ASTJSON/assembly/leave_legacy.json | 1 - test/libsolidity/ASTJSON/assembly/loop.json | 1 - .../ASTJSON/assembly/loop_legacy.json | 1 - .../ASTJSON/assembly/nested_functions.json | 1 - .../assembly/nested_functions_legacy.json | 1 - .../ASTJSON/assembly/slot_offset.json | 1 - .../ASTJSON/assembly/slot_offset_legacy.json | 1 - .../libsolidity/ASTJSON/assembly/stringlit.json | 1 - .../ASTJSON/assembly/stringlit_legacy.json | 1 - test/libsolidity/ASTJSON/assembly/switch.json | 1 - .../ASTJSON/assembly/switch_default.json | 1 - .../ASTJSON/assembly/switch_default_legacy.json | 1 - .../ASTJSON/assembly/switch_legacy.json | 1 - .../ASTJSON/assembly/var_access.json | 1 - .../ASTJSON/assembly/var_access_legacy.json | 1 - test/libsolidity/ASTJSON/constructor.json | 1 - .../libsolidity/ASTJSON/constructor_legacy.json | 1 - test/libsolidity/ASTJSON/documentation.json | 1 - .../ASTJSON/documentation_legacy.json | 1 - test/libsolidity/ASTJSON/fallback.json | 1 - .../ASTJSON/fallback_and_reveice_ether.json | 2 -- .../fallback_and_reveice_ether_legacy.json | 2 -- test/libsolidity/ASTJSON/fallback_legacy.json | 1 - test/libsolidity/ASTJSON/fallback_payable.json | 1 - .../ASTJSON/fallback_payable_legacy.json | 1 - test/libsolidity/ASTJSON/function_type.json | 1 - .../ASTJSON/function_type_legacy.json | 1 - .../long_type_name_binary_operation.json | 1 - .../long_type_name_binary_operation_legacy.json | 1 - .../ASTJSON/long_type_name_identifier.json | 1 - .../long_type_name_identifier_legacy.json | 1 - .../ASTJSON/modifier_definition.json | 1 - .../ASTJSON/modifier_definition_legacy.json | 1 - .../ASTJSON/modifier_invocation.json | 1 - .../ASTJSON/modifier_invocation_legacy.json | 1 - test/libsolidity/ASTJSON/non_utf8.json | 1 - test/libsolidity/ASTJSON/non_utf8_legacy.json | 1 - test/libsolidity/ASTJSON/override.json | 5 ----- test/libsolidity/ASTJSON/override_legacy.json | 5 ----- test/libsolidity/ASTJSON/receive_ether.json | 1 - .../ASTJSON/receive_ether_legacy.json | 1 - test/libsolidity/ASTJSON/short_type_name.json | 1 - .../ASTJSON/short_type_name_legacy.json | 1 - .../ASTJSON/short_type_name_ref.json | 1 - .../ASTJSON/short_type_name_ref_legacy.json | 1 - test/libsolidity/ASTJSON/source_location.json | 1 - .../ASTJSON/source_location_legacy.json | 1 - test/libsolidity/ASTJSON/string.json | 1 - test/libsolidity/ASTJSON/string_legacy.json | 1 - .../libsolidity/ASTJSON/two_base_functions.json | 3 --- .../ASTJSON/two_base_functions_legacy.json | 3 --- test/libsolidity/ASTJSON/unicode.json | 1 - test/libsolidity/ASTJSON/unicode_legacy.json | 1 - 68 files changed, 9 insertions(+), 93 deletions(-) diff --git a/libsolidity/ast/ASTJsonConverter.cpp b/libsolidity/ast/ASTJsonConverter.cpp index 15ac0c620..04283cc34 100644 --- a/libsolidity/ast/ASTJsonConverter.cpp +++ b/libsolidity/ast/ASTJsonConverter.cpp @@ -360,8 +360,7 @@ bool ASTJsonConverter::visit(FunctionDefinition const& _node) std::vector> attributes = { make_pair("name", _node.name()), make_pair("documentation", _node.documentation() ? toJson(*_node.documentation()) : Json::nullValue), - make_pair("kind", TokenTraits::toString(_node.kind())), - make_pair("freeFunction", _node.isFree()), + make_pair("kind", _node.isFree() ? "freeFunction" : TokenTraits::toString(_node.kind())), make_pair("stateMutability", stateMutabilityToString(_node.stateMutability())), make_pair("visibility", Declaration::visibilityToString(visibility)), make_pair("virtual", _node.markedVirtual()), diff --git a/libsolidity/ast/ASTJsonImporter.cpp b/libsolidity/ast/ASTJsonImporter.cpp index 8bc657abf..5e44b8616 100644 --- a/libsolidity/ast/ASTJsonImporter.cpp +++ b/libsolidity/ast/ASTJsonImporter.cpp @@ -381,6 +381,7 @@ ASTPointer ASTJsonImporter::createFunctionDefinition(Json::V astAssert(_node["kind"].isString(), "Expected 'kind' to be a string!"); Token kind; + bool freeFunction = false; string kindStr = member(_node, "kind").asString(); if (kindStr == "constructor") @@ -391,6 +392,11 @@ ASTPointer ASTJsonImporter::createFunctionDefinition(Json::V kind = Token::Fallback; else if (kindStr == "receive") kind = Token::Receive; + else if (kindStr == "freeFunction") + { + kind = Token::Function; + freeFunction = true; + } else astAssert(false, "Expected 'kind' to be one of [constructor, function, fallback, receive]"); @@ -399,16 +405,7 @@ ASTPointer ASTJsonImporter::createFunctionDefinition(Json::V modifiers.push_back(createModifierInvocation(mod)); Visibility vis = Visibility::Default; - bool const freeFunction = _node.isMember("freeFunction") ? _node["freeFunction"].asBool() : false; - if (kind == Token::Constructor) - { - } - else if (freeFunction) - astAssert( - vis == Visibility::Internal || vis == Visibility::Default, - "Expected internal or default visibility for free function." - ); - else + if (!freeFunction) vis = visibility(_node); return createASTNode( _node, diff --git a/test/cmdlineTests/recovery_ast_constructor/output b/test/cmdlineTests/recovery_ast_constructor/output index 319fb3c88..d4a7d0288 100644 --- a/test/cmdlineTests/recovery_ast_constructor/output +++ b/test/cmdlineTests/recovery_ast_constructor/output @@ -58,7 +58,6 @@ JSON AST: { "attributes": { - "freeFunction": false, "implemented": true, "isConstructor": true, "kind": "constructor", @@ -121,7 +120,6 @@ JSON AST: { "attributes": { - "freeFunction": false, "functionSelector": "af11c34c", "implemented": true, "isConstructor": false, diff --git a/test/cmdlineTests/standard_only_ast_requested/output.json b/test/cmdlineTests/standard_only_ast_requested/output.json index c164153ca..c1ffe5892 100644 --- a/test/cmdlineTests/standard_only_ast_requested/output.json +++ b/test/cmdlineTests/standard_only_ast_requested/output.json @@ -1 +1 @@ -{"sources":{"A":{"ast":{"absolutePath":"A","exportedSymbols":{"C":[6]},"id":7,"license":"GPL-3.0","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">=","0.0"],"nodeType":"PragmaDirective","src":"36:22:0"},{"abstract":false,"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":6,"linearizedBaseContracts":[6],"name":"C","nodeType":"ContractDefinition","nodes":[{"body":{"id":4,"nodeType":"Block","src":"97:2:0","statements":[]},"documentation":null,"freeFunction":false,"functionSelector":"26121ff0","id":5,"implemented":true,"kind":"function","modifiers":[],"name":"f","nodeType":"FunctionDefinition","overrides":null,"parameters":{"id":2,"nodeType":"ParameterList","parameters":[],"src":"82:2:0"},"returnParameters":{"id":3,"nodeType":"ParameterList","parameters":[],"src":"97:0:0"},"scope":6,"src":"72:27:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":7,"src":"59:42:0"}],"src":"36:65:0"},"id":0}}} +{"sources":{"A":{"ast":{"absolutePath":"A","exportedSymbols":{"C":[6]},"id":7,"license":"GPL-3.0","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">=","0.0"],"nodeType":"PragmaDirective","src":"36:22:0"},{"abstract":false,"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":6,"linearizedBaseContracts":[6],"name":"C","nodeType":"ContractDefinition","nodes":[{"body":{"id":4,"nodeType":"Block","src":"97:2:0","statements":[]},"documentation":null,"functionSelector":"26121ff0","id":5,"implemented":true,"kind":"function","modifiers":[],"name":"f","nodeType":"FunctionDefinition","overrides":null,"parameters":{"id":2,"nodeType":"ParameterList","parameters":[],"src":"82:2:0"},"returnParameters":{"id":3,"nodeType":"ParameterList","parameters":[],"src":"97:0:0"},"scope":6,"src":"72:27:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":7,"src":"59:42:0"}],"src":"36:65:0"},"id":0}}} diff --git a/test/libsolidity/ASTJSON/abstract_contract.json b/test/libsolidity/ASTJSON/abstract_contract.json index 41cd1330f..08b1e6d95 100644 --- a/test/libsolidity/ASTJSON/abstract_contract.json +++ b/test/libsolidity/ASTJSON/abstract_contract.json @@ -34,7 +34,6 @@ "src": "37:4:1", "statements": [] }, - "freeFunction": false, "id": 4, "implemented": true, "kind": "constructor", diff --git a/test/libsolidity/ASTJSON/abstract_contract_legacy.json b/test/libsolidity/ASTJSON/abstract_contract_legacy.json index f8da2425b..c13abca7f 100644 --- a/test/libsolidity/ASTJSON/abstract_contract_legacy.json +++ b/test/libsolidity/ASTJSON/abstract_contract_legacy.json @@ -38,7 +38,6 @@ { "attributes": { - "freeFunction": false, "implemented": true, "isConstructor": true, "kind": "constructor", diff --git a/test/libsolidity/ASTJSON/address_payable.json b/test/libsolidity/ASTJSON/address_payable.json index 8f7ca12be..3365ec436 100644 --- a/test/libsolidity/ASTJSON/address_payable.json +++ b/test/libsolidity/ASTJSON/address_payable.json @@ -462,7 +462,6 @@ } ] }, - "freeFunction": false, "functionSelector": "fc68521a", "id": 38, "implemented": true, diff --git a/test/libsolidity/ASTJSON/address_payable_legacy.json b/test/libsolidity/ASTJSON/address_payable_legacy.json index 15567b5e5..bda50fc57 100644 --- a/test/libsolidity/ASTJSON/address_payable_legacy.json +++ b/test/libsolidity/ASTJSON/address_payable_legacy.json @@ -91,7 +91,6 @@ { "attributes": { - "freeFunction": false, "functionSelector": "fc68521a", "implemented": true, "isConstructor": false, diff --git a/test/libsolidity/ASTJSON/assembly/call.json b/test/libsolidity/ASTJSON/assembly/call.json index 5fe3e3f20..9538fe5cc 100644 --- a/test/libsolidity/ASTJSON/assembly/call.json +++ b/test/libsolidity/ASTJSON/assembly/call.json @@ -131,7 +131,6 @@ } ] }, - "freeFunction": false, "functionSelector": "b582ec5f", "id": 5, "implemented": true, diff --git a/test/libsolidity/ASTJSON/assembly/call_legacy.json b/test/libsolidity/ASTJSON/assembly/call_legacy.json index fa9a9830b..2902873fa 100644 --- a/test/libsolidity/ASTJSON/assembly/call_legacy.json +++ b/test/libsolidity/ASTJSON/assembly/call_legacy.json @@ -38,7 +38,6 @@ { "attributes": { - "freeFunction": false, "functionSelector": "b582ec5f", "implemented": true, "isConstructor": false, diff --git a/test/libsolidity/ASTJSON/assembly/empty_block.json b/test/libsolidity/ASTJSON/assembly/empty_block.json index 18180e76b..2d22cc035 100644 --- a/test/libsolidity/ASTJSON/assembly/empty_block.json +++ b/test/libsolidity/ASTJSON/assembly/empty_block.json @@ -56,7 +56,6 @@ } ] }, - "freeFunction": false, "functionSelector": "e2179b8e", "id": 5, "implemented": true, diff --git a/test/libsolidity/ASTJSON/assembly/empty_block_legacy.json b/test/libsolidity/ASTJSON/assembly/empty_block_legacy.json index 8ab74c144..54811bf1a 100644 --- a/test/libsolidity/ASTJSON/assembly/empty_block_legacy.json +++ b/test/libsolidity/ASTJSON/assembly/empty_block_legacy.json @@ -38,7 +38,6 @@ { "attributes": { - "freeFunction": false, "functionSelector": "e2179b8e", "implemented": true, "isConstructor": false, diff --git a/test/libsolidity/ASTJSON/assembly/function.json b/test/libsolidity/ASTJSON/assembly/function.json index 0fc33c271..ccbf3d853 100644 --- a/test/libsolidity/ASTJSON/assembly/function.json +++ b/test/libsolidity/ASTJSON/assembly/function.json @@ -118,7 +118,6 @@ } ] }, - "freeFunction": false, "functionSelector": "b8c9d365", "id": 5, "implemented": true, diff --git a/test/libsolidity/ASTJSON/assembly/function_legacy.json b/test/libsolidity/ASTJSON/assembly/function_legacy.json index c7a928b54..940a4b6ac 100644 --- a/test/libsolidity/ASTJSON/assembly/function_legacy.json +++ b/test/libsolidity/ASTJSON/assembly/function_legacy.json @@ -38,7 +38,6 @@ { "attributes": { - "freeFunction": false, "functionSelector": "b8c9d365", "implemented": true, "isConstructor": false, diff --git a/test/libsolidity/ASTJSON/assembly/leave.json b/test/libsolidity/ASTJSON/assembly/leave.json index 7edbfe11f..ba765146f 100644 --- a/test/libsolidity/ASTJSON/assembly/leave.json +++ b/test/libsolidity/ASTJSON/assembly/leave.json @@ -68,7 +68,6 @@ } ] }, - "freeFunction": false, "functionSelector": "ece866b9", "id": 5, "implemented": true, diff --git a/test/libsolidity/ASTJSON/assembly/leave_legacy.json b/test/libsolidity/ASTJSON/assembly/leave_legacy.json index 02fba96c7..fa71bcba0 100644 --- a/test/libsolidity/ASTJSON/assembly/leave_legacy.json +++ b/test/libsolidity/ASTJSON/assembly/leave_legacy.json @@ -38,7 +38,6 @@ { "attributes": { - "freeFunction": false, "functionSelector": "ece866b9", "implemented": true, "isConstructor": false, diff --git a/test/libsolidity/ASTJSON/assembly/loop.json b/test/libsolidity/ASTJSON/assembly/loop.json index f565915e8..9c99cf491 100644 --- a/test/libsolidity/ASTJSON/assembly/loop.json +++ b/test/libsolidity/ASTJSON/assembly/loop.json @@ -131,7 +131,6 @@ } ] }, - "freeFunction": false, "functionSelector": "e2179b8e", "id": 5, "implemented": true, diff --git a/test/libsolidity/ASTJSON/assembly/loop_legacy.json b/test/libsolidity/ASTJSON/assembly/loop_legacy.json index 4f1051e03..84890475f 100644 --- a/test/libsolidity/ASTJSON/assembly/loop_legacy.json +++ b/test/libsolidity/ASTJSON/assembly/loop_legacy.json @@ -38,7 +38,6 @@ { "attributes": { - "freeFunction": false, "functionSelector": "e2179b8e", "implemented": true, "isConstructor": false, diff --git a/test/libsolidity/ASTJSON/assembly/nested_functions.json b/test/libsolidity/ASTJSON/assembly/nested_functions.json index 8f9acb56f..f945494ba 100644 --- a/test/libsolidity/ASTJSON/assembly/nested_functions.json +++ b/test/libsolidity/ASTJSON/assembly/nested_functions.json @@ -95,7 +95,6 @@ } ] }, - "freeFunction": false, "functionSelector": "26121ff0", "id": 7, "implemented": true, diff --git a/test/libsolidity/ASTJSON/assembly/nested_functions_legacy.json b/test/libsolidity/ASTJSON/assembly/nested_functions_legacy.json index 2dd973e84..393646221 100644 --- a/test/libsolidity/ASTJSON/assembly/nested_functions_legacy.json +++ b/test/libsolidity/ASTJSON/assembly/nested_functions_legacy.json @@ -38,7 +38,6 @@ { "attributes": { - "freeFunction": false, "functionSelector": "26121ff0", "implemented": true, "isConstructor": false, diff --git a/test/libsolidity/ASTJSON/assembly/slot_offset.json b/test/libsolidity/ASTJSON/assembly/slot_offset.json index 5a9b1489f..0858fe617 100644 --- a/test/libsolidity/ASTJSON/assembly/slot_offset.json +++ b/test/libsolidity/ASTJSON/assembly/slot_offset.json @@ -196,7 +196,6 @@ } ] }, - "freeFunction": false, "functionSelector": "ffae15ba", "id": 10, "implemented": true, diff --git a/test/libsolidity/ASTJSON/assembly/slot_offset_legacy.json b/test/libsolidity/ASTJSON/assembly/slot_offset_legacy.json index d84497d1a..50747baaa 100644 --- a/test/libsolidity/ASTJSON/assembly/slot_offset_legacy.json +++ b/test/libsolidity/ASTJSON/assembly/slot_offset_legacy.json @@ -112,7 +112,6 @@ { "attributes": { - "freeFunction": false, "functionSelector": "ffae15ba", "implemented": true, "isConstructor": false, diff --git a/test/libsolidity/ASTJSON/assembly/stringlit.json b/test/libsolidity/ASTJSON/assembly/stringlit.json index 872e953ee..08e0ea4f6 100644 --- a/test/libsolidity/ASTJSON/assembly/stringlit.json +++ b/test/libsolidity/ASTJSON/assembly/stringlit.json @@ -72,7 +72,6 @@ } ] }, - "freeFunction": false, "functionSelector": "5a2ee019", "id": 5, "implemented": true, diff --git a/test/libsolidity/ASTJSON/assembly/stringlit_legacy.json b/test/libsolidity/ASTJSON/assembly/stringlit_legacy.json index 87c79d107..325d25274 100644 --- a/test/libsolidity/ASTJSON/assembly/stringlit_legacy.json +++ b/test/libsolidity/ASTJSON/assembly/stringlit_legacy.json @@ -38,7 +38,6 @@ { "attributes": { - "freeFunction": false, "functionSelector": "5a2ee019", "implemented": true, "isConstructor": false, diff --git a/test/libsolidity/ASTJSON/assembly/switch.json b/test/libsolidity/ASTJSON/assembly/switch.json index 7380897a0..9ae71f15c 100644 --- a/test/libsolidity/ASTJSON/assembly/switch.json +++ b/test/libsolidity/ASTJSON/assembly/switch.json @@ -180,7 +180,6 @@ } ] }, - "freeFunction": false, "functionSelector": "26121ff0", "id": 5, "implemented": true, diff --git a/test/libsolidity/ASTJSON/assembly/switch_default.json b/test/libsolidity/ASTJSON/assembly/switch_default.json index 2eb2cd9dc..4226a8ea3 100644 --- a/test/libsolidity/ASTJSON/assembly/switch_default.json +++ b/test/libsolidity/ASTJSON/assembly/switch_default.json @@ -95,7 +95,6 @@ } ] }, - "freeFunction": false, "functionSelector": "e2179b8e", "id": 5, "implemented": true, diff --git a/test/libsolidity/ASTJSON/assembly/switch_default_legacy.json b/test/libsolidity/ASTJSON/assembly/switch_default_legacy.json index 5f0d10dfc..324330f86 100644 --- a/test/libsolidity/ASTJSON/assembly/switch_default_legacy.json +++ b/test/libsolidity/ASTJSON/assembly/switch_default_legacy.json @@ -38,7 +38,6 @@ { "attributes": { - "freeFunction": false, "functionSelector": "e2179b8e", "implemented": true, "isConstructor": false, diff --git a/test/libsolidity/ASTJSON/assembly/switch_legacy.json b/test/libsolidity/ASTJSON/assembly/switch_legacy.json index 9f907e633..92e2e2c61 100644 --- a/test/libsolidity/ASTJSON/assembly/switch_legacy.json +++ b/test/libsolidity/ASTJSON/assembly/switch_legacy.json @@ -38,7 +38,6 @@ { "attributes": { - "freeFunction": false, "functionSelector": "26121ff0", "implemented": true, "isConstructor": false, diff --git a/test/libsolidity/ASTJSON/assembly/var_access.json b/test/libsolidity/ASTJSON/assembly/var_access.json index bc0a9a3c7..f10c45cc4 100644 --- a/test/libsolidity/ASTJSON/assembly/var_access.json +++ b/test/libsolidity/ASTJSON/assembly/var_access.json @@ -121,7 +121,6 @@ } ] }, - "freeFunction": false, "functionSelector": "26121ff0", "id": 8, "implemented": true, diff --git a/test/libsolidity/ASTJSON/assembly/var_access_legacy.json b/test/libsolidity/ASTJSON/assembly/var_access_legacy.json index 2052a8aed..fcd798ad9 100644 --- a/test/libsolidity/ASTJSON/assembly/var_access_legacy.json +++ b/test/libsolidity/ASTJSON/assembly/var_access_legacy.json @@ -38,7 +38,6 @@ { "attributes": { - "freeFunction": false, "functionSelector": "26121ff0", "implemented": true, "isConstructor": false, diff --git a/test/libsolidity/ASTJSON/constructor.json b/test/libsolidity/ASTJSON/constructor.json index c4b7e9f87..31747901e 100644 --- a/test/libsolidity/ASTJSON/constructor.json +++ b/test/libsolidity/ASTJSON/constructor.json @@ -34,7 +34,6 @@ "src": "28:4:1", "statements": [] }, - "freeFunction": false, "id": 4, "implemented": true, "kind": "constructor", diff --git a/test/libsolidity/ASTJSON/constructor_legacy.json b/test/libsolidity/ASTJSON/constructor_legacy.json index ade4e5629..68a648bc9 100644 --- a/test/libsolidity/ASTJSON/constructor_legacy.json +++ b/test/libsolidity/ASTJSON/constructor_legacy.json @@ -38,7 +38,6 @@ { "attributes": { - "freeFunction": false, "implemented": true, "isConstructor": true, "kind": "constructor", diff --git a/test/libsolidity/ASTJSON/documentation.json b/test/libsolidity/ASTJSON/documentation.json index 8cf35a71e..f0beba98f 100644 --- a/test/libsolidity/ASTJSON/documentation.json +++ b/test/libsolidity/ASTJSON/documentation.json @@ -216,7 +216,6 @@ "src": "162:25:3", "text": "Some comment on fn." }, - "freeFunction": false, "functionSelector": "a4a2c40b", "id": 22, "implemented": true, diff --git a/test/libsolidity/ASTJSON/documentation_legacy.json b/test/libsolidity/ASTJSON/documentation_legacy.json index 014b70fe9..4284c4f8f 100644 --- a/test/libsolidity/ASTJSON/documentation_legacy.json +++ b/test/libsolidity/ASTJSON/documentation_legacy.json @@ -161,7 +161,6 @@ { "attributes": { - "freeFunction": false, "functionSelector": "a4a2c40b", "implemented": true, "isConstructor": false, diff --git a/test/libsolidity/ASTJSON/fallback.json b/test/libsolidity/ASTJSON/fallback.json index cf706e4fe..7037b960a 100644 --- a/test/libsolidity/ASTJSON/fallback.json +++ b/test/libsolidity/ASTJSON/fallback.json @@ -34,7 +34,6 @@ "src": "43:5:1", "statements": [] }, - "freeFunction": false, "id": 4, "implemented": true, "kind": "fallback", diff --git a/test/libsolidity/ASTJSON/fallback_and_reveice_ether.json b/test/libsolidity/ASTJSON/fallback_and_reveice_ether.json index e8219b6db..009363e98 100644 --- a/test/libsolidity/ASTJSON/fallback_and_reveice_ether.json +++ b/test/libsolidity/ASTJSON/fallback_and_reveice_ether.json @@ -34,7 +34,6 @@ "src": "42:5:1", "statements": [] }, - "freeFunction": false, "id": 4, "implemented": true, "kind": "receive", @@ -69,7 +68,6 @@ "src": "78:5:1", "statements": [] }, - "freeFunction": false, "id": 8, "implemented": true, "kind": "fallback", diff --git a/test/libsolidity/ASTJSON/fallback_and_reveice_ether_legacy.json b/test/libsolidity/ASTJSON/fallback_and_reveice_ether_legacy.json index 1fa662d64..8ac17607e 100644 --- a/test/libsolidity/ASTJSON/fallback_and_reveice_ether_legacy.json +++ b/test/libsolidity/ASTJSON/fallback_and_reveice_ether_legacy.json @@ -38,7 +38,6 @@ { "attributes": { - "freeFunction": false, "implemented": true, "isConstructor": false, "kind": "receive", @@ -101,7 +100,6 @@ { "attributes": { - "freeFunction": false, "implemented": true, "isConstructor": false, "kind": "fallback", diff --git a/test/libsolidity/ASTJSON/fallback_legacy.json b/test/libsolidity/ASTJSON/fallback_legacy.json index 9f31a225e..1ee8bf6b3 100644 --- a/test/libsolidity/ASTJSON/fallback_legacy.json +++ b/test/libsolidity/ASTJSON/fallback_legacy.json @@ -38,7 +38,6 @@ { "attributes": { - "freeFunction": false, "implemented": true, "isConstructor": false, "kind": "fallback", diff --git a/test/libsolidity/ASTJSON/fallback_payable.json b/test/libsolidity/ASTJSON/fallback_payable.json index 883ba1bfd..2391f57bb 100644 --- a/test/libsolidity/ASTJSON/fallback_payable.json +++ b/test/libsolidity/ASTJSON/fallback_payable.json @@ -34,7 +34,6 @@ "src": "34:2:1", "statements": [] }, - "freeFunction": false, "id": 4, "implemented": true, "kind": "fallback", diff --git a/test/libsolidity/ASTJSON/fallback_payable_legacy.json b/test/libsolidity/ASTJSON/fallback_payable_legacy.json index 2e4a69077..69e25ab6e 100644 --- a/test/libsolidity/ASTJSON/fallback_payable_legacy.json +++ b/test/libsolidity/ASTJSON/fallback_payable_legacy.json @@ -38,7 +38,6 @@ { "attributes": { - "freeFunction": false, "implemented": true, "isConstructor": false, "kind": "fallback", diff --git a/test/libsolidity/ASTJSON/function_type.json b/test/libsolidity/ASTJSON/function_type.json index fb706e5e8..c0d2efc68 100644 --- a/test/libsolidity/ASTJSON/function_type.json +++ b/test/libsolidity/ASTJSON/function_type.json @@ -34,7 +34,6 @@ "src": "120:2:1", "statements": [] }, - "freeFunction": false, "functionSelector": "d6cd4974", "id": 16, "implemented": true, diff --git a/test/libsolidity/ASTJSON/function_type_legacy.json b/test/libsolidity/ASTJSON/function_type_legacy.json index cc02a7dd9..627ce45f0 100644 --- a/test/libsolidity/ASTJSON/function_type_legacy.json +++ b/test/libsolidity/ASTJSON/function_type_legacy.json @@ -38,7 +38,6 @@ { "attributes": { - "freeFunction": false, "functionSelector": "d6cd4974", "implemented": true, "isConstructor": false, diff --git a/test/libsolidity/ASTJSON/long_type_name_binary_operation.json b/test/libsolidity/ASTJSON/long_type_name_binary_operation.json index dd9210e5f..7b598093b 100644 --- a/test/libsolidity/ASTJSON/long_type_name_binary_operation.json +++ b/test/libsolidity/ASTJSON/long_type_name_binary_operation.json @@ -134,7 +134,6 @@ } ] }, - "freeFunction": false, "functionSelector": "26121ff0", "id": 10, "implemented": true, diff --git a/test/libsolidity/ASTJSON/long_type_name_binary_operation_legacy.json b/test/libsolidity/ASTJSON/long_type_name_binary_operation_legacy.json index 319b1e022..46e5b0417 100644 --- a/test/libsolidity/ASTJSON/long_type_name_binary_operation_legacy.json +++ b/test/libsolidity/ASTJSON/long_type_name_binary_operation_legacy.json @@ -38,7 +38,6 @@ { "attributes": { - "freeFunction": false, "functionSelector": "26121ff0", "implemented": true, "isConstructor": false, diff --git a/test/libsolidity/ASTJSON/long_type_name_identifier.json b/test/libsolidity/ASTJSON/long_type_name_identifier.json index 6df967ea9..4293f6df4 100644 --- a/test/libsolidity/ASTJSON/long_type_name_identifier.json +++ b/test/libsolidity/ASTJSON/long_type_name_identifier.json @@ -142,7 +142,6 @@ } ] }, - "freeFunction": false, "functionSelector": "26121ff0", "id": 14, "implemented": true, diff --git a/test/libsolidity/ASTJSON/long_type_name_identifier_legacy.json b/test/libsolidity/ASTJSON/long_type_name_identifier_legacy.json index f6ee2b948..ced331a6d 100644 --- a/test/libsolidity/ASTJSON/long_type_name_identifier_legacy.json +++ b/test/libsolidity/ASTJSON/long_type_name_identifier_legacy.json @@ -79,7 +79,6 @@ { "attributes": { - "freeFunction": false, "functionSelector": "26121ff0", "implemented": true, "isConstructor": false, diff --git a/test/libsolidity/ASTJSON/modifier_definition.json b/test/libsolidity/ASTJSON/modifier_definition.json index d1355a51f..198afe454 100644 --- a/test/libsolidity/ASTJSON/modifier_definition.json +++ b/test/libsolidity/ASTJSON/modifier_definition.json @@ -94,7 +94,6 @@ "src": "64:2:1", "statements": [] }, - "freeFunction": false, "functionSelector": "28811f59", "id": 13, "implemented": true, diff --git a/test/libsolidity/ASTJSON/modifier_definition_legacy.json b/test/libsolidity/ASTJSON/modifier_definition_legacy.json index a48e02104..cc3089395 100644 --- a/test/libsolidity/ASTJSON/modifier_definition_legacy.json +++ b/test/libsolidity/ASTJSON/modifier_definition_legacy.json @@ -102,7 +102,6 @@ { "attributes": { - "freeFunction": false, "functionSelector": "28811f59", "implemented": true, "isConstructor": false, diff --git a/test/libsolidity/ASTJSON/modifier_invocation.json b/test/libsolidity/ASTJSON/modifier_invocation.json index d1355a51f..198afe454 100644 --- a/test/libsolidity/ASTJSON/modifier_invocation.json +++ b/test/libsolidity/ASTJSON/modifier_invocation.json @@ -94,7 +94,6 @@ "src": "64:2:1", "statements": [] }, - "freeFunction": false, "functionSelector": "28811f59", "id": 13, "implemented": true, diff --git a/test/libsolidity/ASTJSON/modifier_invocation_legacy.json b/test/libsolidity/ASTJSON/modifier_invocation_legacy.json index a48e02104..cc3089395 100644 --- a/test/libsolidity/ASTJSON/modifier_invocation_legacy.json +++ b/test/libsolidity/ASTJSON/modifier_invocation_legacy.json @@ -102,7 +102,6 @@ { "attributes": { - "freeFunction": false, "functionSelector": "28811f59", "implemented": true, "isConstructor": false, diff --git a/test/libsolidity/ASTJSON/non_utf8.json b/test/libsolidity/ASTJSON/non_utf8.json index 22d95bf28..98db4273f 100644 --- a/test/libsolidity/ASTJSON/non_utf8.json +++ b/test/libsolidity/ASTJSON/non_utf8.json @@ -94,7 +94,6 @@ } ] }, - "freeFunction": false, "functionSelector": "26121ff0", "id": 8, "implemented": true, diff --git a/test/libsolidity/ASTJSON/non_utf8_legacy.json b/test/libsolidity/ASTJSON/non_utf8_legacy.json index c8d5c312f..d9430c82d 100644 --- a/test/libsolidity/ASTJSON/non_utf8_legacy.json +++ b/test/libsolidity/ASTJSON/non_utf8_legacy.json @@ -38,7 +38,6 @@ { "attributes": { - "freeFunction": false, "functionSelector": "26121ff0", "implemented": true, "isConstructor": false, diff --git a/test/libsolidity/ASTJSON/override.json b/test/libsolidity/ASTJSON/override.json index e38305bf1..49f85144e 100644 --- a/test/libsolidity/ASTJSON/override.json +++ b/test/libsolidity/ASTJSON/override.json @@ -42,7 +42,6 @@ "src": "36:2:1", "statements": [] }, - "freeFunction": false, "functionSelector": "a399b6a2", "id": 4, "implemented": true, @@ -114,7 +113,6 @@ "nodes": [ { - "freeFunction": false, "functionSelector": "c2985578", "id": 10, "implemented": false, @@ -154,7 +152,6 @@ "src": "115:2:1", "statements": [] }, - "freeFunction": false, "functionSelector": "a399b6a2", "id": 15, "implemented": true, @@ -246,7 +243,6 @@ "src": "170:3:1", "statements": [] }, - "freeFunction": false, "functionSelector": "c2985578", "id": 23, "implemented": true, @@ -293,7 +289,6 @@ "src": "212:2:1", "statements": [] }, - "freeFunction": false, "functionSelector": "a399b6a2", "id": 30, "implemented": true, diff --git a/test/libsolidity/ASTJSON/override_legacy.json b/test/libsolidity/ASTJSON/override_legacy.json index bbd03937f..5cdc2f364 100644 --- a/test/libsolidity/ASTJSON/override_legacy.json +++ b/test/libsolidity/ASTJSON/override_legacy.json @@ -46,7 +46,6 @@ { "attributes": { - "freeFunction": false, "functionSelector": "a399b6a2", "implemented": true, "isConstructor": false, @@ -155,7 +154,6 @@ { "attributes": { - "freeFunction": false, "functionSelector": "c2985578", "implemented": false, "isConstructor": false, @@ -210,7 +208,6 @@ [ 4 ], - "freeFunction": false, "functionSelector": "a399b6a2", "implemented": true, "isConstructor": false, @@ -337,7 +334,6 @@ [ 10 ], - "freeFunction": false, "functionSelector": "c2985578", "implemented": true, "isConstructor": false, @@ -417,7 +413,6 @@ [ 15 ], - "freeFunction": false, "functionSelector": "a399b6a2", "implemented": true, "isConstructor": false, diff --git a/test/libsolidity/ASTJSON/receive_ether.json b/test/libsolidity/ASTJSON/receive_ether.json index 8b678a593..8a1f0ac9a 100644 --- a/test/libsolidity/ASTJSON/receive_ether.json +++ b/test/libsolidity/ASTJSON/receive_ether.json @@ -34,7 +34,6 @@ "src": "42:5:1", "statements": [] }, - "freeFunction": false, "id": 4, "implemented": true, "kind": "receive", diff --git a/test/libsolidity/ASTJSON/receive_ether_legacy.json b/test/libsolidity/ASTJSON/receive_ether_legacy.json index 1155129d4..d9544f138 100644 --- a/test/libsolidity/ASTJSON/receive_ether_legacy.json +++ b/test/libsolidity/ASTJSON/receive_ether_legacy.json @@ -38,7 +38,6 @@ { "attributes": { - "freeFunction": false, "implemented": true, "isConstructor": false, "kind": "receive", diff --git a/test/libsolidity/ASTJSON/short_type_name.json b/test/libsolidity/ASTJSON/short_type_name.json index f569f59af..882fcfe24 100644 --- a/test/libsolidity/ASTJSON/short_type_name.json +++ b/test/libsolidity/ASTJSON/short_type_name.json @@ -88,7 +88,6 @@ } ] }, - "freeFunction": false, "functionSelector": "26121ff0", "id": 10, "implemented": true, diff --git a/test/libsolidity/ASTJSON/short_type_name_legacy.json b/test/libsolidity/ASTJSON/short_type_name_legacy.json index b7912f585..8e255954d 100644 --- a/test/libsolidity/ASTJSON/short_type_name_legacy.json +++ b/test/libsolidity/ASTJSON/short_type_name_legacy.json @@ -38,7 +38,6 @@ { "attributes": { - "freeFunction": false, "functionSelector": "26121ff0", "implemented": true, "isConstructor": false, diff --git a/test/libsolidity/ASTJSON/short_type_name_ref.json b/test/libsolidity/ASTJSON/short_type_name_ref.json index e8845981f..2d07a9c60 100644 --- a/test/libsolidity/ASTJSON/short_type_name_ref.json +++ b/test/libsolidity/ASTJSON/short_type_name_ref.json @@ -99,7 +99,6 @@ } ] }, - "freeFunction": false, "functionSelector": "26121ff0", "id": 11, "implemented": true, diff --git a/test/libsolidity/ASTJSON/short_type_name_ref_legacy.json b/test/libsolidity/ASTJSON/short_type_name_ref_legacy.json index f6cd04ed3..5316c56ac 100644 --- a/test/libsolidity/ASTJSON/short_type_name_ref_legacy.json +++ b/test/libsolidity/ASTJSON/short_type_name_ref_legacy.json @@ -38,7 +38,6 @@ { "attributes": { - "freeFunction": false, "functionSelector": "26121ff0", "implemented": true, "isConstructor": false, diff --git a/test/libsolidity/ASTJSON/source_location.json b/test/libsolidity/ASTJSON/source_location.json index fa95c0e4a..f56231ed7 100644 --- a/test/libsolidity/ASTJSON/source_location.json +++ b/test/libsolidity/ASTJSON/source_location.json @@ -131,7 +131,6 @@ } ] }, - "freeFunction": false, "functionSelector": "26121ff0", "id": 11, "implemented": true, diff --git a/test/libsolidity/ASTJSON/source_location_legacy.json b/test/libsolidity/ASTJSON/source_location_legacy.json index 529ca4444..bf3dfaedd 100644 --- a/test/libsolidity/ASTJSON/source_location_legacy.json +++ b/test/libsolidity/ASTJSON/source_location_legacy.json @@ -38,7 +38,6 @@ { "attributes": { - "freeFunction": false, "functionSelector": "26121ff0", "implemented": true, "isConstructor": false, diff --git a/test/libsolidity/ASTJSON/string.json b/test/libsolidity/ASTJSON/string.json index 41fe9fa00..f47b41e47 100644 --- a/test/libsolidity/ASTJSON/string.json +++ b/test/libsolidity/ASTJSON/string.json @@ -95,7 +95,6 @@ } ] }, - "freeFunction": false, "functionSelector": "26121ff0", "id": 8, "implemented": true, diff --git a/test/libsolidity/ASTJSON/string_legacy.json b/test/libsolidity/ASTJSON/string_legacy.json index 89c9a5e55..96c984209 100644 --- a/test/libsolidity/ASTJSON/string_legacy.json +++ b/test/libsolidity/ASTJSON/string_legacy.json @@ -38,7 +38,6 @@ { "attributes": { - "freeFunction": false, "functionSelector": "26121ff0", "implemented": true, "isConstructor": false, diff --git a/test/libsolidity/ASTJSON/two_base_functions.json b/test/libsolidity/ASTJSON/two_base_functions.json index 7e6526316..769e5c3f8 100644 --- a/test/libsolidity/ASTJSON/two_base_functions.json +++ b/test/libsolidity/ASTJSON/two_base_functions.json @@ -42,7 +42,6 @@ "src": "45:2:1", "statements": [] }, - "freeFunction": false, "functionSelector": "26121ff0", "id": 4, "implemented": true, @@ -97,7 +96,6 @@ "src": "95:2:1", "statements": [] }, - "freeFunction": false, "functionSelector": "26121ff0", "id": 9, "implemented": true, @@ -201,7 +199,6 @@ "src": "160:2:1", "statements": [] }, - "freeFunction": false, "functionSelector": "26121ff0", "id": 21, "implemented": true, diff --git a/test/libsolidity/ASTJSON/two_base_functions_legacy.json b/test/libsolidity/ASTJSON/two_base_functions_legacy.json index 405576ab6..a5bd2d725 100644 --- a/test/libsolidity/ASTJSON/two_base_functions_legacy.json +++ b/test/libsolidity/ASTJSON/two_base_functions_legacy.json @@ -46,7 +46,6 @@ { "attributes": { - "freeFunction": false, "functionSelector": "26121ff0", "implemented": true, "isConstructor": false, @@ -138,7 +137,6 @@ { "attributes": { - "freeFunction": false, "functionSelector": "26121ff0", "implemented": true, "isConstructor": false, @@ -274,7 +272,6 @@ 4, 9 ], - "freeFunction": false, "functionSelector": "26121ff0", "implemented": true, "isConstructor": false, diff --git a/test/libsolidity/ASTJSON/unicode.json b/test/libsolidity/ASTJSON/unicode.json index 99f9eb619..81c8ad0da 100644 --- a/test/libsolidity/ASTJSON/unicode.json +++ b/test/libsolidity/ASTJSON/unicode.json @@ -95,7 +95,6 @@ } ] }, - "freeFunction": false, "functionSelector": "26121ff0", "id": 8, "implemented": true, diff --git a/test/libsolidity/ASTJSON/unicode_legacy.json b/test/libsolidity/ASTJSON/unicode_legacy.json index 826c3ce44..22976f6f9 100644 --- a/test/libsolidity/ASTJSON/unicode_legacy.json +++ b/test/libsolidity/ASTJSON/unicode_legacy.json @@ -38,7 +38,6 @@ { "attributes": { - "freeFunction": false, "functionSelector": "26121ff0", "implemented": true, "isConstructor": false,