mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
LibJS: Avoid unnecessary SourceRange construction in parse_program()
This takes `test-js` runtime from 4.3 sec to 4.1 sec on my machine.
This commit is contained in:
committed by
Linus Groh
parent
f0482b61bf
commit
d16fab5815
@@ -497,7 +497,7 @@ NonnullRefPtr<Program> Parser::parse_program(bool starts_in_strict_mode)
|
||||
else
|
||||
parse_module(program);
|
||||
|
||||
program->source_range().end = position();
|
||||
program->set_end_offset({}, position().offset);
|
||||
return program;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user