Giter VIP home page Giter VIP logo

Comments (6)

vivekascoder avatar vivekascoder commented on September 22, 2024

Maybe I've do the later, something similar to https://github.com/EricLBuehler/Kestrel-Programming-Language/blob/37e0aa92dc4caade16e143b3f0484ef16c1320c9/src/codegen/mod.rs#L66C1-L78C1

from inkwell.

EricLBuehler avatar EricLBuehler commented on September 22, 2024

Yes, this is what I did. I just store the pointer to the binding.
However, you must be careful to not reference it after it goes out of scope (use after free).
In my newer programming language (Kestrel, which is not Kestrel Programming Language :) ), I set the name of all instructions and blocks to "". This allows Inkwell to automatically number all elements.

from inkwell.

EricLBuehler avatar EricLBuehler commented on September 22, 2024

In summary, you have to store some sort of Namespace struct that contains the type, name and pointer value of the binding.

from inkwell.

vivekascoder avatar vivekascoder commented on September 22, 2024

I see, can you share the link to the repo of "Kestrel", I want to see some reference impl. Also where can I text you if I want to ask questions?

from inkwell.

EricLBuehler avatar EricLBuehler commented on September 22, 2024

Of course, here it is: https://github.com/EricLBuehler/kestrel.
If you have any questions, feel free to raise an issue!

from inkwell.

EricLBuehler avatar EricLBuehler commented on September 22, 2024

You might notice that I have implemented a MIR - my own LLVM-esque code. It allows the borrow checker I wrote to analyze the code.

from inkwell.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.