Skip to content
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

Add JS_NewTypedArray() #272

Merged
merged 1 commit into from
May 8, 2024
Merged

Conversation

xeioex
Copy link
Contributor

@xeioex xeioex commented Apr 5, 2024

No description provided.

@xeioex xeioex changed the title Add JS_NewTypedArray Add JS_NewTypedArray() Apr 10, 2024
quickjs.c Outdated Show resolved Hide resolved
@xeioex xeioex force-pushed the feat-create-typed-array-api branch from 86621a4 to 441777e Compare May 8, 2024 20:52
quickjs.c Outdated Show resolved Hide resolved
@xeioex xeioex force-pushed the feat-create-typed-array-api branch from 441777e to 8f9bfac Compare May 8, 2024 21:05
@chqrlie chqrlie merged commit 6c43013 into bellard:master May 8, 2024
13 checks passed
@chqrlie
Copy link
Collaborator

chqrlie commented May 9, 2024

@xeioex: After further thinking, I am not sure about the arguments to C API JS_NewTypedArray: It should probably take a size_t length and a const void * to optionally initialize the array contents. argc + argv is for JavaScript methods.

What is your use case?

@xeioex
Copy link
Contributor Author

xeioex commented May 9, 2024

@chqrlie

Agree, size_t length and a const void * to optionally initialize the array contents is suffice for my case.

@xeioex
Copy link
Contributor Author

xeioex commented May 9, 2024

@chqrlie

I will prepare the updated API and PR.

GerHobbelt pushed a commit to GerHobbelt/quickjs that referenced this pull request Jun 21, 2024
36911f0 regexp: fix non greedy quantizers with zero length matches
d86aaf0 updated test262.patch
adec734 fixed test of test262 directory
d378a9f Improve `js_os_exec` (bellard#295)
97be5a3 Add `js_resolve_proxy` (bellard#293)
f3f2f42 Add `JS_StrictEq()`, `JS_SameValue()`, and `JS_SameValueZero()` (bellard#264)
6f9d05f Expose `JS_SetUncatchableError()` (bellard#262)
d53aafe Add the missing fuzz_common.c (bellard#292)
db9dbd0 Add `JS_HasException()` (bellard#265)
6c43013 Add `JS_NewTypedArray()` (bellard#272)
01454ca OSS-Fuzz targets improvements (bellard#267)
0c8feca Improve class parser (bellard#289)
d9c699f fix class method with name get (bellard#258)
7a2c6f4 Improve libunicode and libregexp headers (bellard#288)
1402478 Improve unicode table handling (bellard#286)
3b45d15 Fix endianness handling in `js_dataview_getValue` / `js_dataview_setValue`
653b227 Improve error handling
203fe2d Improve `JSON.stringify`
ce6b6dc Use more explicit magic values for array methods
c0e67c4 Simplify redundant initializers for `JS_NewBool()`
0665131 Fix compilation with -DCONFIG_BIGNUM
65ecb0b Improve Date.parse, small fixes
6a89d7c Add CI targets, fix test_std.js (bellard#247)
ebe7496 Fix build: use LRE_BOOL in libunicode.h (bellard#244)
1a5333b prevent 0 length allocation in `js_worker_postMessage`
e17cb9f Add github CI tests
06c100c Prevent UB on memcpy and floating point conversions
3dd93eb fix microbench when microbench.txt is missing (bellard#246)
35b7b3c Improve Date.parse
8d64731 Improve Number.prototype.toString for radix other than 10
a78d2cb Improve repl regexp handling
8180d3d Improve microbench.js
78db49c Improve Date.parse
6428ce0 show readable representation of Date objects in repl
27928ce Fix Map hash bug
b70e764 Rewrite `set_date_fields` to match the ECMA specification
b91a2ae Add C API function JS_GetClassID()
12c91df Improve surrogate handling readability
8d932de Rename regex flag and field utf16 -> unicode
97ae6f3 Add benchmarks target
c24a865 Improve run-test262
bbf36d5 Fix big endian serialization
530ba6a handle missing test262 gracefully
0a361b7 handle missing test262 gracefully
74bdb49 Improve tests
85fb2ca Fix UB signed integer overflow in js_math_imul
8df4327 Fix UB left shift of negative number
3bb2ca3 Remove unnecessary ssize_t posix-ism
c06af87 Improve string concatenation hack
8e21b96 pass node-js command line arguments to microbench
95e0aa0 Reverse e140122
1fe0414 Fix test262 error
ef4e7b2 Fix compiler warnings
92e339d Simplify and clarify URL quoting js_std_urlGet
636c946 FreeBSD QuickJS Patch (bellard#203)
ae6fa8d Fix shell injection bug in std.urlGet (bellard#61)
693449e add gitignore for build objects (bellard#84)
e140122 Fix sloppy mode arguments uninitialized value use
6dbf01b Remove unsafe sprintf() and strcat() calls
6535064 Fix undefined behavior (UBSAN)
e53d622 Fix UB in js_dtoa1
fd6e039 Add UndefinedBehaviorSanitizer support
325ca19 Add MemorySanitizer support

git-subtree-dir: vendor/quickjs
git-subtree-split: 36911f0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants