forked from traefik/yaegi
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Stack #1
Open
breadchris
wants to merge
20
commits into
cogentcore:master
Choose a base branch
from
breadchris:stack
base: master
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.
Open
Stack #1
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
By placing a handle value on several strategic calls in the runtime we can then later parse a runtime stacktrace, look for the magic values in function parameters, and reconstruct the calling nodes. We can use that to filter out all the yaegi runtime calls and present the user with a stacktrace that includes only interpreted frames.
this makes the filtered stack look identical to the regular go stacktrace
this allows calling code to interchange both types
interpreter may be entered (for example) from genFunctionWrapper
When a panic happens, we want to get the stack trace from the oldest panic, before runCfg unwinds everything. However, at that point we don't know yet whether we will be recovered. As a silly kludge, currently storing the oldest panic in a list on the Interpreter struct which can then be queried once we're ready. The approach taken is not strictly correct: if a panic is recovered, and never queried, and later the same error occurs again and then is not recovered, the wrong call stack will be returned.
… conversion nil guard
…ic_test.go with additional test cases. hopefully that's the end of it..
… wrappers A side effect of traefik#1281 is that it added unnecessary additional newlines in generated interface wrappers from the `extract` tool. This PR removes those newlines from the extract tool template and updates the generated code with that change.
Follow by the [Spec](https://go.dev/ref/spec#Assignment_statements): The number of operands on the left hand side must match the number of values. For instance, if f is a function returning two values `x, y = f()` assigns the first value to x and the second to y. In the second form, the number of operands on the left must equal the number of expressions on the right, each of which must be single-valued, and the nth expression on the right is assigned to the nth operand on the left. Fixes traefik#1606
…nction This fixes issue traefik#1634 includes special case for defer function. I could remove or significantly reduce the comment description, and just have that here for future reference: // per traefik#1634, if v is already a func, then don't re-wrap! critically, the original wrapping // clones the frame, whereas the one here (below) does _not_ clone the frame, so it doesn't // generate the proper closure capture effects! // this path is the same as genValueAsFunctionWrapper which is the path taken above if // the value has an associated node, which happens when you do f := func() ..
Generic func
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.