mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-25 11:11:11 +08:00
refactor: emit 冗余标志参数收敛为内部推导
This commit is contained in:
@@ -397,22 +397,20 @@ impl CompileCtx {
|
||||
self.scopes.symbols.pop_scope();
|
||||
}
|
||||
|
||||
pub(crate) fn declare(
|
||||
&mut self, name: &str, reg: u32, kind: VariableDeclarationKind, is_const: bool,
|
||||
) -> Result<(), String> {
|
||||
self.scopes.symbols.declare(name, reg, kind, is_const)
|
||||
pub(crate) fn declare(&mut self, name: &str, reg: u32, kind: VariableDeclarationKind) -> Result<(), String> {
|
||||
self.scopes.symbols.declare(name, reg, kind)
|
||||
}
|
||||
|
||||
pub(crate) fn declare_initialized(
|
||||
&mut self, name: &str, reg: u32, kind: VariableDeclarationKind, is_const: bool,
|
||||
&mut self, name: &str, reg: u32, kind: VariableDeclarationKind,
|
||||
) -> Result<(), String> {
|
||||
self.scopes.symbols.declare_initialized(name, reg, kind, is_const)
|
||||
self.scopes.symbols.declare_initialized(name, reg, kind)
|
||||
}
|
||||
|
||||
pub(crate) fn declare_predeclared(
|
||||
&mut self, name: &str, reg: u32, kind: VariableDeclarationKind, is_const: bool,
|
||||
&mut self, name: &str, reg: u32, kind: VariableDeclarationKind,
|
||||
) -> Result<(), String> {
|
||||
self.scopes.symbols.declare_predeclared(name, reg, kind, is_const)
|
||||
self.scopes.symbols.declare_predeclared(name, reg, kind)
|
||||
}
|
||||
|
||||
pub(crate) fn push_scope_with_kind(&mut self, kind: ScopeKind) {
|
||||
|
||||
Reference in New Issue
Block a user