Repository navigation
internal check macros don't work #19503
Description
Activity
@targos interesting, I didn't observe that behaviour while testing. as it is the code is taken from v8's JS2C script so I don't know much about its specific workings. I can try to take a look later today.
@targos i can't reproduce this.
I just checked this and I am able to reproduce the problem.
CHECK(condition); CHECK_EQ(condition, true); DCHECK(condition); DCHECK_EQ(condition, true); // Becomes do { if (!(condition)) (process._rawDebug("CHECK: condition == true"), process.abort()) } while (0); CHECK((condition) === (true)); void(condition); void(condition, true);
- addedconfirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.
on Apr 12, 2018 i'm still unable to reproduce this 😕
How did you try to reproduce this so far?
I tried your inputs above but got the expected results out.
I still have this problem.
Can you try to reproduce with the following branch?
https://github.com/targos/node/tree/net-check-family$ out/Release/node test/parallel/test-http-localaddress-bind-error.js net.js:884 CHECK((addressType) !== (undefined)); ^ ReferenceError: CHECK is not defined at internalConnect (net.js:884:5) at defaultTriggerAsyncIdScope (internal/async_hooks.js:294:19) at GetAddrInfoReqWrap.emitLookup [as callback] (net.js:1080:9) at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:55:10)Ping @targos ... is this still an issue for you? I'm unable to reproduce.
Given the lack of a follow up, I'm going to close this out. Please feel free to reopen if you believe I've made a mistake and this is still an existing issue.
This code:
Is transformed to:
This results in a runtime
ReferenceError: CHECK is not defined. Macros should be expanded recursively./cc @devsnek