Skip to content

Commit

Permalink
cleanup(compiler): Remove unused local variables after refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
bytexenon committed Jul 7, 2024
1 parent 88afe07 commit c71130a
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions the-tiny-lua-compiler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1464,9 +1464,6 @@ function InstructionGenerator.generate(ast)
return expressionRegister
end
local function compileFunctionNode(node, expressionRegister)
local codeblock = node.Codeblock
local parameters = node.Parameters
local isVarArg = node.isVarArg
processFunction(node, expressionRegister)
return expressionRegister
end
Expand Down Expand Up @@ -1658,19 +1655,13 @@ function InstructionGenerator.generate(ast)
end
local function compileLocalFunctionDeclarationNode(node)
local name = node.Name
local codeblock = node.Codeblock
local parameters = node.Parameters
local isVarArg = node.IsVarArg
local localRegister = allocateRegister()
registerVariable(name, localRegister)
processFunction(node, localRegister, name)
end
local function compileFunctionDeclarationNode(node)
local expression = node.Expression
local fields = node.Fields
local codeblock = node.Codeblock
local parameters = node.Parameters
local isVarArg = node.IsVarArg
if #fields > 0 then
local closureRegister = allocateRegister()
local lastField = fields[#fields]
Expand Down

0 comments on commit c71130a

Please sign in to comment.