/** Resolve all continues of this statement. */
boolean resolveContinues(JCTree tree) {
    boolean result = false;
    List<PendingExit> exits = pendingExits.toList();
    pendingExits = new ListBuffer<PendingExit>();

    for (; exits.nonEmpty(); exits = exits.tail) {
        PendingExit exit = exits.head;
        if (exit.tree.getTag() == JCTree.CONTINUE &&
                 ((JCContinue) exit.tree).target == tree) {

            inits.andSet(exit.inits); // 相当于取交集
            uninits.andSet(exit.uninits);
            result = true;
        } else {
            pendingExits.append(exit);
        }
    }
    return result;
}

调用的地方如下截图:

/** Resolve all breaks of this statement. */
boolean resolveBreaks(JCTree tree, // tree是break的跳出目标
                      ListBuffer<PendingExit> oldPendingExits) {
    boolean result = false;
    List<PendingExit> exits = pendingExits.toList();
    pendingExits = oldPendingExits;
    for (; exits.nonEmpty(); exits = exits.tail) {
        PendingExit exit = exits.head;
        if (exit.tree.getTag() == JCTree.BREAK &&
                    ((JCBreak) exit.tree).target == tree) {
            inits.andSet(exit.inits);
            uninits.andSet(exit.uninits);
            result = true;
        } else {
            pendingExits.append(exit);
        }
    }
    return result;
}

调用的地方如下:  

Flow类中的resolveBreaks与resolveContinues的更多相关文章

  1. 揭开C++类中虚表的“神秘面纱”

    C++类中的虚表结构是C++对象模型中一个重要的知识点,这里咱们就来深入分析下虚表的在内存中的结构. C++一个类中有虚函数的话就会有一个虚表指针,其指向对应的虚表,一般一个类只会有一个虚表,每个虚表 ...

  2. Python类中super()和__init__()的关系

    Python类中super()和__init__()的关系 1.单继承时super()和__init__()实现的功能是类似的 class Base(object): def __init__(sel ...

  3. Hibernate jpa 在实体类中对于时间的注解

    在时间类型DATE 属性上添加一个 @Temporal(TemporalType.DATE)(精确到年月日)@Temporal(TemporalType.TIME)(精确到时分秒)@Temporal( ...

  4. Java中是否可以调用一个类中的main方法?

    前几天面试的时候,被问到在Java中是否可以调用一个类中的main方法?回来测试了下,答案是可以!代码如下: main1中调用main2的主方法 package org.fiu.test; impor ...

  5. Myeclipse中导入项目后java类中汉字注释出现乱码问题(已解决)

    今天重装系统,安装了新的Myeclipse后,导入之前的项目后,,出现了乱码问题.乱码问题主要是java类中的注释,而jsp页面中汉字却完好如初: 右键项目,查看项目的编码格式,UTF-8,把java ...

  6. 解析C#类中的构造函数

    <解析C#类中的构造函数> 一.  C#中的构造函数概述: C#中类包含数据成员和函数成员.函数成员提供了操作类中数据的某些功能,包括方法.属性.构造器和终结器.运算符和索引器. 构造函数 ...

  7. junit4 assert类中的assert方法总结

    junit中的assert方法全部放在Assert类中,总结一下junit类中assert方法的分类. 1.assertTrue/False([String message,]boolean cond ...

  8. 第6章 Java类中的方法

    1.如何定义java的方法 什么是方法:方法使用来解决一类问题的代码集合,是一个功能模块在类中定义个方法的方法是: 访问修饰符 返回值类型 方法名(参数列表){ 方法体 } 1.访问修饰符,是限制该方 ...

  9. Reader与InputStream两个类中的read()的区别

    InputStream类的read()方法是从流里面取出一个字节,他的函数原型是 int read(); ,Reader类的read()方法则是从流里面取出一个字符(一个char),他的函数原型也是  ...

随机推荐

  1. 201709025工作日记--更新UI方法

    1.handler+Thread 和 runOnUIThread 和 handler.post 方法 区别: 从实现原理上,两者别无二致,runOnUiThread也是借助Handler实现的.  对 ...

  2. (KMP 求循环节)The Minimum Length

    http://acm.hust.edu.cn/vjudge/contest/view.action?cid=70325#problem/F The Minimum Length Time Limit: ...

  3. (并查集 添加关系)How Many Answers Are Wrong --Hdu --3038

    链接: http://acm.hdu.edu.cn/showproblem.php?pid=3038 http://acm.hust.edu.cn/vjudge/contest/view.action ...

  4. linux导出Excel The maximum column width for an individual cell is 255 characters

    linux环境到处Excel报错: The maximum column width for an individual cell is 255 characters 解决方案: for (int i ...

  5. Java面向接口编程【精品博客】

    我们从生活中去理解面向接口编程,以下举例四个案例来理解: 案例一(汽车案例): /** * 汽车标准接口 * @author Liudeli */ public interface ICar { /* ...

  6. NetMQ 消息队列

    忘记是看到哪个博客写的了,如有侵权,请见谅!! 1.辅助Helper类 (添加System.Messaging引用) using System; using System.Collections.Ge ...

  7. XPath高级用法(冰山一角)

    运算符+内置函数 使用XPath选择元素时,使用运算符+内置函数来进行筛选: .//div[contains(@class,"ec_desc") or contains(@clas ...

  8. windows下redis安装及应用

    一.下载安装Redis(windows版本) 1.下载地址:https://github.com/MicrosoftArchive/redis/releases 2.安装: 1)打开运行窗口,输出cm ...

  9. PhoneGap原理

    http://www.oschina.net/question/213217_46380

  10. Spring 开发第一步(二)

    今天继续学习<Spring in action 3rd>并运行书中的例子,到了第4章aop,是加入一个作为切面的Audience类,将Performer的perform()方法作为切点来进 ...