1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 03:57:43 +00:00

LibJS: Remove use of Interpreter& in JSONObject code

This commit is contained in:
Andreas Kling 2020-09-27 18:52:42 +02:00
parent f79d4c7347
commit aaa8b48a4c
6 changed files with 73 additions and 70 deletions

View file

@ -40,7 +40,7 @@ public:
// The base implementation of stringify is exposed because it is used by
// test-js to communicate between the JS tests and the C++ test runner.
static String stringify_impl(Interpreter&, GlobalObject&, Value value, Value replacer, Value space);
static String stringify_impl(GlobalObject&, Value value, Value replacer, Value space);
private:
struct StringifyState {
@ -52,16 +52,16 @@ private:
};
// Stringify helpers
static String serialize_json_property(Interpreter&, StringifyState&, const PropertyName& key, Object* holder);
static String serialize_json_object(Interpreter&, StringifyState&, Object&);
static String serialize_json_array(Interpreter&, StringifyState&, Object&);
static String serialize_json_property(GlobalObject&, StringifyState&, const PropertyName& key, Object* holder);
static String serialize_json_object(GlobalObject&, StringifyState&, Object&);
static String serialize_json_array(GlobalObject&, StringifyState&, Object&);
static String quote_json_string(String);
// Parse helpers
static Object* parse_json_object(Interpreter&, GlobalObject&, const JsonObject&);
static Array* parse_json_array(Interpreter&, GlobalObject&, const JsonArray&);
static Value parse_json_value(Interpreter&, GlobalObject&, const JsonValue&);
static Value internalize_json_property(Interpreter&, Object* holder, const PropertyName& name, Function& reviver);
static Object* parse_json_object(GlobalObject&, const JsonObject&);
static Array* parse_json_array(GlobalObject&, const JsonArray&);
static Value parse_json_value(GlobalObject&, const JsonValue&);
static Value internalize_json_property(GlobalObject&, Object* holder, const PropertyName& name, Function& reviver);
JS_DECLARE_NATIVE_FUNCTION(stringify);
JS_DECLARE_NATIVE_FUNCTION(parse);