2020-05-06 15:40:06 +00:00
|
|
|
set(SOURCES
|
2021-06-08 21:08:47 +00:00
|
|
|
AST.cpp
|
|
|
|
Bytecode/ASTCodegen.cpp
|
|
|
|
Bytecode/BasicBlock.cpp
|
2023-11-17 10:48:30 +00:00
|
|
|
Bytecode/Builtins.cpp
|
2023-02-16 16:03:49 +00:00
|
|
|
Bytecode/CodeGenerationError.cpp
|
2021-10-24 11:30:49 +00:00
|
|
|
Bytecode/Executable.cpp
|
2021-06-08 21:08:47 +00:00
|
|
|
Bytecode/Generator.cpp
|
2021-10-24 13:34:30 +00:00
|
|
|
Bytecode/IdentifierTable.cpp
|
2021-06-08 21:08:47 +00:00
|
|
|
Bytecode/Instruction.cpp
|
|
|
|
Bytecode/Interpreter.cpp
|
2023-07-13 08:49:07 +00:00
|
|
|
Bytecode/RegexTable.cpp
|
2021-06-09 08:02:01 +00:00
|
|
|
Bytecode/StringTable.cpp
|
2021-06-08 21:08:47 +00:00
|
|
|
Console.cpp
|
2023-07-15 11:38:57 +00:00
|
|
|
Contrib/Test262/262Object.cpp
|
2022-03-29 19:36:22 +00:00
|
|
|
Contrib/Test262/AgentObject.cpp
|
|
|
|
Contrib/Test262/GlobalObject.cpp
|
|
|
|
Contrib/Test262/IsHTMLDDA.cpp
|
2022-01-18 18:29:17 +00:00
|
|
|
CyclicModule.cpp
|
2021-06-08 21:08:47 +00:00
|
|
|
Heap/BlockAllocator.cpp
|
2023-07-09 08:10:17 +00:00
|
|
|
Heap/Cell.cpp
|
2021-07-11 02:39:42 +00:00
|
|
|
Heap/CellAllocator.cpp
|
2024-02-22 12:18:31 +00:00
|
|
|
Heap/ConservativeVector.cpp
|
2021-06-08 21:08:47 +00:00
|
|
|
Heap/Handle.cpp
|
|
|
|
Heap/Heap.cpp
|
2021-07-11 02:39:42 +00:00
|
|
|
Heap/HeapBlock.cpp
|
2021-12-16 17:54:06 +00:00
|
|
|
Heap/MarkedVector.cpp
|
2021-06-08 21:08:47 +00:00
|
|
|
Lexer.cpp
|
|
|
|
MarkupGenerator.cpp
|
2021-09-14 17:35:23 +00:00
|
|
|
Module.cpp
|
2021-06-08 21:08:47 +00:00
|
|
|
Parser.cpp
|
2022-11-23 11:39:23 +00:00
|
|
|
ParserError.cpp
|
2022-11-22 04:20:51 +00:00
|
|
|
Print.cpp
|
2021-06-19 20:45:00 +00:00
|
|
|
Runtime/AbstractOperations.cpp
|
2023-11-19 08:45:05 +00:00
|
|
|
Runtime/Accessor.cpp
|
2023-11-15 20:31:51 +00:00
|
|
|
Runtime/Agent.cpp
|
2021-06-11 17:06:20 +00:00
|
|
|
Runtime/AggregateError.cpp
|
|
|
|
Runtime/AggregateErrorConstructor.cpp
|
|
|
|
Runtime/AggregateErrorPrototype.cpp
|
2021-06-28 11:26:01 +00:00
|
|
|
Runtime/ArgumentsObject.cpp
|
2021-06-08 21:08:47 +00:00
|
|
|
Runtime/Array.cpp
|
|
|
|
Runtime/ArrayBuffer.cpp
|
|
|
|
Runtime/ArrayBufferConstructor.cpp
|
|
|
|
Runtime/ArrayBufferPrototype.cpp
|
|
|
|
Runtime/ArrayConstructor.cpp
|
|
|
|
Runtime/ArrayIterator.cpp
|
|
|
|
Runtime/ArrayIteratorPrototype.cpp
|
|
|
|
Runtime/ArrayPrototype.cpp
|
2021-11-23 14:01:35 +00:00
|
|
|
Runtime/AsyncFromSyncIterator.cpp
|
|
|
|
Runtime/AsyncFromSyncIteratorPrototype.cpp
|
2021-11-09 18:39:22 +00:00
|
|
|
Runtime/AsyncFunctionConstructor.cpp
|
2021-11-10 21:16:07 +00:00
|
|
|
Runtime/AsyncFunctionDriverWrapper.cpp
|
2021-11-09 18:39:22 +00:00
|
|
|
Runtime/AsyncFunctionPrototype.cpp
|
2022-05-05 06:47:36 +00:00
|
|
|
Runtime/AsyncGenerator.cpp
|
2021-11-15 00:53:24 +00:00
|
|
|
Runtime/AsyncGeneratorFunctionConstructor.cpp
|
|
|
|
Runtime/AsyncGeneratorFunctionPrototype.cpp
|
2022-05-05 06:47:36 +00:00
|
|
|
Runtime/AsyncGeneratorPrototype.cpp
|
2021-11-23 13:53:02 +00:00
|
|
|
Runtime/AsyncIteratorPrototype.cpp
|
2021-07-11 02:53:54 +00:00
|
|
|
Runtime/AtomicsObject.cpp
|
2021-06-08 21:08:47 +00:00
|
|
|
Runtime/BigInt.cpp
|
|
|
|
Runtime/BigIntConstructor.cpp
|
2020-06-06 00:14:10 +00:00
|
|
|
Runtime/BigIntObject.cpp
|
|
|
|
Runtime/BigIntPrototype.cpp
|
2020-05-06 15:40:06 +00:00
|
|
|
Runtime/BooleanConstructor.cpp
|
|
|
|
Runtime/BooleanObject.cpp
|
|
|
|
Runtime/BooleanPrototype.cpp
|
|
|
|
Runtime/BoundFunction.cpp
|
2021-11-09 20:52:21 +00:00
|
|
|
Runtime/Completion.cpp
|
2020-05-06 15:40:06 +00:00
|
|
|
Runtime/ConsoleObject.cpp
|
2021-06-13 22:47:08 +00:00
|
|
|
Runtime/DataView.cpp
|
|
|
|
Runtime/DataViewConstructor.cpp
|
|
|
|
Runtime/DataViewPrototype.cpp
|
2020-05-06 15:40:06 +00:00
|
|
|
Runtime/Date.cpp
|
2021-07-11 02:39:42 +00:00
|
|
|
Runtime/DateConstructor.cpp
|
2020-05-06 15:40:06 +00:00
|
|
|
Runtime/DatePrototype.cpp
|
2021-07-01 10:24:46 +00:00
|
|
|
Runtime/DeclarativeEnvironment.cpp
|
2022-12-21 10:48:14 +00:00
|
|
|
Runtime/DisposableStack.cpp
|
|
|
|
Runtime/DisposableStackConstructor.cpp
|
|
|
|
Runtime/DisposableStackPrototype.cpp
|
2021-09-24 20:40:38 +00:00
|
|
|
Runtime/ECMAScriptFunctionObject.cpp
|
2021-07-01 10:24:46 +00:00
|
|
|
Runtime/Environment.cpp
|
2020-05-06 15:40:06 +00:00
|
|
|
Runtime/Error.cpp
|
2021-07-11 02:39:42 +00:00
|
|
|
Runtime/ErrorConstructor.cpp
|
2020-05-06 15:40:06 +00:00
|
|
|
Runtime/ErrorPrototype.cpp
|
2020-06-10 05:48:01 +00:00
|
|
|
Runtime/ErrorTypes.cpp
|
2022-12-11 18:16:15 +00:00
|
|
|
Runtime/ExecutionContext.cpp
|
2021-06-15 19:16:17 +00:00
|
|
|
Runtime/FinalizationRegistry.cpp
|
|
|
|
Runtime/FinalizationRegistryConstructor.cpp
|
|
|
|
Runtime/FinalizationRegistryPrototype.cpp
|
2020-05-06 15:40:06 +00:00
|
|
|
Runtime/FunctionConstructor.cpp
|
2021-07-01 10:24:46 +00:00
|
|
|
Runtime/FunctionEnvironment.cpp
|
2021-06-27 19:48:34 +00:00
|
|
|
Runtime/FunctionObject.cpp
|
2020-05-06 15:40:06 +00:00
|
|
|
Runtime/FunctionPrototype.cpp
|
2021-06-15 07:04:08 +00:00
|
|
|
Runtime/GeneratorFunctionConstructor.cpp
|
|
|
|
Runtime/GeneratorFunctionPrototype.cpp
|
2021-06-10 21:08:30 +00:00
|
|
|
Runtime/GeneratorObject.cpp
|
2022-01-16 13:14:42 +00:00
|
|
|
Runtime/GeneratorPrototype.cpp
|
2021-07-01 10:24:46 +00:00
|
|
|
Runtime/GlobalEnvironment.cpp
|
2020-05-06 15:40:06 +00:00
|
|
|
Runtime/GlobalObject.cpp
|
LibJS: Object index properties have descriptors; Handle sparse indices
This patch adds an IndexedProperties object for storing indexed
properties within an Object. This accomplishes two goals: indexed
properties now have an associated descriptor, and objects now gracefully
handle sparse properties.
The IndexedProperties class is a wrapper around two other classes, one
for simple indexed properties storage, and one for general indexed
property storage. Simple indexed property storage is the common-case,
and is simply a vector of properties which all have attributes of
default_attributes (writable, enumerable, and configurable).
General indexed property storage is for a collection of indexed
properties where EITHER one or more properties have attributes other
than default_attributes OR there is a property with a large index (in
particular, large is '200' or higher).
Indexed properties are now treated relatively the same as storage within
the various Object methods. Additionally, there is a custom iterator
class for IndexedProperties which makes iteration easy. The iterator
skips empty values by default, but can be configured otherwise.
Likewise, it evaluates getters by default, but can be set not to.
2020-05-27 18:35:09 +00:00
|
|
|
Runtime/IndexedProperties.cpp
|
2021-08-25 02:58:45 +00:00
|
|
|
Runtime/Intl/AbstractOperations.cpp
|
2021-09-07 02:18:48 +00:00
|
|
|
Runtime/Intl/Collator.cpp
|
2022-02-20 17:53:50 +00:00
|
|
|
Runtime/Intl/CollatorCompareFunction.cpp
|
2021-09-07 02:18:48 +00:00
|
|
|
Runtime/Intl/CollatorConstructor.cpp
|
|
|
|
Runtime/Intl/CollatorPrototype.cpp
|
2021-11-18 15:30:31 +00:00
|
|
|
Runtime/Intl/DateTimeFormat.cpp
|
|
|
|
Runtime/Intl/DateTimeFormatConstructor.cpp
|
2021-12-06 17:26:49 +00:00
|
|
|
Runtime/Intl/DateTimeFormatFunction.cpp
|
2021-11-18 15:30:31 +00:00
|
|
|
Runtime/Intl/DateTimeFormatPrototype.cpp
|
2021-08-25 02:27:05 +00:00
|
|
|
Runtime/Intl/DisplayNames.cpp
|
|
|
|
Runtime/Intl/DisplayNamesConstructor.cpp
|
|
|
|
Runtime/Intl/DisplayNamesPrototype.cpp
|
2022-06-29 21:58:40 +00:00
|
|
|
Runtime/Intl/DurationFormat.cpp
|
|
|
|
Runtime/Intl/DurationFormatConstructor.cpp
|
|
|
|
Runtime/Intl/DurationFormatPrototype.cpp
|
2021-08-08 17:27:28 +00:00
|
|
|
Runtime/Intl/Intl.cpp
|
2021-09-06 03:05:16 +00:00
|
|
|
Runtime/Intl/ListFormat.cpp
|
|
|
|
Runtime/Intl/ListFormatConstructor.cpp
|
|
|
|
Runtime/Intl/ListFormatPrototype.cpp
|
2021-09-02 12:32:43 +00:00
|
|
|
Runtime/Intl/Locale.cpp
|
|
|
|
Runtime/Intl/LocaleConstructor.cpp
|
|
|
|
Runtime/Intl/LocalePrototype.cpp
|
2022-07-19 16:07:00 +00:00
|
|
|
Runtime/Intl/MathematicalValue.cpp
|
2021-09-09 01:34:27 +00:00
|
|
|
Runtime/Intl/NumberFormat.cpp
|
|
|
|
Runtime/Intl/NumberFormatConstructor.cpp
|
2021-11-10 17:34:14 +00:00
|
|
|
Runtime/Intl/NumberFormatFunction.cpp
|
2021-09-09 01:34:27 +00:00
|
|
|
Runtime/Intl/NumberFormatPrototype.cpp
|
2022-01-28 17:56:04 +00:00
|
|
|
Runtime/Intl/PluralRules.cpp
|
|
|
|
Runtime/Intl/PluralRulesConstructor.cpp
|
|
|
|
Runtime/Intl/PluralRulesPrototype.cpp
|
2022-01-25 15:41:57 +00:00
|
|
|
Runtime/Intl/RelativeTimeFormat.cpp
|
|
|
|
Runtime/Intl/RelativeTimeFormatConstructor.cpp
|
|
|
|
Runtime/Intl/RelativeTimeFormatPrototype.cpp
|
2022-01-29 21:47:29 +00:00
|
|
|
Runtime/Intl/Segmenter.cpp
|
|
|
|
Runtime/Intl/SegmenterConstructor.cpp
|
|
|
|
Runtime/Intl/SegmenterPrototype.cpp
|
2022-01-29 23:08:42 +00:00
|
|
|
Runtime/Intl/Segments.cpp
|
2022-01-30 00:18:47 +00:00
|
|
|
Runtime/Intl/SegmentIterator.cpp
|
|
|
|
Runtime/Intl/SegmentIteratorPrototype.cpp
|
2022-01-29 23:08:42 +00:00
|
|
|
Runtime/Intl/SegmentsPrototype.cpp
|
2022-08-26 23:54:55 +00:00
|
|
|
Runtime/Intrinsics.cpp
|
2023-06-24 14:01:04 +00:00
|
|
|
Runtime/Iterator.cpp
|
|
|
|
Runtime/IteratorConstructor.cpp
|
2023-06-25 13:39:33 +00:00
|
|
|
Runtime/IteratorHelper.cpp
|
|
|
|
Runtime/IteratorHelperPrototype.cpp
|
2020-07-09 21:58:20 +00:00
|
|
|
Runtime/IteratorPrototype.cpp
|
2020-06-10 18:01:00 +00:00
|
|
|
Runtime/JSONObject.cpp
|
2022-11-23 10:32:45 +00:00
|
|
|
Runtime/JobCallback.cpp
|
2021-06-12 20:54:40 +00:00
|
|
|
Runtime/Map.cpp
|
|
|
|
Runtime/MapConstructor.cpp
|
2021-06-12 20:58:03 +00:00
|
|
|
Runtime/MapIterator.cpp
|
|
|
|
Runtime/MapIteratorPrototype.cpp
|
2021-06-12 20:54:40 +00:00
|
|
|
Runtime/MapPrototype.cpp
|
2020-05-06 15:40:06 +00:00
|
|
|
Runtime/MathObject.cpp
|
2022-01-16 22:30:15 +00:00
|
|
|
Runtime/ModuleEnvironment.cpp
|
2022-01-16 22:32:41 +00:00
|
|
|
Runtime/ModuleNamespaceObject.cpp
|
2020-05-06 15:40:06 +00:00
|
|
|
Runtime/NativeFunction.cpp
|
|
|
|
Runtime/NumberConstructor.cpp
|
|
|
|
Runtime/NumberObject.cpp
|
|
|
|
Runtime/NumberPrototype.cpp
|
|
|
|
Runtime/Object.cpp
|
2021-06-21 21:17:24 +00:00
|
|
|
Runtime/ObjectConstructor.cpp
|
2021-07-01 10:24:46 +00:00
|
|
|
Runtime/ObjectEnvironment.cpp
|
2020-05-06 15:40:06 +00:00
|
|
|
Runtime/ObjectPrototype.cpp
|
|
|
|
Runtime/PrimitiveString.cpp
|
2021-10-11 18:29:31 +00:00
|
|
|
Runtime/PrivateEnvironment.cpp
|
LibJS: Add initial support for Promises
Almost a year after first working on this, it's finally done: an
implementation of Promises for LibJS! :^)
The core functionality is working and closely following the spec [1].
I mostly took the pseudo code and transformed it into C++ - if you read
and understand it, you will know how the spec implements Promises; and
if you read the spec first, the code will look very familiar.
Implemented functions are:
- Promise() constructor
- Promise.prototype.then()
- Promise.prototype.catch()
- Promise.prototype.finally()
- Promise.resolve()
- Promise.reject()
For the tests I added a new function to test-js's global object,
runQueuedPromiseJobs(), which calls vm.run_queued_promise_jobs().
By design, queued jobs normally only run after the script was fully
executed, making it improssible to test handlers in individual test()
calls by default [2].
Subsequent commits include integrations into LibWeb and js(1) -
pretty-printing, running queued promise jobs when necessary.
This has an unusual amount of dbgln() statements, all hidden behind the
PROMISE_DEBUG flag - I'm leaving them in for now as they've been very
useful while debugging this, things can get quite complex with so many
asynchronously executed functions.
I've not extensively explored use of these APIs for promise-based
functionality in LibWeb (fetch(), Notification.requestPermission()
etc.), but we'll get there in due time.
[1]: https://tc39.es/ecma262/#sec-promise-objects
[2]: https://tc39.es/ecma262/#sec-jobs-and-job-queues
2021-04-01 20:13:29 +00:00
|
|
|
Runtime/Promise.cpp
|
2022-10-02 09:59:22 +00:00
|
|
|
Runtime/PromiseCapability.cpp
|
LibJS: Add initial support for Promises
Almost a year after first working on this, it's finally done: an
implementation of Promises for LibJS! :^)
The core functionality is working and closely following the spec [1].
I mostly took the pseudo code and transformed it into C++ - if you read
and understand it, you will know how the spec implements Promises; and
if you read the spec first, the code will look very familiar.
Implemented functions are:
- Promise() constructor
- Promise.prototype.then()
- Promise.prototype.catch()
- Promise.prototype.finally()
- Promise.resolve()
- Promise.reject()
For the tests I added a new function to test-js's global object,
runQueuedPromiseJobs(), which calls vm.run_queued_promise_jobs().
By design, queued jobs normally only run after the script was fully
executed, making it improssible to test handlers in individual test()
calls by default [2].
Subsequent commits include integrations into LibWeb and js(1) -
pretty-printing, running queued promise jobs when necessary.
This has an unusual amount of dbgln() statements, all hidden behind the
PROMISE_DEBUG flag - I'm leaving them in for now as they've been very
useful while debugging this, things can get quite complex with so many
asynchronously executed functions.
I've not extensively explored use of these APIs for promise-based
functionality in LibWeb (fetch(), Notification.requestPermission()
etc.), but we'll get there in due time.
[1]: https://tc39.es/ecma262/#sec-promise-objects
[2]: https://tc39.es/ecma262/#sec-jobs-and-job-queues
2021-04-01 20:13:29 +00:00
|
|
|
Runtime/PromiseConstructor.cpp
|
|
|
|
Runtime/PromiseJobs.cpp
|
|
|
|
Runtime/PromisePrototype.cpp
|
|
|
|
Runtime/PromiseReaction.cpp
|
2021-08-21 19:23:12 +00:00
|
|
|
Runtime/PromiseResolvingElementFunctions.cpp
|
LibJS: Add initial support for Promises
Almost a year after first working on this, it's finally done: an
implementation of Promises for LibJS! :^)
The core functionality is working and closely following the spec [1].
I mostly took the pseudo code and transformed it into C++ - if you read
and understand it, you will know how the spec implements Promises; and
if you read the spec first, the code will look very familiar.
Implemented functions are:
- Promise() constructor
- Promise.prototype.then()
- Promise.prototype.catch()
- Promise.prototype.finally()
- Promise.resolve()
- Promise.reject()
For the tests I added a new function to test-js's global object,
runQueuedPromiseJobs(), which calls vm.run_queued_promise_jobs().
By design, queued jobs normally only run after the script was fully
executed, making it improssible to test handlers in individual test()
calls by default [2].
Subsequent commits include integrations into LibWeb and js(1) -
pretty-printing, running queued promise jobs when necessary.
This has an unusual amount of dbgln() statements, all hidden behind the
PROMISE_DEBUG flag - I'm leaving them in for now as they've been very
useful while debugging this, things can get quite complex with so many
asynchronously executed functions.
I've not extensively explored use of these APIs for promise-based
functionality in LibWeb (fetch(), Notification.requestPermission()
etc.), but we'll get there in due time.
[1]: https://tc39.es/ecma262/#sec-promise-objects
[2]: https://tc39.es/ecma262/#sec-jobs-and-job-queues
2021-04-01 20:13:29 +00:00
|
|
|
Runtime/PromiseResolvingFunction.cpp
|
LibJS: Add new PropertyDescriptor class and related abstract operations
This is an implementation of 'The Property Descriptor Specification
Type' and related abstract operations, namely:
- IsAccessorDescriptor
- IsDataDescriptor
- IsGenericDescriptor
- FromPropertyDescriptor
- ToPropertyDescriptor
- CompletePropertyDescriptor
It works with Optional<T> to enable omitting certain fields, which will
eventually replace the Attribute::Has{Getter,Setter,Configurable,
Enumerable,Writable} bit flags, which are awkward to work with - being
able to use an initializer list with any of the possible attributes is
much more convenient.
Parts of the current PropertyAttributes implementation as well as the
much simpler PropertyDescriptor struct in Object.h will eventually be
replaced with this and completely go away.
Property storage will still use the PropertyAttributes bit flags, this
is for the layers above.
Note that this is currently guarded behind an #if 0 as if conflicts with
the existing PropertyDescriptor struct, but it's known to compile and
work just fine - I simply want to have this in a separate commit, the
primary object rewrite commit will be large enough as is.
2021-07-03 21:57:21 +00:00
|
|
|
Runtime/PropertyDescriptor.cpp
|
2020-06-03 21:34:52 +00:00
|
|
|
Runtime/ProxyConstructor.cpp
|
|
|
|
Runtime/ProxyObject.cpp
|
2021-09-11 18:20:07 +00:00
|
|
|
Runtime/Realm.cpp
|
2020-05-06 15:40:06 +00:00
|
|
|
Runtime/Reference.cpp
|
|
|
|
Runtime/ReflectObject.cpp
|
2020-06-03 23:05:49 +00:00
|
|
|
Runtime/RegExpConstructor.cpp
|
2022-10-17 00:59:27 +00:00
|
|
|
Runtime/RegExpLegacyStaticProperties.cpp
|
2020-06-03 23:05:49 +00:00
|
|
|
Runtime/RegExpObject.cpp
|
|
|
|
Runtime/RegExpPrototype.cpp
|
2021-07-15 12:58:27 +00:00
|
|
|
Runtime/RegExpStringIterator.cpp
|
|
|
|
Runtime/RegExpStringIteratorPrototype.cpp
|
2021-06-08 21:08:47 +00:00
|
|
|
Runtime/Set.cpp
|
|
|
|
Runtime/SetConstructor.cpp
|
2021-06-08 21:17:17 +00:00
|
|
|
Runtime/SetIterator.cpp
|
|
|
|
Runtime/SetIteratorPrototype.cpp
|
2021-06-08 21:08:47 +00:00
|
|
|
Runtime/SetPrototype.cpp
|
2021-10-13 20:08:48 +00:00
|
|
|
Runtime/ShadowRealm.cpp
|
2021-10-13 20:09:45 +00:00
|
|
|
Runtime/ShadowRealmConstructor.cpp
|
|
|
|
Runtime/ShadowRealmPrototype.cpp
|
2020-05-06 15:40:06 +00:00
|
|
|
Runtime/Shape.cpp
|
2023-07-01 04:07:26 +00:00
|
|
|
Runtime/SharedArrayBufferConstructor.cpp
|
|
|
|
Runtime/SharedArrayBufferPrototype.cpp
|
2020-05-06 15:40:06 +00:00
|
|
|
Runtime/StringConstructor.cpp
|
2020-07-12 03:23:01 +00:00
|
|
|
Runtime/StringIterator.cpp
|
|
|
|
Runtime/StringIteratorPrototype.cpp
|
2020-05-06 15:40:06 +00:00
|
|
|
Runtime/StringObject.cpp
|
|
|
|
Runtime/StringPrototype.cpp
|
2022-12-06 01:10:01 +00:00
|
|
|
Runtime/SuppressedError.cpp
|
|
|
|
Runtime/SuppressedErrorConstructor.cpp
|
|
|
|
Runtime/SuppressedErrorPrototype.cpp
|
2020-04-30 06:25:21 +00:00
|
|
|
Runtime/Symbol.cpp
|
|
|
|
Runtime/SymbolConstructor.cpp
|
|
|
|
Runtime/SymbolObject.cpp
|
|
|
|
Runtime/SymbolPrototype.cpp
|
2021-07-11 18:04:11 +00:00
|
|
|
Runtime/Temporal/AbstractOperations.cpp
|
|
|
|
Runtime/Temporal/Calendar.cpp
|
2021-07-14 20:01:12 +00:00
|
|
|
Runtime/Temporal/CalendarConstructor.cpp
|
|
|
|
Runtime/Temporal/CalendarPrototype.cpp
|
2021-07-15 22:20:43 +00:00
|
|
|
Runtime/Temporal/Duration.cpp
|
|
|
|
Runtime/Temporal/DurationConstructor.cpp
|
|
|
|
Runtime/Temporal/DurationPrototype.cpp
|
2021-07-07 16:41:37 +00:00
|
|
|
Runtime/Temporal/Instant.cpp
|
|
|
|
Runtime/Temporal/InstantConstructor.cpp
|
|
|
|
Runtime/Temporal/InstantPrototype.cpp
|
2021-11-19 18:04:50 +00:00
|
|
|
Runtime/Temporal/ISO8601.cpp
|
2021-07-06 18:33:20 +00:00
|
|
|
Runtime/Temporal/Now.cpp
|
2021-07-11 18:04:11 +00:00
|
|
|
Runtime/Temporal/PlainDate.cpp
|
2021-07-18 21:29:26 +00:00
|
|
|
Runtime/Temporal/PlainDateConstructor.cpp
|
|
|
|
Runtime/Temporal/PlainDatePrototype.cpp
|
2021-07-11 18:04:11 +00:00
|
|
|
Runtime/Temporal/PlainDateTime.cpp
|
2021-07-22 18:47:07 +00:00
|
|
|
Runtime/Temporal/PlainDateTimeConstructor.cpp
|
|
|
|
Runtime/Temporal/PlainDateTimePrototype.cpp
|
2021-08-14 22:54:24 +00:00
|
|
|
Runtime/Temporal/PlainMonthDay.cpp
|
|
|
|
Runtime/Temporal/PlainMonthDayConstructor.cpp
|
|
|
|
Runtime/Temporal/PlainMonthDayPrototype.cpp
|
2021-07-11 18:04:11 +00:00
|
|
|
Runtime/Temporal/PlainTime.cpp
|
2021-07-28 17:36:52 +00:00
|
|
|
Runtime/Temporal/PlainTimeConstructor.cpp
|
|
|
|
Runtime/Temporal/PlainTimePrototype.cpp
|
2021-07-26 23:21:16 +00:00
|
|
|
Runtime/Temporal/PlainYearMonth.cpp
|
2021-08-07 21:40:32 +00:00
|
|
|
Runtime/Temporal/PlainYearMonthConstructor.cpp
|
|
|
|
Runtime/Temporal/PlainYearMonthPrototype.cpp
|
2021-07-06 18:14:47 +00:00
|
|
|
Runtime/Temporal/Temporal.cpp
|
2021-07-06 22:53:27 +00:00
|
|
|
Runtime/Temporal/TimeZone.cpp
|
|
|
|
Runtime/Temporal/TimeZoneConstructor.cpp
|
2024-02-18 02:13:36 +00:00
|
|
|
Runtime/Temporal/TimeZoneMethods.cpp
|
2021-07-06 22:53:27 +00:00
|
|
|
Runtime/Temporal/TimeZonePrototype.cpp
|
2021-08-01 16:20:11 +00:00
|
|
|
Runtime/Temporal/ZonedDateTime.cpp
|
|
|
|
Runtime/Temporal/ZonedDateTimeConstructor.cpp
|
|
|
|
Runtime/Temporal/ZonedDateTimePrototype.cpp
|
2020-12-01 20:05:25 +00:00
|
|
|
Runtime/TypedArray.cpp
|
2020-12-02 00:23:40 +00:00
|
|
|
Runtime/TypedArrayConstructor.cpp
|
|
|
|
Runtime/TypedArrayPrototype.cpp
|
2021-08-09 12:58:31 +00:00
|
|
|
Runtime/Utf16String.cpp
|
2020-05-06 15:40:06 +00:00
|
|
|
Runtime/Value.cpp
|
2021-07-11 02:39:42 +00:00
|
|
|
Runtime/VM.cpp
|
2021-07-21 17:57:41 +00:00
|
|
|
Runtime/WeakContainer.cpp
|
2021-06-12 02:28:30 +00:00
|
|
|
Runtime/WeakMap.cpp
|
|
|
|
Runtime/WeakMapConstructor.cpp
|
|
|
|
Runtime/WeakMapPrototype.cpp
|
2021-06-12 14:38:34 +00:00
|
|
|
Runtime/WeakRef.cpp
|
|
|
|
Runtime/WeakRefConstructor.cpp
|
|
|
|
Runtime/WeakRefPrototype.cpp
|
2021-06-09 16:23:04 +00:00
|
|
|
Runtime/WeakSet.cpp
|
|
|
|
Runtime/WeakSetConstructor.cpp
|
|
|
|
Runtime/WeakSetPrototype.cpp
|
2023-06-24 15:27:30 +00:00
|
|
|
Runtime/WrapForValidIteratorPrototype.cpp
|
2021-10-13 20:08:48 +00:00
|
|
|
Runtime/WrappedFunction.cpp
|
2021-09-09 16:02:31 +00:00
|
|
|
Script.cpp
|
LibJS: Reduce AST memory usage by shrink-wrapping source range info
Before this change, each AST node had a 64-byte SourceRange member.
This SourceRange had the following layout:
filename: StringView (16 bytes)
start: Position (24 bytes)
end: Position (24 bytes)
The Position structs have { line, column, offset }, all members size_t.
To reduce memory consumption, AST nodes now only store the following:
source_code: NonnullRefPtr<SourceCode> (8 bytes)
start_offset: u32 (4 bytes)
end_offset: u32 (4 bytes)
SourceCode is a new ref-counted data structure that keeps the filename
and original parsed source code in a single location, and all AST nodes
have a pointer to it.
The start_offset and end_offset can be turned into (line, column) when
necessary by calling SourceCode::range_from_offsets(). This will walk
the source code string and compute line/column numbers on the fly, so
it's not necessarily fast, but it should be rare since this information
is primarily used for diagnostics and exception stack traces.
With this, ASTNode shrinks from 80 bytes to 32 bytes. This gives us a
~23% reduction in memory usage when loading twitter.com/awesomekling
(330 MiB before, 253 MiB after!) :^)
2022-11-21 16:37:38 +00:00
|
|
|
SourceCode.cpp
|
2021-09-14 18:51:16 +00:00
|
|
|
SourceTextModule.cpp
|
2021-02-07 15:56:02 +00:00
|
|
|
SyntaxHighlighter.cpp
|
2022-01-27 13:51:21 +00:00
|
|
|
SyntheticModule.cpp
|
2020-05-06 15:40:06 +00:00
|
|
|
Token.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
serenity_lib(LibJS js)
|
2024-02-19 12:59:58 +00:00
|
|
|
target_link_libraries(LibJS PRIVATE LibCore LibCrypto LibFileSystem LibRegex LibSyntax LibLocale LibUnicode LibTimeZone)
|
2023-10-23 16:37:29 +00:00
|
|
|
if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
|
|
|
|
target_link_libraries(LibJS PRIVATE LibX86)
|
|
|
|
endif()
|
2023-11-04 17:39:10 +00:00
|
|
|
|
|
|
|
# TODO: This is probably also needed on RISC-V.
|
|
|
|
if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "i.86.*")
|
|
|
|
target_link_libraries(LibJS PRIVATE atomic)
|
|
|
|
endif()
|
|
|
|
|
2023-10-31 23:39:28 +00:00
|
|
|
target_compile_options(LibJS PRIVATE -fno-omit-frame-pointer)
|