mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:18:11 +00:00
LibJS: Implement Function.prototype.bind()
This commit is contained in:
parent
b3800829da
commit
1fa0c7304d
10 changed files with 317 additions and 6 deletions
|
@ -114,9 +114,8 @@ Value CallExpression::execute(Interpreter& interpreter) const
|
|||
auto& function = static_cast<Function&>(callee.as_object());
|
||||
|
||||
MarkedValueList arguments(interpreter.heap());
|
||||
for (auto bound_argument : function.bound_arguments()) {
|
||||
arguments.append(bound_argument);
|
||||
}
|
||||
arguments.values().append(function.bound_arguments());
|
||||
|
||||
for (size_t i = 0; i < m_arguments.size(); ++i) {
|
||||
auto value = m_arguments[i].execute(interpreter);
|
||||
if (interpreter.exception())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue