mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:58:11 +00:00
LibJS: Split Function into subclasses NativeFunction and ScriptFunction
Both types of functions are now Function and implement calling via: virtual Value call(Interpreter&, Vector<Value> arguments); This removes the need for CallExpression::execute() to care about which kind of function it's calling. :^)
This commit is contained in:
parent
de6f697eba
commit
d9c7009604
9 changed files with 133 additions and 42 deletions
|
@ -29,10 +29,7 @@
|
|||
|
||||
namespace JS {
|
||||
|
||||
Function::Function(String name, const ScopeNode& body, Vector<String> parameters)
|
||||
: m_name(move(name))
|
||||
, m_body(body)
|
||||
, m_parameters(move(parameters))
|
||||
Function::Function()
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue