Exemple #1
0
        Result BranchResult(ContextBase context, Category category, Value syntax)
        {
            var result = context.Result(category.Typed, syntax);
            if(result == null)
                return null;

            var branchResult = result;

            var commonType = CommonType(context);
            return branchResult.Type
                .Conversion(category.Typed, commonType)
                .ReplaceArg(branchResult)
                & category;
        }
 protected override Result Result(ContextBase context, Category category, Value left)
     => context.Result(category.Typed, left)
         .Type
         .FunctionInstance
         .Result(category, context.Result(category.Typed, left));
Exemple #3
0
 Result CondResult(ContextBase context, Category category)
     => context.Result(category.Typed, Cond)
         .Conversion(context.RootContext.BitType.Align)
         .LocalBlock(category.Typed)
         .Conversion(context.RootContext.BitType);
Exemple #4
0
        internal Result Cleanup(ContextBase context, Category category)
        {
            if(CleanupSection != null && (category.HasCode || category.HasExts))
                return context
                    .Result(category.Typed, CleanupSection)
                    .Conversion(context.RootContext.VoidType)
                    .LocalBlock(category) & category;

            return context.RootContext.VoidType.Result(category);
        }