Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

mro: switch from dfs to c3 as default #209

Open
rurban opened this issue Oct 13, 2016 · 2 comments
Open

mro: switch from dfs to c3 as default #209

rurban opened this issue Oct 13, 2016 · 2 comments
Assignees

Comments

@rurban
Copy link
Member

rurban commented Oct 13, 2016

The default MRO needs to switch from the old DFS (depth-first-search) to the
recommended and perl6/Moose C3 algorithm, which was previously optional.
All object systems based on inheritence need to use C3 to avoid the diamond
problem. And this change speeds it up, avoiding run-time loading of
ext/mro, and avoids having the old dfs in memory.

If it's not possible to fix all the internal and cpan modules, just use C3 for the new classes.

@rurban rurban added this to the v5.26.0 milestone Oct 13, 2016
@rurban rurban self-assigned this Oct 13, 2016
@rurban rurban added the ready label Dec 1, 2016
@rurban rurban modified the milestones: v5.25.3c, v5.26.0c Feb 12, 2017
@rurban
Copy link
Member Author

rurban commented Feb 12, 2017

This change needs to export sv_sethek to be visible to CORE extensions.
Xp => EXpd

And the ISA order for some classes changed now.
Need to adjust some fragile tests, and even some yet unknown c3 bugs (#251)

  • run/switchDBG.t for -DC
Inconsistent hierarchy during C3 merge of class 'Math::BigInt::Subclass':
	current merge results [
		Math::BigInt::Subclass,
	]
	merging failed on 'Exporter' at t/Math/BigInt/Subclass.pm line 17

Full list of regressions (~1 or 2 bugs):

	../cpan/Math-BigInt/t/inf_nan.t
	../cpan/Math-BigInt/t/isa.t
	../cpan/Math-BigInt/t/sub_ali.t
	../cpan/Math-BigInt/t/sub_mbf.t
	../cpan/Math-BigInt/t/sub_mbi.t
	../cpan/Math-BigInt/t/sub_mif.t
	../cpan/Math-BigInt/t/upgradef.t
	../cpan/NEXT/t/actual.t
	../cpan/NEXT/t/actuns.t
	../cpan/NEXT/t/unseen.t
	../cpan/libnet/t/ftp.t
	../cpan/libnet/t/require.t

zlib is also broken, but probably related to the attempted broken zlib-1.2.11 update.

@rurban
Copy link
Member Author

rurban commented Feb 14, 2017

Testing CPAN with c3, and submitting tickets.
Maybe we need a backcompat Configure setting -Dmro=dfs, but better not.

Fixed problems in CORE:

On CPAN:

  • CPAN-SQLite #120241
  • NetAddr-IP
  • Text-CSV

Blocked by:

@rurban rurban removed this from the v5.25.3c milestone Feb 17, 2017
rurban added a commit that referenced this issue Feb 4, 2018
The default MRO switched from the DFS (depth-first-search) to the
recommended C3 algorithm, which was previously optional. All object
system based on inheritence need to use C3 to avoid the diamond
problem. And this change speeds it up, avoiding run-time loading of
F<ext/mro>.

Implements #209, but tests need adjustments: wrong default dfs
assumption, revealed hidden c3 bugs.
rurban added a commit that referenced this issue Sep 18, 2018
The default MRO switched from the DFS (depth-first-search) to the
recommended C3 algorithm, which was previously optional. All object
system based on inheritence need to use C3 to avoid the diamond
problem. And this change speeds it up, avoiding run-time loading of
F<ext/mro>.

Implements #209, but tests need adjustments: wrong default dfs
assumption, revealed hidden c3 bugs.
rurban added a commit that referenced this issue Oct 8, 2018
The default MRO switched from the DFS (depth-first-search) to the
recommended C3 algorithm, which was previously optional. All object
system based on inheritence need to use C3 to avoid the diamond
problem. And this change speeds it up, avoiding run-time loading of
F<ext/mro>.

Implements #209, but tests need adjustments: wrong default dfs
assumption, revealed hidden c3 bugs.
rurban added a commit that referenced this issue Nov 25, 2018
The default MRO switched from the DFS (depth-first-search) to the
recommended C3 algorithm, which was previously optional. All object
system based on inheritence need to use C3 to avoid the diamond
problem. And this change speeds it up, avoiding run-time loading of
F<ext/mro>.

Implements #209, but tests need adjustments: wrong default dfs
assumption, revealed hidden c3 bugs.
rurban added a commit that referenced this issue Apr 5, 2019
The default MRO switched from the DFS (depth-first-search) to the
recommended C3 algorithm, which was previously optional. All object
system based on inheritence need to use C3 to avoid the diamond
problem. And this change speeds it up, avoiding run-time loading of
F<ext/mro>.

Implements #209, but tests need adjustments: wrong default dfs
assumption, revealed hidden c3 bugs.
rurban added a commit that referenced this issue Jun 24, 2019
The default MRO switched from the DFS (depth-first-search) to the
recommended C3 algorithm, which was previously optional. All object
system based on inheritence need to use C3 to avoid the diamond
problem. And this change speeds it up, avoiding run-time loading of
F<ext/mro>.

Implements #209, but tests need adjustments: wrong default dfs
assumption, revealed hidden c3 bugs.
rurban added a commit that referenced this issue Jun 26, 2019
The default MRO switched from the DFS (depth-first-search) to the
recommended C3 algorithm, which was previously optional. All object
system based on inheritence need to use C3 to avoid the diamond
problem. And this change speeds it up, avoiding run-time loading of
F<ext/mro>.

Implements #209, but tests need adjustments: wrong default dfs
assumption, revealed hidden c3 bugs.
rurban added a commit that referenced this issue Jun 27, 2019
The default MRO switched from the DFS (depth-first-search) to the
recommended C3 algorithm, which was previously optional. All object
system based on inheritence need to use C3 to avoid the diamond
problem. And this change speeds it up, avoiding run-time loading of
F<ext/mro>.

Implements #209, but tests need adjustments: wrong default dfs
assumption, revealed hidden c3 bugs.
rurban added a commit that referenced this issue Jul 1, 2019
The default MRO switched from the DFS (depth-first-search) to the
recommended C3 algorithm, which was previously optional. All object
system based on inheritence need to use C3 to avoid the diamond
problem. And this change speeds it up, avoiding run-time loading of
F<ext/mro>.

Implements #209, but tests need adjustments: wrong default dfs
assumption, revealed hidden c3 bugs.
rurban added a commit that referenced this issue Jul 2, 2019
The default MRO switched from the DFS (depth-first-search) to the
recommended C3 algorithm, which was previously optional. All object
system based on inheritence need to use C3 to avoid the diamond
problem. And this change speeds it up, avoiding run-time loading of
F<ext/mro>.

Implements #209, but tests need adjustments: wrong default dfs
assumption, revealed hidden c3 bugs.
rurban added a commit that referenced this issue Jul 2, 2019
The default MRO switched from the DFS (depth-first-search) to the
recommended C3 algorithm, which was previously optional. All object
system based on inheritence need to use C3 to avoid the diamond
problem. And this change speeds it up, avoiding run-time loading of
F<ext/mro>.

Implements #209, but tests need adjustments: wrong default dfs
assumption, revealed hidden c3 bugs.
rurban added a commit that referenced this issue Jul 3, 2019
The default MRO switched from the DFS (depth-first-search) to the
recommended C3 algorithm, which was previously optional. All object
system based on inheritence need to use C3 to avoid the diamond
problem. And this change speeds it up, avoiding run-time loading of
F<ext/mro>.

Implements #209, but tests need adjustments: wrong default dfs
assumption, revealed hidden c3 bugs.
rurban added a commit that referenced this issue Aug 25, 2019
The default MRO switched from the DFS (depth-first-search) to the
recommended C3 algorithm, which was previously optional. All object
system based on inheritence need to use C3 to avoid the diamond
problem. And this change speeds it up, avoiding run-time loading of
F<ext/mro>.

Implements #209, but tests need adjustments: wrong default dfs
assumption, revealed hidden c3 bugs.
rurban added a commit that referenced this issue Dec 17, 2019
The default MRO switched from the DFS (depth-first-search) to the
recommended C3 algorithm, which was previously optional. All object
system based on inheritence need to use C3 to avoid the diamond
problem. And this change speeds it up, avoiding run-time loading of
F<ext/mro>.

Implements #209, but tests need adjustments: wrong default dfs
assumption, revealed hidden c3 bugs.
rurban added a commit that referenced this issue Jan 19, 2020
The default MRO switched from the DFS (depth-first-search) to the
recommended C3 algorithm, which was previously optional. All object
system based on inheritence need to use C3 to avoid the diamond
problem. And this change speeds it up, avoiding run-time loading of
F<ext/mro>.

Implements #209, but tests need adjustments: wrong default dfs
assumption, revealed hidden c3 bugs.
rurban added a commit that referenced this issue Jan 19, 2020
The default MRO switched from the DFS (depth-first-search) to the
recommended C3 algorithm, which was previously optional. All object
system based on inheritence need to use C3 to avoid the diamond
problem. And this change speeds it up, avoiding run-time loading of
F<ext/mro>.

Implements #209, but tests need adjustments: wrong default dfs
assumption, revealed hidden c3 bugs.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant