org.mozilla.javascript.Node.getIntProp()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 JavaScript  
字(5.7k)|赞(0)|评价(0)|浏览(269)

本文整理了Java中org.mozilla.javascript.Node.getIntProp()方法的一些代码示例,展示了Node.getIntProp()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.getIntProp()方法的具体详情如下:
包路径:org.mozilla.javascript.Node
类名称:Node
方法名:getIntProp

Node.getIntProp介绍

暂无

代码示例

代码示例来源:origin: rhino/js

  1. private void checkMutableReference(Node n)
  2. {
  3. int memberTypeFlags = n.getIntProp(Node.MEMBER_TYPE_PROP, 0);
  4. if ((memberTypeFlags & Node.DESCENDANTS_FLAG) != 0) {
  5. parser.reportError("msg.bad.assign.left");
  6. }
  7. }

代码示例来源:origin: geogebra/geogebra

  1. protected void checkMutableReference(Node n) {
  2. int memberTypeFlags = n.getIntProp(Node.MEMBER_TYPE_PROP, 0);
  3. if ((memberTypeFlags & Node.DESCENDANTS_FLAG) != 0) {
  4. reportError("msg.bad.assign.left");
  5. }
  6. }

代码示例来源:origin: io.apigee/rhino

  1. protected void checkMutableReference(Node n) {
  2. int memberTypeFlags = n.getIntProp(Node.MEMBER_TYPE_PROP, 0);
  3. if ((memberTypeFlags & Node.DESCENDANTS_FLAG) != 0) {
  4. reportError("msg.bad.assign.left");
  5. }
  6. }

代码示例来源:origin: com.sun.phobos/phobos-rhino

  1. public final int labelId()
  2. {
  3. if (type != Token.TARGET) Kit.codeBug();
  4. return getIntProp(LABEL_ID_PROP, -1);
  5. }

代码示例来源:origin: rhino/js

  1. public final int labelId()
  2. {
  3. if (type != Token.TARGET && type != Token.YIELD) Kit.codeBug();
  4. return getIntProp(LABEL_ID_PROP, -1);
  5. }

代码示例来源:origin: io.apigee/rhino

  1. public final int labelId()
  2. {
  3. if (type != Token.TARGET && type != Token.YIELD) Kit.codeBug();
  4. return getIntProp(LABEL_ID_PROP, -1);
  5. }

代码示例来源:origin: ro.isdc.wro4j/rhino

  1. public final int labelId()
  2. {
  3. if (type != Token.TARGET && type != Token.YIELD) Kit.codeBug();
  4. return getIntProp(LABEL_ID_PROP, -1);
  5. }

代码示例来源:origin: com.sun.phobos/phobos-rhino

  1. private void checkMutableReference(Node n)
  2. {
  3. int memberTypeFlags = n.getIntProp(Node.MEMBER_TYPE_PROP, 0);
  4. if ((memberTypeFlags & Node.DESCENDANTS_FLAG) != 0) {
  5. parser.reportError("msg.bad.assign.left");
  6. }
  7. }

代码示例来源:origin: geogebra/geogebra

  1. public final int labelId()
  2. {
  3. if (type != Token.TARGET && type != Token.YIELD) Kit.codeBug();
  4. return getIntProp(LABEL_ID_PROP, -1);
  5. }

代码示例来源:origin: ro.isdc.wro4j/rhino

  1. protected void checkMutableReference(Node n) {
  2. int memberTypeFlags = n.getIntProp(Node.MEMBER_TYPE_PROP, 0);
  3. if ((memberTypeFlags & Node.DESCENDANTS_FLAG) != 0) {
  4. reportError("msg.bad.assign.left");
  5. }
  6. }

代码示例来源:origin: com.github.tntim96/rhino

  1. protected void checkMutableReference(Node n) {
  2. int memberTypeFlags = n.getIntProp(Node.MEMBER_TYPE_PROP, 0);
  3. if ((memberTypeFlags & Node.DESCENDANTS_FLAG) != 0) {
  4. reportError("msg.bad.assign.left");
  5. }
  6. }

代码示例来源:origin: com.github.tntim96/rhino

  1. public final int labelId()
  2. {
  3. if (type != Token.TARGET && type != Token.YIELD) Kit.codeBug();
  4. return getIntProp(LABEL_ID_PROP, -1);
  5. }

代码示例来源:origin: rhino/js

  1. /**
  2. * A labelled statement implies that there maybe a break to the label. The
  3. * function processes the labelled statement and then checks the
  4. * CONTROL_BLOCK_PROP property to see if there is ever a break to the
  5. * particular label.
  6. * @return logical OR of END_* flags
  7. */
  8. private int endCheckLabel()
  9. {
  10. int rv = END_UNREACHED;
  11. rv = next.endCheck();
  12. rv |= getIntProp(CONTROL_BLOCK_PROP, END_UNREACHED);
  13. return rv;
  14. }

代码示例来源:origin: ro.isdc.wro4j/rhino

  1. /**
  2. * A labelled statement implies that there maybe a break to the label. The
  3. * function processes the labelled statement and then checks the
  4. * CONTROL_BLOCK_PROP property to see if there is ever a break to the
  5. * particular label.
  6. * @return logical OR of END_* flags
  7. */
  8. private int endCheckLabel()
  9. {
  10. int rv = END_UNREACHED;
  11. rv = next.endCheck();
  12. rv |= getIntProp(CONTROL_BLOCK_PROP, END_UNREACHED);
  13. return rv;
  14. }

代码示例来源:origin: com.sun.phobos/phobos-rhino

  1. /**
  2. * A labelled statement implies that there maybe a break to the label. The
  3. * function processes the labelled statement and then checks the
  4. * CONTROL_BLOCK_PROP property to see if there is ever a break to the
  5. * particular label.
  6. * @return logical OR of END_* flags
  7. */
  8. private int endCheckLabel()
  9. {
  10. int rv = END_UNREACHED;
  11. rv = next.endCheck();
  12. rv |= getIntProp(CONTROL_BLOCK_PROP, END_UNREACHED);
  13. return rv;
  14. }

代码示例来源:origin: com.github.tntim96/rhino

  1. /**
  2. * A labelled statement implies that there maybe a break to the label. The
  3. * function processes the labelled statement and then checks the
  4. * CONTROL_BLOCK_PROP property to see if there is ever a break to the
  5. * particular label.
  6. * @return logical OR of END_* flags
  7. */
  8. private int endCheckLabel()
  9. {
  10. int rv = END_UNREACHED;
  11. rv = next.endCheck();
  12. rv |= getIntProp(CONTROL_BLOCK_PROP, END_UNREACHED);
  13. return rv;
  14. }

代码示例来源:origin: geogebra/geogebra

  1. /**
  2. * A labelled statement implies that there maybe a break to the label. The
  3. * function processes the labelled statement and then checks the
  4. * CONTROL_BLOCK_PROP property to see if there is ever a break to the
  5. * particular label.
  6. * @return logical OR of END_* flags
  7. */
  8. private int endCheckLabel()
  9. {
  10. int rv = END_UNREACHED;
  11. rv = next.endCheck();
  12. rv |= getIntProp(CONTROL_BLOCK_PROP, END_UNREACHED);
  13. return rv;
  14. }

代码示例来源:origin: io.apigee/rhino

  1. /**
  2. * A labelled statement implies that there maybe a break to the label. The
  3. * function processes the labelled statement and then checks the
  4. * CONTROL_BLOCK_PROP property to see if there is ever a break to the
  5. * particular label.
  6. * @return logical OR of END_* flags
  7. */
  8. private int endCheckLabel()
  9. {
  10. int rv = END_UNREACHED;
  11. rv = next.endCheck();
  12. rv |= getIntProp(CONTROL_BLOCK_PROP, END_UNREACHED);
  13. return rv;
  14. }

代码示例来源:origin: rhino/js

  1. int getVarIndex(Node n)
  2. {
  3. int index = n.getIntProp(Node.VARIABLE_PROP, -1);
  4. if (index == -1) {
  5. Node node;
  6. int type = n.getType();
  7. if (type == Token.GETVAR) {
  8. node = n;
  9. } else if (type == Token.SETVAR ||
  10. type == Token.SETCONSTVAR) {
  11. node = n.getFirstChild();
  12. } else {
  13. throw Kit.codeBug();
  14. }
  15. index = fnode.getIndexForNameNode(node);
  16. if (index < 0) throw Kit.codeBug();
  17. n.putIntProp(Node.VARIABLE_PROP, index);
  18. }
  19. return index;
  20. }

代码示例来源:origin: rhino/js

  1. private void visitGetVar(Node node)
  2. {
  3. if (!hasVarsInRegs) Kit.codeBug();
  4. int varIndex = fnCurrent.getVarIndex(node);
  5. short reg = varRegisters[varIndex];
  6. if (varIsDirectCallParameter(varIndex)) {
  7. // Remember that here the isNumber flag means that we
  8. // want to use the incoming parameter in a Number
  9. // context, so test the object type and convert the
  10. // value as necessary.
  11. if (node.getIntProp(Node.ISNUMBER_PROP, -1) != -1) {
  12. dcpLoadAsNumber(reg);
  13. } else {
  14. dcpLoadAsObject(reg);
  15. }
  16. } else if (fnCurrent.isNumberVar(varIndex)) {
  17. cfw.addDLoad(reg);
  18. } else {
  19. cfw.addALoad(reg);
  20. }
  21. }

相关文章