diff options
author | Taym Haddadi <haddadi.taym@gmail.com> | 2024-01-25 15:28:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-25 14:28:43 +0000 |
commit | bb04c97f15728d14a146f29fa1bc4d23ee96ec49 (patch) | |
tree | b229961b8cc2d42edd6666eb150aa46df88a1c13 /components/script/dom/bindings | |
parent | 50f56affe35a5565f99226daeb29843246c32b69 (diff) | |
download | servo-bb04c97f15728d14a146f29fa1bc4d23ee96ec49.tar.gz servo-bb04c97f15728d14a146f29fa1bc4d23ee96ec49.zip |
Use Int8array, int16array, uint16array, int32array & uint32array in WebIDL (#31164)
<!-- Please describe your changes on the following line: -->
part #31064
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by
`[X]` when the step is complete, and replace `___` with appropriate
data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
<!-- Either: -->
- [x] These changes do not require tests because there is no behavior
changes
<!-- Also, please make sure that "Allow edits from maintainers" checkbox
is checked, so that we can help you if you get stuck somewhere along the
way.-->
<!-- Pull requests that do not address these steps are welcome, but they
will require additional verification as part of the review process. -->
There types are not used we can migrate them, in next PR I will make
`HeapFloat32Array` generic and convert ArrayBufferView, ArrayBuffer,
Uint8ClampedArray and Float64Array.
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
Diffstat (limited to 'components/script/dom/bindings')
-rw-r--r-- | components/script/dom/bindings/codegen/CodegenRust.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py index 10ccc0ef898..8220a1e5a49 100644 --- a/components/script/dom/bindings/codegen/CodegenRust.py +++ b/components/script/dom/bindings/codegen/CodegenRust.py @@ -120,8 +120,13 @@ builtinNames = { IDLType.Tags.float: 'Finite<f32>', IDLType.Tags.unrestricted_double: 'f64', IDLType.Tags.double: 'Finite<f64>', + IDLType.Tags.int8array: 'Int8Array', + IDLType.Tags.uint8array: 'Uint8Array', + IDLType.Tags.int16array: 'Int16Array', + IDLType.Tags.uint16array: 'Uint16Array', + IDLType.Tags.int32array: 'Int32Array', + IDLType.Tags.uint32array: 'Uint32Array', IDLType.Tags.float32array: 'Float32Array', - IDLType.Tags.uint8array: 'Uint8Array' } numericTags = [ @@ -6502,8 +6507,13 @@ def generate_imports(config, cgthings, descriptors, callbacks=None, dictionaries 'js::rust::define_properties', 'js::rust::get_object_class', 'js::typedarray', - 'js::typedarray::Float32Array', + 'js::typedarray::Int8Array', 'js::typedarray::Uint8Array', + 'js::typedarray::Int16Array', + 'js::typedarray::Uint16Array', + 'js::typedarray::Int32Array', + 'js::typedarray::Uint32Array', + 'js::typedarray::Float32Array', 'crate::dom', 'crate::dom::bindings', 'crate::dom::bindings::codegen::InterfaceObjectMap', |