1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 08:04:57 +00:00
serenity/Userland/Libraries/LibJS
Ben Wiederhake 6b7ce19161 Everywhere: Remove unused includes of LibC/stdlib.h
These instances were detected by searching for files that include
stdlib.h, but don't match the regex:

\\b(_abort|abort|abs|aligned_alloc|arc4random|arc4random_buf|arc4random_
uniform|atexit|atof|atoi|atol|atoll|bsearch|calloc|clearenv|div|div_t|ex
it|_Exit|EXIT_FAILURE|EXIT_SUCCESS|free|getenv|getprogname|grantpt|labs|
ldiv|ldiv_t|llabs|lldiv|lldiv_t|malloc|malloc_good_size|malloc_size|mble
n|mbstowcs|mbtowc|mkdtemp|mkstemp|mkstemps|mktemp|posix_memalign|posix_o
penpt|ptsname|ptsname_r|putenv|qsort|qsort_r|rand|RAND_MAX|random|reallo
c|realpath|secure_getenv|serenity_dump_malloc_stats|serenity_setenv|sete
nv|setprogname|srand|srandom|strtod|strtof|strtol|strtold|strtoll|strtou
l|strtoull|system|unlockpt|unsetenv|wcstombs|wctomb)\\b

(Without the linebreaks.)

This regex is pessimistic, so there might be more files that don't
actually use anything from the stdlib.

In theory, one might use LibCPP to detect things like this
automatically, but let's do this one step after another.
2023-01-02 20:27:20 -05:00
..
Bytecode Everywhere: Remove unused includes of AK/Format.h 2023-01-02 20:27:20 -05:00
Contrib/Test262 LibJS: Convert Heap::allocate{,_without_realm}() to NonnullGCPtr 2022-12-15 06:56:37 -05:00
Heap LibJS: Convert Heap::allocate{,_without_realm}() to NonnullGCPtr 2022-12-15 06:56:37 -05:00
Runtime Everywhere: Remove unused includes of LibC/stdlib.h 2023-01-02 20:27:20 -05:00
Tests LibJS: Add yearOfWeek calendar methods and properties 2022-12-26 09:30:36 +01:00
AST.cpp LibJS: Convert get_this_environment() to NonnullGCPtr 2022-12-16 09:59:56 +01:00
AST.h LibJS: Call shrink_to_fit() on various Vectors created during parse 2022-12-08 23:36:17 +00:00
CMakeLists.txt LibJS: Move ExecutionContext function implementations out of line 2022-12-12 13:58:32 +00:00
Console.cpp LibJS: Replace standalone js_string() with PrimitiveString::create() 2022-12-07 16:43:06 +00:00
Console.h Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
CyclicModule.cpp LibJS: Convert NativeFunction::create() to NonnullGCPtr 2022-12-14 09:59:45 +00:00
CyclicModule.h LibJS+LibWeb: Make CyclicModule.h not include AST.h 2022-11-23 16:05:59 +00:00
Forward.h LibJS+LibWeb: Move JS::ModuleRequest to its own header file 2022-11-23 16:05:59 +00:00
Interpreter.cpp WebContent+LibWeb+LibJS: Simplify injection of JS console globals 2022-12-09 18:51:03 +00:00
Interpreter.h WebContent+LibWeb+LibJS: Simplify injection of JS console globals 2022-12-09 18:51:03 +00:00
Lexer.cpp AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
Lexer.h AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
MarkupGenerator.cpp LibJS: Convert MarkupGenerator to the new String 2022-12-07 09:58:38 +00:00
MarkupGenerator.h LibJS: Convert MarkupGenerator to the new String 2022-12-07 09:58:38 +00:00
Module.cpp LibJS: Convert Heap::allocate{,_without_realm}() to NonnullGCPtr 2022-12-15 06:56:37 -05:00
Module.h AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
Parser.cpp LibJS: Don't update names of resulting functions in object expression 2022-12-14 15:27:08 +00:00
Parser.h Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
ParserError.cpp Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
ParserError.h Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
Print.cpp Everywhere: Use C++ concepts instead of requires clauses 2022-12-09 11:25:30 +00:00
Print.h LibJS+js: Move the value print implementation to LibJS 2022-11-26 02:23:15 +03:30
SafeFunction.h Everywhere: Stop shoving things into ::std and mentioning them as such 2022-12-14 11:44:32 +01:00
Script.cpp LibJS: Convert Heap::allocate{,_without_realm}() to NonnullGCPtr 2022-12-15 06:56:37 -05:00
Script.h AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
SourceCode.cpp AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
SourceCode.h AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
SourceRange.h AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
SourceTextModule.cpp Everywhere: Move AK/Debug.h include to using files or remove 2023-01-02 20:27:20 -05:00
SourceTextModule.h LibJS: Make SourceTextModule.h not include AST.h or Parser.h 2022-11-23 16:05:59 +00:00
SyntaxHighlighter.cpp LibJS: Remove a bunch of gratuitous JS namespace qualifiers 2022-04-03 15:19:33 +01:00
SyntaxHighlighter.h LibSyntax: Teach each highlighter about it's comment syntax 2022-11-27 18:28:43 -07:00
SyntheticModule.cpp LibJS: Convert Heap::allocate{,_without_realm}() to NonnullGCPtr 2022-12-15 06:56:37 -05:00
SyntheticModule.h LibJS: Make Script and Module GC-allocated 2022-09-06 00:27:09 +02:00
Token.cpp Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
Token.h AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00