Skip to content

Instantly share code, notes, and snippets.

- QAST::CompUnit :W<?> :UNIT<?>
[post_deserialize]
- QAST::Stmts
- QAST::Op(bind)
- QAST::Var(attribute $!do)
- QAST::WVal(Block)
- QAST::WVal(Code)
- QAST::BVal(cuid_1_1458586573.63869)
- QAST::Op(bindcurhllsym)
- QAST::SVal(GLOBAL)
#0 0x00007ffff7153d34 in free () from /lib64/libc.so.6
#1 0x00007ffff675fbe8 in MVM_free (p=0xac00000096) at src/core/alloc.h:29
#2 0x00007ffff675fe13 in MVM_callsite_destroy (cs=0x3ebc9f0) at src/core/callsite.c:96
#3 0x00007ffff675fe30 in MVM_callsite_destroy (cs=0x4386cb0) at src/core/callsite.c:100
#4 0x00007ffff67f39fc in gc_free (tc=0xa2a580, obj=0xae47c8) at src/6model/reprs/MVMCompUnit.c:86
#5 0x00007ffff67c7008 in MVM_gc_collect_free_gen2_unmarked (tc=0xa2a580, global_destruction=1) at src/gc/collect.c:650
#6 0x00007ffff67c187a in MVM_gc_global_destruction (tc=0xa2a580) at src/gc/orchestrate.c:502
#7 0x00007ffff687865f in MVM_vm_destroy_instance (instance=0x9df900) at src/moar.c:376
#8 0x00007ffff6cd0fd5 in XS_Inline__Perl6_p6_destroy (my_perl=0x79f010, cv=<optimized out>) at Perl6.xs:123
#9 0x00000000004b3ee3 in Perl_pp_entersub (my_perl=0x79f010) at pp_hot.c:2794
> RAKUDO_VERBOSE_STACKFRAME=1 perl6 -Ilib foo.pl
Died
in method foo at /home/nine/test/rt127375/lib/Foo.pm (Foo) line 2
in block <unit> at foo.pl line 2
1 use Foo;
#!/usr/bin/env perl6
use v6.c;
sub MAIN($short-name, :$ver = True, :$auth = True, :$api = True) {
my $comp-unit = $*REPO.resolve(CompUnit::DependencySpecification.new(:$short-name, :$ver, :$auth, :$api));
$comp-unit.repo.uninstall($comp-unit.distribution);
}
# vim: ft=perl6
#!/usr/bin/env perl6
use v6.c;
role Distribution::Directory {
has IO::Path $.path;
has %!meta;
method meta() {
%!meta ||= from-json slurp ('META6.json', 'META.info').map({$.path.child($_)}).first: {$_ ~~ :f};
}
#!/usr/bin/env perl6
use v6.c;
sub MAIN(Str $module) {
my $cu = $*REPO.need(CompUnit::DependencySpecification.new(:short-name($module)));
say "Dist: " ~ $cu.repo.prefix.child('dist/' ~ $cu.distribution.id);
say "Source: " ~ $cu.repo.prefix.child('sources/' ~ $cu.distribution.provides{$module}.values[0]<file>);
}
method merge_globals($target, $source) {
# Start off merging top-level symbols. Easy when there's no
# overlap. Otherwise, we need to recurse.
my %known_symbols;
for stash_hash($target) {
nqp::sayfh(nqp::getstderr(), "Known symbol " ~ $_.key);
%known_symbols{$_.key} := 1;
}
for stash_hash($source) {
my $sym := $_.key;
@niner
niner / test.c
Last active January 2, 2016 11:33 — forked from bpetering/test.c
#include <stdio.h>
#include <stdlib.h>
struct foo {
int x;
};
void foo_init(struct foo **f) {
*f = malloc(sizeof(struct foo));
printf("malloc'd, pointer = %p\n", (void *) *f);
$echo "Choosing the C types to be used for Perl's internal types..." >&4
case "$use64bitint:$d_quad:$quadtype" in
define:define:?*)
ivtype="$quadtype"
uvtype="$uquadtype"
ivsize=8
uvsize=8
;;
*) ivtype="long"
diff --git a/src/core/CompUnit/Repository/Installation.pm b/src/core/CompUnit/Repository/Installation.pm
index 9877332..7c32bd2 100644
--- a/src/core/CompUnit/Repository/Installation.pm
+++ b/src/core/CompUnit/Repository/Installation.pm
@@ -304,7 +304,8 @@ sub MAIN(:$name is copy, :$auth, :$ver, *@, *%) {
method id() {
return $!id if $!id;
$!id = self.CompUnit::Repository::Locally::id();
- $!id = nqp::sha1($!id ~ self!dist-dir.dir)
+ my $dist-dir = $.prefix.child('dist');