summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/Function.h
AgeCommit message (Collapse)Author
2021-06-27LibJS: Rename Function => FunctionObjectAndreas Kling
2021-06-25LibJS: Add the Function.[[ThisMode]] fieldAndreas Kling
This is not a behavioral change in itself, just prep work for future spec-compliance changes.
2021-06-25LibJS: FunctionEnvironment.[[FunctionObject]] is the *invoked* functionAndreas Kling
We were setting the wrong [[FunctionObject]] on the environment when going through ProxyObject and BoundFunction.
2021-06-22LibJS: Bring function environment records closer to the specAndreas Kling
This patch adds FunctionEnvironmentRecord as a subclass of the existing DeclarativeEnvironmentRecord. Things that are specific to function environment records move into there, simplifying the base. Most of the abstract operations related to function environment records are rewritten to match the spec exactly. I also had to implement GetThisEnvironment() and GetSuperConstructor() to keep tests working after the changes, so that's nice as well. :^)
2021-06-21LibJS: Rename Environment Records so they match the spec :^)Andreas Kling
This patch makes the following name changes: - ScopeObject => EnvironmentRecord - LexicalEnvironment => DeclarativeEnvironmentRecord - WithScope => ObjectEnvironmentRecord
2021-06-20LibJS: Consistently make prototype the last argument in Object ctorsLinus Groh
This is so that we can reliably allocate them in a template function, e.g. in ordinary_create_from_constructor(): global_object.heap().allocate<T>( global_object, forward<Args>(args)..., *prototype); The majority of objects already take the prototype as the last argument, so I updated the ones that didn't.
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-02-07LibJS: Function must mark its home objectAndreas Kling
2021-01-12Libraries: Move to Userland/Libraries/Andreas Kling