mirror of
https://github.com/Museum-of-Art-and-Digital-Entertainment/macross.git
synced 2024-11-26 22:51:04 +00:00
Use the right member of union arguments so that everything typechecks
This commit is contained in:
parent
773dba638d
commit
b9748cbe0e
@ -948,9 +948,9 @@ symbolDefineBIF(parameterList, kindOfFixup)
|
||||
return(makeFailureValue());
|
||||
} else {
|
||||
syntheticDefineStatement = buildDefineStatement(stringValue->
|
||||
value, parameterList->theOperand);
|
||||
value, parameterList->theOperand.expressionUnion);
|
||||
}
|
||||
assembleDefineStatement(syntheticDefineStatement->statementBody);
|
||||
assembleDefineStatement(syntheticDefineStatement->statementBody.defineUnion);
|
||||
freeStatement(syntheticDefineStatement);
|
||||
return(makeBooleanValue(TRUE));
|
||||
}
|
||||
|
@ -204,15 +204,15 @@ printOperand(operand)
|
||||
switch (operand->kindOfOperand) {
|
||||
|
||||
case EXPRESSION_OPND:
|
||||
printExpression(operand->theOperand);
|
||||
printExpression(operand->theOperand.expressionUnion);
|
||||
break;
|
||||
|
||||
case IMMEDIATE_OPND:
|
||||
printExpression(operand->theOperand);
|
||||
printExpression(operand->theOperand.immediateUnion);
|
||||
break;
|
||||
|
||||
case INDIRECT_OPND:
|
||||
printExpression(operand->theOperand);
|
||||
printExpression(operand->theOperand.indirectUnion);
|
||||
break;
|
||||
|
||||
case A_REGISTER_OPND:
|
||||
@ -225,39 +225,39 @@ printOperand(operand)
|
||||
break;
|
||||
|
||||
case POST_INDEXED_Y_OPND:
|
||||
printExpression(operand->theOperand);
|
||||
printExpression(operand->theOperand.postIndexedYUnion);
|
||||
break;
|
||||
|
||||
case PRE_INDEXED_X_OPND:
|
||||
printExpression(operand->theOperand);
|
||||
printExpression(operand->theOperand.preIndexedXUnion);
|
||||
break;
|
||||
|
||||
case X_INDEXED_OPND:
|
||||
printExpression(operand->theOperand);
|
||||
printExpression(operand->theOperand.xIndexedUnion);
|
||||
break;
|
||||
|
||||
case Y_INDEXED_OPND:
|
||||
printExpression(operand->theOperand);
|
||||
printExpression(operand->theOperand.yIndexedUnion);
|
||||
break;
|
||||
|
||||
case X_SELECTED_OPND:
|
||||
printIdentifierList(operand->theOperand);
|
||||
printIdentifierList(operand->theOperand.xSelectedUnion);
|
||||
break;
|
||||
|
||||
case Y_SELECTED_OPND:
|
||||
printIdentifierList(operand->theOperand);
|
||||
printIdentifierList(operand->theOperand.ySelectedUnion);
|
||||
break;
|
||||
|
||||
case PRE_SELECTED_X_OPND:
|
||||
printIdentifierList(operand->theOperand);
|
||||
printIdentifierList(operand->theOperand.preSelectedUnion);
|
||||
break;
|
||||
|
||||
case STRING_OPND:
|
||||
tab(); printf("(string: \"%s\")\n", operand->theOperand);
|
||||
tab(); printf("(string: \"%s\")\n", operand->theOperand.stringUnion);
|
||||
break;
|
||||
|
||||
case BLOCK_OPND:
|
||||
printBlock(operand->theOperand);
|
||||
printBlock(operand->theOperand.blockUnion);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
8
encode.c
8
encode.c
@ -279,7 +279,7 @@ encodeOperand(operand)
|
||||
case PRE_INDEXED_X_OPND:
|
||||
case X_INDEXED_OPND:
|
||||
case Y_INDEXED_OPND:
|
||||
return(encodeExpression(operand->theOperand));
|
||||
return(encodeExpression(operand->theOperand.expressionUnion));
|
||||
|
||||
case A_REGISTER_OPND:
|
||||
case X_REGISTER_OPND:
|
||||
@ -294,7 +294,7 @@ encodeOperand(operand)
|
||||
return(FALSE);
|
||||
|
||||
case STRING_OPND:
|
||||
return(encodeString(operand->theOperand));
|
||||
return(encodeString(operand->theOperand.stringUnion));
|
||||
|
||||
case BLOCK_OPND:
|
||||
error(BLOCK_OPERAND_IN_OBJECT_EXPRESSION_ERROR);
|
||||
@ -534,7 +534,7 @@ encodeMifStatement(mifStatement)
|
||||
encodeByte(MIF_TAG) &&
|
||||
encodeExpression(mifStatement->mifCondition) &&
|
||||
encodeBlock(mifStatement->mifConsequence) &&
|
||||
encodeBlock(mifStatement->mifContinuation)
|
||||
encodeBlock(mifStatement->mifContinuation.mifBlockUnion)
|
||||
);
|
||||
}
|
||||
|
||||
@ -637,7 +637,7 @@ encodeStatement(statement)
|
||||
return(encodeFreturnStatement(statement->statementBody.freturnUnion));
|
||||
|
||||
case GROUP_STATEMENT:
|
||||
return(encodeBlock(statement->statementBody));
|
||||
return(encodeBlock(statement->statementBody.groupUnion));
|
||||
|
||||
case MDEFINE_STATEMENT:
|
||||
return(encodeMdefineStatement(statement->statementBody.defineUnion));
|
||||
|
@ -151,14 +151,14 @@ duplicateOperandForFixup(operand, isSpecialFunctionOperand)
|
||||
case X_INDEXED_OPND:
|
||||
case Y_INDEXED_OPND:
|
||||
result->theOperand.expressionUnion =
|
||||
duplicateExpressionForFixup(operand->theOperand,
|
||||
duplicateExpressionForFixup(operand->theOperand.expressionUnion,
|
||||
FALSE, isSpecialFunctionOperand);
|
||||
break;
|
||||
case X_SELECTED_OPND:
|
||||
case Y_SELECTED_OPND:
|
||||
case PRE_SELECTED_X_OPND:
|
||||
result->theOperand.expressionUnion =
|
||||
duplicateExpressionForFixup(operand->theOperand,
|
||||
duplicateExpressionForFixup(operand->theOperand.xSelectedUnion,
|
||||
FALSE, isSpecialFunctionOperand);
|
||||
break;
|
||||
case A_REGISTER_OPND:
|
||||
@ -195,7 +195,7 @@ freeOperand(operand)
|
||||
case PRE_INDEXED_X_OPND:
|
||||
case X_INDEXED_OPND:
|
||||
case Y_INDEXED_OPND:
|
||||
freeExpression(operand->theOperand);
|
||||
freeExpression(operand->theOperand.expressionUnion);
|
||||
break;
|
||||
|
||||
case A_REGISTER_OPND:
|
||||
@ -206,15 +206,15 @@ freeOperand(operand)
|
||||
case X_SELECTED_OPND:
|
||||
case Y_SELECTED_OPND:
|
||||
case PRE_SELECTED_X_OPND:
|
||||
freeSelectionList(operand->theOperand);
|
||||
freeSelectionList(operand->theOperand.xSelectedUnion);
|
||||
break;
|
||||
|
||||
case STRING_OPND:
|
||||
freeString(operand->theOperand);
|
||||
freeString(operand->theOperand.stringUnion);
|
||||
break;
|
||||
|
||||
case BLOCK_OPND:
|
||||
freeBlock(operand->theOperand);
|
||||
freeBlock(operand->theOperand.blockUnion);
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -302,7 +302,7 @@ evaluateOperand(operand)
|
||||
case PRE_INDEXED_X_OPND:
|
||||
case X_INDEXED_OPND:
|
||||
case Y_INDEXED_OPND:
|
||||
result = evaluateExpression(operand->theOperand,
|
||||
result = evaluateExpression(operand->theOperand.expressionUnion,
|
||||
performingFixups ? NO_FIXUP : OPERAND_FIXUP);
|
||||
if (operand->kindOfOperand != EXPRESSION_OPND) {
|
||||
if (result->addressMode != EXPRESSION_OPND) {
|
||||
@ -324,7 +324,7 @@ evaluateOperand(operand)
|
||||
case X_SELECTED_OPND:
|
||||
case Y_SELECTED_OPND:
|
||||
case PRE_SELECTED_X_OPND:
|
||||
result = evaluateSelectionList(operand->theOperand);
|
||||
result = evaluateSelectionList(operand->theOperand.xSelectedUnion);
|
||||
if (result->addressMode != EXPRESSION_OPND) {
|
||||
error(BAD_ADDRESS_MODE_ERROR);
|
||||
result->kindOfValue = FAIL;
|
||||
@ -334,7 +334,7 @@ evaluateOperand(operand)
|
||||
break;
|
||||
|
||||
case STRING_OPND:
|
||||
result = newValue(STRING_VALUE, operand->theOperand,
|
||||
result = newValue(STRING_VALUE, operand->theOperand.stringUnion,
|
||||
STRING_OPND);
|
||||
break;
|
||||
|
||||
@ -342,7 +342,7 @@ evaluateOperand(operand)
|
||||
if (standaloneExpansionFlag)
|
||||
forceExpansion();
|
||||
sideEffectFlag = TRUE;
|
||||
assembleBlock(operand->theOperand);
|
||||
assembleBlock(operand->theOperand.blockUnion);
|
||||
expansionOn();
|
||||
result = newValue(FAIL, 0, BLOCK_OPND);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user