| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
WalkthroughThe changes update the PyFunction struct to include a builtins field and modify its constructor to initialize this field using the provided globals or context. The constructor now returns a PyResult. Python-level construction of PyFunction is enabled via a new argument struct and trait implementation. Related adjustments are made in function creation logic, removing explicit attribute settings and module retrieval. A test decorator marking expected failure was removed. Changes
Sequence Diagram(s)sequenceDiagram
participant VM as VirtualMachine
participant Frame as ExecutingFrame
participant PyFunc as PyFunction
Frame->>VM: Request to create PyFunction (with code, globals, etc.)
VM->>PyFunc: Call PyFunction::new(...) with vm reference
PyFunc->>PyFunc: Initialize builtins from globals or VM context
PyFunc-->>VM: Return new PyFunction or error
VM-->>Frame: Push PyFunction to stack
Poem
📜 Recent review details Configuration used: CodeRabbit UI Reviewing files that changed from the base of the PR and between edb7934 and 67dbf42. 📒 Files selected for processing (3)
vm/src/builtins/function.rs (6)✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. ❤️ Share 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (.coderabbit.yaml)
Documentation and Community
|
Sorry, something went wrong.
| // let name = qualname.as_str().split('.').next_back().unwrap(); | ||
| // func.set_attr(identifier!(vm, __name__), vm.new_pyobj(name), vm)?; | ||
| // func.set_attr(identifier!(vm, __qualname__), qualname, vm)?; | ||
| // func.set_attr(identifier!(vm, __doc__), doc, vm)?; |
There was a problem hiding this comment.
check if this is required
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary by CodeRabbit
New Features
Bug Fixes
Refactor
Tests