Skip to content

Instantly share code, notes, and snippets.

@FROGGS

FROGGS/jvm.diff Secret

Created September 9, 2015 08:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FROGGS/7506e36cb30daed487f5 to your computer and use it in GitHub Desktop.
Save FROGGS/7506e36cb30daed487f5 to your computer and use it in GitHub Desktop.
diff --git a/src/Perl6/Metamodel/BOOTSTRAP.nqp b/src/Perl6/Metamodel/BOOTSTRAP.nqp
index fecd02a..3a8fe8e 100644
--- a/src/Perl6/Metamodel/BOOTSTRAP.nqp
+++ b/src/Perl6/Metamodel/BOOTSTRAP.nqp
@@ -96,7 +96,7 @@ my class Binder {
my int $SIG_ELEM_SLURPY_POS := 8;
my int $SIG_ELEM_SLURPY_NAMED := 16;
my int $SIG_ELEM_SLURPY_LOL := 32;
- my int $SIG_ELEM_SLURPY := ($SIG_ELEM_SLURPY_POS +| SIG_ELEM_SLURPY_NAMED +| $SIG_ELEM_SLURPY_LOL);
+ my int $SIG_ELEM_SLURPY := ($SIG_ELEM_SLURPY_POS +| $SIG_ELEM_SLURPY_NAMED +| $SIG_ELEM_SLURPY_LOL);
my int $SIG_ELEM_INVOCANT := 64;
my int $SIG_ELEM_MULTI_INVOCANT := 128;
my int $SIG_ELEM_IS_RW := 256;
@@ -1103,8 +1103,10 @@ BEGIN {
Attribute.HOW.add_method(Attribute, 'new',
nqp::getstaticcode(sub ($self, :$name!, :$type!, :$package!, :$inlined = 0, :$has_accessor,
:$positional_delegate = 0, :$associative_delegate = 0, *%other) {
+ nqp::say('BOOTSTRAP:1106 ' ~ $self.HOW.name($self) ~ ' ' ~ $name);
my $attr := nqp::create($self);
nqp::bindattr_s($attr, Attribute, '$!name', $name);
+ nqp::say('BOOTSTRAP:1109 ' ~ $name);
nqp::bindattr($attr, Attribute, '$!type', nqp::decont($type));
nqp::bindattr_i($attr, Attribute, '$!has_accessor', $has_accessor);
nqp::bindattr($attr, Attribute, '$!package', $package);
@@ -1117,8 +1119,10 @@ BEGIN {
}
}
else {
+ nqp::say('BOOTSTRAP:1122 ' ~ $name);
my $cd := Perl6::Metamodel::ContainerDescriptor.new(
:of($type), :rw(1), :name($name));
+ nqp::say('BOOTSTRAP:1125 ' ~ $name);
my $scalar := nqp::create(Scalar);
nqp::bindattr($scalar, Scalar, '$!descriptor', $cd);
nqp::bindattr($scalar, Scalar, '$!value', $type);
@@ -1128,6 +1132,7 @@ BEGIN {
nqp::bindattr_i($attr, Attribute, '$!positional_delegate', $positional_delegate);
nqp::bindattr_i($attr, Attribute, '$!associative_delegate', $associative_delegate);
if nqp::existskey(%other, 'build') {
+ nqp::say('BOOTSTRAP:1132 ' ~ %other.perl);
$attr.set_build(%other<build>);
}
$attr
diff --git a/src/core/Mu.pm b/src/core/Mu.pm
index c500c38..11cf1fd 100644
--- a/src/core/Mu.pm
+++ b/src/core/Mu.pm
@@ -114,7 +114,7 @@ Please refactor this code using the new Iterator / Seq interface.
nqp::create(self).BUILDALL(@autovivs, %attrinit);
}
- method BUILDALL(@autovivs, %attrinit) {
+ method BUILDALL(@autovivs, %attrinit) { nqp::say('Mu:117 BUILDALL ' ~ self.HOW.name(self));
# Get the build plan. Note that we do this "low level" to
# avoid the NQP type getting mapped to a Rakudo one, which
# would get expensive.
diff --git a/src/core/traits.pm b/src/core/traits.pm
index cc5cc0d..a07ec9d 100644
--- a/src/core/traits.pm
+++ b/src/core/traits.pm
@@ -248,7 +248,7 @@ my $_;
sub EXPORT_SYMBOL(\exp_name, @tags, Mu \sym) {
my @export_packages = $*EXPORT;
- for flat nqp::hllize(@*PACKAGES) {
+ for |nqp::hllize(@*PACKAGES) {
unless .WHO.EXISTS-KEY('EXPORT') {
.WHO<EXPORT> := Metamodel::PackageHOW.new_type(:name('EXPORT'));
.WHO<EXPORT>.^compose;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment