Changeset ec5d599


Ignore:
Timestamp:
Dec 5, 2020, 8:48:42 AM (4 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
e91a255
Parents:
7c1144b (diff), ad915e0 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Files:
4 added
6 edited
4 moved

Legend:

Unmodified
Added
Removed
  • Jenkins/Distribute

    r7c1144b rec5d599  
    2626                wrap([$class: 'TimestamperBuildWrapper']) {
    2727
    28                         final commit = prepare_build()
     28                        final commit, build
     29                        (commit, build) = prepare_build()
    2930
    3031                        node('x64') {
     
    3536
    3637                                Tools.Checkout( commit )
     38
     39                                final version = GetVersion( build )
    3740                        }
    3841
     
    7477// Main compilation routines
    7578//===========================================================================================================
     79def GetVersion(build) {
     80        final pver = sh(
     81                returnStdout: true,
     82                script: "sed 's/AC_INIT(\\[cfa-cc\\],\\[\\(.*\\)\\],\\[cforall@plg.uwaterloo.ca\\])/\\1/;t;d' ${SrcDir}/configure.ac"
     83        ).trim()
    7684
     85        final version = "${pver}.${build}"
    7786
    78 //Compilation script is done here but environnement set-up and error handling is done in main loop
    79 // def checkout() {
    80 //      build_stage('Checkout', true) {
    81 //              //checkout the source code and clean the repo
    82 //              final scmVars = checkout scm
    83 //              Settings.GitNewRef = scmVars.GIT_COMMIT
    84 //              Settings.GitOldRef = scmVars.GIT_PREVIOUS_COMMIT
     87        echo "Package Version: ${pver}"
     88        echo "Build   Version: ${build}"
     89        echo "Long    Version: ${version}"
    8590
    86 //              echo GitLogMessage()
    87 //      }
    88 // }
     91        return version
     92}
     93
    8994
    9095//===========================================================================================================
     
    107112                                        defaultValue: '',                                                               \
    108113                                ],                                                                                              \
     114                                [$class: 'StringParameterDefinition',                                           \
     115                                        description: 'Build Number to put into the version',                    \
     116                                        name: 'Build',                                                                  \
     117                                        defaultValue: '0',                                                              \
     118                                ],                                                                                              \
    109119                        ],
    110120                ]])
     
    121131        echo "Distributing git commit ${ref}"
    122132
    123         return params.GitRef
     133        return [params.GitRef, params.Build]
    124134}
    125135
  • Jenkins/tools.groovy

    r7c1144b rec5d599  
    3737                //checkout the source code and clean the repo
    3838                if(commitHash) {
    39                         final scmVars = checkout([$class: 'GitSCM', branches: [[name: commitHash ]]])
     39                        echo "Checking out commit <${commitHash}>"
     40                        final scmVars = checkout([$class: 'GitSCM', branches: [[name: commitHash ]],
     41                                userRemoteConfigs: [[
     42                                        url: 'cforall@plg.uwaterloo.ca:software/cfa/cfa-cc',
     43                                        credentialsId: 'git_key_aug20']]
     44                        ])
    4045                        echo GitLogMessage(scmVars.GIT_COMMIT, scmVars.GIT_PREVIOUS_COMMIT)
    4146                } else {
    42 
    4347                        final scmVars = checkout scm
    4448                        echo GitLogMessage(scmVars.GIT_COMMIT, scmVars.GIT_PREVIOUS_COMMIT)
     
    6165}
    6266
    63 def GitLogMessage(String oldRef, String newRef) {
     67PrevGitOldRef = ''
     68PrevGitNewRef = ''
     69def GitLogMessage(String oldRef = '', String newRef = '') {
     70        if (!oldRef) { if(!PrevGitOldRef) { return "\nERROR retrieveing current git information!\n"  } else { oldRef = PrevGitOldRef } }
     71        if (!newRef) { if(!PrevGitNewRef) { return "\nERROR retrieveing previous git information!\n" } else { newRef = PrevGitNewRef } }
     72
    6473        def revText = sh(returnStdout: true, script: "git rev-list ${oldRef}..${newRef}").trim()
    6574        def revList = SplitLines( revText )
     
    8190        gitDiff = gitDiff.replace('[31m', '<span style="color: #AA0000;">')
    8291        gitDiff = gitDiff.replace('[m', '</span>')
     92
     93        PrevGitOldRef = oldRef
     94        PrevGitNewRef = newRef
    8395
    8496        return """
  • Jenkinsfile

    r7c1144b rec5d599  
    3030                                SrcDir    = pwd tmp: false
    3131
    32                                 clean()
    33 
    34                                 checkout()
     32                                Tools.Clean()
     33
     34                                Tools.Checkout()
    3535
    3636                                build()
     
    8181// Main compilation routines
    8282//===========================================================================================================
    83 def clean() {
    84         Tools.BuildStage('Cleanup', true) {
    85                 // clean the build by wipping the build directory
    86                 dir(BuildDir) {
    87                         deleteDir()
    88                 }
    89         }
    90 }
    91 
    92 //Compilation script is done here but environnement set-up and error handling is done in main loop
    93 def checkout() {
    94         Tools.BuildStage('Checkout', true) {
    95                 //checkout the source code and clean the repo
    96                 final scmVars = checkout scm
    97                 Settings.GitNewRef = scmVars.GIT_COMMIT
    98                 Settings.GitOldRef = scmVars.GIT_PREVIOUS_COMMIT
    99 
    100                 echo GitLogMessage()
    101         }
    102 }
    103 
    10483def build() {
    10584        debug = true
     
    236215//Routine responsible of sending the email notification once the build is completed
    237216//===========================================================================================================
    238 @NonCPS
    239 def SplitLines(String text) {
    240         def list = []
    241 
    242         text.eachLine {
    243                 list += it
    244         }
    245 
    246         return list
    247 }
    248 
    249 def GitLogMessage() {
    250         if (!Settings || !Settings.GitOldRef || !Settings.GitNewRef) return "\nERROR retrieveing git information!\n"
    251 
    252         def oldRef = Settings.GitOldRef
    253         def newRef = Settings.GitNewRef
    254 
    255         def revText = sh(returnStdout: true, script: "git rev-list ${oldRef}..${newRef}").trim()
    256         def revList = SplitLines( revText )
    257 
    258         def gitUpdate = ""
    259         revList.each { rev ->
    260                 def type = sh(returnStdout: true, script: "git cat-file -t ${rev}").trim()
    261                 gitUpdate = gitUpdate + "       via  ${rev} (${type})"
    262         }
    263 
    264         def rev = oldRef
    265         def type = sh(returnStdout: true, script: "git cat-file -t ${rev}").trim()
    266         gitUpdate = gitUpdate + "      from  ${rev} (${type})"
    267 
    268         def gitLog    = sh(returnStdout: true, script: "git rev-list --format=short ${oldRef}...${newRef}").trim()
    269 
    270         def gitDiff   = sh(returnStdout: true, script: "git diff --stat --color ${newRef} ${oldRef}").trim()
    271         gitDiff = gitDiff.replace('[32m', '<span style="color: #00AA00;">')
    272         gitDiff = gitDiff.replace('[31m', '<span style="color: #AA0000;">')
    273         gitDiff = gitDiff.replace('[m', '</span>')
    274 
    275         return """
    276 <pre>
    277 The branch ${env.BRANCH_NAME} has been updated.
    278 ${gitUpdate}
    279 </pre>
    280 
    281 <p>Check console output at ${env.BUILD_URL} to view the results.</p>
    282 
    283 <p>- Status --------------------------------------------------------------</p>
    284 
    285 <p>BUILD# ${env.BUILD_NUMBER} - ${currentBuild.result}</p>
    286 
    287 <p>- Log -----------------------------------------------------------------</p>
    288 
    289 <pre>
    290 ${gitLog}
    291 </pre>
    292 
    293 <p>-----------------------------------------------------------------------</p>
    294 <pre>
    295 Summary of changes:
    296 ${gitDiff}
    297 </pre>
    298 """
    299 }
    300 
    301217//Standard build email notification
    302218def email(boolean log) {
     
    310226generated because of a git hooks/post-receive script following
    311227a ref change which was pushed to the C\u2200 repository.</p>
    312 """ + GitLogMessage()
     228""" + Tools.GitLogMessage()
    313229
    314230        def email_to = !Settings.IsSandbox ? "cforall@lists.uwaterloo.ca" : "tdelisle@uwaterloo.ca"
     
    420336                this.DescShort = "${ this.Compiler.name }:${ this.Architecture.name }${full}"
    421337
     338                final ast = this.NewAST ? "New AST" : "Old AST"
    422339                this.DescLong = """Compiler              : ${ this.Compiler.name } (${ this.Compiler.CXX }/${ this.Compiler.CC })
     340AST Version             : ${ ast.toString() }
    423341Architecture            : ${ this.Architecture.name }
    424342Arc Flags               : ${ this.Architecture.flags }
     
    473391                                        description: 'If true, build compiler using new AST',           \
    474392                                        name: 'NewAST',                                                                         \
    475                                         defaultValue: false,                                                            \
     393                                        defaultValue: true,                                                             \
    476394                                ],                                                                                              \
    477395                                [$class: 'BooleanParameterDefinition',                                                  \
     
    479397                                        name: 'RunAllTests',                                                            \
    480398                                        defaultValue: false,                                                            \
    481                                 ],
     399                                ],                                                                                              \
    482400                                [$class: 'BooleanParameterDefinition',                                                  \
    483401                                        description: 'If true, jenkins also runs benchmarks',           \
  • tests/.expect/manipulatorsOutput2.arm64.txt

    r7c1144b rec5d599  
    11
    220b0 0b11011 0b11011 0b11011 0b11011
    3 0b11100101 0b1111111111100101 0b11111111111111111111111111100101 0b11111111111111111111111111100101
     30b11100101 0b1111111111100101 0b11111111111111111111111111100101 0b1111111111111111111111111111111111111111111111111111111111100101
    440 033 033 033 033
    5 0345 0177745 037777777745 037777777745
     50345 0177745 037777777745 01777777777777777777745
    660 0x1b 0x1b 0x1b 0x1b
    7 0xe5 0xffe5 0xffffffe5 0xffffffe5
    8 0x0p+0. 0x1.b8p+4 0x1.b8p+4 0xd.cp+1
    9 -0x1.b8p+4 -0x1.b8p+4 -0xd.cp+1
     70xe5 0xffe5 0xffffffe5 0xffffffffffffffe5
     80x0p+0. 0x1.b8p+4 0x1.b8p+4 0x1.b8p+4
     9-0x1.b8p+4 -0x1.b8p+4 -0x1.b8p+4
    10100.000000e+00 2.750000e+01 -2.750000e+01
    11110B11011 0X1B 2.75E-09 0X1.B8P+4
  • tests/errors/.expect/completeType.oast.x86.txt

    r7c1144b rec5d599  
    66    Name: x
    77
    8 ... to: nothing Alternatives are:
     8... to: nothing
     9with resolved type:
     10  void  Alternatives are:
    911Cost ( 0, 1, 2, 0, 1, -1, 0 ): Generated Cast of:
    1012      Application of
     
    2022
    2123
     24        with resolved type:
     25          pointer to forall
     26            [unbound]:data type
     27            function
     28          ... with parameters
     29            intrinsic pointer to instance of type [unbound] (not function type)
     30          ... returning
     31            _retval__operator_deref: reference to instance of type [unbound] (not function type)
     32            ... with attributes:
     33              Attribute with name: unused
     34
     35
    2236      ... to arguments
    2337        Variable Expression: x: pointer to instance of struct A with body 0
    24 
     38        with resolved type:
     39          pointer to instance of struct A with body 0
     40
     41      with resolved type:
     42        reference to instance of struct A with body 0
    2543    ... to: nothing
     44    with resolved type:
     45      void
    2646  (types:
    2747    void
    2848  )
    29   Environment: -> instance of struct A with body 0 (no widening)
     49  Environment:([unbound]) -> instance of struct A with body 0 (no widening)
    3050
    3151
     
    4363
    4464
     65        with resolved type:
     66          pointer to forall
     67            [unbound]:data type
     68            function
     69          ... with parameters
     70            intrinsic pointer to instance of type [unbound] (not function type)
     71          ... returning
     72            _retval__operator_deref: reference to instance of type [unbound] (not function type)
     73            ... with attributes:
     74              Attribute with name: unused
     75
     76
    4577      ... to arguments
    4678        Variable Expression: x: pointer to instance of struct B with body 1
    47 
     79        with resolved type:
     80          pointer to instance of struct B with body 1
     81
     82      with resolved type:
     83        reference to instance of struct B with body 1
    4884    ... to: nothing
     85    with resolved type:
     86      void
    4987  (types:
    5088    void
    5189  )
    52   Environment: -> instance of struct B with body 1 (no widening)
     90  Environment:([unbound]) -> instance of struct B with body 1 (no widening)
    5391
    5492
     
    121159            ... returning nothing
    122160
     161            with resolved type:
     162              pointer to forall
     163                [unbound]:sized data type
     164                ... with assertions
     165                  ?=?: pointer to function
     166                  ... with parameters
     167                    reference to instance of type [unbound] (not function type)
     168                    instance of type [unbound] (not function type)
     169                  ... returning
     170                    _retval__operator_assign: instance of type [unbound] (not function type)
     171                    ... with attributes:
     172                      Attribute with name: unused
     173
     174
     175                  ?{}: pointer to function
     176                  ... with parameters
     177                    reference to instance of type [unbound] (not function type)
     178                  ... returning nothing
     179
     180                  ?{}: pointer to function
     181                  ... with parameters
     182                    reference to instance of type [unbound] (not function type)
     183                    instance of type [unbound] (not function type)
     184                  ... returning nothing
     185
     186                  ^?{}: pointer to function
     187                  ... with parameters
     188                    reference to instance of type [unbound] (not function type)
     189                  ... returning nothing
     190
     191
     192                function
     193              ... with parameters
     194                pointer to instance of type [unbound] (not function type)
     195              ... returning nothing
     196
    123197          ... to arguments
    124198            Variable Expression: z: pointer to instance of type T (not function type)
    125 
     199            with resolved type:
     200              pointer to instance of type T (not function type)
     201
     202          with resolved type:
     203            void
    126204        (types:
    127205          void
    128206        )
    129         Environment: -> instance of type T (not function type) (no widening)
     207        Environment:([unbound]) -> instance of type T (not function type) (no widening)
    130208
    131209      Could not satisfy assertion:
    132210?=?: pointer to function
    133211        ... with parameters
    134           reference to instance of type _109_0_T (not function type)
    135           instance of type _109_0_T (not function type)
     212          reference to instance of type [unbound] (not function type)
     213          instance of type [unbound] (not function type)
    136214        ... returning
    137           _retval__operator_assign: instance of type _109_0_T (not function type)
     215          _retval__operator_assign: instance of type [unbound] (not function type)
    138216          ... with attributes:
    139217            Attribute with name: unused
  • tests/meta/.expect/archVast.nast.x86.txt

    r7c1144b rec5d599  
    77  char Alternatives are:
    88Cost ( 1, 0, 0, 0, 0, 0, 0 ): Explicit Cast of:
    9       Variable Expression: FX86: signed int
     9      Variable Expression: FX86: double
    1010      ... with resolved type:
    11         signed int
     11        double
    1212    ... to:
    1313      char
     
    3939
    4040Cost ( 1, 0, 0, 0, 0, 0, 0 ): Explicit Cast of:
    41       Variable Expression: FX86: double
     41      Variable Expression: FX86: signed int
    4242      ... with resolved type:
    43         double
     43        signed int
    4444    ... to:
    4545      char
  • tests/meta/.expect/archVast.oast.x86.txt

    r7c1144b rec5d599  
    66with resolved type:
    77  char Alternatives are:
     8Cost ( 1, 0, 0, 0, 0, 0, 0 ): Explicit Cast of:
     9      Variable Expression: FX86: double
     10      with resolved type:
     11        double
     12    ... to:
     13      char
     14    with resolved type:
     15      char
     16  (types:
     17    char
     18  )
     19  Environment:
     20
    821Cost ( 1, 0, 0, 0, 0, 0, 0 ): Explicit Cast of:
    922      Variable Expression: FX86: function
     
    1629        ... returning nothing
    1730
    18     ... to:
    19       char
    20     with resolved type:
    21       char
    22   (types:
    23     char
    24   )
    25   Environment:
    26 
    27 Cost ( 1, 0, 0, 0, 0, 0, 0 ): Explicit Cast of:
    28       Variable Expression: FX86: double
    29       with resolved type:
    30         double
    3131    ... to:
    3232      char
Note: See TracChangeset for help on using the changeset viewer.