
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`.
23 lines
418 B
C++
23 lines
418 B
C++
/*
|
|
* 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;
|
|
};
|
|
|
|
}
|