Git Product home page Git Product logo

Comments (1)

DavidDeSimone avatar DavidDeSimone commented on May 13, 2024

Thinking this over, specifically handing over allocation to the v8 GC, one of the issues I am having is that the rusty_v8 doesn't have great bindings for finalizer callbacks, and as far as I can tell, FinalizationRegistry is broken in Deno due to their implementation of microtasks. I could give a deep dive into Deno to fix up FinalizationRegistry, but I am hesitant on that.

Luckily for us, WeakRefs work. The main issue is that once a proxy is GC'd, we need some way to know about that in order to call free on its associated proxy'd memory (read its internal field). We can do this purely with WeakRefs and a timer (have a native array of allocations, and an array of WeakRefs. Perform a comparison between the two and free everything not in the WeakRef array), however that is honestly kind of hacky to me, and takes away from the power of the v8 GC.

I think there are a lot of benefits to the lisp -> js compiler, however before we switch allocation to purely v8, the first thing we would need to work out is the finalization callbacks. Unfortunately for us, Deno does not using the proxying technique very much, so some of these code paths have issues.

from emacs-ng.

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.