Skip to content

Commit 0c54f7a

Browse files
committed
Merge branch 'master' of github.com:gap-system/gap into ah/immediate
2 parents 4ef8805 + d0693f8 commit 0c54f7a

25 files changed

Lines changed: 574 additions & 463 deletions

hpcgap/src/c_type1.c

Lines changed: 104 additions & 151 deletions
Large diffs are not rendered by default.

lib/type.g

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,6 @@
1212
##
1313

1414

15-
#############################################################################
16-
##
17-
#V POS_DATA_TYPE . . . . . . . . position where the data of a type is stored
18-
#V POS_NUMB_TYPE . . . . . . . position where the number of a type is stored
19-
#V POS_FIRST_FREE_TYPE . . . . . first position that has no overall meaning
20-
##
21-
## <ManSection>
22-
## <Var Name="POS_DATA_TYPE"/>
23-
## <Var Name="POS_NUMB_TYPE"/>
24-
## <Var Name="POS_FIRST_FREE_TYPE"/>
25-
##
26-
## <Description>
27-
## Note that the family and the flags list are stored at positions 1 and 2,
28-
## respectively.
29-
## </Description>
30-
## </ManSection>
31-
##
32-
BIND_CONSTANT( "POS_DATA_TYPE", 3 );
33-
BIND_CONSTANT( "POS_NUMB_TYPE", 4 );
34-
BIND_CONSTANT( "POS_FIRST_FREE_TYPE", 5 );
35-
36-
3715
#############################################################################
3816
##
3917
#F NEW_TYPE_NEXT_ID . . . . . . . . . . . . GAP integer numbering the types
@@ -600,8 +578,8 @@ InstallOtherMethod( PRINT_OBJ,
600578
function ( type )
601579
local family, flags, data;
602580

603-
family := type![1];
604-
flags := type![2];
581+
family := type![ POS_FAMILY_TYPE ];
582+
flags := type![ POS_FLAGS_TYPE ];
605583
data := type![ POS_DATA_TYPE ];
606584
Print( "NewType( ", family );
607585
if flags <> [] or data <> false then

lib/type.gi

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
## Return list of filters set in the given type.
1717
##
1818
InstallMethod(FiltersType, "for a type", [ IsType ],
19-
type -> FILTERS{ TRUES_FLAGS(type![2]) });
19+
type -> FILTERS{ TRUES_FLAGS(type![POS_FLAGS_TYPE]) });
2020

2121
#############################################################################
2222
##
@@ -101,11 +101,11 @@ function ( type )
101101
local res, family, flags, data, fnams;
102102

103103
res := "<Type: (";
104-
family := type![1];
104+
family := type![POS_FAMILY_TYPE];
105105
Append(res, family!.NAME);
106106
Append(res, ", ");
107107

108-
flags := type![2];
108+
flags := type![POS_FLAGS_TYPE];
109109
Append(res, NamesFilterShort(flags, 3) );
110110
Append(res, ")");
111111

@@ -130,8 +130,8 @@ function ( type )
130130
local res, family, flags, data, fnams;
131131

132132
res := "";
133-
family := type![1];
134-
flags := type![2];
133+
family := type![POS_FAMILY_TYPE];
134+
flags := type![POS_FLAGS_TYPE];
135135
data := type![POS_DATA_TYPE];
136136

137137
Append(res, STRINGIFY("family:\n ", family!.NAME));

lib/type1.g

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,8 @@ BIND_GLOBAL( "NEW_TYPE", function ( typeOfTypes, family, flags, data, parent )
239239
hash := HASH_FLAGS(flags) mod family!.HASH_SIZE + 1;
240240
if IsBound( cache[hash] ) then
241241
cached := cache[hash];
242-
if IS_EQUAL_FLAGS( flags, cached![2] ) then
243-
flags := cached![2];
242+
if IS_EQUAL_FLAGS( flags, cached![POS_FLAGS_TYPE] ) then
243+
flags := cached![POS_FLAGS_TYPE];
244244
if IS_IDENTICAL_OBJ( data, cached![ POS_DATA_TYPE ] )
245245
and IS_IDENTICAL_OBJ( typeOfTypes, TYPE_OBJ(cached) )
246246
then
@@ -334,7 +334,7 @@ BIND_GLOBAL( "NEW_TYPE", function ( typeOfTypes, family, flags, data, parent )
334334
fi;
335335
ncl := 3*family!.HASH_SIZE+1;
336336
for t in cache do
337-
ncache[ HASH_FLAGS(t![2]) mod ncl + 1] := t;
337+
ncache[ HASH_FLAGS(t![POS_FLAGS_TYPE]) mod ncl + 1] := t;
338338
od;
339339
family!.HASH_SIZE := ncl;
340340
family!.TYPES := ncache;
@@ -413,19 +413,19 @@ end );
413413
##
414414
BIND_GLOBAL( "Subtype2", function ( type, filter )
415415
return NEW_TYPE( TypeOfTypes,
416-
type![1],
416+
type![POS_FAMILY_TYPE],
417417
WITH_IMPS_FLAGS( AND_FLAGS(
418-
type![2],
418+
type![POS_FLAGS_TYPE],
419419
FLAGS_FILTER( filter ) ) ),
420420
type![ POS_DATA_TYPE ], type );
421421
end );
422422

423423

424424
BIND_GLOBAL( "Subtype3", function ( type, filter, data )
425425
return NEW_TYPE( TypeOfTypes,
426-
type![1],
426+
type![POS_FAMILY_TYPE],
427427
WITH_IMPS_FLAGS( AND_FLAGS(
428-
type![2],
428+
type![POS_FLAGS_TYPE],
429429
FLAGS_FILTER( filter ) ) ),
430430
data, type );
431431
end );
@@ -470,19 +470,19 @@ end );
470470
##
471471
BIND_GLOBAL( "SupType2", function ( type, filter )
472472
return NEW_TYPE( TypeOfTypes,
473-
type![1],
473+
type![POS_FAMILY_TYPE],
474474
SUB_FLAGS(
475-
type![2],
475+
type![POS_FLAGS_TYPE],
476476
FLAGS_FILTER( filter ) ),
477477
type![ POS_DATA_TYPE ], type );
478478
end );
479479

480480

481481
BIND_GLOBAL( "SupType3", function ( type, filter, data )
482482
return NEW_TYPE( TypeOfTypes,
483-
type![1],
483+
type![POS_FAMILY_TYPE],
484484
SUB_FLAGS(
485-
type![2],
485+
type![POS_FLAGS_TYPE],
486486
FLAGS_FILTER( filter ) ),
487487
data, type );
488488
end );
@@ -516,7 +516,7 @@ end );
516516
## </Description>
517517
## </ManSection>
518518
##
519-
BIND_GLOBAL( "FamilyType", K -> K![1] );
519+
BIND_GLOBAL( "FamilyType", K -> K![POS_FAMILY_TYPE] );
520520

521521

522522
#############################################################################
@@ -530,7 +530,7 @@ BIND_GLOBAL( "FamilyType", K -> K![1] );
530530
## </Description>
531531
## </ManSection>
532532
##
533-
BIND_GLOBAL( "FlagsType", K -> K![2] );
533+
BIND_GLOBAL( "FlagsType", K -> K![POS_FLAGS_TYPE] );
534534

535535

536536
#############################################################################
@@ -715,7 +715,7 @@ BIND_GLOBAL( "Objectify", function ( type, obj )
715715
SET_TYPE_COMOBJ( obj, type );
716716
fi;
717717
if not IsNoImmediateMethodsObject(obj) then
718-
RunImmediateMethods( obj, type![2] );
718+
RunImmediateMethods( obj, type![POS_FLAGS_TYPE] );
719719
fi;
720720
if IsHPCGAP then
721721
if IsReadOnlyPositionalObjectRep(obj) then
@@ -754,23 +754,23 @@ local type, newtype;
754754
SET_TYPE_POSOBJ( obj, newtype );
755755
if not ( IGNORE_IMMEDIATE_METHODS
756756
or IsNoImmediateMethodsObject(obj) ) then
757-
RunImmediateMethods( obj, SUB_FLAGS( newtype![2], type![2] ) );
757+
RunImmediateMethods( obj, SUB_FLAGS( newtype![POS_FLAGS_TYPE], type![POS_FLAGS_TYPE] ) );
758758
fi;
759759
elif IS_COMOBJ( obj ) then
760760
type:= TYPE_OBJ( obj );
761761
newtype:= Subtype2( type, filter );
762762
SET_TYPE_COMOBJ( obj, newtype );
763763
if not ( IGNORE_IMMEDIATE_METHODS
764764
or IsNoImmediateMethodsObject(obj) ) then
765-
RunImmediateMethods( obj, SUB_FLAGS( newtype![2], type![2] ) );
765+
RunImmediateMethods( obj, SUB_FLAGS( newtype![POS_FLAGS_TYPE], type![POS_FLAGS_TYPE] ) );
766766
fi;
767767
elif IS_DATOBJ( obj ) then
768768
type:= TYPE_OBJ( obj );
769769
newtype:= Subtype2( type, filter );
770770
SET_TYPE_DATOBJ( obj, newtype );
771771
if not ( IGNORE_IMMEDIATE_METHODS
772772
or IsNoImmediateMethodsObject(obj) ) then
773-
RunImmediateMethods( obj, SUB_FLAGS( newtype![2], type![2] ) );
773+
RunImmediateMethods( obj, SUB_FLAGS( newtype![POS_FLAGS_TYPE], type![POS_FLAGS_TYPE] ) );
774774
fi;
775775
elif IS_PLIST_REP( obj ) then
776776
SET_FILTER_LIST( obj, filter );

src/boehm_gc.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,10 @@ void MarkAllSubBags(Bag bag)
625625
{
626626
}
627627

628+
void MarkAllButFirstSubBags(Bag bag)
629+
{
630+
}
631+
628632
void MarkArrayOfBags(const Bag array[], UInt count)
629633
{
630634
}

0 commit comments

Comments
 (0)