mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 08:39:22 +00:00
LibJS: Replace PropertyKey(char[]) with PropertyKey(FlyString)
...and deal with the fallout.
This commit is contained in:
parent
d7908dbff5
commit
53da8893ac
Notes:
github-actions[bot]
2025-03-24 22:28:43 +00:00
Author: https://github.com/awesomekling
Commit: 53da8893ac
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4067
Reviewed-by: https://github.com/trflynn89
55 changed files with 254 additions and 251 deletions
|
@ -323,18 +323,18 @@ void ReplObject::initialize(JS::Realm& realm)
|
|||
{
|
||||
Base::initialize(realm);
|
||||
|
||||
define_direct_property("global", this, JS::Attribute::Enumerable);
|
||||
define_direct_property("global"_fly_string, this, JS::Attribute::Enumerable);
|
||||
u8 attr = JS::Attribute::Configurable | JS::Attribute::Writable | JS::Attribute::Enumerable;
|
||||
define_native_function(realm, "exit", exit_interpreter, 0, attr);
|
||||
define_native_function(realm, "help", repl_help, 0, attr);
|
||||
define_native_function(realm, "save", save_to_file, 1, attr);
|
||||
define_native_function(realm, "loadINI", load_ini, 1, attr);
|
||||
define_native_function(realm, "loadJSON", load_json, 1, attr);
|
||||
define_native_function(realm, "print", print, 1, attr);
|
||||
define_native_function(realm, "exit"_fly_string, exit_interpreter, 0, attr);
|
||||
define_native_function(realm, "help"_fly_string, repl_help, 0, attr);
|
||||
define_native_function(realm, "save"_fly_string, save_to_file, 1, attr);
|
||||
define_native_function(realm, "loadINI"_fly_string, load_ini, 1, attr);
|
||||
define_native_function(realm, "loadJSON"_fly_string, load_json, 1, attr);
|
||||
define_native_function(realm, "print"_fly_string, print, 1, attr);
|
||||
|
||||
define_native_accessor(
|
||||
realm,
|
||||
"_",
|
||||
"_"_fly_string,
|
||||
[](JS::VM&) {
|
||||
return g_last_value.value();
|
||||
},
|
||||
|
@ -410,11 +410,11 @@ void ScriptObject::initialize(JS::Realm& realm)
|
|||
{
|
||||
Base::initialize(realm);
|
||||
|
||||
define_direct_property("global", this, JS::Attribute::Enumerable);
|
||||
define_direct_property("global"_fly_string, this, JS::Attribute::Enumerable);
|
||||
u8 attr = JS::Attribute::Configurable | JS::Attribute::Writable | JS::Attribute::Enumerable;
|
||||
define_native_function(realm, "loadINI", load_ini, 1, attr);
|
||||
define_native_function(realm, "loadJSON", load_json, 1, attr);
|
||||
define_native_function(realm, "print", print, 1, attr);
|
||||
define_native_function(realm, "loadINI"_fly_string, load_ini, 1, attr);
|
||||
define_native_function(realm, "loadJSON"_fly_string, load_json, 1, attr);
|
||||
define_native_function(realm, "print"_fly_string, print, 1, attr);
|
||||
}
|
||||
|
||||
JS_DEFINE_NATIVE_FUNCTION(ScriptObject::load_ini)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue