镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

jitless nodejs #28800

Description

@darkmoon233

We know v8 supports JavaScript execution without allocating executable memory at runtime.Is there any way i can use this feature in nodejs ?

I'm working for some benchmarks about wasm. I really need know whether node use jit when run wasm.

Activity

  1. targos commented on Jul 22, 2019

    @targos
    Member

    You can enable JIT-less mode by running Node.js with the --jitless flag: node --jitless script.js

  2. darkmoon233 commented on Jul 22, 2019

    @darkmoon233
    Author

    I run node --jitless scripts.js and get an error: node: bad option: --jitless.
    My node version is v10.16.0, my operation system is Ubuntu 18.042 LTS.

  3. targos commented on Jul 22, 2019

    @targos
    Member

    It is only available since Node.js 12.0.0

  4. targos commented on Jul 22, 2019

    @targos
    Member

    I think this is answered, but feel free to comment if you have more questions.

  5. darkmoon233 commented on Jul 23, 2019

    @darkmoon233
    Author

    It can't work when the Javascript file references a wasm file.

    Some code about referencing a wasm file.

    var wasmBinaryFile = 'a.out.wasm';
    if (!isDataURI(wasmBinaryFile)) {
      wasmBinaryFile = locateFile(wasmBinaryFile);
    }
    

    I use emscritpten to compile my C++ file to JavaScript. Node.js can run the JavaScript file without --jitless.If i use command like node --jitless a.out.js ,i will get an error node: bad option: --jitless.

    Is that mean Node.js can't deal with wasm without jit?

  6. devsnek commented on Jul 23, 2019

    @devsnek
    Member

    That means you're still not on a version of node that supports jitless. Also worth noting, the WebAssembly global is removed in jitless mode because the wasm interpreter is not ready for production yet.

  7. darkmoon233 commented on Jul 23, 2019

    @darkmoon233
    Author

    Does this mean that no version of node is currently supported by wasm running without jit?

  8. devsnek commented on Jul 23, 2019

    @devsnek
    Member

    @darkmoon233 correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions