Wolfgang Jeltsch pushed to branch wip/jeltsch/textual-bytecode-output at Glasgow Haskell Compiler / GHC

Commits:

3 changed files:

Changes:

  • testsuite/tests/show-bytecode/normalize
    ... ... @@ -2,6 +2,7 @@
    2 2
     
    
    3 3
     set -e -o pipefail
    
    4 4
     
    
    5
    +# Make the test output independent of unstable compiler-generated data
    
    5 6
     stabilize ()
    
    6 7
     {
    
    7 8
       sed -E -e '
    
    ... ... @@ -12,15 +13,17 @@ stabilize ()
    12 13
       '
    
    13 14
     }
    
    14 15
     
    
    16
    +# Make the test output independent of the word size
    
    15 17
     universalize ()
    
    16 18
     {
    
    17 19
       sed -E -e '
    
    18
    -    s/UInt[[:digit:]]+/UInt@word_size@/
    
    19 20
         s/W[[:digit:]]+#/W@word_size@#/
    
    21
    +    s/UInt[[:digit:]]+/UInt@word_size@/
    
    20 22
       ' |
    
    21 23
       uniq
    
    22 24
       # The invocation of `uniq` is merely for collapsing adjacent entries of
    
    23 25
       # `word @large_word@`, whose number may depend on the word size.
    
    24 26
     }
    
    25 27
     
    
    28
    +# Run all phases
    
    26 29
     stabilize | universalize

  • testsuite/tests/show-bytecode/show-bytecode-breakpoints.stdout-javascript-unknown-ghcjs
    ... ... @@ -322,12 +322,12 @@ objects:
    322 322
       object ‘cstrlen’:
    
    323 323
         arity: 2
    
    324 324
         literals: <none>
    
    325
    -    used items:
    
    326
    -      object ‘ds1_@name_suffix@’:
    
    327 325
         used items: named item ‘cstrlen1_@name_suffix@’
    
    328 326
       object ‘cstrlen1_@name_suffix@’:
    
    329 327
         arity: 2
    
    330 328
         literals: <none>
    
    329
    +    used items:
    
    330
    +      object ‘ds1_@name_suffix@’:
    
    331 331
             arity: 0
    
    332 332
             literals:
    
    333 333
               label ‘strlen’
    

  • testsuite/tests/show-bytecode/show-bytecode-vanilla.stdout-javascript-unknown-ghcjs
    ... ... @@ -271,6 +271,10 @@ objects:
    271 271
           named item ‘$tcNatural’
    
    272 272
           named item ‘mkTrCon’
    
    273 273
       object ‘cstrlen’:
    
    274
    +    arity: 2
    
    275
    +    literals: <none>
    
    276
    +    used items: named item ‘cstrlen1_@name_suffix@’
    
    277
    +  object ‘cstrlen1_@name_suffix@’:
    
    274 278
         arity: 2
    
    275 279
         literals: <none>
    
    276 280
         used items:
    
    ... ... @@ -324,10 +328,6 @@ objects:
    324 328
       static-construction object ‘$tc'PerfectTree’:
    
    325 329
         data constructor: TyCon
    
    326 330
         lifted: yes
    
    327
    -    used items: named item ‘cstrlen1_@name_suffix@’
    
    328
    -  object ‘cstrlen1_@name_suffix@’:
    
    329
    -    arity: 2
    
    330
    -    literals: <none>
    
    331 331
         literals:
    
    332 332
           word @large_word@
    
    333 333
           word 1