Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: rakudo/rakudo
...
head fork: rakudo/rakudo
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
Showing with 11 additions and 3 deletions.
  1. +1 −0  docs/ChangeLog
  2. +7 −0 src/core/Exception.pm
  3. +3 −3 src/core/control.pm
View
1  docs/ChangeLog
@@ -9,6 +9,7 @@ New in 2012.06
+ more errors from within the meta model now contain line number and file name
+ &push and &unshift functions can now autovivify
+ user-defined operators properly participate in LTM
++ Rakudo's C code is now compiled with optimization switches turned on
New in 2012.05
+ meta ops //=, ||= and &&= now short-circuit properly
View
7 src/core/Exception.pm
@@ -808,6 +808,13 @@ my class X::Temporal::InvalidFormat is X::Temporal {
}
}
+my class X::Eval::NoSuchLang is Exception {
+ has $.lang;
+ method message() {
+ "No compiler compiler available for language '$lang'";
+ }
+}
+
{
my %c_ex;
%c_ex{'X::TypeCheck::Binding'} := sub ($got, $expected) is hidden_from_backtrace {
View
6 src/core/control.pm
@@ -1,4 +1,5 @@
my class Nil { ... }
+my class X::Eval::NoSuchLang { ... }
my &THROW :=
-> |$ {
@@ -149,9 +150,8 @@ multi sub eval(Str $code, :$lang = 'perl6') {
};
my $?FILES := 'eval_' ~ (state $no)++;
my $compiler := pir::compreg__PS($lang);
- if nqp::isnull($compiler) {
- die "No compiler available for language '$lang'";
- }
+ X::Eval::NoSuchLang.new(:$lang).throw
+ if nqp::isnull($compiler);
my $pbc := $compiler.compile($code, :outer_ctx($caller_ctx), :global(GLOBAL));
nqp::atpos($pbc, 0).set_outer_ctx($caller_ctx);
$pbc();

No commit comments for this range

Something went wrong with that request. Please try again.