Changeset a6ea59f in tol
- Timestamp:
- Feb 16, 2010, 5:44:42 PM (17 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- 2cab927
- Parents:
- 11d460a
- File:
-
- 1 edited
-
tol/btol/bgrammar/spfuninst.cpp (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tol/btol/bgrammar/spfuninst.cpp
r11d460a ra6ea59f 1553 1553 BOperator* opr = GetOperator(uCode); 1554 1554 result = opr->Evaluate(branch2->cdr()); 1555 DESTROY(opr); 1555 1556 } 1556 1557 } … … 1559 1560 BStruct* str = (BStruct*)result; 1560 1561 result = str->Function()->Evaluate(branch2->cdr()); 1562 DESTROY(str); 1561 1563 } 1562 1564 if((tt==TYPE)&&(result->Mode()==BCLASSMODE)) … … 1573 1575 errMsg = I2("It was expected an instance of Class ", 1574 1576 "Se esperaba una instancia de Class ") +cls->Name(); 1577 DESTROY(result); 1575 1578 result=NULL; 1576 1579 } 1580 DESTROY(cls); 1577 1581 } 1578 1582 } … … 1592 1596 static BText _name_ = "::"; 1593 1597 BSyntaxObject* result = NIL; 1598 int stackPos = BGrammar::StackSize(); 1594 1599 BInt nb = BSpecialFunction::NumBranches(tre); 1595 1600 BText errMsg; 1601 BSyntaxObject* uns = NULL; 1602 bool needsDeleteUns = false; 1596 1603 if(BSpecialFunction::TestNumArg(_name_, 2, nb, 2)) 1597 1604 { … … 1610 1617 /* */ 1611 1618 bool oldEnabled = BOut::Disable(); 1612 BSyntaxObject* uns = GraNameBlock()->LeftEvaluateTree(branch1); 1619 int nObjOld = BSyntaxObject::NSyntaxObject(); 1620 uns = GraNameBlock()->LeftEvaluateTree(branch1); 1613 1621 if(!uns) { uns = GraSet()->LeftEvaluateTree(branch1); } 1614 1622 if(!uns) … … 1630 1638 } 1631 1639 } 1640 int nObjNew = BSyntaxObject::NSyntaxObject(); 1641 needsDeleteUns = (uns!=NULL) && (nObjNew>nObjOld); 1632 1642 if(oldEnabled) { BOut::Enable(); } 1633 1643 BToken* arg2 = BParser::treToken(branch2); … … 1639 1649 BClass* cls = (BClass*)uns; 1640 1650 result = cls->FindStatic(memberName,false); 1641 result= EvMemberArg1651 BSyntaxObject* r = EvMemberArg 1642 1652 (_name_, gra, branch2, arg2, memberName,cls->Name(), errMsg, result); 1653 DESTROY(result); 1654 result = r; 1643 1655 } 1644 1656 else if(uns->Grammar()==GraSet()) … … 1666 1678 result = ns.PublicMember(memberName); 1667 1679 } 1668 result= EvMemberArg1680 BSyntaxObject* r = EvMemberArg 1669 1681 (_name_, gra, branch2, arg2, memberName, ns.Name(), errMsg, result); 1682 DESTROY(result); 1683 result = r; 1670 1684 } 1671 1685 } … … 1679 1693 } 1680 1694 result=BSpecialFunction::TestResult(_name_,result,tre,NIL,BTRUE); 1695 if(needsDeleteUns) { DESTROY(uns); } 1696 BGrammar::DestroyStackUntil(stackPos, result); 1681 1697 return(result); 1682 1698 }
Note: See TracChangeset
for help on using the changeset viewer.
