Conversation
Update version to 0.4.9.
Make enum Tier into an enum class
'payable' added as a keyword
Update SolidityLexer.py
Added number unit keywords
The previous behaviour, courtesy of the [] operator in std::map, would uncritically store a new ContractDefinition in m_contracts even when a ContractDefinition already existed. This "resolved" collissions on contract names by clobbering the original one with the new one, and could lead to scenarios where the clobber would only be discovered when the original ContractDefinition could not be found or referred to, which was an unhelpful InternalCompilerError. This change checks the m_contracts map for a collision first and will not let the ContractDefinition be changed to a new one once it's set, throwing a CompilerError with information about the conflict.
@chriseth had suggested that it would be better if contracts were referenced in a file:contract notation, and that we output .bin files that prepend original path names if necessary to avoid a collision. This commit is mostly a draft; it still needs to be run through the test suite.
A large number of tests compile contracts while passing in an empty string for the source name. This leads to it being keyed by the name ":<contract>", while the tests try to look it up under the name "<contract>". This change resolves that issue by dropping the ':' in cases where there is, effectively, no source file to prepend anyway.
Throwing a CompilerError on multiple contract definition violates the expectations of the test suite, which thinks that compile() will return false if the code can't compile. This brings contract collision reporting in line with most of the other errors.
Since contracts and libraries only collide if they share a common source file now, this test only works if both libraries are in the same source.
The fully-qualified name of a contract with no source unit is :<Name> instead of just <Name>, so the test system needed to be adjusted accordingly.
Because contracts are uniquely identified by their source unit, there is no need for a unique error for this; it's actually covered by the checker for double-declaration of identifiers.
Using libraries leaves behind a library link reference in the binary which the linker must later resolve. These link references were still being generated by name and not by fully-qualified name. This would lead to a link-time collision between two libraries having the same name but in different source units. This change changes linker symbols over to fully-qualified names, which resolves that issue. This does potentially introduce a new problem, which is that linker symbols appear to be limited to 36 characters and are truncated. Storing paths extends the average symbol size, and it would be great if truncation was from the tail rather than the head.
The library name clash checker throws errors when two libraries of the same name are spotted. In a previous commit, this function was rewritten to use fully-qualified names instead, which makes it redundant to the checker for multiply-declared identifiers. Since it no longer serves a clear purpose, the function is being dropped.
This reverts commit c4a9ca5.
Since libaraies no longer collide on name but on fully-qualified name, you can only induce collision by colliding them as idenfitiers.
Looks like merging up munged line 188 in CommandLineInterface.cpp, so that a string literal was being used where a global variable should be.
This reverts commit f8914c6.
Properly, contracts are now looked up via <source>:<contract> identifiers called "fully qualified names." As a modicum of backward-compatibility, failure on a lookup is now backed up by seeing if the ":" exists at all, and if it doesn't, then the known contracts are scanned for any matching contract name.
Deterministic AST node identifiers.
Add ethereum-git to archlinux dependencies
Refactor json return type generation.
Accept any kind of whitespace after natspec tags
Change translation of implicit throws
Mention in changelog that invalid as an opcode is valid inline assembly
Signed-off-by: VoR0220 <rj@erisindustries.com>
fix for linker wrt binaries generated with import statements
Make standard token compileable.
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.
No description provided.