Exemplo n.º 1
0
        private void CGTableAccessExp(FuncInfo funcInfo, TableAccessExpNode node, int a)
        {
            int b = funcInfo.AllocReg();

            CGExp(funcInfo, node.PreExp, b, 1);
            int c = funcInfo.AllocReg();

            CGExp(funcInfo, node.Exp, c, 1);
            funcInfo.EmitGetTable(a, b, c);
            funcInfo.FreeRegs(2);
        }