Change 19934 by [EMAIL PROTECTED] on 2003/07/02 19:39:11
Subject: [PATCH] line numbers are given % 64k
From: James Jurach <[EMAIL PROTECTED]>
Date: Wed, 2 Jul 2003 13:31:05 -0500
Message-ID: <[EMAIL PROTECTED]>
Affected files ...
... //depot/perl/bytecode.pl#46 edit
... //depot/perl/ext/B/B/Asmdata.pm#26 edit
... //depot/perl/ext/ByteLoader/byterun.c#23 edit
... //depot/perl/handy.h#63 edit
... //depot/perl/pp_ctl.c#362 edit
... //depot/perl/scope.h#60 edit
Differences ...
==== //depot/perl/bytecode.pl#46 (text) ====
Index: perl/bytecode.pl
--- perl/bytecode.pl#45~19038~ Thu Mar 20 14:07:50 2003
+++ perl/bytecode.pl Wed Jul 2 12:39:11 2003
@@ -5,8 +5,8 @@
use strict;
my %alias_to = (
U32 => [qw(PADOFFSET STRLEN)],
- I32 => [qw(SSize_t long)],
- U16 => [qw(OPCODE line_t short)],
+ I32 => [qw(SSize_t line_t long)],
+ U16 => [qw(OPCODE short)],
U8 => [qw(char)],
);
==== //depot/perl/ext/B/B/Asmdata.pm#26 (text+w) ====
Index: perl/ext/B/B/Asmdata.pm
--- perl/ext/B/B/Asmdata.pm#25~19038~ Thu Mar 20 14:07:50 2003
+++ perl/ext/B/B/Asmdata.pm Wed Jul 2 12:39:11 2003
@@ -104,7 +104,7 @@
$insn_data{gp_io} = [78, \&PUT_svindex, "GET_svindex"];
$insn_data{gp_form} = [79, \&PUT_svindex, "GET_svindex"];
$insn_data{gp_cvgen} = [80, \&PUT_U32, "GET_U32"];
-$insn_data{gp_line} = [81, \&PUT_U16, "GET_U16"];
+$insn_data{gp_line} = [81, \&PUT_U32, "GET_U32"];
$insn_data{gp_share} = [82, \&PUT_svindex, "GET_svindex"];
$insn_data{xgv_flags} = [83, \&PUT_U8, "GET_U8"];
$insn_data{op_next} = [84, \&PUT_opindex, "GET_opindex"];
@@ -137,7 +137,7 @@
$insn_data{cop_file} = [111, \&PUT_pvindex, "GET_pvindex"];
$insn_data{cop_seq} = [112, \&PUT_U32, "GET_U32"];
$insn_data{cop_arybase} = [113, \&PUT_I32, "GET_I32"];
-$insn_data{cop_line} = [114, \&PUT_U16, "GET_U16"];
+$insn_data{cop_line} = [114, \&PUT_U32, "GET_U32"];
$insn_data{cop_warnings} = [115, \&PUT_svindex, "GET_svindex"];
$insn_data{main_start} = [116, \&PUT_opindex, "GET_opindex"];
$insn_data{main_root} = [117, \&PUT_opindex, "GET_opindex"];
==== //depot/perl/ext/ByteLoader/byterun.c#23 (text+w) ====
Index: perl/ext/ByteLoader/byterun.c
--- perl/ext/ByteLoader/byterun.c#22~19038~ Thu Mar 20 14:07:50 2003
+++ perl/ext/ByteLoader/byterun.c Wed Jul 2 12:39:11 2003
@@ -624,7 +624,7 @@
case INSN_GP_LINE: /* 81 */
{
line_t arg;
- BGET_U16(arg);
+ BGET_U32(arg);
GvLINE(bstate->bs_sv) = arg;
break;
}
@@ -855,7 +855,7 @@
case INSN_COP_LINE: /* 114 */
{
line_t arg;
- BGET_U16(arg);
+ BGET_U32(arg);
BSET_cop_line(cCOP, arg);
break;
}
==== //depot/perl/handy.h#63 (text) ====
Index: perl/handy.h
--- perl/handy.h#62~19789~ Sun Jun 15 10:08:02 2003
+++ perl/handy.h Wed Jul 2 12:39:11 2003
@@ -512,12 +512,12 @@
# define toCTRL(c) (toUPPER(c) ^ 64)
#endif
-/* Line numbers are unsigned, 16 bits. */
-typedef U16 line_t;
+/* Line numbers are unsigned, 32 bits. */
+typedef U32 line_t;
#ifdef lint
#define NOLINE ((line_t)0)
#else
-#define NOLINE ((line_t) 65535)
+#define NOLINE ((line_t) 4294967295UL)
#endif
==== //depot/perl/pp_ctl.c#362 (text) ====
Index: perl/pp_ctl.c
--- perl/pp_ctl.c#361~19851~ Wed Jun 25 12:25:47 2003
+++ perl/pp_ctl.c Wed Jul 2 12:39:11 2003
@@ -22,7 +22,7 @@
#include "perl.h"
#ifndef WORD_ALIGN
-#define WORD_ALIGN sizeof(U16)
+#define WORD_ALIGN sizeof(U32)
#endif
#define DOCATCH(o) ((CATCH_GET == TRUE) ? docatch(o) : (o))
@@ -349,7 +349,7 @@
{
dSP; dMARK; dORIGMARK;
register SV *tmpForm = *++MARK;
- register U16 *fpc;
+ register U32 *fpc;
register char *t;
register char *f;
register char *s;
@@ -389,7 +389,7 @@
/* need to jump to the next word */
s = f + len + WORD_ALIGN - SvCUR(tmpForm) % WORD_ALIGN;
- fpc = (U16*)s;
+ fpc = (U32*)s;
for (;;) {
DEBUG_f( {
@@ -3549,9 +3549,9 @@
bool noblank = FALSE;
bool repeat = FALSE;
bool postspace = FALSE;
- U16 *fops;
- register U16 *fpc;
- U16 *linepc = 0;
+ U32 *fops;
+ register U32 *fpc;
+ U32 *linepc = 0;
register I32 arg;
bool ischop;
int maxops = 2; /* FF_LINEMARK + FF_END) */
@@ -3567,7 +3567,7 @@
s = base;
base = Nullch;
- New(804, fops, maxops, U16);
+ New(804, fops, maxops, U32);
fpc = fops;
if (s < send) {
@@ -3735,10 +3735,10 @@
{ /* need to jump to the next word */
int z;
z = WORD_ALIGN - SvCUR(sv) % WORD_ALIGN;
- SvGROW(sv, SvCUR(sv) + z + arg * sizeof(U16) + 4);
+ SvGROW(sv, SvCUR(sv) + z + arg * sizeof(U32) + 4);
s = SvPVX(sv) + SvCUR(sv) + z;
}
- Copy(fops, s, arg, U16);
+ Copy(fops, s, arg, U32);
Safefree(fops);
sv_magic(sv, Nullsv, PERL_MAGIC_fm, Nullch, 0);
SvCOMPILED_on(sv);
==== //depot/perl/scope.h#60 (text) ====
Index: perl/scope.h
--- perl/scope.h#59~19870~ Sat Jun 28 08:39:57 2003
+++ perl/scope.h Wed Jul 2 12:39:11 2003
@@ -179,7 +179,7 @@
# define SAVECOPFILE_FREE(c) SAVEGENERICSV(CopFILEGV(c))
#endif
-#define SAVECOPLINE(c) SAVEI16(CopLINE(c))
+#define SAVECOPLINE(c) SAVEI32(CopLINE(c))
/* SSNEW() temporarily allocates a specified number of bytes of data on the
* savestack. It returns an integer index into the savestack, because a
End of Patch.