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


Java SwitchPoint.invalidateAll方法代码示例

本文整理汇总了Java中java.lang.invoke.SwitchPoint.invalidateAll方法的典型用法代码示例。如果您正苦于以下问题:Java SwitchPoint.invalidateAll方法的具体用法?Java SwitchPoint.invalidateAll怎么用?Java SwitchPoint.invalidateAll使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.lang.invoke.SwitchPoint的用法示例。


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

示例1: requestRecompile

import java.lang.invoke.SwitchPoint; //导入方法依赖的package包/类
boolean requestRecompile(final RewriteException e) {
    final Type retType            = e.getReturnType();
    final Type previousFailedType = invalidatedProgramPoints.put(e.getProgramPoint(), retType);

    if (previousFailedType != null && !previousFailedType.narrowerThan(retType)) {
        final StackTraceElement[] stack      = e.getStackTrace();
        final String              functionId = stack.length == 0 ?
                data.getName() :
                stack[0].getClassName() + "." + stack[0].getMethodName();

        log.info("RewriteException for an already invalidated program point ", e.getProgramPoint(), " in ", functionId, ". This is okay for a recursive function invocation, but a bug otherwise.");

        return false;
    }

    SwitchPoint.invalidateAll(new SwitchPoint[] { optimisticAssumptions });

    return true;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:CompiledFunction.java

示例2: invalidateSwitchPoint

import java.lang.invoke.SwitchPoint; //导入方法依赖的package包/类
@SuppressWarnings("unused")
private static Object invalidateSwitchPoint(final AccessorProperty property, final Object obj) {
     if (!property.builtinSwitchPoint.hasBeenInvalidated()) {
        SwitchPoint.invalidateAll(new SwitchPoint[] { property.builtinSwitchPoint });
    }
    return obj;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:AccessorProperty.java

示例3: invalidateProtoGetSwitchPoint

import java.lang.invoke.SwitchPoint; //导入方法依赖的package包/类
/**
 * Indicate that a prototype property has changed.
 *
 * @param property {@link Property} to invalidate.
 */
synchronized void invalidateProtoGetSwitchPoint(final Property property) {
    if (protoGetSwitches != null) {

        final String key = property.getKey();
        final SwitchPoint sp = protoGetSwitches.get(key);
        if (sp != null) {
            protoGetSwitches.remove(key);
            if (Context.DEBUG) {
                protoInvalidations++;
            }
            SwitchPoint.invalidateAll(new SwitchPoint[] { sp });
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:PropertyMap.java

示例4: invalidateAllProtoGetSwitchPoints

import java.lang.invoke.SwitchPoint; //导入方法依赖的package包/类
/**
 * Indicate that proto itself has changed in hierarchy somewhere.
 */
synchronized void invalidateAllProtoGetSwitchPoints() {
    if (protoGetSwitches != null && !protoGetSwitches.isEmpty()) {
        if (Context.DEBUG) {
            protoInvalidations += protoGetSwitches.size();
        }
        SwitchPoint.invalidateAll(protoGetSwitches.values().toArray(new SwitchPoint[protoGetSwitches.values().size()]));
        protoGetSwitches.clear();
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:PropertyMap.java

示例5: invalidateProtoSwitchPoint

import java.lang.invoke.SwitchPoint; //导入方法依赖的package包/类
/**
 * Indicate that a prototype property has changed.
 *
 * @param key {@link Property} key to invalidate.
 */
synchronized void invalidateProtoSwitchPoint(final Object key) {
    if (protoSwitches != null) {
        final SwitchPoint sp = protoSwitches.get(key);
        if (sp != null) {
            protoSwitches.remove(key);
            if (Context.DEBUG) {
                protoInvalidations.increment();
            }
            SwitchPoint.invalidateAll(new SwitchPoint[]{sp});
        }
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:18,代码来源:PropertyMap.java

示例6: invalidateAllProtoSwitchPoints

import java.lang.invoke.SwitchPoint; //导入方法依赖的package包/类
/**
 * Indicate that proto itself has changed in hierarchy somewhere.
 */
synchronized void invalidateAllProtoSwitchPoints() {
    if (protoSwitches != null) {
        final int size = protoSwitches.size();
        if (size > 0) {
            if (Context.DEBUG) {
                protoInvalidations.add(size);
            }
            SwitchPoint.invalidateAll(protoSwitches.values().toArray(new SwitchPoint[0]));
            protoSwitches.clear();
        }
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:16,代码来源:PropertyMap.java

示例7: invalidateLexicalSwitchPoint

import java.lang.invoke.SwitchPoint; //导入方法依赖的package包/类
private synchronized void invalidateLexicalSwitchPoint() {
    if (lexicalScopeSwitchPoint != null) {
        context.getLogger(GlobalConstants.class).info("Invalidating non-constant globals on lexical scope update");
        SwitchPoint.invalidateAll(new SwitchPoint[]{ lexicalScopeSwitchPoint });
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:7,代码来源:Global.java

示例8: invalidate

import java.lang.invoke.SwitchPoint; //导入方法依赖的package包/类
private void invalidate(final int count) {
    if (!sp.hasBeenInvalidated()) {
        SwitchPoint.invalidateAll(new SwitchPoint[] { sp });
        invalidations += count;
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:7,代码来源:GlobalConstants.java


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