diff --git a/Libraries/LibGC/CMakeLists.txt b/Libraries/LibGC/CMakeLists.txt index b7e6f880ad4..40f75433829 100644 --- a/Libraries/LibGC/CMakeLists.txt +++ b/Libraries/LibGC/CMakeLists.txt @@ -20,9 +20,5 @@ if (ENABLE_SWIFT) Heap+Swift.swift ) target_link_libraries(LibGC PRIVATE AK) - - # FIXME: https://github.com/swiftlang/swift/issues/80182 - target_compile_options(LibGC PUBLIC $<$:-DLIBGC_WORKAROUND_BOOL_BITFIELD> - SHELL:$<$:-Xcc -DLIBGC_WORKAROUND_BOOL_BITFIELD>) - add_swift_target_properties(LibGC LAGOM_LIBRARIES AK COMPILE_DEFINITIONS LIBGC_WORKAROUND_BOOL_BITFIELD) + add_swift_target_properties(LibGC LAGOM_LIBRARIES AK) endif() diff --git a/Libraries/LibGC/Cell.h b/Libraries/LibGC/Cell.h index 7b7bbadd9d3..98c0ab1661e 100644 --- a/Libraries/LibGC/Cell.h +++ b/Libraries/LibGC/Cell.h @@ -28,13 +28,6 @@ namespace GC { # define IGNORE_GC #endif -// https://github.com/swiftlang/swift/issues/80182 -#if defined(LIBGC_WORKAROUND_BOOL_BITFIELD) -# define BOOL_BITFIELD -#else -# define BOOL_BITFIELD : 1 -#endif - #define GC_CELL(class_, base_class) \ public: \ using Base = base_class; \ @@ -195,9 +188,9 @@ protected: void set_overrides_must_survive_garbage_collection(bool b) { m_overrides_must_survive_garbage_collection = b; } private: - bool m_mark BOOL_BITFIELD { false }; - bool m_overrides_must_survive_garbage_collection BOOL_BITFIELD { false }; - State m_state BOOL_BITFIELD { State::Live }; + bool m_mark : 1 { false }; + bool m_overrides_must_survive_garbage_collection : 1 { false }; + State m_state : 1 { State::Live }; } SWIFT_UNSAFE_REFERENCE; } diff --git a/Libraries/LibJS/Runtime/Shape.h b/Libraries/LibJS/Runtime/Shape.h index 7d24b3c77c8..3ee9fb133e7 100644 --- a/Libraries/LibJS/Runtime/Shape.h +++ b/Libraries/LibJS/Runtime/Shape.h @@ -142,9 +142,9 @@ private: PropertyAttributes m_attributes { 0 }; TransitionType m_transition_type { TransitionType::Invalid }; - bool m_dictionary BOOL_BITFIELD { false }; - bool m_cacheable BOOL_BITFIELD { true }; - bool m_is_prototype_shape BOOL_BITFIELD { false }; + bool m_dictionary : 1 { false }; + bool m_cacheable : 1 { true }; + bool m_is_prototype_shape : 1 { false }; }; } diff --git a/Libraries/LibWeb/Bindings/PlatformObject.h b/Libraries/LibWeb/Bindings/PlatformObject.h index b70ae58c26b..99bbc35f0aa 100644 --- a/Libraries/LibWeb/Bindings/PlatformObject.h +++ b/Libraries/LibWeb/Bindings/PlatformObject.h @@ -49,17 +49,17 @@ protected: explicit PlatformObject(JS::Object& prototype, MayInterfereWithIndexedPropertyAccess = MayInterfereWithIndexedPropertyAccess::No); struct LegacyPlatformObjectFlags { - u16 supports_indexed_properties BOOL_BITFIELD = false; - u16 supports_named_properties BOOL_BITFIELD = false; - u16 has_indexed_property_setter BOOL_BITFIELD = false; - u16 has_named_property_setter BOOL_BITFIELD = false; - u16 has_named_property_deleter BOOL_BITFIELD = false; - u16 has_legacy_unenumerable_named_properties_interface_extended_attribute BOOL_BITFIELD = false; - u16 has_legacy_override_built_ins_interface_extended_attribute BOOL_BITFIELD = false; - u16 has_global_interface_extended_attribute BOOL_BITFIELD = false; - u16 indexed_property_setter_has_identifier BOOL_BITFIELD = false; - u16 named_property_setter_has_identifier BOOL_BITFIELD = false; - u16 named_property_deleter_has_identifier BOOL_BITFIELD = false; + u16 supports_indexed_properties : 1 = false; + u16 supports_named_properties : 1 = false; + u16 has_indexed_property_setter : 1 = false; + u16 has_named_property_setter : 1 = false; + u16 has_named_property_deleter : 1 = false; + u16 has_legacy_unenumerable_named_properties_interface_extended_attribute : 1 = false; + u16 has_legacy_override_built_ins_interface_extended_attribute : 1 = false; + u16 has_global_interface_extended_attribute : 1 = false; + u16 indexed_property_setter_has_identifier : 1 = false; + u16 named_property_setter_has_identifier : 1 = false; + u16 named_property_deleter_has_identifier : 1 = false; }; Optional m_legacy_platform_object_flags = {}; diff --git a/Libraries/LibWeb/CMakeLists.txt b/Libraries/LibWeb/CMakeLists.txt index 3516892a5a4..f06428c24a7 100644 --- a/Libraries/LibWeb/CMakeLists.txt +++ b/Libraries/LibWeb/CMakeLists.txt @@ -1007,5 +1007,5 @@ if (ENABLE_SWIFT) HTML/Parser/SpeculativeHTMLParser.swift ) target_link_libraries(LibWeb PRIVATE AK Collections) - add_swift_target_properties(LibWeb LAGOM_LIBRARIES AK LibGfx LibGC COMPILE_DEFINITIONS LIBGC_WORKAROUND_BOOL_BITFIELD) + add_swift_target_properties(LibWeb LAGOM_LIBRARIES AK LibGfx LibGC) endif() diff --git a/Libraries/LibWeb/CSS/StyleInvalidation.h b/Libraries/LibWeb/CSS/StyleInvalidation.h index 19d7399d525..8fa8c75fbb6 100644 --- a/Libraries/LibWeb/CSS/StyleInvalidation.h +++ b/Libraries/LibWeb/CSS/StyleInvalidation.h @@ -11,10 +11,10 @@ namespace Web::CSS { struct RequiredInvalidationAfterStyleChange { - bool repaint BOOL_BITFIELD { false }; - bool rebuild_stacking_context_tree BOOL_BITFIELD { false }; - bool relayout BOOL_BITFIELD { false }; - bool rebuild_layout_tree BOOL_BITFIELD { false }; + bool repaint : 1 { false }; + bool rebuild_stacking_context_tree : 1 { false }; + bool relayout : 1 { false }; + bool rebuild_layout_tree : 1 { false }; void operator|=(RequiredInvalidationAfterStyleChange const& other) { diff --git a/Libraries/LibWeb/DOM/Element.h b/Libraries/LibWeb/DOM/Element.h index 9532bf870a3..2d2ec6279ac 100644 --- a/Libraries/LibWeb/DOM/Element.h +++ b/Libraries/LibWeb/DOM/Element.h @@ -553,16 +553,16 @@ private: Array m_scroll_offset; - bool m_in_top_layer BOOL_BITFIELD { false }; - bool m_rendered_in_top_layer BOOL_BITFIELD { false }; - bool m_style_uses_css_custom_properties BOOL_BITFIELD { false }; - bool m_affected_by_has_pseudo_class_in_subject_position BOOL_BITFIELD { false }; - bool m_affected_by_has_pseudo_class_in_non_subject_position BOOL_BITFIELD { false }; - bool m_affected_by_direct_sibling_combinator BOOL_BITFIELD { false }; - bool m_affected_by_indirect_sibling_combinator BOOL_BITFIELD { false }; - bool m_affected_by_first_or_last_child_pseudo_class BOOL_BITFIELD { false }; - bool m_affected_by_nth_child_pseudo_class BOOL_BITFIELD { false }; - bool m_affected_by_has_pseudo_class_with_relative_selector_that_has_sibling_combinator BOOL_BITFIELD { false }; + bool m_in_top_layer : 1 { false }; + bool m_rendered_in_top_layer : 1 { false }; + bool m_style_uses_css_custom_properties : 1 { false }; + bool m_affected_by_has_pseudo_class_in_subject_position : 1 { false }; + bool m_affected_by_has_pseudo_class_in_non_subject_position : 1 { false }; + bool m_affected_by_direct_sibling_combinator : 1 { false }; + bool m_affected_by_indirect_sibling_combinator : 1 { false }; + bool m_affected_by_first_or_last_child_pseudo_class : 1 { false }; + bool m_affected_by_nth_child_pseudo_class : 1 { false }; + bool m_affected_by_has_pseudo_class_with_relative_selector_that_has_sibling_combinator : 1 { false }; size_t m_sibling_invalidation_distance { 0 }; diff --git a/Libraries/LibWeb/Painting/Paintable.h b/Libraries/LibWeb/Painting/Paintable.h index f0ec52e5b62..a47211cb64d 100644 --- a/Libraries/LibWeb/Painting/Paintable.h +++ b/Libraries/LibWeb/Painting/Paintable.h @@ -168,12 +168,12 @@ private: SelectionState m_selection_state { SelectionState::None }; - bool m_positioned BOOL_BITFIELD { false }; - bool m_fixed_position BOOL_BITFIELD { false }; - bool m_sticky_position BOOL_BITFIELD { false }; - bool m_absolutely_positioned BOOL_BITFIELD { false }; - bool m_floating BOOL_BITFIELD { false }; - bool m_inline BOOL_BITFIELD { false }; + bool m_positioned : 1 { false }; + bool m_fixed_position : 1 { false }; + bool m_sticky_position : 1 { false }; + bool m_absolutely_positioned : 1 { false }; + bool m_floating : 1 { false }; + bool m_inline : 1 { false }; }; inline DOM::Node* HitTestResult::dom_node() diff --git a/Tests/LibGC/CMakeLists.txt b/Tests/LibGC/CMakeLists.txt index 6b94ba5ecad..b42845cd747 100644 --- a/Tests/LibGC/CMakeLists.txt +++ b/Tests/LibGC/CMakeLists.txt @@ -19,7 +19,6 @@ if (ENABLE_SWIFT) add_swift_target_properties(TestGCSwift LAGOM_LIBRARIES AK LibGC - COMPILE_DEFINITIONS LIBGC_WORKAROUND_BOOL_BITFIELD COMPILE_OPTIONS ${testing_compile_options} -enable-experimental-feature Extern ) add_test(NAME TestGCSwift COMMAND TestGCSwift)