Changeset b87a5ed for libcfa


Ignore:
Timestamp:
May 16, 2015, 3:36:19 PM (9 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
Children:
a32b204
Parents:
b8508a2
Message:

licencing: first groups of files

Location:
libcfa
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libcfa/Makefile.in

    rb8508a2 rb87a5ed  
     1######################### -*- Mode: Makefile-Gmake -*- ########################
     2##
     3## Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
     4##
     5## The contents of this file are covered under the licence agreement in the
     6## file "LICENCE" distributed with Cforall.
     7##
     8## Makefile.in --
     9##
     10## Author           : Peter A. Buhr
     11## Created On       : Sat May 16 08:05:18 2015
     12## Last Modified By : Peter A. Buhr
     13## Last Modified On : Sat May 16 08:06:05 2015
     14## Update Count     : 1
     15###############################################################################
     16
    117INSTALL=@INSTALL@
    218BACKEND_CC := @BACKEND_CC@
  • libcfa/prototypes.awk

    rb8508a2 rb87a5ed  
     1#
     2# Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
     3#
     4# The contents of this file are covered under the licence agreement in the
     5# file "LICENCE" distributed with Cforall.
     6#
     7# prototypes.awk --
     8#
     9# Author           : Peter A. Buhr
     10# Created On       : Sat May 16 07:57:37 2015
     11# Last Modified By : Peter A. Buhr
     12# Last Modified On : Sat May 16 08:02:10 2015
     13# Update Count     : 3
     14#
     15
    116# http://llvm.org/svn/llvm-project/cfe/trunk/include/clang/Basic/Builtins.def
    217
     
    419    FS = "("
    520    # order so string search is longest string
    6     types[0]  = "UINTMAX";                      vtypes[0]  = "unsigned long int"
    7     types[1]  = "UINT16";                       vtypes[1]  = "short int"
    8     types[2]  = "UINT32";                       vtypes[2]  = "int"
    9     types[3]  = "UINT64";                       vtypes[3]  = "long long int"
    10     types[4]  = "UINT";                         vtypes[4]  = "unsigned int"
    11     types[5]  = "INTMAX";                       vtypes[5]  = "long int"
    12     types[6]  = "INTPTR";                       vtypes[6]  = "int *"
    13     types[7]  = "WINT";                         vtypes[7]  = "unsigned int"
    14     types[8]  = "INT";                          vtypes[8]  = "int"
    15     types[9]  = "ULONGLONG";                    vtypes[9]  = "unsigned long long"
    16     types[10] = "ULONG";                        vtypes[10] = "unsigned long"
    17     types[11] = "UNSIGNED";                     vtypes[11] = "unsigned"
     21    types[0]  = "UINTMAX";                                      vtypes[0]  = "unsigned long int"
     22    types[1]  = "UINT16";                                       vtypes[1]  = "short int"
     23    types[2]  = "UINT32";                                       vtypes[2]  = "int"
     24    types[3]  = "UINT64";                                       vtypes[3]  = "long long int"
     25    types[4]  = "UINT";                                         vtypes[4]  = "unsigned int"
     26    types[5]  = "INTMAX";                                       vtypes[5]  = "long int"
     27    types[6]  = "INTPTR";                                       vtypes[6]  = "int *"
     28    types[7]  = "WINT";                                         vtypes[7]  = "unsigned int"
     29    types[8]  = "INT";                                          vtypes[8]  = "int"
     30    types[9]  = "ULONGLONG";                            vtypes[9]  = "unsigned long long"
     31    types[10] = "ULONG";                                        vtypes[10] = "unsigned long"
     32    types[11] = "UNSIGNED";                                     vtypes[11] = "unsigned"
    1833    types[12] = "COMPLEX_LONGDOUBLE";           vtypes[12] = "_Complex long double"
    19     types[13] = "COMPLEX_DOUBLE";               vtypes[13] = "_Complex double"
    20     types[14] = "COMPLEX_FLOAT";                vtypes[14] = "_Complex float"
    21     types[15] = "LONGDOUBLEPTR";                vtypes[15] = "long double *"
    22     types[16] = "LONGDOUBLE";                   vtypes[16] = "long double"
    23     types[17] = "LONGLONG";                     vtypes[17] = "long long"
    24     types[18] = "LONG";                         vtypes[18] = "long"
    25     types[19] = "DFLOAT32";                     vtypes[19] = "_Decimal32"
    26     types[20] = "DFLOAT64";                     vtypes[20] = "_Decimal64"
    27     types[21] = "DFLOAT128";                    vtypes[21] = "_Decimal128"
    28     types[22] = "DOUBLEPTR";                    vtypes[22] = "double *"
    29     types[23] = "DOUBLE";                       vtypes[23] = "double"
    30     types[24] = "FLOATPTR";                     vtypes[24] = "float *"
    31     types[25] = "FLOAT";                        vtypes[25] = "float"
    32     types[26] = "CONST_PTR";                    vtypes[26] = "const void *"
    33     types[27] = "CONST_STRING";                 vtypes[27] = "const char *"
     34    types[13] = "COMPLEX_DOUBLE";                       vtypes[13] = "_Complex double"
     35    types[14] = "COMPLEX_FLOAT";                        vtypes[14] = "_Complex float"
     36    types[15] = "LONGDOUBLEPTR";                        vtypes[15] = "long double *"
     37    types[16] = "LONGDOUBLE";                           vtypes[16] = "long double"
     38    types[17] = "LONGLONG";                                     vtypes[17] = "long long"
     39    types[18] = "LONG";                                         vtypes[18] = "long"
     40    types[19] = "DFLOAT32";                                     vtypes[19] = "_Decimal32"
     41    types[20] = "DFLOAT64";                                     vtypes[20] = "_Decimal64"
     42    types[21] = "DFLOAT128";                            vtypes[21] = "_Decimal128"
     43    types[22] = "DOUBLEPTR";                            vtypes[22] = "double *"
     44    types[23] = "DOUBLE";                                       vtypes[23] = "double"
     45    types[24] = "FLOATPTR";                                     vtypes[24] = "float *"
     46    types[25] = "FLOAT";                                        vtypes[25] = "float"
     47    types[26] = "CONST_PTR";                            vtypes[26] = "const void *"
     48    types[27] = "CONST_STRING";                         vtypes[27] = "const char *"
    3449    types[28] = "PTR_FN_VOID_VAR_PTR_SIZE";     vtypes[28] = ""
    35     types[29] = "PTR_CONST_STRING";             vtypes[29] = "char *const"
    36     types[30] = "PTRMODE_PTR";                  vtypes[30] = ""
    37     types[31] = "PTRPTR";                       vtypes[31] = "void **"
    38     types[32] = "PTR";                          vtypes[32] = "void *"
    39     types[33] = "VOID";                         vtypes[33] = "void"
    40     types[34] = "STRING";                       vtypes[34] = "char *"
    41     types[35] = "FILEPTR";                      vtypes[35] = "struct _IO_FILE *"
    42     types[36] = "SIZE";                         vtypes[36] = "unsigned long"
    43     types[37] = "VAR";                          vtypes[37] = "..."
    44     types[38] = "VALIST_ARG";                   vtypes[38] = "void **"
    45     types[39] = "VALIST_REF";                   vtypes[39] = "void **"
    46     types[40] = "UNWINDWORD";                   vtypes[40] = "void *"
    47     types[41] = "WORD";                         vtypes[41] = ""
    48     types[42] = "SSIZE";                        vtypes[42] = "long int"
    49     types[43] = "PID";                          vtypes[43] = "int"
     50    types[29] = "PTR_CONST_STRING";                     vtypes[29] = "char *const"
     51    types[30] = "PTRMODE_PTR";                          vtypes[30] = ""
     52    types[31] = "PTRPTR";                                       vtypes[31] = "void **"
     53    types[32] = "PTR";                                          vtypes[32] = "void *"
     54    types[33] = "VOID";                                         vtypes[33] = "void"
     55    types[34] = "STRING";                                       vtypes[34] = "char *"
     56    types[35] = "FILEPTR";                                      vtypes[35] = "struct _IO_FILE *"
     57    types[36] = "SIZE";                                         vtypes[36] = "unsigned long"
     58    types[37] = "VAR";                                          vtypes[37] = "..."
     59    types[38] = "VALIST_ARG";                           vtypes[38] = "void **"
     60    types[39] = "VALIST_REF";                           vtypes[39] = "void **"
     61    types[40] = "UNWINDWORD";                           vtypes[40] = "void *"
     62    types[41] = "WORD";                                         vtypes[41] = ""
     63    types[42] = "SSIZE";                                        vtypes[42] = "long int"
     64    types[43] = "PID";                                          vtypes[43] = "int"
    5065    N = 44
    5166} # BEGIN
     
    6075    # generate C types for macros names
    6176    for ( i = 0; i < N; i += 1 ) {
    62         printf( "#define BT_%s %s\n", types[i], vtypes[i] )
     77                printf( "#define BT_%s %s\n", types[i], vtypes[i] )
    6378    } # for
    6479    printf( "\n" )
    6580
    6681    for ( prototype in prototypes ) {
    67         if ( index( "BT_LAST", prototype ) == 1 ) {
    68             continue
    69         } # if
     82                if ( index( "BT_LAST", prototype ) == 1 ) {
     83                        continue
     84                } # if
    7085
    71         printf( "#define %s(NAME) FUNC_SIMPLE(", prototype )
     86                printf( "#define %s(NAME) FUNC_SIMPLE(", prototype )
    7287
    73         if ( sub( "BT_FN_", "", prototype ) == 0 ) {
    74             printf( "\n********** BAD MACRO NAME \"%s\" **********\n", prototype )
    75             exit 0
    76         } # if
     88                if ( sub( "BT_FN_", "", prototype ) == 0 ) {
     89                        printf( "\n********** BAD MACRO NAME \"%s\" **********\n", prototype )
     90                        exit 0
     91                } # if
    7792
    78         # generate function return type as macro
    79         for ( t = 0; t < N; t += 1 ) {                  # find longest match
    80             type = types[t];
    81             if ( index( prototype, type ) == 1 ) {      # found match
    82                 printf( "BT_%s, NAME", type )
    83                 sub( type, "", prototype )
    84                 break;
    85             } # if
    86         } # for
     93                # generate function return type as macro
     94                for ( t = 0; t < N; t += 1 ) {                                  # find longest match
     95                        type = types[t];
     96                        if ( index( prototype, type ) == 1 ) {          # found match
     97                                printf( "BT_%s, NAME", type )
     98                                sub( type, "", prototype )
     99                                break;
     100                        } # if
     101                } # for
    87102
    88         # generate function parameter types as macro
    89         if ( index( prototype, "VAR" ) != 2 ) {         # C-style empty parameters ?
    90             for ( p = 0; length( prototype ) > 0; p += 1 ) { # until all parameters types are removed
    91                 sub( "_", "", prototype)                # remove "_"
    92                 printf( ", ", type )
    93                 temp = prototype
    94                 for ( t = 0; t < N; t += 1 ) {          # find longest match
    95                     type = types[t];
    96                     if ( index( prototype, type ) == 1 ) { # found match
    97                         printf( "BT_%s", type )
    98                         sub( type, "", prototype )
    99                         break;
    100                     } # if
    101                 } # for
    102                 if ( temp == prototype ) {              # no match found for parameter in macro table
    103                     printf( "\n********** MISSING TYPE \"%s\" **********\n", prototype )
    104                     exit 0
     103                # generate function parameter types as macro
     104                if ( index( prototype, "VAR" ) != 2 ) {                 # C-style empty parameters ?
     105                        for ( p = 0; length( prototype ) > 0; p += 1 ) { # until all parameters types are removed
     106                                sub( "_", "", prototype)                                # remove "_"
     107                                printf( ", ", type )
     108                                temp = prototype
     109                                for ( t = 0; t < N; t += 1 ) {                  # find longest match
     110                                        type = types[t];
     111                                        if ( index( prototype, type ) == 1 ) { # found match
     112                                                printf( "BT_%s", type )
     113                                                sub( type, "", prototype )
     114                                                break;
     115                                        } # if
     116                                } # for
     117                                if ( temp == prototype ) {                              # no match found for parameter in macro table
     118                                        printf( "\n********** MISSING TYPE \"%s\" **********\n", prototype )
     119                                        exit 0
     120                                } # if
     121                        } # for
    105122                } # if
    106             } # for
    107         } # if
    108         printf( ")\n" )
     123                printf( ")\n" )
    109124    } # for
    110125
     
    115130    printf( "typedef int wchar_t;\n" );
    116131} # END
     132
     133# Local Variables: #
     134# tab-width: 4 #
     135# mode: awk #
     136# compile-command: "make install" #
     137# End: #
Note: See TracChangeset for help on using the changeset viewer.