Commit Graph

10 Commits

Author SHA1 Message Date
Sameer Rahmani 851595ca7d Change the current namespace lookup behavior
* Change the way namespace creation works. We should create new
  namespaces via the context so we can insert them in the contenxt

* Change the way setting the current namespace works. `withCurrentNS`
  method gets a function as input param and a ns name and runs the
  function with the ns set as the current NS and restore the state
  after that

* Change the way Dylibs register with the context and namespaces
  and lookup the dylibs will use the context to use the most recent
  dylib of a namespace.
2022-01-02 18:57:36 +00:00
Sameer Rahmani b6ac7f3f5f Add the ast layer to the jit 2021-11-19 00:41:28 +00:00
Sameer Rahmani b1ce34db75 Fix the assert condition on getRootEnv 2021-11-17 17:50:09 +00:00
Sameer Rahmani b3d1151a8b Refactor the semantic analyzer to use the analysis state
* Refactor the semantic analyzer to use the new state struct
  which is just bunch of refs to the current ns and current env

* Add the `environments` vector to ns to store the environments
  and few helper functions to use it

* Add the `symbolList` (need a better name) to keep track of what
  symbols might be added to the namespace after calling `addTree`.
2021-11-17 17:37:45 +00:00
Sameer Rahmani 34d3513426 Start the new jit 2021-11-01 15:09:11 +00:00
Sameer Rahmani fc11896c28 Add the read and print functionality to the repl 2021-10-24 23:34:28 +01:00
Sameer Rahmani bedaaba46f Fix namespace and src mgr tidy issues 2021-10-17 12:14:04 +01:00
Sameer Rahmani e5c5a68128 Clean up the slir lowering impl 2021-10-16 16:15:56 +01:00
Sameer Rahmani 54d85eac94 Fix the memory leak on pass failure in the namespace generate function 2021-10-06 21:07:56 +01:00
Sameer Rahmani a174a3a342 Refactor the cmake script and move the binary into its own package 2021-09-28 17:11:50 +01:00
Renamed from src/serene/namespace.cpp (Browse further)