Esempio 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)); }
                                                     )
                         );
        }
Esempio n. 2
0
 protected override void DoUpdateResultType()
 {
     ResultType = ElementResultType.Create(m_values.Select(val => val.ResultType.ResultTypes[0]));
 }
Esempio 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();
 }
Esempio n. 4
0
 protected override void DoUpdateResultType()
 {
     ResultType = ElementResultType.Create(LanguageSymbols.Instance.GetTypeByName(VarType));
 }
Esempio n. 5
0
 protected override void DoUpdateResultType()
 {
     Type       = LanguageSymbols.Instance.GetTypeOfConstVal(m_value);
     ResultType = ElementResultType.Create(LanguageSymbols.Instance.GetTypeByName(Type));
 }
Esempio n. 6
0
 protected override void DoUpdateResultType()
 {
     ResultType = ElementResultType.Create(Child <ValueElement>(0).ResultType.ResultTypes);
 }