You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for your contribution. Did the generated code run under strict mode?
IMO we should better always set use strict in the generated code, but I am not confident enough that it would not introduce any compatibility problem nor have any impact on execution speed.
Activity
yosuke-furukawa commentedon Apr 30, 2014
I have found a way to set strict mode in node.js.
--use_strictoption is enabled in node.js runtime.If this option enable, the program become strict mode inspite of
"use strict";or not.kazuho commentedon May 1, 2014
Thank you for your contribution. Did the generated code run under strict mode?
IMO we should better always set
use strictin the generated code, but I am not confident enough that it would not introduce any compatibility problem nor have any impact on execution speed.kazuho commentedon May 14, 2014
FYI The code generated by JSX is not compatible with strict mode. You can see some tests failing in branch: https://github.com/jsx/JSX/tree/kazuho/experiments/use-strict
nyuichi commentedon May 14, 2014
@kazuho
As tested your branch on my environment (v0.11.11), I don't see any warning or test failures. Which test case did you see failing?
kazuho commentedon May 15, 2014
@yosuke-furukawa @wasabiz
Sorry.
You need to run
JSX_RUNJS='node --use_strict' make teston the aforementioned branch (kazuho/experiments/use-strict).I have fixed subtle issues re compatibility with strict mode, but there are still problems.