You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nikomatsakis opened this issue
Jan 12, 2012
· 3 comments
Assignees
Labels
A-codegenArea: Code generationA-runtimeArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsC-cleanupCategory: PRs that clean code up or issues documenting cleanup.E-hardCall for participation: Hard difficulty. Experience needed to fix: A lot.
I would like to do away with the shape code and instead have the compiler generator "visitor glue", which is glue code that walks the data structure and invokes methods on a visitor. The methods would be encoded as a struct of functions. This could replace the logging, universal equality, and other functions of glue code. If it's fast enough, we may be able to replace the take, drop, and free glue with visitor glue, but if not, we could at least tie the code generation together so that they are all driven from the same codebase.
The text was updated successfully, but these errors were encountered:
There are three facets to this: equality, logging, and cycle collection. For comparison, shape code is currently used only for != and pattern matching of strings. For logging and cycle collection, it's used everywhere.
The fix for comparison is to add ne to the Eq trait and to make pattern matching of strings call into a magic string comparison lang-item.
The fix for logging is to make logging call into a magic lang-item that uses the visitor glue. (It should eventually be a macro.)
The fix for cycle collection is to either replicate the cycle collector with visitor glue or to switch to a conservative garbage collector for @ boxes.
A-codegenArea: Code generationA-runtimeArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsC-cleanupCategory: PRs that clean code up or issues documenting cleanup.E-hardCall for participation: Hard difficulty. Experience needed to fix: A lot.
I would like to do away with the shape code and instead have the compiler generator "visitor glue", which is glue code that walks the data structure and invokes methods on a visitor. The methods would be encoded as a struct of functions. This could replace the logging, universal equality, and other functions of glue code. If it's fast enough, we may be able to replace the take, drop, and free glue with visitor glue, but if not, we could at least tie the code generation together so that they are all driven from the same codebase.
The text was updated successfully, but these errors were encountered: