Exemplo n.º 1
0
        public FlatOperand Resolve(TypeSymbol type, FlatOperand into_lvalue, List<FlatStatement> instructions)
        {
            string type_fqn = type.GetFullyQualifiedName();
            if (into_lvalue == null)
            {
                FlatOperand register_fop = AllocateRegister("__resolvetype" + type_fqn);
                into_lvalue = register_fop.GetLValue(this, instructions);
            }

            FlatOperand fop_typefqn = FlatOperand.Immediate(FlatValue.String(type_fqn));
            instructions.Add(FlatStatement.RESOLVETYPE(into_lvalue, fop_typefqn));

            return into_lvalue.AsRValue(FlatValue.Type(type));
        }