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

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

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

Node.labelId介绍

暂无

代码示例

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

  1. private int getTargetLabel(Node target)
  2. {
  3. int labelId = target.labelId();
  4. if (labelId == -1) {
  5. labelId = cfw.acquireLabel();
  6. target.labelId(labelId);
  7. }
  8. return labelId;
  9. }

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

  1. private int getTargetLabel(Node target)
  2. {
  3. int labelId = target.labelId();
  4. if (labelId == -1) {
  5. labelId = cfw.acquireLabel();
  6. target.labelId(labelId);
  7. }
  8. return labelId;
  9. }

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

  1. private int getTargetLabel(Node target)
  2. {
  3. int labelId = target.labelId();
  4. if (labelId == -1) {
  5. labelId = cfw.acquireLabel();
  6. target.labelId(labelId);
  7. }
  8. return labelId;
  9. }

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

  1. private int getTargetLabel(Node target)
  2. {
  3. int labelId = target.labelId();
  4. if (labelId == -1) {
  5. labelId = cfw.acquireLabel();
  6. target.labelId(labelId);
  7. }
  8. return labelId;
  9. }

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

  1. private int getTargetLabel(Node target)
  2. {
  3. int label = target.labelId();
  4. if (label != -1) {
  5. return label;
  6. }
  7. label = labelTableTop;
  8. if (labelTable == null || label == labelTable.length) {
  9. if (labelTable == null) {
  10. labelTable = new int[MIN_LABEL_TABLE_SIZE];
  11. }else {
  12. int[] tmp = new int[labelTable.length * 2];
  13. System.arraycopy(labelTable, 0, tmp, 0, label);
  14. labelTable = tmp;
  15. }
  16. }
  17. labelTableTop = label + 1;
  18. labelTable[label] = -1;
  19. target.labelId(label);
  20. return label;
  21. }

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

  1. private int getTargetLabel(Node target)
  2. {
  3. int label = target.labelId();
  4. if (label != -1) {
  5. return label;
  6. }
  7. label = itsLabelTableTop;
  8. if (itsLabelTable == null || label == itsLabelTable.length) {
  9. if (itsLabelTable == null) {
  10. itsLabelTable = new int[MIN_LABEL_TABLE_SIZE];
  11. }else {
  12. int[] tmp = new int[itsLabelTable.length * 2];
  13. System.arraycopy(itsLabelTable, 0, tmp, 0, label);
  14. itsLabelTable = tmp;
  15. }
  16. }
  17. itsLabelTableTop = label + 1;
  18. itsLabelTable[label] = -1;
  19. target.labelId(label);
  20. return label;
  21. }

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

  1. private int getTargetLabel(Node target)
  2. {
  3. int labelId = target.labelId();
  4. if (labelId == -1) {
  5. labelId = cfw.acquireLabel();
  6. target.labelId(labelId);
  7. }
  8. return labelId;
  9. }

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

  1. private int getTargetLabel(Node target)
  2. {
  3. int labelId = target.labelId();
  4. if (labelId == -1) {
  5. labelId = cfw.acquireLabel();
  6. target.labelId(labelId);
  7. }
  8. return labelId;
  9. }

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

  1. private int getTargetLabel(Node target)
  2. {
  3. int label = target.labelId();
  4. if (label != -1) {
  5. return label;
  6. }
  7. label = labelTableTop;
  8. if (labelTable == null || label == labelTable.length) {
  9. if (labelTable == null) {
  10. labelTable = new int[MIN_LABEL_TABLE_SIZE];
  11. }else {
  12. int[] tmp = new int[labelTable.length * 2];
  13. System.arraycopy(labelTable, 0, tmp, 0, label);
  14. labelTable = tmp;
  15. }
  16. }
  17. labelTableTop = label + 1;
  18. labelTable[label] = -1;
  19. target.labelId(label);
  20. return label;
  21. }

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

  1. private int getTargetLabel(Node target)
  2. {
  3. int label = target.labelId();
  4. if (label != -1) {
  5. return label;
  6. }
  7. label = labelTableTop;
  8. if (labelTable == null || label == labelTable.length) {
  9. if (labelTable == null) {
  10. labelTable = new int[MIN_LABEL_TABLE_SIZE];
  11. }else {
  12. int[] tmp = new int[labelTable.length * 2];
  13. System.arraycopy(labelTable, 0, tmp, 0, label);
  14. labelTable = tmp;
  15. }
  16. }
  17. labelTableTop = label + 1;
  18. labelTable[label] = -1;
  19. target.labelId(label);
  20. return label;
  21. }

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

  1. private int getTargetLabel(Node target)
  2. {
  3. int label = target.labelId();
  4. if (label != -1) {
  5. return label;
  6. }
  7. label = itsLabelTableTop;
  8. if (itsLabelTable == null || label == itsLabelTable.length) {
  9. if (itsLabelTable == null) {
  10. itsLabelTable = new int[MIN_LABEL_TABLE_SIZE];
  11. }else {
  12. int[] tmp = new int[itsLabelTable.length * 2];
  13. System.arraycopy(itsLabelTable, 0, tmp, 0, label);
  14. itsLabelTable = tmp;
  15. }
  16. }
  17. itsLabelTableTop = label + 1;
  18. itsLabelTable[label] = -1;
  19. target.labelId(label);
  20. return label;
  21. }

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

  1. private int getTargetLabel(Node target)
  2. {
  3. int label = target.labelId();
  4. if (label != -1) {
  5. return label;
  6. }
  7. label = labelTableTop;
  8. if (labelTable == null || label == labelTable.length) {
  9. if (labelTable == null) {
  10. labelTable = new int[MIN_LABEL_TABLE_SIZE];
  11. }else {
  12. int[] tmp = new int[labelTable.length * 2];
  13. System.arraycopy(labelTable, 0, tmp, 0, label);
  14. labelTable = tmp;
  15. }
  16. }
  17. labelTableTop = label + 1;
  18. labelTable[label] = -1;
  19. target.labelId(label);
  20. return label;
  21. }

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

  1. private void resetTargets_r()
  2. {
  3. if (type == Token.TARGET || type == Token.YIELD) {
  4. labelId(-1);
  5. }
  6. Node child = first;
  7. while (child != null) {
  8. child.resetTargets_r();
  9. child = child.next;
  10. }
  11. }

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

  1. private void resetTargets_r()
  2. {
  3. if (type == Token.TARGET || type == Token.YIELD) {
  4. labelId(-1);
  5. }
  6. Node child = first;
  7. while (child != null) {
  8. child.resetTargets_r();
  9. child = child.next;
  10. }
  11. }

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

  1. private void resetTargets_r()
  2. {
  3. if (type == Token.TARGET || type == Token.YIELD) {
  4. labelId(-1);
  5. }
  6. Node child = first;
  7. while (child != null) {
  8. child.resetTargets_r();
  9. child = child.next;
  10. }
  11. }

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

  1. private void resetTargets_r()
  2. {
  3. if (type == Token.TARGET || type == Token.YIELD) {
  4. labelId(-1);
  5. }
  6. Node child = first;
  7. while (child != null) {
  8. child.resetTargets_r();
  9. child = child.next;
  10. }
  11. }

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

  1. int catchLabel = catchTarget.labelId();
  2. int finallyLabel = finallyTarget.labelId();
  3. if (isGenerator)
  4. addGotoWithReturn(finallyTarget);

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

  1. int catchLabel = catchTarget.labelId();
  2. int finallyLabel = finallyTarget.labelId();
  3. cfw.add(ByteCode.JSR, finallyLabel);

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

  1. int catchLabel = catchTarget.labelId();
  2. int finallyLabel = finallyTarget.labelId();
  3. if (isGenerator)
  4. addGotoWithReturn(finallyTarget);

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

  1. int catchLabel = catchTarget.labelId();
  2. int finallyLabel = finallyTarget.labelId();
  3. if (isGenerator)
  4. addGotoWithReturn(finallyTarget);

相关文章