Title: Relocate object protocol implementation from vm · Issue #3324 · RustPython/RustPython · GitHub
Open Graph Title: Relocate object protocol implementation from vm · Issue #3324 · RustPython/RustPython
X Title: Relocate object protocol implementation from vm · Issue #3324 · RustPython/RustPython
Description: For now, Object protocol methods are (mostly) thin wrapper of matching vm functions. Because we don't need to have duplicated functions for same features, they need to be moved from vm to object protocol functions. vm path: vm/src/vm.rs ...
Open Graph Description: For now, Object protocol methods are (mostly) thin wrapper of matching vm functions. Because we don't need to have duplicated functions for same features, they need to be moved from vm to object pr...
X Description: For now, Object protocol methods are (mostly) thin wrapper of matching vm functions. Because we don't need to have duplicated functions for same features, they need to be moved from vm to objec...
Opengraph URL: https://github.com/RustPython/RustPython/issues/3324
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Relocate object protocol implementation from vm ","articleBody":"For now, Object protocol methods are (mostly) thin wrapper of matching vm functions. Because we don't need to have duplicated functions for same features, they need to be moved from vm to object protocol functions.\r\n\r\n- `vm` path: `vm/src/vm.rs`\r\n- object protocol path: `vm/src/protocol/object.rs`\r\n\r\nThe matching vm functions are easy to find because object methods are calling it.\r\n\r\n- [x] get_attr #3331\r\n- [x] set_attr #3338\r\n- [x] del_attr #3341\r\n- [x] rich_compare #3347\r\n- [x] repr #3364\r\n- [x] str #3349 \r\n- [x] is_subclass #3345\r\n- [x] is_instance #3344 \r\n- [x] hash #3342\r\n- [x] length #3343\r\n\r\nBecasue relocating each function will cause many code editing, every new PR for each function is recommended for easier review.\r\n\r\nReference:\r\n- #3306: The original patch to add object protocol ","author":{"url":"https://github.com/youknowone","@type":"Person","name":"youknowone"},"datePublished":"2021-10-16T18:18:21.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/3324/RustPython/issues/3324"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c537f7c4-4e6f-6aae-d44a-dde882adfc88 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C664:34D83D:79A8ED:A100AA:696B4BD1 |
| html-safe-nonce | 6c720e9b4ab34e788294217ceda1558ff0f7fa77cb6574702d93141e5a4ea8f5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNjY0OjM0RDgzRDo3OUE4RUQ6QTEwMEFBOjY5NkI0QkQxIiwidmlzaXRvcl9pZCI6Ijg1MTc1ODkyNDEyMTY4NDY4MDEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 34d6de716b2b8f91b14fafec7f62e601d41d491ff61211abc3a5145074a9a38f |
| hovercard-subject-tag | issue:1028114784 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/RustPython/RustPython/3324/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1c4468b975d9ef39c1e50a87c8b4a0247817240710aae00c11ec325559859b9c/RustPython/RustPython/issues/3324 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1c4468b975d9ef39c1e50a87c8b4a0247817240710aae00c11ec325559859b9c/RustPython/RustPython/issues/3324 |
| og:image:alt | For now, Object protocol methods are (mostly) thin wrapper of matching vm functions. Because we don't need to have duplicated functions for same features, they need to be moved from vm to object pr... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | youknowone |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| go-import | github.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git |
| octolytics-dimension-user_id | 39710557 |
| octolytics-dimension-user_login | RustPython |
| octolytics-dimension-repository_id | 135201145 |
| octolytics-dimension-repository_nwo | RustPython/RustPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 135201145 |
| octolytics-dimension-repository_network_root_nwo | RustPython/RustPython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width