示例#1
0
 public AddressOfVisitor(
     FunctionStackLayout layout,
     SemanticModule module,
     StructLayoutManager structLayoutManager)
 {
     _layout = layout;
     _module = module;
     _structLayoutManager = structLayoutManager;
 }
示例#2
0
 public UnaryOperationCodeGenVisitor(FunctionBuilder builder, IExpressionVisitor expressionVisitor, SemanticModule semanticModule, ILTypeSizeManager typeSizeManager, FunctionStackLayout functionStackLayout, StructLayoutManager structLayoutManager)
 {
     _builder             = builder;
     _expressionVisitor   = expressionVisitor;
     _semanticModule      = semanticModule;
     _typeSizeManager     = typeSizeManager;
     _functionStackLayout = functionStackLayout;
     _structLayoutManager = structLayoutManager;
 }
示例#3
0
        public StructLayout Generate(StructType structType, StructLayoutManager manager)
        {
            Dictionary <DeclarationNode, int> offsets = new Dictionary <DeclarationNode, int>();
            int nextOffset = 0;

            foreach (DeclarationNode declaration in structType.Struct.Members)
            {
                offsets.Add(declaration, nextOffset);
                nextOffset += _typeSizeManager.GetSize(((TypeSpecifierNode)declaration.Type).Type);
            }

            return(new StructLayout(offsets, nextOffset));
        }
示例#4
0
 public FunctionCodeGenVisitor(
     FunctionBuilder functionBuilder,
     FunctionStackLayout layout,
     FunctionManager functionManager,
     SemanticModule module,
     SemanticContext semanticContext,
     StructLayoutManager structLayoutManager,
     ILTypeSizeManager typeSizeManager,
     List <string> strings
     )
 {
     _functionBuilder     = functionBuilder;
     _layout              = layout;
     _functionManager     = functionManager;
     _module              = module;
     _semanticContext     = semanticContext;
     _structLayoutManager = structLayoutManager;
     _typeSizeManager     = typeSizeManager;
     _strings             = strings;
 }
示例#5
0
 public ILTypeSizeManager(StructLayoutManager structLayoutManager)
 {
     _structLayoutManager = structLayoutManager;
 }