Skip to content

Commit

Permalink
Make every CORE compile with its respective language revision
Browse files Browse the repository at this point in the history
This is a preparation work to assign language version to core classes.
I.e. PseudoStash.^ver would report back either `6.c` or `6.e` depending
from which CORE the class was imported.
  • Loading branch information
vrurg committed Aug 6, 2019
1 parent 84b3e9f commit ae4ba74
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
6 changes: 5 additions & 1 deletion src/Perl6/World.nqp
Expand Up @@ -683,8 +683,12 @@ class Perl6::World is HLL::World {
if nqp::eqat($!setting_name, 'NULL', 0) {
$*COMPILING_CORE_SETTING := 1;
$*SET_DEFAULT_LANG_VER := 0;
my $lang_ver := nqp::iseq_s($!setting_name, 'NULL')
?? '6.c'
!! '6.' ~ nqp::substr($!setting_name, 5, 1);
nqp::getcomp('perl6').set_language_version: $lang_ver;

}
# self.load_setting($/,$!setting_name);
$*UNIT.annotate('IN_DECL', 'mainline');
}
}
Expand Down
5 changes: 2 additions & 3 deletions src/core/Rakudo/Internals.pm6
Expand Up @@ -15,6 +15,8 @@ my class X::Str::Sprintf::Directives::Count { ... }
my class X::Str::Sprintf::Directives::Unsupported { ... }
my class X::TypeCheck { ... }

# Marker symbol for 6.c-mode regex boolification.
my class Rakudo::Internals::RegexBoolification6cMarker { }

my class Rakudo::Internals {

Expand All @@ -40,9 +42,6 @@ my class Rakudo::Internals {
method dynamic() { False }
}

# Marker symbol for 6.c-mode regex boolification.
class RegexBoolification6cMarker { }

# rotate nqp list to another given list without using push/pop
method RotateListToList(\from,\n,\to) {
nqp::stmts(
Expand Down
2 changes: 2 additions & 0 deletions src/core/core_prologue.pm6
Expand Up @@ -9,6 +9,8 @@ my class Failure { ... }
my class Rakudo::Deprecations { ... }
my class Rakudo::Internals { ... }
my class Rakudo::Internals::JSON { ... }
my class Rakudo::Internals::RegexBoolification6cMarker { ... }
my class Rakudo::Internals::HyperWorkBatch { ... }
my class Rakudo::Iterator { ... }
#?if !js
my class ThreadPoolScheduler { ... }
Expand Down

0 comments on commit ae4ba74

Please sign in to comment.