Andreas Kling
a82f64d3d6
LibJS: Parse ArrayExpression and start implementing Array objects
...
Note that property lookup is not functional yet.
2020-03-20 21:56:40 +01:00
Andreas Kling
218f082226
LibJS: Print a newline in each console.log()
2020-03-20 14:41:23 +01:00
Andreas Kling
1a10470c1d
LibJS: Implement basic object property assignment
...
This is pretty naive, we just walk up the prototype chain and call any
NativeProperty setter that we find. If we don't find one, we put/set
the value as an own property of the object itself.
2020-03-19 17:44:06 +01:00
Andreas Kling
97674da502
LibJS: Tolerate NativeFunction::call() with non-object 'this' for now
...
I'm not exactly sure why we end up in this situation, we'll have to
look into it.
2020-03-18 17:13:22 +01:00
Andreas Kling
ddd69e3660
LibJS: Make the AST reference-counted
...
This allows function objects to outlive the original parsed program
without their ScopeNode disappearing.
2020-03-18 11:23:53 +01:00
Andreas Kling
0a71533aff
LibJS: Pass argument value vectors as const Vector<Value>&
...
Now that Interpreter keeps all arguments in the CallFrame stack, we can
just pass a const-reference to the CallFrame's argument vector to each
function handler (instead of copying it.)
2020-03-17 16:24:53 +01:00
Andreas Kling
086f68e878
LibJS: Replace the global print() function with console.log() :^)
2020-03-16 14:58:20 +01:00
Andreas Kling
19452230cd
LibJS: Add "Heap" and "Runtime" subdirectories
...
Let's try to keep LibJS tidy as it expands. :^)
2020-03-16 14:37:19 +01:00