1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 11:45:11 +00:00
serenity/Libraries/LibJS
Andreas Kling 7912f33ea0 LibJS: Add NativeFunction, a callable wrapper around a C++ lambda
This can be used to implement arbitrary functionality, callable from
JavaScript.

To make this work, I had to change the way CallExpression passes
arguments to the callee. Instead of a HashMap<String, Value>, we now
pass an ordered list of Argument { String name; Value value; }.

This patch includes a native "print(argument)" function. :^)
2020-03-12 19:54:47 +01:00
..
AST.cpp LibJS: Add NativeFunction, a callable wrapper around a C++ lambda 2020-03-12 19:54:47 +01:00
AST.h LibJS: Implement const variable declarations 2020-03-12 14:58:16 +01:00
Cell.cpp LibJS: Support "hello friends".length 2020-03-11 19:00:26 +01:00
Cell.h LibJS: Add a convenience helper for visiting a JS::Value 2020-03-09 22:19:06 +01:00
Forward.h LibJS: Add NativeFunction, a callable wrapper around a C++ lambda 2020-03-12 19:54:47 +01:00
Function.cpp LibJS: Allow functions to take arguments (#1405) 2020-03-12 12:22:13 +01:00
Function.h LibJS: Allow functions to take arguments (#1405) 2020-03-12 12:22:13 +01:00
Heap.cpp LibJS: Make the GC marking phase cycle-proof 2020-03-09 22:18:03 +01:00
Heap.h LibJS: Make the GC marking phase cycle-proof 2020-03-09 22:18:03 +01:00
HeapBlock.cpp LibJS: Add a basic mark&sweep garbage collector :^) 2020-03-08 19:23:58 +01:00
HeapBlock.h LibJS: Add a basic mark&sweep garbage collector :^) 2020-03-08 19:23:58 +01:00
Interpreter.cpp LibJS: Add NativeFunction, a callable wrapper around a C++ lambda 2020-03-12 19:54:47 +01:00
Interpreter.h LibJS: Add NativeFunction, a callable wrapper around a C++ lambda 2020-03-12 19:54:47 +01:00
Lexer.cpp LibJS: Fix some coding style mistakes in Lexer 2020-03-12 13:52:54 +01:00
Lexer.h LibJS: Parse === and !== binary operators 2020-03-12 13:42:23 +01:00
Makefile LibJS: Add NativeFunction, a callable wrapper around a C++ lambda 2020-03-12 19:54:47 +01:00
NativeFunction.cpp LibJS: Add NativeFunction, a callable wrapper around a C++ lambda 2020-03-12 19:54:47 +01:00
NativeFunction.h LibJS: Add NativeFunction, a callable wrapper around a C++ lambda 2020-03-12 19:54:47 +01:00
Object.cpp LibJS: Add a convenience helper for visiting a JS::Value 2020-03-09 22:19:06 +01:00
Object.h LibJS: Add NativeFunction, a callable wrapper around a C++ lambda 2020-03-12 19:54:47 +01:00
Parser.cpp LibJS: Parse CallExpression arguments 2020-03-12 19:35:23 +01:00
Parser.h LibJS: Implement for statement 2020-03-12 13:42:23 +01:00
PrimitiveString.cpp LibJS: Add a new PrimitiveString class to hold GC-allocated strings 2020-03-11 19:00:22 +01:00
PrimitiveString.h LibJS: Add a new PrimitiveString class to hold GC-allocated strings 2020-03-11 19:00:22 +01:00
StringObject.cpp LibJS: Add StringObject, an Object wrapper around primitive strings 2020-03-11 19:00:26 +01:00
StringObject.h LibJS: Add StringObject, an Object wrapper around primitive strings 2020-03-11 19:00:26 +01:00
Token.cpp LibJS: Add Javascript lexer and parser 2020-03-12 09:25:49 +01:00
Token.h LibJS: Implement for statement 2020-03-12 13:42:23 +01:00
Value.cpp LibJS: Implement <= and >= binary operators 2020-03-12 13:42:23 +01:00
Value.h LibJS: Implement <= and >= binary operators 2020-03-12 13:42:23 +01:00