Author: jhorwitz
Date: Sat Sep 8 08:03:39 2007
New Revision: 247
Removed:
mod_parrot/trunk/t/src/cc_test.pir
Modified:
mod_parrot/trunk/Configure.pl
mod_parrot/trunk/Makefile.in
mod_parrot/trunk/build/lib/Generator/ApacheRequestRec.pm
mod_parrot/trunk/build/lib/generate_source.pl
mod_parrot/trunk/src/parrot_util.c
Log:
remove support for old parrot calling conventions
Modified: mod_parrot/trunk/Configure.pl
==============================================================================
--- mod_parrot/trunk/Configure.pl (original)
+++ mod_parrot/trunk/Configure.pl Sat Sep 8 08:03:39 2007
@@ -50,18 +50,8 @@
print "\n";
+# defines to pass to compiler
my $defines;
-print "Determining Parrot calling conventions...";
-my $calling_conventions = `$parrot_build_dir/parrot t/src/cc_test.pir`;
-chomp($calling_conventions);
-if ($calling_conventions eq 'new') {
- $defines = '-DPARROT_NEW_CALL_CONV';
-}
-else {
- die 'calling convention test failed!' if $calling_conventions ne 'old';
-}
-
-print "$calling_conventions\n";
# where are apache includes?
my $apache_include_dir = `$apxs -q INCLUDEDIR`;
Modified: mod_parrot/trunk/Makefile.in
==============================================================================
--- mod_parrot/trunk/Makefile.in (original)
+++ mod_parrot/trunk/Makefile.in Sat Sep 8 08:03:39 2007
@@ -53,7 +53,7 @@
gen-src:
@echo Generating Source...
- perl build/lib/generate_source.pl --apache-include-dir=$(APACHE_INCLUDE_DIR) --calling-conventions=$(CALLING_CONVENTIONS)
+ perl build/lib/generate_source.pl --apache-include-dir=$(APACHE_INCLUDE_DIR)
gen-src-clean:
rm -rf build/src
Modified: mod_parrot/trunk/build/lib/Generator/ApacheRequestRec.pm
==============================================================================
--- mod_parrot/trunk/build/lib/Generator/ApacheRequestRec.pm (original)
+++ mod_parrot/trunk/build/lib/Generator/ApacheRequestRec.pm Sat Sep 8 08:03:39 2007
@@ -125,10 +125,7 @@
{
my $self = shift;
- my $template;
-
- if ($self->{calling_conventions} eq 'new') {
- $template = <<'END'
+ my $template = <<'END'
.sub %%NAME%% :method
.param int data :optional
.param int update_r :opt_flag
@@ -148,34 +145,6 @@
END
;
- }
- else {
- $template = <<'END'
-.sub %%NAME%% :method
- .param int data
- .local pmc r
- .local pmc request_rec_%%NAME%%
- .local int %%NAME%%
- .local int update_r
-
- # whether or not we should update r with the new value.
- if I1 == 0 goto done
- update_r = 1
-
-done:
- getattribute r, self, 'r'
-
- request_rec_%%NAME%% = get_root_global [ '_modparrot'; 'NCI' ], 'request_rec_%%NAME%%'
- %%NAME%% = request_rec_%%NAME%%( r , data, update_r )
-
- .pcc_begin_return
- .return %%NAME%%
- .pcc_end_return
-.end
-
-END
-;
- }
return $template;
}
Modified: mod_parrot/trunk/build/lib/generate_source.pl
==============================================================================
--- mod_parrot/trunk/build/lib/generate_source.pl (original)
+++ mod_parrot/trunk/build/lib/generate_source.pl Sat Sep 8 08:03:39 2007
@@ -24,11 +24,9 @@
use Generator::ApacheRequestRec;
my $apache_include_dir = '/usr/local/apache2/include/';
-my $calling_conventions = 'new';
GetOptions(
'apache-include-dir=s' => \$apache_include_dir,
- 'calling-conventions=s' => \$calling_conventions,
) || die 'Could not get command line args.';
# This is where the generated source lives.
@@ -44,7 +42,6 @@
my %args = (
'apache_include_dir' => $apache_include_dir . '/',
- 'calling_conventions' => $calling_conventions,
'nci_src' => 'build/src/nci/',
'pir_src' => 'build/src/pir/',
);
Modified: mod_parrot/trunk/src/parrot_util.c
==============================================================================
--- mod_parrot/trunk/src/parrot_util.c (original)
+++ mod_parrot/trunk/src/parrot_util.c Sat Sep 8 08:03:39 2007
@@ -109,7 +109,6 @@
}
/* adapted from Parrot's PDB_backtrace */
-#ifdef PARROT_NEW_CALL_CONV
char *modparrot_backtrace(Parrot_Interp interp)
{
STRING *str, *buf = NULL;
@@ -170,54 +169,3 @@
trace_string = string_to_cstring(interp, buf);
return(trace_string);
}
-#else /* PARROT_NEW_CALL_CONV */
-char *modparrot_backtrace(Parrot_Interp interp)
-{
- STRING *str, *buf = NULL;
- PMC *sub;
- PMC *old = PMCNULL;
- int rec_level = 0;
- char *trace_string;
-
- /* information about the current sub */
- sub = interpinfo_p(interp, CURRENT_SUB);
- if (!PMC_IS_NULL(sub)) {
- str = Parrot_Context_infostr(interp, &interp->ctx);
- if (str)
- buf = string_concat(interp, buf, str, 0);
- }
-
- /* backtrace: follow the continuation chain */
- sub = interpinfo_p(interp, CURRENT_CONT);
- while (!PMC_IS_NULL(sub) &&
- sub->vtable->base_type == enum_class_Continuation &&
- NULL != (str = Parrot_Context_infostr(interp,
- &PMC_cont(sub)->ctx)) ) {
-
- /* recursion detection */
- if (!PMC_IS_NULL(old) && PMC_cont(old) &&
- PMC_cont(old)->ctx.current_pc == PMC_cont(sub)->ctx.current_pc &&
- PMC_cont(old)->ctx.current_sub == PMC_cont(sub)->ctx.current_sub) {
- ++rec_level;
- } else if (rec_level != 0) {
- string_nprintf(interp, buf, 0, "... call repeated %d times\n",
- rec_level);
- rec_level = 0;
- }
-
- /* print the context description */
- if (rec_level == 0)
- buf = string_concat(interp, buf, str, 0);
-
- /* get the next Continuation */
- old = sub;
- sub = PMC_cont(sub)->ctx.current_cont;
- }
- if (rec_level != 0) {
- string_nprintf(interp, buf, 0, "... call repeated %d times\n",
- rec_level);
- }
- trace_string = string_to_cstring(interp, buf);
- return(trace_string);
-}
-#endif /* PARROT_NEW_CALL_CONV */
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.