richter 01/11/12 00:44:29
Modified: . Tag: Embperl2c epcomp.c epdom.c epnames.h epparse.c
Log:
Embperl 2 - fix addr problem
Revision Changes Path
No revision
No revision
1.4.2.72 +13 -2 embperl/Attic/epcomp.c
Index: epcomp.c
===================================================================
RCS file: /home/cvs/embperl/Attic/epcomp.c,v
retrieving revision 1.4.2.71
retrieving revision 1.4.2.72
diff -u -r1.4.2.71 -r1.4.2.72
--- epcomp.c 2001/11/08 16:42:23 1.4.2.71
+++ epcomp.c 2001/11/12 08:44:29 1.4.2.72
@@ -9,7 +9,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: epcomp.c,v 1.4.2.71 2001/11/08 16:42:23 richter Exp $
+# $Id: epcomp.c,v 1.4.2.72 2001/11/12 08:44:29 richter Exp $
#
###################################################################################*/
@@ -1335,6 +1335,7 @@
int nCheckpointCodeOffset = 0 ;
int nCheckpointArrayOffset = 0 ;
tEmbperlCompilerInfo * pInfo = (tEmbperlCompilerInfo *)(*(void * *)r ->
pTokenTable) ;
+ tIndex xDomTree = pDomTree -> xNdx ;
pCmd = NULL ;
@@ -1400,6 +1401,7 @@
while (pChild)
{
embperl_CompileNode (r, pDomTree, pChild -> xNdx,
bCheckpointPending) ;
+ pDomTree = DomTree_self (xDomTree) ; /* addr may have changed */
pNext = Node_selfNextSibling (pDomTree, pChild, 0) ;
if (pChild -> bFlags == 0)
Node_selfRemoveChild(pDomTree, -1, pChild) ;
@@ -1415,7 +1417,8 @@
{
if ((rc = embperl_CompileCmd (r, pDomTree, pNode, pCmd, &nStartCodeOffset)) !=
ok)
return rc ;
- pCmd = pCmd -> pNext ;
+ pDomTree = DomTree_self (xDomTree) ; /* addr may have changed */
+ pCmd = pCmd -> pNext ;
}
pCmd = pCmdHead ;
@@ -1435,6 +1438,7 @@
if ((rc = embperl_CompileNode (r, pDomTree, xChildNode,
bCheckpointPending)) != ok)
return rc ;
+ pDomTree = DomTree_self (xDomTree) ; /* addr may have changed */
pChildNode = Node_self (pDomTree, xChildNode) ;
xChildNode = Node_nextSibling (pDomTree, xChildNode, 0) ;
if (pChildNode -> bFlags == 0)
@@ -1480,6 +1484,7 @@
{
int rc ;
int bCheckpointPending = 0 ;
+ tIndex xDomTree = pDomTree -> xNdx ;
pDomTree -> xCurrNode = 0 ;
@@ -1487,6 +1492,8 @@
if ((rc = embperl_CompileNode (r, pDomTree, pDomTree -> xDocument,
&bCheckpointPending)) != ok)
return rc ;
+ pDomTree = DomTree_self (xDomTree) ; /* addr may have changed */
+
if (bCheckpointPending)
{
int l ;
@@ -1537,6 +1544,9 @@
else if (nStep > 4096)
nStep = 4096 ;
+ if (r -> bDebug & dbgCompile)
+ lprintf (r, "[%d]EPCOMP: Start compiling %s DomTree = %d\n", r -> nPid, r ->
Buf.pFile -> sSourcefile, xDomTree) ;
+
r -> nPhase = phCompile ;
r -> pProgRun = NULL ;
@@ -1569,6 +1579,7 @@
return rc ;
}
+ pDomTree = DomTree_self (xDomTree) ; /* addr may have changed */
SvREFCNT_dec (pDomTree -> pSV) ;
pDomTree -> pSV = NULL ;
1.4.2.70 +3 -5 embperl/Attic/epdom.c
Index: epdom.c
===================================================================
RCS file: /home/cvs/embperl/Attic/epdom.c,v
retrieving revision 1.4.2.69
retrieving revision 1.4.2.70
diff -u -r1.4.2.69 -r1.4.2.70
--- epdom.c 2001/11/12 07:32:22 1.4.2.69
+++ epdom.c 2001/11/12 08:44:29 1.4.2.70
@@ -9,7 +9,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: epdom.c,v 1.4.2.69 2001/11/12 07:32:22 richter Exp $
+# $Id: epdom.c,v 1.4.2.70 2001/11/12 08:44:29 richter Exp $
#
###################################################################################*/
@@ -974,9 +974,7 @@
if (pNode -> nText)
NdxStringFree (pNode -> nText) ;
- dom_free (pNode, &numNodes) ;
-
- if (pLookupLevelNode = pLookup -> pLookupLevel)
+ if ((pLookupLevelNode = pLookup -> pLookupLevel) && pLookupLevelNode ->
xNullNode == pNode -> xNdx)
{
pLookupLevelNodeLevel = pLookupLevelNode -> items ;
n = pLookupLevelNode -> numItems ;
@@ -995,7 +993,7 @@
dom_free_size (pLookupLevelNode, sizeof (tRepeatLevelLookup) + sizeof
(tRepeatLevelLookupItem) * pLookupLevelNode -> numItems, &numLevelLookup) ;
}
-
+ dom_free (pNode, &numNodes) ;
}
pLookup-- ;
1.19.4.11 +2 -2 embperl/epnames.h
Index: epnames.h
===================================================================
RCS file: /home/cvs/embperl/epnames.h,v
retrieving revision 1.19.4.10
retrieving revision 1.19.4.11
diff -u -r1.19.4.10 -r1.19.4.11
--- epnames.h 2001/07/09 07:49:05 1.19.4.10
+++ epnames.h 2001/11/12 08:44:29 1.19.4.11
@@ -10,7 +10,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: epnames.h,v 1.19.4.10 2001/07/09 07:49:05 richter Exp $
+# $Id: epnames.h,v 1.19.4.11 2001/11/12 08:44:29 richter Exp $
#
###################################################################################*/
@@ -351,7 +351,7 @@
#undef apache_mode_t
#endif
-#ifdef apache_stat
+#ifdef xxxapache_stat
#undef stat
#define stat apache_stat
#undef apache_stat
1.4.2.41 +4 -1 embperl/Attic/epparse.c
Index: epparse.c
===================================================================
RCS file: /home/cvs/embperl/Attic/epparse.c,v
retrieving revision 1.4.2.40
retrieving revision 1.4.2.41
diff -u -r1.4.2.40 -r1.4.2.41
--- epparse.c 2001/11/07 15:22:00 1.4.2.40
+++ epparse.c 2001/11/12 08:44:29 1.4.2.41
@@ -9,7 +9,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: epparse.c,v 1.4.2.40 2001/11/07 15:22:00 richter Exp $
+# $Id: epparse.c,v 1.4.2.41 2001/11/12 08:44:29 richter Exp $
#
###################################################################################*/
@@ -1031,6 +1031,9 @@
if (!(r -> xCurrDomTree = DomTree_new (&pDomTree)))
return 1 ;
+ if (r -> bDebug & dbgParse)
+ lprintf (r, "[%d]PARSE: Start parsing %s DomTree = %d\n", r -> nPid, r ->
Buf.pFile -> sSourcefile, r -> xCurrDomTree) ;
+
pDomTree -> xFilename = String2Ndx (r -> Buf.pFile -> sSourcefile, strlen (r ->
Buf.pFile -> sSourcefile)) ;
if (!(xDocNode = Node_appendChild (pDomTree, 0, 0, ntypTag, 0, "attr", 3, 0, 0,
NULL)))
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]