Browse Source

Fix: unintended InstructionMerge of GetTable

Akeit0 8 months ago
parent
commit
903068d74e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Lua/CodeAnalysis/Compilation/FunctionCompilationContext.cs

+ 1 - 1
src/Lua/CodeAnalysis/Compilation/FunctionCompilationContext.cs

@@ -147,7 +147,7 @@ public class FunctionCompilationContext : IDisposable
                         case OpCode.LoadNil when lastInstruction.B == 0:
                         case OpCode.LoadNil when lastInstruction.B == 0:
                         case OpCode.GetUpVal:
                         case OpCode.GetUpVal:
                         case OpCode.GetTabUp:
                         case OpCode.GetTabUp:
-                        case OpCode.GetTable:
+                        case OpCode.GetTable  when !activeLocals[lastInstruction.B]:
                         case OpCode.SetTabUp:
                         case OpCode.SetTabUp:
                         case OpCode.SetUpVal:
                         case OpCode.SetUpVal:
                         case OpCode.SetTable:
                         case OpCode.SetTable: