-
Notifications
You must be signed in to change notification settings - Fork 161
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
Atomic keys introduction for strings, symbols, small numbers. #777
Conversation
45f7a53
to
b5aa2dc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See njs_object_iterate() and This cannot fail
comment.
This is not true anymore and should be checked for error as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested commit log:
Removed built-in short string and reserve atom_id field.
733208d
to
1eb9e74
Compare
1eb9e74
to
8d6cbd8
Compare
I'll squash 'Macro NJS_DECLARE_PROP_HANDLER is used for Uint8ClampedArray.' later. |
8e6b271
to
bcaad1f
Compare
To have enough space in njs_value_t this patch removed built-in short string. The short strings were an optimization which will be less useful when atomic strings are introduced.
bcaad1f
to
b84423a
Compare
Proposed changes
This is series of commits which introduce internal atomic representation for
strings, symbols and small numbers as keys for access object properties.
These commits are intended to speed up access to object properties.
Step 1:
Remove long strings from njs core to simplify code and make it more regular.
Reserve atom_id field in njs_value_t.
Notes:
a) Each commit is fully and successfully tested for regressions with all local tests;
b) This PR is draft for internal review, I'll extend it by additional commits as
they will be merged here from my hg sandbox.
c) As soon as last commit will be added/reviewed, draft status from this PR can be removed,
and PR applied then.
Checklist
Before creating a PR, run through this checklist and mark each as complete:
CONTRIBUTING
document