Skip to content

Commit

Permalink
Go backend - mp6.pl shows Go compiler messages
Browse files Browse the repository at this point in the history
  • Loading branch information
fglock committed Jul 27, 2010
1 parent 6b5bb96 commit dacac04
Show file tree
Hide file tree
Showing 9 changed files with 4 additions and 53 deletions.
9 changes: 0 additions & 9 deletions lib/MiniPerl6/Parrot/Emitter.pm
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,6 @@ class Var {
# ' $P0 = find_lex \'' ~ self.full_name ~ '\'' ~ "\n"
)
};
# method name {
# $.name
# };
method full_name {
# Normalize the sigil here into $
# $x => $x
Expand Down Expand Up @@ -815,12 +812,6 @@ class Sig {
method emit_parrot {
' print \'Signature - TODO\'; die \'Signature - TODO\'; '
};
#method invocant {
# $.invocant
#};
#method positional {
# $.positional
#}
}

class Method {
Expand Down
10 changes: 0 additions & 10 deletions lib/MiniPerl6/Python/Emitter.pm
Original file line number Diff line number Diff line change
Expand Up @@ -443,9 +443,6 @@ class Var {
)
)
};
method name {
$.name
};
}

class Bind {
Expand Down Expand Up @@ -489,7 +486,6 @@ class Call {
has $.hyper;
has $.method;
has @.arguments;
#has $.hyper;
method emit_python { $self.emit_python_indented(0) }
method emit_python_indented( $level ) {
my $invocant = $.invocant.emit_python;
Expand Down Expand Up @@ -769,12 +765,6 @@ class Sig {
method emit_python {
' print \'Signature - TODO\'; die \'Signature - TODO\'; '
};
method invocant {
$.invocant
};
method positional {
$.positional
}
}

class Method {
Expand Down
3 changes: 0 additions & 3 deletions lib/MiniPerl6/Rakudo/Emitter.pm
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,6 @@ class Var {
!! ( $table{$.sigil} ~ $.name )
)
};
method name {
$.name
};
}

class Bind {
Expand Down
9 changes: 0 additions & 9 deletions lib/MiniPerl6/Ruby/Emitter.pm
Original file line number Diff line number Diff line change
Expand Up @@ -467,9 +467,6 @@ class Var {
)
)
};
method name {
$.name
};
}
class Bind {
Expand Down Expand Up @@ -760,12 +757,6 @@ class Sig {
method emit_ruby {
' print \'Signature - TODO\'; die \'Signature - TODO\'; '
};
method invocant {
$.invocant
};
method positional {
$.positional
}
}
class Method {
Expand Down
3 changes: 1 addition & 2 deletions lib5/MiniPerl6/Python/Emitter.pm
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,7 @@ sub name { $_[0]->{name} };
(my $table = { '$' => 'v_','@' => 'List_','%' => 'Hash_','&' => 'Code_', });
sub emit_python { my $self = $_[0]; $self->emit_python_indented(0) };
sub emit_python_indented { my $self = $_[0]; my $level = $_[1]; return(Python::tab($level) . (Main::bool(($self->{twigil} eq '.')) ? 'v_self[0].v_' . $self->{name} . '' : (Main::bool(($self->{name} eq '/')) ? $table->{$self->{sigil}} . 'MATCH[0]' : $table->{$self->{sigil}} . $self->{name} . '[0]'))) };
sub emit_python_name { my $self = $_[0]; return((Main::bool(($self->{twigil} eq '.')) ? 'v_self[0].v_' . $self->{name} : (Main::bool(($self->{name} eq '/')) ? $table->{$self->{sigil}} . 'MATCH' : $table->{$self->{sigil}} . $self->{name}))) };
sub name { my $self = $_[0]; $self->{name} }
sub emit_python_name { my $self = $_[0]; return((Main::bool(($self->{twigil} eq '.')) ? 'v_self[0].v_' . $self->{name} : (Main::bool(($self->{name} eq '/')) ? $table->{$self->{sigil}} . 'MATCH' : $table->{$self->{sigil}} . $self->{name}))) }
}

{
Expand Down
3 changes: 1 addition & 2 deletions lib5/MiniPerl6/Ruby/Emitter.pm
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,7 @@ sub name { $_[0]->{name} };
(my $table = { '$' => 'v_','@' => 'list_','%' => 'hash_','&' => 'code_', });
sub emit_ruby { my $self = $_[0]; $self->emit_ruby_indented(0) };
sub emit_ruby_indented { my $self = $_[0]; my $level = $_[1]; if (Main::bool((($self->{sigil} eq '@') && (($self->{twigil} eq '*') && ($self->{name} eq 'ARGS'))))) { return(Ruby::tab($level) . 'ARGV') } else { }; return(Ruby::tab($level) . (Main::bool(($self->{twigil} eq '.')) ? 'self.v_' . $self->{name} . '' : (Main::bool(($self->{name} eq '/')) ? $table->{$self->{sigil}} . 'MATCH' : $table->{$self->{sigil}} . $self->{name} . ''))) };
sub emit_ruby_name { my $self = $_[0]; return((Main::bool(($self->{twigil} eq '.')) ? 'self.v_' . $self->{name} : (Main::bool(($self->{name} eq '/')) ? $table->{$self->{sigil}} . 'MATCH' : $table->{$self->{sigil}} . $self->{name}))) };
sub name { my $self = $_[0]; $self->{name} }
sub emit_ruby_name { my $self = $_[0]; return((Main::bool(($self->{twigil} eq '.')) ? 'self.v_' . $self->{name} : (Main::bool(($self->{name} eq '/')) ? $table->{$self->{sigil}} . 'MATCH' : $table->{$self->{sigil}} . $self->{name}))) }
}

{
Expand Down
4 changes: 2 additions & 2 deletions mp6.pl
Original file line number Diff line number Diff line change
Expand Up @@ -425,9 +425,9 @@ package Main;
unlink '6.out';
warn "calling go compiler\n" if $verbose;
my $result = `6g $tmp_filename.go`;
warn "go compiler: $result\n" if $verbose && $result;
warn "go compiler: $result\n" if $result; # $verbose && $result;
$result = `6l $tmp_filename.6`;
warn "go linker: $result\n" if $verbose && $result;
warn "go linker: $result\n" if $result; # $verbose && $result;
}
if ( $execute ) {
warn "now executing\n" if $verbose;
Expand Down
14 changes: 0 additions & 14 deletions util-go/build-go.sh

This file was deleted.

2 changes: 0 additions & 2 deletions util-go/mp6-go-main.pm

This file was deleted.

0 comments on commit dacac04

Please sign in to comment.