LibJS: Add js_string(Interpreter&, String)

This commit is contained in:
Andreas Kling 2020-04-04 12:57:37 +02:00
commit faac43597a
Notes: sideshowbarker 2024-07-19 07:56:37 +09:00
11 changed files with 33 additions and 26 deletions

View file

@ -25,6 +25,7 @@
*/
#include <LibJS/Heap/Heap.h>
#include <LibJS/Interpreter.h>
#include <LibJS/Runtime/PrimitiveString.h>
namespace JS {
@ -43,4 +44,9 @@ PrimitiveString* js_string(Heap& heap, String string)
return heap.allocate<PrimitiveString>(move(string));
}
PrimitiveString* js_string(Interpreter& interpreter, String string)
{
return js_string(interpreter.heap(), string);
}
}