Fixed (or rather, band-aided) a MACRO-10 regression assembling the nested macro test (/apps/pdp10/tests/macro10/TEST.MAC)
This commit is contained in:
parent
5f72f1627f
commit
ea95de4939
8 changed files with 49 additions and 35 deletions
|
|
@ -570,12 +570,26 @@ class Macro10 {
|
|||
}
|
||||
fParse = false;
|
||||
sOperator = matchLine[2].toUpperCase();
|
||||
|
||||
/*
|
||||
* TODO: The following kludge needs to be fixed at some point. The goal here is to prevent any
|
||||
* of the caller's parameters from replacing any IRP/IRPC call parameters, but the goal is actually
|
||||
* much bigger than that, because it's not just IRP/IRPC call parameters that must be left intact,
|
||||
* but ANY macro call parameters; IRP/IRPC macros are just easier to pick out. Unfortunately, as
|
||||
* the code is currently structured, we won't know if we're dealing with any macro call parameters
|
||||
* on this line until parseMacro() is called, below.
|
||||
*/
|
||||
if (sOperator == Macro10.PSEUDO_OP.IRP || sOperator == Macro10.PSEUDO_OP.IRPC) {
|
||||
aParms = null;
|
||||
}
|
||||
|
||||
if (aParms) {
|
||||
for (var iParm = 0; iParm < aParms.length; iParm++) {
|
||||
var sParm = aParms[iParm];
|
||||
|
||||
var macroDef = this.tblMacros[this.sMacroDef];
|
||||
if (macroDef && macroDef.aParms.indexOf(sParm) >= 0) continue;
|
||||
|
||||
var sReplace = aValues[iParm] || aDefaults[iParm] || "";
|
||||
var iSearch = 0;
|
||||
var iLimit = sLine.length - matchLine[5].length; // set the limit at the start of the comment, if any
|
||||
|
|
|
|||
|
|
@ -792,7 +792,7 @@ class Debugger extends Component
|
|||
* @param {string} chDelim
|
||||
* @param {number} nBits
|
||||
* @param {number} cchMax
|
||||
* @return {string}
|
||||
* @return {string|undefined}
|
||||
*/
|
||||
parseASCII(sExp, chDelim, nBits, cchMax)
|
||||
{
|
||||
|
|
@ -819,7 +819,7 @@ class Debugger extends Component
|
|||
}
|
||||
if (cch >= 0) {
|
||||
this.println("parse error (" + chDelim + sExp + chDelim + ")");
|
||||
break;
|
||||
return undefined;
|
||||
} else {
|
||||
sExp = sExp.substr(0, i) + this.toStrBase(v, -1) + sExp.substr(j);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue