-
Notifications
You must be signed in to change notification settings - Fork 921
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
Improve cross platform comparability for quickjs. #49
Conversation
I'd love to see this upstream, but FYI: you have to send your patch to the mailing list here: https://www.freelists.org/list/quickjs-devel. PRs are not accepted. |
Ah, I see you already did so. |
And I also see you added a CMake config. I'm doubtful that would be accepted. |
9411890
to
1a921e5
Compare
So we use a >> (LIMB_BITS - shift) instead, as a is 64 bit width. Signed-off-by: Yonggang Luo <[email protected]>
[main] Building folder: quickjs [build] Starting build [proc] Executing command: "C:\Program Files\CMake\bin\cmake.EXE" --build c:/work/study/languages/typescript/quickjs/build/Release-win32-x86 --config Release --target all -- -j 34 [build] [1/5 20% :: 0.259] Building C object CMakeFiles\quickjs.dir\quickjs.c.obj [build] FAILED: CMakeFiles/quickjs.dir/quickjs.c.obj [build] C:\PROGRA~2\MICROS~1\2019\BUILDT~1\VC\Tools\MSVC\1428~1.293\bin\Hostx64\x86\cl.exe /nologo -DCONFIG_BIGNUM=\"1\" -DCONFIG_VERSION=\"2020-11-08\" -I. -I..\..\ /DWIN32 /D_WINDOWS /W3 /MD /O2 /Ob2 /DNDEBUG -wd4244 -wd4996 -wd4018 -wd4146 -wd4013 -std:c11 /showIncludes /FoCMakeFiles\quickjs.dir\quickjs.c.obj /FdCMakeFiles\quickjs.dir\quickjs.pdb /FS -c ..\..\quickjs.c [build] ..\..\quickjs.c(41704): error C2099: initializer is not a constant [build] ninja: build stopped: subcommand failed. [build] Build finished with exit code 1
using snprintf instead. Signed-off-by: Yonggang Luo <[email protected]>
…out init. Give it a init value Signed-off-by: Yonggang Luo <[email protected]>
'type cast': cannot convert from 'JSValue' to 'JSValue' JSValueConstCast are not necessary because there is no need of cast when converting type from const void* to void*
f72176c
to
731f325
Compare
test262/test/built-ins/Math/asinh/asinh-specialVals.js:11: Test262Error: Math.asinh should produce +0 for +0 Expected SameValue(«-Infinity», «Infinity») to be true test262/test/built-ins/Math/asinh/asinh-specialVals.js:11: strict mode: Test262Error: Math.asinh should produce +0 for +0 Expected SameValue(«-Infinity», «Infinity») to be true test262/test/built-ins/Math/atanh/atanh-specialVals.js:21: Test262Error: Math.atanh should produce -0 for -0 Expected SameValue(«Infinity», «-Infinity») to be true test262/test/built-ins/Math/atanh/atanh-specialVals.js:21: strict mode: Test262Error: Math.atanh should produce -0 for -0 Expected SameValue(«Infinity», «-Infinity») to be true
8a88c72
to
4861160
Compare
Move all platform related functions into quickjs-port.h and quickjs-port.c Add full msvc support. BOOL conflict with Windows.h, do not define it in header file, define it in c file directly Now run-test262 pass all tests match unix platform after add atomic/thread support on win32 by using quickjs-port.h win/stdatomic.h comes from https://github.com/cdschreiber/c11 win/dirent.h comes from https://github.com/tronkko/dirent win/getopt.h comes from mingw Now `make test2-update` passed all tests under msys2/mingw Add worker support in qjs on win32 Fixes tests on win32 as much as possible Signed-off-by: Yonggang Luo <[email protected]>
I've inadvertently done the same work in my own pull request... Needless to say that I fully endorse this one, as it seems to be cleaner and better tested! |
FYI, you can get the patch file by adding .patch to a pull req, eg. https://github.com/bellard/quickjs/pull/49.patch |
Implement vm.resolve(promiseLikeHandle)
Split quickjs-port.h out
Add msvc support.
Add cmake building system.
Signed-off-by: Yonggang Luo [email protected]
Signed-off-by: Robikz [email protected]