Code Monkey home page Code Monkey logo

Comments (1)

ramsey avatar ramsey commented on June 9, 2024

I borrowed this from WebKit, but it looks like I might need to rework a few things.

Here are the same lines from WebKit: https://github.com/WebKit/WebKit/blob/6d13b1672d0f7ce5a6f8093e1ed597e0bd0f2cf2/Source/JavaScriptCore/runtime/IntlObject.cpp#L1148-L1152

VariantCode is a uint64_t, while Code is:

  struct Code {
    std::array<LChar, 8> characters{};
  };

And LChar is unsigned char.

I think what's happening here is largely a result of my lack of understanding about that assertion. Maybe WebKit wants to force use of a specific set of compilers where these values would have the same size?

Should I remove the assertions and rely on the compilers to do the right thing, or should I change the data types here to be less specific? Maybe just use uint instead?

from ext.

Related Issues (3)

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.