Commit graph

16 commits

Author SHA1 Message Date
Ben Noordhuis
c7ca3febd3
Don't serialize IC opcodes (#334)
Translate IC opcodes to their non-IC variants before writing them out.
Before this commit they were not byte-swapped properly, breaking the
ability to load serialized bytecode containing ICs on systems with
different endianness. Inline caches are recomputed as needed now.

A pleasing side effect of this change is that serialized bytecode is,
on average, a little smaller because fewer atoms are duplicated now.
2024-03-27 12:07:11 +01:00
Saúl Ibarra Corretgé
e5812862f9 Fix 'return' handling with 'yield' in 'for of' or with finally blocks
Ref: 4bb8c35da7
2023-12-14 11:49:14 +01:00
Ben Noordhuis
bace4f635e
Record source column positions (#193)
And:
- display them in stack traces
- expose them as Function.prototype.columnNumber

OP_line_num is renamed to OP_source_loc and the pc2line data structure
is extended with the column number in zigzag encoding.

The bytecode version number BC_VERSION is incremented because pc2line
data is read and written by JS_ReadObject() and JS_WriteObject() when
it is present.

Fixes: https://github.com/quickjs-ng/quickjs/issues/149
2023-12-11 22:36:13 +01:00
Saúl Ibarra Corretgé
9539e3cc65 Fix private field setters
Ref: 55a4878a60
2023-12-07 22:21:48 +01:00
Divy Srivastava
6b78c7f3e1
Implement polymorphic inline caches (#120) 2023-11-29 09:12:02 +01:00
Ben Noordhuis
f404980ec0
Add fused get_loc0_loc1 opcode (#55)
get_loc0 and get_loc1 are individually very frequent opcodes _and_ they
are very often paired together, making them ideal candidates for opcode
fusion.

Reduces microbench.js running time by about 4%.
2023-11-13 00:54:13 +01:00
Ben Noordhuis
e8ff1f4a3a
Remove broken SHORT_OPCODES=0 build mode (#49) 2023-11-12 13:35:41 +01:00
Ben Noordhuis
162a8b7409
Remove trailing whitespace (#46)
Not purely cosmetic because it breaks navigation with { and } in the
One True Editor.
2023-11-12 10:01:40 +01:00
Ben Noordhuis
38f88c0898
Remove CONFIG_BIGNUM, always enable BigInt (#34)
Fixes: https://github.com/quickjs-ng/quickjs/issues/17
2023-11-10 16:09:54 +01:00
Ben Noordhuis
e449cb08ef
Remove BigFloat (#31)
Part of https://github.com/quickjs-ng/quickjs/issues/17
2023-11-08 22:23:06 +01:00
Saúl Ibarra Corretgé
1fb9a5010f
Drop support for "use math"
Ref: https://github.com/quickjs-ng/quickjs/issues/20
2023-11-06 23:07:31 +01:00
bellard
b1f67dfc1a 2020-11-08 release 2020-11-08 14:30:56 +01:00
bellard
7c312df422 2020-09-06 release 2020-09-06 19:10:15 +02:00
bellard
383e2b06c8 2020-03-16 release 2020-09-06 19:02:03 +02:00
bellard
0e8fffd4de 2020-01-19 release 2020-09-06 18:57:11 +02:00
bellard
91459fb672 2020-01-05 release 2020-09-06 18:53:08 +02:00