Raymond Toy pushed to branch native-image at cmucl / cmucl

Commits:

4 changed files:

Changes:

  • src/general-info/release-21e.md
    ... ... @@ -19,8 +19,6 @@ public domain.
    19 19
     
    
    20 20
     ## New in this release:
    
    21 21
       * Known issues:
    
    22
    -    * Building with gcc8 or later doesn't work with the default -O option. Use -O1 instead.  This shouldn't really impact overall speed much.
    
    23
    -    * Added simple support to compile with clang instead, which works. (Use x86_linux_clang).
    
    24 22
       * Feature enhancements
    
    25 23
       * Changes
    
    26 24
         * Update to ASDF 3.3.4
    
    ... ... @@ -35,6 +33,12 @@ public domain.
    35 33
         * ~~#80~~ Use ASDF to load contribs.  cmu-contribs still exists but does nothing.  The contrib names are the same, except it's best to use a keyword instead of a string.  So, `:contrib-demos` instead of `"contrib-demos"`.
    
    36 34
         * ~~#81~~ Added contribs from Eric Marsden
    
    37 35
         * ~~#82~~ Replace bc with expr in GNUMakefile
    
    36
    +    * ~~#86~~ Building with gcc 8 and later works when using -O2 optimization
    
    37
    +    * ~~#90~~ Some static symbols have been removed.  This probably makes the fasl files incompatible with older versions.
    
    38
    +    * ~~#91~~ Loop destructuring no longer incorrectly signals an error
    
    39
    +    * ~~#95~~ Disassembler syntax of x86 je and movzx is incorrect
    
    40
    +    * ~~#98~~ fstpd is not an Intel instruction; disassemble as `fstp dword ptr [addr]`
    
    41
    +    * ~~#100~~ ldb prints out unicode base-chars correctly instead of just the low 8 bits.
    
    38 42
       * Other changes:
    
    39 43
       * Improvements to the PCL implementation of CLOS:
    
    40 44
       * Changes to building procedure:
    

  • src/lisp/print.c
    ... ... @@ -212,12 +212,15 @@ static void
    212 212
     brief_otherimm(lispobj obj)
    
    213 213
     {
    
    214 214
         int type, c, idx;
    
    215
    -    char buffer[10];
    
    216 215
     
    
    217 216
         type = TypeOf(obj);
    
    218 217
         switch (type) {
    
    219 218
           case type_BaseChar:
    
    220
    -	  c = (obj >> 8) & 0xff;
    
    219
    +          /*
    
    220
    +           * A base-char should only be 16 bits long now.  But
    
    221
    +           * sometimes it uses all 24.  So just grab all the bits.
    
    222
    +           */
    
    223
    +	  c = (obj >> 8) & 0xfffff;
    
    221 224
     	  switch (c) {
    
    222 225
     	    case '\0':
    
    223 226
     		printf("#\\Null");
    
    ... ... @@ -228,20 +231,35 @@ brief_otherimm(lispobj obj)
    228 231
     	    case '\b':
    
    229 232
     		printf("#\\Backspace");
    
    230 233
     		break;
    
    234
    +            case '\11':
    
    235
    +                printf("#\\Tab");
    
    236
    +                break;
    
    237
    +            case '\13':
    
    238
    +                printf("#\\Vt");
    
    239
    +                break;
    
    240
    +            case '\15':
    
    241
    +                printf("#\\Return");
    
    242
    +                break;
    
    243
    +            case '\33':
    
    244
    +                printf("#\\Escape");
    
    245
    +                break;
    
    246
    +            case '\40':
    
    247
    +                printf("#\\Space");
    
    248
    +                break;
    
    231 249
     	    case '\177':
    
    232 250
     		printf("#\\Delete");
    
    233 251
     		break;
    
    234 252
     	    default:
    
    235
    -		strcpy(buffer, "#\\");
    
    236 253
     		if (c >= 128) {
    
    237
    -		    strcat(buffer, "m-");
    
    238
    -		    c -= 128;
    
    239
    -		}
    
    240
    -		if (c < 32) {
    
    241
    -		    strcat(buffer, "c-");
    
    242
    -		    c += '@';
    
    243
    -		}
    
    244
    -		printf("%s%c", buffer, c);
    
    254
    +                    /* Just print out the code value */
    
    255
    +		    printf("#\\u+%04X", c);
    
    256
    +		} else if (c < 32) {
    
    257
    +                    /* Print it out as a control character */
    
    258
    +                    printf("#\\^%c", c + '@');
    
    259
    +		} else {
    
    260
    +                    /* Plain ASCII character */
    
    261
    +                    printf("#\\%c", c);
    
    262
    +                }
    
    245 263
     		break;
    
    246 264
     	  }
    
    247 265
     	  break;
    

  • src/lisp/save.c
    ... ... @@ -655,7 +655,7 @@ asm_complex_double_float(lispobj* ptr, lispobj object, FILE* f)
    655 655
     #endif
    
    656 656
     
    
    657 657
     void
    
    658
    -init_asmtab()
    
    658
    +init_asmtab(void)
    
    659 659
     {
    
    660 660
         int k = 0;
    
    661 661
     
    
    ... ... @@ -674,6 +674,9 @@ init_asmtab()
    674 674
             asmtab[type_OtherPointer | (k << 3)] = asm_other_pointer;
    
    675 675
         }
    
    676 676
         
    
    677
    +    asmtab[type_Ratio] = asm_boxed;
    
    678
    +    asmtab[type_Complex] = asm_boxed;
    
    679
    +    asmtab[type_SimpleArray] = asm_boxed;
    
    677 680
         asmtab[type_SymbolHeader] = asm_boxed;
    
    678 681
         asmtab[type_Fdefn] = asm_fdefn;
    
    679 682
         asmtab[type_InstanceHeader] = asm_boxed;
    
    ... ... @@ -683,6 +686,7 @@ init_asmtab()
    683 686
         asmtab[type_BaseChar] = asm_immediate;
    
    684 687
         /* Just use asm_boxed or have a special version for a value cell? */
    
    685 688
         asmtab[type_ValueCellHeader] = asm_boxed;
    
    689
    +    
    
    686 690
     }
    
    687 691
         
    
    688 692
     void
    

  • tests/issues.lisp
    ... ... @@ -544,3 +544,15 @@
    544 544
       ;; the correct value.
    
    545 545
       (assert-false
    
    546 546
        (funcall (compile nil '(lambda () (array-displacement "aaaaaaaa"))))))
    
    547
    +
    
    548
    +(define-test issue.101
    
    549
    +    (:tag :issues)
    
    550
    +  ;; Verifies that we don't get unexpected overflow.  The actual value
    
    551
    +  ;; is not really important.  The important part is no overflow is
    
    552
    +  ;; signaled.
    
    553
    +  ;;
    
    554
    +  ;; See https://gitlab.common-lisp.net/cmucl/cmucl/-/issues/101 for
    
    555
    +  ;; more details.
    
    556
    +  (assert-equalp
    
    557
    +   3.0380154777955097d205
    
    558
    +   (expt 1.7976931348623157d308 0.6666)))