Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
100 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/vm/jvm/runtime/org/perl6/rakudo/RakudoContainerConfigurer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package org.perl6.rakudo; | ||
|
||
import org.perl6.nqp.runtime.ThreadContext; | ||
import org.perl6.nqp.sixmodel.*; | ||
|
||
public class RakudoContainerConfigurer extends ContainerConfigurer { | ||
/* Sets this container spec in place for the specified STable. */ | ||
public void setContainerSpec(ThreadContext tc, STable st) { | ||
st.ContainerSpec = new RakudoContainerSpec(); | ||
} | ||
|
||
/* Configures the container spec with the specified info. */ | ||
public void configureContainerSpec(ThreadContext tc, STable st, SixModelObject config) { | ||
/* Nothing to configure here. */ | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
src/vm/jvm/runtime/org/perl6/rakudo/RakudoContainerSpec.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package org.perl6.rakudo; | ||
|
||
import org.perl6.nqp.runtime.ThreadContext; | ||
import org.perl6.nqp.sixmodel.*; | ||
|
||
public class RakudoContainerSpec extends ContainerSpec { | ||
/* Fetches a value out of a container. Used for decontainerization. */ | ||
public SixModelObject fetch(ThreadContext tc, SixModelObject cont) { | ||
throw new RuntimeException("Rakudo scalar fetch NYI"); | ||
} | ||
|
||
/* Stores a value in a container. Used for assignment. */ | ||
public void store(ThreadContext tc, SixModelObject cont, SixModelObject obj) { | ||
throw new RuntimeException("Rakudo scalar store NYI"); | ||
} | ||
|
||
/* Stores a value in a container, without any checking of it (this | ||
* assumes an optimizer or something else already did it). Used for | ||
* assignment. */ | ||
public void storeUnchecked(ThreadContext tc, SixModelObject cont, SixModelObject obj) { | ||
throw new RuntimeException("Rakudo scalar store NYI"); | ||
} | ||
|
||
/* Name of this container specification. */ | ||
public String name() { | ||
return "rakudo_scalar"; | ||
} | ||
|
||
/* Serializes the container data, if any. */ | ||
public void serialize(ThreadContext tc, STable st, SerializationWriter writer) { | ||
/* No data to serialize. */ | ||
} | ||
|
||
/* Deserializes the container data, if any. */ | ||
public void deserialize(ThreadContext tc, STable st, SerializationReader reader) { | ||
/* No data to deserialize. */ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/usr/bin/perl | ||
# Copyright (C) 2013, The Perl Foundation. | ||
|
||
use strict; | ||
use warnings; | ||
use 5.008; | ||
|
||
my ($existing) = shift @ARGV; | ||
|
||
unless (-e $existing) { | ||
$existing = "$existing.bat"; | ||
} | ||
unless (-e $existing) { | ||
die "Could not find " . $ARGV[0]; | ||
} | ||
|
||
open my $fh, "<", $existing; | ||
my $runner; | ||
while (<$fh>) { | ||
$runner = $_; | ||
} | ||
close $fh; | ||
|
||
$runner =~ s/nqp-runtime\.jar\;/nqp-runtime.jar;rakudo-runtime.jar;/; | ||
$runner =~ s/nqp-runtime\.jar\:/nqp-runtime.jar:rakudo-runtime.jar:/; | ||
|
||
my $args = join ' ', @ARGV; | ||
$runner =~ s/"\$\@"/$args/; | ||
$runner =~ s/\%\*/$args/; | ||
|
||
system $runner; |