Skip to content
  • Sven/Sarah Barth's avatar
    Add support for Default() intrinsic. For now this is only (fully) supported · bd19a16b
    Sven/Sarah Barth authored
    in code and not in constants. In the case of primitive types constant nodes
    are used while complex types like arrays, records and objects use a local
    variable which is initialized to zero once at the entry of the method (the
    variable is reused if Default() is used for the same type multiple times in
    the same method). For this a new compilerproc was added which uses FillChar
    to initialize the given memory area to zero.
    This fixes Mantis #9420.
    
    + psystem.pas: Added Default symbol to system unit
    + htypechk.pas: Added function "is_valid_for_default" which checks recursively
                    whether the given type can be used with Default at all. 
                    Forbidden types are files, helpers, ObjC and C++ types. This
                    check is used for records, arrays and objects only if the mode
                    is a non-Delphi one, as Delphi ignores these types on lower
                    levels.
    + msg/errore.msg: Added error message ...
    bd19a16b