[svn:parrot] r36757 - in trunk: . compilers/tge compilers/tge/TGE config/gen/makefiles t/compilers/tge
fperrad at svn.parrot.org
fperrad at svn.parrot.org
Sun Feb 15 12:18:13 UTC 2009
Author: fperrad
Date: Sun Feb 15 12:18:12 2009
New Revision: 36757
URL: https://trac.parrot.org/parrot/changeset/36757
Log:
[TGE] fix load_bytecode in install tree
(pb with 'compilers' in the path)
Modified:
trunk/MANIFEST.generated
trunk/compilers/tge/TGE/ (props changed)
trunk/compilers/tge/TGE.pir
trunk/compilers/tge/TGE/Compiler.pir
trunk/config/gen/makefiles/tge.in
trunk/t/compilers/tge/basic.t
trunk/t/compilers/tge/parser.t
Modified: trunk/MANIFEST.generated
==============================================================================
--- trunk/MANIFEST.generated Sun Feb 15 11:36:53 2009 (r36756)
+++ trunk/MANIFEST.generated Sun Feb 15 12:18:12 2009 (r36757)
@@ -12,11 +12,6 @@
compilers/json/JSON/grammar.pbc [json]
compilers/json/JSON/pge2pir.pbc [json]
compilers/nqp/nqp.pbc [nqp]
-compilers/tge/TGE/Compiler.pbc [tge]
-compilers/tge/TGE/Grammar.pbc [tge]
-compilers/tge/TGE/Parser.pbc [tge]
-compilers/tge/TGE/Rule.pbc [tge]
-compilers/tge/TGE/Tree.pbc [tge]
compilers/tge/tgc.pir [tge]
config/auto/cpu/i386/memcpy_mmx.c []
config/auto/cpu/i386/memcpy_sse.c []
Modified: trunk/compilers/tge/TGE.pir
==============================================================================
--- trunk/compilers/tge/TGE.pir Sun Feb 15 11:36:53 2009 (r36756)
+++ trunk/compilers/tge/TGE.pir Sun Feb 15 12:18:12 2009 (r36757)
@@ -1,4 +1,4 @@
-# Copyright (C) 2005-2008, The Perl Foundation.
+# Copyright (C) 2005-2009, The Perl Foundation.
=head1 NAME
@@ -80,7 +80,19 @@
.namespace [ 'TGE' ]
-.sub '__onload' :load
+.sub '__onload_first' :load
+ # use other modules
+ load_bytecode 'PGE.pbc'
+ load_bytecode 'PGE/Util.pbc'
+.end
+
+.include "compilers/tge/TGE/Parser.pir"
+.include "compilers/tge/TGE/Rule.pir"
+.include "compilers/tge/TGE/Tree.pir"
+.include "compilers/tge/TGE/Grammar.pir"
+.include "compilers/tge/TGE/Compiler.pir"
+
+.sub '__onload_last' :load
# make sure we execute this sub only once
$P0 = get_global '$!tge_loaded'
unless null $P0 goto end
@@ -88,15 +100,6 @@
assign $P0, 1
set_global '$!tge_loaded', $P0
- # use other modules
- load_bytecode 'PGE.pbc'
- load_bytecode 'PGE/Util.pbc'
- load_bytecode 'compilers/tge/TGE/Rule.pbc'
- load_bytecode 'compilers/tge/TGE/Tree.pbc'
- load_bytecode 'compilers/tge/TGE/Parser.pbc'
- load_bytecode 'compilers/tge/TGE/Grammar.pbc'
- load_bytecode 'compilers/tge/TGE/Compiler.pbc'
-
# import <die> and <line_number> rules from PGE::Util
$P0 = get_class ['TGE';'Parser']
$P1 = get_hll_global ['PGE';'Util'], 'die'
@@ -109,7 +112,6 @@
.end
-
=head1 AUTHOR
Allison Randal <allison at perl.org>
Modified: trunk/compilers/tge/TGE/Compiler.pir
==============================================================================
--- trunk/compilers/tge/TGE/Compiler.pir Sun Feb 15 11:36:53 2009 (r36756)
+++ trunk/compilers/tge/TGE/Compiler.pir Sun Feb 15 12:18:12 2009 (r36757)
@@ -1,4 +1,4 @@
-# Copyright (C) 2005-2008, The Perl Foundation.
+# Copyright (C) 2005-2009, The Perl Foundation.
=head1 NAME
@@ -11,8 +11,6 @@
.namespace [ 'TGE'; 'Compiler' ]
.sub __onload :load
- load_bytecode 'TGE.pbc'
-
$P0 = get_class [ 'TGE'; 'Grammar' ]
$P1 = subclass $P0, [ 'TGE'; 'Compiler' ]
.end
Modified: trunk/config/gen/makefiles/tge.in
==============================================================================
--- trunk/config/gen/makefiles/tge.in Sun Feb 15 11:36:53 2009 (r36756)
+++ trunk/config/gen/makefiles/tge.in Sun Feb 15 12:18:12 2009 (r36757)
@@ -1,8 +1,6 @@
# Copyright (C) 2005-2009, The Perl Foundation.
# $Id$
-.SUFFIXES : .pir .pbc
-
# Setup some commands
PERL = @perl@
RM_F = @rm_f@
@@ -15,14 +13,11 @@
# the default target
all: $(PARROT_LIBRARY)/TGE.pbc
-$(PARROT_LIBRARY)/TGE.pbc: TGE.pir TGE/Rule.pbc TGE/Parser.pbc TGE/Grammar.pbc TGE/Compiler.pbc TGE/Tree.pbc
+$(PARROT_LIBRARY)/TGE.pbc: TGE.pir TGE/Rule.pir TGE/Parser.pir TGE/Grammar.pir TGE/Compiler.pir TGE/Tree.pir
$(PARROT) -o $(PARROT_LIBRARY)/TGE.pbc --output-pbc TGE.pir
-.pir.pbc :
- $(PARROT) -o $@ --output-pbc $<
-
TGE/Parser.pir: TGE/Parser.pg
- $(PARROT) $(PERL6GRAMMAR) --output=TGE//Parser.pir TGE//Parser.pg
+ $(PARROT) $(PERL6GRAMMAR) --output=TGE/Parser.pir TGE/Parser.pg
# This is a listing of all targets, that are meant to be called by users
help:
@@ -51,13 +46,9 @@
$(RM_F) "../../t/compilers/tge/*.pir"
clean: testclean
- $(RM_F) TGE/Rule.pbc \
- TGE/Parser.pir \
- TGE/Parser.pbc \
- TGE/Tree.pbc \
- TGE/Grammar.pbc \
- TGE/Compiler.pbc \
- $(PARROT_LIBRARY)/TGE.pbc
+ $(RM_F) \
+ $(PARROT_LIBRARY)/TGE.pbc \
+ TGE/Parser.pir
realclean: clean
$(RM_F) Makefile
Modified: trunk/t/compilers/tge/basic.t
==============================================================================
--- trunk/t/compilers/tge/basic.t Sun Feb 15 11:36:53 2009 (r36756)
+++ trunk/t/compilers/tge/basic.t Sun Feb 15 12:18:12 2009 (r36757)
@@ -1,5 +1,5 @@
#!perl
-# Copyright (C) 2005-2006, The Perl Foundation.
+# Copyright (C) 2005-2009, The Perl Foundation.
# $Id$
use strict;
@@ -50,7 +50,7 @@
pir_output_is( <<'CODE', <<'OUT', 'agid hash' );
.sub _main :main
- load_bytecode 'compilers/tge/TGE/Tree.pir'
+ load_bytecode 'TGE.pbc'
.local pmc tree
tree = new ['TGE';'Tree']
.local int id
Modified: trunk/t/compilers/tge/parser.t
==============================================================================
--- trunk/t/compilers/tge/parser.t Sun Feb 15 11:36:53 2009 (r36756)
+++ trunk/t/compilers/tge/parser.t Sun Feb 15 12:18:12 2009 (r36757)
@@ -1,5 +1,5 @@
#!perl
-# Copyright (C) 2005-2007, The Perl Foundation.
+# Copyright (C) 2005-2009, The Perl Foundation.
# $Id$
use strict;
@@ -21,7 +21,7 @@
pir_output_is( <<'CODE', <<'OUT', "parse a basic attribute grammar" );
.sub _main :main
- load_bytecode "compilers/tge/TGE.pir"
+ load_bytecode 'TGE.pbc'
.local string source
source = <<'GRAMMAR'
@@ -66,7 +66,7 @@
pir_error_output_like( <<'CODE', qr/Syntax error at line 4, near "transform "/, "parse failure" );
.sub _main :main
- load_bytecode "compilers/tge/TGE.pir"
+ load_bytecode 'TGE.pbc'
.local string source
source = <<'GRAMMAR'
More information about the parrot-commits
mailing list