Cosmetics: nodeOp as variable name is replaced by assignOp in methods related to construction of assignment nodes.

This commit is contained in:
igor%mir2.org 2003-08-13 11:53:14 +00:00
parent a4742a5fe9
commit 593784cb96

View File

@ -816,7 +816,7 @@ public class IRFactory {
null, false); null, false);
} }
private Node createAssignment(int nodeOp, Node left, Node right, private Node createAssignment(int assignOp, Node left, Node right,
Class convert, boolean postfix) Class convert, boolean postfix)
{ {
int nodeType = left.getType(); int nodeType = left.getType();
@ -824,7 +824,7 @@ public class IRFactory {
Node id = null; Node id = null;
switch (nodeType) { switch (nodeType) {
case Token.NAME: case Token.NAME:
return createSetName(nodeOp, left, right, convert, postfix); return createSetName(assignOp, left, right, convert, postfix);
case Token.GETPROP: case Token.GETPROP:
idString = (String) left.getProp(Node.SPECIAL_PROP_PROP); idString = (String) left.getProp(Node.SPECIAL_PROP_PROP);
@ -834,7 +834,7 @@ public class IRFactory {
case Token.GETELEM: case Token.GETELEM:
if (id == null) if (id == null)
id = left.getLastChild(); id = left.getLastChild();
return createSetProp(nodeType, nodeOp, left.getFirstChild(), return createSetProp(nodeType, assignOp, left.getFirstChild(),
id, right, convert, postfix); id, right, convert, postfix);
default: default:
// TODO: This should be a ReferenceError--but that's a runtime // TODO: This should be a ReferenceError--but that's a runtime
@ -852,10 +852,10 @@ public class IRFactory {
return result; return result;
} }
private Node createSetName(int nodeOp, Node left, Node right, private Node createSetName(int assignOp, Node left, Node right,
Class convert, boolean postfix) Class convert, boolean postfix)
{ {
if (nodeOp == Token.NOP) { if (assignOp == Token.NOP) {
left.setType(Token.BINDNAME); left.setType(Token.BINDNAME);
return new Node(Token.SETNAME, left, right); return new Node(Token.SETNAME, left, right);
} }
@ -873,7 +873,7 @@ public class IRFactory {
opLeft = createConvert(convert, opLeft); opLeft = createConvert(convert, opLeft);
if (postfix) if (postfix)
opLeft = createNewTemp(opLeft); opLeft = createNewTemp(opLeft);
Node op = new Node(nodeOp, opLeft, right); Node op = new Node(assignOp, opLeft, right);
Node lvalueLeft = Node.newString(Token.BINDNAME, s); Node lvalueLeft = Node.newString(Token.BINDNAME, s);
Node result = new Node(Token.SETNAME, lvalueLeft, op); Node result = new Node(Token.SETNAME, lvalueLeft, op);
@ -947,7 +947,7 @@ public class IRFactory {
return false; return false;
} }
private Node createSetProp(int nodeType, int nodeOp, Node obj, Node id, private Node createSetProp(int nodeType, int assignOp, Node obj, Node id,
Node expr, Class convert, boolean postfix) Node expr, Class convert, boolean postfix)
{ {
int type = nodeType == Token.GETPROP int type = nodeType == Token.GETPROP
@ -963,7 +963,7 @@ public class IRFactory {
} }
} }
if (nodeOp == Token.NOP) if (assignOp == Token.NOP)
return new Node(type, obj, id, expr); return new Node(type, obj, id, expr);
/* /*
* If the RHS expression could modify the LHS we have * If the RHS expression could modify the LHS we have
@ -997,7 +997,7 @@ public class IRFactory {
opLeft = createConvert(convert, opLeft); opLeft = createConvert(convert, opLeft);
if (postfix) if (postfix)
opLeft = createNewTemp(opLeft); opLeft = createNewTemp(opLeft);
Node op = new Node(nodeOp, opLeft, expr); Node op = new Node(assignOp, opLeft, expr);
Node result = new Node(type, tmp1, tmp2, op); Node result = new Node(type, tmp1, tmp2, op);
if (postfix) { if (postfix) {