Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When printing function bodies, avoid some redundant spaces #1498

Merged
merged 1 commit into from
Sep 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions hpcgap/src/c_filter1.c
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ static Obj HdlrFunc1 (
AssGVar( G_CLEAR__IMP__CACHE, 0 );

/* BIND_GLOBAL( "CLEAR_IMP_CACHE", function ( )
local lock;
local lock;
lock := WRITE_LOCK( IMPLICATIONS );
WITH_IMPS_FLAGS_CACHE := MigrateObj( [ ], IMPLICATIONS );
UNLOCK( lock );
Expand All @@ -574,13 +574,13 @@ static Obj HdlrFunc1 (
CALL_2ARGS( t_1, t_2, t_3 );

/* BIND_GLOBAL( "WITH_IMPS_FLAGS", function ( flags )
local with, changed, imp, hash, hash2, i, lock;
local with, changed, imp, hash, hash2, i, lock;
hash := HASH_FLAGS( flags ) mod 11001;
lock := WRITE_LOCK( IMPLICATIONS );
for i in [ 0 .. 3 ] do
for i in [ 0 .. 3 ] do
hash2 := 2 * ((hash + 31 * i) mod 11001) + 1;
if IsBound( WITH_IMPS_FLAGS_CACHE[hash2] ) then
if IS_IDENTICAL_OBJ( WITH_IMPS_FLAGS_CACHE[hash2], flags ) then
if IsBound( WITH_IMPS_FLAGS_CACHE[hash2] ) then
if IS_IDENTICAL_OBJ( WITH_IMPS_FLAGS_CACHE[hash2], flags ) then
WITH_IMPS_FLAGS_CACHE_HIT := WITH_IMPS_FLAGS_CACHE_HIT + 1;
with := WITH_IMPS_FLAGS_CACHE[hash2 + 1];
UNLOCK( lock );
Expand All @@ -590,18 +590,18 @@ static Obj HdlrFunc1 (
break;
fi;
od;
if i = 3 then
if i = 3 then
WITH_IMPS_FLAGS_COUNT := (WITH_IMPS_FLAGS_COUNT + 1) mod 4;
i := WITH_IMPS_FLAGS_COUNT;
hash2 := 2 * ((hash + 31 * i) mod 11001) + 1;
fi;
WITH_IMPS_FLAGS_CACHE_MISS := WITH_IMPS_FLAGS_CACHE_MISS + 1;
with := flags;
changed := true;
while changed do
while changed do
changed := false;
for imp in IMPLICATIONS do
if IS_SUBSET_FLAGS( with, imp[2] ) and not IS_SUBSET_FLAGS( with, imp[1] ) then
for imp in IMPLICATIONS do
if IS_SUBSET_FLAGS( with, imp[2] ) and not IS_SUBSET_FLAGS( with, imp[1] ) then
with := AND_FLAGS( with, imp[1] );
changed := true;
fi;
Expand All @@ -625,16 +625,16 @@ static Obj HdlrFunc1 (
CALL_2ARGS( t_1, t_2, t_3 );

/* BIND_GLOBAL( "RankFilter", function ( filter )
local rank, flags, i, lock;
local rank, flags, i, lock;
rank := 0;
if IS_FUNCTION( filter ) then
if IS_FUNCTION( filter ) then
flags := FLAGS_FILTER( filter );
else
flags := filter;
fi;
lock := WRITE_LOCK( FILTER_REGION );
for i in TRUES_FLAGS( WITH_HIDDEN_IMPS_FLAGS( flags ) ) do
if IsBound( RANK_FILTERS[i] ) then
for i in TRUES_FLAGS( WITH_HIDDEN_IMPS_FLAGS( flags ) ) do
if IsBound( RANK_FILTERS[i] ) then
rank := rank + RANK_FILTERS[i];
else
rank := rank + 1;
Expand Down
206 changes: 103 additions & 103 deletions hpcgap/src/c_methsel1.c

Large diffs are not rendered by default.

Loading