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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? nativearray.java

?? 主要的怎么樣結(jié)合java 和 javascript!
?? JAVA
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * The contents of this file are subject to the Netscape Public * License Version 1.1 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.mozilla.org/NPL/ * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * The Original Code is Rhino code, released * May 6, 1999. * * The Initial Developer of the Original Code is Netscape * Communications Corporation.  Portions created by Netscape are * Copyright (C) 1997-1999 Netscape Communications Corporation. All * Rights Reserved. * * Contributor(s): * Norris Boyd * Mike McCabe * Igor Bukanov * * Alternatively, the contents of this file may be used under the * terms of the GNU Public License (the "GPL"), in which case the * provisions of the GPL are applicable instead of those above. * If you wish to allow use of your version of this file only * under the terms of the GPL and not to allow others to use your * version of this file under the NPL, indicate your decision by * deleting the provisions above and replace them with the notice * and other provisions required by the GPL.  If you do not delete * the provisions above, a recipient may use your version of this * file under either the NPL or the GPL. */package org.mozilla.javascript;/** * This class implements the Array native object. * @author Norris Boyd * @author Mike McCabe */public class NativeArray extends IdScriptableObject{    static final long serialVersionUID = 7331366857676127338L;    /*     * Optimization possibilities and open issues:     * - Long vs. double schizophrenia.  I suspect it might be better     * to use double throughout.     * - Most array operations go through getElem or setElem (defined     * in this file) to handle the full 2^32 range; it might be faster     * to have versions of most of the loops in this file for the     * (infinitely more common) case of indices < 2^31.     * - Functions that need a new Array call "new Array" in the     * current scope rather than using a hardwired constructor;     * "Array" could be redefined.  It turns out that js calls the     * equivalent of "new Array" in the current scope, except that it     * always gets at least an object back, even when Array == null.     */    private static final Object ARRAY_TAG = new Object();    static void init(Scriptable scope, boolean sealed)    {        NativeArray obj = new NativeArray();        obj.exportAsJSClass(MAX_PROTOTYPE_ID, scope, sealed);    }    /**     * Zero-parameter constructor: just used to create Array.prototype     */    private NativeArray()    {        dense = null;        this.length = 0;    }    public NativeArray(long length)    {        int intLength = (int) length;        if (intLength == length && intLength > 0) {            if (intLength > maximumDenseLength)                intLength = maximumDenseLength;            dense = new Object[intLength];            for (int i=0; i < intLength; i++)                dense[i] = NOT_FOUND;        }        this.length = length;    }    public NativeArray(Object[] array)    {        dense = array;        this.length = array.length;    }    public String getClassName()    {        return "Array";    }    private static final int        Id_length        =  1,        MAX_INSTANCE_ID  =  1;    protected int getMaxInstanceId()    {        return MAX_INSTANCE_ID;    }    protected int findInstanceIdInfo(String s)    {        if (s.equals("length")) {            return instanceIdInfo(DONTENUM | PERMANENT, Id_length);        }        return super.findInstanceIdInfo(s);    }    protected String getInstanceIdName(int id)    {        if (id == Id_length) { return "length"; }        return super.getInstanceIdName(id);    }    protected Object getInstanceIdValue(int id)    {        if (id == Id_length) {            return ScriptRuntime.wrapNumber(length);        }        return super.getInstanceIdValue(id);    }    protected void setInstanceIdValue(int id, Object value)    {        if (id == Id_length) {            setLength(value); return;        }        super.setInstanceIdValue(id, value);    }    protected void initPrototypeId(int id)    {        String s;        int arity;        switch (id) {          case Id_constructor:    arity=1; s="constructor";    break;          case Id_toString:       arity=0; s="toString";       break;          case Id_toLocaleString: arity=1; s="toLocaleString"; break;          case Id_toSource:       arity=0; s="toSource";       break;          case Id_join:           arity=1; s="join";           break;          case Id_reverse:        arity=0; s="reverse";        break;          case Id_sort:           arity=1; s="sort";           break;          case Id_push:           arity=1; s="push";           break;          case Id_pop:            arity=1; s="pop";            break;          case Id_shift:          arity=1; s="shift";          break;          case Id_unshift:        arity=1; s="unshift";        break;          case Id_splice:         arity=1; s="splice";         break;          case Id_concat:         arity=1; s="concat";         break;          case Id_slice:          arity=1; s="slice";          break;          default: throw new IllegalArgumentException(String.valueOf(id));        }        initPrototypeMethod(ARRAY_TAG, id, s, arity);    }    public Object execIdCall(IdFunctionObject f, Context cx, Scriptable scope,                             Scriptable thisObj, Object[] args)    {        if (!f.hasTag(ARRAY_TAG)) {            return super.execIdCall(f, cx, scope, thisObj, args);        }        int id = f.methodId();        switch (id) {          case Id_constructor: {            boolean inNewExpr = (thisObj == null);            if (!inNewExpr) {                // IdFunctionObject.construct will set up parent, proto                return f.construct(cx, scope, args);            }            return jsConstructor(cx, scope, args);          }          case Id_toString:            return toStringHelper(cx, scope, thisObj,                cx.hasFeature(Context.FEATURE_TO_STRING_AS_SOURCE), false);          case Id_toLocaleString:            return toStringHelper(cx, scope, thisObj, false, true);          case Id_toSource:            return toStringHelper(cx, scope, thisObj, true, false);          case Id_join:            return js_join(cx, thisObj, args);          case Id_reverse:            return js_reverse(cx, thisObj, args);          case Id_sort:            return js_sort(cx, scope, thisObj, args);          case Id_push:            return js_push(cx, thisObj, args);          case Id_pop:            return js_pop(cx, thisObj, args);          case Id_shift:            return js_shift(cx, thisObj, args);          case Id_unshift:            return js_unshift(cx, thisObj, args);          case Id_splice:            return js_splice(cx, scope, thisObj, args);          case Id_concat:            return js_concat(cx, scope, thisObj, args);          case Id_slice:            return js_slice(cx, thisObj, args);        }        throw new IllegalArgumentException(String.valueOf(id));    }    public Object get(int index, Scriptable start)    {        if (dense != null && 0 <= index && index < dense.length)            return dense[index];        return super.get(index, start);    }    public boolean has(int index, Scriptable start)    {        if (dense != null && 0 <= index && index < dense.length)            return dense[index] != NOT_FOUND;        return super.has(index, start);    }    // if id is an array index (ECMA 15.4.0), return the number,    // otherwise return -1L    private static long toArrayIndex(String id)    {        double d = ScriptRuntime.toNumber(id);        if (d == d) {            long index = ScriptRuntime.toUint32(d);            if (index == d && index != 4294967295L) {                // Assume that ScriptRuntime.toString(index) is the same                // as java.lang.Long.toString(index) for long                if (Long.toString(index).equals(id)) {                    return index;                }            }        }        return -1;    }    public void put(String id, Scriptable start, Object value)    {        super.put(id, start, value);        if (start == this) {            // If the object is sealed, super will throw exception            long index = toArrayIndex(id);            if (index >= length) {                length = index + 1;            }        }    }    public void put(int index, Scriptable start, Object value)    {        if (start == this && !isSealed()            && dense != null && 0 <= index && index < dense.length)        {            // If start == this && sealed, super will throw exception            dense[index] = value;        } else {            super.put(index, start, value);        }        if (start == this) {            // only set the array length if given an array index (ECMA 15.4.0)            if (this.length <= index) {                // avoid overflowing index!                this.length = (long)index + 1;            }        }    }    public void delete(int index)    {        if (!isSealed()            && dense != null && 0 <= index && index < dense.length)        {            dense[index] = NOT_FOUND;        } else {            super.delete(index);        }    }    public Object[] getIds()    {        Object[] superIds = super.getIds();        if (dense == null) { return superIds; }        int N = dense.length;        long currentLength = length;        if (N > currentLength) {            N = (int)currentLength;        }        if (N == 0) { return superIds; }        int superLength = superIds.length;        Object[] ids = new Object[N + superLength];        // Make a copy of dense to be immune to removing        // of array elems from other thread when calculating presentCount        System.arraycopy(dense, 0, ids, 0, N);        int presentCount = 0;        for (int i = 0; i != N; ++i) {            // Replace existing elements by their indexes            if (ids[i] != NOT_FOUND) {                ids[presentCount] = new Integer(i);                ++presentCount;            }        }        if (presentCount != N) {            // dense contains deleted elems, need to shrink the result            Object[] tmp = new Object[presentCount + superLength];            System.arraycopy(ids, 0, tmp, 0, presentCount);            ids = tmp;        }        System.arraycopy(superIds, 0, ids, presentCount, superLength);        return ids;    }    public Object getDefaultValue(Class hint)    {        if (hint == ScriptRuntime.NumberClass) {            Context cx = Context.getContext();            if (cx.getLanguageVersion() == Context.VERSION_1_2)                return new Long(length);        }        return super.getDefaultValue(hint);    }    /**     * See ECMA 15.4.1,2     */    private static Object jsConstructor(Context cx, Scriptable scope,                                        Object[] args)    {        if (args.length == 0)            return new NativeArray();        // Only use 1 arg as first element for version 1.2; for        // any other version (including 1.3) follow ECMA and use it as        // a length.        if (cx.getLanguageVersion() == Context.VERSION_1_2) {            return new NativeArray(args);        } else {            Object arg0 = args[0];            if (args.length > 1 || !(arg0 instanceof Number)) {                return new NativeArray(args);            } else {                long len = ScriptRuntime.toUint32(arg0);                if (len != ((Number)arg0).doubleValue())                    throw Context.reportRuntimeError0("msg.arraylength.bad");                return new NativeArray(len);            }        }    }    public long getLength() {        return length;    }    /** @deprecated Use {@link #getLength()} instead. */    public long jsGet_length() {        return getLength();    }    private void setLength(Object val) {        /* XXX do we satisfy this?         * 15.4.5.1 [[Put]](P, V):         * 1. Call the [[CanPut]] method of A with name P.         * 2. If Result(1) is false, return.         * ?         */        double d = ScriptRuntime.toNumber(val);        long longVal = ScriptRuntime.toUint32(d);        if (longVal != d)            throw Context.reportRuntimeError0("msg.arraylength.bad");        if (longVal < length) {            // remove all properties between longVal and length            if (length - longVal > 0x1000) {                // assume that the representation is sparse

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91蜜桃传媒精品久久久一区二区| 久久综合色天天久久综合图片| 成人免费视频视频在线观看免费 | 国产成a人亚洲| 韩国精品主播一区二区在线观看| 美女精品一区二区| 免费看日韩a级影片| 青青草国产精品亚洲专区无| 蜜桃av一区二区| 蜜桃久久久久久| 九九精品一区二区| 国产尤物一区二区| 国产成人精品亚洲日本在线桃色| 国产一区二区三区免费播放 | 日本高清不卡视频| 91高清在线观看| 欧美色视频一区| 日韩一区二区在线播放| 日韩欧美久久一区| 久久久高清一区二区三区| 国产日韩欧美综合一区| 中文字幕乱码亚洲精品一区| 亚洲免费在线看| 亚洲动漫第一页| 免费成人在线网站| 国产成人鲁色资源国产91色综| 成人h版在线观看| 欧美自拍偷拍一区| 欧美一区二区视频免费观看| 久久女同性恋中文字幕| 亚洲人一二三区| 午夜欧美在线一二页| 久久er精品视频| 春色校园综合激情亚洲| 在线观看日韩国产| 欧美成人a∨高清免费观看| 国产精品网站在线观看| 亚洲午夜国产一区99re久久| 麻豆国产91在线播放| 成人免费毛片嘿嘿连载视频| 欧美在线观看18| 久久婷婷国产综合国色天香 | 国产一区二区三区高清播放| av激情综合网| 884aa四虎影成人精品一区| 国产女同互慰高潮91漫画| 一区二区三区自拍| 精品无人码麻豆乱码1区2区| 91丨porny丨首页| 日韩欧美不卡在线观看视频| 中文字幕日韩欧美一区二区三区| 视频在线观看一区二区三区| 国产成人免费视频一区| 欧美精品少妇一区二区三区| 久久精品一二三| 性做久久久久久免费观看欧美| 国产精品亚洲午夜一区二区三区| 一本大道久久a久久综合婷婷| 精品免费99久久| 玉米视频成人免费看| 国产精品资源在线观看| 欧美日韩一区精品| 国产精品午夜电影| 蜜桃av一区二区三区| 日本福利一区二区| 欧美激情综合五月色丁香小说| 午夜精品一区二区三区免费视频 | 91在线观看免费视频| 精品国产一区二区三区忘忧草| 夜夜嗨av一区二区三区| 懂色av一区二区夜夜嗨| 欧美一级黄色片| 亚洲国产欧美一区二区三区丁香婷| 成人午夜在线视频| 欧美成va人片在线观看| 午夜久久久久久久久久一区二区| 成人av在线电影| 精品欧美久久久| 三级影片在线观看欧美日韩一区二区| 91在线小视频| 国产精品全国免费观看高清| 久久电影网电视剧免费观看| 91精品国产综合久久国产大片| 亚洲欧美日韩中文播放 | 欧美日韩中文字幕精品| 日韩一区日韩二区| 粉嫩嫩av羞羞动漫久久久| 精品国产乱码久久久久久闺蜜| 亚洲成av人影院| 在线观看亚洲a| 亚洲精品一二三四区| 不卡电影免费在线播放一区| 国产午夜亚洲精品羞羞网站| 久久99精品国产麻豆婷婷洗澡| 欧美日韩国产综合一区二区| 一区二区三区在线高清| 91麻豆国产自产在线观看| 国产精品欧美极品| 成人精品一区二区三区中文字幕| 久久久久久久久免费| 国产麻豆91精品| 久久久久久9999| 国产999精品久久久久久绿帽| 国产日产欧美一区| 粉嫩欧美一区二区三区高清影视| 日本一区二区三区四区在线视频| 国产精品 日产精品 欧美精品| 欧美精品一区二区高清在线观看| 久草这里只有精品视频| 精品美女一区二区| 国产在线精品一区二区不卡了| 久久综合99re88久久爱| 国产黑丝在线一区二区三区| 国产欧美精品一区aⅴ影院| 国产成人综合在线观看| 国产精品美女视频| 91黄色小视频| 五月激情丁香一区二区三区| 欧美日本国产一区| 琪琪久久久久日韩精品| 精品国内二区三区| 高清不卡在线观看av| 中文字幕一区在线观看| 美日韩一级片在线观看| 91精品综合久久久久久| 麻豆91免费看| 久久精品欧美一区二区三区麻豆| 成人黄色777网| 亚洲精品欧美激情| 91精品国产欧美一区二区成人| 麻豆成人久久精品二区三区红 | 18欧美乱大交hd1984| 91九色最新地址| 久久精品国产第一区二区三区| 国产亚洲午夜高清国产拍精品| 99在线精品视频| 亚洲第一主播视频| 精品国产3级a| 99re这里只有精品6| 无码av免费一区二区三区试看| 日韩久久久精品| 91在线视频18| 青青草一区二区三区| 国产精品亲子伦对白| 欧美日韩激情一区| 国产精品一区二区三区乱码| 亚洲免费在线看| 欧美tickling网站挠脚心| 99精品热视频| 美国十次了思思久久精品导航| 中文字幕乱码久久午夜不卡| 欧美乱妇一区二区三区不卡视频| 国产福利一区在线| 夜夜操天天操亚洲| 国产婷婷一区二区| 欧美日韩精品一区二区三区蜜桃| 国产尤物一区二区在线| 亚洲一区二区三区四区在线观看| 2020国产精品自拍| 欧美午夜不卡视频| 丰满少妇在线播放bd日韩电影| 午夜欧美电影在线观看| 中文字幕一区二区三区精华液| 日韩三级在线观看| 色94色欧美sute亚洲13| 国产在线观看免费一区| 亚洲一区在线视频观看| 国产欧美日韩综合精品一区二区| 欧美久久一区二区| 99精品久久久久久| 国产原创一区二区三区| 水野朝阳av一区二区三区| 亚洲欧美日韩国产另类专区| 国产亚洲精品免费| 日韩一本二本av| 欧美丝袜自拍制服另类| 福利91精品一区二区三区| 美女视频网站黄色亚洲| 亚洲综合激情另类小说区| 国产精品久久久久久一区二区三区| 精品国产乱码久久久久久蜜臀 | 欧美精品在线一区二区三区| 99久久婷婷国产综合精品| 国模冰冰炮一区二区| 免费在线观看一区二区三区| 亚洲美女在线一区| 国产精品少妇自拍| 2021国产精品久久精品| 欧美一级国产精品| 91精品蜜臀在线一区尤物| 在线观看视频欧美| 在线观看国产一区二区| 99久久99久久精品免费看蜜桃| 国产.欧美.日韩| 国产精品系列在线观看| 精品一二三四在线| 另类小说色综合网站| 捆绑调教美女网站视频一区| 强制捆绑调教一区二区| 丝袜诱惑制服诱惑色一区在线观看|