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

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

?? nativearray.java

?? 主要的怎么樣結合java 和 javascript!
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
                Object[] e = getIds(); // will only find in object itself                for (int i=0; i < e.length; i++) {                    Object id = e[i];                    if (id instanceof String) {                        // > MAXINT will appear as string                        String strId = (String)id;                        long index = toArrayIndex(strId);                        if (index >= longVal)                            delete(strId);                    } else {                        int index = ((Integer)id).intValue();                        if (index >= longVal)                            delete(index);                    }                }            } else {                // assume a dense representation                for (long i = longVal; i < length; i++) {                    deleteElem(this, i);                }            }        }        length = longVal;    }    /* Support for generic Array-ish objects.  Most of the Array     * functions try to be generic; anything that has a length     * property is assumed to be an array.     * getLengthProperty returns 0 if obj does not have the length property     * or its value is not convertible to a number.     */    static long getLengthProperty(Context cx, Scriptable obj) {        // These will both give numeric lengths within Uint32 range.        if (obj instanceof NativeString) {            return ((NativeString)obj).getLength();        } else if (obj instanceof NativeArray) {            return ((NativeArray)obj).getLength();        } else if (!(obj instanceof Scriptable)) {            return 0;        }        return ScriptRuntime.toUint32(            ScriptRuntime.getObjectProp(obj, "length", cx));    }    private static Object setLengthProperty(Context cx, Scriptable target,                                            long length)    {        return ScriptRuntime.setObjectProp(                   target, "length", ScriptRuntime.wrapNumber(length), cx);    }    /* Utility functions to encapsulate index > Integer.MAX_VALUE     * handling.  Also avoids unnecessary object creation that would     * be necessary to use the general ScriptRuntime.get/setElem     * functions... though this is probably premature optimization.     */    private static void deleteElem(Scriptable target, long index) {        int i = (int)index;        if (i == index) { target.delete(i); }        else { target.delete(Long.toString(index)); }    }    private static Object getElem(Context cx, Scriptable target, long index)    {        if (index > Integer.MAX_VALUE) {            String id = Long.toString(index);            return ScriptRuntime.getObjectProp(target, id, cx);        } else {            return ScriptRuntime.getObjectIndex(target, (int)index, cx);        }    }    private static void setElem(Context cx, Scriptable target, long index,                                Object value)    {        if (index > Integer.MAX_VALUE) {            String id = Long.toString(index);            ScriptRuntime.setObjectProp(target, id, value, cx);        } else {            ScriptRuntime.setObjectIndex(target, (int)index, value, cx);        }    }    private static String toStringHelper(Context cx, Scriptable scope,                                         Scriptable thisObj,                                         boolean toSource, boolean toLocale)    {        /* It's probably redundant to handle long lengths in this         * function; StringBuffers are limited to 2^31 in java.         */        long length = getLengthProperty(cx, thisObj);        StringBuffer result = new StringBuffer(256);        // whether to return '4,unquoted,5' or '[4, "quoted", 5]'        String separator;        if (toSource) {            result.append('[');            separator = ", ";        } else {            separator = ",";        }        boolean haslast = false;        long i = 0;        boolean toplevel, iterating;        if (cx.iterating == null) {            toplevel = true;            iterating = false;            cx.iterating = new ObjToIntMap(31);        } else {            toplevel = false;            iterating = cx.iterating.has(thisObj);        }        // Make sure cx.iterating is set to null when done        // so we don't leak memory        try {            if (!iterating) {                cx.iterating.put(thisObj, 0); // stop recursion.                for (i = 0; i < length; i++) {                    if (i > 0) result.append(separator);                    Object elem = getElem(cx, thisObj, i);                    if (elem == null || elem == Undefined.instance) {                        haslast = false;                        continue;                    }                    haslast = true;                    if (toSource) {                        result.append(ScriptRuntime.uneval(cx, scope, elem));                    } else if (elem instanceof String) {                        String s = (String)elem;                        if (toSource) {                            result.append('\"');                            result.append(ScriptRuntime.escapeString(s));                            result.append('\"');                        } else {                            result.append(s);                        }                    } else {                        if (toLocale && elem != Undefined.instance &&                            elem != null)                        {                            Callable fun;                            Scriptable funThis;                            fun = ScriptRuntime.getPropFunctionAndThis(                                      elem, "toLocaleString", cx);                            funThis = ScriptRuntime.lastStoredScriptable(cx);                            elem = fun.call(cx, scope, funThis,                                            ScriptRuntime.emptyArgs);                        }                        result.append(ScriptRuntime.toString(elem));                    }                }            }        } finally {            if (toplevel) {                cx.iterating = null;            }        }        if (toSource) {            //for [,,].length behavior; we want toString to be symmetric.            if (!haslast && i > 0)                result.append(", ]");            else                result.append(']');        }        return result.toString();    }    /**     * See ECMA 15.4.4.3     */    private static String js_join(Context cx, Scriptable thisObj,                                  Object[] args)    {        String separator;        long llength = getLengthProperty(cx, thisObj);        int length = (int)llength;        if (llength != length) {            throw Context.reportRuntimeError1(                "msg.arraylength.too.big", String.valueOf(llength));        }        // if no args, use "," as separator        if (args.length < 1 || args[0] == Undefined.instance) {            separator = ",";        } else {            separator = ScriptRuntime.toString(args[0]);        }        if (length == 0) {            return "";        }        String[] buf = new String[length];        int total_size = 0;        for (int i = 0; i != length; i++) {            Object temp = getElem(cx, thisObj, i);            if (temp != null && temp != Undefined.instance) {                String str = ScriptRuntime.toString(temp);                total_size += str.length();                buf[i] = str;            }        }        total_size += (length - 1) * separator.length();        StringBuffer sb = new StringBuffer(total_size);        for (int i = 0; i != length; i++) {            if (i != 0) {                sb.append(separator);            }            String str = buf[i];            if (str != null) {                // str == null for undefined or null                sb.append(str);            }        }        return sb.toString();    }    /**     * See ECMA 15.4.4.4     */    private static Scriptable js_reverse(Context cx, Scriptable thisObj,                                         Object[] args)    {        long len = getLengthProperty(cx, thisObj);        long half = len / 2;        for(long i=0; i < half; i++) {            long j = len - i - 1;            Object temp1 = getElem(cx, thisObj, i);            Object temp2 = getElem(cx, thisObj, j);            setElem(cx, thisObj, i, temp2);            setElem(cx, thisObj, j, temp1);        }        return thisObj;    }    /**     * See ECMA 15.4.4.5     */    private static Scriptable js_sort(Context cx, Scriptable scope,                                      Scriptable thisObj, Object[] args)    {        long length = getLengthProperty(cx, thisObj);        if (length <= 1) { return thisObj; }        Object compare;        Object[] cmpBuf;        if (args.length > 0 && Undefined.instance != args[0]) {            // sort with given compare function            compare = args[0];            cmpBuf = new Object[2]; // Buffer for cmp arguments        } else {            // sort with default compare            compare = null;            cmpBuf = null;        }        // Should we use the extended sort function, or the faster one?        if (length >= Integer.MAX_VALUE) {            heapsort_extended(cx, scope, thisObj, length, compare, cmpBuf);        }        else {            int ilength = (int)length;            // copy the JS array into a working array, so it can be            // sorted cheaply.            Object[] working = new Object[ilength];            for (int i = 0; i != ilength; ++i) {                working[i] = getElem(cx, thisObj, i);            }            heapsort(cx, scope, working, ilength, compare, cmpBuf);            // copy the working array back into thisObj            for (int i = 0; i != ilength; ++i) {                setElem(cx, thisObj, i, working[i]);            }        }        return thisObj;    }    // Return true only if x > y    private static boolean isBigger(Context cx, Scriptable scope,                                    Object x, Object y,                                    Object cmp, Object[] cmpBuf)    {        if (cmp == null) {            if (cmpBuf != null) Kit.codeBug();        } else {            if (cmpBuf == null || cmpBuf.length != 2) Kit.codeBug();        }        Object undef = Undefined.instance;        // sort undefined to end        if (undef == y) {            return false; // x can not be bigger then undef        } else if (undef == x) {            return true; // y != undef here, so x > y        }        if (cmp == null) {            // if no cmp function supplied, sort lexicographically            String a = ScriptRuntime.toString(x);            String b = ScriptRuntime.toString(y);            return a.compareTo(b) > 0;        }        else {            // assemble args and call supplied JS cmp function            cmpBuf[0] = x;            cmpBuf[1] = y;            Callable fun = ScriptRuntime.getValueFunctionAndThis(cmp, cx);            Scriptable funThis = ScriptRuntime.lastStoredScriptable(cx);            Object ret = fun.call(cx, scope, funThis, cmpBuf);            double d = ScriptRuntime.toNumber(ret);            // XXX what to do when cmp function returns NaN?  ECMA states            // that it's then not a 'consistent compararison function'... but            // then what do we do?  Back out and start over with the generic            // cmp function when we see a NaN?  Throw an error?            // for now, just ignore it:            return d > 0;        }    }/** Heapsort implementation. * See "Introduction to Algorithms" by Cormen, Leiserson, Rivest for details. * Adjusted for zero based indexes. */    private static void heapsort(Context cx, Scriptable scope,                                 Object[] array, int length,                                 Object cmp, Object[] cmpBuf)    {        if (length <= 1) Kit.codeBug();        // Build heap        for (int i = length / 2; i != 0;) {            --i;            Object pivot = array[i];            heapify(cx, scope, pivot, array, i, length, cmp, cmpBuf);        }        // Sort heap        for (int i = length; i != 1;) {            --i;            Object pivot = array[i];            array[i] = array[0];            heapify(cx, scope, pivot, array, 0, i, cmp, cmpBuf);        }    }/** pivot and child heaps of i should be made into heap starting at i, * original array[i] is never used to have less array access during sorting. */    private static void heapify(Context cx, Scriptable scope,                                Object pivot, Object[] array, int i, int end,                                Object cmp, Object[] cmpBuf)    {        for (;;) {            int child = i * 2 + 1;            if (child >= end) {                break;            }            Object childVal = array[child];            if (child + 1 < end) {                Object nextVal = array[child + 1];                if (isBigger(cx, scope, nextVal, childVal, cmp, cmpBuf)) {                    ++child; childVal = nextVal;                }            }            if (!isBigger(cx, scope, childVal, pivot, cmp, cmpBuf)) {                break;            }            array[i] = childVal;            i = child;        }        array[i] = pivot;    }/** Version of heapsort that call getElem/setElem on target to query/assign * array elements instead of Java array access */    private static void heapsort_extended(Context cx, Scriptable scope,                                          Scriptable target, long length,                                          Object cmp, Object[] cmpBuf)    {        if (length <= 1) Kit.codeBug();

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本sm残虐另类| 日韩一区日韩二区| 毛片一区二区三区| 日韩欧美激情在线| 美美哒免费高清在线观看视频一区二区| 欧美高清视频不卡网| 日本欧美久久久久免费播放网| 欧美视频在线播放| 日日摸夜夜添夜夜添亚洲女人| 欧美精品乱人伦久久久久久| 美女视频黄久久| 久久精品免费在线观看| 成人av午夜电影| 亚洲精品国久久99热| 欧美三级视频在线| 久久se这里有精品| 日韩美女久久久| 欧美日韩亚洲另类| 国产一区二区成人久久免费影院 | 成人三级伦理片| 亚洲老司机在线| 日韩精品一区在线| av在线播放成人| 日本不卡在线视频| 国产精品免费aⅴ片在线观看| 色av一区二区| 久久9热精品视频| 亚洲免费观看在线视频| 日韩一区二区免费在线观看| 国产成人超碰人人澡人人澡| 亚洲欧美日韩综合aⅴ视频| 欧美午夜影院一区| 黑人巨大精品欧美黑白配亚洲| 久久精品亚洲乱码伦伦中文| 99视频有精品| 日韩专区中文字幕一区二区| 欧美videossexotv100| 成人动漫av在线| 午夜影院在线观看欧美| 久久老女人爱爱| 国产成人精品免费视频网站| 亚洲天堂2014| 欧美一区二区三区系列电影| 极品美女销魂一区二区三区免费| 国产精品无码永久免费888| 在线观看国产精品网站| 精品一区二区综合| 亚洲天堂成人网| 精品久久久久久最新网址| 91农村精品一区二区在线| 免费看日韩a级影片| 亚洲欧美怡红院| 欧美成人一区二区三区片免费| 91在线观看地址| 激情偷乱视频一区二区三区| 久久久久亚洲蜜桃| 国产成人精品1024| 麻豆91小视频| 亚洲男人天堂av| 久久久久久久久久久黄色| 欧美三级日韩在线| 国产精品综合视频| 亚洲国产另类精品专区| 国产精品污网站| 2024国产精品| 欧美群妇大交群中文字幕| 成人精品在线视频观看| 麻豆成人av在线| 日本午夜一区二区| 一区二区免费在线| 亚洲国产高清不卡| 欧美成人精品3d动漫h| 欧美性猛交一区二区三区精品| 成人午夜碰碰视频| 精品亚洲porn| 三级欧美韩日大片在线看| 午夜精品福利一区二区三区av | 一区二区在线观看免费| 日韩欧美卡一卡二| 欧美男生操女生| 91成人在线精品| 91免费观看在线| 成人午夜av影视| 福利一区福利二区| 丰满少妇久久久久久久| 国产在线视频精品一区| 午夜伦欧美伦电影理论片| 亚洲日本韩国一区| 中文字幕日韩精品一区| 国产精品婷婷午夜在线观看| www亚洲一区| 国产亚洲一本大道中文在线| 久久夜色精品国产噜噜av| 日韩一区二区高清| 日韩视频一区二区三区在线播放| 7777精品久久久大香线蕉| 色综合中文字幕| 日本乱人伦一区| 欧美四级电影在线观看| 欧美日韩视频在线观看一区二区三区| 一本大道av伊人久久综合| 国产成人亚洲综合a∨婷婷图片 | 国产精品久久久久久久久果冻传媒| 26uuu色噜噜精品一区二区| 日韩精品一区二区三区在线| 欧美xxxxxxxxx| 久久久亚洲综合| 日本一区二区三区在线观看| 国产精品久久久久久久裸模| 日韩精品一区二区在线| 欧美国产一区二区在线观看| 亚洲视频一二区| 香蕉久久一区二区不卡无毒影院| 婷婷丁香久久五月婷婷| 日韩高清一级片| 精品一区二区三区日韩| 成人午夜在线播放| 在线观看视频一区二区欧美日韩| 欧美又粗又大又爽| 日韩欧美色综合网站| 亚洲国产精品成人综合色在线婷婷 | 欧美精品一区二区精品网| 国产性天天综合网| 亚洲欧洲美洲综合色网| 亚洲成人av在线电影| 亚洲精品中文字幕乱码三区| 午夜亚洲国产au精品一区二区| 欧美a一区二区| 成人一级黄色片| 欧美老年两性高潮| 久久视频一区二区| 成人免费在线视频观看| 天堂一区二区在线免费观看| 国产精品69毛片高清亚洲| 99r精品视频| 日韩一区二区三区在线| 亚洲欧洲一区二区在线播放| 一区二区激情视频| 国产在线精品不卡| 在线观看日韩高清av| 久久久久国产免费免费| 亚洲成人一区在线| 成人在线视频一区| 91精品国产综合久久久久久漫画| 欧美精品一区二区不卡| 午夜私人影院久久久久| 99riav久久精品riav| 精品国产凹凸成av人导航| 国产精品视频免费| 国产一区二区三区美女| 欧美午夜不卡视频| 欧美激情一区二区三区全黄| 日韩精品1区2区3区| 色婷婷国产精品综合在线观看| 日韩免费在线观看| 亚洲综合色丁香婷婷六月图片| 国产激情精品久久久第一区二区 | 国产一区二区三区香蕉| 欧美亚洲图片小说| 中文字幕免费不卡在线| 久久精品理论片| 日本韩国欧美三级| 国产精品久久久久久久久搜平片| 麻豆精品久久久| 91精品国产91久久久久久一区二区| 亚洲婷婷综合久久一本伊一区| 国产jizzjizz一区二区| 欧美videos大乳护士334| 日韩成人免费电影| 欧美日韩一级黄| 亚洲国产精品久久久男人的天堂| 成人av网站免费观看| 国产亚洲va综合人人澡精品| 国产成人在线看| 欧美精品久久99| 一片黄亚洲嫩模| 欧美性猛交xxxxxxxx| 一区二区三区视频在线看| 国模一区二区三区白浆| 日韩精品一区二区三区蜜臀| 爽好久久久欧美精品| 欧美精品日日鲁夜夜添| 天天av天天翘天天综合网| 97久久精品人人澡人人爽| 日韩欧美在线123| 午夜a成v人精品| 欧美一级二级在线观看| 蜜臀91精品一区二区三区| 555www色欧美视频| 日本视频在线一区| 精品日韩成人av| 国产99久久久国产精品潘金| 欧美精品一区二区三区蜜桃视频| 久久9热精品视频| 欧美一级片在线观看| 精品午夜一区二区三区在线观看 | www.激情成人| 亚洲卡通欧美制服中文| 色香蕉成人二区免费| 亚洲成人1区2区|