cvsuser 05/02/02 23:59:32
Modified: imcc pbc.c src libnci_test.def t/pmc io.t Log: [perl #34029] [PATCH][MSWin32] Get nci test to link again Attached patch will get libnci_test to link on Win32. Courtesy of Ron Blaschke <[EMAIL PROTECTED]> --- Turn on file/line debug info, unless -Ox Revision Changes Path 1.106 +6 -4 parrot/imcc/pbc.c Index: pbc.c =================================================================== RCS file: /cvs/public/parrot/imcc/pbc.c,v retrieving revision 1.105 retrieving revision 1.106 diff -u -r1.105 -r1.106 --- pbc.c 15 Jan 2005 21:03:29 -0000 1.105 +++ pbc.c 3 Feb 2005 07:59:30 -0000 1.106 @@ -34,7 +34,7 @@ * */ -/* +/* * globals store the state between individual e_pbc_emit calls */ @@ -263,7 +263,7 @@ } -/* +/* * find a label in the interpreter's fixup table */ static int @@ -905,6 +905,7 @@ static opcode_t * pc, npc; op_info_t *op_info; int op, i; + /* XXX move these statics into IMCC_INFO */ static struct PackFile_Debug *debug_seg; static int ins_line; @@ -938,14 +939,15 @@ pc = (opcode_t*) interpreter->code->byte_code + oldsize; npc = 0; /* add debug if necessary */ - if (Interp_flags_TEST(interpreter, PARROT_DEBUG_FLAG) || - PARROT_WARNINGS_test(interpreter, PARROT_WARNINGS_ALL_FLAG)) { + if (!IMCC_INFO(interpreter)->optimizer_level) { const char *sourcefile = IMCC_INFO(interpreter)->state->file; /* FIXME length and multiple subs */ debug_seg = Parrot_new_debug_seg(interpreter, interpreter->code->cur_cs, sourcefile, (size_t) ins_line+ins_size); } + else + debug_seg = NULL; /* if item is a PCC_SUB entry then store it constants */ if (ins->r[1] && ins->r[1]->pcc_sub) { #if IMC_TRACE 1.3 +0 -1 parrot/src/libnci_test.def Index: libnci_test.def =================================================================== RCS file: /cvs/public/parrot/src/libnci_test.def,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- libnci_test.def 27 Jan 2005 07:59:59 -0000 1.2 +++ libnci_test.def 3 Feb 2005 07:59:31 -0000 1.3 @@ -37,4 +37,3 @@ nci_cb_D4 nci_dlvar_int nci_dlvar_double - nci_dlvar_vv 1.35 +6 -8 parrot/t/pmc/io.t Index: io.t =================================================================== RCS file: /cvs/public/parrot/t/pmc/io.t,v retrieving revision 1.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- io.t 1 Oct 2004 21:16:52 -0000 1.34 +++ io.t 3 Feb 2005 07:59:32 -0000 1.35 @@ -1,6 +1,6 @@ #! perl -w # Copyright: 2001-2003 The Perl Foundation. All Rights Reserved. -# $Id: io.t,v 1.34 2004/10/01 21:16:52 jrieks Exp $ +# $Id: io.t,v 1.35 2005/02/03 07:59:32 leo Exp $ =head1 NAME @@ -394,24 +394,22 @@ Hello Parrot! OUTPUT -output_is(<<'CODE', <<'OUTPUT', '32bit seek: exception'); +output_like(<<'CODE', <<'OUTPUT', '32bit seek: exception'); open P0, "temp.file", ">" seek P0, -1, 0 print "error!\n" end CODE -seek failed (32bit) - in file '(unknown file)' near line -1 +/seek failed \(32bit\)/ OUTPUT -output_is(<<'CODE', <<'OUTPUT', '64bit seek: exception'); +output_like(<<'CODE', <<'OUTPUT', '64bit seek: exception'); open P0, "temp.file", ">" seek P0, -1, -1, 0 print "error!\n" end CODE -seek failed (64bit) - in file '(unknown file)' near line -1 +/seek failed \(64bit\)/ OUTPUT output_is(<<'CODE', <<'OUTPUT', "peek"); @@ -519,7 +517,7 @@ output_is(<<'CODE', <<'OUTPUT', "multiple substr after reading from file"); ##PIR## -.sub _main +.sub _main # Write something into a file .local pmc out out = open "temp.file", ">"