Skip to content

Replace js_mode with is_strict_mode bit field#590

Merged
bnoordhuis merged 1 commit intoquickjs-ng:masterfrom
bnoordhuis:strictmodebitfield
Oct 10, 2024
Merged

Replace js_mode with is_strict_mode bit field#590
bnoordhuis merged 1 commit intoquickjs-ng:masterfrom
bnoordhuis:strictmodebitfield

Conversation

@bnoordhuis
Copy link
Copy Markdown
Contributor

Shrinks some structures by one or more bytes and is easier to read.

Shrinks some structures by one or more bytes and is easier to read.
assert(idx <= 16);
bc_put_u16(s, flags);
bc_put_u8(s, b->js_mode);
bc_put_u8(s, b->is_strict_mode);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: this was already writing either 1 or 0, so this is backwards compatible

@bnoordhuis bnoordhuis merged commit e145244 into quickjs-ng:master Oct 10, 2024
@bnoordhuis bnoordhuis deleted the strictmodebitfield branch October 10, 2024 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants