forked from NomicFoundation/slang
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Perf metrics #2
Draft
beta-ziliani
wants to merge
88
commits into
main
Choose a base branch
from
perf-metrics
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Perf metrics #2
Conversation
This file contains 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
…e-or-more operator
- `string` and `bytes` are exported as built-in variables resolving to types that provide a `concat` function - `address` can be used as a function to cast a parameter to `address` to eg. retrieve the balance
This makes resolving to attached functions on types even when the reference of those types happen in a different lexical scope.
And also provide alternative paths with and without propagating the dynamic scope. Otherwise, since scope accumulate on the stack it's possible we'll need to resolve an attached function with the wrong dynamic scope at the top of the scope stack.
Both contracts and libraries can optionally push the dynamics scope when traversing to the parent lexical scope (ie. the source unit). But for libraries, they can also optionally push their name to correctly bind internal types which were extended (with `using`) by their qualified name (ie. `Lib.Type`).
Applying a function call with a type will always return a value of that type, so a symbol stack `type,()` is equivalent to `type,@typeof`. Reflect on the binding entry point of the using clause.
These are parsed as modifiers, and they need a similar treatment as parent constructor calls in new constructor definitions.
The ResolverCandidates will insert arbitrary edges to the graph connecting to the extension scopes determined available at the beginning of resolution (these are context dependent) when reaching nodes marked as extension hooks (usually the source unit's lexical scope).
There's an initial dual purpose: - make resolution reentrant-safe, as some of the resolution tweaks require resolving references themselves - enable recursive lookup of extension scopes for Solidity < 0.7.0
Since extensions are now injected during the resolution phases, it's no longer needed to have a separate extended scope. This simplifies the existing rules quite a bit. Also removes all previous commented out rules that dealt with pushing the extension scope to the scope stack, since that mechanism is no longer used.
Instead of having to manually customize the resolver. Also, simplify `ResolveOptions` to an enum with two possible values: `Full` and `NonRecursive`. `NonRecursive` is used internally from `simple_resolve` to disable code paths that could lead to infinite recursions when attempting to resolve a reference.
Since the built-ins file needs to be pre-processed to transform the symbols as to ensure no conflicts can occur with user code, adding the built-ins requires a couple of manual steps that were replicated in every construction of Solidity bindings API. By encapsulating this functionality in the `slang_solidity` crate we remove a source of user error and make it easier to make changes to the built-ins ingestion code.
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.