Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: emit warnings from V8 #24365

Merged
merged 1 commit into from
Nov 16, 2018
Merged

Conversation

devsnek
Copy link
Member

@devsnek devsnek commented Nov 14, 2018

Currently the only place V8 does this is asm.js compilation:

function AsmModule() {
  'use asm';

  function add(a, b) {
    a = a | 0;
    b = b | 0;

    // should be `return (a + b) | 0;`
    return a + b; // (node:18940) V8: test.js:9 Invalid asm.js: Invalid return type
  }

  return { add: add };
}

In chromium:

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Nov 14, 2018
@devsnek devsnek added the v8 engine Issues and PRs related to the V8 dependency. label Nov 14, 2018
@targos
Copy link
Member

targos commented Nov 14, 2018

Is it testable? Maybe with a message test?

Copy link
Member

@addaleax addaleax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind adding the test case from the PR description as a test here?

src/node.cc Outdated Show resolved Hide resolved
@devsnek
Copy link
Member Author

devsnek commented Nov 14, 2018

@targos @addaleax tests added 👍

@devsnek
Copy link
Member Author

devsnek commented Nov 14, 2018

Copy link
Contributor

@refack refack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

src/node.cc Show resolved Hide resolved
src/node.cc Show resolved Hide resolved
@refack refack added the wasm Issues and PRs related to WebAssembly. label Nov 14, 2018
@devsnek devsnek removed the wasm Issues and PRs related to WebAssembly. label Nov 14, 2018
@refack
Copy link
Contributor

refack commented Nov 14, 2018

refack added the wasm label

I know it's not wasm but it's the most relevant label.

@devsnek devsnek added the asm.js label Nov 14, 2018
Copy link
Member

@joyeecheung joyeecheung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would probably be even better if ProcessEmitWarningGeneric is less generic on the C++ side and we can just do the overload in JS...but anyway LGTM

(off-topic: we have a wasm label? AND a asm.js label? and they are both green?)

src/node.cc Outdated Show resolved Hide resolved
@refack
Copy link
Contributor

refack commented Nov 14, 2018

a wasm label? AND a asm.js label? and they are both green

The asm.js is brand new. And like their subjects, if you look from a distance they look the same ;)

src/node.cc Outdated Show resolved Hide resolved
src/node.cc Outdated Show resolved Hide resolved
src/node.cc Show resolved Hide resolved
src/node.cc Show resolved Hide resolved
@devsnek
Copy link
Member Author

devsnek commented Nov 14, 2018

CI https://ci.nodejs.org/job/node-test-pull-request/18619/

PR-URL: nodejs#24365
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
@devsnek devsnek merged commit e1aa730 into nodejs:master Nov 16, 2018
@devsnek devsnek deleted the feature/v8-warnings branch November 16, 2018 15:19
targos pushed a commit that referenced this pull request Nov 18, 2018
PR-URL: #24365
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
@codebytere
Copy link
Member

codebytere commented Jan 12, 2019

@devsnek do you think that this can/should be backported to v10.x? I added the label but feel free to remove!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. v8 engine Issues and PRs related to the V8 dependency.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants