Skip to content

Instantly share code, notes, and snippets.

View jnthn's full-sized avatar

Jonathan Worthington jnthn

View GitHub Profile
2011.04 run 1: 75 secs
2011.04 run 2: 77 secs
2011.04 run 3: 76 secs
2011.03 run 1: 73 secs
2011.03 run 2: 73 secs
2011.03 run 3: 73 secs
2011.02 run 1: 122 secs
2011.02 run 2: 123 secs
2011.02 run 3: 123 secs
2011.01 run 1: 148 secs
Hi all,
We're happy to announce the Nordic Perl Worksop 2011 conference website is now up:
http://conferences.yapceurope.org/npw2011/
Paws for a moment to admire our logo, then please do sign up and submit talks. :-)
If you're a Perl Monger group leader and reading this, please do pass this on to your group's mailing list.
<?xml version="1.0" encoding="utf-8"?>
<xs:schema targetNamespace="http://tempuri.org/XMLSchema.xsd"
elementFormDefault="qualified"
xmlns="http://tempuri.org/XMLSchema.xsd"
xmlns:mstns="http://tempuri.org/XMLSchema.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="PlayerRegisteredEvent">
<xs:complexType>
<xs:all>
diff --git a/compilers/pct/src/PAST/Compiler.pir b/compilers/pct/src/PAST/Compiler.pir
index c0ca392..104cda4 100644
--- a/compilers/pct/src/PAST/Compiler.pir
+++ b/compilers/pct/src/PAST/Compiler.pir
@@ -854,23 +854,11 @@ Return the POST representation of a C<PAST::Block>.
## pir-encode name and namespace
.local string blockreg, blockref
blockreg = self.'uniquereg'('P')
- if ns goto block_ns
blockref = concat ".const 'Sub' ", blockreg
diff --git a/compilers/imcc/reg_alloc.c b/compilers/imcc/reg_alloc.c
index de0f3e0..300216d 100644
--- a/compilers/imcc/reg_alloc.c
+++ b/compilers/imcc/reg_alloc.c
@@ -391,6 +391,9 @@ reg_sort_f(ARGIN(const void *a), ARGIN(const void *b))
const SymReg * const ra = *(const SymReg * const *)a;
const SymReg * const rb = *(const SymReg * const *)b;
+ if (!ra->first_ins || !rb->first_ins)
+ return 0;
.sub ''
$P42 = new ['Integer']
.lex 'i', $P42
$P69 = new ['Integer']
.lex 'j', $P69
.lex 'foo', $P10
.lex 'bar', $P11
.lex 'baz', $P12
$P3 = new ['String']
.lex 'k', $P3
# Remove the is repr('HashAttrStore') to see normal Perl 6 semantics
# (it prints nothing as the $!a is separately stored per class). With
# it in, this prints 42.
class Foo is repr('HashAttrStore') {
has $!a;
method foo() { $!a := 42 }
}
class Bar is repr('HashAttrStore') is Foo {
has $!a;
Multiple Dispatch Optimization in Rakudo
The Rakudo Perl 6 compiler has implemented multiple dispatch for a
while. This is a mechanism by which we pick a routine to call based
on the types of the arguments it is being invoked with. By the Perl 6
specification, in any given lexical scope the set of multi dispatch
candidates is statically known. One opportunity that arises from
this is to try and statically decide some multi-dispatches at compile
time. It won't always be possible - for example, we may have no clue
about the argument types - but when it is possible there could be
some great performance wins.
.source hello.jasm
.class public Hello
.super java/lang/Object
.method public static main([Ljava/lang/String;)V
.limit stack 2
getstatic java/lang/System/out Ljava/io/PrintStream;
ldc "hello from jasmin"
invokevirtual java/io/PrintStream/println(Ljava/lang/String;)V
return
knowhow RubyClassHOW {
has $!parent;
has $!parent_set;
has $!name;
has %!methods;
has %!attributes;
method new(:$name) {
my $obj := pir::repr_instance_of__PP(self);
$obj.BUILD(:name($name));