LibJS: Add js_string(Interpreter&, String)

This commit is contained in:
Andreas Kling
2020-04-04 12:57:37 +02:00
parent d8e944e899
commit faac43597a
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);
}
}