/** * When a break is encountered annotate the statement being broken * out of by setting its CONTROL_BLOCK_PROP property. * @return logical OR of END_* flags */ private int endCheckBreak() { Node n = ((Jump) this).jumpNode; n.putIntProp(CONTROL_BLOCK_PROP, END_DROPS_OFF); return END_UNREACHED; }
/** * When a break is encountered annotate the statement being broken * out of by setting its CONTROL_BLOCK_PROP property. * @return logical OR of END_* flags */ private int endCheckBreak() { Node n = ((Jump) this).jumpNode; n.putIntProp(CONTROL_BLOCK_PROP, END_DROPS_OFF); return END_UNREACHED; }
/** * Regular expressions */ Node createRegExp(int regexpIndex) { Node n = new Node(Token.REGEXP); n.putIntProp(Node.REGEXP_PROP, regexpIndex); return n; }
public void labelId(int labelId) { if (type != Token.TARGET && type != Token.YIELD) Kit.codeBug(); putIntProp(LABEL_ID_PROP, labelId); }
public void labelId(int labelId) { if (type != Token.TARGET) Kit.codeBug(); putIntProp(LABEL_ID_PROP, labelId); }
public void labelId(int labelId) { if (type != Token.TARGET && type != Token.YIELD) Kit.codeBug(); putIntProp(LABEL_ID_PROP, labelId); }
public void labelId(int labelId) { if (type != Token.TARGET && type != Token.YIELD) Kit.codeBug(); putIntProp(LABEL_ID_PROP, labelId); }
/** * When a break is encountered annotate the statement being broken * out of by setting its CONTROL_BLOCK_PROP property. * @return logical OR of END_* flags */ private int endCheckBreak() { Node n = ((Jump) this).getJumpStatement(); n.putIntProp(CONTROL_BLOCK_PROP, END_DROPS_OFF); return END_UNREACHED; }
/** * Regular expressions */ Node createRegExp(int regexpIndex) { Node n = new Node(Token.REGEXP); n.putIntProp(Node.REGEXP_PROP, regexpIndex); return n; }
/** * When a break is encountered annotate the statement being broken * out of by setting its CONTROL_BLOCK_PROP property. * @return logical OR of END_* flags */ private int endCheckBreak() { Node n = ((Jump) this).getJumpStatement(); n.putIntProp(CONTROL_BLOCK_PROP, END_DROPS_OFF); return END_UNREACHED; }
public void labelId(int labelId) { if (type != Token.TARGET && type != Token.YIELD) Kit.codeBug(); putIntProp(LABEL_ID_PROP, labelId); }
/** * When a break is encountered annotate the statement being broken * out of by setting its CONTROL_BLOCK_PROP property. * @return logical OR of END_* flags */ private int endCheckBreak() { Node n = ((Jump) this).getJumpStatement(); n.putIntProp(CONTROL_BLOCK_PROP, END_DROPS_OFF); return END_UNREACHED; }
/** * When a break is encountered annotate the statement being broken * out of by setting its CONTROL_BLOCK_PROP property. * @return logical OR of END_* flags */ private int endCheckBreak() { Node n = ((Jump) this).getJumpStatement(); n.putIntProp(CONTROL_BLOCK_PROP, END_DROPS_OFF); return END_UNREACHED; }
public void labelId(int labelId) { if (type != Token.TARGET && type != Token.YIELD) Kit.codeBug(); putIntProp(LABEL_ID_PROP, labelId); }
private Node createIncDec(int nodeType, boolean post, Node child) { child = makeReference(child); int childType = child.getType(); switch (childType) { case Token.NAME: case Token.GETPROP: case Token.GETELEM: case Token.GET_REF: { Node n = new Node(nodeType, child); int incrDecrMask = 0; if (nodeType == Token.DEC) { incrDecrMask |= Node.DECR_FLAG; } if (post) { incrDecrMask |= Node.POST_FLAG; } n.putIntProp(Node.INCRDECR_PROP, incrDecrMask); return n; } } throw Kit.codeBug(); }
int getVarIndex(Node n) { int index = n.getIntProp(Node.VARIABLE_PROP, -1); if (index == -1) { Node node; int type = n.getType(); if (type == Token.GETVAR) { node = n; } else if (type == Token.SETVAR || type == Token.SETCONSTVAR) { node = n.getFirstChild(); } else { throw Kit.codeBug(); } index = fnode.getIndexForNameNode(node); if (index < 0) throw Kit.codeBug(); n.putIntProp(Node.VARIABLE_PROP, index); } return index; }
public int getVarIndex(Node n) { int index = n.getIntProp(Node.VARIABLE_PROP, -1); if (index == -1) { Node node; int type = n.getType(); if (type == Token.GETVAR) { node = n; } else if (type == Token.SETVAR || type == Token.SETCONSTVAR) { node = n.getFirstChild(); } else { throw Kit.codeBug(); } index = fnode.getIndexForNameNode(node); if (index < 0) throw Kit.codeBug(); n.putIntProp(Node.VARIABLE_PROP, index); } return index; }
public int getVarIndex(Node n) { int index = n.getIntProp(Node.VARIABLE_PROP, -1); if (index == -1) { Node node; int type = n.getType(); if (type == Token.GETVAR) { node = n; } else if (type == Token.SETVAR || type == Token.SETCONSTVAR) { node = n.getFirstChild(); } else { throw Kit.codeBug(); } index = fnode.getIndexForNameNode(node); if (index < 0) throw Kit.codeBug(); n.putIntProp(Node.VARIABLE_PROP, index); } return index; }
public int getVarIndex(Node n) { int index = n.getIntProp(Node.VARIABLE_PROP, -1); if (index == -1) { Node node; int type = n.getType(); if (type == Token.GETVAR) { node = n; } else if (type == Token.SETVAR || type == Token.SETCONSTVAR) { node = n.getFirstChild(); } else { throw Kit.codeBug(); } index = fnode.getIndexForNameNode(node); if (index < 0) throw Kit.codeBug(); n.putIntProp(Node.VARIABLE_PROP, index); } return index; }
int getVarIndex(Node n) { int index = n.getIntProp(Node.VARIABLE_PROP, -1); if (index == -1) { String name; int type = n.getType(); if (type == Token.GETVAR) { name = n.getString(); } else if (type == Token.SETVAR || type == Token.SETCONSTVAR) { name = n.getFirstChild().getString(); } else { throw Kit.codeBug(); } index = fnode.getParamOrVarIndex(name); if (index < 0) throw Kit.codeBug(); n.putIntProp(Node.VARIABLE_PROP, index); } return index; }