summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-08-11 15:46:29 +0000
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-08-11 15:46:29 +0000
commit0f15f207c55ce70f46ebbd3be6c3d54763665084 (patch)
treed4cbbe278d8bb662e537d2b219246ee872cb20e6 /op.c
parent12ca11f6c16e7b63e13bbf5bc251f214e8de5211 (diff)
downloadperl-0f15f207c55ce70f46ebbd3be6c3d54763665084.tar.gz
Assorted changes for multi-threading (now works rather more).
p4raw-id: //depot/perl@44
Diffstat (limited to 'op.c')
-rw-r--r--op.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/op.c b/op.c
index bd2f09aa36..4c2f5fb228 100644
--- a/op.c
+++ b/op.c
@@ -637,6 +637,7 @@ OP *o;
{
if (dowarn &&
o->op_type == OP_SASSIGN && cBINOPo->op_first->op_type == OP_CONST) {
+ dTHR;
line_t oldline = curcop->cop_line;
if (copline != NOLINE)
@@ -697,7 +698,7 @@ OP *o;
else
scalar(kid);
}
- curcop = &compiling;
+ WITH_THR(curcop = &compiling);
break;
case OP_SCOPE:
case OP_LINESEQ:
@@ -708,7 +709,7 @@ OP *o;
else
scalar(kid);
}
- curcop = &compiling;
+ WITH_THR(curcop = &compiling);
break;
}
return o;
@@ -821,7 +822,7 @@ OP *o;
case OP_NEXTSTATE:
case OP_DBSTATE:
- curcop = ((COP*)o); /* for warning below */
+ WITH_THR(curcop = ((COP*)o)); /* for warning below */
break;
case OP_CONST:
@@ -860,7 +861,7 @@ OP *o;
case OP_NULL:
if (o->op_targ == OP_NEXTSTATE || o->op_targ == OP_DBSTATE)
- curcop = ((COP*)o); /* for warning below */
+ WITH_THR(curcop = ((COP*)o)); /* for warning below */
if (o->op_flags & OPf_STACKED)
break;
/* FALL THROUGH */
@@ -957,7 +958,7 @@ OP *o;
else
list(kid);
}
- curcop = &compiling;
+ WITH_THR(curcop = &compiling);
break;
case OP_SCOPE:
case OP_LINESEQ:
@@ -967,7 +968,7 @@ OP *o;
else
list(kid);
}
- curcop = &compiling;
+ WITH_THR(curcop = &compiling);
break;
case OP_REQUIRE:
/* all requires must return a boolean value */
@@ -989,6 +990,7 @@ OP *o;
o->op_type == OP_LEAVE ||
o->op_type == OP_LEAVETRY)
{
+ dTHR;
for (kid = cLISTOPo->op_first; kid; kid = kid->op_sibling) {
if (kid->op_sibling) {
scalarvoid(kid);