Skip to content

Commit c93952f

Browse files
committed
Ladybird: Run with the JavaScript bytecode VM by default
The AST interpreter is still available behind a new `--ast` flag.
1 parent 875a8a3 commit c93952f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Ladybird/main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,15 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
7070
StringView webdriver_content_ipc_path;
7171
bool enable_callgrind_profiling = false;
7272
bool enable_sql_database = false;
73-
bool use_javascript_bytecode = false;
73+
bool use_ast_interpreter = false;
7474

7575
Core::ArgsParser args_parser;
7676
args_parser.set_general_help("The Ladybird web browser :^)");
7777
args_parser.add_positional_argument(raw_url, "URL to open", "url", Core::ArgsParser::Required::No);
7878
args_parser.add_option(webdriver_content_ipc_path, "Path to WebDriver IPC for WebContent", "webdriver-content-path", 0, "path");
7979
args_parser.add_option(enable_callgrind_profiling, "Enable Callgrind profiling", "enable-callgrind-profiling", 'P');
8080
args_parser.add_option(enable_sql_database, "Enable SQL database", "enable-sql-database", 0);
81-
args_parser.add_option(use_javascript_bytecode, "Enable JavaScript bytecode VM", "use-bytecode", 0);
81+
args_parser.add_option(use_ast_interpreter, "Enable JavaScript AST interpreter (deprecated)", "ast", 0);
8282
args_parser.parse(arguments);
8383

8484
auto get_formatted_url = [&](StringView const& raw_url) -> ErrorOr<URL> {
@@ -101,7 +101,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
101101
auto cookie_jar = database ? TRY(Browser::CookieJar::create(*database)) : Browser::CookieJar::create();
102102

103103
s_settings = adopt_own_if_nonnull(new Browser::Settings());
104-
BrowserWindow window(cookie_jar, webdriver_content_ipc_path, enable_callgrind_profiling ? WebView::EnableCallgrindProfiling::Yes : WebView::EnableCallgrindProfiling::No, use_javascript_bytecode ? WebView::UseJavaScriptBytecode::Yes : WebView::UseJavaScriptBytecode::No);
104+
BrowserWindow window(cookie_jar, webdriver_content_ipc_path, enable_callgrind_profiling ? WebView::EnableCallgrindProfiling::Yes : WebView::EnableCallgrindProfiling::No, use_ast_interpreter ? WebView::UseJavaScriptBytecode::No : WebView::UseJavaScriptBytecode::Yes);
105105
window.setWindowTitle("Ladybird");
106106
window.resize(800, 600);
107107
window.show();

0 commit comments

Comments
 (0)