mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 08:57:35 +00:00
LibJS: Identify global variables during parsing
Identifying global variables during parsing will make it possible to generate special optimized instruction to access them in upcoming changes.
This commit is contained in:
parent
73f1c7a030
commit
b0a533dbc0
5 changed files with 75 additions and 20 deletions
|
@ -2717,6 +2717,8 @@ void Identifier::dump(int indent) const
|
|||
print_indent(indent);
|
||||
if (is_local()) {
|
||||
outln("Identifier \"{}\" is_local=(true) index=({})", m_string, m_local_variable_index);
|
||||
} else if (is_global()) {
|
||||
outln("Identifier \"{}\" is_global=(true)", m_string);
|
||||
} else {
|
||||
outln("Identifier \"{}\"", m_string);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue