1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-10 03:37:35 +00:00

LibJS: Make RefPtr and NonnullRefPtr usage const-correct

This mainly affected the AST, which is now const throughout.
This commit is contained in:
Andreas Kling 2023-02-19 22:07:52 +01:00
parent b2b942b4ec
commit bd5d8e9d35
15 changed files with 505 additions and 494 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2021-2023, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, David Tuin <davidot@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
@ -36,7 +36,7 @@ private:
SourceTextModule(Realm&, StringView filename, Script::HostDefined* host_defined, bool has_top_level_await, NonnullRefPtr<Program> body, Vector<ModuleRequest> requested_modules,
Vector<ImportEntry> import_entries, Vector<ExportEntry> local_export_entries,
Vector<ExportEntry> indirect_export_entries, Vector<ExportEntry> star_export_entries,
RefPtr<ExportStatement> default_export);
RefPtr<ExportStatement const> default_export);
virtual void visit_edges(Cell::Visitor&) override;
@ -48,7 +48,7 @@ private:
Vector<ExportEntry> m_indirect_export_entries; // [[IndirectExportEntries]]
Vector<ExportEntry> m_star_export_entries; // [[StarExportEntries]]
RefPtr<ExportStatement> m_default_export; // Note: Not from the spec
RefPtr<ExportStatement const> m_default_export; // Note: Not from the spec
};
}