@@ -522,7 +522,7 @@ class P6opaque extends REPRWithAttributes {
522
522
return 'return this.$$bindattr$' + slot + '(value)' ;
523
523
} , ', value' , false , 'bind a value' ) ;
524
524
525
- const suffixes = [ '_s' , '_i' , '_n' ] ;
525
+ const suffixes = [ '_s' , '_i' , '_n' , '_i64' , '_u64' ] ;
526
526
for ( const suffix of suffixes ) {
527
527
/* TODO only check attributes of proper type */
528
528
this . generateUniversalAccessor ( STable , '$$getattr' + suffix , function ( slot ) {
@@ -790,11 +790,23 @@ class P6int extends REPR {
790
790
791
791
generateFlattenedAccessors ( ownerSTable , attrContentSTable , slot ) {
792
792
const attr = slotToAttr ( slot ) ;
793
- ownerSTable . addInternalMethod ( '$$getattr$' + slot , function ( ) {
794
- const obj = attrContentSTable . REPR . allocate ( attrContentSTable ) ;
795
- obj . $$setInt ( this [ attr ] ) ;
796
- return obj ;
797
- } ) ;
793
+ if ( this . bits == 64 ) {
794
+ /* HACK - int64 and uint64 attributes are for now set in this werid way */
795
+ ownerSTable . addInternalMethod ( '$$getattr$' + slot , function ( ) {
796
+ const objectWithAttr = this ;
797
+ return new ( class {
798
+ $$assign ( ctx , value ) {
799
+ objectWithAttr [ attr ] = value . $$getInt64 ( ) ;
800
+ }
801
+ } ) ;
802
+ } ) ;
803
+ } else {
804
+ ownerSTable . addInternalMethod ( '$$getattr$' + slot , function ( ) {
805
+ const obj = attrContentSTable . REPR . allocate ( attrContentSTable ) ;
806
+ obj . $$setInt ( this [ attr ] ) ;
807
+ return obj ;
808
+ } ) ;
809
+ }
798
810
}
799
811
800
812
generateRefAccessors ( ownerSTable , attrContentSTable , slot ) {
@@ -1240,7 +1252,7 @@ class VMArray extends REPR {
1240
1252
return value ;
1241
1253
}
1242
1254
} ) ;
1243
- } else if ( this . primType === 1 ) {
1255
+ } else if ( this . primType === 1 || this . primType === 4 || this . primType == 5 ) {
1244
1256
let mangle ;
1245
1257
if ( this . type !== Null ) {
1246
1258
const repr = this . type . _STable . REPR ;
0 commit comments