Remove repeated imports from generated code (#31711)

* feat: try to deduplicate imports in codegen

* feat: another attempt

* feat: start testing imports

* feat: clean all global imports

* feat: remove shared imports from CGDescriptor

* feat: remove redundant imports from CGDescriptor

* fix: formatting

* fix: remove libc (base level import)

* feat: roll back named path changes

* feat: last changes and tidy

* experiment: move imports into a separate file

* fix: extra parenthesis

* fix: remove repeated allow statement
This commit is contained in:
eri 2024-03-21 14:38:16 +01:00 committed by GitHub
parent f5c4988dcb
commit 8c7e9a15e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 180 additions and 364 deletions

View file

@ -260,6 +260,7 @@ pub unsafe fn find_enum_value<'a, T>(
/// Returns wether `obj` is a platform object using dynamic unwrap
/// <https://heycam.github.io/webidl/#dfn-platform-object>
#[allow(dead_code)]
pub fn is_platform_object_dynamic(obj: *mut JSObject, cx: *mut JSContext) -> bool {
is_platform_object(obj, &|o| unsafe {
UnwrapObjectDynamic(o, cx, /* stopAtWindowProxy = */ false)