Skip to content
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

[WIP] core:odin/frontend #2960

Draft
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

DragosPopse
Copy link
Contributor

This is the beginning of the WIP core:odin/frontend package. I will be starting working on it tomorrow, but I want to have a high level plan here written for everyone to see, and have the progress visible for everyone to review.

Plans:

  • merge core:odin/ast core:odin/parser core:odin/tokenizer under the new core:odin/frontend
  • add missing checker
  • Modify core:odin/ast types to include information about type checking, acording to the C++ compiler
  • Do a mostly line-by-line translation of the check*.cpp files into odin code

Conversion rules (To be added as discovered):

  • union + enum tag from C++ will be replaced by odin's tagged union
  • StringMap replaced by map[string]T
  • PtrSet replaced by map[^T]bool
  • PtrMap TBD
  • Any std::atomic variable will be prefixed by atomic_, as there is not a dedicated type in odin
  • BlockingMutex will be sync.Mutex
  • RwMutex will be sync.RW_Mutex
  • RecursiveMutex will be sync.Recursive_Mutex
  • Ast will be renamed to Node
  • Refactor to follow odin's Ada_Case types, snake_case procs.

Missing features in core (to be added as found):

  • mpsc_queue mpmc_queue: this seems to be required for some of the multithreading optimization. These can potentially be added as part of this pull request, in core:container/queue/mpsc or core:container/mpsc_queue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant