Exemplo n.º 1
0
        protected override void DoUpdateResultType()
        {
            var leftChild  = Child <ValueElement>(0);
            var rightChild = Child <ValueElement>(1);

            Compilation.Assert(leftChild.NumberOfBranches == rightChild.NumberOfBranches,
                               "Values count at left of operation (" + leftChild.NumberOfBranches +
                               ") must be equal count at right (" + rightChild.NumberOfBranches + ")", Line);

            ResultType = ElementResultType.Create
                         (
                leftChild.ResultType.ResultTypes.Zip(rightChild.ResultType.ResultTypes,
                                                     (left, right) => { return(LanguageSymbols.Instance.GetMostPrecise(left, right)); }
                                                     )
                         );
        }
Exemplo n.º 2
0
 protected override void DoUpdateResultType()
 {
     ResultType = ElementResultType.Create(m_values.Select(val => val.ResultType.ResultTypes[0]));
 }
Exemplo n.º 3
0
 protected override void DoUpdateResultType()
 {
     ResultType        = ElementResultType.Create(FunctionInfo.ReturnTypes);
     m_returnTypesSize = (from retType in FunctionInfo.ReturnTypes
                          select LanguageSymbols.Instance.GetTypeSize(retType.Name)).ToList();
 }
Exemplo n.º 4
0
 protected override void DoUpdateResultType()
 {
     ResultType = ElementResultType.Create(LanguageSymbols.Instance.GetTypeByName(VarType));
 }
Exemplo n.º 5
0
 protected override void DoUpdateResultType()
 {
     Type       = LanguageSymbols.Instance.GetTypeOfConstVal(m_value);
     ResultType = ElementResultType.Create(LanguageSymbols.Instance.GetTypeByName(Type));
 }
Exemplo n.º 6
0
 protected override void DoUpdateResultType()
 {
     ResultType = ElementResultType.Create(Child <ValueElement>(0).ResultType.ResultTypes);
 }