Open
Conversation
Owner
Author
bug3: address(this) has a wrong "referencedDeclaration"steps to reproduce
suspected source"referencedDeclaration" is produced from this: so when there is no annotation, it will just produce a new one... ideas about fixing itAnother thing i think i understood is that the annotations are set in the analyze()-step by the NameAndTypeResolver, which uses resolveImports relies on So possible avenues for solving it could be to mdofify m_sourceJsons so that it can be used to fill m_sourceOrder?? |
e216427 to
f8771be
Compare
cb4dea5 to
4ced599
Compare
93589bb to
3c2d7b7
Compare
850f011 to
72cfdda
Compare
7e068fe to
445474d
Compare
Move states from the TypeChecker to the PostTypeChecker
Combine value and loop depth
Replace void cast by maybe_unused
…orWithoutSource Handle empty source strings in SourceReferenceExtractor
…cleanup Add methods for AST annotation implementation
Ignore empty options to (i)soltest
…atures via contract name.
Add a new Function Type referring to FunctionDefinition's without calling context and use it to allow selector lookup.
Change grammar to reflect optionality of parameter list in catch clause
c51c285 to
aaf9349
Compare
e21348c to
42826b1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Current status:
--import-astoption in commandline able to import and compile all kinds of AST-nodes (exception: inlineAssembly)testuite that verifies
The testsuite runs on all contracts defined in
/test/libsolidity/ASTJson/(barring few tiny modifications) and 10 more contracts that include things not covered in there, such as (if, while, emit,...)This PR introduces some changes to the contract metadata too, the compiler now
- defines new input-language solidityAST, and
- [sources][sourceName][content] is the compactPrint of the Json used as source (needs testing)
left TODOs:
bytecodeWithoutAnyMetadata()that extracts the metadata of imported contracts toobugs to fix:
I can not use
dev::test::bytecodeSansMetadataeven though I am importing it and declaring the namespace (seeASTImportTest.cpp::run())some importStatements are not processed correctly (
contract A is B,C,D,F {}will generate wrong order of dependencies, see /test/libsolidity/ASTImport/import.soladdress(this)does not get processed correctly. -> referencedDeclarations will be a newly created one (see /test/libsolidity/ASTImport/address_payable.json) (see comment below for more details)More about the testsuite
The testsuite is made of .sol files from which a combined-json is created with
feature.json is then imported into the compiler, analyzed & compiled. Then a new json combined-json object is generated including an AST and the bytecode. It should be the same as the originally imported.
It can be run like this:
a helper script to create the combined-json command on all .sol files: here
and to extract the resulting Jsons from the output in case of there was an error: here
(check the comments for detailed instructions how to use the scripts)