当前位置: 首页>>代码示例>>Java>>正文


Java Label类代码示例

本文整理汇总了Java中jdk.nashorn.internal.codegen.Label的典型用法代码示例。如果您正苦于以下问题:Java Label类的具体用法?Java Label怎么用?Java Label使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Label类属于jdk.nashorn.internal.codegen包,在下文中一共展示了Label类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: Block

import jdk.nashorn.internal.codegen.Label; //导入依赖的package包/类
/**
 * Constructor
 *
 * @param token      token
 * @param finish     finish
 * @param statements statements
 */
public Block(final long token, final int finish, final Statement... statements) {
    super(token, finish);

    this.statements = Arrays.asList(statements);
    this.symbols    = new LinkedHashMap<>();
    this.entryLabel = new Label("block_entry");
    this.breakLabel = new Label("block_break");
    final int len = statements.length;
    this.flags = len > 0 && statements[len - 1].hasTerminalFlags() ? IS_TERMINAL : 0;
    this.conversion = null;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:19,代码来源:Block.java

示例2: CaseNode

import jdk.nashorn.internal.codegen.Label; //导入依赖的package包/类
/**
 * Constructors
 *
 * @param token    token
 * @param finish   finish
 * @param test     case test node, can be any node in JavaScript
 * @param body     case body
 */
public CaseNode(final long token, final int finish, final Expression test, final Block body) {
    super(token, finish);

    this.test  = test;
    this.body  = body;
    this.entry = new Label("entry");
    this.conversion = null;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:CaseNode.java

示例3: Block

import jdk.nashorn.internal.codegen.Label; //导入依赖的package包/类
/**
 * Constructor
 *
 * @param token      The first token of the block
 * @param finish     The index of the last character
 * @param flags      The flags of the block
 * @param statements All statements in the block
 */
public Block(final long token, final int finish, final int flags, final Statement... statements) {
    super(token, finish);

    this.statements = Arrays.asList(statements);
    this.symbols    = new LinkedHashMap<>();
    this.entryLabel = new Label("block_entry");
    this.breakLabel = new Label("block_break");
    final int len = statements.length;
    final int terminalFlags = len > 0 && statements[len - 1].hasTerminalFlags() ? IS_TERMINAL : 0;
    this.flags = terminalFlags | flags;
    this.conversion = null;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:21,代码来源:Block.java

示例4: getBreakLabel

import jdk.nashorn.internal.codegen.Label; //导入依赖的package包/类
@Override
public Label getBreakLabel() {
    return breakLabel;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:5,代码来源:Block.java

示例5: getLabels

import jdk.nashorn.internal.codegen.Label; //导入依赖的package包/类
@Override
public List<Label> getLabels() {
    return Collections.unmodifiableList(Arrays.asList(entryLabel, breakLabel));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:5,代码来源:Block.java

示例6: getBreakLabel

import jdk.nashorn.internal.codegen.Label; //导入依赖的package包/类
/**
 * Return the break label, i.e. the location to go to on break.
 * @return the break label
 */
@Override
public Label getBreakLabel() {
    return breakLabel;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:BreakableStatement.java

示例7: getLabels

import jdk.nashorn.internal.codegen.Label; //导入依赖的package包/类
@Override
public List<Label> getLabels() {
    return Collections.unmodifiableList(Arrays.asList(breakLabel, continueLabel));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:5,代码来源:LoopNode.java

示例8: getTargetLabel

import jdk.nashorn.internal.codegen.Label; //导入依赖的package包/类
@Override
public Label getTargetLabel(final BreakableNode target) {
    return target.getBreakLabel();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:5,代码来源:BreakNode.java

示例9: getTargetLabel

import jdk.nashorn.internal.codegen.Label; //导入依赖的package包/类
@Override
public Label getTargetLabel(final BreakableNode target) {
    return ((LoopNode)target).getContinueLabel();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:5,代码来源:ContinueNode.java

示例10: getLabels

import jdk.nashorn.internal.codegen.Label; //导入依赖的package包/类
@Override
public List<Label> getLabels() {
    return Collections.unmodifiableList(Collections.singletonList(entry));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:5,代码来源:CaseNode.java

示例11: getTargetLabel

import jdk.nashorn.internal.codegen.Label; //导入依赖的package包/类
@Override
Label getTargetLabel(final BreakableNode target) {
    return target.getBreakLabel();
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:5,代码来源:BreakNode.java

示例12: getTargetLabel

import jdk.nashorn.internal.codegen.Label; //导入依赖的package包/类
@Override
Label getTargetLabel(final BreakableNode target) {
    return ((LoopNode)target).getContinueLabel();
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:5,代码来源:ContinueNode.java

示例13: getTargetLabel

import jdk.nashorn.internal.codegen.Label; //导入依赖的package包/类
@Override
Label getTargetLabel(final BreakableNode target) {
    assert target != null;
    // We're jumping to the entry of the inlined finally block
    return ((Block)target).getEntryLabel();
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:7,代码来源:JumpToInlinedFinally.java


注:本文中的jdk.nashorn.internal.codegen.Label类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。