Coder Social home page Coder Social logo

Comments (2)

jasonwilliams avatar jasonwilliams commented on April 26, 2024 1

V8 representation of primitive values:
https://cs.chromium.org/chromium/src/v8/src/objects/js-objects.h?rcl=fe77d58a6a3cd9385454aa0bc29330ec668e293a&l=1236-1252

Unboxing in Spidermonkey:
https://searchfox.org/mozilla-central/source/js/src/vm/JSObject.cpp#4198-4220

ChakraCore:
https://github.com/microsoft/ChakraCore/blob/4565a28e899322e364ee1a204f1e1a6c17aa5269/lib/Runtime/Language/JavascriptConversion.cpp#L221-L265


SpiderMonkey js::getProperty()
https://searchfox.org/mozilla-central/rev/928742d3ea30e0eb4a8622d260041564d81a8468/js/src/vm/Interpreter.cpp#4438-4493
Spidermonkey have a js::getProperty method which checks if a JSValue is a primitive, if it is it will get the proto of its object equivalent and use that.

They also cache this value so it can be used again, but the cache never gets cleared.
https://searchfox.org/mozilla-central/source/js/src/vm/GlobalObject.h#207-211

This is quite a different approach from V8 who create wrapper objects and use them

from boa.

jasonwilliams avatar jasonwilliams commented on April 26, 2024

Fixed by jasonwilliams#86

from boa.

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.