Commit graph

698 commits

Author SHA1 Message Date
The Ghost of FOSS' Future
4471e8c960
Update qjs.c 2025-01-09 00:55:15 +00:00
The Ghost of FOSS' Future
368edcad72
Update qjs.c 2025-01-09 00:53:06 +00:00
The Ghost of FOSS' Future
31447efe69
Update qjs.c 2025-01-09 00:51:59 +00:00
The Ghost of FOSS' Future
02c03f6a01
Update qjs.c 2025-01-09 00:48:26 +00:00
The Ghost of FOSS' Future
78a733fdc3
Update qjs.c 2025-01-09 00:47:30 +00:00
The Ghost of FOSS' Future
c5a8c04c50
Update qjs.c 2025-01-09 00:45:48 +00:00
The Ghost of FOSS' Future
5fd2efe534
Update qjs.c 2025-01-09 00:43:27 +00:00
The Ghost of FOSS' Future
2cb4872308
Update qjs.c 2025-01-09 00:40:50 +00:00
The Ghost of FOSS' Future
c47ebab939
Update qjs.c 2025-01-09 00:39:11 +00:00
The Ghost of FOSS' Future
7f9a72d70c
Update qjs.c 2025-01-09 00:36:32 +00:00
The Ghost of FOSS' Future
ecce83d642
Update qjs.c 2025-01-09 00:34:58 +00:00
The Ghost of FOSS' Future
cb6fce1b84
Update qjs.c 2025-01-09 00:34:19 +00:00
The Ghost of FOSS' Future
178998f808
Update qjs.c 2025-01-09 00:33:37 +00:00
The Ghost of FOSS' Future
68d1773417
Update qjs.c 2025-01-09 00:32:51 +00:00
The Ghost of FOSS' Future
e5fb17e956
Update qjs.c 2025-01-09 00:30:29 +00:00
The Ghost of FOSS' Future
0440d400af
Update qjs.c 2025-01-09 00:26:20 +00:00
The Ghost of FOSS' Future
2639ec1199
Update qjs.c 2025-01-09 00:24:29 +00:00
The Ghost of FOSS' Future
47a857309f
Update qjs.c 2025-01-08 23:01:43 +00:00
The Ghost of FOSS' Future
168dfe4d09
Update qjs.c 2025-01-08 23:00:34 +00:00
The Ghost of FOSS' Future
2cb01b10a4
Update qjs.c 2025-01-08 22:59:06 +00:00
The Ghost of FOSS' Future
c4c48bf47b
Update repl.js 2025-01-08 22:53:12 +00:00
The Ghost of FOSS' Future
c8d48b3937
Merge branch 'quickjs-ng:master' into master 2025-01-08 22:45:11 +00:00
Saúl Ibarra Corretgé
97ea19dc81 Simplify exiting interpreter with exception
- Avoid keeping the exception object around
- Avoid passing the responsibility of freeing the exeption object to the
  caller
2025-01-08 21:37:49 +01:00
Ivan Komissarov
6d64933328
Add JS_IsRegExp function (#804) 2025-01-08 21:29:41 +01:00
Ivan Komissarov
36e3513d4e
Add JS_IsDate function (#803) 2025-01-08 21:29:05 +01:00
Ivan Komissarov
0fb7f4e208
Make js_get_stack_pointer more portable (#793)
By using code from LLVM.

3f79057338/clang/lib/Basic/Stack.cpp (L23-L38)
2025-01-08 19:56:43 +01:00
Ben Noordhuis
291eb9c5db
Remove test_conv.c (#800)
We only build it, we never run it, and it's fairly slow to build. It's
an almost verbatim copy of a sizable part of cutils.c that _is_ tested
so let's just remove it.

Fixes: https://github.com/quickjs-ng/quickjs/issues/788
2025-01-07 23:23:37 +01:00
Saúl Ibarra Corretgé
4b8057d512 Exit qjs on unhandled promise rejections
Fixes: https://github.com/quickjs-ng/quickjs/issues/790
2025-01-07 21:27:17 +01:00
The Ghost of FOSS' Future
86e6084fa9
Merge branch 'quickjs-ng:master' into master 2025-01-07 14:09:55 -06:00
Ivan Komissarov
84d11c4f69 Fix missing calls to va_end in libunicode 2025-01-07 18:09:22 +01:00
ialex32x
af16390b85 Update projects.md to include GodotJS 2025-01-07 06:49:21 +01:00
The Ghost of FOSS' Future
710866995b
add more polyfills 2025-01-06 19:28:30 -06:00
The Ghost of FOSS' Future
5d1cb14683
move globals back 2025-01-06 15:55:44 -06:00
The Ghost of FOSS' Future
f9809db69a
Add files via upload 2025-01-06 15:50:00 -06:00
The Ghost of FOSS' Future
30c9be7281
Update .gitignore 2025-01-06 15:49:23 -06:00
The Ghost of FOSS' Future
f95ffee992
Update .gitignore 2025-01-06 15:32:02 -06:00
The Ghost of FOSS' Future
4d17eb56ad
Update qjs.c 2025-01-06 15:31:15 -06:00
The Ghost of FOSS' Future
3984d3de14
fix shitty replace job 2025-01-06 15:28:28 -06:00
The Ghost of FOSS' Future
36c5ea0dae
moves repl polyfills to repl script 2025-01-06 15:24:12 -06:00
The Ghost of FOSS' Future
9658079b1a
Update README.md 2025-01-06 14:57:19 -06:00
The Ghost of FOSS' Future
16152fc0ce
Update README.md 2025-01-06 14:56:06 -06:00
The Ghost of FOSS' Future
febcddc3f2
Update LICENSE 2025-01-06 14:27:42 -06:00
The Ghost of FOSS' Future
ea54439877
Update qjsc.c 2025-01-06 14:26:21 -06:00
The Ghost of FOSS' Future
44fa5dbf60
Update qjs.c 2025-01-06 14:25:39 -06:00
Ben Noordhuis
ac4cd17bb5
Track line and column numbers for expressions (#781)
Commit 73cc00e reduced the number of emitted source locations a great
deal but it resulted in at least one observable regression:

    export default async function f() {
         return "abc" + x
    }
    f() // ReferenceError should point to 2:20 but pointed to 1:1

Emit source locations for expressions again. Increases the average
number of source locations by about 15%. Non-scientifically tested
by counting source locations emitted when parsing the test suite
before and after.

No test because we currently cannot easily test stack traces coming
from module imports.

Fixes: https://github.com/quickjs-ng/quickjs/issues/779
2025-01-05 22:20:43 +01:00
Ben Noordhuis
5b609f15af
Optimize derived class construction (#753)
We were emitting gobs of inefficient bytecode that created an arguments
array on the stack, then applied it to the parent constructor.

Add a new opcode for initializing a derived class. Speeds up construction
by 500%, although sadly that is not visible in the web-tooling-benchmark,
only in micro-benchmarks.

Fixes: https://github.com/quickjs-ng/quickjs/issues/752
2025-01-05 22:01:37 +01:00
Ben Noordhuis
6e434008f5
Fix -Wunterminated-string-initialization warning (#787)
Unbreaks the Cygwin build.
2025-01-05 21:42:18 +01:00
gschwind
1b957f71e3
Fix JS_NewClassID comment (#784) 2025-01-05 20:46:21 +01:00
lai
b675a95bec Expose JS_HasException API (#785) 2025-01-05 11:08:37 +01:00
guest271314
9fc794001a
Update cli.md (#783) 2025-01-04 09:56:10 +01:00