亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? relativestep.java

?? A framework written in Java for implementing high-level and dynamic languages, compiling them into J
?? JAVA
字號:
// Copyright (c) 2003  Per M.A. Bothner.// This is free software;  for terms and warranty disclaimer see ./COPYING.package gnu.xquery.util;import gnu.lists.*;import gnu.mapping.*;import gnu.bytecode.*;import gnu.expr.*;import gnu.kawa.xml.*;import gnu.math.IntNum;import gnu.kawa.functions.*;import gnu.kawa.reflect.OccurrenceType;/** Implements XPath path expression. * The XPath expression E1/E2 is compiled into: * (relative-step E1 (lambda (dot position last) E2)). */public class RelativeStep extends MethodProc implements CanInline, Inlineable{  public static final RelativeStep relativeStep = new RelativeStep();  public int numArgs() { return 0x2002; }  public void apply (CallContext ctx) throws Throwable  {    Object arg = ctx.getNextArg();    Object next = ctx.getNextArg();    Procedure proc = (Procedure) next;    Consumer out = ctx.consumer;    IntNum countObj;    Nodes values;    if (arg instanceof Nodes)      values = (Nodes) arg;    else      {	values = new Nodes();	Values.writeValues(arg, values);      }    int count = values.size();    int it = 0;    countObj = IntNum.make(count);    RelativeStepFilter filter = new RelativeStepFilter(out);    for (int pos = 1; pos <= count; pos++)      {	it = values.nextPos(it);	Object dot = values.getPosPrevious(it);	proc.check3(dot, IntNum.make(pos), countObj, ctx);        Values.writeValues(ctx.runUntilValue(), filter);      }    filter.finish();  }  public Expression inline (ApplyExp exp, ExpWalker walker)  {    Expression[] args = exp.getArgs();    Expression exp1 = args[0];    Expression exp2 = args[1];    LambdaExp lexp2;    Compilation comp = walker.getCompilation();    if (! (exp2 instanceof LambdaExp)        // The following optimization breaks when interpreting, because        // then CoerceToNodes may not work.        || ! comp.mustCompile	|| (lexp2 = (LambdaExp) exp2).min_args != 3	|| lexp2.max_args != 3)      return exp;    lexp2.setInlineOnly(true);    lexp2.returnContinuation = exp;    exp2 = lexp2.body;    Declaration dotArg = lexp2.firstDecl();    Declaration posArg = dotArg.nextDecl();    Declaration lastArg = posArg.nextDecl();    // Splice out the "last" argument - we'll move it out.    // The remaining two arguments are suitable for a ValuesMap.    posArg.setNext(lastArg.nextDecl());    lastArg.setNext(null);    lexp2.min_args = 2;    lexp2.max_args = 2;    Type type1 = exp1.getType();    if (type1 != null &&NodeType.anyNodeTest.compare(type1) == -3)      {        Language language = walker.getCompilation().getLanguage();        String message = "step input is "+language.formatType(type1)+" - not a node sequence";        walker.getMessages().error('e', message);        return new ErrorExp(message);      }          Type rtype = exp.getTypeRaw();    Type rtypePrime;    int nodeCompare;    if (rtype == null || rtype == Type.pointer_type)      {        Type type2 = exp2.getType();        rtypePrime = OccurrenceType.itemPrimeType(type2);        nodeCompare = NodeType.anyNodeTest.compare(rtypePrime);        if (nodeCompare >= 0)          rtype = NodeSetType.getInstance(rtypePrime);        else          rtype = OccurrenceType.getInstance(rtypePrime, 0, -1);        exp.setType(rtype);      }    if (lastArg.getCanRead())      {        ClassType typeNodes = CoerceNodes.typeNodes;        comp.letStart();        Declaration sequence          = comp.letVariable(null, typeNodes,                             new ApplyExp(CoerceNodes.coerceNodes,                                          new Expression [] { exp1 }));        comp.letEnter();        Method sizeMethod = typeNodes.getDeclaredMethod("size", 0);        Expression lastInit          =  new ApplyExp(sizeMethod,                          new Expression[] {new ReferenceExp(sequence)});        LetExp lastLet = new LetExp(new Expression[] { lastInit });        lastLet.addDeclaration(lastArg);        lastLet.body = new ApplyExp(exp.getFunction(),                                    new Expression[] { new ReferenceExp(sequence),                                                       lexp2 });        return comp.letDone(lastLet);      }    ApplyExp result = exp;    // Try to rewrite A/B[P] to (A/B)[P].    // This only works if P doesn't depend in position() or last().    if (exp2 instanceof ApplyExp)      {        ApplyExp aexp2 = (ApplyExp) exp2;        Object proc2 = aexp2.getFunction().valueIfConstant();        Expression vexp2;        if (proc2 instanceof ValuesFilter            && (vexp2 = aexp2.getArgs()[1]) instanceof LambdaExp)          {            LambdaExp lvexp2 = (LambdaExp) vexp2;            Declaration dot2 = lvexp2.firstDecl();            Declaration pos2;            if (dot2 != null && (pos2 = dot2.nextDecl()) != null                && pos2.nextDecl() == null                && ! pos2.getCanRead()                // If the predicate can evaluate to a number, then the                // optimization is unsafe, since we implicitly                // compare against position().                && ClassType.make("java.lang.Number").compare(lvexp2.body.getType()) == -3)              {                exp2 = aexp2.getArg(0);                lexp2.body = exp2;                aexp2.setArg(0, exp);                result = aexp2;              }          }      }    // Now we can rewrite 'descendant-or-self::node()/B' (which is the    // expansion of the abbreviated syntax '//B') to /descdendant::B'.    if (exp1 instanceof ApplyExp && exp2 instanceof ApplyExp)      {        ApplyExp aexp1 = (ApplyExp) exp1;        ApplyExp aexp2 = (ApplyExp) exp2;        Object p1 = aexp1.getFunction().valueIfConstant();        Object p2 = aexp2.getFunction().valueIfConstant();        Expression exp12;        if (p1 == relativeStep && p2 instanceof ChildAxis            && aexp1.getArgCount() == 2            && (exp12 = aexp1.getArg(1)) instanceof LambdaExp)          {            LambdaExp lexp12 = (LambdaExp) exp12;            ApplyExp aexp12;            if (lexp12.body instanceof ApplyExp                && (aexp12 = (ApplyExp) lexp12.body).getFunction().valueIfConstant() == DescendantOrSelfAxis.anyNode)              {                exp.setArg(0, aexp1.getArg(0));                aexp2.setFunction(new QuoteExp(DescendantAxis.make(((ChildAxis) p2).getNodePredicate())));              }          }      }        return result;  }  public void compile (ApplyExp exp, Compilation comp, Target target)  {    Expression[] args = exp.getArgs();    Expression exp1 = args[0];    Expression exp2 = args[1];    if (target instanceof IgnoreTarget)      {        exp1.compile(comp, target);        exp2.compile(comp, target);        return;      }    Type rtype = exp.getTypeRaw();    if (rtype == null) // should never happen      rtype = Type.pointer_type;    Type rtypePrime = OccurrenceType.itemPrimeType(rtype);    int nodeCompare = NodeType.anyNodeTest.compare(rtypePrime);    // 'A' - atomic; 'N' - nodes; 'S' - pre-sorted nodes; ' ' - unknown.    char expectedKind;    if (nodeCompare >= 0)      expectedKind = 'N';    else if (nodeCompare == -3)      expectedKind = 'A';    else      expectedKind = ' ';    TreeScanner step = extractStep(exp2);    if (step != null)      {        Type type1 = exp1.getType();        if (step instanceof ChildAxis            || step instanceof AttributeAxis            || step instanceof SelfAxis)          {            if (type1 instanceof NodeSetType                || (expectedKind == 'N'                    && OccurrenceType.itemCountIsZeroOrOne(exp1.getType())))              expectedKind = 'S';            /*            // It's presumably more efficient to sort the argument            // nodes rather than the result nodes.  FIXME            else              {                exp1 = SortNodes(exp1);                expectedKind = 'S';              }            */          }      }    if (! (target instanceof ConsumerTarget           || (target instanceof SeriesTarget               && (expectedKind == 'A' || expectedKind == 'S'))))      {	ConsumerTarget.compileUsingConsumer(exp, comp, target);	return;      }    CodeAttr code = comp.getCode();    Target mtarget;    Scope scope = code.pushScope();    Variable mconsumer;    Variable tconsumer;    ClassType mclass;    if (expectedKind == 'A' || expectedKind == 'S')      {        mtarget = target;        mclass = null;        mconsumer = null;        tconsumer = null;      }    else      {        // We need a helper consumer.        Method initMethod;        if (expectedKind == 'N')          {            mclass = ClassType.make("gnu.kawa.xml.SortedNodes");            initMethod = mclass.getDeclaredMethod("<init>", 0);          }        else          {            mclass = ClassType.make("gnu.xquery.util.RelativeStepFilter");            initMethod = mclass.getDeclaredMethod("<init>", 1);          }        mconsumer = scope.addVariable(code, mclass, null);        mtarget = new ConsumerTarget(mconsumer);        code.emitNew(mclass);        code.emitDup(mclass);        tconsumer = ((ConsumerTarget) target).getConsumerVariable();        if (expectedKind != 'N')          code.emitLoad(tconsumer);        code.emitInvoke(initMethod);        code.emitStore(mconsumer);           }    ValuesMap.compileInlined((LambdaExp) exp2, exp1, 1, null, comp, mtarget);    // Now finish up from the helper consumer.    if (expectedKind == 'N')      {        code.emitLoad(mconsumer);        code.emitLoad(tconsumer);        code.emitInvokeStatic(Compilation.typeValues                              .getDeclaredMethod("writeValues", 2));      }    else if (expectedKind == ' ')      {        code.emitLoad(mconsumer);        code.emitInvoke(mclass.getDeclaredMethod("finish", 0));      }    code.popScope();  }  public Type getReturnType (Expression[] args)  {    // Needlessly convervative, but it shouldn't matter, since this    // shouldn't be called if the ApplyExp.setType has been done.    return Type.pointer_type;  }  public static TreeScanner extractStep (Expression exp)  {    for (;;)      {        if (! (exp instanceof ApplyExp))          return null;        ApplyExp aexp = (ApplyExp) exp;        Expression func = aexp.getFunction();        if (func instanceof QuoteExp)          {            Object value = ((QuoteExp) func).getValue();            if (value instanceof TreeScanner)              return (TreeScanner) value;            // This doesn't work, if we've already inlined ValuesFilter. FIXME            if (value instanceof ValuesFilter)              {                exp = aexp.getArgs()[0];                continue;              }          }        return null;      }  }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩国产免费一区二区| 国产乱妇无码大片在线观看| 制服.丝袜.亚洲.中文.综合| 成人动漫在线一区| 精品一区二区精品| 秋霞影院一区二区| 午夜精品国产更新| 尤物视频一区二区| 制服丝袜亚洲播放| 日韩一区二区三区免费观看| 在线精品视频一区二区| 岛国精品一区二区| 国产一区二区主播在线| 国内精品伊人久久久久av影院| 亚洲久草在线视频| 亚洲精品乱码久久久久久黑人| 中文字幕在线观看一区| 亚洲国产精品av| 国产精品无码永久免费888| 337p粉嫩大胆噜噜噜噜噜91av| 欧美二区乱c少妇| 欧美高清dvd| 精品久久人人做人人爰| 日韩精品一区二区三区四区视频| 欧美精品aⅴ在线视频| 日韩一区二区视频| 欧美一区二区女人| 精品国产青草久久久久福利| 久久久精品国产99久久精品芒果 | 老鸭窝一区二区久久精品| 日韩福利视频导航| 国产一区在线不卡| 成人性色生活片免费看爆迷你毛片| 同产精品九九九| 日本亚洲免费观看| 国产激情视频一区二区三区欧美| 国产a区久久久| 在线亚洲免费视频| 宅男噜噜噜66一区二区66| 久久尤物电影视频在线观看| 久久久久久久精| 亚洲蜜臀av乱码久久精品蜜桃| 一区二区三区高清不卡| 美女精品一区二区| 成人美女视频在线看| 精品污污网站免费看| 精品1区2区在线观看| 一区二区三区日韩精品| 亚洲va欧美va人人爽| 卡一卡二国产精品| 国产精品一区免费视频| 制服丝袜在线91| 国产精品水嫩水嫩| 日韩av一区二区在线影视| 国产成人亚洲精品青草天美| 91福利在线免费观看| 欧美精品一区二区不卡| 亚洲色图清纯唯美| 免费日本视频一区| 91老师片黄在线观看| 欧美成人a在线| 亚洲国产日韩在线一区模特| 国产一区二区三区四| 在线视频中文字幕一区二区| 精品电影一区二区三区| 国产精品乱码妇女bbbb| 日韩国产一二三区| 一本大道av一区二区在线播放| 91精品在线麻豆| 国产精品久久网站| 亚洲香肠在线观看| 97久久超碰国产精品| 欧美va亚洲va香蕉在线| 日韩1区2区日韩1区2区| 欧美性三三影院| 亚洲免费观看高清完整版在线观看| 韩日av一区二区| 日韩欧美精品三级| 亚洲精品乱码久久久久久日本蜜臀| 麻豆一区二区在线| 欧美另类变人与禽xxxxx| 一区二区三区欧美在线观看| 北条麻妃国产九九精品视频| 久久综合给合久久狠狠狠97色69| 三级久久三级久久久| 在线观看亚洲精品视频| 亚洲男人天堂av网| 91国产成人在线| 亚洲一区二区欧美| 欧美中文字幕不卡| 亚洲第一二三四区| 欧美日韩精品欧美日韩精品一 | 成人sese在线| 国产三级久久久| 国产成人综合在线播放| 日韩女优制服丝袜电影| 美国十次综合导航| 精品国产91九色蝌蚪| 久久精品国产精品亚洲精品| 日韩视频在线一区二区| 麻豆一区二区三| 久久久精品影视| 91香蕉视频在线| 伊人性伊人情综合网| 欧美日韩国产一区| 另类欧美日韩国产在线| 日韩三级在线观看| 国产一区二区免费看| 国产精品国产三级国产aⅴ无密码| 欧美亚洲国产一区二区三区| 一区二区三区四区乱视频| 欧美日韩一区二区欧美激情| 视频一区视频二区中文| 欧美不卡一区二区三区四区| 国产成人啪午夜精品网站男同| 国产精品色婷婷| 欧美主播一区二区三区美女| 日韩一区欧美二区| 中文久久乱码一区二区| 亚洲欧美福利一区二区| 欧美亚洲图片小说| 国产成人av影院| 五月天丁香久久| 国产精品福利一区| 精品国产制服丝袜高跟| 欧美日韩午夜在线| 99久久久国产精品| 精彩视频一区二区三区| 天堂在线亚洲视频| 亚洲免费在线播放| 国产精品久久久久一区二区三区| 欧美一区三区二区| 欧美日韩小视频| 在线看国产一区| 色综合一区二区三区| 国产精品一区二区久激情瑜伽| 天天综合色天天综合| 亚洲丝袜精品丝袜在线| 国产欧美久久久精品影院| 欧美成人三级电影在线| 7777精品伊人久久久大香线蕉经典版下载| av亚洲精华国产精华精| 国产伦精品一区二区三区在线观看| 日韩av中文字幕一区二区| 亚洲一区二区视频| 玉米视频成人免费看| 最新欧美精品一区二区三区| 国产欧美精品一区aⅴ影院| 26uuu色噜噜精品一区二区| 欧美一区二区播放| 欧美一区二区三区免费在线看 | 日韩久久久精品| 制服.丝袜.亚洲.中文.综合| 欧美日韩视频一区二区| 在线播放国产精品二区一二区四区 | 国产精品久久久久久久久久久免费看 | 欧美在线free| 欧美亚洲一区二区在线| 欧美肥大bbwbbw高潮| 欧美一区二区在线免费观看| 欧美精品亚洲二区| 日韩一区二区中文字幕| 精品欧美黑人一区二区三区| 久久综合久色欧美综合狠狠| 久久综合九色综合97婷婷女人| 国产亚洲精品超碰| 亚洲天堂福利av| 亚洲成人午夜电影| 久久精品国产亚洲5555| 国产精品99久久久久久似苏梦涵| 成人av网址在线| 在线免费观看日本欧美| 制服丝袜亚洲网站| 欧美国产一区在线| 亚洲自拍偷拍欧美| 日韩av中文字幕一区二区| 国产在线精品一区二区夜色| 不卡av免费在线观看| 欧美性videosxxxxx| 2021中文字幕一区亚洲| 夜夜嗨av一区二区三区四季av | 日韩一区二区免费在线电影 | 99久久婷婷国产精品综合| 欧美日韩一区精品| wwwwww.欧美系列| 一区二区三区波多野结衣在线观看 | 欧美一区二区三区色| 亚洲国产精华液网站w| 爽好多水快深点欧美视频| 国产一区二区三区四区在线观看| 不卡的电视剧免费网站有什么| 欧美精品vⅰdeose4hd| 国产精品福利影院| 喷水一区二区三区| 色婷婷亚洲精品| 国产日韩成人精品| 爽好久久久欧美精品| 91影视在线播放| 国产女同互慰高潮91漫画| 日韩中文字幕一区二区三区|