summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/B/B.xs7
-rw-r--r--ext/B/B/Asmdata.pm2
-rw-r--r--ext/B/B/Bytecode.pm8
-rw-r--r--ext/B/B/C.pm3
-rw-r--r--ext/B/B/Debug.pm4
-rw-r--r--ext/B/B/Deparse.pm2
-rw-r--r--ext/ByteLoader/bytecode.h5
-rw-r--r--ext/ByteLoader/byterun.c8
-rw-r--r--ext/ByteLoader/byterun.h2
9 files changed, 23 insertions, 18 deletions
diff --git a/ext/B/B.xs b/ext/B/B.xs
index cef9ecbf6a..4867e71291 100644
--- a/ext/B/B.xs
+++ b/ext/B/B.xs
@@ -746,7 +746,8 @@ LOOP_lastop(o)
B::LOOP o
#define COP_label(o) o->cop_label
-#define COP_stash(o) o->cop_stash
+#define COP_stashpv(o) CopSTASHPV(o)
+#define COP_stash(o) CopSTASH(o)
#define COP_file(o) CopFILE(o)
#define COP_cop_seq(o) o->cop_seq
#define COP_arybase(o) o->cop_arybase
@@ -759,6 +760,10 @@ char *
COP_label(o)
B::COP o
+char *
+COP_stashpv(o)
+ B::COP o
+
B::HV
COP_stash(o)
B::COP o
diff --git a/ext/B/B/Asmdata.pm b/ext/B/B/Asmdata.pm
index 7d37616228..a7dbbe2026 100644
--- a/ext/B/B/Asmdata.pm
+++ b/ext/B/B/Asmdata.pm
@@ -129,7 +129,7 @@ $insn_data{op_redoop} = [105, \&PUT_opindex, "GET_opindex"];
$insn_data{op_nextop} = [106, \&PUT_opindex, "GET_opindex"];
$insn_data{op_lastop} = [107, \&PUT_opindex, "GET_opindex"];
$insn_data{cop_label} = [108, \&PUT_pvcontents, "GET_pvcontents"];
-$insn_data{cop_stash} = [109, \&PUT_svindex, "GET_svindex"];
+$insn_data{cop_stashpv} = [109, \&PUT_pvcontents, "GET_pvcontents"];
$insn_data{cop_file} = [110, \&PUT_pvcontents, "GET_pvcontents"];
$insn_data{cop_seq} = [111, \&PUT_U32, "GET_U32"];
$insn_data{cop_arybase} = [112, \&PUT_I32, "GET_I32"];
diff --git a/ext/B/B/Bytecode.pm b/ext/B/B/Bytecode.pm
index 382a591e99..8764a0d588 100644
--- a/ext/B/B/Bytecode.pm
+++ b/ext/B/B/Bytecode.pm
@@ -278,8 +278,7 @@ sub B::LOOP::bytecode {
sub B::COP::bytecode {
my $op = shift;
- my $stash = $op->stash;
- my $stashix = $stash->objix;
+ my $stashpv = $op->stashpv;
my $file = $op->file;
my $line = $op->line;
my $warnings = $op->warnings;
@@ -288,10 +287,11 @@ sub B::COP::bytecode {
printf "# line %s:%d\n", $file, $line;
}
$op->B::OP::bytecode;
- printf <<"EOT", pvstring($op->label), $op->cop_seq, pvstring($file), $op->arybase;
+ printf <<"EOT", pvstring($op->label), pvstring($stashpv), $op->cop_seq, pvstring($file), $op->arybase;
newpv %s
cop_label
-cop_stash $stashix
+newpv %s
+cop_stashpv
cop_seq %d
newpv %s
cop_file
diff --git a/ext/B/B/C.pm b/ext/B/B/C.pm
index 192ecefd28..f8607444f4 100644
--- a/ext/B/B/C.pm
+++ b/ext/B/B/C.pm
@@ -293,7 +293,6 @@ sub B::COP::save {
my ($op, $level) = @_;
my $sym = objsym($op);
return $sym if defined $sym;
- my $stashsym = $op->stash->save;
warn sprintf("COP: line %d file %s\n", $op->line, $op->file)
if $debug_cops;
$copsect->add(sprintf("s\\_%x, s\\_%x, %s,$handle_VC_problem %u, %u, %u, 0x%x, 0x%x, %s, Nullhv, Nullgv, %u, %d, %u",
@@ -303,7 +302,7 @@ sub B::COP::save {
$op->arybase, $op->line));
my $copix = $copsect->index;
$init->add(sprintf("CopFILE_set(&cop_list[%d], %s);", $copix, cstring($op->file)),
- sprintf("cop_list[%d].cop_stash = %s;", $copix, $stashsym));
+ sprintf("CopSTASHPV_set(&cop_list[%d], %s);", $copix, cstring($op->stashpv));
savesym($op, "(OP*)&cop_list[$copix]");
}
diff --git a/ext/B/B/Debug.pm b/ext/B/B/Debug.pm
index 7623e9b249..ae7a9733bc 100644
--- a/ext/B/B/Debug.pm
+++ b/ext/B/B/Debug.pm
@@ -60,9 +60,9 @@ sub B::PMOP::debug {
sub B::COP::debug {
my ($op) = @_;
$op->B::OP::debug();
- printf <<'EOT', $op->label, ${$op->stash}, $op->file, $op->seq, $op->arybase, $op->line, ${$op->warnings};
+ printf <<'EOT', $op->label, $op->stashpv, $op->file, $op->seq, $op->arybase, $op->line, ${$op->warnings};
cop_label %s
- cop_stash 0x%x
+ cop_stashpv %s
cop_file %s
cop_seq %d
cop_arybase %d
diff --git a/ext/B/B/Deparse.pm b/ext/B/B/Deparse.pm
index 7509b96b19..be7088e768 100644
--- a/ext/B/B/Deparse.pm
+++ b/ext/B/B/Deparse.pm
@@ -770,7 +770,7 @@ sub pp_nextstate {
and $seq > $self->{'subs_todo'}[0][0]) {
push @text, $self->next_todo;
}
- my $stash = $op->stash->NAME;
+ my $stash = $op->stashpv;
if ($stash ne $self->{'curstash'}) {
push @text, "package $stash;\n";
$self->{'curstash'} = $stash;
diff --git a/ext/ByteLoader/bytecode.h b/ext/ByteLoader/bytecode.h
index 77d93b035d..6e19e129df 100644
--- a/ext/ByteLoader/bytecode.h
+++ b/ext/ByteLoader/bytecode.h
@@ -137,8 +137,9 @@ typedef IV IV64;
PL_comppad = (AV *)arg; \
pad = AvARRAY(arg); \
} STMT_END
-#define BSET_cop_file(cop, arg) CopFILE_set(cop,arg)
-#define BSET_cop_line(cop, arg) CopLINE_set(cop,arg)
+#define BSET_cop_file(cop, arg) CopFILE_set(cop,arg)
+#define BSET_cop_line(cop, arg) CopLINE_set(cop,arg)
+#define BSET_cop_stashpv(cop, arg) CopSTASHPV_set(cop,arg)
#define BSET_OBJ_STORE(obj, ix) \
(I32)ix > bytecode_obj_list_fill ? \
diff --git a/ext/ByteLoader/byterun.c b/ext/ByteLoader/byterun.c
index f55feb758a..595fd4e18d 100644
--- a/ext/ByteLoader/byterun.c
+++ b/ext/ByteLoader/byterun.c
@@ -828,11 +828,11 @@ byterun(pTHXo_ struct bytestream bs)
cCOP->cop_label = arg;
break;
}
- case INSN_COP_STASH: /* 109 */
+ case INSN_COP_STASHPV: /* 109 */
{
- svindex arg;
- BGET_svindex(arg);
- *(SV**)&cCOP->cop_stash = arg;
+ pvcontents arg;
+ BGET_pvcontents(arg);
+ BSET_cop_stashpv(cCOP, arg);
break;
}
case INSN_COP_FILE: /* 110 */
diff --git a/ext/ByteLoader/byterun.h b/ext/ByteLoader/byterun.h
index 17560c858b..f0de6b4820 100644
--- a/ext/ByteLoader/byterun.h
+++ b/ext/ByteLoader/byterun.h
@@ -125,7 +125,7 @@ enum {
INSN_OP_NEXTOP, /* 106 */
INSN_OP_LASTOP, /* 107 */
INSN_COP_LABEL, /* 108 */
- INSN_COP_STASH, /* 109 */
+ INSN_COP_STASHPV, /* 109 */
INSN_COP_FILE, /* 110 */
INSN_COP_SEQ, /* 111 */
INSN_COP_ARYBASE, /* 112 */