mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 02:29:21 +00:00
LibJS: Add the CreateMappedArgumentsObject abstract operation
This patch adds a new ArgumentsObject class to represent what the spec calls "Arguments Exotic Objects" These are constructed by the new CreateMappedArgumentsObject when the `arguments` identifier is resolved in a callee context. The implementation is incomplete and doesn't yet support mapping of the parameter variables to the indexed properties of `arguments`.
This commit is contained in:
parent
a55cf08ef9
commit
2d4eb40f59
Notes:
sideshowbarker
2024-07-18 11:24:01 +09:00
Author: https://github.com/awesomekling
Commit: 2d4eb40f59
8 changed files with 95 additions and 10 deletions
23
Userland/Libraries/LibJS/Runtime/ArgumentsObject.h
Normal file
23
Userland/Libraries/LibJS/Runtime/ArgumentsObject.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibJS/Runtime/Object.h>
|
||||
|
||||
namespace JS {
|
||||
|
||||
class ArgumentsObject final : public Object {
|
||||
JS_OBJECT(ArgumentsObject, Object);
|
||||
|
||||
public:
|
||||
explicit ArgumentsObject(GlobalObject&);
|
||||
|
||||
virtual void initialize(GlobalObject&) override;
|
||||
virtual ~ArgumentsObject() override;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue