Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
atom / usr / share / atom / natives_blob.bin
Size: Mime:
mirrors…
(function(a,b){
"use strict";
var c;
var d=a.Array;
var e=a.isNaN;
var f=a.JSON.stringify;
var g=a.Math.min;
var h=b.ImportNow("promise_status_symbol");
var i=b.ImportNow("promise_value_symbol");
var j;
var k;
var l;
b.Import(function(m){
c=m.FunctionSourceString;
j=m.SymbolToString;
k=m.ToBoolean;
l=m.ToString;
});
var n={
UNDEFINED_TYPE:'undefined',
NULL_TYPE:'null',
BOOLEAN_TYPE:'boolean',
NUMBER_TYPE:'number',
STRING_TYPE:'string',
SYMBOL_TYPE:'symbol',
OBJECT_TYPE:'object',
FUNCTION_TYPE:'function',
REGEXP_TYPE:'regexp',
ERROR_TYPE:'error',
PROPERTY_TYPE:'property',
INTERNAL_PROPERTY_TYPE:'internalProperty',
FRAME_TYPE:'frame',
SCRIPT_TYPE:'script',
CONTEXT_TYPE:'context',
SCOPE_TYPE:'scope',
PROMISE_TYPE:'promise',
MAP_TYPE:'map',
SET_TYPE:'set',
ITERATOR_TYPE:'iterator',
GENERATOR_TYPE:'generator',
}
var o=0;
var p=-1;
var q=[];
var r=true;
function MirrorCacheIsEmpty(){
return o==0&&q.length==0;
}
function ToggleMirrorCache(s){
r=s;
ClearMirrorCache();
}
function ClearMirrorCache(s){
o=0;
q=[];
}
function ObjectIsPromise(s){
return(%_IsSpecObject(s))&&
!(%DebugGetProperty(s,h)===(void 0));
}
function MakeMirror(s,t){
var u;
if(!t&&r){
for(var v in q){
u=q[v];
if(u.value()===s){
return u;
}
if(u.isNumber()&&e(u.value())&&
typeof s=='number'&&e(s)){
return u;
}
}
}
if((s===(void 0))){
u=new UndefinedMirror();
}else if((s===null)){
u=new NullMirror();
}else if((typeof(s)==='boolean')){
u=new BooleanMirror(s);
}else if((typeof(s)==='number')){
u=new NumberMirror(s);
}else if((typeof(s)==='string')){
u=new StringMirror(s);
}else if((typeof(s)==='symbol')){
u=new SymbolMirror(s);
}else if((%_IsArray(s))){
u=new ArrayMirror(s);
}else if((%_IsDate(s))){
u=new DateMirror(s);
}else if((%_IsFunction(s))){
u=new FunctionMirror(s);
}else if((%_IsRegExp(s))){
u=new RegExpMirror(s);
}else if((%_ClassOf(s)==='Error')){
u=new ErrorMirror(s);
}else if((%_ClassOf(s)==='Script')){
u=new ScriptMirror(s);
}else if((%_ClassOf(s)==='Map')||(%_ClassOf(s)==='WeakMap')){
u=new MapMirror(s);
}else if((%_ClassOf(s)==='Set')||(%_ClassOf(s)==='WeakSet')){
u=new SetMirror(s);
}else if((%_ClassOf(s)==='Map Iterator')||(%_ClassOf(s)==='Set Iterator')){
u=new IteratorMirror(s);
}else if(ObjectIsPromise(s)){
u=new PromiseMirror(s);
}else if((%_ClassOf(s)==='Generator')){
u=new GeneratorMirror(s);
}else{
u=new ObjectMirror(s,n.OBJECT_TYPE,t);
}
if(r)q[u.handle()]=u;
return u;
}
function LookupMirror(w){
if(!r){
throw MakeError(2,"Mirror cache is disabled");
}
return q[w];
}
function GetUndefinedMirror(){
return MakeMirror((void 0));
}
function inherits(x,y){
var z=function(){};
z.prototype=y.prototype;
x.super_=y.prototype;
x.prototype=new z();
x.prototype.constructor=x;
}
var A=80;
var B={};
B.Named=1;
B.Indexed=2;
var C={};
C.Data=0;
C.DataConstant=2;
C.AccessorConstant=3;
var D={};
D.None=0;
D.ReadOnly=1;
D.DontEnum=2;
D.DontDelete=4;
var E={Global:0,
Local:1,
With:2,
Closure:3,
Catch:4,
Block:5,
Script:6};
function Mirror(F){
this.type_=F;
}
Mirror.prototype.type=function(){
return this.type_;
};
Mirror.prototype.isValue=function(){
return this instanceof ValueMirror;
};
Mirror.prototype.isUndefined=function(){
return this instanceof UndefinedMirror;
};
Mirror.prototype.isNull=function(){
return this instanceof NullMirror;
};
Mirror.prototype.isBoolean=function(){
return this instanceof BooleanMirror;
};
Mirror.prototype.isNumber=function(){
return this instanceof NumberMirror;
};
Mirror.prototype.isString=function(){
return this instanceof StringMirror;
};
Mirror.prototype.isSymbol=function(){
return this instanceof SymbolMirror;
};
Mirror.prototype.isObject=function(){
return this instanceof ObjectMirror;
};
Mirror.prototype.isFunction=function(){
return this instanceof FunctionMirror;
};
Mirror.prototype.isUnresolvedFunction=function(){
return this instanceof UnresolvedFunctionMirror;
};
Mirror.prototype.isArray=function(){
return this instanceof ArrayMirror;
};
Mirror.prototype.isDate=function(){
return this instanceof DateMirror;
};
Mirror.prototype.isRegExp=function(){
return this instanceof RegExpMirror;
};
Mirror.prototype.isError=function(){
return this instanceof ErrorMirror;
};
Mirror.prototype.isPromise=function(){
return this instanceof PromiseMirror;
};
Mirror.prototype.isGenerator=function(){
return this instanceof GeneratorMirror;
};
Mirror.prototype.isProperty=function(){
return this instanceof PropertyMirror;
};
Mirror.prototype.isInternalProperty=function(){
return this instanceof InternalPropertyMirror;
};
Mirror.prototype.isFrame=function(){
return this instanceof FrameMirror;
};
Mirror.prototype.isScript=function(){
return this instanceof ScriptMirror;
};
Mirror.prototype.isContext=function(){
return this instanceof ContextMirror;
};
Mirror.prototype.isScope=function(){
return this instanceof ScopeMirror;
};
Mirror.prototype.isMap=function(){
return this instanceof MapMirror;
};
Mirror.prototype.isSet=function(){
return this instanceof SetMirror;
};
Mirror.prototype.isIterator=function(){
return this instanceof IteratorMirror;
};
Mirror.prototype.allocateHandle_=function(){
if(r)this.handle_=o++;
};
Mirror.prototype.allocateTransientHandle_=function(){
this.handle_=p--;
};
Mirror.prototype.toText=function(){
return"#<"+this.constructor.name+">";
};
function ValueMirror(F,s,G){
%_CallFunction(this,F,Mirror);
this.value_=s;
if(!G){
this.allocateHandle_();
}else{
this.allocateTransientHandle_();
}
}
inherits(ValueMirror,Mirror);
Mirror.prototype.handle=function(){
return this.handle_;
};
ValueMirror.prototype.isPrimitive=function(){
var F=this.type();
return F==='undefined'||
F==='null'||
F==='boolean'||
F==='number'||
F==='string'||
F==='symbol';
};
ValueMirror.prototype.value=function(){
return this.value_;
};
function UndefinedMirror(){
%_CallFunction(this,n.UNDEFINED_TYPE,(void 0),ValueMirror);
}
inherits(UndefinedMirror,ValueMirror);
UndefinedMirror.prototype.toText=function(){
return'undefined';
};
function NullMirror(){
%_CallFunction(this,n.NULL_TYPE,null,ValueMirror);
}
inherits(NullMirror,ValueMirror);
NullMirror.prototype.toText=function(){
return'null';
};
function BooleanMirror(s){
%_CallFunction(this,n.BOOLEAN_TYPE,s,ValueMirror);
}
inherits(BooleanMirror,ValueMirror);
BooleanMirror.prototype.toText=function(){
return this.value_?'true':'false';
};
function NumberMirror(s){
%_CallFunction(this,n.NUMBER_TYPE,s,ValueMirror);
}
inherits(NumberMirror,ValueMirror);
NumberMirror.prototype.toText=function(){
return %_NumberToString(this.value_);
};
function StringMirror(s){
%_CallFunction(this,n.STRING_TYPE,s,ValueMirror);
}
inherits(StringMirror,ValueMirror);
StringMirror.prototype.length=function(){
return this.value_.length;
};
StringMirror.prototype.getTruncatedValue=function(H){
if(H!=-1&&this.length()>H){
return this.value_.substring(0,H)+
'... (length: '+this.length()+')';
}
return this.value_;
};
StringMirror.prototype.toText=function(){
return this.getTruncatedValue(A);
};
function SymbolMirror(s){
%_CallFunction(this,n.SYMBOL_TYPE,s,ValueMirror);
}
inherits(SymbolMirror,ValueMirror);
SymbolMirror.prototype.description=function(){
return %SymbolDescription(%_ValueOf(this.value_));
}
SymbolMirror.prototype.toText=function(){
return %_CallFunction(this.value_,j);
}
function ObjectMirror(s,F,G){
F=F||n.OBJECT_TYPE;
%_CallFunction(this,F,s,G,ValueMirror);
}
inherits(ObjectMirror,ValueMirror);
ObjectMirror.prototype.className=function(){
return %_ClassOf(this.value_);
};
ObjectMirror.prototype.constructorFunction=function(){
return MakeMirror(%DebugGetProperty(this.value_,'constructor'));
};
ObjectMirror.prototype.prototypeObject=function(){
return MakeMirror(%DebugGetProperty(this.value_,'prototype'));
};
ObjectMirror.prototype.protoObject=function(){
return MakeMirror(%DebugGetPrototype(this.value_));
};
ObjectMirror.prototype.hasNamedInterceptor=function(){
var I=%GetInterceptorInfo(this.value_);
return(I&2)!=0;
};
ObjectMirror.prototype.hasIndexedInterceptor=function(){
var I=%GetInterceptorInfo(this.value_);
return(I&1)!=0;
};
function TryGetPropertyNames(J){
try{
return %GetOwnPropertyNames(J,32);
}catch(e){
return[];
}
}
ObjectMirror.prototype.propertyNames=function(K,L){
K=K||B.Named|B.Indexed;
var M;
var N;
var O=0;
if(K&B.Named){
M=TryGetPropertyNames(this.value_);
O+=M.length;
if(this.hasNamedInterceptor()&&(K&B.Named)){
var P=
%GetNamedInterceptorPropertyNames(this.value_);
if(P){
M=M.concat(P);
O+=P.length;
}
}
}
if(K&B.Indexed){
N=%GetOwnElementNames(this.value_);
O+=N.length;
if(this.hasIndexedInterceptor()&&(K&B.Indexed)){
var Q=
%GetIndexedInterceptorElementNames(this.value_);
if(Q){
N=N.concat(Q);
O+=Q.length;
}
}
}
L=g(L||O,O);
var R=new d(L);
var S=0;
if(K&B.Named){
for(var T=0;S<L&&T<M.length;T++){
R[S++]=M[T];
}
}
if(K&B.Indexed){
for(var T=0;S<L&&T<N.length;T++){
R[S++]=N[T];
}
}
return R;
};
ObjectMirror.prototype.properties=function(K,L){
var R=this.propertyNames(K,L);
var U=new d(R.length);
for(var T=0;T<R.length;T++){
U[T]=this.property(R[T]);
}
return U;
};
ObjectMirror.prototype.internalProperties=function(){
return ObjectMirror.GetInternalProperties(this.value_);
}
ObjectMirror.prototype.property=function(V){
var W=%DebugGetPropertyDetails(this.value_,(%_ToName(V)));
if(W){
return new PropertyMirror(this,V,W);
}
return GetUndefinedMirror();
};
ObjectMirror.prototype.lookupProperty=function(s){
var U=this.properties();
for(var T=0;T<U.length;T++){
var X=U[T];
if(X.propertyType()!=C.AccessorConstant){
if(%_ObjectEquals(X.value_,s.value_)){
return X;
}
}
}
return GetUndefinedMirror();
};
ObjectMirror.prototype.referencedBy=function(Y){
var Z=%DebugReferencedBy(this.value_,
Mirror.prototype,Y||0);
for(var T=0;T<Z.length;T++){
Z[T]=MakeMirror(Z[T]);
}
return Z;
};
ObjectMirror.prototype.toText=function(){
var V;
var x=this.constructorFunction();
if(!x.isFunction()){
V=this.className();
}else{
V=x.name();
if(!V){
V=this.className();
}
}
return'#<'+V+'>';
};
ObjectMirror.GetInternalProperties=function(s){
var U=%DebugGetInternalProperties(s);
var Z=[];
for(var T=0;T<U.length;T+=2){
Z.push(new InternalPropertyMirror(U[T],U[T+1]));
}
return Z;
}
function FunctionMirror(s){
%_CallFunction(this,s,n.FUNCTION_TYPE,ObjectMirror);
this.resolved_=true;
}
inherits(FunctionMirror,ObjectMirror);
FunctionMirror.prototype.resolved=function(){
return this.resolved_;
};
FunctionMirror.prototype.name=function(){
return %FunctionGetName(this.value_);
};
FunctionMirror.prototype.inferredName=function(){
return %FunctionGetInferredName(this.value_);
};
FunctionMirror.prototype.source=function(){
if(this.resolved()){
return c(this.value_);
}
};
FunctionMirror.prototype.script=function(){
if(this.resolved()){
if(this.script_){
return this.script_;
}
var aa=%FunctionGetScript(this.value_);
if(aa){
return this.script_=MakeMirror(aa);
}
}
};
FunctionMirror.prototype.sourcePosition_=function(){
if(this.resolved()){
return %FunctionGetScriptSourcePosition(this.value_);
}
};
FunctionMirror.prototype.sourceLocation=function(){
if(this.resolved()){
var aa=this.script();
if(aa){
return aa.locationFromPosition(this.sourcePosition_(),true);
}
}
};
FunctionMirror.prototype.constructedBy=function(ab){
if(this.resolved()){
var Z=%DebugConstructedBy(this.value_,ab||0);
for(var T=0;T<Z.length;T++){
Z[T]=MakeMirror(Z[T]);
}
return Z;
}else{
return[];
}
};
FunctionMirror.prototype.scopeCount=function(){
if(this.resolved()){
if((this.scopeCount_===(void 0))){
this.scopeCount_=%GetFunctionScopeCount(this.value());
}
return this.scopeCount_;
}else{
return 0;
}
};
FunctionMirror.prototype.scope=function(S){
if(this.resolved()){
return new ScopeMirror((void 0),this,S);
}
};
FunctionMirror.prototype.toText=function(){
return this.source();
};
function UnresolvedFunctionMirror(s){
%_CallFunction(this,n.FUNCTION_TYPE,s,ValueMirror);
this.propertyCount_=0;
this.elementCount_=0;
this.resolved_=false;
}
inherits(UnresolvedFunctionMirror,FunctionMirror);
UnresolvedFunctionMirror.prototype.className=function(){
return'Function';
};
UnresolvedFunctionMirror.prototype.constructorFunction=function(){
return GetUndefinedMirror();
};
UnresolvedFunctionMirror.prototype.prototypeObject=function(){
return GetUndefinedMirror();
};
UnresolvedFunctionMirror.prototype.protoObject=function(){
return GetUndefinedMirror();
};
UnresolvedFunctionMirror.prototype.name=function(){
return this.value_;
};
UnresolvedFunctionMirror.prototype.inferredName=function(){
return(void 0);
};
UnresolvedFunctionMirror.prototype.propertyNames=function(K,L){
return[];
};
function ArrayMirror(s){
%_CallFunction(this,s,ObjectMirror);
}
inherits(ArrayMirror,ObjectMirror);
ArrayMirror.prototype.length=function(){
return this.value_.length;
};
ArrayMirror.prototype.indexedPropertiesFromRange=function(opt_from_index,
opt_to_index){
var ac=opt_from_index||0;
var ad=opt_to_index||this.length()-1;
if(ac>ad)return new d();
var ae=new d(ad-ac+1);
for(var T=ac;T<=ad;T++){
var W=%DebugGetPropertyDetails(this.value_,l(T));
var s;
if(W){
s=new PropertyMirror(this,T,W);
}else{
s=GetUndefinedMirror();
}
ae[T-ac]=s;
}
return ae;
};
function DateMirror(s){
%_CallFunction(this,s,ObjectMirror);
}
inherits(DateMirror,ObjectMirror);
DateMirror.prototype.toText=function(){
var af=f(this.value_);
return af.substring(1,af.length-1);
};
function RegExpMirror(s){
%_CallFunction(this,s,n.REGEXP_TYPE,ObjectMirror);
}
inherits(RegExpMirror,ObjectMirror);
RegExpMirror.prototype.source=function(){
return this.value_.source;
};
RegExpMirror.prototype.global=function(){
return this.value_.global;
};
RegExpMirror.prototype.ignoreCase=function(){
return this.value_.ignoreCase;
};
RegExpMirror.prototype.multiline=function(){
return this.value_.multiline;
};
RegExpMirror.prototype.sticky=function(){
return this.value_.sticky;
};
RegExpMirror.prototype.unicode=function(){
return this.value_.unicode;
};
RegExpMirror.prototype.toText=function(){
return"/"+this.source()+"/";
};
function ErrorMirror(s){
%_CallFunction(this,s,n.ERROR_TYPE,ObjectMirror);
}
inherits(ErrorMirror,ObjectMirror);
ErrorMirror.prototype.message=function(){
return this.value_.message;
};
ErrorMirror.prototype.toText=function(){
var ag;
try{
ag=%_CallFunction(this.value_,builtins.$errorToString);
}catch(e){
ag='#<Error>';
}
return ag;
};
function PromiseMirror(s){
%_CallFunction(this,s,n.PROMISE_TYPE,ObjectMirror);
}
inherits(PromiseMirror,ObjectMirror);
function PromiseGetStatus_(s){
var ah=%DebugGetProperty(s,h);
if(ah==0)return"pending";
if(ah==1)return"resolved";
return"rejected";
}
function PromiseGetValue_(s){
return %DebugGetProperty(s,i);
}
PromiseMirror.prototype.status=function(){
return PromiseGetStatus_(this.value_);
};
PromiseMirror.prototype.promiseValue=function(){
return MakeMirror(PromiseGetValue_(this.value_));
};
function MapMirror(s){
%_CallFunction(this,s,n.MAP_TYPE,ObjectMirror);
}
inherits(MapMirror,ObjectMirror);
MapMirror.prototype.entries=function(ai){
var Z=[];
if((%_ClassOf(this.value_)==='WeakMap')){
var aj=%GetWeakMapEntries(this.value_,ai||0);
for(var T=0;T<aj.length;T+=2){
Z.push({
key:aj[T],
value:aj[T+1]
});
}
return Z;
}
var ak=%_CallFunction(this.value_,builtins.$mapEntries);
var al;
while((!ai||Z.length<ai)&&
!(al=ak.next()).done){
Z.push({
key:al.value[0],
value:al.value[1]
});
}
return Z;
};
function SetMirror(s){
%_CallFunction(this,s,n.SET_TYPE,ObjectMirror);
}
inherits(SetMirror,ObjectMirror);
function IteratorGetValues_(ak,am,ai){
var Z=[];
var al;
while((!ai||Z.length<ai)&&
!(al=%_CallFunction(ak,am)).done){
Z.push(al.value);
}
return Z;
}
SetMirror.prototype.values=function(ai){
if((%_ClassOf(this.value_)==='WeakSet')){
return %GetWeakSetValues(this.value_,ai||0);
}
var ak=%_CallFunction(this.value_,builtins.$setValues);
return IteratorGetValues_(ak,builtins.$setIteratorNext,ai);
};
function IteratorMirror(s){
%_CallFunction(this,s,n.ITERATOR_TYPE,ObjectMirror);
}
inherits(IteratorMirror,ObjectMirror);
IteratorMirror.prototype.preview=function(ai){
if((%_ClassOf(this.value_)==='Map Iterator')){
return IteratorGetValues_(%MapIteratorClone(this.value_),
builtins.$mapIteratorNext,
ai);
}else if((%_ClassOf(this.value_)==='Set Iterator')){
return IteratorGetValues_(%SetIteratorClone(this.value_),
builtins.$setIteratorNext,
ai);
}
};
function GeneratorMirror(s){
%_CallFunction(this,s,n.GENERATOR_TYPE,ObjectMirror);
}
inherits(GeneratorMirror,ObjectMirror);
function GeneratorGetStatus_(s){
var an=%GeneratorGetContinuation(s);
if(an<0)return"running";
if(an==0)return"closed";
return"suspended";
}
GeneratorMirror.prototype.status=function(){
return GeneratorGetStatus_(this.value_);
};
GeneratorMirror.prototype.sourcePosition_=function(){
return %GeneratorGetSourcePosition(this.value_);
};
GeneratorMirror.prototype.sourceLocation=function(){
var ao=this.sourcePosition_();
if(!(ao===(void 0))){
var aa=this.func().script();
if(aa){
return aa.locationFromPosition(ao,true);
}
}
};
GeneratorMirror.prototype.func=function(){
if(!this.func_){
this.func_=MakeMirror(%GeneratorGetFunction(this.value_));
}
return this.func_;
};
GeneratorMirror.prototype.context=function(){
if(!this.context_){
this.context_=new ContextMirror(%GeneratorGetContext(this.value_));
}
return this.context_;
};
GeneratorMirror.prototype.receiver=function(){
if(!this.receiver_){
this.receiver_=MakeMirror(%GeneratorGetReceiver(this.value_));
}
return this.receiver_;
};
function PropertyMirror(u,V,W){
%_CallFunction(this,n.PROPERTY_TYPE,Mirror);
this.mirror_=u;
this.name_=V;
this.value_=W[0];
this.details_=W[1];
this.is_interceptor_=W[2];
if(W.length>3){
this.exception_=W[3];
this.getter_=W[4];
this.setter_=W[5];
}
}
inherits(PropertyMirror,Mirror);
PropertyMirror.prototype.isReadOnly=function(){
return(this.attributes()&D.ReadOnly)!=0;
};
PropertyMirror.prototype.isEnum=function(){
return(this.attributes()&D.DontEnum)==0;
};
PropertyMirror.prototype.canDelete=function(){
return(this.attributes()&D.DontDelete)==0;
};
PropertyMirror.prototype.name=function(){
return this.name_;
};
PropertyMirror.prototype.isIndexed=function(){
for(var T=0;T<this.name_.length;T++){
if(this.name_[T]<'0'||'9'<this.name_[T]){
return false;
}
}
return true;
};
PropertyMirror.prototype.value=function(){
return MakeMirror(this.value_,false);
};
PropertyMirror.prototype.isException=function(){
return this.exception_?true:false;
};
PropertyMirror.prototype.attributes=function(){
return %DebugPropertyAttributesFromDetails(this.details_);
};
PropertyMirror.prototype.propertyType=function(){
return %DebugPropertyTypeFromDetails(this.details_);
};
PropertyMirror.prototype.insertionIndex=function(){
return %DebugPropertyIndexFromDetails(this.details_);
};
PropertyMirror.prototype.hasGetter=function(){
return this.getter_?true:false;
};
PropertyMirror.prototype.hasSetter=function(){
return this.setter_?true:false;
};
PropertyMirror.prototype.getter=function(){
if(this.hasGetter()){
return MakeMirror(this.getter_);
}else{
return GetUndefinedMirror();
}
};
PropertyMirror.prototype.setter=function(){
if(this.hasSetter()){
return MakeMirror(this.setter_);
}else{
return GetUndefinedMirror();
}
};
PropertyMirror.prototype.isNative=function(){
return this.is_interceptor_||
((this.propertyType()==C.AccessorConstant)&&
!this.hasGetter()&&!this.hasSetter());
};
function InternalPropertyMirror(V,s){
%_CallFunction(this,n.INTERNAL_PROPERTY_TYPE,Mirror);
this.name_=V;
this.value_=s;
}
inherits(InternalPropertyMirror,Mirror);
InternalPropertyMirror.prototype.name=function(){
return this.name_;
};
InternalPropertyMirror.prototype.value=function(){
return MakeMirror(this.value_,false);
};
var ap=0;
var aq=1;
var ar=2;
var as=3;
var at=4;
var au=5;
var av=6;
var aw=7;
var ax=8;
var ay=9;
var az=0;
var aA=1;
var aB=2;
var aC=1<<0;
var aD=1<<1;
var aE=7<<2;
function FrameDetails(aF,S){
this.break_id_=aF;
this.details_=%GetFrameDetails(aF,S);
}
FrameDetails.prototype.frameId=function(){
%CheckExecutionState(this.break_id_);
return this.details_[ap];
};
FrameDetails.prototype.receiver=function(){
%CheckExecutionState(this.break_id_);
return this.details_[aq];
};
FrameDetails.prototype.func=function(){
%CheckExecutionState(this.break_id_);
return this.details_[ar];
};
FrameDetails.prototype.isConstructCall=function(){
%CheckExecutionState(this.break_id_);
return this.details_[av];
};
FrameDetails.prototype.isAtReturn=function(){
%CheckExecutionState(this.break_id_);
return this.details_[aw];
};
FrameDetails.prototype.isDebuggerFrame=function(){
%CheckExecutionState(this.break_id_);
var aG=aC;
return(this.details_[ax]&aG)==aG;
};
FrameDetails.prototype.isOptimizedFrame=function(){
%CheckExecutionState(this.break_id_);
var aG=aD;
return(this.details_[ax]&aG)==aG;
};
FrameDetails.prototype.isInlinedFrame=function(){
return this.inlinedFrameIndex()>0;
};
FrameDetails.prototype.inlinedFrameIndex=function(){
%CheckExecutionState(this.break_id_);
var aG=aE;
return(this.details_[ax]&aG)>>2;
};
FrameDetails.prototype.argumentCount=function(){
%CheckExecutionState(this.break_id_);
return this.details_[as];
};
FrameDetails.prototype.argumentName=function(S){
%CheckExecutionState(this.break_id_);
if(S>=0&&S<this.argumentCount()){
return this.details_[ay+
S*aB+
az];
}
};
FrameDetails.prototype.argumentValue=function(S){
%CheckExecutionState(this.break_id_);
if(S>=0&&S<this.argumentCount()){
return this.details_[ay+
S*aB+
aA];
}
};
FrameDetails.prototype.localCount=function(){
%CheckExecutionState(this.break_id_);
return this.details_[at];
};
FrameDetails.prototype.sourcePosition=function(){
%CheckExecutionState(this.break_id_);
return this.details_[au];
};
FrameDetails.prototype.localName=function(S){
%CheckExecutionState(this.break_id_);
if(S>=0&&S<this.localCount()){
var aH=ay+
this.argumentCount()*aB;
return this.details_[aH+
S*aB+
az];
}
};
FrameDetails.prototype.localValue=function(S){
%CheckExecutionState(this.break_id_);
if(S>=0&&S<this.localCount()){
var aH=ay+
this.argumentCount()*aB;
return this.details_[aH+
S*aB+
aA];
}
};
FrameDetails.prototype.returnValue=function(){
%CheckExecutionState(this.break_id_);
var aI=
ay+
(this.argumentCount()+this.localCount())*aB;
if(this.details_[aw]){
return this.details_[aI];
}
};
FrameDetails.prototype.scopeCount=function(){
if((this.scopeCount_===(void 0))){
this.scopeCount_=%GetScopeCount(this.break_id_,this.frameId());
}
return this.scopeCount_;
};
FrameDetails.prototype.stepInPositionsImpl=function(){
return %GetStepInPositions(this.break_id_,this.frameId());
};
function FrameMirror(aF,S){
%_CallFunction(this,n.FRAME_TYPE,Mirror);
this.break_id_=aF;
this.index_=S;
this.details_=new FrameDetails(aF,S);
}
inherits(FrameMirror,Mirror);
FrameMirror.prototype.details=function(){
return this.details_;
};
FrameMirror.prototype.index=function(){
return this.index_;
};
FrameMirror.prototype.func=function(){
if(this.func_){
return this.func_;
}
var aG=this.details_.func();
if((%_IsFunction(aG))){
return this.func_=MakeMirror(aG);
}else{
return new UnresolvedFunctionMirror(aG);
}
};
FrameMirror.prototype.receiver=function(){
return MakeMirror(this.details_.receiver());
};
FrameMirror.prototype.isConstructCall=function(){
return this.details_.isConstructCall();
};
FrameMirror.prototype.isAtReturn=function(){
return this.details_.isAtReturn();
};
FrameMirror.prototype.isDebuggerFrame=function(){
return this.details_.isDebuggerFrame();
};
FrameMirror.prototype.isOptimizedFrame=function(){
return this.details_.isOptimizedFrame();
};
FrameMirror.prototype.isInlinedFrame=function(){
return this.details_.isInlinedFrame();
};
FrameMirror.prototype.inlinedFrameIndex=function(){
return this.details_.inlinedFrameIndex();
};
FrameMirror.prototype.argumentCount=function(){
return this.details_.argumentCount();
};
FrameMirror.prototype.argumentName=function(S){
return this.details_.argumentName(S);
};
FrameMirror.prototype.argumentValue=function(S){
return MakeMirror(this.details_.argumentValue(S));
};
FrameMirror.prototype.localCount=function(){
return this.details_.localCount();
};
FrameMirror.prototype.localName=function(S){
return this.details_.localName(S);
};
FrameMirror.prototype.localValue=function(S){
return MakeMirror(this.details_.localValue(S));
};
FrameMirror.prototype.returnValue=function(){
return MakeMirror(this.details_.returnValue());
};
FrameMirror.prototype.sourcePosition=function(){
return this.details_.sourcePosition();
};
FrameMirror.prototype.sourceLocation=function(){
var aJ=this.func();
if(aJ.resolved()){
var aa=aJ.script();
if(aa){
return aa.locationFromPosition(this.sourcePosition(),true);
}
}
};
FrameMirror.prototype.sourceLine=function(){
var aK=this.sourceLocation();
if(aK){
return aK.line;
}
};
FrameMirror.prototype.sourceColumn=function(){
var aK=this.sourceLocation();
if(aK){
return aK.column;
}
};
FrameMirror.prototype.sourceLineText=function(){
var aK=this.sourceLocation();
if(aK){
return aK.sourceText();
}
};
FrameMirror.prototype.scopeCount=function(){
return this.details_.scopeCount();
};
FrameMirror.prototype.scope=function(S){
return new ScopeMirror(this,(void 0),S);
};
FrameMirror.prototype.allScopes=function(aL){
var aM=%GetAllScopesDetails(this.break_id_,
this.details_.frameId(),
this.details_.inlinedFrameIndex(),
!!aL);
var Z=[];
for(var T=0;T<aM.length;++T){
Z.push(new ScopeMirror(this,(void 0),T,aM[T]));
}
return Z;
};
FrameMirror.prototype.stepInPositions=function(){
var aa=this.func().script();
var aN=this.func().sourcePosition_();
var aO=this.details_.stepInPositionsImpl();
var Z=[];
if(aO){
for(var T=0;T<aO.length;T++){
var aP={};
var aQ=aa.locationFromPosition(aN+aO[T],
true);
serializeLocationFields(aQ,aP);
var aR={
position:aP
};
Z.push(aR);
}
}
return Z;
};
FrameMirror.prototype.evaluate=function(source,disable_break,
opt_context_object){
return MakeMirror(%DebugEvaluate(this.break_id_,
this.details_.frameId(),
this.details_.inlinedFrameIndex(),
source,
k(disable_break),
opt_context_object));
};
FrameMirror.prototype.invocationText=function(){
var Z='';
var aJ=this.func();
var aS=this.receiver();
if(this.isConstructCall()){
Z+='new ';
Z+=aJ.name()?aJ.name():'[anonymous]';
}else if(this.isDebuggerFrame()){
Z+='[debugger]';
}else{
var aT=
!aS.className||(aS.className()!='global');
if(aT){
Z+=aS.toText();
}
var X=GetUndefinedMirror();
if(aS.isObject()){
for(var aU=aS;
!aU.isNull()&&X.isUndefined();
aU=aU.protoObject()){
X=aU.lookupProperty(aJ);
}
}
if(!X.isUndefined()){
if(!X.isIndexed()){
if(aT){
Z+='.';
}
Z+=X.name();
}else{
Z+='[';
Z+=X.name();
Z+=']';
}
if(aJ.name()&&aJ.name()!=X.name()){
Z+='(aka '+aJ.name()+')';
}
}else{
if(aT){
Z+='.';
}
Z+=aJ.name()?aJ.name():'[anonymous]';
}
}
if(!this.isDebuggerFrame()){
Z+='(';
for(var T=0;T<this.argumentCount();T++){
if(T!=0)Z+=', ';
if(this.argumentName(T)){
Z+=this.argumentName(T);
Z+='=';
}
Z+=this.argumentValue(T).toText();
}
Z+=')';
}
if(this.isAtReturn()){
Z+=' returning ';
Z+=this.returnValue().toText();
}
return Z;
};
FrameMirror.prototype.sourceAndPositionText=function(){
var Z='';
var aJ=this.func();
if(aJ.resolved()){
var aa=aJ.script();
if(aa){
if(aa.name()){
Z+=aa.name();
}else{
Z+='[unnamed]';
}
if(!this.isDebuggerFrame()){
var aK=this.sourceLocation();
Z+=' line ';
Z+=!(aK===(void 0))?(aK.line+1):'?';
Z+=' column ';
Z+=!(aK===(void 0))?(aK.column+1):'?';
if(!(this.sourcePosition()===(void 0))){
Z+=' (position '+(this.sourcePosition()+1)+')';
}
}
}else{
Z+='[no source]';
}
}else{
Z+='[unresolved]';
}
return Z;
};
FrameMirror.prototype.localsText=function(){
var Z='';
var aV=this.localCount();
if(aV>0){
for(var T=0;T<aV;++T){
Z+='      var ';
Z+=this.localName(T);
Z+=' = ';
Z+=this.localValue(T).toText();
if(T<aV-1)Z+='\n';
}
}
return Z;
};
FrameMirror.prototype.restart=function(){
var Z=%LiveEditRestartFrame(this.break_id_,this.index_);
if((Z===(void 0))){
Z="Failed to find requested frame";
}
return Z;
};
FrameMirror.prototype.toText=function(aW){
var Z='';
Z+='#'+(this.index()<=9?'0':'')+this.index();
Z+=' ';
Z+=this.invocationText();
Z+=' ';
Z+=this.sourceAndPositionText();
if(aW){
Z+='\n';
Z+=this.localsText();
}
return Z;
};
var aX=0;
var aY=1;
function ScopeDetails(aZ,ba,S,bb){
if(aZ){
this.break_id_=aZ.break_id_;
this.details_=bb||
%GetScopeDetails(aZ.break_id_,
aZ.details_.frameId(),
aZ.details_.inlinedFrameIndex(),
S);
this.frame_id_=aZ.details_.frameId();
this.inlined_frame_id_=aZ.details_.inlinedFrameIndex();
}else{
this.details_=bb||%GetFunctionScopeDetails(ba.value(),S);
this.fun_value_=ba.value();
this.break_id_=(void 0);
}
this.index_=S;
}
ScopeDetails.prototype.type=function(){
if(!(this.break_id_===(void 0))){
%CheckExecutionState(this.break_id_);
}
return this.details_[aX];
};
ScopeDetails.prototype.object=function(){
if(!(this.break_id_===(void 0))){
%CheckExecutionState(this.break_id_);
}
return this.details_[aY];
};
ScopeDetails.prototype.setVariableValueImpl=function(V,bc){
var bd;
if(!(this.break_id_===(void 0))){
%CheckExecutionState(this.break_id_);
bd=%SetScopeVariableValue(this.break_id_,this.frame_id_,
this.inlined_frame_id_,this.index_,V,bc);
}else{
bd=%SetScopeVariableValue(this.fun_value_,null,null,this.index_,
V,bc);
}
if(!bd)throw MakeError(2,"Failed to set variable value");
};
function ScopeMirror(aZ,ba,S,bb){
%_CallFunction(this,n.SCOPE_TYPE,Mirror);
if(aZ){
this.frame_index_=aZ.index_;
}else{
this.frame_index_=(void 0);
}
this.scope_index_=S;
this.details_=new ScopeDetails(aZ,ba,S,bb);
}
inherits(ScopeMirror,Mirror);
ScopeMirror.prototype.details=function(){
return this.details_;
};
ScopeMirror.prototype.frameIndex=function(){
return this.frame_index_;
};
ScopeMirror.prototype.scopeIndex=function(){
return this.scope_index_;
};
ScopeMirror.prototype.scopeType=function(){
return this.details_.type();
};
ScopeMirror.prototype.scopeObject=function(){
var G=this.scopeType()==E.Local||
this.scopeType()==E.Closure||
this.scopeType()==E.Script;
return MakeMirror(this.details_.object(),G);
};
ScopeMirror.prototype.setVariableValue=function(V,bc){
this.details_.setVariableValueImpl(V,bc);
};
function ScriptMirror(aa){
%_CallFunction(this,n.SCRIPT_TYPE,Mirror);
this.script_=aa;
this.context_=new ContextMirror(aa.context_data);
this.allocateHandle_();
}
inherits(ScriptMirror,Mirror);
ScriptMirror.prototype.value=function(){
return this.script_;
};
ScriptMirror.prototype.name=function(){
return this.script_.name||this.script_.nameOrSourceURL();
};
ScriptMirror.prototype.id=function(){
return this.script_.id;
};
ScriptMirror.prototype.source=function(){
return this.script_.source;
};
ScriptMirror.prototype.setSource=function(be){
%DebugSetScriptSource(this.script_,be);
};
ScriptMirror.prototype.lineOffset=function(){
return this.script_.line_offset;
};
ScriptMirror.prototype.columnOffset=function(){
return this.script_.column_offset;
};
ScriptMirror.prototype.data=function(){
return this.script_.data;
};
ScriptMirror.prototype.scriptType=function(){
return this.script_.type;
};
ScriptMirror.prototype.compilationType=function(){
return this.script_.compilation_type;
};
ScriptMirror.prototype.lineCount=function(){
return this.script_.lineCount();
};
ScriptMirror.prototype.locationFromPosition=function(
position,include_resource_offset){
return this.script_.locationFromPosition(position,include_resource_offset);
};
ScriptMirror.prototype.sourceSlice=function(bf,bg){
return this.script_.sourceSlice(bf,bg);
};
ScriptMirror.prototype.context=function(){
return this.context_;
};
ScriptMirror.prototype.evalFromScript=function(){
return MakeMirror(this.script_.eval_from_script);
};
ScriptMirror.prototype.evalFromFunctionName=function(){
return MakeMirror(this.script_.eval_from_function_name);
};
ScriptMirror.prototype.evalFromLocation=function(){
var bh=this.evalFromScript();
if(!bh.isUndefined()){
var bi=this.script_.eval_from_script_position;
return bh.locationFromPosition(bi,true);
}
};
ScriptMirror.prototype.toText=function(){
var Z='';
Z+=this.name();
Z+=' (lines: ';
if(this.lineOffset()>0){
Z+=this.lineOffset();
Z+='-';
Z+=this.lineOffset()+this.lineCount()-1;
}else{
Z+=this.lineCount();
}
Z+=')';
return Z;
};
function ContextMirror(bj){
%_CallFunction(this,n.CONTEXT_TYPE,Mirror);
this.data_=bj;
this.allocateHandle_();
}
inherits(ContextMirror,Mirror);
ContextMirror.prototype.data=function(){
return this.data_;
};
function MakeMirrorSerializer(W,bk){
return new JSONProtocolSerializer(W,bk);
}
function JSONProtocolSerializer(W,bk){
this.details_=W;
this.options_=bk;
this.mirrors_=[];
}
JSONProtocolSerializer.prototype.serializeReference=function(u){
return this.serialize_(u,true,true);
};
JSONProtocolSerializer.prototype.serializeValue=function(u){
var bl=this.serialize_(u,false,true);
return bl;
};
JSONProtocolSerializer.prototype.serializeReferencedObjects=function(){
var bm=[];
var bn=this.mirrors_.length;
for(var T=0;T<bn;T++){
bm.push(this.serialize_(this.mirrors_[T],false,false));
}
return bm;
};
JSONProtocolSerializer.prototype.includeSource_=function(){
return this.options_&&this.options_.includeSource;
};
JSONProtocolSerializer.prototype.inlineRefs_=function(){
return this.options_&&this.options_.inlineRefs;
};
JSONProtocolSerializer.prototype.maxStringLength_=function(){
if((this.options_===(void 0))||
(this.options_.maxStringLength===(void 0))){
return A;
}
return this.options_.maxStringLength;
};
JSONProtocolSerializer.prototype.add_=function(u){
for(var T=0;T<this.mirrors_.length;T++){
if(this.mirrors_[T]===u){
return;
}
}
this.mirrors_.push(u);
};
JSONProtocolSerializer.prototype.serializeReferenceWithDisplayData_=
function(u){
var bo={};
bo.ref=u.handle();
bo.type=u.type();
switch(u.type()){
case n.UNDEFINED_TYPE:
case n.NULL_TYPE:
case n.BOOLEAN_TYPE:
case n.NUMBER_TYPE:
bo.value=u.value();
break;
case n.STRING_TYPE:
bo.value=u.getTruncatedValue(this.maxStringLength_());
break;
case n.SYMBOL_TYPE:
bo.description=u.description();
break;
case n.FUNCTION_TYPE:
bo.name=u.name();
bo.inferredName=u.inferredName();
if(u.script()){
bo.scriptId=u.script().id();
}
break;
case n.ERROR_TYPE:
case n.REGEXP_TYPE:
bo.value=u.toText();
break;
case n.OBJECT_TYPE:
bo.className=u.className();
break;
}
return bo;
};
JSONProtocolSerializer.prototype.serialize_=function(u,reference,
W){
if(reference&&
(u.isValue()||u.isScript()||u.isContext())){
if(this.inlineRefs_()&&u.isValue()){
return this.serializeReferenceWithDisplayData_(u);
}else{
this.add_(u);
return{'ref':u.handle()};
}
}
var bm={};
if(u.isValue()||u.isScript()||u.isContext()){
bm.handle=u.handle();
}
bm.type=u.type();
switch(u.type()){
case n.UNDEFINED_TYPE:
case n.NULL_TYPE:
break;
case n.BOOLEAN_TYPE:
bm.value=u.value();
break;
case n.NUMBER_TYPE:
bm.value=NumberToJSON_(u.value());
break;
case n.STRING_TYPE:
if(this.maxStringLength_()!=-1&&
u.length()>this.maxStringLength_()){
var bp=u.getTruncatedValue(this.maxStringLength_());
bm.value=bp;
bm.fromIndex=0;
bm.toIndex=this.maxStringLength_();
}else{
bm.value=u.value();
}
bm.length=u.length();
break;
case n.SYMBOL_TYPE:
bm.description=u.description();
break;
case n.OBJECT_TYPE:
case n.FUNCTION_TYPE:
case n.ERROR_TYPE:
case n.REGEXP_TYPE:
case n.PROMISE_TYPE:
case n.GENERATOR_TYPE:
this.serializeObject_(u,bm,W);
break;
case n.PROPERTY_TYPE:
case n.INTERNAL_PROPERTY_TYPE:
throw MakeError(2,
'PropertyMirror cannot be serialized independently');
break;
case n.FRAME_TYPE:
this.serializeFrame_(u,bm);
break;
case n.SCOPE_TYPE:
this.serializeScope_(u,bm);
break;
case n.SCRIPT_TYPE:
if(u.name()){
bm.name=u.name();
}
bm.id=u.id();
bm.lineOffset=u.lineOffset();
bm.columnOffset=u.columnOffset();
bm.lineCount=u.lineCount();
if(u.data()){
bm.data=u.data();
}
if(this.includeSource_()){
bm.source=u.source();
}else{
var bq=u.source().substring(0,80);
bm.sourceStart=bq;
}
bm.sourceLength=u.source().length;
bm.scriptType=u.scriptType();
bm.compilationType=u.compilationType();
if(u.compilationType()==1&&
u.evalFromScript()){
bm.evalFromScript=
this.serializeReference(u.evalFromScript());
var br=u.evalFromLocation();
if(br){
bm.evalFromLocation={line:br.line,
column:br.column};
}
if(u.evalFromFunctionName()){
bm.evalFromFunctionName=u.evalFromFunctionName();
}
}
if(u.context()){
bm.context=this.serializeReference(u.context());
}
break;
case n.CONTEXT_TYPE:
bm.data=u.data();
break;
}
bm.text=u.toText();
return bm;
};
JSONProtocolSerializer.prototype.serializeObject_=function(u,bm,
W){
bm.className=u.className();
bm.constructorFunction=
this.serializeReference(u.constructorFunction());
bm.protoObject=this.serializeReference(u.protoObject());
bm.prototypeObject=this.serializeReference(u.prototypeObject());
if(u.hasNamedInterceptor()){
bm.namedInterceptor=true;
}
if(u.hasIndexedInterceptor()){
bm.indexedInterceptor=true;
}
if(u.isFunction()){
bm.name=u.name();
if(!(u.inferredName()===(void 0))){
bm.inferredName=u.inferredName();
}
bm.resolved=u.resolved();
if(u.resolved()){
bm.source=u.source();
}
if(u.script()){
bm.script=this.serializeReference(u.script());
bm.scriptId=u.script().id();
serializeLocationFields(u.sourceLocation(),bm);
}
bm.scopes=[];
for(var T=0;T<u.scopeCount();T++){
var bs=u.scope(T);
bm.scopes.push({
type:bs.scopeType(),
index:T
});
}
}
if(u.isGenerator()){
bm.status=u.status();
bm.func=this.serializeReference(u.func())
bm.receiver=this.serializeReference(u.receiver())
serializeLocationFields(u.sourceLocation(),bm);
}
if(u.isDate()){
bm.value=u.value();
}
if(u.isPromise()){
bm.status=u.status();
bm.promiseValue=this.serializeReference(u.promiseValue());
}
var M=u.propertyNames(B.Named);
var bt=u.propertyNames(B.Indexed);
var bu=new d(M.length+bt.length);
for(var T=0;T<M.length;T++){
var bv=u.property(M[T]);
bu[T]=this.serializeProperty_(bv);
if(W){
this.add_(bv.value());
}
}
for(var T=0;T<bt.length;T++){
var bv=u.property(bt[T]);
bu[M.length+T]=this.serializeProperty_(bv);
if(W){
this.add_(bv.value());
}
}
bm.properties=bu;
var bw=u.internalProperties();
if(bw.length>0){
var bx=[];
for(var T=0;T<bw.length;T++){
bx.push(this.serializeInternalProperty_(bw[T]));
}
bm.internalProperties=bx;
}
};
function serializeLocationFields(aK,bm){
if(!aK){
return;
}
bm.position=aK.position;
var by=aK.line;
if(!(by===(void 0))){
bm.line=by;
}
var bz=aK.column;
if(!(bz===(void 0))){
bm.column=bz;
}
}
JSONProtocolSerializer.prototype.serializeProperty_=function(bv){
var Z={};
Z.name=bv.name();
var bA=bv.value();
if(this.inlineRefs_()&&bA.isValue()){
Z.value=this.serializeReferenceWithDisplayData_(bA);
}else{
if(bv.attributes()!=D.None){
Z.attributes=bv.attributes();
}
Z.propertyType=bv.propertyType();
Z.ref=bA.handle();
}
return Z;
};
JSONProtocolSerializer.prototype.serializeInternalProperty_=
function(bv){
var Z={};
Z.name=bv.name();
var bA=bv.value();
if(this.inlineRefs_()&&bA.isValue()){
Z.value=this.serializeReferenceWithDisplayData_(bA);
}else{
Z.ref=bA.handle();
}
return Z;
};
JSONProtocolSerializer.prototype.serializeFrame_=function(u,bm){
bm.index=u.index();
bm.receiver=this.serializeReference(u.receiver());
var aJ=u.func();
bm.func=this.serializeReference(aJ);
var aa=aJ.script();
if(aa){
bm.script=this.serializeReference(aa);
}
bm.constructCall=u.isConstructCall();
bm.atReturn=u.isAtReturn();
if(u.isAtReturn()){
bm.returnValue=this.serializeReference(u.returnValue());
}
bm.debuggerFrame=u.isDebuggerFrame();
var I=new d(u.argumentCount());
for(var T=0;T<u.argumentCount();T++){
var bB={};
var bC=u.argumentName(T);
if(bC){
bB.name=bC;
}
bB.value=this.serializeReference(u.argumentValue(T));
I[T]=bB;
}
bm.arguments=I;
var I=new d(u.localCount());
for(var T=0;T<u.localCount();T++){
var bD={};
bD.name=u.localName(T);
bD.value=this.serializeReference(u.localValue(T));
I[T]=bD;
}
bm.locals=I;
serializeLocationFields(u.sourceLocation(),bm);
var bE=u.sourceLineText();
if(!(bE===(void 0))){
bm.sourceLineText=bE;
}
bm.scopes=[];
for(var T=0;T<u.scopeCount();T++){
var bs=u.scope(T);
bm.scopes.push({
type:bs.scopeType(),
index:T
});
}
};
JSONProtocolSerializer.prototype.serializeScope_=function(u,bm){
bm.index=u.scopeIndex();
bm.frameIndex=u.frameIndex();
bm.type=u.scopeType();
bm.object=this.inlineRefs_()?
this.serializeValue(u.scopeObject()):
this.serializeReference(u.scopeObject());
};
function NumberToJSON_(s){
if(e(s)){
return'NaN';
}
if(!(%_IsSmi(%IS_VAR(s))||((s==s)&&(s!=1/0)&&(s!=-1/0)))){
if(s>0){
return'Infinity';
}else{
return'-Infinity';
}
}
return s;
}
b.InstallFunctions(a,2,[
"MakeMirror",MakeMirror,
"MakeMirrorSerializer",MakeMirrorSerializer,
"LookupMirror",LookupMirror,
"ToggleMirrorCache",ToggleMirrorCache,
"MirrorCacheIsEmpty",MirrorCacheIsEmpty,
]);
b.InstallConstants(a,[
"ScopeType",E,
"PropertyKind",B,
"PropertyType",C,
"PropertyAttribute",D,
"Mirror",Mirror,
"ValueMirror",ValueMirror,
"UndefinedMirror",UndefinedMirror,
"NullMirror",NullMirror,
"BooleanMirror",BooleanMirror,
"NumberMirror",NumberMirror,
"StringMirror",StringMirror,
"SymbolMirror",SymbolMirror,
"ObjectMirror",ObjectMirror,
"FunctionMirror",FunctionMirror,
"UnresolvedFunctionMirror",UnresolvedFunctionMirror,
"ArrayMirror",ArrayMirror,
"DateMirror",DateMirror,
"RegExpMirror",RegExpMirror,
"ErrorMirror",ErrorMirror,
"PromiseMirror",PromiseMirror,
"MapMirror",MapMirror,
"SetMirror",SetMirror,
"IteratorMirror",IteratorMirror,
"GeneratorMirror",GeneratorMirror,
"PropertyMirror",PropertyMirror,
"InternalPropertyMirror",InternalPropertyMirror,
"FrameMirror",FrameMirror,
"ScriptMirror",ScriptMirror,
"ScopeMirror",ScopeMirror,
"FrameDetails",FrameDetails,
]);
b.InstallFunctions(b,2,[
"ClearMirrorCache",ClearMirrorCache
]);
b.Export(function(bF){
bF.MirrorType=n;
});
})

debugfˆ
(function(a,b){
"use strict";
var c=a.FrameMirror;
var d=a.Array;
var e=a.RegExp;
var f=a.isNaN;
var g=a.JSON.parse;
var h=a.JSON.stringify;
var i=a.LookupMirror;
var j=a.MakeMirror;
var k=a.MakeMirrorSerializer;
var l=a.Math.min;
var m=a.Mirror;
var n;
var o=a.parseInt;
var p;
var q;
var r;
var s=a.ValueMirror;
b.Import(function(t){
n=t.MirrorType;
p=t.ToBoolean;
q=t.ToNumber;
r=t.ToString;
});
var u=10;
var v={};
var w=/^(?:\s*(?:\/\*.*?\*\/)*)*/;
v.DebugEvent={Break:1,
Exception:2,
NewFunction:3,
BeforeCompile:4,
AfterCompile:5,
CompileError:6,
PromiseEvent:7,
AsyncTaskEvent:8};
v.ExceptionBreak={Caught:0,
Uncaught:1};
v.StepAction={StepOut:0,
StepNext:1,
StepIn:2,
StepMin:3,
StepInMin:4,
StepFrame:5};
v.ScriptType={Native:0,
Extension:1,
Normal:2};
v.ScriptCompilationType={Host:0,
Eval:1,
JSON:2};
v.ScriptBreakPointType={ScriptId:0,
ScriptName:1,
ScriptRegExp:2};
v.BreakPositionAlignment={
Statement:0,
BreakPosition:1
};
function ScriptTypeFlag(x){
return(1<<x);
}
var y=0;
var z=1;
var A=[];
var B=[];
var C={
breakPointsActive:{
value:true,
getValue:function(){return this.value;},
setValue:function(D){
this.value=!!D;
%SetDisableBreak(!this.value);
}
},
breakOnCaughtException:{
getValue:function(){return v.isBreakOnException();},
setValue:function(D){
if(D){
v.setBreakOnException();
}else{
v.clearBreakOnException();
}
}
},
breakOnUncaughtException:{
getValue:function(){return v.isBreakOnUncaughtException();},
setValue:function(D){
if(D){
v.setBreakOnUncaughtException();
}else{
v.clearBreakOnUncaughtException();
}
}
},
};
function MakeBreakPoint(E,F){
var G=new BreakPoint(E,F);
A.push(G);
return G;
}
function BreakPoint(E,F){
this.source_position_=E;
if(F){
this.script_break_point_=F;
}else{
this.number_=z++;
}
this.hit_count_=0;
this.active_=true;
this.condition_=null;
this.ignoreCount_=0;
}
BreakPoint.prototype.number=function(){
return this.number_;
};
BreakPoint.prototype.func=function(){
return this.func_;
};
BreakPoint.prototype.source_position=function(){
return this.source_position_;
};
BreakPoint.prototype.hit_count=function(){
return this.hit_count_;
};
BreakPoint.prototype.active=function(){
if(this.script_break_point()){
return this.script_break_point().active();
}
return this.active_;
};
BreakPoint.prototype.condition=function(){
if(this.script_break_point()&&this.script_break_point().condition()){
return this.script_break_point().condition();
}
return this.condition_;
};
BreakPoint.prototype.ignoreCount=function(){
return this.ignoreCount_;
};
BreakPoint.prototype.script_break_point=function(){
return this.script_break_point_;
};
BreakPoint.prototype.enable=function(){
this.active_=true;
};
BreakPoint.prototype.disable=function(){
this.active_=false;
};
BreakPoint.prototype.setCondition=function(H){
this.condition_=H;
};
BreakPoint.prototype.setIgnoreCount=function(I){
this.ignoreCount_=I;
};
BreakPoint.prototype.isTriggered=function(J){
if(!this.active())return false;
if(this.condition()){
try{
var K=J.frame(0).evaluate(this.condition());
if(!(K instanceof s)||!p(K.value_)){
return false;
}
}catch(e){
return false;
}
}
this.hit_count_++;
if(this.script_break_point_){
this.script_break_point_.hit_count_++;
}
if(this.ignoreCount_>0){
this.ignoreCount_--;
return false;
}
return true;
};
function IsBreakPointTriggered(L,G){
return G.isTriggered(MakeExecutionState(L));
}
function ScriptBreakPoint(x,script_id_or_name,opt_line,opt_column,
opt_groupId,opt_position_alignment){
this.type_=x;
if(x==v.ScriptBreakPointType.ScriptId){
this.script_id_=script_id_or_name;
}else if(x==v.ScriptBreakPointType.ScriptName){
this.script_name_=script_id_or_name;
}else if(x==v.ScriptBreakPointType.ScriptRegExp){
this.script_regexp_object_=new e(script_id_or_name);
}else{
throw MakeError(2,"Unexpected breakpoint type "+x);
}
this.line_=opt_line||0;
this.column_=opt_column;
this.groupId_=opt_groupId;
this.position_alignment_=(opt_position_alignment===(void 0))
?v.BreakPositionAlignment.Statement:opt_position_alignment;
this.hit_count_=0;
this.active_=true;
this.condition_=null;
this.ignoreCount_=0;
this.break_points_=[];
}
ScriptBreakPoint.prototype.cloneForOtherScript=function(M){
var N=new ScriptBreakPoint(v.ScriptBreakPointType.ScriptId,
M.id,this.line_,this.column_,this.groupId_,
this.position_alignment_);
N.number_=z++;
B.push(N);
N.hit_count_=this.hit_count_;
N.active_=this.active_;
N.condition_=this.condition_;
N.ignoreCount_=this.ignoreCount_;
return N;
};
ScriptBreakPoint.prototype.number=function(){
return this.number_;
};
ScriptBreakPoint.prototype.groupId=function(){
return this.groupId_;
};
ScriptBreakPoint.prototype.type=function(){
return this.type_;
};
ScriptBreakPoint.prototype.script_id=function(){
return this.script_id_;
};
ScriptBreakPoint.prototype.script_name=function(){
return this.script_name_;
};
ScriptBreakPoint.prototype.script_regexp_object=function(){
return this.script_regexp_object_;
};
ScriptBreakPoint.prototype.line=function(){
return this.line_;
};
ScriptBreakPoint.prototype.column=function(){
return this.column_;
};
ScriptBreakPoint.prototype.actual_locations=function(){
var O=[];
for(var P=0;P<this.break_points_.length;P++){
O.push(this.break_points_[P].actual_location);
}
return O;
};
ScriptBreakPoint.prototype.update_positions=function(Q,R){
this.line_=Q;
this.column_=R;
};
ScriptBreakPoint.prototype.hit_count=function(){
return this.hit_count_;
};
ScriptBreakPoint.prototype.active=function(){
return this.active_;
};
ScriptBreakPoint.prototype.condition=function(){
return this.condition_;
};
ScriptBreakPoint.prototype.ignoreCount=function(){
return this.ignoreCount_;
};
ScriptBreakPoint.prototype.enable=function(){
this.active_=true;
};
ScriptBreakPoint.prototype.disable=function(){
this.active_=false;
};
ScriptBreakPoint.prototype.setCondition=function(H){
this.condition_=H;
};
ScriptBreakPoint.prototype.setIgnoreCount=function(I){
this.ignoreCount_=I;
for(var P=0;P<this.break_points_.length;P++){
this.break_points_[P].setIgnoreCount(I);
}
};
ScriptBreakPoint.prototype.matchesScript=function(S){
if(this.type_==v.ScriptBreakPointType.ScriptId){
return this.script_id_==S.id;
}else{
if(!(S.line_offset<=this.line_&&
this.line_<S.line_offset+S.lineCount())){
return false;
}
if(this.type_==v.ScriptBreakPointType.ScriptName){
return this.script_name_==S.nameOrSourceURL();
}else if(this.type_==v.ScriptBreakPointType.ScriptRegExp){
return this.script_regexp_object_.test(S.nameOrSourceURL());
}else{
throw MakeError(2,"Unexpected breakpoint type "+this.type_);
}
}
};
ScriptBreakPoint.prototype.set=function(S){
var R=this.column();
var Q=this.line();
if((R===(void 0))){
var T=S.sourceLine(this.line());
if(!S.sourceColumnStart_){
S.sourceColumnStart_=new d(S.lineCount());
}
if((S.sourceColumnStart_[Q]===(void 0))){
S.sourceColumnStart_[Q]=
T.match(w)[0].length;
}
R=S.sourceColumnStart_[Q];
}
var U=v.findScriptSourcePosition(S,this.line(),R);
if((U===null))return;
var G=MakeBreakPoint(U,this);
G.setIgnoreCount(this.ignoreCount());
var V=%SetScriptBreakPoint(S,U,
this.position_alignment_,
G);
if((V===(void 0))){
V=U;
}
var W=S.locationFromPosition(V,true);
G.actual_location={line:W.line,
column:W.column,
script_id:S.id};
this.break_points_.push(G);
return G;
};
ScriptBreakPoint.prototype.clear=function(){
var X=[];
for(var P=0;P<A.length;P++){
if(A[P].script_break_point()&&
A[P].script_break_point()===this){
%ClearBreakPoint(A[P]);
}else{
X.push(A[P]);
}
}
A=X;
this.break_points_=[];
};
function UpdateScriptBreakPoints(S){
for(var P=0;P<B.length;P++){
var G=B[P];
if((G.type()==v.ScriptBreakPointType.ScriptName||
G.type()==v.ScriptBreakPointType.ScriptRegExp)&&
G.matchesScript(S)){
G.set(S);
}
}
}
function GetScriptBreakPoints(S){
var Y=[];
for(var P=0;P<B.length;P++){
if(B[P].matchesScript(S)){
Y.push(B[P]);
}
}
return Y;
}
v.setListener=function(Z,aa){
if(!(%_IsFunction(Z))&&!(Z===(void 0))&&!(Z===null)){
throw MakeTypeError(26);
}
%SetDebugEventListener(Z,aa);
};
v.breakLocations=function(ab,ac){
if(!(%_IsFunction(ab)))throw MakeTypeError(26);
var ad=(ac===(void 0))
?v.BreakPositionAlignment.Statement:ac;
return %GetBreakLocations(ab,ad);
};
v.findScript=function(ae){
if((%_IsFunction(ae))){
return %FunctionGetScript(ae);
}else if((%_IsRegExp(ae))){
var af=v.scripts();
var ag=null;
var ah=0;
for(var P in af){
var S=af[P];
if(ae.test(S.name)){
ag=S;
ah++;
}
}
if(ah==1){
return ag;
}else{
return(void 0);
}
}else{
return %GetScript(ae);
}
};
v.scriptSource=function(ae){
return this.findScript(ae).source;
};
v.source=function(ab){
if(!(%_IsFunction(ab)))throw MakeTypeError(26);
return %FunctionGetSourceCode(ab);
};
v.sourcePosition=function(ab){
if(!(%_IsFunction(ab)))throw MakeTypeError(26);
return %FunctionGetScriptSourcePosition(ab);
};
v.findFunctionSourceLocation=function(ai,aj,ak){
var S=%FunctionGetScript(ai);
var al=%FunctionGetScriptSourcePosition(ai);
return S.locationFromLine(aj,ak,al);
};
v.findScriptSourcePosition=function(S,aj,ak){
var am=S.locationFromLine(aj,ak);
return am?am.position:null;
};
v.findBreakPoint=function(an,ao){
var G;
for(var P=0;P<A.length;P++){
if(A[P].number()==an){
G=A[P];
if(ao){
A.splice(P,1);
}
break;
}
}
if(G){
return G;
}else{
return this.findScriptBreakPoint(an,ao);
}
};
v.findBreakPointActualLocations=function(an){
for(var P=0;P<B.length;P++){
if(B[P].number()==an){
return B[P].actual_locations();
}
}
for(var P=0;P<A.length;P++){
if(A[P].number()==an){
return[A[P].actual_location];
}
}
return[];
};
v.setBreakPoint=function(ai,aj,ak,ap){
if(!(%_IsFunction(ai)))throw MakeTypeError(26);
if(%FunctionIsAPIFunction(ai)){
throw MakeError(2,'Cannot set break point in native code.');
}
var aq=
this.findFunctionSourceLocation(ai,aj,ak).position;
var E=aq-this.sourcePosition(ai);
var S=%FunctionGetScript(ai);
if(S.type==v.ScriptType.Native){
throw MakeError(2,'Cannot set break point in native code.');
}
if(S&&S.id){
E+=%FunctionGetScriptSourcePosition(ai);
var am=S.locationFromPosition(E,false);
return this.setScriptBreakPointById(S.id,
am.line,am.column,
ap);
}else{
var G=MakeBreakPoint(E);
var V=
%SetFunctionBreakPoint(ai,E,G);
V+=this.sourcePosition(ai);
var W=S.locationFromPosition(V,true);
G.actual_location={line:W.line,
column:W.column,
script_id:S.id};
G.setCondition(ap);
return G.number();
}
};
v.setBreakPointByScriptIdAndPosition=function(script_id,U,
H,enabled,
opt_position_alignment)
{
var G=MakeBreakPoint(U);
G.setCondition(H);
if(!enabled){
G.disable();
}
var af=this.scripts();
var ar=(opt_position_alignment===(void 0))
?v.BreakPositionAlignment.Statement:opt_position_alignment;
for(var P=0;P<af.length;P++){
if(script_id==af[P].id){
G.actual_position=%SetScriptBreakPoint(af[P],U,
ar,G);
break;
}
}
return G;
};
v.enableBreakPoint=function(an){
var G=this.findBreakPoint(an,false);
if(G){
G.enable();
}
};
v.disableBreakPoint=function(an){
var G=this.findBreakPoint(an,false);
if(G){
G.disable();
}
};
v.changeBreakPointCondition=function(an,H){
var G=this.findBreakPoint(an,false);
G.setCondition(H);
};
v.changeBreakPointIgnoreCount=function(an,I){
if(I<0)throw MakeError(2,'Invalid argument');
var G=this.findBreakPoint(an,false);
G.setIgnoreCount(I);
};
v.clearBreakPoint=function(an){
var G=this.findBreakPoint(an,true);
if(G){
return %ClearBreakPoint(G);
}else{
G=this.findScriptBreakPoint(an,true);
if(!G)throw MakeError(2,'Invalid breakpoint');
}
};
v.clearAllBreakPoints=function(){
for(var P=0;P<A.length;P++){
var G=A[P];
%ClearBreakPoint(G);
}
A=[];
};
v.disableAllBreakPoints=function(){
for(var P=1;P<z;P++){
v.disableBreakPoint(P);
}
%ChangeBreakOnException(v.ExceptionBreak.Caught,false);
%ChangeBreakOnException(v.ExceptionBreak.Uncaught,false);
};
v.findScriptBreakPoint=function(an,ao){
var as;
for(var P=0;P<B.length;P++){
if(B[P].number()==an){
as=B[P];
if(ao){
as.clear();
B.splice(P,1);
}
break;
}
}
return as;
};
v.setScriptBreakPoint=function(x,script_id_or_name,
aj,ak,ap,
opt_groupId,opt_position_alignment){
var as=
new ScriptBreakPoint(x,script_id_or_name,aj,ak,
opt_groupId,opt_position_alignment);
as.number_=z++;
as.setCondition(ap);
B.push(as);
var af=this.scripts();
for(var P=0;P<af.length;P++){
if(as.matchesScript(af[P])){
as.set(af[P]);
}
}
return as.number();
};
v.setScriptBreakPointById=function(script_id,
aj,ak,
ap,opt_groupId,
opt_position_alignment){
return this.setScriptBreakPoint(v.ScriptBreakPointType.ScriptId,
script_id,aj,ak,
ap,opt_groupId,
opt_position_alignment);
};
v.setScriptBreakPointByName=function(script_name,
aj,ak,
ap,opt_groupId){
return this.setScriptBreakPoint(v.ScriptBreakPointType.ScriptName,
script_name,aj,ak,
ap,opt_groupId);
};
v.setScriptBreakPointByRegExp=function(script_regexp,
aj,ak,
ap,opt_groupId){
return this.setScriptBreakPoint(v.ScriptBreakPointType.ScriptRegExp,
script_regexp,aj,ak,
ap,opt_groupId);
};
v.enableScriptBreakPoint=function(an){
var as=this.findScriptBreakPoint(an,false);
as.enable();
};
v.disableScriptBreakPoint=function(an){
var as=this.findScriptBreakPoint(an,false);
as.disable();
};
v.changeScriptBreakPointCondition=function(
an,H){
var as=this.findScriptBreakPoint(an,false);
as.setCondition(H);
};
v.changeScriptBreakPointIgnoreCount=function(
an,I){
if(I<0)throw MakeError(2,'Invalid argument');
var as=this.findScriptBreakPoint(an,false);
as.setIgnoreCount(I);
};
v.scriptBreakPoints=function(){
return B;
};
v.clearStepping=function(){
%ClearStepping();
};
v.setBreakOnException=function(){
return %ChangeBreakOnException(v.ExceptionBreak.Caught,true);
};
v.clearBreakOnException=function(){
return %ChangeBreakOnException(v.ExceptionBreak.Caught,false);
};
v.isBreakOnException=function(){
return!!%IsBreakOnException(v.ExceptionBreak.Caught);
};
v.setBreakOnUncaughtException=function(){
return %ChangeBreakOnException(v.ExceptionBreak.Uncaught,true);
};
v.clearBreakOnUncaughtException=function(){
return %ChangeBreakOnException(v.ExceptionBreak.Uncaught,false);
};
v.isBreakOnUncaughtException=function(){
return!!%IsBreakOnException(v.ExceptionBreak.Uncaught);
};
v.showBreakPoints=function(ab,at,au){
if(!(%_IsFunction(ab)))throw MakeError(26);
var av=at?this.scriptSource(ab):this.source(ab);
var aw=at?this.sourcePosition(ab):0;
var O=this.breakLocations(ab,au);
if(!O)return av;
O.sort(function(ax,ay){return ax-ay;});
var Y="";
var az=0;
var aA;
for(var P=0;P<O.length;P++){
aA=O[P]-aw;
Y+=av.slice(az,aA);
Y+="[B"+P+"]";
az=aA;
}
aA=av.length;
Y+=av.substring(az,aA);
return Y;
};
v.scripts=function(){
return %DebugGetLoadedScripts();
};
v.debuggerFlags=function(){
return C;
};
v.MakeMirror=j;
function MakeExecutionState(L){
return new ExecutionState(L);
}
function ExecutionState(L){
this.break_id=L;
this.selected_frame=0;
}
ExecutionState.prototype.prepareStep=function(opt_action,opt_count,
opt_callframe){
var aB=v.StepAction.StepIn;
if(!(opt_action===(void 0)))aB=q(opt_action);
var aC=opt_count?q(opt_count):1;
var aD=0;
if(!(opt_callframe===(void 0))){
aD=opt_callframe.details_.frameId();
}
return %PrepareStep(this.break_id,aB,aC,aD);
};
ExecutionState.prototype.evaluateGlobal=function(av,disable_break,
opt_additional_context){
return j(%DebugEvaluateGlobal(this.break_id,av,
p(disable_break),
opt_additional_context));
};
ExecutionState.prototype.frameCount=function(){
return %GetFrameCount(this.break_id);
};
ExecutionState.prototype.threadCount=function(){
return %GetThreadCount(this.break_id);
};
ExecutionState.prototype.frame=function(aE){
if(aE==null)aE=this.selected_frame;
if(aE<0||aE>=this.frameCount()){
throw MakeTypeError(25);
}
return new c(this.break_id,aE);
};
ExecutionState.prototype.setSelectedFrame=function(aF){
var P=q(aF);
if(P<0||P>=this.frameCount()){
throw MakeTypeError(25);
}
this.selected_frame=P;
};
ExecutionState.prototype.selectedFrame=function(){
return this.selected_frame;
};
ExecutionState.prototype.debugCommandProcessor=function(aG){
return new DebugCommandProcessor(this,aG);
};
function MakeBreakEvent(L,aH){
return new BreakEvent(L,aH);
}
function BreakEvent(L,aH){
this.frame_=new c(L,0);
this.break_points_hit_=aH;
}
BreakEvent.prototype.eventType=function(){
return v.DebugEvent.Break;
};
BreakEvent.prototype.func=function(){
return this.frame_.func();
};
BreakEvent.prototype.sourceLine=function(){
return this.frame_.sourceLine();
};
BreakEvent.prototype.sourceColumn=function(){
return this.frame_.sourceColumn();
};
BreakEvent.prototype.sourceLineText=function(){
return this.frame_.sourceLineText();
};
BreakEvent.prototype.breakPointsHit=function(){
return this.break_points_hit_;
};
BreakEvent.prototype.toJSONProtocol=function(){
var aI={seq:y++,
type:"event",
event:"break",
body:{invocationText:this.frame_.invocationText()}
};
var S=this.func().script();
if(S){
aI.body.sourceLine=this.sourceLine(),
aI.body.sourceColumn=this.sourceColumn(),
aI.body.sourceLineText=this.sourceLineText(),
aI.body.script=MakeScriptObject_(S,false);
}
if(this.breakPointsHit()){
aI.body.breakpoints=[];
for(var P=0;P<this.breakPointsHit().length;P++){
var aJ=this.breakPointsHit()[P];
var as=aJ.script_break_point();
var aK;
if(as){
aK=as.number();
}else{
aK=aJ.number();
}
aI.body.breakpoints.push(aK);
}
}
return h(ObjectToProtocolObject_(aI));
};
function MakeExceptionEvent(L,aL,aM,aN){
return new ExceptionEvent(L,aL,aM,aN);
}
function ExceptionEvent(L,aL,aM,aN){
this.exec_state_=new ExecutionState(L);
this.exception_=aL;
this.uncaught_=aM;
this.promise_=aN;
}
ExceptionEvent.prototype.eventType=function(){
return v.DebugEvent.Exception;
};
ExceptionEvent.prototype.exception=function(){
return this.exception_;
};
ExceptionEvent.prototype.uncaught=function(){
return this.uncaught_;
};
ExceptionEvent.prototype.promise=function(){
return this.promise_;
};
ExceptionEvent.prototype.func=function(){
return this.exec_state_.frame(0).func();
};
ExceptionEvent.prototype.sourceLine=function(){
return this.exec_state_.frame(0).sourceLine();
};
ExceptionEvent.prototype.sourceColumn=function(){
return this.exec_state_.frame(0).sourceColumn();
};
ExceptionEvent.prototype.sourceLineText=function(){
return this.exec_state_.frame(0).sourceLineText();
};
ExceptionEvent.prototype.toJSONProtocol=function(){
var aI=new ProtocolMessage();
aI.event="exception";
aI.body={uncaught:this.uncaught_,
exception:j(this.exception_)
};
if(this.exec_state_.frameCount()>0){
aI.body.sourceLine=this.sourceLine();
aI.body.sourceColumn=this.sourceColumn();
aI.body.sourceLineText=this.sourceLineText();
var S=this.func().script();
if(S){
aI.body.script=MakeScriptObject_(S,false);
}
}else{
aI.body.sourceLine=-1;
}
return aI.toJSONProtocol();
};
function MakeCompileEvent(S,x){
return new CompileEvent(S,x);
}
function CompileEvent(S,x){
this.script_=j(S);
this.type_=x;
}
CompileEvent.prototype.eventType=function(){
return this.type_;
};
CompileEvent.prototype.script=function(){
return this.script_;
};
CompileEvent.prototype.toJSONProtocol=function(){
var aI=new ProtocolMessage();
aI.running=true;
switch(this.type_){
case v.DebugEvent.BeforeCompile:
aI.event="beforeCompile";
break;
case v.DebugEvent.AfterCompile:
aI.event="afterCompile";
break;
case v.DebugEvent.CompileError:
aI.event="compileError";
break;
}
aI.body={};
aI.body.script=this.script_;
return aI.toJSONProtocol();
};
function MakeScriptObject_(S,aO){
var aI={id:S.id(),
name:S.name(),
lineOffset:S.lineOffset(),
columnOffset:S.columnOffset(),
lineCount:S.lineCount(),
};
if(!(S.data()===(void 0))){
aI.data=S.data();
}
if(aO){
aI.source=S.source();
}
return aI;
}
function MakePromiseEvent(aP){
return new PromiseEvent(aP);
}
function PromiseEvent(aP){
this.promise_=aP.promise;
this.parentPromise_=aP.parentPromise;
this.status_=aP.status;
this.value_=aP.value;
}
PromiseEvent.prototype.promise=function(){
return j(this.promise_);
}
PromiseEvent.prototype.parentPromise=function(){
return j(this.parentPromise_);
}
PromiseEvent.prototype.status=function(){
return this.status_;
}
PromiseEvent.prototype.value=function(){
return j(this.value_);
}
function MakeAsyncTaskEvent(aP){
return new AsyncTaskEvent(aP);
}
function AsyncTaskEvent(aP){
this.type_=aP.type;
this.name_=aP.name;
this.id_=aP.id;
}
AsyncTaskEvent.prototype.type=function(){
return this.type_;
}
AsyncTaskEvent.prototype.name=function(){
return this.name_;
}
AsyncTaskEvent.prototype.id=function(){
return this.id_;
}
function DebugCommandProcessor(J,aG){
this.exec_state_=J;
this.running_=aG||false;
}
DebugCommandProcessor.prototype.processDebugRequest=function(aQ){
return this.processDebugJSONRequest(aQ);
};
function ProtocolMessage(aQ){
this.seq=y++;
if(aQ){
this.type='response';
this.request_seq=aQ.seq;
this.command=aQ.command;
}else{
this.type='event';
}
this.success=true;
this.running=(void 0);
}
ProtocolMessage.prototype.setOption=function(aR,D){
if(!this.options_){
this.options_={};
}
this.options_[aR]=D;
};
ProtocolMessage.prototype.failed=function(aS,aT){
this.success=false;
this.message=aS;
if((typeof(aT)==='object')){
this.error_details=aT;
}
};
ProtocolMessage.prototype.toJSONProtocol=function(){
var aU={};
aU.seq=this.seq;
if(this.request_seq){
aU.request_seq=this.request_seq;
}
aU.type=this.type;
if(this.event){
aU.event=this.event;
}
if(this.command){
aU.command=this.command;
}
if(this.success){
aU.success=this.success;
}else{
aU.success=false;
}
if(this.body){
var aV;
var aW=k(true,this.options_);
if(this.body instanceof m){
aV=aW.serializeValue(this.body);
}else if(this.body instanceof d){
aV=[];
for(var P=0;P<this.body.length;P++){
if(this.body[P]instanceof m){
aV.push(aW.serializeValue(this.body[P]));
}else{
aV.push(ObjectToProtocolObject_(this.body[P],aW));
}
}
}else{
aV=ObjectToProtocolObject_(this.body,aW);
}
aU.body=aV;
aU.refs=aW.serializeReferencedObjects();
}
if(this.message){
aU.message=this.message;
}
if(this.error_details){
aU.error_details=this.error_details;
}
aU.running=this.running;
return h(aU);
};
DebugCommandProcessor.prototype.createResponse=function(aQ){
return new ProtocolMessage(aQ);
};
DebugCommandProcessor.prototype.processDebugJSONRequest=function(
json_request){
var aQ;
var aX;
try{
try{
aQ=g(json_request);
aX=this.createResponse(aQ);
if(!aQ.type){
throw MakeError(2,'Type not specified');
}
if(aQ.type!='request'){
throw MakeError(2,
"Illegal type '"+aQ.type+"' in request");
}
if(!aQ.command){
throw MakeError(2,'Command not specified');
}
if(aQ.arguments){
var aY=aQ.arguments;
if(aY.inlineRefs||aY.compactFormat){
aX.setOption('inlineRefs',true);
}
if(!(aY.maxStringLength===(void 0))){
aX.setOption('maxStringLength',aY.maxStringLength);
}
}
var aZ=aQ.command.toLowerCase();
var ba=DebugCommandProcessor.prototype.dispatch_[aZ];
if((%_IsFunction(ba))){
%_CallFunction(this,aQ,aX,ba);
}else{
throw MakeError(2,
'Unknown command "'+aQ.command+'" in request');
}
}catch(e){
if(!aX){
aX=this.createResponse();
}
aX.success=false;
aX.message=r(e);
}
try{
if(!(aX.running===(void 0))){
this.running_=aX.running;
}
aX.running=this.running_;
return aX.toJSONProtocol();
}catch(e){
return'{"seq":'+aX.seq+','+
'"request_seq":'+aQ.seq+','+
'"type":"response",'+
'"success":false,'+
'"message":"Internal error: '+r(e)+'"}';
}
}catch(e){
return'{"seq":0,"type":"response","success":false,"message":"Internal error"}';
}
};
DebugCommandProcessor.prototype.continueRequest_=function(aQ,aX){
if(aQ.arguments){
var aC=1;
var aB=v.StepAction.StepIn;
var bb=aQ.arguments.stepaction;
var bc=aQ.arguments.stepcount;
if(bc){
aC=q(bc);
if(aC<0){
throw MakeError(2,
'Invalid stepcount argument "'+bc+'".');
}
}
if(bb){
if(bb=='in'){
aB=v.StepAction.StepIn;
}else if(bb=='min'){
aB=v.StepAction.StepMin;
}else if(bb=='next'){
aB=v.StepAction.StepNext;
}else if(bb=='out'){
aB=v.StepAction.StepOut;
}else{
throw MakeError(2,
'Invalid stepaction argument "'+bb+'".');
}
}
this.exec_state_.prepareStep(aB,aC);
}
aX.running=true;
};
DebugCommandProcessor.prototype.breakRequest_=function(aQ,aX){
};
DebugCommandProcessor.prototype.setBreakPointRequest_=
function(aQ,aX){
if(!aQ.arguments){
aX.failed('Missing arguments');
return;
}
var x=aQ.arguments.type;
var bd=aQ.arguments.target;
var Q=aQ.arguments.line;
var R=aQ.arguments.column;
var be=(aQ.arguments.enabled===(void 0))?
true:aQ.arguments.enabled;
var H=aQ.arguments.condition;
var I=aQ.arguments.ignoreCount;
var bf=aQ.arguments.groupId;
if(!x||(bd===(void 0))){
aX.failed('Missing argument "type" or "target"');
return;
}
var an;
if(x=='function'){
if(!(typeof(bd)==='string')){
aX.failed('Argument "target" is not a string value');
return;
}
var ab;
try{
ab=this.exec_state_.evaluateGlobal(bd).value();
}catch(e){
aX.failed('Error: "'+r(e)+
'" evaluating "'+bd+'"');
return;
}
if(!(%_IsFunction(ab))){
aX.failed('"'+bd+'" does not evaluate to a function');
return;
}
an=v.setBreakPoint(ab,Q,R,H);
}else if(x=='handle'){
var bg=o(bd,10);
var K=i(bg);
if(!K){
return aX.failed('Object #'+bg+'# not found');
}
if(!K.isFunction()){
return aX.failed('Object #'+bg+'# is not a function');
}
an=v.setBreakPoint(K.value(),
Q,R,H);
}else if(x=='script'){
an=
v.setScriptBreakPointByName(bd,Q,R,H,
bf);
}else if(x=='scriptId'){
an=
v.setScriptBreakPointById(bd,Q,R,H,bf);
}else if(x=='scriptRegExp'){
an=
v.setScriptBreakPointByRegExp(bd,Q,R,H,
bf);
}else{
aX.failed('Illegal type "'+x+'"');
return;
}
var G=v.findBreakPoint(an);
if(I){
v.changeBreakPointIgnoreCount(an,I);
}
if(!be){
v.disableBreakPoint(an);
}
aX.body={type:x,
breakpoint:an};
if(G instanceof ScriptBreakPoint){
if(G.type()==v.ScriptBreakPointType.ScriptId){
aX.body.type='scriptId';
aX.body.script_id=G.script_id();
}else if(G.type()==v.ScriptBreakPointType.ScriptName){
aX.body.type='scriptName';
aX.body.script_name=G.script_name();
}else if(G.type()==v.ScriptBreakPointType.ScriptRegExp){
aX.body.type='scriptRegExp';
aX.body.script_regexp=G.script_regexp_object().source;
}else{
throw MakeError(2,
"Unexpected breakpoint type: "+G.type());
}
aX.body.line=G.line();
aX.body.column=G.column();
aX.body.actual_locations=G.actual_locations();
}else{
aX.body.type='function';
aX.body.actual_locations=[G.actual_location];
}
};
DebugCommandProcessor.prototype.changeBreakPointRequest_=function(
aQ,aX){
if(!aQ.arguments){
aX.failed('Missing arguments');
return;
}
var G=q(aQ.arguments.breakpoint);
var be=aQ.arguments.enabled;
var H=aQ.arguments.condition;
var I=aQ.arguments.ignoreCount;
if(!G){
aX.failed('Missing argument "breakpoint"');
return;
}
if(!(be===(void 0))){
if(be){
v.enableBreakPoint(G);
}else{
v.disableBreakPoint(G);
}
}
if(!(H===(void 0))){
v.changeBreakPointCondition(G,H);
}
if(!(I===(void 0))){
v.changeBreakPointIgnoreCount(G,I);
}
};
DebugCommandProcessor.prototype.clearBreakPointGroupRequest_=function(
aQ,aX){
if(!aQ.arguments){
aX.failed('Missing arguments');
return;
}
var bh=aQ.arguments.groupId;
if(!bh){
aX.failed('Missing argument "groupId"');
return;
}
var bi=[];
var bj=[];
for(var P=0;P<B.length;P++){
var bk=B[P];
if(bk.groupId()==bh){
bi.push(bk.number());
bk.clear();
}else{
bj.push(bk);
}
}
B=bj;
aX.body={breakpoints:bi};
};
DebugCommandProcessor.prototype.clearBreakPointRequest_=function(
aQ,aX){
if(!aQ.arguments){
aX.failed('Missing arguments');
return;
}
var G=q(aQ.arguments.breakpoint);
if(!G){
aX.failed('Missing argument "breakpoint"');
return;
}
v.clearBreakPoint(G);
aX.body={breakpoint:G};
};
DebugCommandProcessor.prototype.listBreakpointsRequest_=function(
aQ,aX){
var bl=[];
for(var P=0;P<B.length;P++){
var G=B[P];
var bm={
number:G.number(),
line:G.line(),
column:G.column(),
groupId:G.groupId(),
hit_count:G.hit_count(),
active:G.active(),
condition:G.condition(),
ignoreCount:G.ignoreCount(),
actual_locations:G.actual_locations()
};
if(G.type()==v.ScriptBreakPointType.ScriptId){
bm.type='scriptId';
bm.script_id=G.script_id();
}else if(G.type()==v.ScriptBreakPointType.ScriptName){
bm.type='scriptName';
bm.script_name=G.script_name();
}else if(G.type()==v.ScriptBreakPointType.ScriptRegExp){
bm.type='scriptRegExp';
bm.script_regexp=G.script_regexp_object().source;
}else{
throw MakeError(2,
"Unexpected breakpoint type: "+G.type());
}
bl.push(bm);
}
aX.body={
breakpoints:bl,
breakOnExceptions:v.isBreakOnException(),
breakOnUncaughtExceptions:v.isBreakOnUncaughtException()
};
};
DebugCommandProcessor.prototype.disconnectRequest_=
function(aQ,aX){
v.disableAllBreakPoints();
this.continueRequest_(aQ,aX);
};
DebugCommandProcessor.prototype.setExceptionBreakRequest_=
function(aQ,aX){
if(!aQ.arguments){
aX.failed('Missing arguments');
return;
}
var x=aQ.arguments.type;
if(!x){
aX.failed('Missing argument "type"');
return;
}
var be;
if(x=='all'){
be=!v.isBreakOnException();
}else if(x=='uncaught'){
be=!v.isBreakOnUncaughtException();
}
if(!(aQ.arguments.enabled===(void 0))){
be=aQ.arguments.enabled;
if((be!=true)&&(be!=false)){
aX.failed('Illegal value for "enabled":"'+be+'"');
}
}
if(x=='all'){
%ChangeBreakOnException(v.ExceptionBreak.Caught,be);
}else if(x=='uncaught'){
%ChangeBreakOnException(v.ExceptionBreak.Uncaught,be);
}else{
aX.failed('Unknown "type":"'+x+'"');
}
aX.body={'type':x,'enabled':be};
};
DebugCommandProcessor.prototype.backtraceRequest_=function(
aQ,aX){
var bn=this.exec_state_.frameCount();
if(bn==0){
aX.body={
totalFrames:bn
};
return;
}
var bo=0;
var bp=u;
if(aQ.arguments){
if(aQ.arguments.fromFrame){
bo=aQ.arguments.fromFrame;
}
if(aQ.arguments.toFrame){
bp=aQ.arguments.toFrame;
}
if(aQ.arguments.bottom){
var bq=bn-bo;
bo=bn-bp;
bp=bq;
}
if(bo<0||bp<0){
return aX.failed('Invalid frame number');
}
}
bp=l(bn,bp);
if(bp<=bo){
var br='Invalid frame range';
return aX.failed(br);
}
var bs=[];
for(var P=bo;P<bp;P++){
bs.push(this.exec_state_.frame(P));
}
aX.body={
fromFrame:bo,
toFrame:bp,
totalFrames:bn,
frames:bs
};
};
DebugCommandProcessor.prototype.frameRequest_=function(aQ,aX){
if(this.exec_state_.frameCount()==0){
return aX.failed('No frames');
}
if(aQ.arguments){
var aF=aQ.arguments.number;
if(aF<0||this.exec_state_.frameCount()<=aF){
return aX.failed('Invalid frame number');
}
this.exec_state_.setSelectedFrame(aQ.arguments.number);
}
aX.body=this.exec_state_.frame();
};
DebugCommandProcessor.prototype.resolveFrameFromScopeDescription_=
function(bt){
if(bt&&!(bt.frameNumber===(void 0))){
var bu=bt.frameNumber;
if(bu<0||this.exec_state_.frameCount()<=bu){
throw MakeTypeError(25);
}
return this.exec_state_.frame(bu);
}else{
return this.exec_state_.frame();
}
};
DebugCommandProcessor.prototype.resolveScopeHolder_=
function(bt){
if(bt&&"functionHandle"in bt){
if(!(typeof(bt.functionHandle)==='number')){
throw MakeError(2,'Function handle must be a number');
}
var bv=i(bt.functionHandle);
if(!bv){
throw MakeError(2,'Failed to find function object by handle');
}
if(!bv.isFunction()){
throw MakeError(2,
'Value of non-function type is found by handle');
}
return bv;
}else{
if(this.exec_state_.frameCount()==0){
throw MakeError(2,'No scopes');
}
var bw=this.resolveFrameFromScopeDescription_(bt);
return bw;
}
}
DebugCommandProcessor.prototype.scopesRequest_=function(aQ,aX){
var bx=this.resolveScopeHolder_(aQ.arguments);
var by=bx.scopeCount();
var bz=[];
for(var P=0;P<by;P++){
bz.push(bx.scope(P));
}
aX.body={
fromScope:0,
toScope:by,
totalScopes:by,
scopes:bz
};
};
DebugCommandProcessor.prototype.scopeRequest_=function(aQ,aX){
var bx=this.resolveScopeHolder_(aQ.arguments);
var bA=0;
if(aQ.arguments&&!(aQ.arguments.number===(void 0))){
bA=q(aQ.arguments.number);
if(bA<0||bx.scopeCount()<=bA){
return aX.failed('Invalid scope number');
}
}
aX.body=bx.scope(bA);
};
DebugCommandProcessor.resolveValue_=function(bB){
if("handle"in bB){
var bC=i(bB.handle);
if(!bC){
throw MakeError(2,"Failed to resolve value by handle, ' #"+
bB.handle+"# not found");
}
return bC.value();
}else if("stringDescription"in bB){
if(bB.type==n.BOOLEAN_TYPE){
return p(bB.stringDescription);
}else if(bB.type==n.NUMBER_TYPE){
return q(bB.stringDescription);
}if(bB.type==n.STRING_TYPE){
return r(bB.stringDescription);
}else{
throw MakeError(2,"Unknown type");
}
}else if("value"in bB){
return bB.value;
}else if(bB.type==n.UNDEFINED_TYPE){
return(void 0);
}else if(bB.type==n.NULL_TYPE){
return null;
}else{
throw MakeError(2,"Failed to parse value description");
}
};
DebugCommandProcessor.prototype.setVariableValueRequest_=
function(aQ,aX){
if(!aQ.arguments){
aX.failed('Missing arguments');
return;
}
if((aQ.arguments.name===(void 0))){
aX.failed('Missing variable name');
}
var bD=aQ.arguments.name;
var bt=aQ.arguments.scope;
var bx=this.resolveScopeHolder_(bt);
if((bt.number===(void 0))){
aX.failed('Missing scope number');
}
var bA=q(bt.number);
var bE=bx.scope(bA);
var bF=
DebugCommandProcessor.resolveValue_(aQ.arguments.newValue);
bE.setVariableValue(bD,bF);
var bG=j(bF);
aX.body={
newValue:bG
};
};
DebugCommandProcessor.prototype.evaluateRequest_=function(aQ,aX){
if(!aQ.arguments){
return aX.failed('Missing arguments');
}
var bH=aQ.arguments.expression;
var bw=aQ.arguments.frame;
var a=aQ.arguments.global;
var bI=aQ.arguments.disable_break;
var bJ=aQ.arguments.additional_context;
try{
bH=r(bH);
}catch(e){
return aX.failed('Failed to convert expression argument to string');
}
if(!(bw===(void 0))&&a){
return aX.failed('Arguments "frame" and "global" are exclusive');
}
var bK;
if(bJ){
bK={};
for(var P=0;P<bJ.length;P++){
var bL=bJ[P];
if(!(typeof(bL.name)==='string')){
return aX.failed("Context element #"+P+
" doesn't contain name:string property");
}
var bM=DebugCommandProcessor.resolveValue_(bL);
bK[bL.name]=bM;
}
}
if(a){
aX.body=this.exec_state_.evaluateGlobal(
bH,p(bI),bK);
return;
}
if((bI===(void 0))){
bI=true;
}
if(this.exec_state_.frameCount()==0){
return aX.failed('No frames');
}
if(!(bw===(void 0))){
var bN=q(bw);
if(bN<0||bN>=this.exec_state_.frameCount()){
return aX.failed('Invalid frame "'+bw+'"');
}
aX.body=this.exec_state_.frame(bN).evaluate(
bH,p(bI),bK);
return;
}else{
aX.body=this.exec_state_.frame().evaluate(
bH,p(bI),bK);
return;
}
};
DebugCommandProcessor.prototype.lookupRequest_=function(aQ,aX){
if(!aQ.arguments){
return aX.failed('Missing arguments');
}
var bO=aQ.arguments.handles;
if((bO===(void 0))){
return aX.failed('Argument "handles" missing');
}
if(!(aQ.arguments.includeSource===(void 0))){
var bP=p(aQ.arguments.includeSource);
aX.setOption('includeSource',bP);
}
var bQ={};
for(var P=0;P<bO.length;P++){
var bg=bO[P];
var K=i(bg);
if(!K){
return aX.failed('Object #'+bg+'# not found');
}
bQ[bg]=K;
}
aX.body=bQ;
};
DebugCommandProcessor.prototype.referencesRequest_=
function(aQ,aX){
if(!aQ.arguments){
return aX.failed('Missing arguments');
}
var x=aQ.arguments.type;
var bg=aQ.arguments.handle;
if((x===(void 0))){
return aX.failed('Argument "type" missing');
}
if((bg===(void 0))){
return aX.failed('Argument "handle" missing');
}
if(x!='referencedBy'&&x!='constructedBy'){
return aX.failed('Invalid type "'+x+'"');
}
var K=i(bg);
if(K){
if(x=='referencedBy'){
aX.body=K.referencedBy();
}else{
aX.body=K.constructedBy();
}
}else{
return aX.failed('Object #'+bg+'# not found');
}
};
DebugCommandProcessor.prototype.sourceRequest_=function(aQ,aX){
if(this.exec_state_.frameCount()==0){
return aX.failed('No source');
}
var bR;
var bS;
var bw=this.exec_state_.frame();
if(aQ.arguments){
bR=aQ.arguments.fromLine;
bS=aQ.arguments.toLine;
if(!(aQ.arguments.frame===(void 0))){
var bN=q(aQ.arguments.frame);
if(bN<0||bN>=this.exec_state_.frameCount()){
return aX.failed('Invalid frame "'+bw+'"');
}
bw=this.exec_state_.frame(bN);
}
}
var S=bw.func().script();
if(!S){
return aX.failed('No source');
}
var bT=S.sourceSlice(bR,bS);
if(!bT){
return aX.failed('Invalid line interval');
}
aX.body={};
aX.body.source=bT.sourceText();
aX.body.fromLine=bT.from_line;
aX.body.toLine=bT.to_line;
aX.body.fromPosition=bT.from_position;
aX.body.toPosition=bT.to_position;
aX.body.totalLines=S.lineCount();
};
DebugCommandProcessor.prototype.scriptsRequest_=function(aQ,aX){
var bU=ScriptTypeFlag(v.ScriptType.Normal);
var bP=false;
var bV=null;
if(aQ.arguments){
if(!(aQ.arguments.types===(void 0))){
bU=q(aQ.arguments.types);
if(f(bU)||bU<0){
return aX.failed('Invalid types "'+
aQ.arguments.types+'"');
}
}
if(!(aQ.arguments.includeSource===(void 0))){
bP=p(aQ.arguments.includeSource);
aX.setOption('includeSource',bP);
}
if((%_IsArray(aQ.arguments.ids))){
bV={};
var bW=aQ.arguments.ids;
for(var P=0;P<bW.length;P++){
bV[bW[P]]=true;
}
}
var bX=null;
var bY=null;
if(!(aQ.arguments.filter===(void 0))){
var bZ=q(aQ.arguments.filter);
if(!f(bZ)){
bY=bZ;
}
bX=aQ.arguments.filter;
}
}
var af=%DebugGetLoadedScripts();
aX.body=[];
for(var P=0;P<af.length;P++){
if(bV&&!bV[af[P].id]){
continue;
}
if(bX||bY){
var S=af[P];
var ca=false;
if(bY&&!ca){
if(S.id&&S.id===bY){
ca=true;
}
}
if(bX&&!ca){
if(S.name&&S.name.indexOf(bX)>=0){
ca=true;
}
}
if(!ca)continue;
}
if(bU&ScriptTypeFlag(af[P].type)){
aX.body.push(j(af[P]));
}
}
};
DebugCommandProcessor.prototype.threadsRequest_=function(aQ,aX){
var cb=this.exec_state_.threadCount();
var cc=[];
for(var P=0;P<cb;P++){
var cd=%GetThreadDetails(this.exec_state_.break_id,P);
var ce={current:cd[0],
id:cd[1]
};
cc.push(ce);
}
aX.body={
totalThreads:cb,
threads:cc
};
};
DebugCommandProcessor.prototype.suspendRequest_=function(aQ,aX){
aX.running=false;
};
DebugCommandProcessor.prototype.versionRequest_=function(aQ,aX){
aX.body={
V8Version:%GetV8Version()
};
};
DebugCommandProcessor.prototype.changeLiveRequest_=function(
aQ,aX){
if(!aQ.arguments){
return aX.failed('Missing arguments');
}
var cf=aQ.arguments.script_id;
var cg=!!aQ.arguments.preview_only;
var af=%DebugGetLoadedScripts();
var ch=null;
for(var P=0;P<af.length;P++){
if(af[P].id==cf){
ch=af[P];
}
}
if(!ch){
aX.failed('Script not found');
return;
}
var ci=new d();
if(!(typeof(aQ.arguments.new_source)==='string')){
throw"new_source argument expected";
}
var cj=aQ.arguments.new_source;
var ck;
try{
ck=v.LiveEdit.SetScriptSource(ch,
cj,cg,ci);
}catch(e){
if(e instanceof v.LiveEdit.Failure&&"details"in e){
aX.failed(e.message,e.details);
return;
}
throw e;
}
aX.body={change_log:ci,result:ck};
if(!cg&&!this.running_&&ck.stack_modified){
aX.body.stepin_recommended=true;
}
};
DebugCommandProcessor.prototype.restartFrameRequest_=function(
aQ,aX){
if(!aQ.arguments){
return aX.failed('Missing arguments');
}
var bw=aQ.arguments.frame;
if(this.exec_state_.frameCount()==0){
return aX.failed('No frames');
}
var cl;
if(!(bw===(void 0))){
var bN=q(bw);
if(bN<0||bN>=this.exec_state_.frameCount()){
return aX.failed('Invalid frame "'+bw+'"');
}
cl=this.exec_state_.frame(bN);
}else{
cl=this.exec_state_.frame();
}
var ck=v.LiveEdit.RestartFrame(cl);
aX.body={result:ck};
};
DebugCommandProcessor.prototype.debuggerFlagsRequest_=function(aQ,
aX){
if(!aQ.arguments){
aX.failed('Missing arguments');
return;
}
var cm=aQ.arguments.flags;
aX.body={flags:[]};
if(!(cm===(void 0))){
for(var P=0;P<cm.length;P++){
var aR=cm[P].name;
var cn=C[aR];
if(!cn){
continue;
}
if('value'in cm[P]){
cn.setValue(cm[P].value);
}
aX.body.flags.push({name:aR,value:cn.getValue()});
}
}else{
for(var aR in C){
var D=C[aR].getValue();
aX.body.flags.push({name:aR,value:D});
}
}
};
DebugCommandProcessor.prototype.v8FlagsRequest_=function(aQ,aX){
var cm=aQ.arguments.flags;
if(!cm)cm='';
%SetFlags(cm);
};
DebugCommandProcessor.prototype.gcRequest_=function(aQ,aX){
var x=aQ.arguments.type;
if(!x)x='all';
var co=%GetHeapUsage();
%CollectGarbage(x);
var cp=%GetHeapUsage();
aX.body={"before":co,"after":cp};
};
DebugCommandProcessor.prototype.dispatch_=(function(){
var cq=DebugCommandProcessor.prototype;
return{
"continue":cq.continueRequest_,
"break":cq.breakRequest_,
"setbreakpoint":cq.setBreakPointRequest_,
"changebreakpoint":cq.changeBreakPointRequest_,
"clearbreakpoint":cq.clearBreakPointRequest_,
"clearbreakpointgroup":cq.clearBreakPointGroupRequest_,
"disconnect":cq.disconnectRequest_,
"setexceptionbreak":cq.setExceptionBreakRequest_,
"listbreakpoints":cq.listBreakpointsRequest_,
"backtrace":cq.backtraceRequest_,
"frame":cq.frameRequest_,
"scopes":cq.scopesRequest_,
"scope":cq.scopeRequest_,
"setvariablevalue":cq.setVariableValueRequest_,
"evaluate":cq.evaluateRequest_,
"lookup":cq.lookupRequest_,
"references":cq.referencesRequest_,
"source":cq.sourceRequest_,
"scripts":cq.scriptsRequest_,
"threads":cq.threadsRequest_,
"suspend":cq.suspendRequest_,
"version":cq.versionRequest_,
"changelive":cq.changeLiveRequest_,
"restartframe":cq.restartFrameRequest_,
"flags":cq.debuggerFlagsRequest_,
"v8flag":cq.v8FlagsRequest_,
"gc":cq.gcRequest_,
};
})();
DebugCommandProcessor.prototype.isRunning=function(){
return this.running_;
};
DebugCommandProcessor.prototype.systemBreak=function(cr,aY){
return %SystemBreak();
};
function ObjectToProtocolObject_(cs,ct){
var cu={};
for(var aZ in cs){
if(typeof aZ=='string'){
var cv=ValueToProtocolValue_(cs[aZ],
ct);
if(!(cv===(void 0))){
cu[aZ]=cv;
}
}
}
return cu;
}
function ArrayToProtocolArray_(bl,ct){
var aU=[];
for(var P=0;P<bl.length;P++){
aU.push(ValueToProtocolValue_(bl[P],ct));
}
return aU;
}
function ValueToProtocolValue_(D,ct){
var aU;
switch(typeof D){
case'object':
if(D instanceof m){
aU=ct.serializeValue(D);
}else if((%_IsArray(D))){
aU=ArrayToProtocolArray_(D,ct);
}else{
aU=ObjectToProtocolObject_(D,ct);
}
break;
case'boolean':
case'string':
case'number':
aU=D;
break;
default:
aU=null;
}
return aU;
}
b.InstallConstants(a,[
"Debug",v,
"DebugCommandProcessor",DebugCommandProcessor,
]);
b.InstallFunctions(b,2,[
"MakeExecutionState",MakeExecutionState,
"MakeExceptionEvent",MakeExceptionEvent,
"MakeBreakEvent",MakeBreakEvent,
"MakeCompileEvent",MakeCompileEvent,
"MakePromiseEvent",MakePromiseEvent,
"MakeAsyncTaskEvent",MakeAsyncTaskEvent,
"IsBreakPointTriggered",IsBreakPointTriggered,
"UpdateScriptBreakPoints",UpdateScriptBreakPoints,
]);
b.Export(function(cw){
cw.GetScriptBreakPoints=GetScriptBreakPoints;
});
})

 liveedit©õ
(function(a,b){
"use strict";
var c=a.Debug.findScriptSourcePosition;
var d;
var e=a.Array;
var f=a.Math.floor;
var g=a.SyntaxError;
b.Import(function(h){
d=h.GetScriptBreakPoints;
});
var i;
function ApplyPatchMultiChunk(script,diff_array,new_source,preview_only,
change_log){
var j=script.source;
var k=GatherCompileInfo(j,script);
var l=BuildCodeInfoTree(k);
var m=new PosTranslator(diff_array);
MarkChangedFunctions(l,m.GetChunks());
FindLiveSharedInfos(l,script);
var n;
try{
n=GatherCompileInfo(new_source,script);
}catch(e){
var o=
new Failure("Failed to compile new version of script: "+e);
if(e instanceof g){
var p={
type:"liveedit_compile_error",
syntaxErrorMessage:e.message
};
CopyErrorPositionToDetails(e,p);
o.details=p;
}
throw o;
}
var q=BuildCodeInfoTree(n);
FindCorrespondingFunctions(l,q);
var r=new e();
var s=new e();
var t=new e();
var u=new e();
function HarvestTodo(v){
function CollectDamaged(w){
s.push(w);
for(var x=0;x<w.children.length;x++){
CollectDamaged(w.children[x]);
}
}
function CollectNew(y){
for(var x=0;x<y.length;x++){
t.push(y[x]);
CollectNew(y[x].children);
}
}
if(v.status==i.DAMAGED){
CollectDamaged(v);
return;
}
if(v.status==i.UNCHANGED){
u.push(v);
}else if(v.status==i.SOURCE_CHANGED){
u.push(v);
}else if(v.status==i.CHANGED){
r.push(v);
CollectNew(v.unmatched_new_nodes);
}
for(var x=0;x<v.children.length;x++){
HarvestTodo(v.children[x]);
}
}
var z={
change_tree:DescribeChangeTree(l),
textual_diff:{
old_len:j.length,
new_len:new_source.length,
chunks:diff_array
},
updated:false
};
if(preview_only){
return z;
}
HarvestTodo(l);
var A=new e();
for(var x=0;x<r.length;x++){
var B=
r[x].live_shared_function_infos;
if(B){
for(var C=0;C<B.length;C++){
A.push(B[C]);
}
}
}
var D=
CheckStackActivations(A,change_log);
z.stack_modified=D!=0;
var E=TemporaryRemoveBreakPoints(script,change_log);
var F;
if(s.length==0){
%LiveEditReplaceScript(script,new_source,null);
F=(void 0);
}else{
var G=CreateNameForOldScript(script);
F=%LiveEditReplaceScript(script,new_source,
G);
var H=new e();
change_log.push({linked_to_old_script:H});
for(var x=0;x<s.length;x++){
LinkToOldScript(s[x],F,
H);
}
z.created_script_name=G;
}
for(var x=0;x<t.length;x++){
%LiveEditFunctionSetScript(
t[x].info.shared_function_info,script);
}
for(var x=0;x<r.length;x++){
PatchFunctionCode(r[x],change_log);
}
var I=new e();
change_log.push({position_patched:I});
for(var x=0;x<u.length;x++){
PatchPositions(u[x],diff_array,
I);
if(u[x].live_shared_function_infos){
u[x].live_shared_function_infos.
forEach(function(J){
%LiveEditFunctionSourceUpdated(J.raw_array);
});
}
}
E(m,F);
z.updated=true;
return z;
}
function GatherCompileInfo(K,L){
var M=%LiveEditGatherCompileInfo(L,K);
var N=new e();
var O=new e();
for(var x=0;x<M.length;x++){
var J=new FunctionCompileInfo(M[x]);
%LiveEditFunctionSetScript(J.shared_function_info,(void 0));
N.push(J);
O.push(x);
}
for(var x=0;x<N.length;x++){
var P=x;
for(var C=x+1;C<N.length;C++){
if(N[P].start_position>N[C].start_position){
P=C;
}
}
if(P!=x){
var Q=N[P];
var R=O[P];
N[P]=N[x];
O[P]=O[x];
N[x]=Q;
O[x]=R;
}
}
var S=0;
function ResetIndexes(T,U){
var V=-1;
while(S<N.length&&
N[S].outer_index==U){
var W=S;
N[W].outer_index=T;
if(V!=-1){
N[V].next_sibling_index=W;
}
V=W;
S++;
ResetIndexes(W,O[W]);
}
if(V!=-1){
N[V].next_sibling_index=-1;
}
}
ResetIndexes(-1,-1);
Assert(S==N.length);
return N;
}
function PatchFunctionCode(v,X){
var Y=v.corresponding_node.info;
if(v.live_shared_function_infos){
v.live_shared_function_infos.forEach(function(Z){
%LiveEditReplaceFunctionCode(Y.raw_array,
Z.raw_array);
for(var x=0;x<v.children.length;x++){
if(v.children[x].corresponding_node){
var aa=
v.children[x].corresponding_node.info.
shared_function_info;
if(v.children[x].live_shared_function_infos){
v.children[x].live_shared_function_infos.
forEach(function(ab){
%LiveEditReplaceRefToNestedFunction(
Z.info,
aa,
ab.info);
});
}
}
}
});
X.push({function_patched:Y.function_name});
}else{
X.push({function_patched:Y.function_name,
function_info_not_found:true});
}
}
function LinkToOldScript(ac,F,ad){
if(ac.live_shared_function_infos){
ac.live_shared_function_infos.
forEach(function(J){
%LiveEditFunctionSetScript(J.info,F);
});
ad.push({name:ac.info.function_name});
}else{
ad.push(
{name:ac.info.function_name,not_found:true});
}
}
function TemporaryRemoveBreakPoints(ae,X){
var af=d(ae);
var ag=[];
X.push({break_points_update:ag});
var ah=[];
for(var x=0;x<af.length;x++){
var ai=af[x];
ai.clear();
var aj=c(ae,
ai.line(),ai.column());
var ak={
position:aj,
line:ai.line(),
column:ai.column()
};
ah.push(ak);
}
return function(m,al){
for(var x=0;x<af.length;x++){
var ai=af[x];
if(al){
var am=ai.cloneForOtherScript(al);
am.set(al);
ag.push({
type:"copied_to_old",
id:ai.number(),
new_id:am.number(),
positions:ah[x]
});
}
var an=m.Translate(
ah[x].position,
PosTranslator.ShiftWithTopInsideChunkHandler);
var ao=
ae.locationFromPosition(an,false);
ai.update_positions(ao.line,ao.column);
var ap={
position:an,
line:ao.line,
column:ao.column
};
ai.set(ae);
ag.push({type:"position_changed",
id:ai.number(),
old_positions:ah[x],
new_positions:ap
});
}
};
}
function Assert(aq,ar){
if(!aq){
if(ar){
throw"Assert "+ar;
}else{
throw"Assert";
}
}
}
function DiffChunk(as,at,au,av){
this.pos1=as;
this.pos2=at;
this.len1=au;
this.len2=av;
}
function PosTranslator(aw){
var ax=new e();
var ay=0;
for(var x=0;x<aw.length;x+=3){
var az=aw[x];
var aA=az+ay;
var aB=aw[x+1];
var aC=aw[x+2];
ax.push(new DiffChunk(az,aA,aB-az,
aC-aA));
ay=aC-aB;
}
this.chunks=ax;
}
PosTranslator.prototype.GetChunks=function(){
return this.chunks;
};
PosTranslator.prototype.Translate=function(aD,aE){
var aF=this.chunks;
if(aF.length==0||aD<aF[0].pos1){
return aD;
}
var aG=0;
var aH=aF.length-1;
while(aG<aH){
var aI=f((aG+aH)/2);
if(aD<aF[aI+1].pos1){
aH=aI;
}else{
aG=aI+1;
}
}
var aJ=aF[aG];
if(aD>=aJ.pos1+aJ.len1){
return aD+aJ.pos2+aJ.len2-aJ.pos1-aJ.len1;
}
if(!aE){
aE=PosTranslator.DefaultInsideChunkHandler;
}
return aE(aD,aJ);
};
PosTranslator.DefaultInsideChunkHandler=function(aD,aK){
Assert(false,"Cannot translate position in changed area");
};
PosTranslator.ShiftWithTopInsideChunkHandler=
function(aD,aK){
return aD-aK.pos1+aK.pos2;
};
var i={
UNCHANGED:"unchanged",
SOURCE_CHANGED:"source changed",
CHANGED:"changed",
DAMAGED:"damaged"
};
function CodeInfoTreeNode(aL,aM,aN){
this.info=aL;
this.children=aM;
this.array_index=aN;
this.parent=(void 0);
this.status=i.UNCHANGED;
this.status_explanation=(void 0);
this.new_start_pos=(void 0);
this.new_end_pos=(void 0);
this.corresponding_node=(void 0);
this.unmatched_new_nodes=(void 0);
this.textual_corresponding_node=(void 0);
this.textually_unmatched_new_nodes=(void 0);
this.live_shared_function_infos=(void 0);
}
function BuildCodeInfoTree(aO){
var aP=0;
function BuildNode(){
var aQ=aP;
aP++;
var aR=new e();
while(aP<aO.length&&
aO[aP].outer_index==aQ){
aR.push(BuildNode());
}
var w=new CodeInfoTreeNode(aO[aQ],aR,
aQ);
for(var x=0;x<aR.length;x++){
aR[x].parent=w;
}
return w;
}
var aS=BuildNode();
Assert(aP==aO.length);
return aS;
}
function MarkChangedFunctions(aT,ax){
var aU=new function(){
var aV=0;
var aW=0;
this.current=function(){return ax[aV];};
this.next=function(){
var aJ=ax[aV];
aW=aJ.pos2+aJ.len2-(aJ.pos1+aJ.len1);
aV++;
};
this.done=function(){return aV>=ax.length;};
this.TranslatePos=function(aD){return aD+aW;};
};
function ProcessInternals(aX){
aX.new_start_pos=aU.TranslatePos(
aX.info.start_position);
var aY=0;
var aZ=false;
var ba=false;
while(!aU.done()&&
aU.current().pos1<aX.info.end_position){
if(aY<aX.children.length){
var bb=aX.children[aY];
if(bb.info.end_position<=aU.current().pos1){
ProcessUnchangedChild(bb);
aY++;
continue;
}else if(bb.info.start_position>=
aU.current().pos1+aU.current().len1){
aZ=true;
aU.next();
continue;
}else if(bb.info.start_position<=aU.current().pos1&&
bb.info.end_position>=aU.current().pos1+
aU.current().len1){
ProcessInternals(bb);
ba=ba||
(bb.status!=i.UNCHANGED);
aZ=aZ||
(bb.status==i.DAMAGED);
aY++;
continue;
}else{
aZ=true;
bb.status=i.DAMAGED;
bb.status_explanation=
"Text diff overlaps with function boundary";
aY++;
continue;
}
}else{
if(aU.current().pos1+aU.current().len1<=
aX.info.end_position){
aX.status=i.CHANGED;
aU.next();
continue;
}else{
aX.status=i.DAMAGED;
aX.status_explanation=
"Text diff overlaps with function boundary";
return;
}
}
Assert("Unreachable",false);
}
while(aY<aX.children.length){
var bb=aX.children[aY];
ProcessUnchangedChild(bb);
aY++;
}
if(aZ){
aX.status=i.CHANGED;
}else if(ba){
aX.status=i.SOURCE_CHANGED;
}
aX.new_end_pos=
aU.TranslatePos(aX.info.end_position);
}
function ProcessUnchangedChild(w){
w.new_start_pos=aU.TranslatePos(w.info.start_position);
w.new_end_pos=aU.TranslatePos(w.info.end_position);
}
ProcessInternals(aT);
}
function FindCorrespondingFunctions(bc,bd){
function ProcessNode(v,be){
var bf=
IsFunctionContextLocalsChanged(v.info,be.info);
if(bf){
v.status=i.CHANGED;
}
var bg=v.children;
var bh=be.children;
var bi=[];
var bj=[];
var bk=0;
var bl=0;
while(bk<bg.length){
if(bg[bk].status==i.DAMAGED){
bk++;
}else if(bl<bh.length){
if(bh[bl].info.start_position<
bg[bk].new_start_pos){
bi.push(bh[bl]);
bj.push(bh[bl]);
bl++;
}else if(bh[bl].info.start_position==
bg[bk].new_start_pos){
if(bh[bl].info.end_position==
bg[bk].new_end_pos){
bg[bk].corresponding_node=
bh[bl];
bg[bk].textual_corresponding_node=
bh[bl];
if(bf){
bg[bk].status=i.DAMAGED;
bg[bk].status_explanation=
"Enclosing function is now incompatible. "+
bf;
bg[bk].corresponding_node=(void 0);
}else if(bg[bk].status!=
i.UNCHANGED){
ProcessNode(bg[bk],
bh[bl]);
if(bg[bk].status==i.DAMAGED){
bi.push(
bg[bk].corresponding_node);
bg[bk].corresponding_node=(void 0);
v.status=i.CHANGED;
}
}
}else{
bg[bk].status=i.DAMAGED;
bg[bk].status_explanation=
"No corresponding function in new script found";
v.status=i.CHANGED;
bi.push(bh[bl]);
bj.push(bh[bl]);
}
bl++;
bk++;
}else{
bg[bk].status=i.DAMAGED;
bg[bk].status_explanation=
"No corresponding function in new script found";
v.status=i.CHANGED;
bk++;
}
}else{
bg[bk].status=i.DAMAGED;
bg[bk].status_explanation=
"No corresponding function in new script found";
v.status=i.CHANGED;
bk++;
}
}
while(bl<bh.length){
bi.push(bh[bl]);
bj.push(bh[bl]);
bl++;
}
if(v.status==i.CHANGED){
if(v.info.param_num!=be.info.param_num){
v.status=i.DAMAGED;
v.status_explanation="Changed parameter number: "+
v.info.param_num+" and "+be.info.param_num;
}
}
v.unmatched_new_nodes=bi;
v.textually_unmatched_new_nodes=
bj;
}
ProcessNode(bc,bd);
bc.corresponding_node=bd;
bc.textual_corresponding_node=bd;
Assert(bc.status!=i.DAMAGED,
"Script became damaged");
}
function FindLiveSharedInfos(bc,L){
var bm=%LiveEditFindSharedFunctionInfosForScript(L);
var bn=new e();
for(var x=0;x<bm.length;x++){
bn.push(new SharedInfoWrapper(bm[x]));
}
function FindFunctionInfos(N){
var bo=[];
for(var x=0;x<bn.length;x++){
var bp=bn[x];
if(bp.start_position==N.start_position&&
bp.end_position==N.end_position){
bo.push(bp);
}
}
if(bo.length>0){
return bo;
}
}
function TraverseTree(w){
w.live_shared_function_infos=FindFunctionInfos(w.info);
for(var x=0;x<w.children.length;x++){
TraverseTree(w.children[x]);
}
}
TraverseTree(bc);
}
function FunctionCompileInfo(bq){
this.function_name=bq[0];
this.start_position=bq[1];
this.end_position=bq[2];
this.param_num=bq[3];
this.code=bq[4];
this.code_scope_info=bq[5];
this.scope_info=bq[6];
this.outer_index=bq[7];
this.shared_function_info=bq[8];
this.next_sibling_index=null;
this.raw_array=bq;
}
function SharedInfoWrapper(bq){
this.function_name=bq[0];
this.start_position=bq[1];
this.end_position=bq[2];
this.info=bq[3];
this.raw_array=bq;
}
function PatchPositions(ac,aw,ad){
if(ac.live_shared_function_infos){
ac.live_shared_function_infos.forEach(function(J){
%LiveEditPatchFunctionPositions(J.raw_array,
aw);
});
ad.push({name:ac.info.function_name});
}else{
ad.push(
{name:ac.info.function_name,info_not_found:true});
}
}
function CreateNameForOldScript(L){
return L.name+" (old)";
}
function IsFunctionContextLocalsChanged(br,bs){
var bt=br.scope_info;
var bu=bs.scope_info;
var bv;
var bw;
if(bt){
bv=bt.toString();
}else{
bv="";
}
if(bu){
bw=bu.toString();
}else{
bw="";
}
if(bv!=bw){
return"Variable map changed: ["+bv+
"] => ["+bw+"]";
}
return;
}
var bx;
function CheckStackActivations(by,X){
var bz=new e();
for(var x=0;x<by.length;x++){
bz[x]=by[x].info;
}
var bA=%LiveEditCheckAndDropActivations(bz,true);
if(bA[bz.length]){
throw new Failure(bA[bz.length]);
}
var bB=new e();
var bC=new e();
for(var x=0;x<bz.length;x++){
var bD=by[x];
if(bA[x]==bx.REPLACED_ON_ACTIVE_STACK){
bC.push({name:bD.function_name});
}else if(bA[x]!=bx.AVAILABLE_FOR_PATCH){
var bE={
name:bD.function_name,
start_pos:bD.start_position,
end_pos:bD.end_position,
replace_problem:
bx.SymbolName(bA[x])
};
bB.push(bE);
}
}
if(bC.length>0){
X.push({dropped_from_stack:bC});
}
if(bB.length>0){
X.push({functions_on_stack:bB});
throw new Failure("Blocked by functions on stack");
}
return bC.length;
}
var bx={
AVAILABLE_FOR_PATCH:1,
BLOCKED_ON_ACTIVE_STACK:2,
BLOCKED_ON_OTHER_STACK:3,
BLOCKED_UNDER_NATIVE_CODE:4,
REPLACED_ON_ACTIVE_STACK:5,
BLOCKED_UNDER_GENERATOR:6,
BLOCKED_ACTIVE_GENERATOR:7
};
bx.SymbolName=function(bF){
var bG=bx;
for(var bH in bG){
if(bG[bH]==bF){
return bH;
}
}
};
function Failure(ar){
this.message=ar;
}
Failure.prototype.toString=function(){
return"LiveEdit Failure: "+this.message;
};
function CopyErrorPositionToDetails(bI,p){
function createPositionStruct(L,bJ){
if(bJ==-1)return;
var bK=L.locationFromPosition(bJ,true);
if(bK==null)return;
return{
line:bK.line+1,
column:bK.column+1,
position:bJ
};
}
if(!("scriptObject"in bI)||!("startPosition"in bI)){
return;
}
var L=bI.scriptObject;
var bL={
start:createPositionStruct(L,bI.startPosition),
end:createPositionStruct(L,bI.endPosition)
};
p.position=bL;
}
function GetPcFromSourcePos(bM,bN){
return %GetFunctionCodePositionFromSource(bM,bN);
}
function SetScriptSource(L,bO,bP,X){
var j=L.source;
var bQ=CompareStrings(j,bO);
return ApplyPatchMultiChunk(L,bQ,bO,bP,
X);
}
function CompareStrings(bR,bS){
return %LiveEditCompareStrings(bR,bS);
}
function ApplySingleChunkPatch(L,change_pos,change_len,new_str,
X){
var j=L.source;
var bO=j.substring(0,change_pos)+
new_str+j.substring(change_pos+change_len);
return ApplyPatchMultiChunk(L,
[change_pos,change_pos+change_len,change_pos+new_str.length],
bO,false,X);
}
function DescribeChangeTree(bc){
function ProcessOldNode(w){
var bT=[];
for(var x=0;x<w.children.length;x++){
var bb=w.children[x];
if(bb.status!=i.UNCHANGED){
bT.push(ProcessOldNode(bb));
}
}
var bU=[];
if(w.textually_unmatched_new_nodes){
for(var x=0;x<w.textually_unmatched_new_nodes.length;x++){
var bb=w.textually_unmatched_new_nodes[x];
bU.push(ProcessNewNode(bb));
}
}
var bV={
name:w.info.function_name,
positions:DescribePositions(w),
status:w.status,
children:bT,
new_children:bU
};
if(w.status_explanation){
bV.status_explanation=w.status_explanation;
}
if(w.textual_corresponding_node){
bV.new_positions=DescribePositions(w.textual_corresponding_node);
}
return bV;
}
function ProcessNewNode(w){
var bT=[];
if(false){
for(var x=0;x<w.children.length;x++){
bT.push(ProcessNewNode(w.children[x]));
}
}
var bV={
name:w.info.function_name,
positions:DescribePositions(w),
children:bT,
};
return bV;
}
function DescribePositions(w){
return{
start_position:w.info.start_position,
end_position:w.info.end_position
};
}
return ProcessOldNode(bc);
}
var bW={};
bW.SetScriptSource=SetScriptSource;
bW.ApplyPatchMultiChunk=ApplyPatchMultiChunk;
bW.Failure=Failure;
bW.GetPcFromSourcePos=GetPcFromSourcePos;
bW.TestApi={
PosTranslator:PosTranslator,
CompareStrings:CompareStrings,
ApplySingleChunkPatch:ApplySingleChunkPatch
};
a.Debug.LiveEdit=bW;
})

p prologue1E
(function(a,b,c){
"use strict";
%CheckIsBootstrapping();
var d=(void 0);
var e=(void 0);
var f=%ExportFromRuntime({});
function Export(g){
g(f);
}
function Import(g){
g.next=d;
d=g;
}
function ImportNow(h){
return f[h];
}
function ImportFromExperimental(g){
g.next=e;
e=g;
}
function SetFunctionName(g,h,i){
if((typeof(h)==='symbol')){
h="["+%SymbolDescription(h)+"]";
}
if((i===(void 0))){
%FunctionSetName(g,h);
}else{
%FunctionSetName(g,i+" "+h);
}
}
function InstallConstants(j,k){
%CheckIsBootstrapping();
%OptimizeObjectForAddingMultipleProperties(j,k.length>>1);
var l=2|4|1;
for(var m=0;m<k.length;m+=2){
var h=k[m];
var n=k[m+1];
%AddNamedProperty(j,h,n,l);
}
%ToFastProperties(j);
}
function InstallFunctions(j,l,o){
%CheckIsBootstrapping();
%OptimizeObjectForAddingMultipleProperties(j,o.length>>1);
for(var m=0;m<o.length;m+=2){
var p=o[m];
var g=o[m+1];
SetFunctionName(g,p);
%FunctionRemovePrototype(g);
%AddNamedProperty(j,p,g,l);
%SetNativeFlag(g);
}
%ToFastProperties(j);
}
function InstallGetter(j,h,q,l){
%CheckIsBootstrapping();
if(typeof l=="undefined"){
l=2;
}
SetFunctionName(q,h,"get");
%FunctionRemovePrototype(q);
%DefineAccessorPropertyUnchecked(j,h,q,null,l);
%SetNativeFlag(q);
}
function InstallGetterSetter(j,h,q,r){
%CheckIsBootstrapping();
SetFunctionName(q,h,"get");
SetFunctionName(r,h,"set");
%FunctionRemovePrototype(q);
%FunctionRemovePrototype(r);
%DefineAccessorPropertyUnchecked(j,h,q,r,2);
%SetNativeFlag(q);
%SetNativeFlag(r);
}
function SetUpLockedPrototype(
constructor,fields,methods){
%CheckIsBootstrapping();
var s=constructor.prototype;
var t=(methods.length>>1)+(fields?fields.length:0);
if(t>=4){
%OptimizeObjectForAddingMultipleProperties(s,t);
}
if(fields){
for(var m=0;m<fields.length;m++){
%AddNamedProperty(s,fields[m],
(void 0),2|4);
}
}
for(var m=0;m<methods.length;m+=2){
var p=methods[m];
var g=methods[m+1];
%AddNamedProperty(s,p,g,2|4|1);
%SetNativeFlag(g);
}
%InternalSetPrototype(s,null);
%ToFastProperties(s);
}
function PostNatives(b){
%CheckIsBootstrapping();
for(;!(d===(void 0));d=d.next){
d(f);
}
var u=[
"ArrayToString",
"FunctionSourceString",
"GetIterator",
"GetMethod",
"InnerArrayEvery",
"InnerArrayFilter",
"InnerArrayForEach",
"InnerArrayIndexOf",
"InnerArrayJoin",
"InnerArrayLastIndexOf",
"InnerArrayMap",
"InnerArrayReduce",
"InnerArrayReduceRight",
"InnerArrayReverse",
"InnerArraySome",
"InnerArraySort",
"InnerArrayToLocaleString",
"IsNaN",
"MathMax",
"MathMin",
"ObjectIsFrozen",
"ObjectDefineProperty",
"OwnPropertyKeys",
"SymbolToString",
"ToNameArray",
"ToBoolean",
"ToNumber",
"ToString",
"is_concat_spreadable_symbol",
"iterator_symbol",
"promise_status_symbol",
"promise_value_symbol",
"reflect_apply",
"reflect_construct",
"to_string_tag_symbol",
];
var v={};
%OptimizeObjectForAddingMultipleProperties(
v,u.length);
for(var p of u){
v[p]=f[p];
}
%ToFastProperties(v);
f=v;
b.PostNatives=(void 0);
b.ImportFromExperimental=(void 0);
}
function PostExperimentals(b){
%CheckIsBootstrapping();
%ExportExperimentalFromRuntime(f);
for(;!(d===(void 0));d=d.next){
d(f);
}
for(;!(e===(void 0));
e=e.next){
e(f);
}
f=(void 0);
b.PostExperimentals=(void 0);
b.PostDebug=(void 0);
b.Import=(void 0);
b.Export=(void 0);
}
function PostDebug(b){
for(;!(d===(void 0));d=d.next){
d(f);
}
f=(void 0);
b.PostDebug=(void 0);
b.PostExperimentals=(void 0);
b.Import=(void 0);
b.Export=(void 0);
}
%OptimizeObjectForAddingMultipleProperties(b,13);
b.Import=Import;
b.ImportNow=ImportNow;
b.Export=Export;
b.ImportFromExperimental=ImportFromExperimental;
b.SetFunctionName=SetFunctionName;
b.InstallConstants=InstallConstants;
b.InstallFunctions=InstallFunctions;
b.InstallGetter=InstallGetter;
b.InstallGetterSetter=InstallGetterSetter;
b.SetUpLockedPrototype=SetUpLockedPrototype;
b.PostNatives=PostNatives;
b.PostExperimentals=PostExperimentals;
b.PostDebug=PostDebug;
%ToFastProperties(b);
%OptimizeObjectForAddingMultipleProperties(c,5);
c.logStackTrace=function logStackTrace(){
%DebugTrace();
};
c.log=function log(){
let message='';
for(const arg of arguments){
message+=arg;
}
%GlobalPrint(message);
};
c.createPrivateSymbol=function createPrivateSymbol(h){
return %CreatePrivateSymbol(h);
};
c.simpleBind=function simpleBind(w,x){
return function(){
return %Apply(w,x,arguments,0,arguments.length);
};
};
c.uncurryThis=function uncurryThis(w){
return function(x){
return %Apply(w,x,arguments,1,arguments.length-1);
};
};
%ToFastProperties(c);
})

runtimeR
var $NaN;
var $nonNumberToNumber;
var $sameValue;
var $sameValueZero;
var $toNumber;
var $toPositiveInteger;
var harmony_tolength=false;
(function(a,b){
%CheckIsBootstrapping();
var c=a.Array;
var d=a.Boolean;
var e=a.String;
var f=
b.ImportNow("is_concat_spreadable_symbol");
function APPLY_PREPARE(g){
var h;
if(!(typeof(this)==='function')){
throw %make_type_error(9,(%_ToString(this)),typeof this);
}
if((%_IsArray(g))){
h=g.length;
if(%_IsSmi(h)&&h>=0&&h<0x800000){
return h;
}
}
h=(g==null)?0:(g.length>>>0);
if(h>0x800000)throw %make_range_error(151);
if(g!=null&&!(%_IsSpecObject(g))){
throw %make_type_error(122,"Function.prototype.apply");
}
return h;
}
function REFLECT_APPLY_PREPARE(g){
var h;
if(!(typeof(this)==='function')){
throw %make_type_error(9,(%_ToString(this)),typeof this);
}
if((%_IsArray(g))){
h=g.length;
if(%_IsSmi(h)&&h>=0&&h<0x800000){
return h;
}
}
if(!(%_IsSpecObject(g))){
throw %make_type_error(122,"Reflect.apply");
}
h=(%ToLength(g.length));
if(h>0x800000)throw %make_range_error(151);
return h;
}
function REFLECT_CONSTRUCT_PREPARE(
g,newTarget){
var h;
var i=(typeof(this)==='function')&&%IsConstructor(this);
var j=(typeof(newTarget)==='function')&&%IsConstructor(newTarget);
if((%_IsArray(g))){
h=g.length;
if(%_IsSmi(h)&&h>=0&&h<0x800000&&
i&&j){
return h;
}
}
if(!i){
if(!(typeof(this)==='function')){
throw %make_type_error(13,(%_ToString(this)));
}else{
throw %make_type_error(55,(%_ToString(this)));
}
}
if(!j){
if(!(typeof(newTarget)==='function')){
throw %make_type_error(13,(%_ToString(newTarget)));
}else{
throw %make_type_error(55,(%_ToString(newTarget)));
}
}
if(!(%_IsSpecObject(g))){
throw %make_type_error(122,"Reflect.construct");
}
h=(%ToLength(g.length));
if(h>0x800000)throw %make_range_error(151);
return h;
}
function CONCAT_ITERABLE_TO_ARRAY(k){
return %concat_iterable_to_array(this,k);
};
function ToBoolean(l){
if((typeof(l)==='boolean'))return l;
if((typeof(l)==='string'))return l.length!=0;
if(l==null)return false;
if((typeof(l)==='number'))return!((l==0)||(!%_IsSmi(%IS_VAR(l))&&!(l==l)));
return true;
}
function ToNumber(l){
if((typeof(l)==='number'))return l;
if((typeof(l)==='string')){
return %_HasCachedArrayIndex(l)?%_GetCachedArrayIndex(l)
:%StringToNumber(l);
}
if((typeof(l)==='boolean'))return l?1:0;
if((l===(void 0)))return $NaN;
return((l===null))?0:ToNumber(DefaultNumber(l));
}
function NonNumberToNumber(l){
if((typeof(l)==='string')){
return %_HasCachedArrayIndex(l)?%_GetCachedArrayIndex(l)
:%StringToNumber(l);
}
if((typeof(l)==='boolean'))return l?1:0;
if((l===(void 0)))return $NaN;
return((l===null))?0:ToNumber(DefaultNumber(l));
}
function ToString(l){
if((typeof(l)==='string'))return l;
if((typeof(l)==='number'))return %_NumberToString(l);
if((typeof(l)==='boolean'))return l?'true':'false';
if((l===(void 0)))return'undefined';
return((l===null))?'null':ToString(DefaultString(l));
}
function SameValue(l,m){
if(typeof l!=typeof m)return false;
if((typeof(l)==='number')){
if((!%_IsSmi(%IS_VAR(l))&&!(l==l))&&(!%_IsSmi(%IS_VAR(m))&&!(m==m)))return true;
if(l===0&&m===0&&%_IsMinusZero(l)!=%_IsMinusZero(m)){
return false;
}
}
if((%_IsSimdValue(l)))return %SimdSameValue(l,m);
return l===m;
}
function SameValueZero(l,m){
if(typeof l!=typeof m)return false;
if((typeof(l)==='number')){
if((!%_IsSmi(%IS_VAR(l))&&!(l==l))&&(!%_IsSmi(%IS_VAR(m))&&!(m==m)))return true;
}
if((%_IsSimdValue(l)))return %SimdSameValueZero(l,m);
return l===m;
}
function ConcatIterableToArray(n,k){
var o=n.length;
for(var p of k){
%AddElement(n,o++,p);
}
return n;
}
function IsPrimitive(l){
return!(%_IsSpecObject(l));
}
function IsConcatSpreadable(q){
if(!(%_IsSpecObject(q)))return false;
var r=q[f];
if((r===(void 0)))return(%_IsArray(q));
return ToBoolean(r);
}
function DefaultNumber(l){
var s=l.valueOf;
if((typeof(s)==='function')){
var t=%_Call(s,l);
if((typeof(t)==='symbol'))throw MakeTypeError(115);
if((%_IsSimdValue(l)))throw MakeTypeError(117);
if(IsPrimitive(t))return t;
}
var u=l.toString;
if((typeof(u)==='function')){
var v=%_Call(u,l);
if(IsPrimitive(v))return v;
}
throw MakeTypeError(16);
}
function DefaultString(l){
if(!(%_ClassOf(l)==='Symbol')){
if((typeof(l)==='symbol'))throw MakeTypeError(116);
var u=l.toString;
if((typeof(u)==='function')){
var v=%_Call(u,l);
if(IsPrimitive(v))return v;
}
var s=l.valueOf;
if((typeof(s)==='function')){
var t=%_Call(s,l);
if(IsPrimitive(t))return t;
}
}
throw MakeTypeError(16);
}
function ToPositiveInteger(l,w){
var x=(%_IsSmi(%IS_VAR(l))?l:%NumberToIntegerMapMinusZero(ToNumber(l)));
if(x<0)throw MakeRangeError(w);
return x;
}
%FunctionSetPrototype(c,new c(0));
$NaN=%GetRootNaN();
$nonNumberToNumber=NonNumberToNumber;
$sameValue=SameValue;
$sameValueZero=SameValueZero;
$toNumber=ToNumber;
$toPositiveInteger=ToPositiveInteger;
%InstallToContext([
"apply_prepare_builtin",APPLY_PREPARE,
"concat_iterable_to_array_builtin",CONCAT_ITERABLE_TO_ARRAY,
"reflect_apply_prepare_builtin",REFLECT_APPLY_PREPARE,
"reflect_construct_prepare_builtin",REFLECT_CONSTRUCT_PREPARE,
]);
%InstallToContext([
"concat_iterable_to_array",ConcatIterableToArray,
"non_number_to_number",NonNumberToNumber,
"to_number_fun",ToNumber,
]);
b.Export(function(y){
y.ToBoolean=ToBoolean;
y.ToNumber=ToNumber;
y.ToString=ToString;
});
})

$v8natives†Ë
(function(a,b){
%CheckIsBootstrapping();
var c;
var d=a.Array;
var e=a.Boolean;
var f=a.Function;
var g=a.Number;
var h=a.Object;
var i=b.InternalArray;
var j=b.ImportNow("iterator_symbol");
var k;
var l;
var m;
var n;
var o;
var p=b.ImportNow("ToBoolean");
var q=b.ImportNow("ToNumber");
var r=b.ImportNow("to_string_tag_symbol");
b.Import(function(s){
k=s.MathAbs;
o=s.StringIndexOf;
});
b.ImportFromExperimental(function(s){
c=s.FLAG_harmony_tostring;
l=s.ProxyDelegateCallAndConstruct;
m=s.ProxyDerivedHasOwnTrap;
n=s.ProxyDerivedKeysTrap;
});
function GlobalIsNaN(t){
t=((typeof(%IS_VAR(t))==='number')?t:$nonNumberToNumber(t));
return(!%_IsSmi(%IS_VAR(t))&&!(t==t));
}
function GlobalIsFinite(t){
t=((typeof(%IS_VAR(t))==='number')?t:$nonNumberToNumber(t));
return(%_IsSmi(%IS_VAR(t))||((t==t)&&(t!=1/0)&&(t!=-1/0)));
}
function GlobalParseInt(u,v){
if((v===(void 0))||v===10||v===0){
if(%_IsSmi(u))return u;
if((typeof(u)==='number')&&
((0.01<u&&u<1e9)||
(-1e9<u&&u<-0.01))){
return u|0;
}
u=(%_ToString(u));
v=v|0;
}else{
u=(%_ToString(u));
v=(v|0);
if(!(v==0||(2<=v&&v<=36))){
return $NaN;
}
}
if(%_HasCachedArrayIndex(u)&&
(v==0||v==10)){
return %_GetCachedArrayIndex(u);
}
return %StringParseInt(u,v);
}
function GlobalParseFloat(u){
u=(%_ToString(u));
if(%_HasCachedArrayIndex(u))return %_GetCachedArrayIndex(u);
return %StringParseFloat(u);
}
function GlobalEval(w){
if(!(typeof(w)==='string'))return w;
var x=%GlobalProxy(GlobalEval);
var y=%CompileString(w,false);
if(!(%_IsFunction(y)))return y;
return %_CallFunction(x,y);
}
var z=2|4|1;
b.InstallConstants(a,[
"NaN",$NaN,
"Infinity",(1/0),
"undefined",(void 0),
]);
b.InstallFunctions(a,2,[
"isNaN",GlobalIsNaN,
"isFinite",GlobalIsFinite,
"parseInt",GlobalParseInt,
"parseFloat",GlobalParseFloat,
"eval",GlobalEval
]);
function ObjectToString(){
if((this===(void 0)))return"[object Undefined]";
if((this===null))return"[object Null]";
var A=(%_ToObject(this));
var B=%_ClassOf(A);
var C;
if(c){
C=A[r];
if(!(typeof(C)==='string')){
C=B;
}
}else{
C=B;
}
return`[object ${C}]`;
}
function ObjectToLocaleString(){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"Object.prototype.toLocaleString");
return this.toString();
}
function ObjectValueOf(){
return(%_ToObject(this));
}
function ObjectHasOwnProperty(D){
var E=(%_ToName(D));
var F=(%_ToObject(this));
if(%_IsJSProxy(F)){
if((typeof(D)==='symbol'))return false;
var G=%GetHandler(F);
return CallTrap1(G,"hasOwn",m,E);
}
return %HasOwnProperty(F,E);
}
function ObjectIsPrototypeOf(H){
if(!(%_IsSpecObject(H)))return false;
var A=(%_ToObject(this));
return %_HasInPrototypeChain(H,A);
}
function ObjectPropertyIsEnumerable(H){
var I=(%_ToName(H));
if(%_IsJSProxy(this)){
if((typeof(H)==='symbol'))return false;
var J=GetOwnPropertyJS(this,I);
return(J===(void 0))?false:J.isEnumerable();
}
return %IsPropertyEnumerable((%_ToObject(this)),I);
}
function ObjectDefineGetter(E,K){
var L=this;
if((L===null)||(L===(void 0))){
L=%GlobalProxy(ObjectDefineGetter);
}
if(!(typeof(K)==='function')){
throw MakeTypeError(64);
}
var J=new PropertyDescriptor();
J.setGet(K);
J.setEnumerable(true);
J.setConfigurable(true);
DefineOwnProperty((%_ToObject(L)),(%_ToName(E)),J,false);
}
function ObjectLookupGetter(E){
var L=this;
if((L===null)||(L===(void 0))){
L=%GlobalProxy(ObjectLookupGetter);
}
return %LookupAccessor((%_ToObject(L)),(%_ToName(E)),0);
}
function ObjectDefineSetter(E,K){
var L=this;
if((L===null)||(L===(void 0))){
L=%GlobalProxy(ObjectDefineSetter);
}
if(!(typeof(K)==='function')){
throw MakeTypeError(67);
}
var J=new PropertyDescriptor();
J.setSet(K);
J.setEnumerable(true);
J.setConfigurable(true);
DefineOwnProperty((%_ToObject(L)),(%_ToName(E)),J,false);
}
function ObjectLookupSetter(E){
var L=this;
if((L===null)||(L===(void 0))){
L=%GlobalProxy(ObjectLookupSetter);
}
return %LookupAccessor((%_ToObject(L)),(%_ToName(E)),1);
}
function ObjectKeys(M){
M=(%_ToObject(M));
if(%_IsJSProxy(M)){
var G=%GetHandler(M);
var N=CallTrap0(G,"keys",n);
return ToNameArray(N,"keys",false);
}
return %OwnKeys(M);
}
function IsAccessorDescriptor(J){
if((J===(void 0)))return false;
return J.hasGetter()||J.hasSetter();
}
function IsDataDescriptor(J){
if((J===(void 0)))return false;
return J.hasValue()||J.hasWritable();
}
function IsGenericDescriptor(J){
if((J===(void 0)))return false;
return!(IsAccessorDescriptor(J)||IsDataDescriptor(J));
}
function IsInconsistentDescriptor(J){
return IsAccessorDescriptor(J)&&IsDataDescriptor(J);
}
function FromPropertyDescriptor(J){
if((J===(void 0)))return J;
if(IsDataDescriptor(J)){
return{value:J.getValue(),
writable:J.isWritable(),
enumerable:J.isEnumerable(),
configurable:J.isConfigurable()};
}
return{get:J.getGet(),
set:J.getSet(),
enumerable:J.isEnumerable(),
configurable:J.isConfigurable()};
}
function FromGenericPropertyDescriptor(J){
if((J===(void 0)))return J;
var M=new h();
if(J.hasValue()){
%AddNamedProperty(M,"value",J.getValue(),0);
}
if(J.hasWritable()){
%AddNamedProperty(M,"writable",J.isWritable(),0);
}
if(J.hasGetter()){
%AddNamedProperty(M,"get",J.getGet(),0);
}
if(J.hasSetter()){
%AddNamedProperty(M,"set",J.getSet(),0);
}
if(J.hasEnumerable()){
%AddNamedProperty(M,"enumerable",J.isEnumerable(),0);
}
if(J.hasConfigurable()){
%AddNamedProperty(M,"configurable",J.isConfigurable(),0);
}
return M;
}
function ToPropertyDescriptor(M){
if(!(%_IsSpecObject(M)))throw MakeTypeError(81,M);
var J=new PropertyDescriptor();
if("enumerable"in M){
J.setEnumerable(p(M.enumerable));
}
if("configurable"in M){
J.setConfigurable(p(M.configurable));
}
if("value"in M){
J.setValue(M.value);
}
if("writable"in M){
J.setWritable(p(M.writable));
}
if("get"in M){
var O=M.get;
if(!(O===(void 0))&&!(typeof(O)==='function')){
throw MakeTypeError(65,O);
}
J.setGet(O);
}
if("set"in M){
var P=M.set;
if(!(P===(void 0))&&!(typeof(P)==='function')){
throw MakeTypeError(68,P);
}
J.setSet(P);
}
if(IsInconsistentDescriptor(J)){
throw MakeTypeError(119,M);
}
return J;
}
function ToCompletePropertyDescriptor(M){
var J=ToPropertyDescriptor(M);
if(IsGenericDescriptor(J)||IsDataDescriptor(J)){
if(!J.hasValue())J.setValue((void 0));
if(!J.hasWritable())J.setWritable(false);
}else{
if(!J.hasGetter())J.setGet((void 0));
if(!J.hasSetter())J.setSet((void 0));
}
if(!J.hasEnumerable())J.setEnumerable(false);
if(!J.hasConfigurable())J.setConfigurable(false);
return J;
}
function PropertyDescriptor(){
this.value_=(void 0);
this.hasValue_=false;
this.writable_=false;
this.hasWritable_=false;
this.enumerable_=false;
this.hasEnumerable_=false;
this.configurable_=false;
this.hasConfigurable_=false;
this.get_=(void 0);
this.hasGetter_=false;
this.set_=(void 0);
this.hasSetter_=false;
}
b.SetUpLockedPrototype(PropertyDescriptor,[
"value_",
"hasValue_",
"writable_",
"hasWritable_",
"enumerable_",
"hasEnumerable_",
"configurable_",
"hasConfigurable_",
"get_",
"hasGetter_",
"set_",
"hasSetter_"
],[
"toString",function PropertyDescriptor_ToString(){
return"[object PropertyDescriptor]";
},
"setValue",function PropertyDescriptor_SetValue(D){
this.value_=D;
this.hasValue_=true;
},
"getValue",function PropertyDescriptor_GetValue(){
return this.value_;
},
"hasValue",function PropertyDescriptor_HasValue(){
return this.hasValue_;
},
"setEnumerable",function PropertyDescriptor_SetEnumerable(Q){
this.enumerable_=Q;
this.hasEnumerable_=true;
},
"isEnumerable",function PropertyDescriptor_IsEnumerable(){
return this.enumerable_;
},
"hasEnumerable",function PropertyDescriptor_HasEnumerable(){
return this.hasEnumerable_;
},
"setWritable",function PropertyDescriptor_SetWritable(R){
this.writable_=R;
this.hasWritable_=true;
},
"isWritable",function PropertyDescriptor_IsWritable(){
return this.writable_;
},
"hasWritable",function PropertyDescriptor_HasWritable(){
return this.hasWritable_;
},
"setConfigurable",
function PropertyDescriptor_SetConfigurable(S){
this.configurable_=S;
this.hasConfigurable_=true;
},
"hasConfigurable",function PropertyDescriptor_HasConfigurable(){
return this.hasConfigurable_;
},
"isConfigurable",function PropertyDescriptor_IsConfigurable(){
return this.configurable_;
},
"setGet",function PropertyDescriptor_SetGetter(O){
this.get_=O;
this.hasGetter_=true;
},
"getGet",function PropertyDescriptor_GetGetter(){
return this.get_;
},
"hasGetter",function PropertyDescriptor_HasGetter(){
return this.hasGetter_;
},
"setSet",function PropertyDescriptor_SetSetter(P){
this.set_=P;
this.hasSetter_=true;
},
"getSet",function PropertyDescriptor_GetSetter(){
return this.set_;
},
"hasSetter",function PropertyDescriptor_HasSetter(){
return this.hasSetter_;
}
]);
function ConvertDescriptorArrayToDescriptor(T){
if((T===(void 0))){
return(void 0);
}
var J=new PropertyDescriptor();
if(T[0]){
J.setGet(T[2]);
J.setSet(T[3]);
}else{
J.setValue(T[1]);
J.setWritable(T[4]);
}
J.setEnumerable(T[5]);
J.setConfigurable(T[6]);
return J;
}
function GetTrap(G,E,U){
var V=G[E];
if((V===(void 0))){
if((U===(void 0))){
throw MakeTypeError(88,G,E);
}
V=U;
}else if(!(typeof(V)==='function')){
throw MakeTypeError(89,G,E);
}
return V;
}
function CallTrap0(G,E,U){
return %_CallFunction(G,GetTrap(G,E,U));
}
function CallTrap1(G,E,U,w){
return %_CallFunction(G,w,GetTrap(G,E,U));
}
function CallTrap2(G,E,U,w,W){
return %_CallFunction(G,w,W,GetTrap(G,E,U));
}
function GetOwnPropertyJS(M,X){
var Y=(%_ToName(X));
if(%_IsJSProxy(M)){
if((typeof(X)==='symbol'))return(void 0);
var G=%GetHandler(M);
var Z=CallTrap1(
G,"getOwnPropertyDescriptor",(void 0),Y);
if((Z===(void 0)))return Z;
var J=ToCompletePropertyDescriptor(Z);
if(!J.isConfigurable()){
throw MakeTypeError(92,
G,Y,"getOwnPropertyDescriptor");
}
return J;
}
var aa=%GetOwnProperty((%_ToObject(M)),Y);
return ConvertDescriptorArrayToDescriptor(aa);
}
function Delete(M,Y,ab){
var J=GetOwnPropertyJS(M,Y);
if((J===(void 0)))return true;
if(J.isConfigurable()){
%DeleteProperty_Sloppy(M,Y);
return true;
}else if(ab){
throw MakeTypeError(27,Y);
}else{
return;
}
}
function GetMethod(M,Y){
var ac=M[Y];
if((ac==null))return(void 0);
if((typeof(ac)==='function'))return ac;
throw MakeTypeError(13,typeof ac);
}
function DefineProxyProperty(M,Y,z,ab){
if((typeof(Y)==='symbol'))return false;
var G=%GetHandler(M);
var ad=CallTrap2(G,"defineProperty",(void 0),Y,z);
if(!p(ad)){
if(ab){
throw MakeTypeError(87,
G,"false","defineProperty");
}else{
return false;
}
}
return true;
}
function DefineObjectProperty(M,Y,J,ab){
var ae=%GetOwnProperty(M,(%_ToName(Y)));
var af=ConvertDescriptorArrayToDescriptor(ae);
var ag=%IsExtensible(M);
if((af===(void 0))&&!ag){
if(ab){
throw MakeTypeError(27,Y);
}else{
return false;
}
}
if(!(af===(void 0))){
if((IsGenericDescriptor(J)||
IsDataDescriptor(J)==IsDataDescriptor(af))&&
(!J.hasEnumerable()||
$sameValue(J.isEnumerable(),af.isEnumerable()))&&
(!J.hasConfigurable()||
$sameValue(J.isConfigurable(),af.isConfigurable()))&&
(!J.hasWritable()||
$sameValue(J.isWritable(),af.isWritable()))&&
(!J.hasValue()||
$sameValue(J.getValue(),af.getValue()))&&
(!J.hasGetter()||
$sameValue(J.getGet(),af.getGet()))&&
(!J.hasSetter()||
$sameValue(J.getSet(),af.getSet()))){
return true;
}
if(!af.isConfigurable()){
if(J.isConfigurable()||
(J.hasEnumerable()&&
J.isEnumerable()!=af.isEnumerable())){
if(ab){
throw MakeTypeError(95,Y);
}else{
return false;
}
}
if(!IsGenericDescriptor(J)){
if(IsDataDescriptor(af)!=IsDataDescriptor(J)){
if(ab){
throw MakeTypeError(95,Y);
}else{
return false;
}
}
if(IsDataDescriptor(af)&&IsDataDescriptor(J)){
var ah=af.isWritable();
if(ah!=J.isWritable()){
if(!ah||(%IsStrong(M))){
if(ab){
throw ah
?MakeTypeError(112,M,Y)
:MakeTypeError(95,Y);
}else{
return false;
}
}
}
if(!ah&&J.hasValue()&&
!$sameValue(J.getValue(),af.getValue())){
if(ab){
throw MakeTypeError(95,Y);
}else{
return false;
}
}
}
if(IsAccessorDescriptor(J)&&IsAccessorDescriptor(af)){
if(J.hasSetter()&&
!$sameValue(J.getSet(),af.getSet())){
if(ab){
throw MakeTypeError(95,Y);
}else{
return false;
}
}
if(J.hasGetter()&&!$sameValue(J.getGet(),af.getGet())){
if(ab){
throw MakeTypeError(95,Y);
}else{
return false;
}
}
}
}
}
}
var ai=0;
if(J.hasEnumerable()){
ai|=J.isEnumerable()?0:2;
}else if(!(af===(void 0))){
ai|=af.isEnumerable()?0:2;
}else{
ai|=2;
}
if(J.hasConfigurable()){
ai|=J.isConfigurable()?0:4;
}else if(!(af===(void 0))){
ai|=af.isConfigurable()?0:4;
}else
ai|=4;
if(IsDataDescriptor(J)||
(IsGenericDescriptor(J)&&
((af===(void 0))||IsDataDescriptor(af)))){
if(J.hasWritable()){
ai|=J.isWritable()?0:1;
}else if(!(af===(void 0))){
ai|=af.isWritable()?0:1;
}else{
ai|=1;
}
var D=(void 0);
if(J.hasValue()){
D=J.getValue();
}else if(!(af===(void 0))&&IsDataDescriptor(af)){
D=af.getValue();
}
%DefineDataPropertyUnchecked(M,Y,D,ai);
}else{
var aj=null;
if(J.hasGetter()){
aj=J.getGet();
}else if(IsAccessorDescriptor(af)&&af.hasGetter()){
aj=af.getGet();
}
var ak=null;
if(J.hasSetter()){
ak=J.getSet();
}else if(IsAccessorDescriptor(af)&&af.hasSetter()){
ak=af.getSet();
}
%DefineAccessorPropertyUnchecked(M,Y,aj,ak,ai);
}
return true;
}
function DefineArrayProperty(M,Y,J,ab){
if(!(typeof(Y)==='symbol')){
var al=(Y>>>0);
var am=false;
if((%_ToString(al))==Y&&al!=4294967295){
var an=M.length;
if(al>=an&&%IsObserved(M)){
am=true;
$observeBeginPerformSplice(M);
}
var ao=GetOwnPropertyJS(M,"length");
if((al>=an&&!ao.isWritable())||
!DefineObjectProperty(M,Y,J,true)){
if(am)
$observeEndPerformSplice(M);
if(ab){
throw MakeTypeError(27,Y);
}else{
return false;
}
}
if(al>=an){
M.length=al+1;
}
if(am){
$observeEndPerformSplice(M);
$observeEnqueueSpliceRecord(M,an,[],al+1-an);
}
return true;
}
}
return DefineObjectProperty(M,Y,J,ab);
}
function DefineOwnProperty(M,Y,J,ab){
if(%_IsJSProxy(M)){
if((typeof(Y)==='symbol'))return false;
var z=FromGenericPropertyDescriptor(J);
return DefineProxyProperty(M,Y,z,ab);
}else if((%_IsArray(M))){
return DefineArrayProperty(M,Y,J,ab);
}else{
return DefineObjectProperty(M,Y,J,ab);
}
}
function DefineOwnPropertyFromAPI(M,Y,D,J){
return DefineOwnProperty(M,Y,ToPropertyDescriptor({
value:D,
writable:J[0],
enumerable:J[1],
configurable:J[2]
}),
false);
}
function ObjectGetPrototypeOf(M){
return %_GetPrototype((%_ToObject(M)));
}
function ObjectSetPrototypeOf(M,ap){
if((%IS_VAR(M)===null)||(M===(void 0)))throw MakeTypeError(15,"Object.setPrototypeOf");
if(ap!==null&&!(%_IsSpecObject(ap))){
throw MakeTypeError(83,ap);
}
if((%_IsSpecObject(M))){
%SetPrototype(M,ap);
}
return M;
}
function ObjectGetOwnPropertyDescriptor(M,Y){
var J=GetOwnPropertyJS((%_ToObject(M)),Y);
return FromPropertyDescriptor(J);
}
function ToNameArray(M,V,aq){
if(!(%_IsSpecObject(M))){
throw MakeTypeError(90,V,M);
}
var ar=(M.length>>>0);
var as=new d(ar);
var at=0;
var N={__proto__:null};
for(var al=0;al<ar;al++){
var au=(%_ToName(M[al]));
if((typeof(au)==='symbol')&&!aq)continue;
if(%HasOwnProperty(N,au)){
throw MakeTypeError(93,V,au);
}
as[at]=au;
++at;
N[au]=0;
}
as.length=at;
return as;
}
function ObjectGetOwnPropertyKeys(M,av){
var aw=new i();
av|=32;
var ax=%GetInterceptorInfo(M);
if((av&8)===0){
var ay=%GetOwnElementNames(M);
for(var az=0;az<ay.length;++az){
ay[az]=%_NumberToString(ay[az]);
}
aw.push(ay);
if((ax&1)!=0){
var aA=%GetIndexedInterceptorElementNames(M);
if(!(aA===(void 0))){
aw.push(aA);
}
}
}
aw.push(%GetOwnPropertyNames(M,av));
if((ax&2)!=0){
var aB=
%GetNamedInterceptorPropertyNames(M);
if(!(aB===(void 0))){
aw.push(aB);
}
}
var aC=
%Apply(i.prototype.concat,
aw[0],aw,1,aw.length-1);
if(ax!=0){
var aD={__proto__:null};
var aE=0;
for(var az=0;az<aC.length;++az){
var E=aC[az];
if((typeof(E)==='symbol')){
if((av&16)||(%SymbolIsPrivate(E))){
continue;
}
}else{
if(av&8)continue;
E=(%_ToString(E));
}
if(aD[E])continue;
aD[E]=true;
aC[aE++]=E;
}
aC.length=aE;
}
return aC;
}
function OwnPropertyKeys(M){
if(%_IsJSProxy(M)){
var G=%GetHandler(M);
var N=CallTrap0(G,"ownKeys",(void 0));
return ToNameArray(N,"getOwnPropertyNames",false);
}
return ObjectGetOwnPropertyKeys(M,32);
}
function ObjectGetOwnPropertyNames(M){
M=(%_ToObject(M));
if(%_IsJSProxy(M)){
var G=%GetHandler(M);
var N=CallTrap0(G,"getOwnPropertyNames",(void 0));
return ToNameArray(N,"getOwnPropertyNames",false);
}
return ObjectGetOwnPropertyKeys(M,16);
}
function ObjectCreate(ap,aF){
if(!(%_IsSpecObject(ap))&&ap!==null){
throw MakeTypeError(83,ap);
}
var M={};
%InternalSetPrototype(M,ap);
if(!(aF===(void 0)))ObjectDefineProperties(M,aF);
return M;
}
function ObjectDefineProperty(M,Y,z){
if(!(%_IsSpecObject(M))){
throw MakeTypeError(14,"Object.defineProperty");
}
var E=(%_ToName(Y));
if(%_IsJSProxy(M)){
var aG={__proto__:null};
for(var aH in z){
aG[aH]=z[aH];
}
DefineProxyProperty(M,E,aG,true);
}else{
var J=ToPropertyDescriptor(z);
DefineOwnProperty(M,E,J,true);
}
return M;
}
function GetOwnEnumerablePropertyNames(F){
var N=new i();
for(var aI in F){
if(%HasOwnProperty(F,aI)){
N.push(aI);
}
}
var av=8|32;
var aJ=%GetOwnPropertyNames(F,av);
for(var az=0;az<aJ.length;++az){
var aK=aJ[az];
if((typeof(aK)==='symbol')){
var J=ObjectGetOwnPropertyDescriptor(F,aK);
if(J.enumerable)N.push(aK);
}
}
return N;
}
function ObjectDefineProperties(M,aF){
if(!(%_IsSpecObject(M))){
throw MakeTypeError(14,"Object.defineProperties");
}
var aa=(%_ToObject(aF));
var N=GetOwnEnumerablePropertyNames(aa);
var aL=new i();
for(var az=0;az<N.length;az++){
aL.push(ToPropertyDescriptor(aa[N[az]]));
}
for(var az=0;az<N.length;az++){
DefineOwnProperty(M,N[az],aL[az],true);
}
return M;
}
function ProxyFix(M){
var G=%GetHandler(M);
var aa=CallTrap0(G,"fix",(void 0));
if((aa===(void 0))){
throw MakeTypeError(87,G,"undefined","fix");
}
if(%IsJSFunctionProxy(M)){
var aM=%GetCallTrap(M);
var aN=%GetConstructTrap(M);
var aO=l(aM,aN);
%Fix(M);
%SetCode(M,aO);
var aP=new h();
ObjectDefineProperty(aP,"constructor",
{value:M,writable:true,enumerable:false,configurable:true});
%FunctionSetPrototype(M,aP);
M.length=0;
}else{
%Fix(M);
}
ObjectDefineProperties(M,aa);
}
function ObjectSealJS(M){
if(!(%_IsSpecObject(M)))return M;
var aQ=%_IsJSProxy(M);
if(aQ||%HasSloppyArgumentsElements(M)||%IsObserved(M)){
if(aQ){
ProxyFix(M);
}
var N=OwnPropertyKeys(M);
for(var az=0;az<N.length;az++){
var E=N[az];
var J=GetOwnPropertyJS(M,E);
if(J.isConfigurable()){
J.setConfigurable(false);
DefineOwnProperty(M,E,J,true);
}
}
%PreventExtensions(M);
}else{
%ObjectSeal(M);
}
return M;
}
function ObjectFreezeJS(M){
if(!(%_IsSpecObject(M)))return M;
var aQ=%_IsJSProxy(M);
if(aQ||%HasSloppyArgumentsElements(M)||%IsObserved(M)||
(%IsStrong(M))){
if(aQ){
ProxyFix(M);
}
var N=OwnPropertyKeys(M);
for(var az=0;az<N.length;az++){
var E=N[az];
var J=GetOwnPropertyJS(M,E);
if(J.isWritable()||J.isConfigurable()){
if(IsDataDescriptor(J))J.setWritable(false);
J.setConfigurable(false);
DefineOwnProperty(M,E,J,true);
}
}
%PreventExtensions(M);
}else{
%ObjectFreeze(M);
}
return M;
}
function ObjectPreventExtension(M){
if(!(%_IsSpecObject(M)))return M;
if(%_IsJSProxy(M)){
ProxyFix(M);
}
%PreventExtensions(M);
return M;
}
function ObjectIsSealed(M){
if(!(%_IsSpecObject(M)))return true;
if(%_IsJSProxy(M)){
return false;
}
if(%IsExtensible(M)){
return false;
}
var N=OwnPropertyKeys(M);
for(var az=0;az<N.length;az++){
var E=N[az];
var J=GetOwnPropertyJS(M,E);
if(J.isConfigurable()){
return false;
}
}
return true;
}
function ObjectIsFrozen(M){
if(!(%_IsSpecObject(M)))return true;
if(%_IsJSProxy(M)){
return false;
}
if(%IsExtensible(M)){
return false;
}
var N=OwnPropertyKeys(M);
for(var az=0;az<N.length;az++){
var E=N[az];
var J=GetOwnPropertyJS(M,E);
if(IsDataDescriptor(J)&&J.isWritable())return false;
if(J.isConfigurable())return false;
}
return true;
}
function ObjectIsExtensible(M){
if(!(%_IsSpecObject(M)))return false;
if(%_IsJSProxy(M)){
return true;
}
return %IsExtensible(M);
}
function ObjectIs(aR,aS){
return $sameValue(aR,aS);
}
function ObjectAssign(aT,aU){
"use strict";
var aV=(%_ToObject(aT));
var aW=%_ArgumentsLength();
if(aW<2)return aV;
for(var az=1;az<aW;++az){
var aX=%_Arguments(az);
if((aX==null)){
continue;
}
var s=(%_ToObject(aX));
var aY=OwnPropertyKeys(s);
var aZ=aY.length;
for(var aE=0;aE<aZ;++aE){
var aI=aY[aE];
if(%IsPropertyEnumerable(s,aI)){
var ba=s[aI];
aV[aI]=ba;
}
}
}
return aV;
}
function ObjectGetProto(){
return %_GetPrototype((%_ToObject(this)));
}
function ObjectSetProto(ap){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"Object.prototype.__proto__");
if(((%_IsSpecObject(ap))||(ap===null))&&(%_IsSpecObject(this))){
%SetPrototype(this,ap);
}
}
function ObjectConstructor(w){
if(%_IsConstructCall()){
if(w==null)return this;
return(%_ToObject(w));
}else{
if(w==null)return{};
return(%_ToObject(w));
}
}
%SetNativeFlag(h);
%SetCode(h,ObjectConstructor);
%AddNamedProperty(h.prototype,"constructor",h,
2);
b.InstallFunctions(h.prototype,2,[
"toString",ObjectToString,
"toLocaleString",ObjectToLocaleString,
"valueOf",ObjectValueOf,
"hasOwnProperty",ObjectHasOwnProperty,
"isPrototypeOf",ObjectIsPrototypeOf,
"propertyIsEnumerable",ObjectPropertyIsEnumerable,
"__defineGetter__",ObjectDefineGetter,
"__lookupGetter__",ObjectLookupGetter,
"__defineSetter__",ObjectDefineSetter,
"__lookupSetter__",ObjectLookupSetter
]);
b.InstallGetterSetter(h.prototype,"__proto__",ObjectGetProto,
ObjectSetProto);
b.InstallFunctions(h,2,[
"assign",ObjectAssign,
"keys",ObjectKeys,
"create",ObjectCreate,
"defineProperty",ObjectDefineProperty,
"defineProperties",ObjectDefineProperties,
"freeze",ObjectFreezeJS,
"getPrototypeOf",ObjectGetPrototypeOf,
"setPrototypeOf",ObjectSetPrototypeOf,
"getOwnPropertyDescriptor",ObjectGetOwnPropertyDescriptor,
"getOwnPropertyNames",ObjectGetOwnPropertyNames,
"is",ObjectIs,
"isExtensible",ObjectIsExtensible,
"isFrozen",ObjectIsFrozen,
"isSealed",ObjectIsSealed,
"preventExtensions",ObjectPreventExtension,
"seal",ObjectSealJS
]);
function BooleanConstructor(w){
"use strict";
if(%_IsConstructCall()){
%_SetValueOf(this,p(w));
}else{
return p(w);
}
}
function BooleanToString(){
var bb=this;
if(!(typeof(bb)==='boolean')){
if(!(%_ClassOf(bb)==='Boolean')){
throw MakeTypeError(58,'Boolean.prototype.toString');
}
bb=%_ValueOf(bb);
}
return bb?'true':'false';
}
function BooleanValueOf(){
if(!(typeof(this)==='boolean')&&!(%_ClassOf(this)==='Boolean')){
throw MakeTypeError(58,'Boolean.prototype.valueOf');
}
return %_ValueOf(this);
}
%SetCode(e,BooleanConstructor);
%FunctionSetPrototype(e,new e(false));
%AddNamedProperty(e.prototype,"constructor",e,
2);
b.InstallFunctions(e.prototype,2,[
"toString",BooleanToString,
"valueOf",BooleanValueOf
]);
function NumberConstructor(w){
"use strict";
var D=%_ArgumentsLength()==0?0:q(w);
if(%_IsConstructCall()){
%_SetValueOf(this,D);
}else{
return D;
}
}
function NumberToStringJS(v){
var t=this;
if(!(typeof(this)==='number')){
if(!(%_ClassOf(this)==='Number')){
throw MakeTypeError(58,'Number.prototype.toString');
}
t=%_ValueOf(this);
}
if((v===(void 0))||v===10){
return %_NumberToString(t);
}
v=(%_ToInteger(v));
if(v<2||v>36)throw MakeRangeError(153);
return %NumberToRadixString(t,v);
}
function NumberToLocaleString(){
return %_CallFunction(this,NumberToStringJS);
}
function NumberValueOf(){
if(!(typeof(this)==='number')&&!(%_ClassOf(this)==='Number')){
throw MakeTypeError(58,'Number.prototype.valueOf');
}
return %_ValueOf(this);
}
function NumberToFixedJS(bc){
var w=this;
if(!(typeof(this)==='number')){
if(!(%_ClassOf(this)==='Number')){
throw MakeTypeError(36,
"Number.prototype.toFixed",this);
}
w=%_ValueOf(this);
}
var y=(%_ToInteger(bc));
if(y<0||y>20){
throw MakeRangeError(149,"toFixed() digits");
}
if((!%_IsSmi(%IS_VAR(w))&&!(w==w)))return"NaN";
if(w==(1/0))return"Infinity";
if(w==-(1/0))return"-Infinity";
return %NumberToFixed(w,y);
}
function NumberToExponentialJS(bc){
var w=this;
if(!(typeof(this)==='number')){
if(!(%_ClassOf(this)==='Number')){
throw MakeTypeError(36,
"Number.prototype.toExponential",this);
}
w=%_ValueOf(this);
}
var y=(bc===(void 0))?(void 0):(%_ToInteger(bc));
if((!%_IsSmi(%IS_VAR(w))&&!(w==w)))return"NaN";
if(w==(1/0))return"Infinity";
if(w==-(1/0))return"-Infinity";
if((y===(void 0))){
y=-1;
}else if(y<0||y>20){
throw MakeRangeError(149,"toExponential()");
}
return %NumberToExponential(w,y);
}
function NumberToPrecisionJS(bd){
var w=this;
if(!(typeof(this)==='number')){
if(!(%_ClassOf(this)==='Number')){
throw MakeTypeError(36,
"Number.prototype.toPrecision",this);
}
w=%_ValueOf(this);
}
if((bd===(void 0)))return(%_ToString(w));
var Y=(%_ToInteger(bd));
if((!%_IsSmi(%IS_VAR(w))&&!(w==w)))return"NaN";
if(w==(1/0))return"Infinity";
if(w==-(1/0))return"-Infinity";
if(Y<1||Y>21){
throw MakeRangeError(152);
}
return %NumberToPrecision(w,Y);
}
function NumberIsFinite(t){
return(typeof(t)==='number')&&(%_IsSmi(%IS_VAR(t))||((t==t)&&(t!=1/0)&&(t!=-1/0)));
}
function NumberIsInteger(t){
return NumberIsFinite(t)&&(%_ToInteger(t))==t;
}
function NumberIsNaN(t){
return(typeof(t)==='number')&&(!%_IsSmi(%IS_VAR(t))&&!(t==t));
}
function NumberIsSafeInteger(t){
if(NumberIsFinite(t)){
var be=(%_ToInteger(t));
if(be==t){
return k(be)<=9007199254740991;
}
}
return false;
}
%SetCode(g,NumberConstructor);
%FunctionSetPrototype(g,new g(0));
%OptimizeObjectForAddingMultipleProperties(g.prototype,8);
%AddNamedProperty(g.prototype,"constructor",g,
2);
b.InstallConstants(g,[
"MAX_VALUE",1.7976931348623157e+308,
"MIN_VALUE",5e-324,
"NaN",$NaN,
"NEGATIVE_INFINITY",-(1/0),
"POSITIVE_INFINITY",(1/0),
"MAX_SAFE_INTEGER",%_MathPow(2,53)-1,
"MIN_SAFE_INTEGER",-%_MathPow(2,53)+1,
"EPSILON",%_MathPow(2,-52)
]);
b.InstallFunctions(g.prototype,2,[
"toString",NumberToStringJS,
"toLocaleString",NumberToLocaleString,
"valueOf",NumberValueOf,
"toFixed",NumberToFixedJS,
"toExponential",NumberToExponentialJS,
"toPrecision",NumberToPrecisionJS
]);
b.InstallFunctions(g,2,[
"isFinite",NumberIsFinite,
"isInteger",NumberIsInteger,
"isNaN",NumberIsNaN,
"isSafeInteger",NumberIsSafeInteger,
"parseInt",GlobalParseInt,
"parseFloat",GlobalParseFloat
]);
%SetForceInlineFlag(NumberIsNaN);
function NativeCodeFunctionSourceString(ac){
var E=%FunctionGetName(ac);
if(E){
return'function '+E+'() { [native code] }';
}
return'function () { [native code] }';
}
function FunctionSourceString(ac){
while(%IsJSFunctionProxy(ac)){
ac=%GetCallTrap(ac);
}
if(!(%_IsFunction(ac))){
throw MakeTypeError(58,'Function.prototype.toString');
}
if(%FunctionHidesSource(ac)){
return NativeCodeFunctionSourceString(ac);
}
var bf=%ClassGetSourceCode(ac);
if((typeof(bf)==='string')){
return bf;
}
var bg=%FunctionGetSourceCode(ac);
if(!(typeof(bg)==='string')){
return NativeCodeFunctionSourceString(ac);
}
if(%FunctionIsArrow(ac)){
return bg;
}
var E=%FunctionNameShouldPrintAsAnonymous(ac)
?'anonymous'
:%FunctionGetName(ac);
var bh=%FunctionIsGenerator(ac);
var bi=%FunctionIsConciseMethod(ac)
?(bh?'*':'')
:(bh?'function* ':'function ');
return bi+E+bg;
}
function FunctionToString(){
return FunctionSourceString(this);
}
function FunctionBind(bj){
if(!(typeof(this)==='function'))throw MakeTypeError(33);
var bk=function(){
"use strict";
if(%_IsConstructCall()){
return %NewObjectFromBound(bk);
}
var bl=%BoundFunctionGetBindings(bk);
var bm=%_ArgumentsLength();
if(bm==0){
return %Apply(bl[0],bl[1],bl,2,bl.length-2);
}
if(bl.length===2){
return %Apply(bl[0],bl[1],arguments,0,bm);
}
var bn=bl.length-2;
var bo=new i(bn+bm);
for(var az=0;az<bn;az++){
bo[az]=bl[az+2];
}
for(var aE=0;aE<bm;aE++){
bo[az++]=%_Arguments(aE);
}
return %Apply(bl[0],bl[1],bo,0,bn+bm);
};
var bp=0;
var bq=this.length;
if((typeof bq==="number")&&
((bq>>>0)===bq)){
var bm=%_ArgumentsLength();
if(bm>0)bm--;
bp=bq-bm;
if(bp<0)bp=0;
}
var ad=%FunctionBindArguments(bk,this,
bj,bp);
var E=this.name;
var br=(typeof(E)==='string')?E:"";
%DefineDataPropertyUnchecked(ad,"name","bound "+br,
2|1);
return ad;
}
function NewFunctionString(bs,bt){
var ar=bs.length;
var Y='';
if(ar>1){
Y=(%_ToString(bs[0]));
for(var az=1;az<ar-1;az++){
Y+=','+(%_ToString(bs[az]));
}
if(%_CallFunction(Y,')',o)!=-1){
throw MakeSyntaxError(191);
}
Y+='\n/'+'**/';
}
var bu=(ar>0)?(%_ToString(bs[ar-1])):'';
return'('+bt+'('+Y+') {\n'+bu+'\n})';
}
function FunctionConstructor(bv){
var bg=NewFunctionString(arguments,'function');
var x=%GlobalProxy(FunctionConstructor);
var y=%_CallFunction(x,%CompileString(bg,true));
%FunctionMarkNameShouldPrintAsAnonymous(y);
return y;
}
%SetCode(f,FunctionConstructor);
%AddNamedProperty(f.prototype,"constructor",f,
2);
b.InstallFunctions(f.prototype,2,[
"bind",FunctionBind,
"toString",FunctionToString
]);
function GetIterator(M,bw){
if((bw===(void 0))){
bw=M[j];
}
if(!(typeof(bw)==='function')){
throw MakeTypeError(59,M);
}
var bx=%_CallFunction(M,bw);
if(!(%_IsSpecObject(bx))){
throw MakeTypeError(53,bx);
}
return bx;
}
b.Export(function(aV){
aV.Delete=Delete;
aV.FunctionSourceString=FunctionSourceString;
aV.GetIterator=GetIterator;
aV.GetMethod=GetMethod;
aV.IsFinite=GlobalIsFinite;
aV.IsNaN=GlobalIsNaN;
aV.NewFunctionString=NewFunctionString;
aV.NumberIsNaN=NumberIsNaN;
aV.ObjectDefineProperties=ObjectDefineProperties;
aV.ObjectDefineProperty=ObjectDefineProperty;
aV.ObjectFreeze=ObjectFreezeJS;
aV.ObjectGetOwnPropertyKeys=ObjectGetOwnPropertyKeys;
aV.ObjectHasOwnProperty=ObjectHasOwnProperty;
aV.ObjectIsFrozen=ObjectIsFrozen;
aV.ObjectIsSealed=ObjectIsSealed;
aV.ObjectToString=ObjectToString;
aV.ToNameArray=ToNameArray;
});
%InstallToContext([
"global_eval_fun",GlobalEval,
"object_value_of",ObjectValueOf,
"object_to_string",ObjectToString,
"object_define_own_property",DefineOwnPropertyFromAPI,
"object_get_own_property_descriptor",ObjectGetOwnPropertyDescriptor,
"to_complete_property_descriptor",ToCompletePropertyDescriptor,
]);
})

symboly
(function(a,b){
"use strict";
%CheckIsBootstrapping();
var c=a.Object;
var d=a.Symbol;
var e=b.ImportNow("has_instance_symbol");
var f=
b.ImportNow("is_concat_spreadable_symbol");
var g=b.ImportNow("is_regexp_symbol");
var h=b.ImportNow("iterator_symbol");
var i;
var j=b.ImportNow("to_primitive_symbol");
var k=b.ImportNow("to_string_tag_symbol");
var l=b.ImportNow("unscopables_symbol");
b.Import(function(m){
i=m.ObjectGetOwnPropertyKeys;
});
function SymbolToPrimitive(n){
if(!((typeof(this)==='symbol')||(%_ClassOf(this)==='Symbol'))){
throw MakeTypeError(36,
"Symbol.prototype [ @@toPrimitive ]",this);
}
return %_ValueOf(this);
}
function SymbolToString(){
if(!((typeof(this)==='symbol')||(%_ClassOf(this)==='Symbol'))){
throw MakeTypeError(36,
"Symbol.prototype.toString",this);
}
return %SymbolDescriptiveString(%_ValueOf(this));
}
function SymbolValueOf(){
if(!((typeof(this)==='symbol')||(%_ClassOf(this)==='Symbol'))){
throw MakeTypeError(36,
"Symbol.prototype.valueOf",this);
}
return %_ValueOf(this);
}
function SymbolFor(o){
o=(%_ToString(o));
var p=%SymbolRegistry();
if((p.for[o]===(void 0))){
var q=%CreateSymbol(o);
p.for[o]=q;
p.keyFor[q]=o;
}
return p.for[o];
}
function SymbolKeyFor(q){
if(!(typeof(q)==='symbol'))throw MakeTypeError(114,q);
return %SymbolRegistry().keyFor[q];
}
function ObjectGetOwnPropertySymbols(r){
r=(%_ToObject(r));
return i(r,8);
}
%FunctionSetPrototype(d,new c());
b.InstallConstants(d,[
"iterator",h,
"toPrimitive",j,
"unscopables",l,
]);
b.InstallFunctions(d,2,[
"for",SymbolFor,
"keyFor",SymbolKeyFor
]);
%AddNamedProperty(
d.prototype,"constructor",d,2);
%AddNamedProperty(
d.prototype,k,"Symbol",2|1);
b.InstallFunctions(d.prototype,2|1,[
j,SymbolToPrimitive
]);
b.InstallFunctions(d.prototype,2,[
"toString",SymbolToString,
"valueOf",SymbolValueOf
]);
b.InstallFunctions(c,2,[
"getOwnPropertySymbols",ObjectGetOwnPropertySymbols
]);
b.Export(function(s){
s.SymbolToString=SymbolToString;
})
})

array’~
(function(a,b){
"use strict";
%CheckIsBootstrapping();
var c;
var d=a.Array;
var e=b.InternalArray;
var f=b.InternalPackedArray;
var g;
var h;
var i;
var j;
var k;
var l;
var m;
var n=b.ImportNow("unscopables_symbol");
b.Import(function(o){
c=o.Delete;
g=o.MathMin;
h=o.ObjectHasOwnProperty;
i=o.ObjectIsFrozen;
j=o.ObjectIsSealed;
k=o.ObjectToString;
l=o.ToNumber;
m=o.ToString;
});
var p=new e();
function GetSortedArrayKeys(q,r){
var s=new e();
if((typeof(r)==='number')){
var t=r;
for(var u=0;u<t;++u){
var v=q[u];
if(!(v===(void 0))||u in q){
s.push(u);
}
}
}else{
var w=r.length;
for(var x=0;x<w;++x){
var y=r[x];
if(!(y===(void 0))){
var v=q[y];
if(!(v===(void 0))||y in q){
s.push(y);
}
}
}
s.sort(function(z,A){return z-A;});
}
return s;
}
function SparseJoinWithSeparatorJS(q,B,C,D){
var s=GetSortedArrayKeys(q,%GetArrayKeys(q,B));
var E=0;
var F=new e(s.length*2);
var G=-1;
for(var u=0;u<s.length;u++){
var y=s[u];
if(y!=G){
var v=q[y];
if(!(typeof(v)==='string'))v=C(v);
F[u*2]=y;
F[u*2+1]=v;
G=y;
}
}
return %SparseJoinWithSeparator(F,B,D);
}
function SparseJoin(q,B,C){
var s=GetSortedArrayKeys(q,%GetArrayKeys(q,B));
var H=-1;
var I=s.length;
var F=new e(I);
var J=0;
for(var u=0;u<I;u++){
var y=s[u];
if(y!=H){
var v=q[y];
if(!(typeof(v)==='string'))v=C(v);
F[J++]=v;
H=y;
}
}
return %StringBuilderConcat(F,J,'');
}
function UseSparseVariant(q,w,K,L){
if(!K||w<1000||%IsObserved(q)||
%HasComplexElements(q)){
return false;
}
if(!%_IsSmi(w)){
return true;
}
var M=w>>2;
var N=%EstimateNumberOfElements(q);
return(N<M)&&
(L>N*4);
}
function Join(q,w,D,C){
if(w==0)return'';
var K=(%_IsArray(q));
if(K){
if(!%PushIfAbsent(p,q))return'';
}
try{
if(UseSparseVariant(q,w,K,w)){
%NormalizeElements(q);
if(D.length==0){
return SparseJoin(q,w,C);
}else{
return SparseJoinWithSeparatorJS(q,w,C,D);
}
}
if(w==1){
var v=q[0];
if((typeof(v)==='string'))return v;
return C(v);
}
var F=new e(w);
if(D.length==0){
var J=0;
for(var u=0;u<w;u++){
var v=q[u];
if(!(typeof(v)==='string'))v=C(v);
F[J++]=v;
}
F.length=J;
var O=%_FastOneByteArrayJoin(F,'');
if(!(O===(void 0)))return O;
return %StringBuilderConcat(F,J,'');
}
if(!(typeof(q[0])==='number')){
for(var u=0;u<w;u++){
var v=q[u];
if(!(typeof(v)==='string'))v=C(v);
F[u]=v;
}
}else{
for(var u=0;u<w;u++){
var v=q[u];
if((typeof(v)==='number')){
v=%_NumberToString(v);
}else if(!(typeof(v)==='string')){
v=C(v);
}
F[u]=v;
}
}
var O=%_FastOneByteArrayJoin(F,D);
if(!(O===(void 0)))return O;
return %StringBuilderJoin(F,w,D);
}finally{
if(K)p.length=p.length-1;
}
}
function ConvertToString(P){
if((P==null)){
return'';
}else{
return(%_ToString(P));
}
}
function ConvertToLocaleString(v){
if((v==null)){
return'';
}else{
var Q=(%_ToObject(v));
return(%_ToString(Q.toLocaleString()));
}
}
function SparseSlice(q,R,S,B,T){
var r=%GetArrayKeys(q,R+S);
if((typeof(r)==='number')){
var t=r;
for(var u=R;u<t;++u){
var U=q[u];
if(!(U===(void 0))||u in q){
%AddElement(T,u-R,U);
}
}
}else{
var w=r.length;
for(var x=0;x<w;++x){
var y=r[x];
if(!(y===(void 0))){
if(y>=R){
var U=q[y];
if(!(U===(void 0))||y in q){
%AddElement(T,y-R,U);
}
}
}
}
}
}
function SparseMove(q,R,S,B,V){
if(V===S)return;
var W=new e(
g(B-S+V,0xffffffff));
var X;
var r=%GetArrayKeys(q,B);
if((typeof(r)==='number')){
var t=r;
for(var u=0;u<R&&u<t;++u){
var U=q[u];
if(!(U===(void 0))||u in q){
W[u]=U;
}
}
for(var u=R+S;u<t;++u){
var U=q[u];
if(!(U===(void 0))||u in q){
W[u-S+V]=U;
}
}
}else{
var w=r.length;
for(var x=0;x<w;++x){
var y=r[x];
if(!(y===(void 0))){
if(y<R){
var U=q[y];
if(!(U===(void 0))||y in q){
W[y]=U;
}
}else if(y>=R+S){
var U=q[y];
if(!(U===(void 0))||y in q){
var Y=y-S+V;
W[Y]=U;
if(Y>0xfffffffe){
X=X||new e();
X.push(Y);
}
}
}
}
}
}
%MoveArrayContents(W,q);
if(!(X===(void 0))){
var w=X.length;
for(var u=0;u<w;++u){
var y=X[u];
q[y]=W[y];
}
}
}
function SimpleSlice(q,R,S,B,T){
var K=(%_IsArray(q));
for(var u=0;u<S;u++){
var Z=R+u;
if(((K&&%_HasFastPackedElements(%IS_VAR(q)))?(Z<q.length):(Z in q))){
var U=q[Z];
%AddElement(T,u,U);
}
}
}
function SimpleMove(q,R,S,B,V){
var K=(%_IsArray(q));
if(V!==S){
if(V>S){
for(var u=B-S;u>R;u--){
var aa=u+S-1;
var ab=u+V-1;
if(((K&&%_HasFastPackedElements(%IS_VAR(q)))?(aa<q.length):(aa in q))){
q[ab]=q[aa];
}else{
delete q[ab];
}
}
}else{
for(var u=R;u<B-S;u++){
var aa=u+S;
var ab=u+V;
if(((K&&%_HasFastPackedElements(%IS_VAR(q)))?(aa<q.length):(aa in q))){
q[ab]=q[aa];
}else{
delete q[ab];
}
}
for(var u=B;u>B-S+V;u--){
delete q[u-1];
}
}
}
}
function ArrayToString(){
var q;
var ac;
if((%_IsArray(this))){
ac=this.join;
if(ac===ArrayJoin){
return Join(this,this.length,',',ConvertToString);
}
q=this;
}else{
q=(%_ToObject(this));
ac=q.join;
}
if(!(typeof(ac)==='function')){
return %_CallFunction(q,k);
}
return %_Call(ac,q);
}
function InnerArrayToLocaleString(q,w){
var B=(harmony_tolength?(%ToLength(w)):(w>>>0));
if(B===0)return"";
return Join(q,B,',',ConvertToLocaleString);
}
function ArrayToLocaleString(){
var q=(%_ToObject(this));
var ad=q.length;
return InnerArrayToLocaleString(q,ad);
}
function InnerArrayJoin(D,q,w){
if((D===(void 0))){
D=',';
}else{
D=(%_ToString(D));
}
var O=%_FastOneByteArrayJoin(q,D);
if(!(O===(void 0)))return O;
if(w===1){
var v=q[0];
if((v==null))return'';
return(%_ToString(v));
}
return Join(q,w,D,ConvertToString);
}
function ArrayJoin(D){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"Array.prototype.join");
var q=(%_ToObject(this));
var w=(harmony_tolength?(%ToLength(q.length)):(q.length>>>0));
return InnerArrayJoin(D,q,w);
}
function ObservedArrayPop(ae){
ae--;
var af=this[ae];
try{
$observeBeginPerformSplice(this);
delete this[ae];
this.length=ae;
}finally{
$observeEndPerformSplice(this);
$observeEnqueueSpliceRecord(this,ae,[af],0);
}
return af;
}
function ArrayPop(){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"Array.prototype.pop");
var q=(%_ToObject(this));
var ae=(harmony_tolength?(%ToLength(q.length)):(q.length>>>0));
if(ae==0){
q.length=ae;
return;
}
if(%IsObserved(q))
return ObservedArrayPop.call(q,ae);
ae--;
var af=q[ae];
c(q,ae,true);
q.length=ae;
return af;
}
function ObservedArrayPush(){
var ae=(harmony_tolength?(%ToLength(this.length)):(this.length>>>0));
var ag=%_ArgumentsLength();
try{
$observeBeginPerformSplice(this);
for(var u=0;u<ag;u++){
this[u+ae]=%_Arguments(u);
}
var ah=ae+ag;
this.length=ah;
}finally{
$observeEndPerformSplice(this);
$observeEnqueueSpliceRecord(this,ae,[],ag);
}
return ah;
}
function ArrayPush(){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"Array.prototype.push");
if(%IsObserved(this))
return ObservedArrayPush.apply(this,arguments);
var q=(%_ToObject(this));
var ae=(harmony_tolength?(%ToLength(q.length)):(q.length>>>0));
var ag=%_ArgumentsLength();
for(var u=0;u<ag;u++){
q[u+ae]=%_Arguments(u);
}
var ah=ae+ag;
q.length=ah;
return ah;
}
function SparseReverse(q,B){
var s=GetSortedArrayKeys(q,%GetArrayKeys(q,B));
var ai=s.length-1;
var aj=0;
while(aj<=ai){
var u=s[aj];
var ak=s[ai];
var al=B-ak-1;
var am,an;
if(al<=u){
an=ak;
while(s[--ai]==ak){}
am=al;
}
if(al>=u){
am=u;
while(s[++aj]==u){}
an=B-u-1;
}
var ao=q[am];
if(!(ao===(void 0))||am in q){
var ap=q[an];
if(!(ap===(void 0))||an in q){
q[am]=ap;
q[an]=ao;
}else{
q[an]=ao;
delete q[am];
}
}else{
var ap=q[an];
if(!(ap===(void 0))||an in q){
q[am]=ap;
delete q[an];
}
}
}
}
function PackedArrayReverse(q,B){
var ak=B-1;
for(var u=0;u<ak;u++,ak--){
var ao=q[u];
var ap=q[ak];
q[u]=ap;
q[ak]=ao;
}
return q;
}
function GenericArrayReverse(q,B){
var ak=B-1;
for(var u=0;u<ak;u++,ak--){
if(u in q){
var ao=q[u];
if(ak in q){
var ap=q[ak];
q[u]=ap;
q[ak]=ao;
}else{
q[ak]=ao;
delete q[u];
}
}else{
if(ak in q){
var ap=q[ak];
q[u]=ap;
delete q[ak];
}
}
}
return q;
}
function ArrayReverse(){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"Array.prototype.reverse");
var q=(%_ToObject(this));
var B=(harmony_tolength?(%ToLength(q.length)):(q.length>>>0));
var aq=(%_IsArray(q));
if(UseSparseVariant(q,B,aq,B)){
%NormalizeElements(q);
SparseReverse(q,B);
return q;
}else if(aq&&%_HasFastPackedElements(q)){
return PackedArrayReverse(q,B);
}else{
return GenericArrayReverse(q,B);
}
}
function ObservedArrayShift(B){
var ar=this[0];
try{
$observeBeginPerformSplice(this);
SimpleMove(this,0,1,B,0);
this.length=B-1;
}finally{
$observeEndPerformSplice(this);
$observeEnqueueSpliceRecord(this,0,[ar],0);
}
return ar;
}
function ArrayShift(){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"Array.prototype.shift");
var q=(%_ToObject(this));
var B=(harmony_tolength?(%ToLength(q.length)):(q.length>>>0));
if(B===0){
q.length=0;
return;
}
if(j(q))throw MakeTypeError(11);
if(%IsObserved(q))
return ObservedArrayShift.call(q,B);
var ar=q[0];
if(UseSparseVariant(q,B,(%_IsArray(q)),B)){
SparseMove(q,0,1,B,0);
}else{
SimpleMove(q,0,1,B,0);
}
q.length=B-1;
return ar;
}
function ObservedArrayUnshift(){
var B=(harmony_tolength?(%ToLength(this.length)):(this.length>>>0));
var as=%_ArgumentsLength();
try{
$observeBeginPerformSplice(this);
SimpleMove(this,0,0,B,as);
for(var u=0;u<as;u++){
this[u]=%_Arguments(u);
}
var ah=B+as;
this.length=ah;
}finally{
$observeEndPerformSplice(this);
$observeEnqueueSpliceRecord(this,0,[],as);
}
return ah;
}
function ArrayUnshift(at){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"Array.prototype.unshift");
if(%IsObserved(this))
return ObservedArrayUnshift.apply(this,arguments);
var q=(%_ToObject(this));
var B=(harmony_tolength?(%ToLength(q.length)):(q.length>>>0));
var as=%_ArgumentsLength();
if(B>0&&UseSparseVariant(q,B,(%_IsArray(q)),B)&&
!j(q)){
SparseMove(q,0,0,B,as);
}else{
SimpleMove(q,0,0,B,as);
}
for(var u=0;u<as;u++){
q[u]=%_Arguments(u);
}
var ah=B+as;
q.length=ah;
return ah;
}
function ArraySlice(au,av){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"Array.prototype.slice");
var q=(%_ToObject(this));
var B=(harmony_tolength?(%ToLength(q.length)):(q.length>>>0));
var R=(%_ToInteger(au));
var aw=B;
if(!(av===(void 0)))aw=(%_ToInteger(av));
if(R<0){
R+=B;
if(R<0)R=0;
}else{
if(R>B)R=B;
}
if(aw<0){
aw+=B;
if(aw<0)aw=0;
}else{
if(aw>B)aw=B;
}
var O=[];
if(aw<R)return O;
if(UseSparseVariant(q,B,(%_IsArray(q)),aw-R)){
%NormalizeElements(q);
%NormalizeElements(O);
SparseSlice(q,R,aw-R,B,O);
}else{
SimpleSlice(q,R,aw-R,B,O);
}
O.length=aw-R;
return O;
}
function ComputeSpliceStartIndex(R,B){
if(R<0){
R+=B;
return R<0?0:R;
}
return R>B?B:R;
}
function ComputeSpliceDeleteCount(ax,as,B,R){
var S=0;
if(as==1)
return B-R;
S=(%_ToInteger(ax));
if(S<0)
return 0;
if(S>B-R)
return B-R;
return S;
}
function ObservedArraySplice(au,ax){
var as=%_ArgumentsLength();
var B=(harmony_tolength?(%ToLength(this.length)):(this.length>>>0));
var R=ComputeSpliceStartIndex((%_ToInteger(au)),B);
var S=ComputeSpliceDeleteCount(ax,as,B,
R);
var T=[];
T.length=S;
var ay=as>2?as-2:0;
try{
$observeBeginPerformSplice(this);
SimpleSlice(this,R,S,B,T);
SimpleMove(this,R,S,B,ay);
var u=R;
var az=2;
var aA=%_ArgumentsLength();
while(az<aA){
this[u++]=%_Arguments(az++);
}
this.length=B-S+ay;
}finally{
$observeEndPerformSplice(this);
if(T.length||ay){
$observeEnqueueSpliceRecord(this,
R,
T.slice(),
ay);
}
}
return T;
}
function ArraySplice(au,ax){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"Array.prototype.splice");
if(%IsObserved(this))
return ObservedArraySplice.apply(this,arguments);
var as=%_ArgumentsLength();
var q=(%_ToObject(this));
var B=(harmony_tolength?(%ToLength(q.length)):(q.length>>>0));
var R=ComputeSpliceStartIndex((%_ToInteger(au)),B);
var S=ComputeSpliceDeleteCount(ax,as,B,
R);
var T=[];
T.length=S;
var ay=as>2?as-2:0;
if(S!=ay&&j(q)){
throw MakeTypeError(11);
}else if(S>0&&i(q)){
throw MakeTypeError(10);
}
var aB=S;
if(ay!=S){
aB+=B-R-S;
}
if(UseSparseVariant(q,B,(%_IsArray(q)),aB)){
%NormalizeElements(q);
%NormalizeElements(T);
SparseSlice(q,R,S,B,T);
SparseMove(q,R,S,B,ay);
}else{
SimpleSlice(q,R,S,B,T);
SimpleMove(q,R,S,B,ay);
}
var u=R;
var az=2;
var aA=%_ArgumentsLength();
while(az<aA){
q[u++]=%_Arguments(az++);
}
q.length=B-S+ay;
return T;
}
function InnerArraySort(q,w,aC){
if(!(typeof(aC)==='function')){
aC=function(P,aD){
if(P===aD)return 0;
if(%_IsSmi(P)&&%_IsSmi(aD)){
return %SmiLexicographicCompare(P,aD);
}
P=m(P);
aD=m(aD);
if(P==aD)return 0;
else return P<aD?-1:1;
};
}
var aE=function InsertionSort(z,o,aF){
for(var u=o+1;u<aF;u++){
var aG=z[u];
for(var ak=u-1;ak>=o;ak--){
var aH=z[ak];
var aI=aC(aH,aG);
if(aI>0){
z[ak+1]=aH;
}else{
break;
}
}
z[ak+1]=aG;
}
};
var aJ=function(z,o,aF){
var aK=new e();
var aL=200+((aF-o)&15);
var ak=0;
o+=1;
aF-=1;
for(var u=o;u<aF;u+=aL){
aK[ak]=[u,z[u]];
ak++;
}
aK.sort(function(z,A){
return aC(z[1],A[1]);
});
var aM=aK[aK.length>>1][0];
return aM;
}
var aN=function QuickSort(z,o,aF){
var aM=0;
while(true){
if(aF-o<=10){
aE(z,o,aF);
return;
}
if(aF-o>1000){
aM=aJ(z,o,aF);
}else{
aM=o+((aF-o)>>1);
}
var aO=z[o];
var aP=z[aF-1];
var aQ=z[aM];
var aR=aC(aO,aP);
if(aR>0){
var aH=aO;
aO=aP;
aP=aH;
}
var aS=aC(aO,aQ);
if(aS>=0){
var aH=aO;
aO=aQ;
aQ=aP;
aP=aH;
}else{
var aT=aC(aP,aQ);
if(aT>0){
var aH=aP;
aP=aQ;
aQ=aH;
}
}
z[o]=aO;
z[aF-1]=aQ;
var aU=aP;
var aV=o+1;
var aW=aF-1;
z[aM]=z[aV];
z[aV]=aU;
partition:for(var u=aV+1;u<aW;u++){
var aG=z[u];
var aI=aC(aG,aU);
if(aI<0){
z[u]=z[aV];
z[aV]=aG;
aV++;
}else if(aI>0){
do{
aW--;
if(aW==u)break partition;
var aX=z[aW];
aI=aC(aX,aU);
}while(aI>0);
z[u]=z[aW];
z[aW]=aG;
if(aI<0){
aG=z[u];
z[u]=z[aV];
z[aV]=aG;
aV++;
}
}
}
if(aF-aW<aV-o){
aN(z,aW,aF);
aF=aV;
}else{
aN(z,o,aV);
o=aW;
}
}
};
var aY=function CopyFromPrototype(aZ,w){
var ba=0;
for(var bb=%_GetPrototype(aZ);bb;bb=%_GetPrototype(bb)){
var r=%GetArrayKeys(bb,w);
if((typeof(r)==='number')){
var bc=r;
for(var u=0;u<bc;u++){
if(!(%_CallFunction(aZ,u,h))&&(%_CallFunction(bb,u,h))){
aZ[u]=bb[u];
if(u>=ba){ba=u+1;}
}
}
}else{
for(var u=0;u<r.length;u++){
var Z=r[u];
if(!(Z===(void 0))&&!(%_CallFunction(aZ,Z,h))
&&(%_CallFunction(bb,Z,h))){
aZ[Z]=bb[Z];
if(Z>=ba){ba=Z+1;}
}
}
}
}
return ba;
};
var bd=function(aZ,o,aF){
for(var bb=%_GetPrototype(aZ);bb;bb=%_GetPrototype(bb)){
var r=%GetArrayKeys(bb,aF);
if((typeof(r)==='number')){
var bc=r;
for(var u=o;u<bc;u++){
if((%_CallFunction(bb,u,h))){
aZ[u]=(void 0);
}
}
}else{
for(var u=0;u<r.length;u++){
var Z=r[u];
if(!(Z===(void 0))&&o<=Z&&
(%_CallFunction(bb,Z,h))){
aZ[Z]=(void 0);
}
}
}
}
};
var be=function SafeRemoveArrayHoles(aZ){
var bf=0;
var bg=w-1;
var bh=0;
while(bf<bg){
while(bf<bg&&
!(aZ[bf]===(void 0))){
bf++;
}
if(!(%_CallFunction(aZ,bf,h))){
bh++;
}
while(bf<bg&&
(aZ[bg]===(void 0))){
if(!(%_CallFunction(aZ,bg,h))){
bh++;
}
bg--;
}
if(bf<bg){
aZ[bf]=aZ[bg];
aZ[bg]=(void 0);
}
}
if(!(aZ[bf]===(void 0)))bf++;
var u;
for(u=bf;u<w-bh;u++){
aZ[u]=(void 0);
}
for(u=w-bh;u<w;u++){
if(u in %_GetPrototype(aZ)){
aZ[u]=(void 0);
}else{
delete aZ[u];
}
}
return bf;
};
if(w<2)return q;
var K=(%_IsArray(q));
var bi;
if(!K){
bi=aY(q,w);
}
var bj=%RemoveArrayHoles(q,w);
if(bj==-1){
bj=be(q);
}
aN(q,0,bj);
if(!K&&(bj+1<bi)){
bd(q,bj,bi);
}
return q;
}
function ArraySort(aC){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"Array.prototype.sort");
var q=(%_ToObject(this));
var w=(harmony_tolength?(%ToLength(q.length)):(q.length>>>0));
return InnerArraySort(q,w,aC);
}
function InnerArrayFilter(bk,bl,q,w){
if(!(typeof(bk)==='function'))throw MakeTypeError(13,bk);
var bm=new e();
var bn=0;
var K=(%_IsArray(q));
var bo=(%_DebugIsActive()!=0)&&%DebugCallbackSupportsStepping(bk);
for(var u=0;u<w;u++){
if(((K&&%_HasFastPackedElements(%IS_VAR(q)))?(u<q.length):(u in q))){
var aG=q[u];
if(bo)%DebugPrepareStepInIfStepping(bk);
if(%_Call(bk,bl,aG,u,q)){
bm[bn++]=aG;
}
}
}
var O=new d();
%MoveArrayContents(bm,O);
return O;
}
function ArrayFilter(bk,bl){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"Array.prototype.filter");
var q=(%_ToObject(this));
var w=(harmony_tolength?(%ToLength(q.length)):(q.length>>>0));
return InnerArrayFilter(bk,bl,q,w);
}
function InnerArrayForEach(bk,bl,q,w){
if(!(typeof(bk)==='function'))throw MakeTypeError(13,bk);
var K=(%_IsArray(q));
var bo=(%_DebugIsActive()!=0)&&%DebugCallbackSupportsStepping(bk);
for(var u=0;u<w;u++){
if(((K&&%_HasFastPackedElements(%IS_VAR(q)))?(u<q.length):(u in q))){
var aG=q[u];
if(bo)%DebugPrepareStepInIfStepping(bk);
%_Call(bk,bl,aG,u,q);
}
}
}
function ArrayForEach(bk,bl){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"Array.prototype.forEach");
var q=(%_ToObject(this));
var w=(harmony_tolength?(%ToLength(q.length)):(q.length>>>0));
InnerArrayForEach(bk,bl,q,w);
}
function InnerArraySome(bk,bl,q,w){
if(!(typeof(bk)==='function'))throw MakeTypeError(13,bk);
var K=(%_IsArray(q));
var bo=(%_DebugIsActive()!=0)&&%DebugCallbackSupportsStepping(bk);
for(var u=0;u<w;u++){
if(((K&&%_HasFastPackedElements(%IS_VAR(q)))?(u<q.length):(u in q))){
var aG=q[u];
if(bo)%DebugPrepareStepInIfStepping(bk);
if(%_Call(bk,bl,aG,u,q))return true;
}
}
return false;
}
function ArraySome(bk,bl){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"Array.prototype.some");
var q=(%_ToObject(this));
var w=(harmony_tolength?(%ToLength(q.length)):(q.length>>>0));
return InnerArraySome(bk,bl,q,w);
}
function InnerArrayEvery(bk,bl,q,w){
if(!(typeof(bk)==='function'))throw MakeTypeError(13,bk);
var K=(%_IsArray(q));
var bo=(%_DebugIsActive()!=0)&&%DebugCallbackSupportsStepping(bk);
for(var u=0;u<w;u++){
if(((K&&%_HasFastPackedElements(%IS_VAR(q)))?(u<q.length):(u in q))){
var aG=q[u];
if(bo)%DebugPrepareStepInIfStepping(bk);
if(!%_Call(bk,bl,aG,u,q))return false;
}
}
return true;
}
function ArrayEvery(bk,bl){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"Array.prototype.every");
var q=(%_ToObject(this));
var w=(harmony_tolength?(%ToLength(q.length)):(q.length>>>0));
return InnerArrayEvery(bk,bl,q,w);
}
function InnerArrayMap(bk,bl,q,w){
if(!(typeof(bk)==='function'))throw MakeTypeError(13,bk);
var bm=new e(w);
var K=(%_IsArray(q));
var bo=(%_DebugIsActive()!=0)&&%DebugCallbackSupportsStepping(bk);
for(var u=0;u<w;u++){
if(((K&&%_HasFastPackedElements(%IS_VAR(q)))?(u<q.length):(u in q))){
var aG=q[u];
if(bo)%DebugPrepareStepInIfStepping(bk);
bm[u]=%_Call(bk,bl,aG,u,q);
}
}
var O=new d();
%MoveArrayContents(bm,O);
return O;
}
function ArrayMap(bk,bl){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"Array.prototype.map");
var q=(%_ToObject(this));
var w=(harmony_tolength?(%ToLength(q.length)):(q.length>>>0));
return InnerArrayMap(bk,bl,q,w);
}
function InnerArrayIndexOf(q,aG,Z,w){
if(w==0)return-1;
if((Z===(void 0))){
Z=0;
}else{
Z=(%_ToInteger(Z));
if(Z<0){
Z=w+Z;
if(Z<0)Z=0;
}
}
var bp=Z;
var ba=w;
if(UseSparseVariant(q,w,(%_IsArray(q)),ba-bp)){
%NormalizeElements(q);
var r=%GetArrayKeys(q,w);
if((typeof(r)==='number')){
ba=r;
}else{
if(r.length==0)return-1;
var bq=GetSortedArrayKeys(q,r);
var ae=bq.length;
var u=0;
while(u<ae&&bq[u]<Z)u++;
while(u<ae){
var y=bq[u];
if(!(y===(void 0))&&q[y]===aG)return y;
u++;
}
return-1;
}
}
if(!(aG===(void 0))){
for(var u=bp;u<ba;u++){
if(q[u]===aG)return u;
}
return-1;
}
for(var u=bp;u<ba;u++){
if((q[u]===(void 0))&&u in q){
return u;
}
}
return-1;
}
function ArrayIndexOf(aG,Z){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"Array.prototype.indexOf");
var w=(harmony_tolength?(%ToLength(this.length)):(this.length>>>0));
return InnerArrayIndexOf(this,aG,Z,w);
}
function InnerArrayLastIndexOf(q,aG,Z,w,br){
if(w==0)return-1;
if(br<2){
Z=w-1;
}else{
Z=(%_ToInteger(Z));
if(Z<0)Z+=w;
if(Z<0)return-1;
else if(Z>=w)Z=w-1;
}
var bp=0;
var ba=Z;
if(UseSparseVariant(q,w,(%_IsArray(q)),Z)){
%NormalizeElements(q);
var r=%GetArrayKeys(q,Z+1);
if((typeof(r)==='number')){
ba=r;
}else{
if(r.length==0)return-1;
var bq=GetSortedArrayKeys(q,r);
var u=bq.length-1;
while(u>=0){
var y=bq[u];
if(!(y===(void 0))&&q[y]===aG)return y;
u--;
}
return-1;
}
}
if(!(aG===(void 0))){
for(var u=ba;u>=bp;u--){
if(q[u]===aG)return u;
}
return-1;
}
for(var u=ba;u>=bp;u--){
if((q[u]===(void 0))&&u in q){
return u;
}
}
return-1;
}
function ArrayLastIndexOf(aG,Z){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"Array.prototype.lastIndexOf");
var w=(harmony_tolength?(%ToLength(this.length)):(this.length>>>0));
return InnerArrayLastIndexOf(this,aG,Z,w,
%_ArgumentsLength());
}
function InnerArrayReduce(bs,U,q,w,br){
if(!(typeof(bs)==='function')){
throw MakeTypeError(13,bs);
}
var K=(%_IsArray(q));
var u=0;
find_initial:if(br<2){
for(;u<w;u++){
if(((K&&%_HasFastPackedElements(%IS_VAR(q)))?(u<q.length):(u in q))){
U=q[u++];
break find_initial;
}
}
throw MakeTypeError(97);
}
var bo=(%_DebugIsActive()!=0)&&%DebugCallbackSupportsStepping(bs);
for(;u<w;u++){
if(((K&&%_HasFastPackedElements(%IS_VAR(q)))?(u<q.length):(u in q))){
var aG=q[u];
if(bo)%DebugPrepareStepInIfStepping(bs);
U=bs(U,aG,u,q);
}
}
return U;
}
function ArrayReduce(bs,U){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"Array.prototype.reduce");
var q=(%_ToObject(this));
var w=(harmony_tolength?(%ToLength(q.length)):(q.length>>>0));
return InnerArrayReduce(bs,U,q,w,
%_ArgumentsLength());
}
function InnerArrayReduceRight(bs,U,q,w,
br){
if(!(typeof(bs)==='function')){
throw MakeTypeError(13,bs);
}
var K=(%_IsArray(q));
var u=w-1;
find_initial:if(br<2){
for(;u>=0;u--){
if(((K&&%_HasFastPackedElements(%IS_VAR(q)))?(u<q.length):(u in q))){
U=q[u--];
break find_initial;
}
}
throw MakeTypeError(97);
}
var bo=(%_DebugIsActive()!=0)&&%DebugCallbackSupportsStepping(bs);
for(;u>=0;u--){
if(((K&&%_HasFastPackedElements(%IS_VAR(q)))?(u<q.length):(u in q))){
var aG=q[u];
if(bo)%DebugPrepareStepInIfStepping(bs);
U=bs(U,aG,u,q);
}
}
return U;
}
function ArrayReduceRight(bs,U){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"Array.prototype.reduceRight");
var q=(%_ToObject(this));
var w=(harmony_tolength?(%ToLength(q.length)):(q.length>>>0));
return InnerArrayReduceRight(bs,U,q,w,
%_ArgumentsLength());
}
function ArrayIsArray(aZ){
return(%_IsArray(aZ));
}
%AddNamedProperty(d.prototype,"constructor",d,
2);
var bt={
__proto__:null,
copyWithin:true,
entries:true,
fill:true,
find:true,
findIndex:true,
keys:true,
};
%AddNamedProperty(d.prototype,n,bt,
2|1);
b.InstallFunctions(d,2,[
"isArray",ArrayIsArray
]);
var bu=%SpecialArrayFunctions();
var bv=function(bw,bx,B){
var bk=bx;
if(bu.hasOwnProperty(bw)){
bk=bu[bw];
}
if(!(B===(void 0))){
%FunctionSetLength(bk,B);
}
return bk;
};
b.InstallFunctions(d.prototype,2,[
"toString",bv("toString",ArrayToString),
"toLocaleString",bv("toLocaleString",ArrayToLocaleString),
"join",bv("join",ArrayJoin),
"pop",bv("pop",ArrayPop),
"push",bv("push",ArrayPush,1),
"reverse",bv("reverse",ArrayReverse),
"shift",bv("shift",ArrayShift),
"unshift",bv("unshift",ArrayUnshift,1),
"slice",bv("slice",ArraySlice,2),
"splice",bv("splice",ArraySplice,2),
"sort",bv("sort",ArraySort),
"filter",bv("filter",ArrayFilter,1),
"forEach",bv("forEach",ArrayForEach,1),
"some",bv("some",ArraySome,1),
"every",bv("every",ArrayEvery,1),
"map",bv("map",ArrayMap,1),
"indexOf",bv("indexOf",ArrayIndexOf,1),
"lastIndexOf",bv("lastIndexOf",ArrayLastIndexOf,1),
"reduce",bv("reduce",ArrayReduce,1),
"reduceRight",bv("reduceRight",ArrayReduceRight,1)
]);
%FinishArrayPrototypeSetup(d.prototype);
b.SetUpLockedPrototype(e,d(),[
"indexOf",bv("indexOf",ArrayIndexOf),
"join",bv("join",ArrayJoin),
"pop",bv("pop",ArrayPop),
"push",bv("push",ArrayPush),
"shift",bv("shift",ArrayShift),
"sort",bv("sort",ArraySort),
"splice",bv("splice",ArraySplice)
]);
b.SetUpLockedPrototype(f,d(),[
"join",bv("join",ArrayJoin),
"pop",bv("pop",ArrayPop),
"push",bv("push",ArrayPush),
"shift",bv("shift",ArrayShift)
]);
b.Export(function(aF){
aF.ArrayIndexOf=ArrayIndexOf;
aF.ArrayJoin=ArrayJoin;
aF.ArrayPush=ArrayPush;
aF.ArrayToString=ArrayToString;
aF.InnerArrayEvery=InnerArrayEvery;
aF.InnerArrayFilter=InnerArrayFilter;
aF.InnerArrayForEach=InnerArrayForEach;
aF.InnerArrayIndexOf=InnerArrayIndexOf;
aF.InnerArrayJoin=InnerArrayJoin;
aF.InnerArrayLastIndexOf=InnerArrayLastIndexOf;
aF.InnerArrayMap=InnerArrayMap;
aF.InnerArrayReduce=InnerArrayReduce;
aF.InnerArrayReduceRight=InnerArrayReduceRight;
aF.InnerArraySome=InnerArraySome;
aF.InnerArraySort=InnerArraySort;
aF.InnerArrayToLocaleString=InnerArrayToLocaleString;
aF.PackedArrayReverse=PackedArrayReverse;
});
%InstallToContext([
"array_pop",ArrayPop,
"array_push",ArrayPush,
"array_shift",ArrayShift,
"array_splice",ArraySplice,
"array_slice",ArraySlice,
"array_unshift",ArrayUnshift,
]);
});

string¶
(function(a,b){
%CheckIsBootstrapping();
var c;
var d;
var e=a.RegExp;
var f=a.String;
var g=b.InternalArray;
var h=b.InternalPackedArray;
var i;
var j;
var k;
var l;
b.Import(function(m){
c=m.ArrayIndexOf;
d=m.ArrayJoin;
i=m.RegExpExec;
j=m.RegExpExecNoTests;
k=m.RegExpLastMatchInfo;
l=m.ToNumber;
});
function StringToString(){
if(!(typeof(this)==='string')&&!(%_ClassOf(this)==='String')){
throw MakeTypeError(58,'String.prototype.toString');
}
return %_ValueOf(this);
}
function StringValueOf(){
if(!(typeof(this)==='string')&&!(%_ClassOf(this)==='String')){
throw MakeTypeError(58,'String.prototype.valueOf');
}
return %_ValueOf(this);
}
function StringCharAtJS(n){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"String.prototype.charAt");
var o=%_StringCharAt(this,n);
if(%_IsSmi(o)){
o=%_StringCharAt((%_ToString(this)),(%_ToInteger(n)));
}
return o;
}
function StringCharCodeAtJS(n){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"String.prototype.charCodeAt");
var o=%_StringCharCodeAt(this,n);
if(!%_IsSmi(o)){
o=%_StringCharCodeAt((%_ToString(this)),(%_ToInteger(n)));
}
return o;
}
function StringConcat(p){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"String.prototype.concat");
var q=%_ArgumentsLength();
var r=(%_ToString(this));
if(q===1){
return r+(%_ToString(p));
}
var s=new g(q+1);
s[0]=r;
for(var t=0;t<q;t++){
var u=%_Arguments(t);
s[t+1]=(%_ToString(u));
}
return %StringBuilderConcat(s,q+1,"");
}
function StringIndexOfJS(v){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"String.prototype.indexOf");
var w=(%_ToString(this));
v=(%_ToString(v));
var x=0;
if(%_ArgumentsLength()>1){
x=%_Arguments(1);
x=(%_ToInteger(x));
if(x<0)x=0;
if(x>w.length)x=w.length;
}
return %StringIndexOf(w,v,x);
}
function StringLastIndexOfJS(y){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"String.prototype.lastIndexOf");
var z=(%_ToString(this));
var A=z.length;
var y=(%_ToString(y));
var B=y.length;
var x=A-B;
if(%_ArgumentsLength()>1){
var C=l(%_Arguments(1));
if(!(!%_IsSmi(%IS_VAR(C))&&!(C==C))){
C=(%_ToInteger(C));
if(C<0){
C=0;
}
if(C+B<A){
x=C;
}
}
}
if(x<0){
return-1;
}
return %StringLastIndexOf(z,y,x);
}
function StringLocaleCompareJS(p){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"String.prototype.localeCompare");
return %StringLocaleCompare((%_ToString(this)),(%_ToString(p)));
}
function StringMatchJS(D){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"String.prototype.match");
var w=(%_ToString(this));
if((%_IsRegExp(D))){
var E=(%_ToInteger(D.lastIndex));
if(!D.global)return j(D,w,0);
var o=%StringMatch(w,D,k);
if(o!==null)$regexpLastMatchInfoOverride=null;
D.lastIndex=0;
return o;
}
D=new e(D);
return j(D,w,0);
}
function StringNormalizeJS(){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"String.prototype.normalize");
var F=(%_ToString(this));
var G=%_Arguments(0);
var H=(G===(void 0))?'NFC':(%_ToString(G));
var I=['NFC','NFD','NFKC','NFKD'];
var J=
%_CallFunction(I,H,c);
if(J===-1){
throw MakeRangeError(148,
%_CallFunction(I,', ',d));
}
return F;
}
var K=[2,"","",-1,-1];
function StringReplace(L,M){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"String.prototype.replace");
var w=(%_ToString(this));
if((%_IsRegExp(L))){
var E=(%_ToInteger(L.lastIndex));
if(!(typeof(M)==='function')){
M=(%_ToString(M));
if(!L.global){
var N=i(L,w,0);
if(N==null){
L.lastIndex=0
return w;
}
if(M.length==0){
return %_SubString(w,0,N[3])+
%_SubString(w,N[4],w.length)
}
return ExpandReplacement(M,w,k,
%_SubString(w,0,N[3]))+
%_SubString(w,N[4],w.length);
}
L.lastIndex=0;
if($regexpLastMatchInfoOverride==null){
return %StringReplaceGlobalRegExpWithString(
w,L,M,k);
}else{
var O=k[1];
k[1]=0;
var P=%StringReplaceGlobalRegExpWithString(
w,L,M,k);
if(%_IsSmi(k[1])){
k[1]=O;
}else{
$regexpLastMatchInfoOverride=null;
}
return P;
}
}
if(L.global){
return StringReplaceGlobalRegExpWithFunction(w,L,M);
}
return StringReplaceNonGlobalRegExpWithFunction(w,L,M);
}
L=(%_ToString(L));
if(L.length==1&&
w.length>0xFF&&
(typeof(M)==='string')&&
%StringIndexOf(M,'$',0)<0){
return %StringReplaceOneCharWithString(w,L,M);
}
var Q=%StringIndexOf(w,L,0);
if(Q<0)return w;
var R=Q+L.length;
var o=%_SubString(w,0,Q);
if((typeof(M)==='function')){
o+=M(L,Q,w);
}else{
K[3]=Q;
K[4]=R;
o=ExpandReplacement((%_ToString(M)),
w,
K,
o);
}
return o+%_SubString(w,R,w.length);
}
function ExpandReplacement(S,w,T,o){
var U=S.length;
var V=%StringIndexOf(S,'$',0);
if(V<0){
if(U>0)o+=S;
return o;
}
if(V>0)o+=%_SubString(S,0,V);
while(true){
var W='$';
var C=V+1;
if(C<U){
var X=%_StringCharCodeAt(S,C);
if(X==36){
++C;
o+='$';
}else if(X==38){
++C;
o+=
%_SubString(w,T[3],T[4]);
}else if(X==96){
++C;
o+=%_SubString(w,0,T[3]);
}else if(X==39){
++C;
o+=%_SubString(w,T[4],w.length);
}else if(X>=48&&X<=57){
var Y=(X-48)<<1;
var Z=1;
var aa=((T)[0]);
if(C+1<S.length){
var V=%_StringCharCodeAt(S,C+1);
if(V>=48&&V<=57){
var ab=Y*10+((V-48)<<1);
if(ab<aa){
Y=ab;
Z=2;
}
}
}
if(Y!=0&&Y<aa){
var Q=T[(3+(Y))];
if(Q>=0){
o+=
%_SubString(w,Q,T[(3+(Y+1))]);
}
C+=Z;
}else{
o+='$';
}
}else{
o+='$';
}
}else{
o+='$';
}
V=%StringIndexOf(S,'$',C);
if(V<0){
if(C<U){
o+=%_SubString(S,C,U);
}
return o;
}
if(V>C){
o+=%_SubString(S,C,V);
}
}
return o;
}
function CaptureString(S,ac,x){
var ad=x<<1;
var Q=ac[(3+(ad))];
if(Q<0)return;
var R=ac[(3+(ad+1))];
return %_SubString(S,Q,R);
}
var ae=new g(4);
function StringReplaceGlobalRegExpWithFunction(w,D,M){
var af=ae;
if(af){
ae=null;
}else{
af=new g(16);
}
var ag=%RegExpExecMultiple(D,
w,
k,
af);
D.lastIndex=0;
if((ag===null)){
ae=af;
return w;
}
var q=ag.length;
if(((k)[0])==2){
var ah=0;
var ai=new h(null,0,w);
for(var t=0;t<q;t++){
var aj=ag[t];
if(%_IsSmi(aj)){
if(aj>0){
ah=(aj>>11)+(aj&0x7ff);
}else{
ah=ag[++t]-aj;
}
}else{
ai[0]=aj;
ai[1]=ah;
$regexpLastMatchInfoOverride=ai;
var ak=M(aj,ah,w);
ag[t]=(%_ToString(ak));
ah+=aj.length;
}
}
}else{
for(var t=0;t<q;t++){
var aj=ag[t];
if(!%_IsSmi(aj)){
$regexpLastMatchInfoOverride=aj;
var ak=%Apply(M,(void 0),aj,0,aj.length);
ag[t]=(%_ToString(ak));
}
}
}
var o=%StringBuilderConcat(ag,ag.length,w);
af.length=0;
ae=af;
return o;
}
function StringReplaceNonGlobalRegExpWithFunction(w,D,M){
var T=i(D,w,0);
if((T===null)){
D.lastIndex=0;
return w;
}
var x=T[3];
var o=%_SubString(w,0,x);
var al=T[4];
var am=((T)[0])>>1;
var an;
if(am==1){
var F=%_SubString(w,x,al);
an=M(F,x,w);
}else{
var ao=new g(am+2);
for(var ap=0;ap<am;ap++){
ao[ap]=CaptureString(w,T,ap);
}
ao[ap]=x;
ao[ap+1]=w;
an=%Apply(M,(void 0),ao,0,ap+2);
}
o+=an;
return o+%_SubString(w,al,w.length);
}
function StringSearch(aq){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"String.prototype.search");
var D;
if((%_IsRegExp(aq))){
D=aq;
}else{
D=new e(aq);
}
var N=i(D,(%_ToString(this)),0);
if(N){
return N[3];
}
return-1;
}
function StringSlice(Q,R){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"String.prototype.slice");
var F=(%_ToString(this));
var ar=F.length;
var as=(%_ToInteger(Q));
var at=ar;
if(!(R===(void 0))){
at=(%_ToInteger(R));
}
if(as<0){
as+=ar;
if(as<0){
as=0;
}
}else{
if(as>ar){
return'';
}
}
if(at<0){
at+=ar;
if(at<0){
return'';
}
}else{
if(at>ar){
at=ar;
}
}
if(at<=as){
return'';
}
return %_SubString(F,as,at);
}
function StringSplitJS(au,av){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"String.prototype.split");
var w=(%_ToString(this));
av=((av===(void 0)))?0xffffffff:(av>>>0);
var U=w.length;
if(!(%_IsRegExp(au))){
var aw=(%_ToString(au));
if(av===0)return[];
if((au===(void 0)))return[w];
var ax=aw.length;
if(ax===0)return %StringToArray(w,av);
var o=%StringSplit(w,aw,av);
return o;
}
if(av===0)return[];
return StringSplitOnRegExp(w,au,av,U);
}
function StringSplitOnRegExp(w,au,av,U){
if(U===0){
if(i(au,w,0,0)!=null){
return[];
}
return[w];
}
var ay=0;
var az=0;
var aA=0;
var o=new g();
outer_loop:
while(true){
if(az===U){
o[o.length]=%_SubString(w,ay,U);
break;
}
var T=i(au,w,az);
if(T==null||U===(aA=T[3])){
o[o.length]=%_SubString(w,ay,U);
break;
}
var aB=T[4];
if(az===aB&&aB===ay){
az++;
continue;
}
o[o.length]=%_SubString(w,ay,aA);
if(o.length===av)break;
var aC=((T)[0])+3;
for(var t=3+2;t<aC;){
var Q=T[t++];
var R=T[t++];
if(R!=-1){
o[o.length]=%_SubString(w,Q,R);
}else{
o[o.length]=(void 0);
}
if(o.length===av)break outer_loop;
}
az=ay=aB;
}
var aD=[];
%MoveArrayContents(o,aD);
return aD;
}
function StringSubstring(Q,R){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"String.prototype.subString");
var F=(%_ToString(this));
var ar=F.length;
var as=(%_ToInteger(Q));
if(as<0){
as=0;
}else if(as>ar){
as=ar;
}
var at=ar;
if(!(R===(void 0))){
at=(%_ToInteger(R));
if(at>ar){
at=ar;
}else{
if(at<0)at=0;
if(as>at){
var aE=at;
at=as;
as=aE;
}
}
}
return %_SubString(F,as,at);
}
function StringSubstr(Q,aF){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"String.prototype.substr");
var F=(%_ToString(this));
var q;
if((aF===(void 0))){
q=F.length;
}else{
q=(%_ToInteger(aF));
if(q<=0)return'';
}
if((Q===(void 0))){
Q=0;
}else{
Q=(%_ToInteger(Q));
if(Q>=F.length)return'';
if(Q<0){
Q+=F.length;
if(Q<0)Q=0;
}
}
var R=Q+q;
if(R>F.length)R=F.length;
return %_SubString(F,Q,R);
}
function StringToLowerCaseJS(){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"String.prototype.toLowerCase");
return %StringToLowerCase((%_ToString(this)));
}
function StringToLocaleLowerCase(){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"String.prototype.toLocaleLowerCase");
return %StringToLowerCase((%_ToString(this)));
}
function StringToUpperCaseJS(){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"String.prototype.toUpperCase");
return %StringToUpperCase((%_ToString(this)));
}
function StringToLocaleUpperCase(){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"String.prototype.toLocaleUpperCase");
return %StringToUpperCase((%_ToString(this)));
}
function StringTrimJS(){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"String.prototype.trim");
return %StringTrim((%_ToString(this)),true,true);
}
function StringTrimLeft(){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"String.prototype.trimLeft");
return %StringTrim((%_ToString(this)),true,false);
}
function StringTrimRight(){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"String.prototype.trimRight");
return %StringTrim((%_ToString(this)),false,true);
}
function StringFromCharCode(aG){
var aF=%_ArgumentsLength();
if(aF==1){
if(!%_IsSmi(aG))aG=l(aG);
return %_StringCharFromCode(aG&0xffff);
}
var aH=%NewString(aF,true);
var t;
for(t=0;t<aF;t++){
var aG=%_Arguments(t);
if(!%_IsSmi(aG))aG=l(aG)&0xffff;
if(aG<0)aG=aG&0xffff;
if(aG>0xff)break;
%_OneByteSeqStringSetChar(t,aG,aH);
}
if(t==aF)return aH;
aH=%TruncateString(aH,t);
var aI=%NewString(aF-t,false);
for(var ap=0;t<aF;t++,ap++){
var aG=%_Arguments(t);
if(!%_IsSmi(aG))aG=l(aG)&0xffff;
%_TwoByteSeqStringSetChar(ap,aG,aI);
}
return aH+aI;
}
function HtmlEscape(aJ){
return %_CallFunction((%_ToString(aJ)),/"/g,"&quot;",StringReplace);
}
function StringAnchor(aK){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"String.prototype.anchor");
return"<a name=\""+HtmlEscape(aK)+"\">"+(%_ToString(this))+
"</a>";
}
function StringBig(){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"String.prototype.big");
return"<big>"+(%_ToString(this))+"</big>";
}
function StringBlink(){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"String.prototype.blink");
return"<blink>"+(%_ToString(this))+"</blink>";
}
function StringBold(){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"String.prototype.bold");
return"<b>"+(%_ToString(this))+"</b>";
}
function StringFixed(){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"String.prototype.fixed");
return"<tt>"+(%_ToString(this))+"</tt>";
}
function StringFontcolor(aL){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"String.prototype.fontcolor");
return"<font color=\""+HtmlEscape(aL)+"\">"+(%_ToString(this))+
"</font>";
}
function StringFontsize(aM){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"String.prototype.fontsize");
return"<font size=\""+HtmlEscape(aM)+"\">"+(%_ToString(this))+
"</font>";
}
function StringItalics(){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"String.prototype.italics");
return"<i>"+(%_ToString(this))+"</i>";
}
function StringLink(F){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"String.prototype.link");
return"<a href=\""+HtmlEscape(F)+"\">"+(%_ToString(this))+"</a>";
}
function StringSmall(){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"String.prototype.small");
return"<small>"+(%_ToString(this))+"</small>";
}
function StringStrike(){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"String.prototype.strike");
return"<strike>"+(%_ToString(this))+"</strike>";
}
function StringSub(){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"String.prototype.sub");
return"<sub>"+(%_ToString(this))+"</sub>";
}
function StringSup(){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"String.prototype.sup");
return"<sup>"+(%_ToString(this))+"</sup>";
}
function StringRepeat(aN){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"String.prototype.repeat");
var F=(%_ToString(this));
var aF=(%_ToInteger(aN));
if(aF<0||aF>%_MaxSmi())throw MakeRangeError(133);
var aO="";
while(true){
if(aF&1)aO+=F;
aF>>=1;
if(aF===0)return aO;
F+=F;
}
}
function StringStartsWith(aP){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"String.prototype.startsWith");
var F=(%_ToString(this));
if((%_IsRegExp(aP))){
throw MakeTypeError(31,"String.prototype.startsWith");
}
var aQ=(%_ToString(aP));
var n=0;
if(%_ArgumentsLength()>1){
var aR=%_Arguments(1);
if(!(aR===(void 0))){
n=(%_ToInteger(aR));
}
}
var ar=F.length;
if(n<0)n=0;
if(n>ar)n=ar;
var aS=aQ.length;
if(aS+n>ar){
return false;
}
for(var t=0;t<aS;t++){
if(%_StringCharCodeAt(F,n+t)!==%_StringCharCodeAt(aQ,t)){
return false;
}
}
return true;
}
function StringEndsWith(aP){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"String.prototype.endsWith");
var F=(%_ToString(this));
if((%_IsRegExp(aP))){
throw MakeTypeError(31,"String.prototype.endsWith");
}
var aQ=(%_ToString(aP));
var ar=F.length;
var n=ar;
if(%_ArgumentsLength()>1){
var aR=%_Arguments(1);
if(!(aR===(void 0))){
n=(%_ToInteger(aR));
}
}
if(n<0)n=0;
if(n>ar)n=ar;
var aS=aQ.length;
n=n-aS;
if(n<0){
return false;
}
for(var t=0;t<aS;t++){
if(%_StringCharCodeAt(F,n+t)!==%_StringCharCodeAt(aQ,t)){
return false;
}
}
return true;
}
function StringIncludes(aP){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"String.prototype.includes");
var S=(%_ToString(this));
if((%_IsRegExp(aP))){
throw MakeTypeError(31,"String.prototype.includes");
}
aP=(%_ToString(aP));
var n=0;
if(%_ArgumentsLength()>1){
n=%_Arguments(1);
n=(%_ToInteger(n));
}
var aT=S.length;
if(n<0)n=0;
if(n>aT)n=aT;
var aU=aP.length;
if(aU+n>aT){
return false;
}
return %StringIndexOf(S,aP,n)!==-1;
}
function StringCodePointAt(n){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"String.prototype.codePointAt");
var S=(%_ToString(this));
var aM=S.length;
n=(%_ToInteger(n));
if(n<0||n>=aM){
return(void 0);
}
var aV=%_StringCharCodeAt(S,n);
if(aV<0xD800||aV>0xDBFF||n+1==aM){
return aV;
}
var aW=%_StringCharCodeAt(S,n+1);
if(aW<0xDC00||aW>0xDFFF){
return aV;
}
return(aV-0xD800)*0x400+aW+0x2400;
}
function StringFromCodePoint(aX){
var aG;
var U=%_ArgumentsLength();
var x;
var o="";
for(x=0;x<U;x++){
aG=%_Arguments(x);
if(!%_IsSmi(aG)){
aG=l(aG);
}
if(aG<0||aG>0x10FFFF||aG!==(%_ToInteger(aG))){
throw MakeRangeError(132,aG);
}
if(aG<=0xFFFF){
o+=%_StringCharFromCode(aG);
}else{
aG-=0x10000;
o+=%_StringCharFromCode((aG>>>10)&0x3FF|0xD800);
o+=%_StringCharFromCode(aG&0x3FF|0xDC00);
}
}
return o;
}
function StringRaw(aY){
var aZ=%_ArgumentsLength();
var ba=(%_ToObject(aY));
var bb=(%_ToObject(ba.raw));
var bc=(%ToLength(bb.length));
if(bc<=0)return"";
var o=(%_ToString(bb[0]));
for(var t=1;t<bc;++t){
if(t<aZ){
o+=(%_ToString(%_Arguments(t)));
}
o+=(%_ToString(bb[t]));
}
return o;
}
%FunctionSetPrototype(f,new f());
%AddNamedProperty(
f.prototype,"constructor",f,2);
b.InstallFunctions(f,2,[
"fromCharCode",StringFromCharCode,
"fromCodePoint",StringFromCodePoint,
"raw",StringRaw
]);
b.InstallFunctions(f.prototype,2,[
"valueOf",StringValueOf,
"toString",StringToString,
"charAt",StringCharAtJS,
"charCodeAt",StringCharCodeAtJS,
"codePointAt",StringCodePointAt,
"concat",StringConcat,
"endsWith",StringEndsWith,
"includes",StringIncludes,
"indexOf",StringIndexOfJS,
"lastIndexOf",StringLastIndexOfJS,
"localeCompare",StringLocaleCompareJS,
"match",StringMatchJS,
"normalize",StringNormalizeJS,
"repeat",StringRepeat,
"replace",StringReplace,
"search",StringSearch,
"slice",StringSlice,
"split",StringSplitJS,
"substring",StringSubstring,
"substr",StringSubstr,
"startsWith",StringStartsWith,
"toLowerCase",StringToLowerCaseJS,
"toLocaleLowerCase",StringToLocaleLowerCase,
"toUpperCase",StringToUpperCaseJS,
"toLocaleUpperCase",StringToLocaleUpperCase,
"trim",StringTrimJS,
"trimLeft",StringTrimLeft,
"trimRight",StringTrimRight,
"link",StringLink,
"anchor",StringAnchor,
"fontcolor",StringFontcolor,
"fontsize",StringFontsize,
"big",StringBig,
"blink",StringBlink,
"bold",StringBold,
"fixed",StringFixed,
"italics",StringItalics,
"small",StringSmall,
"strike",StringStrike,
"sub",StringSub,
"sup",StringSup
]);
b.Export(function(bd){
bd.StringCharAt=StringCharAtJS;
bd.StringIndexOf=StringIndexOfJS;
bd.StringLastIndexOf=StringLastIndexOfJS;
bd.StringMatch=StringMatchJS;
bd.StringReplace=StringReplace;
bd.StringSlice=StringSlice;
bd.StringSplit=StringSplitJS;
bd.StringSubstr=StringSubstr;
bd.StringSubstring=StringSubstring;
});
})

uriX
(function(a,b){
"use strict";
%CheckIsBootstrapping();
var c=a.Object;
var d=a.Array;
var e=b.InternalArray;
function HexValueOf(f){
if(f>=48&&f<=57)return f-48;
if(f>=65&&f<=70)return f-55;
if(f>=97&&f<=102)return f-87;
return-1;
}
function isAlphaNumeric(g){
if(97<=g&&g<=122)return true;
if(65<=g&&g<=90)return true;
if(48<=g&&g<=57)return true;
return false;
}
var h=0;
function URIAddEncodedOctetToBuffer(i,j,k){
j[k++]=37;
j[k++]=h[i>>4];
j[k++]=h[i&0x0F];
return k;
}
function URIEncodeOctets(l,j,k){
if(h===0){
h=[48,49,50,51,52,53,54,55,56,57,
65,66,67,68,69,70];
}
k=URIAddEncodedOctetToBuffer(l[0],j,k);
if(l[1])k=URIAddEncodedOctetToBuffer(l[1],j,k);
if(l[2])k=URIAddEncodedOctetToBuffer(l[2],j,k);
if(l[3])k=URIAddEncodedOctetToBuffer(l[3],j,k);
return k;
}
function URIEncodeSingle(g,j,k){
var m=(g>>12)&0xF;
var n=(g>>6)&63;
var o=g&63;
var l=new d(3);
if(g<=0x007F){
l[0]=g;
}else if(g<=0x07FF){
l[0]=n+192;
l[1]=o+128;
}else{
l[0]=m+224;
l[1]=n+128;
l[2]=o+128;
}
return URIEncodeOctets(l,j,k);
}
function URIEncodePair(p,q,j,k){
var r=((p>>6)&0xF)+1;
var s=(p>>2)&0xF;
var m=p&3;
var n=(q>>6)&0xF;
var o=q&63;
var l=new d(4);
l[0]=(r>>2)+240;
l[1]=(((r&3)<<4)|s)+128;
l[2]=((m<<4)|n)+128;
l[3]=o+128;
return URIEncodeOctets(l,j,k);
}
function URIHexCharsToCharCode(t,u){
var v=HexValueOf(t);
var w=HexValueOf(u);
if(v==-1||w==-1)throw MakeURIError();
return(v<<4)|w;
}
function URIDecodeOctets(l,j,k){
var x;
var y=l[0];
if(y<0x80){
x=y;
}else if(y<0xc2){
throw MakeURIError();
}else{
var z=l[1];
if(y<0xe0){
var A=y&0x1f;
if((z<0x80)||(z>0xbf))throw MakeURIError();
var B=z&0x3f;
x=(A<<6)+B;
if(x<0x80||x>0x7ff)throw MakeURIError();
}else{
var C=l[2];
if(y<0xf0){
var A=y&0x0f;
if((z<0x80)||(z>0xbf))throw MakeURIError();
var B=z&0x3f;
if((C<0x80)||(C>0xbf))throw MakeURIError();
var D=C&0x3f;
x=(A<<12)+(B<<6)+D;
if((x<0x800)||(x>0xffff))throw MakeURIError();
}else{
var E=l[3];
if(y<0xf8){
var A=(y&0x07);
if((z<0x80)||(z>0xbf))throw MakeURIError();
var B=(z&0x3f);
if((C<0x80)||(C>0xbf)){
throw MakeURIError();
}
var D=(C&0x3f);
if((E<0x80)||(E>0xbf))throw MakeURIError();
var F=(E&0x3f);
x=(A<<18)+(B<<12)+(D<<6)+F;
if((x<0x10000)||(x>0x10ffff))throw MakeURIError();
}else{
throw MakeURIError();
}
}
}
}
if(0xD800<=x&&x<=0xDFFF)throw MakeURIError();
if(x<0x10000){
%_TwoByteSeqStringSetChar(k++,x,j);
}else{
%_TwoByteSeqStringSetChar(k++,(x>>10)+0xd7c0,j);
%_TwoByteSeqStringSetChar(k++,(x&0x3ff)+0xdc00,j);
}
return k;
}
function Encode(G,H){
G=(%_ToString(G));
var I=G.length;
var J=new e(I);
var k=0;
for(var K=0;K<I;K++){
var p=%_StringCharCodeAt(G,K);
if(H(p)){
J[k++]=p;
}else{
if(p>=0xDC00&&p<=0xDFFF)throw MakeURIError();
if(p<0xD800||p>0xDBFF){
k=URIEncodeSingle(p,J,k);
}else{
K++;
if(K==I)throw MakeURIError();
var q=%_StringCharCodeAt(G,K);
if(q<0xDC00||q>0xDFFF)throw MakeURIError();
k=URIEncodePair(p,q,J,k);
}
}
}
var j=%NewString(J.length,true);
for(var L=0;L<J.length;L++){
%_OneByteSeqStringSetChar(L,J[L],j);
}
return j;
}
function Decode(G,M){
G=(%_ToString(G));
var I=G.length;
var N=%NewString(I,true);
var k=0;
var K=0;
for(;K<I;K++){
var f=%_StringCharCodeAt(G,K);
if(f==37){
if(K+2>=I)throw MakeURIError();
var g=URIHexCharsToCharCode(%_StringCharCodeAt(G,K+1),
%_StringCharCodeAt(G,K+2));
if(g>>7)break;
if(M(g)){
%_OneByteSeqStringSetChar(k++,37,N);
%_OneByteSeqStringSetChar(k++,%_StringCharCodeAt(G,K+1),
N);
%_OneByteSeqStringSetChar(k++,%_StringCharCodeAt(G,K+2),
N);
}else{
%_OneByteSeqStringSetChar(k++,g,N);
}
K+=2;
}else{
if(f>0x7f)break;
%_OneByteSeqStringSetChar(k++,f,N);
}
}
N=%TruncateString(N,k);
if(K==I)return N;
var O=%NewString(I-K,false);
k=0;
for(;K<I;K++){
var f=%_StringCharCodeAt(G,K);
if(f==37){
if(K+2>=I)throw MakeURIError();
var g=URIHexCharsToCharCode(%_StringCharCodeAt(G,++K),
%_StringCharCodeAt(G,++K));
if(g>>7){
var P=0;
while(((g<<++P)&0x80)!=0){}
if(P==1||P>4)throw MakeURIError();
var l=new d(P);
l[0]=g;
if(K+3*(P-1)>=I)throw MakeURIError();
for(var L=1;L<P;L++){
if(G[++K]!='%')throw MakeURIError();
l[L]=URIHexCharsToCharCode(%_StringCharCodeAt(G,++K),
%_StringCharCodeAt(G,++K));
}
k=URIDecodeOctets(l,O,k);
}else if(M(g)){
%_TwoByteSeqStringSetChar(k++,37,O);
%_TwoByteSeqStringSetChar(k++,%_StringCharCodeAt(G,K-1),
O);
%_TwoByteSeqStringSetChar(k++,%_StringCharCodeAt(G,K),
O);
}else{
%_TwoByteSeqStringSetChar(k++,g,O);
}
}else{
%_TwoByteSeqStringSetChar(k++,f,O);
}
}
O=%TruncateString(O,k);
return N+O;
}
function URIEscapeJS(Q){
return %URIEscape(Q);
}
function URIUnescapeJS(Q){
return %URIUnescape(Q);
}
function URIDecode(G){
var R=function(g){
if(35<=g&&g<=36)return true;
if(g==38)return true;
if(43<=g&&g<=44)return true;
if(g==47)return true;
if(58<=g&&g<=59)return true;
if(g==61)return true;
if(63<=g&&g<=64)return true;
return false;
};
return Decode(G,R);
}
function URIDecodeComponent(S){
var R=function(g){return false;};
return Decode(S,R);
}
function URIEncode(G){
var T=function(g){
if(isAlphaNumeric(g))return true;
if(g==33)return true;
if(35<=g&&g<=36)return true;
if(38<=g&&g<=47)return true;
if(58<=g&&g<=59)return true;
if(g==61)return true;
if(63<=g&&g<=64)return true;
if(g==95)return true;
if(g==126)return true;
return false;
};
return Encode(G,T);
}
function URIEncodeComponent(S){
var T=function(g){
if(isAlphaNumeric(g))return true;
if(g==33)return true;
if(39<=g&&g<=42)return true;
if(45<=g&&g<=46)return true;
if(g==95)return true;
if(g==126)return true;
return false;
};
return Encode(S,T);
}
b.InstallFunctions(a,2,[
"escape",URIEscapeJS,
"unescape",URIUnescapeJS,
"decodeURI",URIDecode,
"decodeURIComponent",URIDecodeComponent,
"encodeURI",URIEncode,
"encodeURIComponent",URIEncodeComponent
]);
})

mathY_
var rngstate;
(function(a,b){
"use strict";
%CheckIsBootstrapping();
var c=a.Math;
var d=a.Object;
var e=b.InternalArray;
var f=b.ImportNow("to_string_tag_symbol");
function MathAbs(g){
g=+g;
return(g>0)?g:0-g;
}
function MathAcosJS(g){
return %_MathAcos(+g);
}
function MathAsinJS(g){
return %_MathAsin(+g);
}
function MathAtanJS(g){
return %_MathAtan(+g);
}
function MathAtan2JS(h,g){
h=+h;
g=+g;
return %_MathAtan2(h,g);
}
function MathCeil(g){
return-%_MathFloor(-g);
}
function MathExp(g){
return %MathExpRT(((typeof(%IS_VAR(g))==='number')?g:$nonNumberToNumber(g)));
}
function MathFloorJS(g){
return %_MathFloor(+g);
}
function MathLog(g){
return %_MathLogRT(((typeof(%IS_VAR(g))==='number')?g:$nonNumberToNumber(g)));
}
function MathMax(i,j){
var k=%_ArgumentsLength();
if(k==2){
i=((typeof(%IS_VAR(i))==='number')?i:$nonNumberToNumber(i));
j=((typeof(%IS_VAR(j))==='number')?j:$nonNumberToNumber(j));
if(j>i)return j;
if(i>j)return i;
if(i==j){
return(i===0&&%_IsMinusZero(i))?j:i;
}
return $NaN;
}
var l=-(1/0);
for(var m=0;m<k;m++){
var n=%_Arguments(m);
n=((typeof(%IS_VAR(n))==='number')?n:$nonNumberToNumber(n));
if((!%_IsSmi(%IS_VAR(n))&&!(n==n))||n>l||(l===0&&n===0&&%_IsMinusZero(l))){
l=n;
}
}
return l;
}
function MathMin(i,j){
var k=%_ArgumentsLength();
if(k==2){
i=((typeof(%IS_VAR(i))==='number')?i:$nonNumberToNumber(i));
j=((typeof(%IS_VAR(j))==='number')?j:$nonNumberToNumber(j));
if(j>i)return i;
if(i>j)return j;
if(i==j){
return(i===0&&%_IsMinusZero(i))?i:j;
}
return $NaN;
}
var l=(1/0);
for(var m=0;m<k;m++){
var n=%_Arguments(m);
n=((typeof(%IS_VAR(n))==='number')?n:$nonNumberToNumber(n));
if((!%_IsSmi(%IS_VAR(n))&&!(n==n))||n<l||(l===0&&n===0&&%_IsMinusZero(n))){
l=n;
}
}
return l;
}
function MathPowJS(g,h){
return %_MathPow(((typeof(%IS_VAR(g))==='number')?g:$nonNumberToNumber(g)),((typeof(%IS_VAR(h))==='number')?h:$nonNumberToNumber(h)));
}
function MathRandom(){
var o=(MathImul(18030,rngstate[0]&0xFFFF)+(rngstate[0]>>>16))|0;
rngstate[0]=o;
var p=(MathImul(36969,rngstate[1]&0xFFFF)+(rngstate[1]>>>16))|0;
rngstate[1]=p;
var g=((o<<16)+(p&0xFFFF))|0;
return(g<0?(g+0x100000000):g)*2.3283064365386962890625e-10;
}
function MathRandomRaw(){
var o=(MathImul(18030,rngstate[0]&0xFFFF)+(rngstate[0]>>>16))|0;
rngstate[0]=o;
var p=(MathImul(36969,rngstate[1]&0xFFFF)+(rngstate[1]>>>16))|0;
rngstate[1]=p;
var g=((o<<16)+(p&0xFFFF))|0;
return g&0x3fffffff;
}
function MathRound(g){
return %RoundNumber(((typeof(%IS_VAR(g))==='number')?g:$nonNumberToNumber(g)));
}
function MathSqrtJS(g){
return %_MathSqrt(+g);
}
function MathImul(g,h){
return %NumberImul(((typeof(%IS_VAR(g))==='number')?g:$nonNumberToNumber(g)),((typeof(%IS_VAR(h))==='number')?h:$nonNumberToNumber(h)));
}
function MathSign(g){
g=+g;
if(g>0)return 1;
if(g<0)return-1;
return g;
}
function MathTrunc(g){
g=+g;
if(g>0)return %_MathFloor(g);
if(g<0)return-%_MathFloor(-g);
return g;
}
function MathTanh(g){
g=((typeof(%IS_VAR(g))==='number')?g:$nonNumberToNumber(g));
if(g===0)return g;
if(!(%_IsSmi(%IS_VAR(g))||((g==g)&&(g!=1/0)&&(g!=-1/0))))return MathSign(g);
var q=MathExp(g);
var r=MathExp(-g);
return(q-r)/(q+r);
}
function MathAsinh(g){
g=((typeof(%IS_VAR(g))==='number')?g:$nonNumberToNumber(g));
if(g===0||!(%_IsSmi(%IS_VAR(g))||((g==g)&&(g!=1/0)&&(g!=-1/0))))return g;
if(g>0)return MathLog(g+%_MathSqrt(g*g+1));
return-MathLog(-g+%_MathSqrt(g*g+1));
}
function MathAcosh(g){
g=((typeof(%IS_VAR(g))==='number')?g:$nonNumberToNumber(g));
if(g<1)return $NaN;
if(!(%_IsSmi(%IS_VAR(g))||((g==g)&&(g!=1/0)&&(g!=-1/0))))return g;
return MathLog(g+%_MathSqrt(g+1)*%_MathSqrt(g-1));
}
function MathAtanh(g){
g=((typeof(%IS_VAR(g))==='number')?g:$nonNumberToNumber(g));
if(g===0)return g;
if(!(%_IsSmi(%IS_VAR(g))||((g==g)&&(g!=1/0)&&(g!=-1/0))))return $NaN;
return 0.5*MathLog((1+g)/(1-g));
}
function MathHypot(g,h){
var k=%_ArgumentsLength();
var s=new e(k);
var t=0;
for(var m=0;m<k;m++){
var n=%_Arguments(m);
n=((typeof(%IS_VAR(n))==='number')?n:$nonNumberToNumber(n));
if(n===(1/0)||n===-(1/0))return(1/0);
n=MathAbs(n);
if(n>t)t=n;
s[m]=n;
}
if(t===0)t=1;
var u=0;
var v=0;
for(var m=0;m<k;m++){
var n=s[m]/t;
var w=n*n-v;
var x=u+w;
v=(x-u)-w;
u=x;
}
return %_MathSqrt(u)*t;
}
function MathFroundJS(g){
return %MathFround(((typeof(%IS_VAR(g))==='number')?g:$nonNumberToNumber(g)));
}
function MathClz32JS(g){
return %_MathClz32(g>>>0);
}
function MathCbrt(g){
g=((typeof(%IS_VAR(g))==='number')?g:$nonNumberToNumber(g));
if(g==0||!(%_IsSmi(%IS_VAR(g))||((g==g)&&(g!=1/0)&&(g!=-1/0))))return g;
return g>=0?CubeRoot(g):-CubeRoot(-g);
}
function CubeRoot(g){
var y=MathFloorJS(%_DoubleHi(g)/3)+0x2A9F7893;
var z=%_ConstructDouble(y,0);
z=(1.0/3.0)*(g/(z*z)+2*z);
;
z=(1.0/3.0)*(g/(z*z)+2*z);
;
z=(1.0/3.0)*(g/(z*z)+2*z);
;
return(1.0/3.0)*(g/(z*z)+2*z);
;
}
%AddNamedProperty(c,f,"Math",1|2);
b.InstallConstants(c,[
"E",2.7182818284590452354,
"LN10",2.302585092994046,
"LN2",0.6931471805599453,
"LOG2E",1.4426950408889634,
"LOG10E",0.4342944819032518,
"PI",3.1415926535897932,
"SQRT1_2",0.7071067811865476,
"SQRT2",1.4142135623730951
]);
b.InstallFunctions(c,2,[
"random",MathRandom,
"abs",MathAbs,
"acos",MathAcosJS,
"asin",MathAsinJS,
"atan",MathAtanJS,
"ceil",MathCeil,
"exp",MathExp,
"floor",MathFloorJS,
"log",MathLog,
"round",MathRound,
"sqrt",MathSqrtJS,
"atan2",MathAtan2JS,
"pow",MathPowJS,
"max",MathMax,
"min",MathMin,
"imul",MathImul,
"sign",MathSign,
"trunc",MathTrunc,
"tanh",MathTanh,
"asinh",MathAsinh,
"acosh",MathAcosh,
"atanh",MathAtanh,
"hypot",MathHypot,
"fround",MathFroundJS,
"clz32",MathClz32JS,
"cbrt",MathCbrt
]);
%SetForceInlineFlag(MathAbs);
%SetForceInlineFlag(MathAcosJS);
%SetForceInlineFlag(MathAsinJS);
%SetForceInlineFlag(MathAtanJS);
%SetForceInlineFlag(MathAtan2JS);
%SetForceInlineFlag(MathCeil);
%SetForceInlineFlag(MathClz32JS);
%SetForceInlineFlag(MathFloorJS);
%SetForceInlineFlag(MathRandom);
%SetForceInlineFlag(MathSign);
%SetForceInlineFlag(MathSqrtJS);
%SetForceInlineFlag(MathTrunc);
b.Export(function(A){
A.MathAbs=MathAbs;
A.MathExp=MathExp;
A.MathFloor=MathFloorJS;
A.IntRandom=MathRandomRaw;
A.MathMax=MathMax;
A.MathMin=MathMin;
});
})

fdlibm-¨
var kMath;
var rempio2result;
(function(a,b){
"use strict";
%CheckIsBootstrapping();
var c=a.Math;
var d;
var e;
b.Import(function(f){
d=f.MathAbs;
e=f.MathExp;
});





















function KernelTan(g,h,i){
var j;
var k;
var l=%_DoubleHi(g);
var m=l&0x7fffffff;
if(m<0x3e300000){
if(((m|%_DoubleLo(g))|(i+1))==0){
return 1/d(g);
}else{
if(i==1){
return g;
}else{
var k=g+h;
var j=%_ConstructDouble(%_DoubleHi(k),0);
var n=h-(j-g);
var o=-1/k;
var p=%_ConstructDouble(%_DoubleHi(o),0);
var q=1+p*j;
return p+o*(q+p*n);
}
}
}
if(m>=0x3fe59428){
if(g<0){
g=-g;
h=-h;
}
j=kMath[32]-g;
k=kMath[33]-h;
g=j+k;
h=0;
}
j=g*g;
k=j*j;
var r=kMath[19+1]
+k*(kMath[19+3]
+k*(kMath[19+5]
+
k*(kMath[19+7]
+k*(kMath[19+9]
+k*kMath[19+11]
))));
var n=j*(kMath[19+2]
+k*(kMath[19+4]
+k*(kMath[19+6]
+
k*(kMath[19+8]
+k*(kMath[19+10]
+k*kMath[19+12]
)))));
var q=j*g;
r=h+j*(q*(r+n)+h);
r=r+kMath[19+0]
*q;
k=g+r;
if(m>=0x3fe59428){
return(1-((l>>30)&2))*
(i-2.0*(g-(k*k/(k+i)-r)));
}
if(i==1){
return k;
}else{
j=%_ConstructDouble(%_DoubleHi(k),0);
n=r-(j-g);
var o=-1/k;
var p=%_ConstructDouble(%_DoubleHi(o),0);
q=1+p*j;
return p+o*(q+p*n);
}
}
function MathSinSlow(g){
var s,t,u;
var l=%_DoubleHi(g);
var m=l&0x7fffffff;
if(m<0x4002d97c){
if(l>0){
var j=g-kMath[1];
if(m!=0x3ff921fb){
t=j-kMath[2];
u=(j-t)-kMath[2];
}else{
j-=kMath[3];
t=j-kMath[4];
u=(j-t)-kMath[4];
}
s=1;
}else{
var j=g+kMath[1];
if(m!=0x3ff921fb){
t=j+kMath[2];
u=(j-t)+kMath[2];
}else{
j+=kMath[3];
t=j+kMath[4];
u=(j-t)+kMath[4];
}
s=-1;
}
}else if(m<=0x413921fb){
var p=d(g);
s=(p*kMath[0]+0.5)|0;
var r=p-s*kMath[1];
var k=s*kMath[2];
t=r-k;
if(m-(%_DoubleHi(t)&0x7ff00000)>0x1000000){
p=r;
k=s*kMath[3];
r=p-k;
k=s*kMath[4]-((p-r)-k);
t=r-k;
if(m-(%_DoubleHi(t)&0x7ff00000)>0x3100000){
p=r;
k=s*kMath[5];
r=p-k;
k=s*kMath[6]-((p-r)-k);
t=r-k;
}
}
u=(r-t)-k;
if(l<0){
s=-s;
t=-t;
u=-u;
}
}else{
s=%RemPiO2(g,rempio2result);
t=rempio2result[0];
u=rempio2result[1];
}
;
var v=1-(s&2);
if(s&1){
var m=%_DoubleHi(t)&0x7fffffff;
var j=t*t;
var r=j*(4.16666666666666019037e-02+j*(-1.38888888888741095749e-03+j*(2.48015872894767294178e-05+j*(-2.75573143513906633035e-07+j*(2.08757232129817482790e-09+j*-1.13596475577881948265e-11)))));
if(m<0x3fd33333){
return(1-(0.5*j-(j*r-t*u)))*v;
}else{
var w;
if(m>0x3fe90000){
w=0.28125;
}else{
w=%_ConstructDouble(%_DoubleHi(0.25*t),0);
}
var x=0.5*j-w;
return(1-w-(x-(j*r-t*u)))*v;
}
;
}else{
var j=t*t;
var n=j*t;
var r=8.33333333332248946124e-03+j*(-1.98412698298579493134e-04+j*(2.75573137070700676789e-06+j*(-2.50507602534068634195e-08+j*1.58969099521155010221e-10)));
return(t-((j*(0.5*u-n*r)-u)-n*-1.66666666666666324348e-01))*v;
;
}
}
function MathCosSlow(g){
var s,t,u;
var l=%_DoubleHi(g);
var m=l&0x7fffffff;
if(m<0x4002d97c){
if(l>0){
var j=g-kMath[1];
if(m!=0x3ff921fb){
t=j-kMath[2];
u=(j-t)-kMath[2];
}else{
j-=kMath[3];
t=j-kMath[4];
u=(j-t)-kMath[4];
}
s=1;
}else{
var j=g+kMath[1];
if(m!=0x3ff921fb){
t=j+kMath[2];
u=(j-t)+kMath[2];
}else{
j+=kMath[3];
t=j+kMath[4];
u=(j-t)+kMath[4];
}
s=-1;
}
}else if(m<=0x413921fb){
var p=d(g);
s=(p*kMath[0]+0.5)|0;
var r=p-s*kMath[1];
var k=s*kMath[2];
t=r-k;
if(m-(%_DoubleHi(t)&0x7ff00000)>0x1000000){
p=r;
k=s*kMath[3];
r=p-k;
k=s*kMath[4]-((p-r)-k);
t=r-k;
if(m-(%_DoubleHi(t)&0x7ff00000)>0x3100000){
p=r;
k=s*kMath[5];
r=p-k;
k=s*kMath[6]-((p-r)-k);
t=r-k;
}
}
u=(r-t)-k;
if(l<0){
s=-s;
t=-t;
u=-u;
}
}else{
s=%RemPiO2(g,rempio2result);
t=rempio2result[0];
u=rempio2result[1];
}
;
if(s&1){
var v=(s&2)-1;
var j=t*t;
var n=j*t;
var r=8.33333333332248946124e-03+j*(-1.98412698298579493134e-04+j*(2.75573137070700676789e-06+j*(-2.50507602534068634195e-08+j*1.58969099521155010221e-10)));
return(t-((j*(0.5*u-n*r)-u)-n*-1.66666666666666324348e-01))*v;
;
}else{
var v=1-(s&2);
var m=%_DoubleHi(t)&0x7fffffff;
var j=t*t;
var r=j*(4.16666666666666019037e-02+j*(-1.38888888888741095749e-03+j*(2.48015872894767294178e-05+j*(-2.75573143513906633035e-07+j*(2.08757232129817482790e-09+j*-1.13596475577881948265e-11)))));
if(m<0x3fd33333){
return(1-(0.5*j-(j*r-t*u)))*v;
}else{
var w;
if(m>0x3fe90000){
w=0.28125;
}else{
w=%_ConstructDouble(%_DoubleHi(0.25*t),0);
}
var x=0.5*j-w;
return(1-w-(x-(j*r-t*u)))*v;
}
;
}
}
function MathSin(g){
g=+g;
if((%_DoubleHi(g)&0x7fffffff)<=0x3fe921fb){
var j=g*g;
var n=j*g;
var r=8.33333333332248946124e-03+j*(-1.98412698298579493134e-04+j*(2.75573137070700676789e-06+j*(-2.50507602534068634195e-08+j*1.58969099521155010221e-10)));
return(g-((j*(0.5*0-n*r)-0)-n*-1.66666666666666324348e-01));
;
}
return+MathSinSlow(g);
}
function MathCos(g){
g=+g;
if((%_DoubleHi(g)&0x7fffffff)<=0x3fe921fb){
var m=%_DoubleHi(g)&0x7fffffff;
var j=g*g;
var r=j*(4.16666666666666019037e-02+j*(-1.38888888888741095749e-03+j*(2.48015872894767294178e-05+j*(-2.75573143513906633035e-07+j*(2.08757232129817482790e-09+j*-1.13596475577881948265e-11)))));
if(m<0x3fd33333){
return(1-(0.5*j-(j*r-g*0)));
}else{
var w;
if(m>0x3fe90000){
w=0.28125;
}else{
w=%_ConstructDouble(%_DoubleHi(0.25*g),0);
}
var x=0.5*j-w;
return(1-w-(x-(j*r-g*0)));
}
;
}
return+MathCosSlow(g);
}
function MathTan(g){
g=g*1;
if((%_DoubleHi(g)&0x7fffffff)<=0x3fe921fb){
return KernelTan(g,0,1);
}
var s,t,u;
var l=%_DoubleHi(g);
var m=l&0x7fffffff;
if(m<0x4002d97c){
if(l>0){
var j=g-kMath[1];
if(m!=0x3ff921fb){
t=j-kMath[2];
u=(j-t)-kMath[2];
}else{
j-=kMath[3];
t=j-kMath[4];
u=(j-t)-kMath[4];
}
s=1;
}else{
var j=g+kMath[1];
if(m!=0x3ff921fb){
t=j+kMath[2];
u=(j-t)+kMath[2];
}else{
j+=kMath[3];
t=j+kMath[4];
u=(j-t)+kMath[4];
}
s=-1;
}
}else if(m<=0x413921fb){
var p=d(g);
s=(p*kMath[0]+0.5)|0;
var r=p-s*kMath[1];
var k=s*kMath[2];
t=r-k;
if(m-(%_DoubleHi(t)&0x7ff00000)>0x1000000){
p=r;
k=s*kMath[3];
r=p-k;
k=s*kMath[4]-((p-r)-k);
t=r-k;
if(m-(%_DoubleHi(t)&0x7ff00000)>0x3100000){
p=r;
k=s*kMath[5];
r=p-k;
k=s*kMath[6]-((p-r)-k);
t=r-k;
}
}
u=(r-t)-k;
if(l<0){
s=-s;
t=-t;
u=-u;
}
}else{
s=%RemPiO2(g,rempio2result);
t=rempio2result[0];
u=rempio2result[1];
}
;
return KernelTan(t,u,(s&1)?-1:1);
}




function MathLog1p(g){
g=g*1;
var l=%_DoubleHi(g);
var y=l&0x7fffffff;
var z=1;
var A=g;
var B=1;
var C=0;
var D=g;
if(l<0x3fda827a){
if(y>=0x3ff00000){
if(g===-1){
return-(1/0);
}else{
return $NaN;
}
}else if(y<0x3c900000){
return g;
}else if(y<0x3e200000){
return g-g*g*0.5;
}
if((l>0)||(l<=-0x402D413D)){
z=0;
}
}
if(l>=0x7ff00000)return g;
if(z!==0){
if(l<0x43400000){
D=1+g;
B=%_DoubleHi(D);
z=(B>>20)-1023;
C=(z>0)?1-(D-g):g-(D-1);
C=C/D;
}else{
B=%_DoubleHi(D);
z=(B>>20)-1023;
}
B=B&0xfffff;
if(B<0x6a09e){
D=%_ConstructDouble(B|0x3ff00000,%_DoubleLo(D));
}else{
++z;
D=%_ConstructDouble(B|0x3fe00000,%_DoubleLo(D));
B=(0x00100000-B)>>2;
}
A=D-1;
}
var E=0.5*A*A;
if(B===0){
if(A===0){
if(z===0){
return 0.0;
}else{
return z*kMath[34]+(C+z*kMath[35]);
}
}
var F=E*(1-kMath[36]*A);
if(z===0){
return A-F;
}else{
return z*kMath[34]-((F-(z*kMath[35]+C))-A);
}
}
var q=A/(2+A);
var j=q*q;
var F=j*((kMath[37+0])
+j*((kMath[37+1])
+j*
((kMath[37+2])
+j*((kMath[37+3])
+j*
((kMath[37+4])
+j*((kMath[37+5])
+j*(kMath[37+6])
))))));
if(z===0){
return A-(E-q*(E+F));
}else{
return z*kMath[34]-((E-(q*(E+F)+(z*kMath[35]+C)))-A);
}
}


function MathExpm1(g){
g=g*1;
var h;
var G;
var H;
var z;
var p;
var C;
var l=%_DoubleHi(g);
var I=l&0x80000000;
var h=(I===0)?g:-g;
l&=0x7fffffff;
if(l>=0x4043687a){
if(l>=0x40862e42){
if(l>=0x7ff00000){
return(g===-(1/0))?-1:g;
}
if(g>kMath[44])return(1/0);
}
if(I!=0)return-1;
}
if(l>0x3fd62e42){
if(l<0x3ff0a2b2){
if(I===0){
G=g-kMath[34];
H=kMath[35];
z=1;
}else{
G=g+kMath[34];
H=-kMath[35];
z=-1;
}
}else{
z=(kMath[45]*g+((I===0)?0.5:-0.5))|0;
p=z;
G=g-p*kMath[34];
H=p*kMath[35];
}
g=G-H;
C=(G-g)-H;
}else if(l<0x3c900000){
return g;
}else{
z=0;
}
var J=0.5*g;
var K=g*J;
var L=1+K*((kMath[46+0])
+K*((kMath[46+1])
+K*
((kMath[46+2])
+K*((kMath[46+3])
+K*(kMath[46+4])
))));
p=3-L*J;
var M=K*((L-p)/(6-g*p));
if(z===0){
return g-(g*M-K);
}else{
M=(g*(M-C)-C);
M-=K;
if(z===-1)return 0.5*(g-M)-0.5;
if(z===1){
if(g<-0.25)return-2*(M-(g+0.5));
return 1+2*(g-M);
}
if(z<=-2||z>56){
h=1-(M-g);
h=%_ConstructDouble(%_DoubleHi(h)+(z<<20),%_DoubleLo(h));
return h-1;
}
if(z<20){
p=%_ConstructDouble(0x3ff00000-(0x200000>>z),0);
h=p-(M-g);
h=%_ConstructDouble(%_DoubleHi(h)+(z<<20),%_DoubleLo(h));
}else{
p=%_ConstructDouble((0x3ff-z)<<20,0);
h=g-(M+p);
h+=1;
h=%_ConstructDouble(%_DoubleHi(h)+(z<<20),%_DoubleLo(h));
}
}
return h;
}



function MathSinh(g){
g=g*1;
var N=(g<0)?-0.5:0.5;
var y=d(g);
if(y<22){
if(y<3.725290298461914e-9)return g;
var p=MathExpm1(y);
if(y<1)return N*(2*p-p*p/(p+1));
return N*(p+p/(p+1));
}
if(y<709.7822265625)return N*e(y);
if(y<=kMath[51]){
var k=e(0.5*y);
var p=N*k;
return p*k;
}
return g*(1/0);
}

function MathCosh(g){
g=g*1;
var m=%_DoubleHi(g)&0x7fffffff;
if(m<0x3fd62e43){
var p=MathExpm1(d(g));
var k=1+p;
if(m<0x3c800000)return k;
return 1+(p*p)/(k+k);
}
if(m<0x40360000){
var p=e(d(g));
return 0.5*p+0.5/p;
}
if(m<0x40862e42)return 0.5*e(d(g));
if(d(g)<=kMath[51]){
var k=e(0.5*d(g));
var p=0.5*k;
return p*k;
}
if((!%_IsSmi(%IS_VAR(g))&&!(g==g)))return g;
return(1/0);
}



function MathLog10(g){
g=g*1;
var l=%_DoubleHi(g);
var O=%_DoubleLo(g);
var z=0;
if(l<0x00100000){
if(((l&0x7fffffff)|O)===0)return-(1/0);
if(l<0)return $NaN;
z-=54;
g*=18014398509481984;
l=%_DoubleHi(g);
O=%_DoubleLo(g);
}
if(l>=0x7ff00000)return g;
z+=(l>>20)-1023;
var P=(z&0x80000000)>>>31;
l=(l&0x000fffff)|((0x3ff-P)<<20);
var h=z+P;
g=%_ConstructDouble(l,O);
var j=h*kMath[54]+kMath[52]*%_MathLogRT(g);
return j+h*kMath[53];
}






function MathLog2(g){
g=g*1;
var y=d(g);
var l=%_DoubleHi(g);
var O=%_DoubleLo(g);
var m=l&0x7fffffff;
if((m|O)==0)return-(1/0);
if(l<0)return $NaN;
if(m>=0x7ff00000)return g;
var s=0;
if(m<0x00100000){
y*=9007199254740992;
s-=53;
m=%_DoubleHi(y);
}
s+=(m>>20)-0x3ff;
var Q=m&0x000fffff;
m=Q|0x3ff00000;
var R=1;
var S=0;
var T=0;
if(Q>0x3988e){
if(Q<0xbb67a){
R=1.5;
S=kMath[64];
T=kMath[65];
}else{
s+=1;
m-=0x00100000;
}
}
y=%_ConstructDouble(m,%_DoubleLo(y));
var D=y-R;
var n=1/(y+R);
var U=D*n;
var V=%_ConstructDouble(%_DoubleHi(U),0);
var W=%_ConstructDouble(%_DoubleHi(y+R),0)
var X=y-(W-R);
var Y=n*((D-V*W)-V*X);
var Z=U*U;
var r=Z*Z*((kMath[55+0])
+Z*((kMath[55+1])
+Z*((kMath[55+2])
+Z*(
(kMath[55+3])
+Z*((kMath[55+4])
+Z*(kMath[55+5])
)))));
r+=Y*(V+U);
Z=V*V;
W=%_ConstructDouble(%_DoubleHi(3.0+Z+r),0);
X=r-((W-3.0)-Z);
D=V*W;
n=Y*W+X*U;
p_h=%_ConstructDouble(%_DoubleHi(D+n),0);
p_l=n-(p_h-D);
z_h=kMath[62]*p_h;
z_l=kMath[63]*p_h+p_l*kMath[61]+T;
var p=s;
var aa=%_ConstructDouble(%_DoubleHi(((z_h+z_l)+S)+p),0);
var ab=z_l-(((aa-p)-S)-z_h);
return aa+ab;
}
b.InstallFunctions(c,2,[
"cos",MathCos,
"sin",MathSin,
"tan",MathTan,
"sinh",MathSinh,
"cosh",MathCosh,
"log10",MathLog10,
"log2",MathLog2,
"log1p",MathLog1p,
"expm1",MathExpm1
]);
%SetForceInlineFlag(MathSin);
%SetForceInlineFlag(MathCos);
})

dateéö
var $createDate;
(function(a,b){
"use strict";
%CheckIsBootstrapping();
var c=a.Date;
var d=a.Object;
var e=b.InternalArray;
var f;
var g;
var h;
var i;
b.Import(function(j){
f=j.IsFinite;
g=j.MathAbs;
h=j.MathFloor;
i=j.ToNumber;
});
var k=$NaN;
var l;
function LocalTimezone(m){
if((!%_IsSmi(%IS_VAR(m))&&!(m==m)))return"";
CheckDateCacheCurrent();
if(m==k){
return l;
}
var n=%DateLocalTimezone(m);
k=m;
l=n;
return n;
}
function UTC(o){
if((!%_IsSmi(%IS_VAR(o))&&!(o==o)))return o;
return %DateToUTC(o);
}
function MakeTime(p,q,r,s){
if(!f(p))return $NaN;
if(!f(q))return $NaN;
if(!f(r))return $NaN;
if(!f(s))return $NaN;
return(%_ToInteger(p))*3600000
+(%_ToInteger(q))*60000
+(%_ToInteger(r))*1000
+(%_ToInteger(s));
}
function TimeInYear(t){
return DaysInYear(t)*86400000;
}
function MakeDay(t,u,v){
if(!f(t)||!f(u)||!f(v))return $NaN;
t=(%_IsSmi(%IS_VAR(t))?t:%NumberToIntegerMapMinusZero(i(t)));
u=(%_IsSmi(%IS_VAR(u))?u:%NumberToIntegerMapMinusZero(i(u)));
v=(%_IsSmi(%IS_VAR(v))?v:%NumberToIntegerMapMinusZero(i(v)));
if(t<-1000000||t>1000000||
u<-10000000||u>10000000){
return $NaN;
}
return %DateMakeDay(t|0,u|0)+v-1;
}
function MakeDate(w,o){
var o=w*86400000+o;
if(g(o)>8640002592000000)return $NaN;
return o;
}
function TimeClip(o){
if(!f(o))return $NaN;
if(g(o)>8640000000000000)return $NaN;
return(%_ToInteger(o));
}
var x={
time:0,
string:null
};
function DateConstructor(t,u,v,y,z,A,s){
if(!%_IsConstructCall()){
return %_CallFunction(new c(),DateToString);
}
var B=%_ArgumentsLength();
var C;
if(B==0){
C=%DateCurrentTime();
(%DateSetValue(this,C,1));
}else if(B==1){
if((typeof(t)==='number')){
C=t;
}else if((typeof(t)==='string')){
CheckDateCacheCurrent();
var D=x;
if(D.string===t){
C=D.time;
}else{
C=DateParse(t);
if(!(!%_IsSmi(%IS_VAR(C))&&!(C==C))){
D.time=C;
D.string=t;
}
}
}else if((%_IsDate(t))){
C=(%_DateField(t,0));
}else{
var o=(%_ToPrimitive(t));
C=(typeof(o)==='string')?DateParse(o):i(o);
}
(%DateSetValue(this,C,1));
}else{
t=i(t);
u=i(u);
v=B>2?i(v):1;
y=B>3?i(y):0;
z=B>4?i(z):0;
A=B>5?i(A):0;
s=B>6?i(s):0;
t=(!(!%_IsSmi(%IS_VAR(t))&&!(t==t))&&
0<=(%_ToInteger(t))&&
(%_ToInteger(t))<=99)?1900+(%_ToInteger(t)):t;
var w=MakeDay(t,u,v);
var o=MakeTime(y,z,A,s);
C=MakeDate(w,o);
(%DateSetValue(this,C,0));
}
}
var E=['Sun','Mon','Tue','Wed','Thu','Fri','Sat'];
var F=['Jan','Feb','Mar','Apr','May','Jun',
'Jul','Aug','Sep','Oct','Nov','Dec'];
function TwoDigitString(C){
return C<10?"0"+C:""+C;
}
function DateString(v){
if(!%_IsDate(v))%_ThrowNotDateError();
return E[(%_DateField(v,4))]+' '
+F[(%_DateField(v,2))]+' '
+TwoDigitString((%_DateField(v,3)))+' '
+(%_DateField(v,1));
}
var G=['Sunday','Monday','Tuesday','Wednesday',
'Thursday','Friday','Saturday'];
var H=['January','February','March','April','May','June',
'July','August','September','October','November','December'];
function LongDateString(v){
if(!%_IsDate(v))%_ThrowNotDateError();
return G[(%_DateField(v,4))]+', '
+H[(%_DateField(v,2))]+' '
+TwoDigitString((%_DateField(v,3)))+', '
+(%_DateField(v,1));
}
function TimeString(v){
if(!%_IsDate(v))%_ThrowNotDateError();
return TwoDigitString((%_DateField(v,5)))+':'
+TwoDigitString((%_DateField(v,6)))+':'
+TwoDigitString((%_DateField(v,7)));
}
function TimeStringUTC(v){
if(!%_IsDate(v))%_ThrowNotDateError();
return TwoDigitString((%_DateField(v,15)))+':'
+TwoDigitString((%_DateField(v,16)))+':'
+TwoDigitString((%_DateField(v,17)));
}
function LocalTimezoneString(v){
if(!%_IsDate(v))%_ThrowNotDateError();
var n=LocalTimezone((%_DateField(v,0)));
var I=-(%_DateField(v,21));
var J=(I>=0)?1:-1;
var y=h((J*I)/60);
var q=h((J*I)%60);
var K=' GMT'+((J==1)?'+':'-')+
TwoDigitString(y)+TwoDigitString(q);
return K+' ('+n+')';
}
function DatePrintString(v){
if(!%_IsDate(v))%_ThrowNotDateError();
return DateString(v)+' '+TimeString(v);
}
var L=new e(8);
function DateParse(M){
var N=%DateParseString(M,L);
if((N===null))return $NaN;
var w=MakeDay(N[0],N[1],N[2]);
var o=MakeTime(N[3],N[4],N[5],N[6]);
var v=MakeDate(w,o);
if((N[7]===null)){
return TimeClip(UTC(v));
}else{
return TimeClip(v-N[7]*1000);
}
}
function DateUTC(t,u,v,y,z,A,s){
t=i(t);
u=i(u);
var B=%_ArgumentsLength();
v=B>2?i(v):1;
y=B>3?i(y):0;
z=B>4?i(z):0;
A=B>5?i(A):0;
s=B>6?i(s):0;
t=(!(!%_IsSmi(%IS_VAR(t))&&!(t==t))&&
0<=(%_ToInteger(t))&&
(%_ToInteger(t))<=99)?1900+(%_ToInteger(t)):t;
var w=MakeDay(t,u,v);
var o=MakeTime(y,z,A,s);
return TimeClip(MakeDate(w,o));
}
function DateNow(){
return %DateCurrentTime();
}
function DateToString(){
if(!%_IsDate(this))%_ThrowNotDateError();
var m=(%_DateField(this,0))
if((!%_IsSmi(%IS_VAR(m))&&!(m==m)))return'Invalid Date';
var O=LocalTimezoneString(this)
return DatePrintString(this)+O;
}
function DateToDateString(){
if(!%_IsDate(this))%_ThrowNotDateError();
var m=(%_DateField(this,0));
if((!%_IsSmi(%IS_VAR(m))&&!(m==m)))return'Invalid Date';
return DateString(this);
}
function DateToTimeString(){
if(!%_IsDate(this))%_ThrowNotDateError();
var m=(%_DateField(this,0));
if((!%_IsSmi(%IS_VAR(m))&&!(m==m)))return'Invalid Date';
var O=LocalTimezoneString(this);
return TimeString(this)+O;
}
function DateToLocaleString(){
if(!%_IsDate(this))%_ThrowNotDateError();
return %_CallFunction(this,DateToString);
}
function DateToLocaleDateString(){
if(!%_IsDate(this))%_ThrowNotDateError();
var m=(%_DateField(this,0));
if((!%_IsSmi(%IS_VAR(m))&&!(m==m)))return'Invalid Date';
return LongDateString(this);
}
function DateToLocaleTimeString(){
if(!%_IsDate(this))%_ThrowNotDateError();
var m=(%_DateField(this,0));
if((!%_IsSmi(%IS_VAR(m))&&!(m==m)))return'Invalid Date';
return TimeString(this);
}
function DateValueOf(){
if(!%_IsDate(this))%_ThrowNotDateError();
return(%_DateField(this,0));
}
function DateGetTime(){
if(!%_IsDate(this))%_ThrowNotDateError();
return(%_DateField(this,0));
}
function DateGetFullYear(){
if(!%_IsDate(this))%_ThrowNotDateError();
return(%_DateField(this,1));
}
function DateGetUTCFullYear(){
if(!%_IsDate(this))%_ThrowNotDateError();
return(%_DateField(this,11));
}
function DateGetMonth(){
if(!%_IsDate(this))%_ThrowNotDateError();
return(%_DateField(this,2));
}
function DateGetUTCMonth(){
if(!%_IsDate(this))%_ThrowNotDateError();
return(%_DateField(this,12));
}
function DateGetDate(){
if(!%_IsDate(this))%_ThrowNotDateError();
return(%_DateField(this,3));
}
function DateGetUTCDate(){
if(!%_IsDate(this))%_ThrowNotDateError();
return(%_DateField(this,13));
}
function DateGetDay(){
if(!%_IsDate(this))%_ThrowNotDateError();
return(%_DateField(this,4));
}
function DateGetUTCDay(){
if(!%_IsDate(this))%_ThrowNotDateError();
return(%_DateField(this,14));
}
function DateGetHours(){
if(!%_IsDate(this))%_ThrowNotDateError();
return(%_DateField(this,5));
}
function DateGetUTCHours(){
if(!%_IsDate(this))%_ThrowNotDateError();
return(%_DateField(this,15));
}
function DateGetMinutes(){
if(!%_IsDate(this))%_ThrowNotDateError();
return(%_DateField(this,6));
}
function DateGetUTCMinutes(){
if(!%_IsDate(this))%_ThrowNotDateError();
return(%_DateField(this,16));
}
function DateGetSeconds(){
if(!%_IsDate(this))%_ThrowNotDateError();
return(%_DateField(this,7));
}
function DateGetUTCSeconds(){
if(!%_IsDate(this))%_ThrowNotDateError();
return(%_DateField(this,17))
}
function DateGetMilliseconds(){
if(!%_IsDate(this))%_ThrowNotDateError();
return(%_DateField(this,8));
}
function DateGetUTCMilliseconds(){
if(!%_IsDate(this))%_ThrowNotDateError();
return(%_DateField(this,18));
}
function DateGetTimezoneOffset(){
if(!%_IsDate(this))%_ThrowNotDateError();
return(%_DateField(this,21));
}
function DateSetTime(s){
if(!%_IsDate(this))%_ThrowNotDateError();
(%DateSetValue(this,i(s),1));
return(%_DateField(this,0));
}
function DateSetMilliseconds(s){
if(!%_IsDate(this))%_ThrowNotDateError();
var m=(%_DateField(this,0)+%_DateField(this,21));
s=i(s);
var o=MakeTime((%_DateField(this,5)),(%_DateField(this,6)),(%_DateField(this,7)),s);
return(%DateSetValue(this,MakeDate((%_DateField(this,9)),o),0));
}
function DateSetUTCMilliseconds(s){
if(!%_IsDate(this))%_ThrowNotDateError();
var m=(%_DateField(this,0));
s=i(s);
var o=MakeTime((%_DateField(this,15)),
(%_DateField(this,16)),
(%_DateField(this,17)),
s);
return(%DateSetValue(this,MakeDate((%_DateField(this,19)),o),1));
}
function DateSetSeconds(r,s){
if(!%_IsDate(this))%_ThrowNotDateError();
var m=(%_DateField(this,0)+%_DateField(this,21));
r=i(r);
s=%_ArgumentsLength()<2?(%_DateField(this,8)):i(s);
var o=MakeTime((%_DateField(this,5)),(%_DateField(this,6)),r,s);
return(%DateSetValue(this,MakeDate((%_DateField(this,9)),o),0));
}
function DateSetUTCSeconds(r,s){
if(!%_IsDate(this))%_ThrowNotDateError();
var m=(%_DateField(this,0));
r=i(r);
s=%_ArgumentsLength()<2?(%_DateField(this,18)):i(s);
var o=MakeTime((%_DateField(this,15)),(%_DateField(this,16)),r,s);
return(%DateSetValue(this,MakeDate((%_DateField(this,19)),o),1));
}
function DateSetMinutes(q,r,s){
if(!%_IsDate(this))%_ThrowNotDateError();
var m=(%_DateField(this,0)+%_DateField(this,21));
q=i(q);
var B=%_ArgumentsLength();
r=B<2?(%_DateField(this,7)):i(r);
s=B<3?(%_DateField(this,8)):i(s);
var o=MakeTime((%_DateField(this,5)),q,r,s);
return(%DateSetValue(this,MakeDate((%_DateField(this,9)),o),0));
}
function DateSetUTCMinutes(q,r,s){
if(!%_IsDate(this))%_ThrowNotDateError();
var m=(%_DateField(this,0));
q=i(q);
var B=%_ArgumentsLength();
r=B<2?(%_DateField(this,17)):i(r);
s=B<3?(%_DateField(this,18)):i(s);
var o=MakeTime((%_DateField(this,15)),q,r,s);
return(%DateSetValue(this,MakeDate((%_DateField(this,19)),o),1));
}
function DateSetHours(p,q,r,s){
if(!%_IsDate(this))%_ThrowNotDateError();
var m=(%_DateField(this,0)+%_DateField(this,21));
p=i(p);
var B=%_ArgumentsLength();
q=B<2?(%_DateField(this,6)):i(q);
r=B<3?(%_DateField(this,7)):i(r);
s=B<4?(%_DateField(this,8)):i(s);
var o=MakeTime(p,q,r,s);
return(%DateSetValue(this,MakeDate((%_DateField(this,9)),o),0));
}
function DateSetUTCHours(p,q,r,s){
if(!%_IsDate(this))%_ThrowNotDateError();
var m=(%_DateField(this,0));
p=i(p);
var B=%_ArgumentsLength();
q=B<2?(%_DateField(this,16)):i(q);
r=B<3?(%_DateField(this,17)):i(r);
s=B<4?(%_DateField(this,18)):i(s);
var o=MakeTime(p,q,r,s);
return(%DateSetValue(this,MakeDate((%_DateField(this,19)),o),1));
}
function DateSetDate(v){
if(!%_IsDate(this))%_ThrowNotDateError();
var m=(%_DateField(this,0)+%_DateField(this,21));
v=i(v);
var w=MakeDay((%_DateField(this,1)),(%_DateField(this,2)),v);
return(%DateSetValue(this,MakeDate(w,(%_DateField(this,10))),0));
}
function DateSetUTCDate(v){
if(!%_IsDate(this))%_ThrowNotDateError();
var m=(%_DateField(this,0));
v=i(v);
var w=MakeDay((%_DateField(this,11)),(%_DateField(this,12)),v);
return(%DateSetValue(this,MakeDate(w,(%_DateField(this,20))),1));
}
function DateSetMonth(u,v){
if(!%_IsDate(this))%_ThrowNotDateError();
var m=(%_DateField(this,0)+%_DateField(this,21));
u=i(u);
v=%_ArgumentsLength()<2?(%_DateField(this,3)):i(v);
var w=MakeDay((%_DateField(this,1)),u,v);
return(%DateSetValue(this,MakeDate(w,(%_DateField(this,10))),0));
}
function DateSetUTCMonth(u,v){
if(!%_IsDate(this))%_ThrowNotDateError();
var m=(%_DateField(this,0));
u=i(u);
v=%_ArgumentsLength()<2?(%_DateField(this,13)):i(v);
var w=MakeDay((%_DateField(this,11)),u,v);
return(%DateSetValue(this,MakeDate(w,(%_DateField(this,20))),1));
}
function DateSetFullYear(t,u,v){
if(!%_IsDate(this))%_ThrowNotDateError();
var m=(%_DateField(this,0)+%_DateField(this,21));
t=i(t);
var B=%_ArgumentsLength();
var o;
if((!%_IsSmi(%IS_VAR(m))&&!(m==m))){
u=B<2?0:i(u);
v=B<3?1:i(v);
o=0;
}else{
u=B<2?(%_DateField(this,2)):i(u);
v=B<3?(%_DateField(this,3)):i(v);
o=(%_DateField(this,10));
}
var w=MakeDay(t,u,v);
return(%DateSetValue(this,MakeDate(w,o),0));
}
function DateSetUTCFullYear(t,u,v){
if(!%_IsDate(this))%_ThrowNotDateError();
var m=(%_DateField(this,0));
t=i(t);
var B=%_ArgumentsLength();
var o;
if((!%_IsSmi(%IS_VAR(m))&&!(m==m))){
u=B<2?0:i(u);
v=B<3?1:i(v);
o=0;
}else{
u=B<2?(%_DateField(this,12)):i(u);
v=B<3?(%_DateField(this,13)):i(v);
o=(%_DateField(this,20));
}
var w=MakeDay(t,u,v);
return(%DateSetValue(this,MakeDate(w,o),1));
}
function DateToUTCString(){
if(!%_IsDate(this))%_ThrowNotDateError();
var m=(%_DateField(this,0));
if((!%_IsSmi(%IS_VAR(m))&&!(m==m)))return'Invalid Date';
return E[(%_DateField(this,14))]+', '
+TwoDigitString((%_DateField(this,13)))+' '
+F[(%_DateField(this,12))]+' '
+(%_DateField(this,11))+' '
+TimeStringUTC(this)+' GMT';
}
function DateGetYear(){
if(!%_IsDate(this))%_ThrowNotDateError();
return(%_DateField(this,1))-1900;
}
function DateSetYear(t){
if(!%_IsDate(this))%_ThrowNotDateError();
t=i(t);
if((!%_IsSmi(%IS_VAR(t))&&!(t==t)))return(%DateSetValue(this,$NaN,1));
t=(0<=(%_ToInteger(t))&&(%_ToInteger(t))<=99)
?1900+(%_ToInteger(t)):t;
var m=(%_DateField(this,0)+%_DateField(this,21));
var u,v,o;
if((!%_IsSmi(%IS_VAR(m))&&!(m==m))){
u=0;
v=1;
o=0;
}else{
u=(%_DateField(this,2));
v=(%_DateField(this,3));
o=(%_DateField(this,10));
}
var w=MakeDay(t,u,v);
return(%DateSetValue(this,MakeDate(w,o),0));
}
function DateToGMTString(){
return %_CallFunction(this,DateToUTCString);
}
function PadInt(P,Q){
if(Q==1)return P;
return P<%_MathPow(10,Q-1)?'0'+PadInt(P,Q-1):P;
}
function DateToISOString(){
if(!%_IsDate(this))%_ThrowNotDateError();
var m=(%_DateField(this,0));
if((!%_IsSmi(%IS_VAR(m))&&!(m==m)))throw MakeRangeError(143);
var t=(%_DateField(this,11));
var R;
if(t>=0&&t<=9999){
R=PadInt(t,4);
}else{
if(t<0){
R="-"+PadInt(-t,6);
}else{
R="+"+PadInt(t,6);
}
}
return R+
'-'+PadInt((%_DateField(this,12))+1,2)+
'-'+PadInt((%_DateField(this,13)),2)+
'T'+PadInt((%_DateField(this,15)),2)+
':'+PadInt((%_DateField(this,16)),2)+
':'+PadInt((%_DateField(this,17)),2)+
'.'+PadInt((%_DateField(this,18)),3)+
'Z';
}
function DateToJSON(S){
var T=(%_ToObject(this));
var U=(%_ToPrimitive_Number(T));
if((typeof(U)==='number')&&!(%_IsSmi(%IS_VAR(U))||((U==U)&&(U!=1/0)&&(U!=-1/0)))){
return null;
}
return T.toISOString();
}
var V;
var W=$NaN;
function CheckDateCacheCurrent(){
if(!V){
V=%DateCacheVersion();
if(!V)return;
}
if(V[0]==W){
return;
}
W=V[0];
k=$NaN;
l=(void 0);
x.time=$NaN;
x.string=null;
}
function CreateDate(o){
var v=new c();
v.setTime(o);
return v;
}
%SetCode(c,DateConstructor);
%FunctionSetPrototype(c,new d());
b.InstallFunctions(c,2,[
"UTC",DateUTC,
"parse",DateParse,
"now",DateNow
]);
%AddNamedProperty(c.prototype,"constructor",c,2);
b.InstallFunctions(c.prototype,2,[
"toString",DateToString,
"toDateString",DateToDateString,
"toTimeString",DateToTimeString,
"toLocaleString",DateToLocaleString,
"toLocaleDateString",DateToLocaleDateString,
"toLocaleTimeString",DateToLocaleTimeString,
"valueOf",DateValueOf,
"getTime",DateGetTime,
"getFullYear",DateGetFullYear,
"getUTCFullYear",DateGetUTCFullYear,
"getMonth",DateGetMonth,
"getUTCMonth",DateGetUTCMonth,
"getDate",DateGetDate,
"getUTCDate",DateGetUTCDate,
"getDay",DateGetDay,
"getUTCDay",DateGetUTCDay,
"getHours",DateGetHours,
"getUTCHours",DateGetUTCHours,
"getMinutes",DateGetMinutes,
"getUTCMinutes",DateGetUTCMinutes,
"getSeconds",DateGetSeconds,
"getUTCSeconds",DateGetUTCSeconds,
"getMilliseconds",DateGetMilliseconds,
"getUTCMilliseconds",DateGetUTCMilliseconds,
"getTimezoneOffset",DateGetTimezoneOffset,
"setTime",DateSetTime,
"setMilliseconds",DateSetMilliseconds,
"setUTCMilliseconds",DateSetUTCMilliseconds,
"setSeconds",DateSetSeconds,
"setUTCSeconds",DateSetUTCSeconds,
"setMinutes",DateSetMinutes,
"setUTCMinutes",DateSetUTCMinutes,
"setHours",DateSetHours,
"setUTCHours",DateSetUTCHours,
"setDate",DateSetDate,
"setUTCDate",DateSetUTCDate,
"setMonth",DateSetMonth,
"setUTCMonth",DateSetUTCMonth,
"setFullYear",DateSetFullYear,
"setUTCFullYear",DateSetUTCFullYear,
"toGMTString",DateToGMTString,
"toUTCString",DateToUTCString,
"getYear",DateGetYear,
"setYear",DateSetYear,
"toISOString",DateToISOString,
"toJSON",DateToJSON
]);
%InstallToContext(["create_date_fun",CreateDate]);
})

regexp±c
var $regexpLastMatchInfoOverride;
(function(a,b){
%CheckIsBootstrapping();
var c;
var d;
var e=a.RegExp;
var f=b.InternalPackedArray;
var g;
b.Import(function(h){
g=h.ToNumber;
});
b.ImportFromExperimental(function(h){
c=h.FLAG_harmony_regexps;
d=h.FLAG_harmony_unicode_regexps;
});
var i=new f(
2,
"",
(void 0),
0,
0
);
$regexpLastMatchInfoOverride=null;
function DoConstructRegExp(j,k,l){
if((%_IsRegExp(k))){
if(!(l===(void 0)))throw MakeTypeError(98);
l=(k.global?'g':'')
+(k.ignoreCase?'i':'')
+(k.multiline?'m':'');
if(d)
l+=(k.unicode?'u':'');
if(c)
l+=(k.sticky?'y':'');
k=k.source;
}
k=(k===(void 0))?'':(%_ToString(k));
l=(l===(void 0))?'':(%_ToString(l));
%RegExpInitializeAndCompile(j,k,l);
}
function RegExpConstructor(k,l){
if(%_IsConstructCall()){
DoConstructRegExp(this,k,l);
}else{
if((%_IsRegExp(k))&&(l===(void 0))){
return k;
}
return new e(k,l);
}
}
function RegExpCompileJS(k,l){
if(this==e.prototype){
throw MakeTypeError(36,
'RegExp.prototype.compile',this);
}
if((k===(void 0))&&%_ArgumentsLength()!=0){
DoConstructRegExp(this,'undefined',l);
}else{
DoConstructRegExp(this,k,l);
}
}
function DoRegExpExec(m,n,o){
var p=%_RegExpExec(m,n,o,i);
if(p!==null)$regexpLastMatchInfoOverride=null;
return p;
}
function RegExpExecNoTests(m,n,q){
var r=%_RegExpExec(m,n,q,i);
if(r!==null){
$regexpLastMatchInfoOverride=null;
var s=((r)[0])>>1;
var q=r[3];
var t=r[4];
var u=%_SubString(n,q,t);
var p=%_RegExpConstructResult(s,q,n);
p[0]=u;
if(s==1)return p;
var v=3+2;
for(var w=1;w<s;w++){
q=r[v++];
if(q!=-1){
t=r[v];
p[w]=%_SubString(n,q,t);
}
v++;
}
return p;
;
}
m.lastIndex=0;
return null;
}
function RegExpExecJS(n){
if(!(%_IsRegExp(this))){
throw MakeTypeError(36,
'RegExp.prototype.exec',this);
}
n=(%_ToString(n));
var x=this.lastIndex;
var w=(%_ToInteger(x));
var y=this.global||(c&&this.sticky);
if(y){
if(w<0||w>n.length){
this.lastIndex=0;
return null;
}
}else{
w=0;
}
var z=%_RegExpExec(this,n,w,i);
if((z===null)){
this.lastIndex=0;
return null;
}
$regexpLastMatchInfoOverride=null;
if(y){
this.lastIndex=i[4];
}
var s=((z)[0])>>1;
var q=z[3];
var t=z[4];
var u=%_SubString(n,q,t);
var p=%_RegExpConstructResult(s,q,n);
p[0]=u;
if(s==1)return p;
var v=3+2;
for(var w=1;w<s;w++){
q=z[v++];
if(q!=-1){
t=z[v];
p[w]=%_SubString(n,q,t);
}
v++;
}
return p;
;
}
var A;
var B;
function RegExpTest(n){
if(!(%_IsRegExp(this))){
throw MakeTypeError(36,
'RegExp.prototype.test',this);
}
n=(%_ToString(n));
var x=this.lastIndex;
var w=(%_ToInteger(x));
if(this.global||(c&&this.sticky)){
if(w<0||w>n.length){
this.lastIndex=0;
return false;
}
var z=%_RegExpExec(this,n,w,i);
if((z===null)){
this.lastIndex=0;
return false;
}
$regexpLastMatchInfoOverride=null;
this.lastIndex=i[4];
return true;
}else{
var m=this;
if(m.source.length>=3&&
%_StringCharCodeAt(m.source,0)==46&&
%_StringCharCodeAt(m.source,1)==42&&
%_StringCharCodeAt(m.source,2)!=63){
m=TrimRegExp(m);
}
var z=%_RegExpExec(m,n,0,i);
if((z===null)){
this.lastIndex=0;
return false;
}
$regexpLastMatchInfoOverride=null;
return true;
}
}
function TrimRegExp(m){
if(!%_ObjectEquals(A,m)){
A=m;
B=
new e(%_SubString(m.source,2,m.source.length),
(m.ignoreCase?m.multiline?"im":"i"
:m.multiline?"m":""));
}
return B;
}
function RegExpToString(){
if(!(%_IsRegExp(this))){
throw MakeTypeError(36,
'RegExp.prototype.toString',this);
}
var p='/'+this.source+'/';
if(this.global)p+='g';
if(this.ignoreCase)p+='i';
if(this.multiline)p+='m';
if(d&&this.unicode)p+='u';
if(c&&this.sticky)p+='y';
return p;
}
function RegExpGetLastMatch(){
if($regexpLastMatchInfoOverride!==null){
return(($regexpLastMatchInfoOverride)[0]);
}
var C=((i)[1]);
return %_SubString(C,
i[3],
i[4]);
}
function RegExpGetLastParen(){
if($regexpLastMatchInfoOverride){
var D=$regexpLastMatchInfoOverride;
if(D.length<=3)return'';
return D[D.length-3];
}
var E=((i)[0]);
if(E<=2)return'';
var C=((i)[1]);
var q=i[(3+(E-2))];
var t=i[(3+(E-1))];
if(q!=-1&&t!=-1){
return %_SubString(C,q,t);
}
return"";
}
function RegExpGetLeftContext(){
var F;
var G;
if(!$regexpLastMatchInfoOverride){
F=i[3];
G=((i)[1]);
}else{
var D=$regexpLastMatchInfoOverride;
F=((D)[(D).length-2]);
G=((D)[(D).length-1]);
}
return %_SubString(G,0,F);
}
function RegExpGetRightContext(){
var F;
var G;
if(!$regexpLastMatchInfoOverride){
F=i[4];
G=((i)[1]);
}else{
var D=$regexpLastMatchInfoOverride;
G=((D)[(D).length-1]);
var H=((D)[0]);
F=((D)[(D).length-2])+H.length;
}
return %_SubString(G,F,G.length);
}
function RegExpMakeCaptureGetter(I){
return function foo(){
if($regexpLastMatchInfoOverride){
if(I<$regexpLastMatchInfoOverride.length-2){
return(($regexpLastMatchInfoOverride)[(I)]);
}
return'';
}
var o=I*2;
if(o>=((i)[0]))return'';
var J=i[(3+(o))];
var K=i[(3+(o+1))];
if(J==-1||K==-1)return'';
return %_SubString(((i)[1]),J,K);
};
}
%FunctionSetInstanceClassName(e,'RegExp');
%AddNamedProperty(
e.prototype,'constructor',e,2);
%SetCode(e,RegExpConstructor);
b.InstallFunctions(e.prototype,2,[
"exec",RegExpExecJS,
"test",RegExpTest,
"toString",RegExpToString,
"compile",RegExpCompileJS
]);
%FunctionSetLength(e.prototype.compile,1);
var L=function(){
var M=((i)[2]);
return(M===(void 0))?"":M;
};
var N=function(n){
((i)[2])=(%_ToString(n));
};
%OptimizeObjectForAddingMultipleProperties(e,22);
%DefineAccessorPropertyUnchecked(e,'input',L,
N,4);
%DefineAccessorPropertyUnchecked(e,'$_',L,
N,2|4);
var O=false;
var P=function(){return O;};
var Q=function(R){O=R?true:false;};
%DefineAccessorPropertyUnchecked(e,'multiline',P,
Q,4);
%DefineAccessorPropertyUnchecked(e,'$*',P,
Q,
2|4);
var S=function(T){};
%DefineAccessorPropertyUnchecked(e,'lastMatch',RegExpGetLastMatch,
S,4);
%DefineAccessorPropertyUnchecked(e,'$&',RegExpGetLastMatch,
S,2|4);
%DefineAccessorPropertyUnchecked(e,'lastParen',RegExpGetLastParen,
S,4);
%DefineAccessorPropertyUnchecked(e,'$+',RegExpGetLastParen,
S,2|4);
%DefineAccessorPropertyUnchecked(e,'leftContext',
RegExpGetLeftContext,S,
4);
%DefineAccessorPropertyUnchecked(e,'$`',RegExpGetLeftContext,
S,2|4);
%DefineAccessorPropertyUnchecked(e,'rightContext',
RegExpGetRightContext,S,
4);
%DefineAccessorPropertyUnchecked(e,"$'",RegExpGetRightContext,
S,2|4);
for(var w=1;w<10;++w){
%DefineAccessorPropertyUnchecked(e,'$'+w,
RegExpMakeCaptureGetter(w),S,
4);
}
%ToFastProperties(e);
b.Export(function(U){
U.RegExpExec=DoRegExpExec;
U.RegExpExecNoTests=RegExpExecNoTests;
U.RegExpLastMatchInfo=i;
U.RegExpTest=RegExpTest;
});
})

,arraybufferý
(function(a,b){
"use strict";
%CheckIsBootstrapping();
var c=a.ArrayBuffer;
var d=a.Object;
var e;
var f;
var g;
var h=b.ImportNow("to_string_tag_symbol");
b.Import(function(i){
e=i.MathMax;
f=i.MathMin;
g=i.ToNumber;
});
function ArrayBufferConstructor(j){
if(%_IsConstructCall()){
var k=$toPositiveInteger(j,130);
%ArrayBufferInitialize(this,k,false);
}else{
throw MakeTypeError(21,"ArrayBuffer");
}
}
function ArrayBufferGetByteLen(){
if(!(%_ClassOf(this)==='ArrayBuffer')){
throw MakeTypeError(36,
'ArrayBuffer.prototype.byteLength',this);
}
return %_ArrayBufferGetByteLength(this);
}
function ArrayBufferSlice(l,m){
if(!(%_ClassOf(this)==='ArrayBuffer')){
throw MakeTypeError(36,
'ArrayBuffer.prototype.slice',this);
}
var n=(%_ToInteger(l));
if(!(m===(void 0))){
m=(%_ToInteger(m));
}
var o;
var p=%_ArrayBufferGetByteLength(this);
if(n<0){
o=e(p+n,0);
}else{
o=f(n,p);
}
var q=(m===(void 0))?p:m;
var r;
if(q<0){
r=e(p+q,0);
}else{
r=f(q,p);
}
if(r<o){
r=o;
}
var s=r-o;
var t=new c(s);
%ArrayBufferSliceImpl(this,t,o);
return t;
}
function ArrayBufferIsViewJS(u){
return %ArrayBufferIsView(u);
}
%SetCode(c,ArrayBufferConstructor);
%FunctionSetPrototype(c,new d());
%AddNamedProperty(
c.prototype,"constructor",c,2);
%AddNamedProperty(c.prototype,
h,"ArrayBuffer",2|1);
b.InstallGetter(c.prototype,"byteLength",
ArrayBufferGetByteLen);
b.InstallFunctions(c,2,[
"isView",ArrayBufferIsViewJS
]);
b.InstallFunctions(c.prototype,2,[
"slice",ArrayBufferSlice
]);
})

(typedarrayþŸ
(function(a,b){
"use strict";
%CheckIsBootstrapping();
var c=a.Array;
var d=a.ArrayBuffer;
var e=a.DataView;
var f=a.Object;
var g=b.ImportNow("iterator_symbol");
var h=b.ImportNow("to_string_tag_symbol");
var i=a.Uint8Array;

var j=a.Int8Array;

var k=a.Uint16Array;

var l=a.Int16Array;

var m=a.Uint32Array;

var n=a.Int32Array;

var o=a.Float32Array;

var p=a.Float64Array;

var q=a.Uint8ClampedArray;


var r;
b.Import(function(s){
r=s.ToNumber;
});
var t=b.InternalArray;
function Uint8ArrayConstructByArrayBuffer(u,v,w,x){
if(!(w===(void 0))){
w=
$toPositiveInteger(w,145);
}
if(!(x===(void 0))){
x=$toPositiveInteger(x,145);
}
var y=%_ArrayBufferGetByteLength(v);
var z;
if((w===(void 0))){
z=0;
}else{
z=w;
if(z % 1!==0){
throw MakeRangeError(144,
"start offset","Uint8Array",1);
}
if(z>y){
throw MakeRangeError(146);
}
}
var A;
var B;
if((x===(void 0))){
if(y % 1!==0){
throw MakeRangeError(144,
"byte length","Uint8Array",1);
}
A=y-z;
B=A/1;
}else{
var B=x;
A=B*1;
}
if((z+A>y)
||(B>%_MaxSmi())){
throw MakeRangeError(145);
}
%_TypedArrayInitialize(u,1,v,z,A,true);
}
function Uint8ArrayConstructByLength(u,x){
var C=(x===(void 0))?
0:$toPositiveInteger(x,145);
if(C>%_MaxSmi()){
throw MakeRangeError(145);
}
var D=C*1;
if(D>%_TypedArrayMaxSizeInHeap()){
var v=new d(D);
%_TypedArrayInitialize(u,1,v,0,D,true);
}else{
%_TypedArrayInitialize(u,1,null,0,D,true);
}
}
function Uint8ArrayConstructByArrayLike(u,E){
var x=E.length;
var C=$toPositiveInteger(x,145);
if(C>%_MaxSmi()){
throw MakeRangeError(145);
}
var F=false;
var D=C*1;
if(D<=%_TypedArrayMaxSizeInHeap()){
%_TypedArrayInitialize(u,1,null,0,D,false);
}else{
F=
%TypedArrayInitializeFromArrayLike(u,1,E,C);
}
if(!F){
for(var G=0;G<C;G++){
u[G]=E[G];
}
}
}
function Uint8ArrayConstructByIterable(u,H,I){
var J=new t();
var K=%_Call(I,H);
var L={
__proto__:null
};
L[g]=function(){return K;}
for(var M of L){
J.push(M);
}
Uint8ArrayConstructByArrayLike(u,J);
}
function Uint8ArrayConstructor(N,O,P){
if(%_IsConstructCall()){
if((%_ClassOf(N)==='ArrayBuffer')||(%_ClassOf(N)==='SharedArrayBuffer')){
Uint8ArrayConstructByArrayBuffer(this,N,O,P);
}else if((typeof(N)==='number')||(typeof(N)==='string')||
(typeof(N)==='boolean')||(N===(void 0))){
Uint8ArrayConstructByLength(this,N);
}else{
var I=N[g];
if((I===(void 0))||I===$arrayValues){
Uint8ArrayConstructByArrayLike(this,N);
}else{
Uint8ArrayConstructByIterable(this,N,I);
}
}
}else{
throw MakeTypeError(21,"Uint8Array")
}
}
function Uint8Array_GetBuffer(){
if(!(%_ClassOf(this)==='Uint8Array')){
throw MakeTypeError(36,"Uint8Array.buffer",this);
}
return %TypedArrayGetBuffer(this);
}
function Uint8Array_GetByteLength(){
if(!(%_ClassOf(this)==='Uint8Array')){
throw MakeTypeError(36,"Uint8Array.byteLength",this);
}
return %_ArrayBufferViewGetByteLength(this);
}
function Uint8Array_GetByteOffset(){
if(!(%_ClassOf(this)==='Uint8Array')){
throw MakeTypeError(36,"Uint8Array.byteOffset",this);
}
return %_ArrayBufferViewGetByteOffset(this);
}
function Uint8Array_GetLength(){
if(!(%_ClassOf(this)==='Uint8Array')){
throw MakeTypeError(36,"Uint8Array.length",this);
}
return %_TypedArrayGetLength(this);
}
function Uint8ArraySubArray(Q,R){
if(!(%_ClassOf(this)==='Uint8Array')){
throw MakeTypeError(36,"Uint8Array.subarray",this);
}
var S=(%_ToInteger(Q));
if(!(R===(void 0))){
var T=(%_ToInteger(R));
var U=%_TypedArrayGetLength(this);
}else{
var U=%_TypedArrayGetLength(this);
var T=U;
}
if(S<0){
S=(0<U+S?U+S:0);
}else{
S=(S<U?S:U);
}
if(T<0){
T=(0<U+T?U+T:0);
}else{
T=(T<U?T:U);
}
if(T<S){
T=S;
}
var B=T-S;
var V=
%_ArrayBufferViewGetByteOffset(this)+S*1;
return new i(%TypedArrayGetBuffer(this),
V,B);
}

function Int8ArrayConstructByArrayBuffer(u,v,w,x){
if(!(w===(void 0))){
w=
$toPositiveInteger(w,145);
}
if(!(x===(void 0))){
x=$toPositiveInteger(x,145);
}
var y=%_ArrayBufferGetByteLength(v);
var z;
if((w===(void 0))){
z=0;
}else{
z=w;
if(z % 1!==0){
throw MakeRangeError(144,
"start offset","Int8Array",1);
}
if(z>y){
throw MakeRangeError(146);
}
}
var A;
var B;
if((x===(void 0))){
if(y % 1!==0){
throw MakeRangeError(144,
"byte length","Int8Array",1);
}
A=y-z;
B=A/1;
}else{
var B=x;
A=B*1;
}
if((z+A>y)
||(B>%_MaxSmi())){
throw MakeRangeError(145);
}
%_TypedArrayInitialize(u,2,v,z,A,true);
}
function Int8ArrayConstructByLength(u,x){
var C=(x===(void 0))?
0:$toPositiveInteger(x,145);
if(C>%_MaxSmi()){
throw MakeRangeError(145);
}
var D=C*1;
if(D>%_TypedArrayMaxSizeInHeap()){
var v=new d(D);
%_TypedArrayInitialize(u,2,v,0,D,true);
}else{
%_TypedArrayInitialize(u,2,null,0,D,true);
}
}
function Int8ArrayConstructByArrayLike(u,E){
var x=E.length;
var C=$toPositiveInteger(x,145);
if(C>%_MaxSmi()){
throw MakeRangeError(145);
}
var F=false;
var D=C*1;
if(D<=%_TypedArrayMaxSizeInHeap()){
%_TypedArrayInitialize(u,2,null,0,D,false);
}else{
F=
%TypedArrayInitializeFromArrayLike(u,2,E,C);
}
if(!F){
for(var G=0;G<C;G++){
u[G]=E[G];
}
}
}
function Int8ArrayConstructByIterable(u,H,I){
var J=new t();
var K=%_Call(I,H);
var L={
__proto__:null
};
L[g]=function(){return K;}
for(var M of L){
J.push(M);
}
Int8ArrayConstructByArrayLike(u,J);
}
function Int8ArrayConstructor(N,O,P){
if(%_IsConstructCall()){
if((%_ClassOf(N)==='ArrayBuffer')||(%_ClassOf(N)==='SharedArrayBuffer')){
Int8ArrayConstructByArrayBuffer(this,N,O,P);
}else if((typeof(N)==='number')||(typeof(N)==='string')||
(typeof(N)==='boolean')||(N===(void 0))){
Int8ArrayConstructByLength(this,N);
}else{
var I=N[g];
if((I===(void 0))||I===$arrayValues){
Int8ArrayConstructByArrayLike(this,N);
}else{
Int8ArrayConstructByIterable(this,N,I);
}
}
}else{
throw MakeTypeError(21,"Int8Array")
}
}
function Int8Array_GetBuffer(){
if(!(%_ClassOf(this)==='Int8Array')){
throw MakeTypeError(36,"Int8Array.buffer",this);
}
return %TypedArrayGetBuffer(this);
}
function Int8Array_GetByteLength(){
if(!(%_ClassOf(this)==='Int8Array')){
throw MakeTypeError(36,"Int8Array.byteLength",this);
}
return %_ArrayBufferViewGetByteLength(this);
}
function Int8Array_GetByteOffset(){
if(!(%_ClassOf(this)==='Int8Array')){
throw MakeTypeError(36,"Int8Array.byteOffset",this);
}
return %_ArrayBufferViewGetByteOffset(this);
}
function Int8Array_GetLength(){
if(!(%_ClassOf(this)==='Int8Array')){
throw MakeTypeError(36,"Int8Array.length",this);
}
return %_TypedArrayGetLength(this);
}
function Int8ArraySubArray(Q,R){
if(!(%_ClassOf(this)==='Int8Array')){
throw MakeTypeError(36,"Int8Array.subarray",this);
}
var S=(%_ToInteger(Q));
if(!(R===(void 0))){
var T=(%_ToInteger(R));
var U=%_TypedArrayGetLength(this);
}else{
var U=%_TypedArrayGetLength(this);
var T=U;
}
if(S<0){
S=(0<U+S?U+S:0);
}else{
S=(S<U?S:U);
}
if(T<0){
T=(0<U+T?U+T:0);
}else{
T=(T<U?T:U);
}
if(T<S){
T=S;
}
var B=T-S;
var V=
%_ArrayBufferViewGetByteOffset(this)+S*1;
return new j(%TypedArrayGetBuffer(this),
V,B);
}

function Uint16ArrayConstructByArrayBuffer(u,v,w,x){
if(!(w===(void 0))){
w=
$toPositiveInteger(w,145);
}
if(!(x===(void 0))){
x=$toPositiveInteger(x,145);
}
var y=%_ArrayBufferGetByteLength(v);
var z;
if((w===(void 0))){
z=0;
}else{
z=w;
if(z % 2!==0){
throw MakeRangeError(144,
"start offset","Uint16Array",2);
}
if(z>y){
throw MakeRangeError(146);
}
}
var A;
var B;
if((x===(void 0))){
if(y % 2!==0){
throw MakeRangeError(144,
"byte length","Uint16Array",2);
}
A=y-z;
B=A/2;
}else{
var B=x;
A=B*2;
}
if((z+A>y)
||(B>%_MaxSmi())){
throw MakeRangeError(145);
}
%_TypedArrayInitialize(u,3,v,z,A,true);
}
function Uint16ArrayConstructByLength(u,x){
var C=(x===(void 0))?
0:$toPositiveInteger(x,145);
if(C>%_MaxSmi()){
throw MakeRangeError(145);
}
var D=C*2;
if(D>%_TypedArrayMaxSizeInHeap()){
var v=new d(D);
%_TypedArrayInitialize(u,3,v,0,D,true);
}else{
%_TypedArrayInitialize(u,3,null,0,D,true);
}
}
function Uint16ArrayConstructByArrayLike(u,E){
var x=E.length;
var C=$toPositiveInteger(x,145);
if(C>%_MaxSmi()){
throw MakeRangeError(145);
}
var F=false;
var D=C*2;
if(D<=%_TypedArrayMaxSizeInHeap()){
%_TypedArrayInitialize(u,3,null,0,D,false);
}else{
F=
%TypedArrayInitializeFromArrayLike(u,3,E,C);
}
if(!F){
for(var G=0;G<C;G++){
u[G]=E[G];
}
}
}
function Uint16ArrayConstructByIterable(u,H,I){
var J=new t();
var K=%_Call(I,H);
var L={
__proto__:null
};
L[g]=function(){return K;}
for(var M of L){
J.push(M);
}
Uint16ArrayConstructByArrayLike(u,J);
}
function Uint16ArrayConstructor(N,O,P){
if(%_IsConstructCall()){
if((%_ClassOf(N)==='ArrayBuffer')||(%_ClassOf(N)==='SharedArrayBuffer')){
Uint16ArrayConstructByArrayBuffer(this,N,O,P);
}else if((typeof(N)==='number')||(typeof(N)==='string')||
(typeof(N)==='boolean')||(N===(void 0))){
Uint16ArrayConstructByLength(this,N);
}else{
var I=N[g];
if((I===(void 0))||I===$arrayValues){
Uint16ArrayConstructByArrayLike(this,N);
}else{
Uint16ArrayConstructByIterable(this,N,I);
}
}
}else{
throw MakeTypeError(21,"Uint16Array")
}
}
function Uint16Array_GetBuffer(){
if(!(%_ClassOf(this)==='Uint16Array')){
throw MakeTypeError(36,"Uint16Array.buffer",this);
}
return %TypedArrayGetBuffer(this);
}
function Uint16Array_GetByteLength(){
if(!(%_ClassOf(this)==='Uint16Array')){
throw MakeTypeError(36,"Uint16Array.byteLength",this);
}
return %_ArrayBufferViewGetByteLength(this);
}
function Uint16Array_GetByteOffset(){
if(!(%_ClassOf(this)==='Uint16Array')){
throw MakeTypeError(36,"Uint16Array.byteOffset",this);
}
return %_ArrayBufferViewGetByteOffset(this);
}
function Uint16Array_GetLength(){
if(!(%_ClassOf(this)==='Uint16Array')){
throw MakeTypeError(36,"Uint16Array.length",this);
}
return %_TypedArrayGetLength(this);
}
function Uint16ArraySubArray(Q,R){
if(!(%_ClassOf(this)==='Uint16Array')){
throw MakeTypeError(36,"Uint16Array.subarray",this);
}
var S=(%_ToInteger(Q));
if(!(R===(void 0))){
var T=(%_ToInteger(R));
var U=%_TypedArrayGetLength(this);
}else{
var U=%_TypedArrayGetLength(this);
var T=U;
}
if(S<0){
S=(0<U+S?U+S:0);
}else{
S=(S<U?S:U);
}
if(T<0){
T=(0<U+T?U+T:0);
}else{
T=(T<U?T:U);
}
if(T<S){
T=S;
}
var B=T-S;
var V=
%_ArrayBufferViewGetByteOffset(this)+S*2;
return new k(%TypedArrayGetBuffer(this),
V,B);
}

function Int16ArrayConstructByArrayBuffer(u,v,w,x){
if(!(w===(void 0))){
w=
$toPositiveInteger(w,145);
}
if(!(x===(void 0))){
x=$toPositiveInteger(x,145);
}
var y=%_ArrayBufferGetByteLength(v);
var z;
if((w===(void 0))){
z=0;
}else{
z=w;
if(z % 2!==0){
throw MakeRangeError(144,
"start offset","Int16Array",2);
}
if(z>y){
throw MakeRangeError(146);
}
}
var A;
var B;
if((x===(void 0))){
if(y % 2!==0){
throw MakeRangeError(144,
"byte length","Int16Array",2);
}
A=y-z;
B=A/2;
}else{
var B=x;
A=B*2;
}
if((z+A>y)
||(B>%_MaxSmi())){
throw MakeRangeError(145);
}
%_TypedArrayInitialize(u,4,v,z,A,true);
}
function Int16ArrayConstructByLength(u,x){
var C=(x===(void 0))?
0:$toPositiveInteger(x,145);
if(C>%_MaxSmi()){
throw MakeRangeError(145);
}
var D=C*2;
if(D>%_TypedArrayMaxSizeInHeap()){
var v=new d(D);
%_TypedArrayInitialize(u,4,v,0,D,true);
}else{
%_TypedArrayInitialize(u,4,null,0,D,true);
}
}
function Int16ArrayConstructByArrayLike(u,E){
var x=E.length;
var C=$toPositiveInteger(x,145);
if(C>%_MaxSmi()){
throw MakeRangeError(145);
}
var F=false;
var D=C*2;
if(D<=%_TypedArrayMaxSizeInHeap()){
%_TypedArrayInitialize(u,4,null,0,D,false);
}else{
F=
%TypedArrayInitializeFromArrayLike(u,4,E,C);
}
if(!F){
for(var G=0;G<C;G++){
u[G]=E[G];
}
}
}
function Int16ArrayConstructByIterable(u,H,I){
var J=new t();
var K=%_Call(I,H);
var L={
__proto__:null
};
L[g]=function(){return K;}
for(var M of L){
J.push(M);
}
Int16ArrayConstructByArrayLike(u,J);
}
function Int16ArrayConstructor(N,O,P){
if(%_IsConstructCall()){
if((%_ClassOf(N)==='ArrayBuffer')||(%_ClassOf(N)==='SharedArrayBuffer')){
Int16ArrayConstructByArrayBuffer(this,N,O,P);
}else if((typeof(N)==='number')||(typeof(N)==='string')||
(typeof(N)==='boolean')||(N===(void 0))){
Int16ArrayConstructByLength(this,N);
}else{
var I=N[g];
if((I===(void 0))||I===$arrayValues){
Int16ArrayConstructByArrayLike(this,N);
}else{
Int16ArrayConstructByIterable(this,N,I);
}
}
}else{
throw MakeTypeError(21,"Int16Array")
}
}
function Int16Array_GetBuffer(){
if(!(%_ClassOf(this)==='Int16Array')){
throw MakeTypeError(36,"Int16Array.buffer",this);
}
return %TypedArrayGetBuffer(this);
}
function Int16Array_GetByteLength(){
if(!(%_ClassOf(this)==='Int16Array')){
throw MakeTypeError(36,"Int16Array.byteLength",this);
}
return %_ArrayBufferViewGetByteLength(this);
}
function Int16Array_GetByteOffset(){
if(!(%_ClassOf(this)==='Int16Array')){
throw MakeTypeError(36,"Int16Array.byteOffset",this);
}
return %_ArrayBufferViewGetByteOffset(this);
}
function Int16Array_GetLength(){
if(!(%_ClassOf(this)==='Int16Array')){
throw MakeTypeError(36,"Int16Array.length",this);
}
return %_TypedArrayGetLength(this);
}
function Int16ArraySubArray(Q,R){
if(!(%_ClassOf(this)==='Int16Array')){
throw MakeTypeError(36,"Int16Array.subarray",this);
}
var S=(%_ToInteger(Q));
if(!(R===(void 0))){
var T=(%_ToInteger(R));
var U=%_TypedArrayGetLength(this);
}else{
var U=%_TypedArrayGetLength(this);
var T=U;
}
if(S<0){
S=(0<U+S?U+S:0);
}else{
S=(S<U?S:U);
}
if(T<0){
T=(0<U+T?U+T:0);
}else{
T=(T<U?T:U);
}
if(T<S){
T=S;
}
var B=T-S;
var V=
%_ArrayBufferViewGetByteOffset(this)+S*2;
return new l(%TypedArrayGetBuffer(this),
V,B);
}

function Uint32ArrayConstructByArrayBuffer(u,v,w,x){
if(!(w===(void 0))){
w=
$toPositiveInteger(w,145);
}
if(!(x===(void 0))){
x=$toPositiveInteger(x,145);
}
var y=%_ArrayBufferGetByteLength(v);
var z;
if((w===(void 0))){
z=0;
}else{
z=w;
if(z % 4!==0){
throw MakeRangeError(144,
"start offset","Uint32Array",4);
}
if(z>y){
throw MakeRangeError(146);
}
}
var A;
var B;
if((x===(void 0))){
if(y % 4!==0){
throw MakeRangeError(144,
"byte length","Uint32Array",4);
}
A=y-z;
B=A/4;
}else{
var B=x;
A=B*4;
}
if((z+A>y)
||(B>%_MaxSmi())){
throw MakeRangeError(145);
}
%_TypedArrayInitialize(u,5,v,z,A,true);
}
function Uint32ArrayConstructByLength(u,x){
var C=(x===(void 0))?
0:$toPositiveInteger(x,145);
if(C>%_MaxSmi()){
throw MakeRangeError(145);
}
var D=C*4;
if(D>%_TypedArrayMaxSizeInHeap()){
var v=new d(D);
%_TypedArrayInitialize(u,5,v,0,D,true);
}else{
%_TypedArrayInitialize(u,5,null,0,D,true);
}
}
function Uint32ArrayConstructByArrayLike(u,E){
var x=E.length;
var C=$toPositiveInteger(x,145);
if(C>%_MaxSmi()){
throw MakeRangeError(145);
}
var F=false;
var D=C*4;
if(D<=%_TypedArrayMaxSizeInHeap()){
%_TypedArrayInitialize(u,5,null,0,D,false);
}else{
F=
%TypedArrayInitializeFromArrayLike(u,5,E,C);
}
if(!F){
for(var G=0;G<C;G++){
u[G]=E[G];
}
}
}
function Uint32ArrayConstructByIterable(u,H,I){
var J=new t();
var K=%_Call(I,H);
var L={
__proto__:null
};
L[g]=function(){return K;}
for(var M of L){
J.push(M);
}
Uint32ArrayConstructByArrayLike(u,J);
}
function Uint32ArrayConstructor(N,O,P){
if(%_IsConstructCall()){
if((%_ClassOf(N)==='ArrayBuffer')||(%_ClassOf(N)==='SharedArrayBuffer')){
Uint32ArrayConstructByArrayBuffer(this,N,O,P);
}else if((typeof(N)==='number')||(typeof(N)==='string')||
(typeof(N)==='boolean')||(N===(void 0))){
Uint32ArrayConstructByLength(this,N);
}else{
var I=N[g];
if((I===(void 0))||I===$arrayValues){
Uint32ArrayConstructByArrayLike(this,N);
}else{
Uint32ArrayConstructByIterable(this,N,I);
}
}
}else{
throw MakeTypeError(21,"Uint32Array")
}
}
function Uint32Array_GetBuffer(){
if(!(%_ClassOf(this)==='Uint32Array')){
throw MakeTypeError(36,"Uint32Array.buffer",this);
}
return %TypedArrayGetBuffer(this);
}
function Uint32Array_GetByteLength(){
if(!(%_ClassOf(this)==='Uint32Array')){
throw MakeTypeError(36,"Uint32Array.byteLength",this);
}
return %_ArrayBufferViewGetByteLength(this);
}
function Uint32Array_GetByteOffset(){
if(!(%_ClassOf(this)==='Uint32Array')){
throw MakeTypeError(36,"Uint32Array.byteOffset",this);
}
return %_ArrayBufferViewGetByteOffset(this);
}
function Uint32Array_GetLength(){
if(!(%_ClassOf(this)==='Uint32Array')){
throw MakeTypeError(36,"Uint32Array.length",this);
}
return %_TypedArrayGetLength(this);
}
function Uint32ArraySubArray(Q,R){
if(!(%_ClassOf(this)==='Uint32Array')){
throw MakeTypeError(36,"Uint32Array.subarray",this);
}
var S=(%_ToInteger(Q));
if(!(R===(void 0))){
var T=(%_ToInteger(R));
var U=%_TypedArrayGetLength(this);
}else{
var U=%_TypedArrayGetLength(this);
var T=U;
}
if(S<0){
S=(0<U+S?U+S:0);
}else{
S=(S<U?S:U);
}
if(T<0){
T=(0<U+T?U+T:0);
}else{
T=(T<U?T:U);
}
if(T<S){
T=S;
}
var B=T-S;
var V=
%_ArrayBufferViewGetByteOffset(this)+S*4;
return new m(%TypedArrayGetBuffer(this),
V,B);
}

function Int32ArrayConstructByArrayBuffer(u,v,w,x){
if(!(w===(void 0))){
w=
$toPositiveInteger(w,145);
}
if(!(x===(void 0))){
x=$toPositiveInteger(x,145);
}
var y=%_ArrayBufferGetByteLength(v);
var z;
if((w===(void 0))){
z=0;
}else{
z=w;
if(z % 4!==0){
throw MakeRangeError(144,
"start offset","Int32Array",4);
}
if(z>y){
throw MakeRangeError(146);
}
}
var A;
var B;
if((x===(void 0))){
if(y % 4!==0){
throw MakeRangeError(144,
"byte length","Int32Array",4);
}
A=y-z;
B=A/4;
}else{
var B=x;
A=B*4;
}
if((z+A>y)
||(B>%_MaxSmi())){
throw MakeRangeError(145);
}
%_TypedArrayInitialize(u,6,v,z,A,true);
}
function Int32ArrayConstructByLength(u,x){
var C=(x===(void 0))?
0:$toPositiveInteger(x,145);
if(C>%_MaxSmi()){
throw MakeRangeError(145);
}
var D=C*4;
if(D>%_TypedArrayMaxSizeInHeap()){
var v=new d(D);
%_TypedArrayInitialize(u,6,v,0,D,true);
}else{
%_TypedArrayInitialize(u,6,null,0,D,true);
}
}
function Int32ArrayConstructByArrayLike(u,E){
var x=E.length;
var C=$toPositiveInteger(x,145);
if(C>%_MaxSmi()){
throw MakeRangeError(145);
}
var F=false;
var D=C*4;
if(D<=%_TypedArrayMaxSizeInHeap()){
%_TypedArrayInitialize(u,6,null,0,D,false);
}else{
F=
%TypedArrayInitializeFromArrayLike(u,6,E,C);
}
if(!F){
for(var G=0;G<C;G++){
u[G]=E[G];
}
}
}
function Int32ArrayConstructByIterable(u,H,I){
var J=new t();
var K=%_Call(I,H);
var L={
__proto__:null
};
L[g]=function(){return K;}
for(var M of L){
J.push(M);
}
Int32ArrayConstructByArrayLike(u,J);
}
function Int32ArrayConstructor(N,O,P){
if(%_IsConstructCall()){
if((%_ClassOf(N)==='ArrayBuffer')||(%_ClassOf(N)==='SharedArrayBuffer')){
Int32ArrayConstructByArrayBuffer(this,N,O,P);
}else if((typeof(N)==='number')||(typeof(N)==='string')||
(typeof(N)==='boolean')||(N===(void 0))){
Int32ArrayConstructByLength(this,N);
}else{
var I=N[g];
if((I===(void 0))||I===$arrayValues){
Int32ArrayConstructByArrayLike(this,N);
}else{
Int32ArrayConstructByIterable(this,N,I);
}
}
}else{
throw MakeTypeError(21,"Int32Array")
}
}
function Int32Array_GetBuffer(){
if(!(%_ClassOf(this)==='Int32Array')){
throw MakeTypeError(36,"Int32Array.buffer",this);
}
return %TypedArrayGetBuffer(this);
}
function Int32Array_GetByteLength(){
if(!(%_ClassOf(this)==='Int32Array')){
throw MakeTypeError(36,"Int32Array.byteLength",this);
}
return %_ArrayBufferViewGetByteLength(this);
}
function Int32Array_GetByteOffset(){
if(!(%_ClassOf(this)==='Int32Array')){
throw MakeTypeError(36,"Int32Array.byteOffset",this);
}
return %_ArrayBufferViewGetByteOffset(this);
}
function Int32Array_GetLength(){
if(!(%_ClassOf(this)==='Int32Array')){
throw MakeTypeError(36,"Int32Array.length",this);
}
return %_TypedArrayGetLength(this);
}
function Int32ArraySubArray(Q,R){
if(!(%_ClassOf(this)==='Int32Array')){
throw MakeTypeError(36,"Int32Array.subarray",this);
}
var S=(%_ToInteger(Q));
if(!(R===(void 0))){
var T=(%_ToInteger(R));
var U=%_TypedArrayGetLength(this);
}else{
var U=%_TypedArrayGetLength(this);
var T=U;
}
if(S<0){
S=(0<U+S?U+S:0);
}else{
S=(S<U?S:U);
}
if(T<0){
T=(0<U+T?U+T:0);
}else{
T=(T<U?T:U);
}
if(T<S){
T=S;
}
var B=T-S;
var V=
%_ArrayBufferViewGetByteOffset(this)+S*4;
return new n(%TypedArrayGetBuffer(this),
V,B);
}

function Float32ArrayConstructByArrayBuffer(u,v,w,x){
if(!(w===(void 0))){
w=
$toPositiveInteger(w,145);
}
if(!(x===(void 0))){
x=$toPositiveInteger(x,145);
}
var y=%_ArrayBufferGetByteLength(v);
var z;
if((w===(void 0))){
z=0;
}else{
z=w;
if(z % 4!==0){
throw MakeRangeError(144,
"start offset","Float32Array",4);
}
if(z>y){
throw MakeRangeError(146);
}
}
var A;
var B;
if((x===(void 0))){
if(y % 4!==0){
throw MakeRangeError(144,
"byte length","Float32Array",4);
}
A=y-z;
B=A/4;
}else{
var B=x;
A=B*4;
}
if((z+A>y)
||(B>%_MaxSmi())){
throw MakeRangeError(145);
}
%_TypedArrayInitialize(u,7,v,z,A,true);
}
function Float32ArrayConstructByLength(u,x){
var C=(x===(void 0))?
0:$toPositiveInteger(x,145);
if(C>%_MaxSmi()){
throw MakeRangeError(145);
}
var D=C*4;
if(D>%_TypedArrayMaxSizeInHeap()){
var v=new d(D);
%_TypedArrayInitialize(u,7,v,0,D,true);
}else{
%_TypedArrayInitialize(u,7,null,0,D,true);
}
}
function Float32ArrayConstructByArrayLike(u,E){
var x=E.length;
var C=$toPositiveInteger(x,145);
if(C>%_MaxSmi()){
throw MakeRangeError(145);
}
var F=false;
var D=C*4;
if(D<=%_TypedArrayMaxSizeInHeap()){
%_TypedArrayInitialize(u,7,null,0,D,false);
}else{
F=
%TypedArrayInitializeFromArrayLike(u,7,E,C);
}
if(!F){
for(var G=0;G<C;G++){
u[G]=E[G];
}
}
}
function Float32ArrayConstructByIterable(u,H,I){
var J=new t();
var K=%_Call(I,H);
var L={
__proto__:null
};
L[g]=function(){return K;}
for(var M of L){
J.push(M);
}
Float32ArrayConstructByArrayLike(u,J);
}
function Float32ArrayConstructor(N,O,P){
if(%_IsConstructCall()){
if((%_ClassOf(N)==='ArrayBuffer')||(%_ClassOf(N)==='SharedArrayBuffer')){
Float32ArrayConstructByArrayBuffer(this,N,O,P);
}else if((typeof(N)==='number')||(typeof(N)==='string')||
(typeof(N)==='boolean')||(N===(void 0))){
Float32ArrayConstructByLength(this,N);
}else{
var I=N[g];
if((I===(void 0))||I===$arrayValues){
Float32ArrayConstructByArrayLike(this,N);
}else{
Float32ArrayConstructByIterable(this,N,I);
}
}
}else{
throw MakeTypeError(21,"Float32Array")
}
}
function Float32Array_GetBuffer(){
if(!(%_ClassOf(this)==='Float32Array')){
throw MakeTypeError(36,"Float32Array.buffer",this);
}
return %TypedArrayGetBuffer(this);
}
function Float32Array_GetByteLength(){
if(!(%_ClassOf(this)==='Float32Array')){
throw MakeTypeError(36,"Float32Array.byteLength",this);
}
return %_ArrayBufferViewGetByteLength(this);
}
function Float32Array_GetByteOffset(){
if(!(%_ClassOf(this)==='Float32Array')){
throw MakeTypeError(36,"Float32Array.byteOffset",this);
}
return %_ArrayBufferViewGetByteOffset(this);
}
function Float32Array_GetLength(){
if(!(%_ClassOf(this)==='Float32Array')){
throw MakeTypeError(36,"Float32Array.length",this);
}
return %_TypedArrayGetLength(this);
}
function Float32ArraySubArray(Q,R){
if(!(%_ClassOf(this)==='Float32Array')){
throw MakeTypeError(36,"Float32Array.subarray",this);
}
var S=(%_ToInteger(Q));
if(!(R===(void 0))){
var T=(%_ToInteger(R));
var U=%_TypedArrayGetLength(this);
}else{
var U=%_TypedArrayGetLength(this);
var T=U;
}
if(S<0){
S=(0<U+S?U+S:0);
}else{
S=(S<U?S:U);
}
if(T<0){
T=(0<U+T?U+T:0);
}else{
T=(T<U?T:U);
}
if(T<S){
T=S;
}
var B=T-S;
var V=
%_ArrayBufferViewGetByteOffset(this)+S*4;
return new o(%TypedArrayGetBuffer(this),
V,B);
}

function Float64ArrayConstructByArrayBuffer(u,v,w,x){
if(!(w===(void 0))){
w=
$toPositiveInteger(w,145);
}
if(!(x===(void 0))){
x=$toPositiveInteger(x,145);
}
var y=%_ArrayBufferGetByteLength(v);
var z;
if((w===(void 0))){
z=0;
}else{
z=w;
if(z % 8!==0){
throw MakeRangeError(144,
"start offset","Float64Array",8);
}
if(z>y){
throw MakeRangeError(146);
}
}
var A;
var B;
if((x===(void 0))){
if(y % 8!==0){
throw MakeRangeError(144,
"byte length","Float64Array",8);
}
A=y-z;
B=A/8;
}else{
var B=x;
A=B*8;
}
if((z+A>y)
||(B>%_MaxSmi())){
throw MakeRangeError(145);
}
%_TypedArrayInitialize(u,8,v,z,A,true);
}
function Float64ArrayConstructByLength(u,x){
var C=(x===(void 0))?
0:$toPositiveInteger(x,145);
if(C>%_MaxSmi()){
throw MakeRangeError(145);
}
var D=C*8;
if(D>%_TypedArrayMaxSizeInHeap()){
var v=new d(D);
%_TypedArrayInitialize(u,8,v,0,D,true);
}else{
%_TypedArrayInitialize(u,8,null,0,D,true);
}
}
function Float64ArrayConstructByArrayLike(u,E){
var x=E.length;
var C=$toPositiveInteger(x,145);
if(C>%_MaxSmi()){
throw MakeRangeError(145);
}
var F=false;
var D=C*8;
if(D<=%_TypedArrayMaxSizeInHeap()){
%_TypedArrayInitialize(u,8,null,0,D,false);
}else{
F=
%TypedArrayInitializeFromArrayLike(u,8,E,C);
}
if(!F){
for(var G=0;G<C;G++){
u[G]=E[G];
}
}
}
function Float64ArrayConstructByIterable(u,H,I){
var J=new t();
var K=%_Call(I,H);
var L={
__proto__:null
};
L[g]=function(){return K;}
for(var M of L){
J.push(M);
}
Float64ArrayConstructByArrayLike(u,J);
}
function Float64ArrayConstructor(N,O,P){
if(%_IsConstructCall()){
if((%_ClassOf(N)==='ArrayBuffer')||(%_ClassOf(N)==='SharedArrayBuffer')){
Float64ArrayConstructByArrayBuffer(this,N,O,P);
}else if((typeof(N)==='number')||(typeof(N)==='string')||
(typeof(N)==='boolean')||(N===(void 0))){
Float64ArrayConstructByLength(this,N);
}else{
var I=N[g];
if((I===(void 0))||I===$arrayValues){
Float64ArrayConstructByArrayLike(this,N);
}else{
Float64ArrayConstructByIterable(this,N,I);
}
}
}else{
throw MakeTypeError(21,"Float64Array")
}
}
function Float64Array_GetBuffer(){
if(!(%_ClassOf(this)==='Float64Array')){
throw MakeTypeError(36,"Float64Array.buffer",this);
}
return %TypedArrayGetBuffer(this);
}
function Float64Array_GetByteLength(){
if(!(%_ClassOf(this)==='Float64Array')){
throw MakeTypeError(36,"Float64Array.byteLength",this);
}
return %_ArrayBufferViewGetByteLength(this);
}
function Float64Array_GetByteOffset(){
if(!(%_ClassOf(this)==='Float64Array')){
throw MakeTypeError(36,"Float64Array.byteOffset",this);
}
return %_ArrayBufferViewGetByteOffset(this);
}
function Float64Array_GetLength(){
if(!(%_ClassOf(this)==='Float64Array')){
throw MakeTypeError(36,"Float64Array.length",this);
}
return %_TypedArrayGetLength(this);
}
function Float64ArraySubArray(Q,R){
if(!(%_ClassOf(this)==='Float64Array')){
throw MakeTypeError(36,"Float64Array.subarray",this);
}
var S=(%_ToInteger(Q));
if(!(R===(void 0))){
var T=(%_ToInteger(R));
var U=%_TypedArrayGetLength(this);
}else{
var U=%_TypedArrayGetLength(this);
var T=U;
}
if(S<0){
S=(0<U+S?U+S:0);
}else{
S=(S<U?S:U);
}
if(T<0){
T=(0<U+T?U+T:0);
}else{
T=(T<U?T:U);
}
if(T<S){
T=S;
}
var B=T-S;
var V=
%_ArrayBufferViewGetByteOffset(this)+S*8;
return new p(%TypedArrayGetBuffer(this),
V,B);
}

function Uint8ClampedArrayConstructByArrayBuffer(u,v,w,x){
if(!(w===(void 0))){
w=
$toPositiveInteger(w,145);
}
if(!(x===(void 0))){
x=$toPositiveInteger(x,145);
}
var y=%_ArrayBufferGetByteLength(v);
var z;
if((w===(void 0))){
z=0;
}else{
z=w;
if(z % 1!==0){
throw MakeRangeError(144,
"start offset","Uint8ClampedArray",1);
}
if(z>y){
throw MakeRangeError(146);
}
}
var A;
var B;
if((x===(void 0))){
if(y % 1!==0){
throw MakeRangeError(144,
"byte length","Uint8ClampedArray",1);
}
A=y-z;
B=A/1;
}else{
var B=x;
A=B*1;
}
if((z+A>y)
||(B>%_MaxSmi())){
throw MakeRangeError(145);
}
%_TypedArrayInitialize(u,9,v,z,A,true);
}
function Uint8ClampedArrayConstructByLength(u,x){
var C=(x===(void 0))?
0:$toPositiveInteger(x,145);
if(C>%_MaxSmi()){
throw MakeRangeError(145);
}
var D=C*1;
if(D>%_TypedArrayMaxSizeInHeap()){
var v=new d(D);
%_TypedArrayInitialize(u,9,v,0,D,true);
}else{
%_TypedArrayInitialize(u,9,null,0,D,true);
}
}
function Uint8ClampedArrayConstructByArrayLike(u,E){
var x=E.length;
var C=$toPositiveInteger(x,145);
if(C>%_MaxSmi()){
throw MakeRangeError(145);
}
var F=false;
var D=C*1;
if(D<=%_TypedArrayMaxSizeInHeap()){
%_TypedArrayInitialize(u,9,null,0,D,false);
}else{
F=
%TypedArrayInitializeFromArrayLike(u,9,E,C);
}
if(!F){
for(var G=0;G<C;G++){
u[G]=E[G];
}
}
}
function Uint8ClampedArrayConstructByIterable(u,H,I){
var J=new t();
var K=%_Call(I,H);
var L={
__proto__:null
};
L[g]=function(){return K;}
for(var M of L){
J.push(M);
}
Uint8ClampedArrayConstructByArrayLike(u,J);
}
function Uint8ClampedArrayConstructor(N,O,P){
if(%_IsConstructCall()){
if((%_ClassOf(N)==='ArrayBuffer')||(%_ClassOf(N)==='SharedArrayBuffer')){
Uint8ClampedArrayConstructByArrayBuffer(this,N,O,P);
}else if((typeof(N)==='number')||(typeof(N)==='string')||
(typeof(N)==='boolean')||(N===(void 0))){
Uint8ClampedArrayConstructByLength(this,N);
}else{
var I=N[g];
if((I===(void 0))||I===$arrayValues){
Uint8ClampedArrayConstructByArrayLike(this,N);
}else{
Uint8ClampedArrayConstructByIterable(this,N,I);
}
}
}else{
throw MakeTypeError(21,"Uint8ClampedArray")
}
}
function Uint8ClampedArray_GetBuffer(){
if(!(%_ClassOf(this)==='Uint8ClampedArray')){
throw MakeTypeError(36,"Uint8ClampedArray.buffer",this);
}
return %TypedArrayGetBuffer(this);
}
function Uint8ClampedArray_GetByteLength(){
if(!(%_ClassOf(this)==='Uint8ClampedArray')){
throw MakeTypeError(36,"Uint8ClampedArray.byteLength",this);
}
return %_ArrayBufferViewGetByteLength(this);
}
function Uint8ClampedArray_GetByteOffset(){
if(!(%_ClassOf(this)==='Uint8ClampedArray')){
throw MakeTypeError(36,"Uint8ClampedArray.byteOffset",this);
}
return %_ArrayBufferViewGetByteOffset(this);
}
function Uint8ClampedArray_GetLength(){
if(!(%_ClassOf(this)==='Uint8ClampedArray')){
throw MakeTypeError(36,"Uint8ClampedArray.length",this);
}
return %_TypedArrayGetLength(this);
}
function Uint8ClampedArraySubArray(Q,R){
if(!(%_ClassOf(this)==='Uint8ClampedArray')){
throw MakeTypeError(36,"Uint8ClampedArray.subarray",this);
}
var S=(%_ToInteger(Q));
if(!(R===(void 0))){
var T=(%_ToInteger(R));
var U=%_TypedArrayGetLength(this);
}else{
var U=%_TypedArrayGetLength(this);
var T=U;
}
if(S<0){
S=(0<U+S?U+S:0);
}else{
S=(S<U?S:U);
}
if(T<0){
T=(0<U+T?U+T:0);
}else{
T=(T<U?T:U);
}
if(T<S){
T=S;
}
var B=T-S;
var V=
%_ArrayBufferViewGetByteOffset(this)+S*1;
return new q(%TypedArrayGetBuffer(this),
V,B);
}


function TypedArraySetFromArrayLike(W,X,Y,z){
if(z>0){
for(var G=0;G<Y;G++){
W[z+G]=X[G];
}
}
else{
for(var G=0;G<Y;G++){
W[G]=X[G];
}
}
}
function TypedArraySetFromOverlappingTypedArray(W,X,z){
var Z=X.BYTES_PER_ELEMENT;
var aa=W.BYTES_PER_ELEMENT;
var Y=X.length;
function CopyLeftPart(){
var ab=W.byteOffset+(z+1)*aa;
var ac=X.byteOffset;
for(var ad=0;
ad<Y&&ab<=ac;
ad++){
W[z+ad]=X[ad];
ab+=aa;
ac+=Z;
}
return ad;
}
var ad=CopyLeftPart();
function CopyRightPart(){
var ab=
W.byteOffset+(z+Y-1)*aa;
var ac=
X.byteOffset+Y*Z;
for(var ae=Y-1;
ae>=ad&&ab>=ac;
ae--){
W[z+ae]=X[ae];
ab-=aa;
ac-=Z;
}
return ae;
}
var ae=CopyRightPart();
var af=new c(ae+1-ad);
for(var G=ad;G<=ae;G++){
af[G-ad]=X[G];
}
for(G=ad;G<=ae;G++){
W[z+G]=af[G-ad];
}
}
function TypedArraySet(u,z){
var ag=(z===(void 0))?0:(%_ToInteger(z));
if(ag<0)throw MakeTypeError(154);
if(ag>%_MaxSmi()){
throw MakeRangeError(155);
}
switch(%TypedArraySetFastCases(this,u,ag)){
case 0:
return;
case 1:
TypedArraySetFromOverlappingTypedArray(this,u,ag);
return;
case 2:
TypedArraySetFromArrayLike(this,u,u.length,ag);
return;
case 3:
var C=u.length;
if((C===(void 0))){
if((typeof(u)==='number')){
throw MakeTypeError(39);
}
return;
}
C=(%ToLength(C));
if(ag+C>this.length){
throw MakeRangeError(155);
}
TypedArraySetFromArrayLike(this,u,C,ag);
return;
}
}
function TypedArrayGetToStringTag(){
if(!%_IsTypedArray(this))return;
var ah=%_ClassOf(this);
if((ah===(void 0)))return;
return ah;
}
%SetCode(i,Uint8ArrayConstructor);
%FunctionSetPrototype(i,new f());
%AddNamedProperty(i,"BYTES_PER_ELEMENT",1,
1|2|4);
%AddNamedProperty(i.prototype,
"constructor",a.Uint8Array,2);
%AddNamedProperty(i.prototype,
"BYTES_PER_ELEMENT",1,
1|2|4);
b.InstallGetter(i.prototype,"buffer",Uint8Array_GetBuffer);
b.InstallGetter(i.prototype,"byteOffset",Uint8Array_GetByteOffset,
2|4);
b.InstallGetter(i.prototype,"byteLength",Uint8Array_GetByteLength,
2|4);
b.InstallGetter(i.prototype,"length",Uint8Array_GetLength,
2|4);
b.InstallGetter(i.prototype,h,
TypedArrayGetToStringTag);
b.InstallFunctions(i.prototype,2,[
"subarray",Uint8ArraySubArray,
"set",TypedArraySet
]);

%SetCode(j,Int8ArrayConstructor);
%FunctionSetPrototype(j,new f());
%AddNamedProperty(j,"BYTES_PER_ELEMENT",1,
1|2|4);
%AddNamedProperty(j.prototype,
"constructor",a.Int8Array,2);
%AddNamedProperty(j.prototype,
"BYTES_PER_ELEMENT",1,
1|2|4);
b.InstallGetter(j.prototype,"buffer",Int8Array_GetBuffer);
b.InstallGetter(j.prototype,"byteOffset",Int8Array_GetByteOffset,
2|4);
b.InstallGetter(j.prototype,"byteLength",Int8Array_GetByteLength,
2|4);
b.InstallGetter(j.prototype,"length",Int8Array_GetLength,
2|4);
b.InstallGetter(j.prototype,h,
TypedArrayGetToStringTag);
b.InstallFunctions(j.prototype,2,[
"subarray",Int8ArraySubArray,
"set",TypedArraySet
]);

%SetCode(k,Uint16ArrayConstructor);
%FunctionSetPrototype(k,new f());
%AddNamedProperty(k,"BYTES_PER_ELEMENT",2,
1|2|4);
%AddNamedProperty(k.prototype,
"constructor",a.Uint16Array,2);
%AddNamedProperty(k.prototype,
"BYTES_PER_ELEMENT",2,
1|2|4);
b.InstallGetter(k.prototype,"buffer",Uint16Array_GetBuffer);
b.InstallGetter(k.prototype,"byteOffset",Uint16Array_GetByteOffset,
2|4);
b.InstallGetter(k.prototype,"byteLength",Uint16Array_GetByteLength,
2|4);
b.InstallGetter(k.prototype,"length",Uint16Array_GetLength,
2|4);
b.InstallGetter(k.prototype,h,
TypedArrayGetToStringTag);
b.InstallFunctions(k.prototype,2,[
"subarray",Uint16ArraySubArray,
"set",TypedArraySet
]);

%SetCode(l,Int16ArrayConstructor);
%FunctionSetPrototype(l,new f());
%AddNamedProperty(l,"BYTES_PER_ELEMENT",2,
1|2|4);
%AddNamedProperty(l.prototype,
"constructor",a.Int16Array,2);
%AddNamedProperty(l.prototype,
"BYTES_PER_ELEMENT",2,
1|2|4);
b.InstallGetter(l.prototype,"buffer",Int16Array_GetBuffer);
b.InstallGetter(l.prototype,"byteOffset",Int16Array_GetByteOffset,
2|4);
b.InstallGetter(l.prototype,"byteLength",Int16Array_GetByteLength,
2|4);
b.InstallGetter(l.prototype,"length",Int16Array_GetLength,
2|4);
b.InstallGetter(l.prototype,h,
TypedArrayGetToStringTag);
b.InstallFunctions(l.prototype,2,[
"subarray",Int16ArraySubArray,
"set",TypedArraySet
]);

%SetCode(m,Uint32ArrayConstructor);
%FunctionSetPrototype(m,new f());
%AddNamedProperty(m,"BYTES_PER_ELEMENT",4,
1|2|4);
%AddNamedProperty(m.prototype,
"constructor",a.Uint32Array,2);
%AddNamedProperty(m.prototype,
"BYTES_PER_ELEMENT",4,
1|2|4);
b.InstallGetter(m.prototype,"buffer",Uint32Array_GetBuffer);
b.InstallGetter(m.prototype,"byteOffset",Uint32Array_GetByteOffset,
2|4);
b.InstallGetter(m.prototype,"byteLength",Uint32Array_GetByteLength,
2|4);
b.InstallGetter(m.prototype,"length",Uint32Array_GetLength,
2|4);
b.InstallGetter(m.prototype,h,
TypedArrayGetToStringTag);
b.InstallFunctions(m.prototype,2,[
"subarray",Uint32ArraySubArray,
"set",TypedArraySet
]);

%SetCode(n,Int32ArrayConstructor);
%FunctionSetPrototype(n,new f());
%AddNamedProperty(n,"BYTES_PER_ELEMENT",4,
1|2|4);
%AddNamedProperty(n.prototype,
"constructor",a.Int32Array,2);
%AddNamedProperty(n.prototype,
"BYTES_PER_ELEMENT",4,
1|2|4);
b.InstallGetter(n.prototype,"buffer",Int32Array_GetBuffer);
b.InstallGetter(n.prototype,"byteOffset",Int32Array_GetByteOffset,
2|4);
b.InstallGetter(n.prototype,"byteLength",Int32Array_GetByteLength,
2|4);
b.InstallGetter(n.prototype,"length",Int32Array_GetLength,
2|4);
b.InstallGetter(n.prototype,h,
TypedArrayGetToStringTag);
b.InstallFunctions(n.prototype,2,[
"subarray",Int32ArraySubArray,
"set",TypedArraySet
]);

%SetCode(o,Float32ArrayConstructor);
%FunctionSetPrototype(o,new f());
%AddNamedProperty(o,"BYTES_PER_ELEMENT",4,
1|2|4);
%AddNamedProperty(o.prototype,
"constructor",a.Float32Array,2);
%AddNamedProperty(o.prototype,
"BYTES_PER_ELEMENT",4,
1|2|4);
b.InstallGetter(o.prototype,"buffer",Float32Array_GetBuffer);
b.InstallGetter(o.prototype,"byteOffset",Float32Array_GetByteOffset,
2|4);
b.InstallGetter(o.prototype,"byteLength",Float32Array_GetByteLength,
2|4);
b.InstallGetter(o.prototype,"length",Float32Array_GetLength,
2|4);
b.InstallGetter(o.prototype,h,
TypedArrayGetToStringTag);
b.InstallFunctions(o.prototype,2,[
"subarray",Float32ArraySubArray,
"set",TypedArraySet
]);

%SetCode(p,Float64ArrayConstructor);
%FunctionSetPrototype(p,new f());
%AddNamedProperty(p,"BYTES_PER_ELEMENT",8,
1|2|4);
%AddNamedProperty(p.prototype,
"constructor",a.Float64Array,2);
%AddNamedProperty(p.prototype,
"BYTES_PER_ELEMENT",8,
1|2|4);
b.InstallGetter(p.prototype,"buffer",Float64Array_GetBuffer);
b.InstallGetter(p.prototype,"byteOffset",Float64Array_GetByteOffset,
2|4);
b.InstallGetter(p.prototype,"byteLength",Float64Array_GetByteLength,
2|4);
b.InstallGetter(p.prototype,"length",Float64Array_GetLength,
2|4);
b.InstallGetter(p.prototype,h,
TypedArrayGetToStringTag);
b.InstallFunctions(p.prototype,2,[
"subarray",Float64ArraySubArray,
"set",TypedArraySet
]);

%SetCode(q,Uint8ClampedArrayConstructor);
%FunctionSetPrototype(q,new f());
%AddNamedProperty(q,"BYTES_PER_ELEMENT",1,
1|2|4);
%AddNamedProperty(q.prototype,
"constructor",a.Uint8ClampedArray,2);
%AddNamedProperty(q.prototype,
"BYTES_PER_ELEMENT",1,
1|2|4);
b.InstallGetter(q.prototype,"buffer",Uint8ClampedArray_GetBuffer);
b.InstallGetter(q.prototype,"byteOffset",Uint8ClampedArray_GetByteOffset,
2|4);
b.InstallGetter(q.prototype,"byteLength",Uint8ClampedArray_GetByteLength,
2|4);
b.InstallGetter(q.prototype,"length",Uint8ClampedArray_GetLength,
2|4);
b.InstallGetter(q.prototype,h,
TypedArrayGetToStringTag);
b.InstallFunctions(q.prototype,2,[
"subarray",Uint8ClampedArraySubArray,
"set",TypedArraySet
]);


function DataViewConstructor(v,w,D){
if(%_IsConstructCall()){
if(!(%_ClassOf(v)==='ArrayBuffer'))throw MakeTypeError(23);
if(!(w===(void 0))){
w=$toPositiveInteger(w,137);
}
if(!(D===(void 0))){
D=(%_ToInteger(D));
}
var y=%_ArrayBufferGetByteLength(v);
var z=(w===(void 0))?0:w;
if(z>y)throw MakeRangeError(137);
var x=(D===(void 0))
?y-z
:D;
if(x<0||z+x>y){
throw new MakeRangeError(136);
}
%_DataViewInitialize(this,v,z,x);
}else{
throw MakeTypeError(21,"DataView");
}
}
function DataViewGetBufferJS(){
if(!(%_ClassOf(this)==='DataView')){
throw MakeTypeError(36,'DataView.buffer',this);
}
return %DataViewGetBuffer(this);
}
function DataViewGetByteOffset(){
if(!(%_ClassOf(this)==='DataView')){
throw MakeTypeError(36,
'DataView.byteOffset',this);
}
return %_ArrayBufferViewGetByteOffset(this);
}
function DataViewGetByteLength(){
if(!(%_ClassOf(this)==='DataView')){
throw MakeTypeError(36,
'DataView.byteLength',this);
}
return %_ArrayBufferViewGetByteLength(this);
}
function DataViewGetInt8JS(z,ai){
if(!(%_ClassOf(this)==='DataView')){
throw MakeTypeError(36,
'DataView.getInt8',this);
}
if(%_ArgumentsLength()<1)throw MakeTypeError(39);
z=$toPositiveInteger(z,135);
return %DataViewGetInt8(this,z,!!ai);
}
function DataViewSetInt8JS(z,M,ai){
if(!(%_ClassOf(this)==='DataView')){
throw MakeTypeError(36,
'DataView.setInt8',this);
}
if(%_ArgumentsLength()<2)throw MakeTypeError(39);
z=$toPositiveInteger(z,135);
%DataViewSetInt8(this,z,((typeof(%IS_VAR(M))==='number')?M:$nonNumberToNumber(M)),!!ai);
}

function DataViewGetUint8JS(z,ai){
if(!(%_ClassOf(this)==='DataView')){
throw MakeTypeError(36,
'DataView.getUint8',this);
}
if(%_ArgumentsLength()<1)throw MakeTypeError(39);
z=$toPositiveInteger(z,135);
return %DataViewGetUint8(this,z,!!ai);
}
function DataViewSetUint8JS(z,M,ai){
if(!(%_ClassOf(this)==='DataView')){
throw MakeTypeError(36,
'DataView.setUint8',this);
}
if(%_ArgumentsLength()<2)throw MakeTypeError(39);
z=$toPositiveInteger(z,135);
%DataViewSetUint8(this,z,((typeof(%IS_VAR(M))==='number')?M:$nonNumberToNumber(M)),!!ai);
}

function DataViewGetInt16JS(z,ai){
if(!(%_ClassOf(this)==='DataView')){
throw MakeTypeError(36,
'DataView.getInt16',this);
}
if(%_ArgumentsLength()<1)throw MakeTypeError(39);
z=$toPositiveInteger(z,135);
return %DataViewGetInt16(this,z,!!ai);
}
function DataViewSetInt16JS(z,M,ai){
if(!(%_ClassOf(this)==='DataView')){
throw MakeTypeError(36,
'DataView.setInt16',this);
}
if(%_ArgumentsLength()<2)throw MakeTypeError(39);
z=$toPositiveInteger(z,135);
%DataViewSetInt16(this,z,((typeof(%IS_VAR(M))==='number')?M:$nonNumberToNumber(M)),!!ai);
}

function DataViewGetUint16JS(z,ai){
if(!(%_ClassOf(this)==='DataView')){
throw MakeTypeError(36,
'DataView.getUint16',this);
}
if(%_ArgumentsLength()<1)throw MakeTypeError(39);
z=$toPositiveInteger(z,135);
return %DataViewGetUint16(this,z,!!ai);
}
function DataViewSetUint16JS(z,M,ai){
if(!(%_ClassOf(this)==='DataView')){
throw MakeTypeError(36,
'DataView.setUint16',this);
}
if(%_ArgumentsLength()<2)throw MakeTypeError(39);
z=$toPositiveInteger(z,135);
%DataViewSetUint16(this,z,((typeof(%IS_VAR(M))==='number')?M:$nonNumberToNumber(M)),!!ai);
}

function DataViewGetInt32JS(z,ai){
if(!(%_ClassOf(this)==='DataView')){
throw MakeTypeError(36,
'DataView.getInt32',this);
}
if(%_ArgumentsLength()<1)throw MakeTypeError(39);
z=$toPositiveInteger(z,135);
return %DataViewGetInt32(this,z,!!ai);
}
function DataViewSetInt32JS(z,M,ai){
if(!(%_ClassOf(this)==='DataView')){
throw MakeTypeError(36,
'DataView.setInt32',this);
}
if(%_ArgumentsLength()<2)throw MakeTypeError(39);
z=$toPositiveInteger(z,135);
%DataViewSetInt32(this,z,((typeof(%IS_VAR(M))==='number')?M:$nonNumberToNumber(M)),!!ai);
}

function DataViewGetUint32JS(z,ai){
if(!(%_ClassOf(this)==='DataView')){
throw MakeTypeError(36,
'DataView.getUint32',this);
}
if(%_ArgumentsLength()<1)throw MakeTypeError(39);
z=$toPositiveInteger(z,135);
return %DataViewGetUint32(this,z,!!ai);
}
function DataViewSetUint32JS(z,M,ai){
if(!(%_ClassOf(this)==='DataView')){
throw MakeTypeError(36,
'DataView.setUint32',this);
}
if(%_ArgumentsLength()<2)throw MakeTypeError(39);
z=$toPositiveInteger(z,135);
%DataViewSetUint32(this,z,((typeof(%IS_VAR(M))==='number')?M:$nonNumberToNumber(M)),!!ai);
}

function DataViewGetFloat32JS(z,ai){
if(!(%_ClassOf(this)==='DataView')){
throw MakeTypeError(36,
'DataView.getFloat32',this);
}
if(%_ArgumentsLength()<1)throw MakeTypeError(39);
z=$toPositiveInteger(z,135);
return %DataViewGetFloat32(this,z,!!ai);
}
function DataViewSetFloat32JS(z,M,ai){
if(!(%_ClassOf(this)==='DataView')){
throw MakeTypeError(36,
'DataView.setFloat32',this);
}
if(%_ArgumentsLength()<2)throw MakeTypeError(39);
z=$toPositiveInteger(z,135);
%DataViewSetFloat32(this,z,((typeof(%IS_VAR(M))==='number')?M:$nonNumberToNumber(M)),!!ai);
}

function DataViewGetFloat64JS(z,ai){
if(!(%_ClassOf(this)==='DataView')){
throw MakeTypeError(36,
'DataView.getFloat64',this);
}
if(%_ArgumentsLength()<1)throw MakeTypeError(39);
z=$toPositiveInteger(z,135);
return %DataViewGetFloat64(this,z,!!ai);
}
function DataViewSetFloat64JS(z,M,ai){
if(!(%_ClassOf(this)==='DataView')){
throw MakeTypeError(36,
'DataView.setFloat64',this);
}
if(%_ArgumentsLength()<2)throw MakeTypeError(39);
z=$toPositiveInteger(z,135);
%DataViewSetFloat64(this,z,((typeof(%IS_VAR(M))==='number')?M:$nonNumberToNumber(M)),!!ai);
}


%SetCode(e,DataViewConstructor);
%FunctionSetPrototype(e,new f);
%AddNamedProperty(e.prototype,"constructor",e,
2);
%AddNamedProperty(e.prototype,h,"DataView",
1|2);
b.InstallGetter(e.prototype,"buffer",DataViewGetBufferJS);
b.InstallGetter(e.prototype,"byteOffset",
DataViewGetByteOffset);
b.InstallGetter(e.prototype,"byteLength",
DataViewGetByteLength);
b.InstallFunctions(e.prototype,2,[
"getInt8",DataViewGetInt8JS,
"setInt8",DataViewSetInt8JS,
"getUint8",DataViewGetUint8JS,
"setUint8",DataViewSetUint8JS,
"getInt16",DataViewGetInt16JS,
"setInt16",DataViewSetInt16JS,
"getUint16",DataViewGetUint16JS,
"setUint16",DataViewSetUint16JS,
"getInt32",DataViewGetInt32JS,
"setInt32",DataViewSetInt32JS,
"getUint32",DataViewGetUint32JS,
"setUint32",DataViewSetUint32JS,
"getFloat32",DataViewGetFloat32JS,
"setFloat32",DataViewSetFloat32JS,
"getFloat64",DataViewGetFloat64JS,
"setFloat64",DataViewSetFloat64JS
]);
})

Hiterator-prototypeÕ
var $iteratorPrototype;
(function(a,b){
"use strict";
%CheckIsBootstrapping();
var c=a.Object;
var d=b.ImportNow("iterator_symbol");
function IteratorPrototypeIterator(){
return this;
}
b.SetFunctionName(IteratorPrototypeIterator,d);
%AddNamedProperty($iteratorPrototype,d,
IteratorPrototypeIterator,2);
})

$generator

(function(a,b){
"use strict";
%CheckIsBootstrapping();
var c=a.Function;
var d;
var e=b.ImportNow("to_string_tag_symbol");
b.Import(function(f){
d=f.NewFunctionString;
});
function GeneratorObjectNext(g){
if(!(%_ClassOf(this)==='Generator')){
throw MakeTypeError(36,
'[Generator].prototype.next',this);
}
var h=%GeneratorGetContinuation(this);
if(h>0){
if((%_DebugIsActive()!=0))%DebugPrepareStepInIfStepping(this);
try{
return %_GeneratorNext(this,g);
}catch(e){
%GeneratorClose(this);
throw e;
}
}else if(h==0){
return{value:void 0,done:true};
}else{
throw MakeTypeError(34);
}
}
function GeneratorObjectThrow(i){
if(!(%_ClassOf(this)==='Generator')){
throw MakeTypeError(36,
'[Generator].prototype.throw',this);
}
var h=%GeneratorGetContinuation(this);
if(h>0){
try{
return %_GeneratorThrow(this,i);
}catch(e){
%GeneratorClose(this);
throw e;
}
}else if(h==0){
throw i;
}else{
throw MakeTypeError(34);
}
}
function GeneratorFunctionConstructor(j){
var k=d(arguments,'function*');
var l=%GlobalProxy(GeneratorFunctionConstructor);
var m=%_CallFunction(l,%CompileString(k,true));
%FunctionMarkNameShouldPrintAsAnonymous(m);
return m;
}
%NeverOptimizeFunction(GeneratorObjectNext);
%NeverOptimizeFunction(GeneratorObjectThrow);
var n=GeneratorFunctionPrototype.prototype;
b.InstallFunctions(n,
2,
["next",GeneratorObjectNext,
"throw",GeneratorObjectThrow]);
%AddNamedProperty(n,"constructor",
GeneratorFunctionPrototype,2|1);
%AddNamedProperty(n,
e,"Generator",2|1);
%InternalSetPrototype(GeneratorFunctionPrototype,c.prototype);
%AddNamedProperty(GeneratorFunctionPrototype,
e,"GeneratorFunction",2|1);
%AddNamedProperty(GeneratorFunctionPrototype,"constructor",
GeneratorFunction,2|1);
%InternalSetPrototype(GeneratorFunction,c);
%SetCode(GeneratorFunction,GeneratorFunctionConstructor);
})

8object-observe³
var $observeEnqueueSpliceRecord;
var $observeBeginPerformSplice;
var $observeEndPerformSplice;
var $observeObjectMethods;
var $observeArrayMethods;
(function(a,b){
"use strict";
%CheckIsBootstrapping();
var c=a.Array;
var d=a.Object;
var e=b.InternalArray;
var f;
var g;
b.Import(function(h){
f=h.ObjectFreeze;
g=h.ObjectIsFrozen;
});
var i;
var j={};
function GetObservationStateJS(){
if((i===(void 0))){
i=%GetObservationState();
}
if((i.callbackInfoMap===(void 0))){
i.callbackInfoMap=%ObservationWeakMapCreate();
i.objectInfoMap=%ObservationWeakMapCreate();
i.notifierObjectInfoMap=%ObservationWeakMapCreate();
i.pendingObservers=null;
i.nextCallbackPriority=0;
i.lastMicrotaskId=0;
}
return i;
}
function GetPendingObservers(){
return GetObservationStateJS().pendingObservers;
}
function SetPendingObservers(k){
GetObservationStateJS().pendingObservers=k;
}
function GetNextCallbackPriority(){
return GetObservationStateJS().nextCallbackPriority++;
}
function nullProtoObject(){
return{__proto__:null};
}
function TypeMapCreate(){
return nullProtoObject();
}
function TypeMapAddType(l,m,n){
l[m]=n?1:(l[m]||0)+1;
}
function TypeMapRemoveType(l,m){
l[m]--;
}
function TypeMapCreateFromList(o,p){
var l=TypeMapCreate();
for(var q=0;q<p;q++){
TypeMapAddType(l,o[q],true);
}
return l;
}
function TypeMapHasType(l,m){
return!!l[m];
}
function TypeMapIsDisjointFrom(r,s){
if(!r||!s)
return true;
for(var m in r){
if(TypeMapHasType(r,m)&&TypeMapHasType(s,m))
return false;
}
return true;
}
var t=(function(){
var u=[
'add',
'update',
'delete',
'setPrototype',
'reconfigure',
'preventExtensions'
];
return TypeMapCreateFromList(u,u.length);
})();
function ObserverCreate(v,w){
if((w===(void 0)))
return v;
var x=nullProtoObject();
x.callback=v;
x.accept=w;
return x;
}
function ObserverGetCallback(x){
return(typeof(x)==='function')?x:x.callback;
}
function ObserverGetAcceptTypes(x){
return(typeof(x)==='function')?t:x.accept;
}
function ObserverIsActive(x,y){
return TypeMapIsDisjointFrom(ObjectInfoGetPerformingTypes(y),
ObserverGetAcceptTypes(x));
}
function ObjectInfoGetOrCreate(z){
var y=ObjectInfoGet(z);
if((y===(void 0))){
if(!%_IsJSProxy(z)){
%SetIsObserved(z);
}
y={
object:z,
changeObservers:null,
notifier:null,
performing:null,
performingCount:0,
};
%WeakCollectionSet(GetObservationStateJS().objectInfoMap,
z,y,$getHash(z));
}
return y;
}
function ObjectInfoGet(z){
return %WeakCollectionGet(GetObservationStateJS().objectInfoMap,z,
$getHash(z));
}
function ObjectInfoGetFromNotifier(A){
return %WeakCollectionGet(GetObservationStateJS().notifierObjectInfoMap,
A,$getHash(A));
}
function ObjectInfoGetNotifier(y){
if((y.notifier===null)){
var A={__proto__:j};
y.notifier=A;
%WeakCollectionSet(GetObservationStateJS().notifierObjectInfoMap,
A,y,$getHash(A));
}
return y.notifier;
}
function ChangeObserversIsOptimized(B){
return(typeof(B)==='function')||
(typeof(B.callback)==='function');
}
function ObjectInfoNormalizeChangeObservers(y){
if(ChangeObserversIsOptimized(y.changeObservers)){
var x=y.changeObservers;
var v=ObserverGetCallback(x);
var C=CallbackInfoGet(v);
var D=CallbackInfoGetPriority(C);
y.changeObservers=nullProtoObject();
y.changeObservers[D]=x;
}
}
function ObjectInfoAddObserver(y,v,w){
var C=CallbackInfoGetOrCreate(v);
var x=ObserverCreate(v,w);
if(!y.changeObservers){
y.changeObservers=x;
return;
}
ObjectInfoNormalizeChangeObservers(y);
var D=CallbackInfoGetPriority(C);
y.changeObservers[D]=x;
}
function ObjectInfoRemoveObserver(y,v){
if(!y.changeObservers)
return;
if(ChangeObserversIsOptimized(y.changeObservers)){
if(v===ObserverGetCallback(y.changeObservers))
y.changeObservers=null;
return;
}
var C=CallbackInfoGet(v);
var D=CallbackInfoGetPriority(C);
y.changeObservers[D]=null;
}
function ObjectInfoHasActiveObservers(y){
if((y===(void 0))||!y.changeObservers)
return false;
if(ChangeObserversIsOptimized(y.changeObservers))
return ObserverIsActive(y.changeObservers,y);
for(var D in y.changeObservers){
var x=y.changeObservers[D];
if(!(x===null)&&ObserverIsActive(x,y))
return true;
}
return false;
}
function ObjectInfoAddPerformingType(y,m){
y.performing=y.performing||TypeMapCreate();
TypeMapAddType(y.performing,m);
y.performingCount++;
}
function ObjectInfoRemovePerformingType(y,m){
y.performingCount--;
TypeMapRemoveType(y.performing,m);
}
function ObjectInfoGetPerformingTypes(y){
return y.performingCount>0?y.performing:null;
}
function ConvertAcceptListToTypeMap(E){
if((E===(void 0)))
return E;
if(!(%_IsSpecObject(E)))throw MakeTypeError(72);
var F=(%_ToInteger(E.length));
if(F<0)F=0;
return TypeMapCreateFromList(E,F);
}
function CallbackInfoGet(v){
return %WeakCollectionGet(GetObservationStateJS().callbackInfoMap,v,
$getHash(v));
}
function CallbackInfoSet(v,C){
%WeakCollectionSet(GetObservationStateJS().callbackInfoMap,
v,C,$getHash(v));
}
function CallbackInfoGetOrCreate(v){
var C=CallbackInfoGet(v);
if(!(C===(void 0)))
return C;
var D=GetNextCallbackPriority();
CallbackInfoSet(v,D);
return D;
}
function CallbackInfoGetPriority(C){
if((typeof(C)==='number'))
return C;
else
return C.priority;
}
function CallbackInfoNormalize(v){
var C=CallbackInfoGet(v);
if((typeof(C)==='number')){
var D=C;
C=new e;
C.priority=D;
CallbackInfoSet(v,C);
}
return C;
}
function ObjectObserve(z,v,w){
if(!(%_IsSpecObject(z)))
throw MakeTypeError(74,"observe","observe");
if(%IsJSGlobalProxy(z))
throw MakeTypeError(70,"observe");
if(%IsAccessCheckNeeded(z))
throw MakeTypeError(71,"observe");
if(!(typeof(v)==='function'))
throw MakeTypeError(73,"observe");
if(g(v))
throw MakeTypeError(69);
var G=%GetObjectContextObjectObserve(z);
return G(z,v,w);
}
function NativeObjectObserve(z,v,w){
var y=ObjectInfoGetOrCreate(z);
var o=ConvertAcceptListToTypeMap(w);
ObjectInfoAddObserver(y,v,o);
return z;
}
function ObjectUnobserve(z,v){
if(!(%_IsSpecObject(z)))
throw MakeTypeError(74,"unobserve","unobserve");
if(%IsJSGlobalProxy(z))
throw MakeTypeError(70,"unobserve");
if(!(typeof(v)==='function'))
throw MakeTypeError(73,"unobserve");
var y=ObjectInfoGet(z);
if((y===(void 0)))
return z;
ObjectInfoRemoveObserver(y,v);
return z;
}
function ArrayObserve(z,v){
return ObjectObserve(z,v,['add',
'update',
'delete',
'splice']);
}
function ArrayUnobserve(z,v){
return ObjectUnobserve(z,v);
}
function ObserverEnqueueIfActive(x,y,H){
if(!ObserverIsActive(x,y)||
!TypeMapHasType(ObserverGetAcceptTypes(x),H.type)){
return;
}
var v=ObserverGetCallback(x);
if(!%ObserverObjectAndRecordHaveSameOrigin(v,H.object,
H)){
return;
}
var C=CallbackInfoNormalize(v);
if((GetPendingObservers()===null)){
SetPendingObservers(nullProtoObject());
if((%_DebugIsActive()!=0)){
var I=++GetObservationStateJS().lastMicrotaskId;
var J="Object.observe";
%EnqueueMicrotask(function(){
%DebugAsyncTaskEvent({type:"willHandle",id:I,name:J});
ObserveMicrotaskRunner();
%DebugAsyncTaskEvent({type:"didHandle",id:I,name:J});
});
%DebugAsyncTaskEvent({type:"enqueue",id:I,name:J});
}else{
%EnqueueMicrotask(ObserveMicrotaskRunner);
}
}
GetPendingObservers()[C.priority]=v;
C.push(H);
}
function ObjectInfoEnqueueExternalChangeRecord(y,H,m){
if(!ObjectInfoHasActiveObservers(y))
return;
var K=!(m===(void 0));
var L=K?
{object:y.object,type:m}:
{object:y.object};
for(var M in H){
if(M==='object'||(K&&M==='type'))continue;
%DefineDataPropertyUnchecked(
L,M,H[M],1+4);
}
f(L);
ObjectInfoEnqueueInternalChangeRecord(y,L);
}
function ObjectInfoEnqueueInternalChangeRecord(y,H){
if((typeof(H.name)==='symbol'))return;
if(ChangeObserversIsOptimized(y.changeObservers)){
var x=y.changeObservers;
ObserverEnqueueIfActive(x,y,H);
return;
}
for(var D in y.changeObservers){
var x=y.changeObservers[D];
if((x===null))
continue;
ObserverEnqueueIfActive(x,y,H);
}
}
function BeginPerformSplice(N){
var y=ObjectInfoGet(N);
if(!(y===(void 0)))
ObjectInfoAddPerformingType(y,'splice');
}
function EndPerformSplice(N){
var y=ObjectInfoGet(N);
if(!(y===(void 0)))
ObjectInfoRemovePerformingType(y,'splice');
}
function EnqueueSpliceRecord(N,O,P,Q){
var y=ObjectInfoGet(N);
if(!ObjectInfoHasActiveObservers(y))
return;
var H={
type:'splice',
object:N,
index:O,
removed:P,
addedCount:Q
};
f(H);
f(H.removed);
ObjectInfoEnqueueInternalChangeRecord(y,H);
}
function NotifyChange(m,z,J,R){
var y=ObjectInfoGet(z);
if(!ObjectInfoHasActiveObservers(y))
return;
var H;
if(arguments.length==2){
H={type:m,object:z};
}else if(arguments.length==3){
H={type:m,object:z,name:J};
}else{
H={
type:m,
object:z,
name:J,
oldValue:R
};
}
f(H);
ObjectInfoEnqueueInternalChangeRecord(y,H);
}
function ObjectNotifierNotify(H){
if(!(%_IsSpecObject(this)))
throw MakeTypeError(14,"notify");
var y=ObjectInfoGetFromNotifier(this);
if((y===(void 0)))
throw MakeTypeError(75);
if(!(typeof(H.type)==='string'))
throw MakeTypeError(78);
ObjectInfoEnqueueExternalChangeRecord(y,H);
}
function ObjectNotifierPerformChange(S,T){
if(!(%_IsSpecObject(this)))
throw MakeTypeError(14,"performChange");
var y=ObjectInfoGetFromNotifier(this);
if((y===(void 0)))
throw MakeTypeError(75);
if(!(typeof(S)==='string'))
throw MakeTypeError(77);
if(!(typeof(T)==='function'))
throw MakeTypeError(76);
var U=%GetObjectContextNotifierPerformChange(y);
U(y,S,T);
}
function NativeObjectNotifierPerformChange(y,S,T){
ObjectInfoAddPerformingType(y,S);
var H;
try{
H=T();
}finally{
ObjectInfoRemovePerformingType(y,S);
}
if((%_IsSpecObject(H)))
ObjectInfoEnqueueExternalChangeRecord(y,H,S);
}
function ObjectGetNotifier(z){
if(!(%_IsSpecObject(z)))
throw MakeTypeError(74,"getNotifier","getNotifier");
if(%IsJSGlobalProxy(z))
throw MakeTypeError(70,"getNotifier");
if(%IsAccessCheckNeeded(z))
throw MakeTypeError(71,"getNotifier");
if(g(z))return null;
if(!%ObjectWasCreatedInCurrentOrigin(z))return null;
var V=%GetObjectContextObjectGetNotifier(z);
return V(z);
}
function NativeObjectGetNotifier(z){
var y=ObjectInfoGetOrCreate(z);
return ObjectInfoGetNotifier(y);
}
function CallbackDeliverPending(v){
var C=CallbackInfoGet(v);
if((C===(void 0))||(typeof(C)==='number'))
return false;
var D=C.priority;
CallbackInfoSet(v,D);
var k=GetPendingObservers();
if(!(k===null))
delete k[D];
var W=[];
%MoveArrayContents(C,W);
%DeliverObservationChangeRecords(v,W);
return true;
}
function ObjectDeliverChangeRecords(v){
if(!(typeof(v)==='function'))
throw MakeTypeError(73,"deliverChangeRecords");
while(CallbackDeliverPending(v)){}
}
function ObserveMicrotaskRunner(){
var k=GetPendingObservers();
if(!(k===null)){
SetPendingObservers(null);
for(var q in k){
CallbackDeliverPending(k[q]);
}
}
}
b.InstallFunctions(j,2,[
"notify",ObjectNotifierNotify,
"performChange",ObjectNotifierPerformChange
]);
$observeObjectMethods=[
"deliverChangeRecords",ObjectDeliverChangeRecords,
"getNotifier",ObjectGetNotifier,
"observe",ObjectObserve,
"unobserve",ObjectUnobserve
];
$observeArrayMethods=[
"observe",ArrayObserve,
"unobserve",ArrayUnobserve
];
var X=function(Y,q){
if(q % 2===1)%FunctionRemovePrototype(Y);
};
$observeObjectMethods.forEach(X);
$observeArrayMethods.forEach(X);
$observeEnqueueSpliceRecord=EnqueueSpliceRecord;
$observeBeginPerformSplice=BeginPerformSplice;
$observeEndPerformSplice=EndPerformSplice;
%InstallToContext([
"native_object_get_notifier",NativeObjectGetNotifier,
"native_object_notifier_perform_change",NativeObjectNotifierPerformChange,
"native_object_observe",NativeObjectObserve,
"observers_begin_perform_splice",BeginPerformSplice,
"observers_end_perform_splice",EndPerformSplice,
"observers_enqueue_splice",EnqueueSpliceRecord,
"observers_notify_change",NotifyChange,
]);
})

(collection½ˆ
var $getHash;
var $getExistingHash;
(function(a,b){
"use strict";
%CheckIsBootstrapping();
var c=a.Map;
var d=a.Object;
var e=a.Set;
var f=b.ImportNow("hash_code_symbol");
var g;
var h=b.ImportNow("to_string_tag_symbol");
b.Import(function(i){
g=i.IntRandom;
});
var j;
b.Import(function(i){
j=i.NumberIsNaN;
});
function HashToEntry(k,l,m){
var n=(l&((m)-1));
return((%_FixedArrayGet(k,(3+(n))|0)));
}
%SetForceInlineFlag(HashToEntry);
function SetFindEntry(k,m,o,l){
var p=HashToEntry(k,l,m);
if(p===-1)return p;
var q=((%_FixedArrayGet(k,((3+(m)+((p)<<1)))|0)));
if(o===q)return p;
var r=j(o);
while(true){
if(r&&j(q)){
return p;
}
p=((%_FixedArrayGet(k,((3+(m)+((p)<<1))+1)|0)));
if(p===-1)return p;
q=((%_FixedArrayGet(k,((3+(m)+((p)<<1)))|0)));
if(o===q)return p;
}
return-1;
}
%SetForceInlineFlag(SetFindEntry);
function MapFindEntry(k,m,o,l){
var p=HashToEntry(k,l,m);
if(p===-1)return p;
var q=((%_FixedArrayGet(k,((3+(m)+((p)*3)))|0)));
if(o===q)return p;
var r=j(o);
while(true){
if(r&&j(q)){
return p;
}
p=((%_FixedArrayGet(k,((3+(m)+((p)*3))+2)|0)));
if(p===-1)return p;
q=((%_FixedArrayGet(k,((3+(m)+((p)*3)))|0)));
if(o===q)return p;
}
return-1;
}
%SetForceInlineFlag(MapFindEntry);
function ComputeIntegerHash(o,s){
var l=o;
l=l^s;
l=~l+(l<<15);
l=l^(l>>>12);
l=l+(l<<2);
l=l^(l>>>4);
l=(l*2057)|0;
l=l^(l>>>16);
return l&0x3fffffff;
}
%SetForceInlineFlag(ComputeIntegerHash);
function GetExistingHash(o){
if(%_IsSmi(o)){
return ComputeIntegerHash(o,0);
}
if((typeof(o)==='string')){
var t=%_StringGetRawHashField(o);
if((t&1)===0){
return t>>>2;
}
}else if((%_IsSpecObject(o))&&!%_IsJSProxy(o)&&!(%_ClassOf(o)==='global')){
var l=(o[f]);
return l;
}
return %GenericHash(o);
}
%SetForceInlineFlag(GetExistingHash);
function GetHash(o){
var l=GetExistingHash(o);
if((l===(void 0))){
l=g()|0;
if(l===0)l=1;
(o[f]=l);
}
return l;
}
%SetForceInlineFlag(GetHash);
function SetConstructor(u){
if(!%_IsConstructCall()){
throw MakeTypeError(21,"Set");
}
%_SetInitialize(this);
if(!(u==null)){
var v=this.add;
if(!(typeof(v)==='function')){
throw MakeTypeError(82,'add',this);
}
for(var w of u){
%_Call(v,this,w);
}
}
}
function SetAdd(o){
if(!(%_ClassOf(this)==='Set')){
throw MakeTypeError(36,'Set.prototype.add',this);
}
if(o===0){
o=0;
}
var k=%_JSCollectionGetTable(this);
var m=((%_FixedArrayGet(k,(0)|0)));
var l=GetHash(o);
if(SetFindEntry(k,m,o,l)!==-1)return this;
var x=((%_FixedArrayGet(k,(1)|0)));
var y=((%_FixedArrayGet(k,(2)|0)));
var z=m<<1;
if((x+y)>=z){
%SetGrow(this);
k=%_JSCollectionGetTable(this);
m=((%_FixedArrayGet(k,(0)|0)));
x=((%_FixedArrayGet(k,(1)|0)));
y=((%_FixedArrayGet(k,(2)|0)));
}
var p=x+y;
var A=(3+(m)+((p)<<1));
var n=(l&((m)-1));
var B=((%_FixedArrayGet(k,(3+(n))|0)));
((%_FixedArraySet(k,(3+(n))|0,p)));
(((%_FixedArraySet(k,(1)|0,(x+1)|0))));
(%_FixedArraySet(k,(A)|0,o));
((%_FixedArraySet(k,(A+1)|0,(B)|0)));
return this;
}
function SetHas(o){
if(!(%_ClassOf(this)==='Set')){
throw MakeTypeError(36,'Set.prototype.has',this);
}
var k=%_JSCollectionGetTable(this);
var m=((%_FixedArrayGet(k,(0)|0)));
var l=GetExistingHash(o);
if((l===(void 0)))return false;
return SetFindEntry(k,m,o,l)!==-1;
}
function SetDelete(o){
if(!(%_ClassOf(this)==='Set')){
throw MakeTypeError(36,
'Set.prototype.delete',this);
}
var k=%_JSCollectionGetTable(this);
var m=((%_FixedArrayGet(k,(0)|0)));
var l=GetExistingHash(o);
if((l===(void 0)))return false;
var p=SetFindEntry(k,m,o,l);
if(p===-1)return false;
var x=((%_FixedArrayGet(k,(1)|0)))-1;
var y=((%_FixedArrayGet(k,(2)|0)))+1;
var A=(3+(m)+((p)<<1));
(%_FixedArraySet(k,(A)|0,%_TheHole()));
(((%_FixedArraySet(k,(1)|0,(x)|0))));
(((%_FixedArraySet(k,(2)|0,(y)|0))));
if(x<(m>>>1))%SetShrink(this);
return true;
}
function SetGetSize(){
if(!(%_ClassOf(this)==='Set')){
throw MakeTypeError(36,
'Set.prototype.size',this);
}
var k=%_JSCollectionGetTable(this);
return((%_FixedArrayGet(k,(1)|0)));
}
function SetClearJS(){
if(!(%_ClassOf(this)==='Set')){
throw MakeTypeError(36,
'Set.prototype.clear',this);
}
%_SetClear(this);
}
function SetForEach(C,D){
if(!(%_ClassOf(this)==='Set')){
throw MakeTypeError(36,
'Set.prototype.forEach',this);
}
if(!(typeof(C)==='function'))throw MakeTypeError(13,C);
var E=new SetIterator(this,2);
var o;
var F=(%_DebugIsActive()!=0)&&%DebugCallbackSupportsStepping(C);
var G=[(void 0)];
while(%SetIteratorNext(E,G)){
if(F)%DebugPrepareStepInIfStepping(C);
o=G[0];
%_Call(C,D,o,o,this);
}
}
%SetCode(e,SetConstructor);
%FunctionSetLength(e,0);
%FunctionSetPrototype(e,new d());
%AddNamedProperty(e.prototype,"constructor",e,2);
%AddNamedProperty(e.prototype,h,"Set",
2|1);
%FunctionSetLength(SetForEach,1);
b.InstallGetter(e.prototype,"size",SetGetSize);
b.InstallFunctions(e.prototype,2,[
"add",SetAdd,
"has",SetHas,
"delete",SetDelete,
"clear",SetClearJS,
"forEach",SetForEach
]);
function MapConstructor(u){
if(!%_IsConstructCall()){
throw MakeTypeError(21,"Map");
}
%_MapInitialize(this);
if(!(u==null)){
var v=this.set;
if(!(typeof(v)==='function')){
throw MakeTypeError(82,'set',this);
}
for(var H of u){
if(!(%_IsSpecObject(H))){
throw MakeTypeError(42,H);
}
%_Call(v,this,H[0],H[1]);
}
}
}
function MapGet(o){
if(!(%_ClassOf(this)==='Map')){
throw MakeTypeError(36,
'Map.prototype.get',this);
}
var k=%_JSCollectionGetTable(this);
var m=((%_FixedArrayGet(k,(0)|0)));
var l=GetExistingHash(o);
if((l===(void 0)))return(void 0);
var p=MapFindEntry(k,m,o,l);
if(p===-1)return(void 0);
return((%_FixedArrayGet(k,((3+(m)+((p)*3))+1)|0)));
}
function MapSet(o,w){
if(!(%_ClassOf(this)==='Map')){
throw MakeTypeError(36,
'Map.prototype.set',this);
}
if(o===0){
o=0;
}
var k=%_JSCollectionGetTable(this);
var m=((%_FixedArrayGet(k,(0)|0)));
var l=GetHash(o);
var p=MapFindEntry(k,m,o,l);
if(p!==-1){
var I=(3+(m)+((p)*3));
(%_FixedArraySet(k,(I+1)|0,w));
return this;
}
var x=((%_FixedArrayGet(k,(1)|0)));
var y=((%_FixedArrayGet(k,(2)|0)));
var z=m<<1;
if((x+y)>=z){
%MapGrow(this);
k=%_JSCollectionGetTable(this);
m=((%_FixedArrayGet(k,(0)|0)));
x=((%_FixedArrayGet(k,(1)|0)));
y=((%_FixedArrayGet(k,(2)|0)));
}
p=x+y;
var A=(3+(m)+((p)*3));
var n=(l&((m)-1));
var B=((%_FixedArrayGet(k,(3+(n))|0)));
((%_FixedArraySet(k,(3+(n))|0,p)));
(((%_FixedArraySet(k,(1)|0,(x+1)|0))));
(%_FixedArraySet(k,(A)|0,o));
(%_FixedArraySet(k,(A+1)|0,w));
(%_FixedArraySet(k,(A+2)|0,B));
return this;
}
function MapHas(o){
if(!(%_ClassOf(this)==='Map')){
throw MakeTypeError(36,
'Map.prototype.has',this);
}
var k=%_JSCollectionGetTable(this);
var m=((%_FixedArrayGet(k,(0)|0)));
var l=GetHash(o);
return MapFindEntry(k,m,o,l)!==-1;
}
function MapDelete(o){
if(!(%_ClassOf(this)==='Map')){
throw MakeTypeError(36,
'Map.prototype.delete',this);
}
var k=%_JSCollectionGetTable(this);
var m=((%_FixedArrayGet(k,(0)|0)));
var l=GetHash(o);
var p=MapFindEntry(k,m,o,l);
if(p===-1)return false;
var x=((%_FixedArrayGet(k,(1)|0)))-1;
var y=((%_FixedArrayGet(k,(2)|0)))+1;
var A=(3+(m)+((p)*3));
(%_FixedArraySet(k,(A)|0,%_TheHole()));
(%_FixedArraySet(k,(A+1)|0,%_TheHole()));
(((%_FixedArraySet(k,(1)|0,(x)|0))));
(((%_FixedArraySet(k,(2)|0,(y)|0))));
if(x<(m>>>1))%MapShrink(this);
return true;
}
function MapGetSize(){
if(!(%_ClassOf(this)==='Map')){
throw MakeTypeError(36,
'Map.prototype.size',this);
}
var k=%_JSCollectionGetTable(this);
return((%_FixedArrayGet(k,(1)|0)));
}
function MapClearJS(){
if(!(%_ClassOf(this)==='Map')){
throw MakeTypeError(36,
'Map.prototype.clear',this);
}
%_MapClear(this);
}
function MapForEach(C,D){
if(!(%_ClassOf(this)==='Map')){
throw MakeTypeError(36,
'Map.prototype.forEach',this);
}
if(!(typeof(C)==='function'))throw MakeTypeError(13,C);
var E=new MapIterator(this,3);
var F=(%_DebugIsActive()!=0)&&%DebugCallbackSupportsStepping(C);
var G=[(void 0),(void 0)];
while(%MapIteratorNext(E,G)){
if(F)%DebugPrepareStepInIfStepping(C);
%_Call(C,D,G[1],G[0],this);
}
}
%SetCode(c,MapConstructor);
%FunctionSetLength(c,0);
%FunctionSetPrototype(c,new d());
%AddNamedProperty(c.prototype,"constructor",c,2);
%AddNamedProperty(
c.prototype,h,"Map",2|1);
%FunctionSetLength(MapForEach,1);
b.InstallGetter(c.prototype,"size",MapGetSize);
b.InstallFunctions(c.prototype,2,[
"get",MapGet,
"set",MapSet,
"has",MapHas,
"delete",MapDelete,
"clear",MapClearJS,
"forEach",MapForEach
]);
$getHash=GetHash;
$getExistingHash=GetExistingHash;
function MapFromArray(J){
var K=new c;
var L=J.length;
for(var M=0;M<L;M+=2){
var o=J[M];
var w=J[M+1];
%_Call(MapSet,K,o,w);
}
return K;
};
function SetFromArray(J){
var N=new e;
var L=J.length;
for(var M=0;M<L;++M){
%_Call(SetAdd,N,J[M]);
}
return N;
};
%InstallToContext([
"map_get",MapGet,
"map_set",MapSet,
"map_has",MapHas,
"map_delete",MapDelete,
"set_add",SetAdd,
"set_has",SetHas,
"set_delete",SetDelete,
"map_from_array",MapFromArray,
"set_from_array",SetFromArray,
]);
})

<weak-collection!0
(function(a,b){
"use strict";
%CheckIsBootstrapping();
var c=a.Object;
var d=a.WeakMap;
var e=a.WeakSet;
var f=b.ImportNow("to_string_tag_symbol");
function WeakMapConstructor(g){
if(!%_IsConstructCall()){
throw MakeTypeError(21,"WeakMap");
}
%WeakCollectionInitialize(this);
if(!(g==null)){
var h=this.set;
if(!(typeof(h)==='function')){
throw MakeTypeError(82,'set',this);
}
for(var i of g){
if(!(%_IsSpecObject(i))){
throw MakeTypeError(42,i);
}
%_Call(h,this,i[0],i[1]);
}
}
}
function WeakMapGet(j){
if(!(%_ClassOf(this)==='WeakMap')){
throw MakeTypeError(36,
'WeakMap.prototype.get',this);
}
if(!(%_IsSpecObject(j)))return(void 0);
var k=$getExistingHash(j);
if((k===(void 0)))return(void 0);
return %WeakCollectionGet(this,j,k);
}
function WeakMapSet(j,l){
if(!(%_ClassOf(this)==='WeakMap')){
throw MakeTypeError(36,
'WeakMap.prototype.set',this);
}
if(!(%_IsSpecObject(j)))throw MakeTypeError(140);
return %WeakCollectionSet(this,j,l,$getHash(j));
}
function WeakMapHas(j){
if(!(%_ClassOf(this)==='WeakMap')){
throw MakeTypeError(36,
'WeakMap.prototype.has',this);
}
if(!(%_IsSpecObject(j)))return false;
var k=$getExistingHash(j);
if((k===(void 0)))return false;
return %WeakCollectionHas(this,j,k);
}
function WeakMapDelete(j){
if(!(%_ClassOf(this)==='WeakMap')){
throw MakeTypeError(36,
'WeakMap.prototype.delete',this);
}
if(!(%_IsSpecObject(j)))return false;
var k=$getExistingHash(j);
if((k===(void 0)))return false;
return %WeakCollectionDelete(this,j,k);
}
%SetCode(d,WeakMapConstructor);
%FunctionSetLength(d,0);
%FunctionSetPrototype(d,new c());
%AddNamedProperty(d.prototype,"constructor",d,
2);
%AddNamedProperty(d.prototype,f,"WeakMap",
2|1);
b.InstallFunctions(d.prototype,2,[
"get",WeakMapGet,
"set",WeakMapSet,
"has",WeakMapHas,
"delete",WeakMapDelete
]);
function WeakSetConstructor(g){
if(!%_IsConstructCall()){
throw MakeTypeError(21,"WeakSet");
}
%WeakCollectionInitialize(this);
if(!(g==null)){
var h=this.add;
if(!(typeof(h)==='function')){
throw MakeTypeError(82,'add',this);
}
for(var l of g){
%_Call(h,this,l);
}
}
}
function WeakSetAdd(l){
if(!(%_ClassOf(this)==='WeakSet')){
throw MakeTypeError(36,
'WeakSet.prototype.add',this);
}
if(!(%_IsSpecObject(l)))throw MakeTypeError(141);
return %WeakCollectionSet(this,l,true,$getHash(l));
}
function WeakSetHas(l){
if(!(%_ClassOf(this)==='WeakSet')){
throw MakeTypeError(36,
'WeakSet.prototype.has',this);
}
if(!(%_IsSpecObject(l)))return false;
var k=$getExistingHash(l);
if((k===(void 0)))return false;
return %WeakCollectionHas(this,l,k);
}
function WeakSetDelete(l){
if(!(%_ClassOf(this)==='WeakSet')){
throw MakeTypeError(36,
'WeakSet.prototype.delete',this);
}
if(!(%_IsSpecObject(l)))return false;
var k=$getExistingHash(l);
if((k===(void 0)))return false;
return %WeakCollectionDelete(this,l,k);
}
%SetCode(e,WeakSetConstructor);
%FunctionSetLength(e,0);
%FunctionSetPrototype(e,new c());
%AddNamedProperty(e.prototype,"constructor",e,
2);
%AddNamedProperty(e.prototype,f,"WeakSet",
2|1);
b.InstallFunctions(e.prototype,2,[
"add",WeakSetAdd,
"has",WeakSetHas,
"delete",WeakSetDelete
]);
})

Lcollection-iteratori,
var $mapEntries;
var $mapIteratorNext;
var $setIteratorNext;
var $setValues;
(function(a,b){
"use strict";
%CheckIsBootstrapping();
var c=a.Map;
var d=a.Set;
var e=b.ImportNow("iterator_symbol");
var f=b.ImportNow("to_string_tag_symbol");
function SetIteratorConstructor(g,h){
%SetIteratorInitialize(this,g,h);
}
function SetIteratorNextJS(){
if(!(%_ClassOf(this)==='Set Iterator')){
throw MakeTypeError(36,
'Set Iterator.prototype.next',this);
}
var i=[(void 0),(void 0)];
var j=%_CreateIterResultObject(i,false);
switch(%SetIteratorNext(this,i)){
case 0:
j.value=(void 0);
j.done=true;
break;
case 2:
j.value=i[0];
break;
case 3:
i[1]=i[0];
break;
}
return j;
}
function SetEntries(){
if(!(%_ClassOf(this)==='Set')){
throw MakeTypeError(36,
'Set.prototype.entries',this);
}
return new SetIterator(this,3);
}
function SetValues(){
if(!(%_ClassOf(this)==='Set')){
throw MakeTypeError(36,
'Set.prototype.values',this);
}
return new SetIterator(this,2);
}
%SetCode(SetIterator,SetIteratorConstructor);
%FunctionSetPrototype(SetIterator,{__proto__:$iteratorPrototype});
%FunctionSetInstanceClassName(SetIterator,'Set Iterator');
b.InstallFunctions(SetIterator.prototype,2,[
'next',SetIteratorNextJS
]);
%AddNamedProperty(SetIterator.prototype,f,
"Set Iterator",1|2);
b.InstallFunctions(d.prototype,2,[
'entries',SetEntries,
'keys',SetValues,
'values',SetValues
]);
%AddNamedProperty(d.prototype,e,SetValues,2);
$setIteratorNext=SetIteratorNextJS;
$setValues=SetValues;
function MapIteratorConstructor(k,h){
%MapIteratorInitialize(this,k,h);
}
function MapIteratorNextJS(){
if(!(%_ClassOf(this)==='Map Iterator')){
throw MakeTypeError(36,
'Map Iterator.prototype.next',this);
}
var i=[(void 0),(void 0)];
var j=%_CreateIterResultObject(i,false);
switch(%MapIteratorNext(this,i)){
case 0:
j.value=(void 0);
j.done=true;
break;
case 1:
j.value=i[0];
break;
case 2:
j.value=i[1];
break;
}
return j;
}
function MapEntries(){
if(!(%_ClassOf(this)==='Map')){
throw MakeTypeError(36,
'Map.prototype.entries',this);
}
return new MapIterator(this,3);
}
function MapKeys(){
if(!(%_ClassOf(this)==='Map')){
throw MakeTypeError(36,
'Map.prototype.keys',this);
}
return new MapIterator(this,1);
}
function MapValues(){
if(!(%_ClassOf(this)==='Map')){
throw MakeTypeError(36,
'Map.prototype.values',this);
}
return new MapIterator(this,2);
}
%SetCode(MapIterator,MapIteratorConstructor);
%FunctionSetPrototype(MapIterator,{__proto__:$iteratorPrototype});
%FunctionSetInstanceClassName(MapIterator,'Map Iterator');
b.InstallFunctions(MapIterator.prototype,2,[
'next',MapIteratorNextJS
]);
%AddNamedProperty(MapIterator.prototype,f,
"Map Iterator",1|2);
b.InstallFunctions(c.prototype,2,[
'entries',MapEntries,
'keys',MapKeys,
'values',MapValues
]);
%AddNamedProperty(c.prototype,e,MapEntries,2);
$mapEntries=MapEntries;
$mapIteratorNext=MapIteratorNextJS;
})

promisead
(function(a,b,c){
"use strict";
%CheckIsBootstrapping();
var d=b.InternalArray;
var e=
b.ImportNow("promise_has_handler_symbol");
var f=b.ImportNow("promise_on_reject_symbol");
var g=
b.ImportNow("promise_on_resolve_symbol");
var h=b.ImportNow("promise_raw_symbol");
var i=b.ImportNow("promise_status_symbol");
var j=b.ImportNow("promise_value_symbol");
var k=b.ImportNow("to_string_tag_symbol");
var l=0;
var m=function Promise(n){
if(n===h)return;
if(!%_IsConstructCall())throw MakeTypeError(54,this);
if(!(typeof(n)==='function'))
throw MakeTypeError(101,n);
var o=PromiseInit(this);
try{
%DebugPushPromise(o,Promise);
n(function(p){PromiseResolve(o,p)},
function(q){PromiseReject(o,q)});
}catch(e){
PromiseReject(o,e);
}finally{
%DebugPopPromise();
}
}
function PromiseSet(o,r,s,t,u){
(o[i]=r);
(o[j]=s);
(o[g]=t);
(o[f]=u);
if((%_DebugIsActive()!=0)){
%DebugPromiseEvent({promise:o,status:r,value:s});
}
return o;
}
function PromiseCreateAndSet(r,s){
var o=new m(h);
if((%_DebugIsActive()!=0))PromiseSet(o,0,(void 0));
return PromiseSet(o,r,s);
}
function PromiseInit(o){
return PromiseSet(
o,0,(void 0),new d,new d)
}
function PromiseDone(o,r,s,v){
if((o[i])===0){
var w=(o[v]);
if(w.length)PromiseEnqueue(s,w,r);
PromiseSet(o,r,s);
}
}
function PromiseCoerce(x,p){
if(!IsPromise(p)&&(%_IsSpecObject(p))){
var y;
try{
y=p.then;
}catch(q){
return %_CallFunction(x,q,PromiseRejected);
}
if((typeof(y)==='function')){
var z=%_CallFunction(x,PromiseDeferred);
try{
%_Call(y,p,z.resolve,z.reject);
}catch(q){
z.reject(q);
}
return z.promise;
}
}
return p;
}
function PromiseHandle(s,A,z){
try{
%DebugPushPromise(z.promise,PromiseHandle);
if((%_DebugIsActive()!=0&&%DebugCallbackSupportsStepping(A)))%DebugPrepareStepInIfStepping(A);
var B=A(s);
if(B===z.promise)
throw MakeTypeError(80,B);
else if(IsPromise(B))
%_CallFunction(B,z.resolve,z.reject,PromiseChain);
else
z.resolve(B);
}catch(exception){
try{z.reject(exception);}catch(e){}
}finally{
%DebugPopPromise();
}
}
function PromiseEnqueue(s,w,r){
var C,D,E=(%_DebugIsActive()!=0);
%EnqueueMicrotask(function(){
if(E){
%DebugAsyncTaskEvent({type:"willHandle",id:C,name:D});
}
for(var F=0;F<w.length;F+=2){
PromiseHandle(s,w[F],w[F+1])
}
if(E){
%DebugAsyncTaskEvent({type:"didHandle",id:C,name:D});
}
});
if(E){
C=++l;
D=r>0?"Promise.resolve":"Promise.reject";
%DebugAsyncTaskEvent({type:"enqueue",id:C,name:D});
}
}
function PromiseIdResolveHandler(p){return p}
function PromiseIdRejectHandler(q){throw q}
function PromiseNopResolver(){}
function IsPromise(p){
return(%_IsSpecObject(p))&&(!(p[i]===(void 0)));
}
function PromiseCreate(){
return new m(PromiseNopResolver)
}
function PromiseResolve(o,p){
PromiseDone(o,+1,p,g)
}
function PromiseReject(o,q){
if((o[i])==0){
var G=(%_DebugIsActive()!=0);
if(G||
!(!(o[e]===(void 0)))){
%PromiseRejectEvent(o,q,G);
}
}
PromiseDone(o,-1,q,f)
}
function PromiseDeferred(){
if(this===m){
var o=PromiseInit(new m(h));
return{
promise:o,
resolve:function(p){PromiseResolve(o,p)},
reject:function(q){PromiseReject(o,q)}
};
}else{
var B={promise:(void 0),reject:(void 0),resolve:(void 0)};
B.promise=new this(function(H,I){
B.resolve=H;
B.reject=I;
});
return B;
}
}
function PromiseResolved(p){
if(this===m){
return PromiseCreateAndSet(+1,p);
}else{
return new this(function(H,I){H(p)});
}
}
function PromiseRejected(q){
var o;
if(this===m){
o=PromiseCreateAndSet(-1,q);
%PromiseRejectEvent(o,q,false);
}else{
o=new this(function(H,I){I(q)});
}
return o;
}
function PromiseChain(t,u){
t=(t===(void 0))?PromiseIdResolveHandler:t;
u=(u===(void 0))?PromiseIdRejectHandler:u;
var z=%_CallFunction(this.constructor,PromiseDeferred);
switch((this[i])){
case(void 0):
throw MakeTypeError(54,this);
case 0:
(this[g]).push(t,z);
(this[f]).push(u,z);
break;
case+1:
PromiseEnqueue((this[j]),
[t,z],
+1);
break;
case-1:
if(!(!(this[e]===(void 0)))){
%PromiseRevokeReject(this);
}
PromiseEnqueue((this[j]),
[u,z],
-1);
break;
}
(this[e]=true);
if((%_DebugIsActive()!=0)){
%DebugPromiseEvent({promise:z.promise,parentPromise:this});
}
return z.promise;
}
function PromiseCatch(u){
return this.then((void 0),u);
}
function PromiseThen(t,u){
t=(typeof(t)==='function')?t:PromiseIdResolveHandler;
u=(typeof(u)==='function')?u:PromiseIdRejectHandler;
var J=this;
var x=this.constructor;
return %_CallFunction(
this,
function(p){
p=PromiseCoerce(x,p);
if(p===J){
if((%_DebugIsActive()!=0&&%DebugCallbackSupportsStepping(u)))%DebugPrepareStepInIfStepping(u);
return u(MakeTypeError(80,p));
}else if(IsPromise(p)){
return p.then(t,u);
}else{
if((%_DebugIsActive()!=0&&%DebugCallbackSupportsStepping(t)))%DebugPrepareStepInIfStepping(t);
return t(p);
}
},
u,
PromiseChain
);
}
function PromiseCast(p){
return IsPromise(p)?p:new this(function(H){H(p)});
}
function PromiseAll(K){
var z=%_CallFunction(this,PromiseDeferred);
var L=[];
try{
var M=0;
var F=0;
for(var s of K){
this.resolve(s).then(
(function(F){
return function(p){
L[F]=p;
if(--M===0)z.resolve(L);
}
})(F),
function(q){z.reject(q);});
++F;
++M;
}
if(M===0){
z.resolve(L);
}
}catch(e){
z.reject(e)
}
return z.promise;
}
function PromiseRace(K){
var z=%_CallFunction(this,PromiseDeferred);
try{
for(var s of K){
this.resolve(s).then(
function(p){z.resolve(p)},
function(q){z.reject(q)});
}
}catch(e){
z.reject(e)
}
return z.promise;
}
function PromiseHasUserDefinedRejectHandlerRecursive(o){
var N=(o[f]);
if((N===(void 0)))return false;
for(var F=0;F<N.length;F+=2){
if(N[F]!=PromiseIdRejectHandler)return true;
if(PromiseHasUserDefinedRejectHandlerRecursive(N[F+1].promise)){
return true;
}
}
return false;
}
function PromiseHasUserDefinedRejectHandler(){
return PromiseHasUserDefinedRejectHandlerRecursive(this);
};
%AddNamedProperty(a,'Promise',m,2);
%AddNamedProperty(m.prototype,k,"Promise",
2|1);
b.InstallFunctions(m,2,[
"defer",PromiseDeferred,
"accept",PromiseResolved,
"reject",PromiseRejected,
"all",PromiseAll,
"race",PromiseRace,
"resolve",PromiseCast
]);
b.InstallFunctions(m.prototype,2,[
"chain",PromiseChain,
"then",PromiseThen,
"catch",PromiseCatch
]);
%InstallToContext([
"promise_catch",PromiseCatch,
"promise_chain",PromiseChain,
"promise_create",PromiseCreate,
"promise_has_user_defined_reject_handler",PromiseHasUserDefinedRejectHandler,
"promise_reject",PromiseReject,
"promise_resolve",PromiseResolve,
"promise_then",PromiseThen,
]);
b.InstallFunctions(c,0,[
"createPromise",PromiseCreate,
"resolvePromise",PromiseResolve,
"rejectPromise",PromiseReject
]);
})

 messagesÁç
var $errorToString;
var MakeError;
var MakeEvalError;
var MakeRangeError;
var MakeReferenceError;
var MakeSyntaxError;
var MakeTypeError;
var MakeURIError;
(function(a,b){
%CheckIsBootstrapping();
var c;
var d;
var e;
var f;
var g=
b.ImportNow("call_site_receiver_symbol");
var h=
b.ImportNow("call_site_function_symbol");
var i=
b.ImportNow("call_site_position_symbol");
var j=
b.ImportNow("call_site_strict_symbol");
var k;
var l=
b.ImportNow("formatted_stack_trace_symbol");
var m
var n=a.Object;
var o;
var p;
var q;
var r=b.InternalArray;
var s=b.ImportNow("internal_error_symbol");
var t;
var u;
var v=b.ImportNow("stack_trace_symbol");
var w;
var x;
var y;
var z;
var A;
var B;
var C;
b.Import(function(D){
c=D.ArrayJoin;
d=D.Bool16x8ToString;
e=D.Bool32x4ToString;
f=D.Bool8x16ToString;
k=D.Float32x4ToString;
m=D.FunctionSourceString;
o=D.Int16x8ToString;
p=D.Int32x4ToString;
q=D.Int8x16ToString;
t=D.ObjectDefineProperty;
u=D.ObjectToString;
w=D.StringCharAt;
x=D.StringIndexOf;
y=D.StringSubstring;
z=D.SymbolToString;
A=D.Uint16x8ToString;
B=D.Uint32x4ToString;
C=D.Uint8x16ToString;
});
var E;
var F;
var G;
var H;
var I;
var J;
var K;
function NoSideEffectsObjectToString(){
if((this===(void 0)))return"[object Undefined]";
if((this===null))return"[object Null]";
return"[object "+%_ClassOf((%_ToObject(this)))+"]";
}
function NoSideEffectToString(L){
if((typeof(L)==='string'))return L;
if((typeof(L)==='number'))return %_NumberToString(L);
if((typeof(L)==='boolean'))return L?'true':'false';
if((L===(void 0)))return'undefined';
if((L===null))return'null';
if((%_IsFunction(L))){
var M=%_CallFunction(L,L,m);
if(M.length>128){
M=%_SubString(M,0,111)+"...<omitted>..."+
%_SubString(M,M.length-2,M.length);
}
return M;
}
if((typeof(L)==='symbol'))return %_CallFunction(L,z);
if((%_IsSimdValue(L))){
switch(typeof(L)){
case'float32x4':return %_CallFunction(L,k);
case'int32x4':return %_CallFunction(L,p);
case'int16x8':return %_CallFunction(L,o);
case'int8x16':return %_CallFunction(L,q);
case'uint32x4':return %_CallFunction(L,B);
case'uint16x8':return %_CallFunction(L,A);
case'uint8x16':return %_CallFunction(L,C);
case'bool32x4':return %_CallFunction(L,e);
case'bool16x8':return %_CallFunction(L,d);
case'bool8x16':return %_CallFunction(L,f);
}
}
if((typeof(L)==='object')
&&%GetDataProperty(L,"toString")===u){
var N=%GetDataProperty(L,"constructor");
if(typeof N=="function"){
var O=N.name;
if((typeof(O)==='string')&&O!==""){
return"#<"+O+">";
}
}
}
if(CanBeSafelyTreatedAsAnErrorObject(L)){
return %_CallFunction(L,ErrorToString);
}
return %_CallFunction(L,NoSideEffectsObjectToString);
}
function CanBeSafelyTreatedAsAnErrorObject(L){
switch(%_ClassOf(L)){
case'Error':
case'EvalError':
case'RangeError':
case'ReferenceError':
case'SyntaxError':
case'TypeError':
case'URIError':
return true;
}
var P=%GetDataProperty(L,"toString");
return L instanceof E&&P===ErrorToString;
}
function ToStringCheckErrorObject(L){
if(CanBeSafelyTreatedAsAnErrorObject(L)){
return %_CallFunction(L,ErrorToString);
}else{
return(%_ToString(L));
}
}
function ToDetailString(L){
if(L!=null&&(typeof(L)==='object')&&L.toString===u){
var N=L.constructor;
if(typeof N=="function"){
var O=N.name;
if((typeof(O)==='string')&&O!==""){
return"#<"+O+">";
}
}
}
return ToStringCheckErrorObject(L);
}
function MakeGenericError(N,Q,R,S,T){
var U=new N(FormatMessage(Q,R,S,T));
U[s]=true;
return U;
}
%FunctionSetInstanceClassName(Script,'Script');
%AddNamedProperty(Script.prototype,'constructor',Script,
2|4|1);
%SetCode(Script,function(V){
throw MakeError(6);
});
function FormatMessage(Q,R,S,T){
var R=NoSideEffectToString(R);
var S=NoSideEffectToString(S);
var T=NoSideEffectToString(T);
try{
return %FormatMessageString(Q,R,S,T);
}catch(e){
return"<error>";
}
}
function GetLineNumber(W){
var X=%MessageGetStartPosition(W);
if(X==-1)return 0;
var Y=%MessageGetScript(W);
var Z=Y.locationFromPosition(X,true);
if(Z==null)return 0;
return Z.line+1;
}
function GetColumnNumber(W){
var Y=%MessageGetScript(W);
var X=%MessageGetStartPosition(W);
var Z=Y.locationFromPosition(X,true);
if(Z==null)return-1;
return Z.column;
}
function GetSourceLine(W){
var Y=%MessageGetScript(W);
var X=%MessageGetStartPosition(W);
var Z=Y.locationFromPosition(X,true);
if(Z==null)return"";
return Z.sourceText();
}
function ScriptLineFromPosition(aa){
var ab=0;
var ac=this.lineCount()-1;
var ad=this.line_ends;
if(aa>ad[ac]){
return-1;
}
if(aa<=ad[0]){
return 0;
}
while(ac>=1){
var ae=(ab+ac)>>1;
if(aa>ad[ae]){
ab=ae+1;
}else if(aa<=ad[ae-1]){
ac=ae-1;
}else{
return ae;
}
}
return-1;
}
function ScriptLocationFromPosition(aa,
include_resource_offset){
var af=this.lineFromPosition(aa);
if(af==-1)return null;
var ad=this.line_ends;
var ag=af==0?0:ad[af-1]+1;
var ah=ad[af];
if(ah>0&&%_CallFunction(this.source,ah-1,w)=='\r'){
ah--;
}
var ai=aa-ag;
if(include_resource_offset){
af+=this.line_offset;
if(af==this.line_offset){
ai+=this.column_offset;
}
}
return new SourceLocation(this,aa,af,ai,ag,ah);
}
function ScriptLocationFromLine(aj,ak,al){
var af=0;
if(!(aj===(void 0))){
af=aj-this.line_offset;
}
var ai=ak||0;
if(af==0){
ai-=this.column_offset;
}
var am=al||0;
if(af<0||ai<0||am<0)return null;
if(af==0){
return this.locationFromPosition(am+ai,false);
}else{
var an=this.lineFromPosition(am);
if(an==-1||an+af>=this.lineCount()){
return null;
}
return this.locationFromPosition(
this.line_ends[an+af-1]+1+ai);
}
}
function ScriptSourceSlice(ao,ap){
var aq=(ao===(void 0))?this.line_offset
:ao;
var ar=(ap===(void 0))?this.line_offset+this.lineCount()
:ap;
aq-=this.line_offset;
ar-=this.line_offset;
if(aq<0)aq=0;
if(ar>this.lineCount())ar=this.lineCount();
if(aq>=this.lineCount()||
ar<0||
aq>ar){
return null;
}
var ad=this.line_ends;
var as=aq==0?0:ad[aq-1]+1;
var at=ar==0?0:ad[ar-1]+1;
return new SourceSlice(this,
aq+this.line_offset,
ar+this.line_offset,
as,at);
}
function ScriptSourceLine(aj){
var af=0;
if(!(aj===(void 0))){
af=aj-this.line_offset;
}
if(af<0||this.lineCount()<=af){
return null;
}
var ad=this.line_ends;
var ag=af==0?0:ad[af-1]+1;
var ah=ad[af];
return %_CallFunction(this.source,ag,ah,y);
}
function ScriptLineCount(){
return this.line_ends.length;
}
function ScriptLineEnd(au){
return this.line_ends[au];
}
function ScriptNameOrSourceURL(){
if(this.source_url)return this.source_url;
return this.name;
}
b.SetUpLockedPrototype(Script,[
"source",
"name",
"source_url",
"source_mapping_url",
"line_ends",
"line_offset",
"column_offset"
],[
"lineFromPosition",ScriptLineFromPosition,
"locationFromPosition",ScriptLocationFromPosition,
"locationFromLine",ScriptLocationFromLine,
"sourceSlice",ScriptSourceSlice,
"sourceLine",ScriptSourceLine,
"lineCount",ScriptLineCount,
"nameOrSourceURL",ScriptNameOrSourceURL,
"lineEnd",ScriptLineEnd
]
);
function SourceLocation(Y,aa,af,ai,ag,ah){
this.script=Y;
this.position=aa;
this.line=af;
this.column=ai;
this.start=ag;
this.end=ah;
}
function SourceLocationSourceText(){
return %_CallFunction(this.script.source,
this.start,
this.end,
y);
}
b.SetUpLockedPrototype(SourceLocation,
["script","position","line","column","start","end"],
["sourceText",SourceLocationSourceText]
);
function SourceSlice(Y,aq,ar,as,at){
this.script=Y;
this.from_line=aq;
this.to_line=ar;
this.from_position=as;
this.to_position=at;
}
function SourceSliceSourceText(){
return %_CallFunction(this.script.source,
this.from_position,
this.to_position,
y);
}
b.SetUpLockedPrototype(SourceSlice,
["script","from_line","to_line","from_position","to_position"],
["sourceText",SourceSliceSourceText]
);
function GetStackTraceLine(av,aw,ax,ay){
return new CallSite(av,aw,ax,false).toString();
}
function CallSite(az,aw,ax,aA){
(this[g]=az);
(this[h]=aw);
(this[i]=ax);
(this[j]=aA);
}
function CallSiteGetThis(){
return(this[j])
?(void 0):(this[g]);
}
function CallSiteGetFunction(){
return(this[j])
?(void 0):(this[h]);
}
function CallSiteGetPosition(){
return(this[i]);
}
function CallSiteGetTypeName(){
return GetTypeName((this[g]),false);
}
function CallSiteIsToplevel(){
return %CallSiteIsToplevelRT(this);
}
function CallSiteIsEval(){
return %CallSiteIsEvalRT(this);
}
function CallSiteGetEvalOrigin(){
var Y=%FunctionGetScript((this[h]));
return FormatEvalOrigin(Y);
}
function CallSiteGetScriptNameOrSourceURL(){
return %CallSiteGetScriptNameOrSourceUrlRT(this);
}
function CallSiteGetFunctionName(){
return %CallSiteGetFunctionNameRT(this);
}
function CallSiteGetMethodName(){
return %CallSiteGetMethodNameRT(this);
}
function CallSiteGetFileName(){
return %CallSiteGetFileNameRT(this);
}
function CallSiteGetLineNumber(){
return %CallSiteGetLineNumberRT(this);
}
function CallSiteGetColumnNumber(){
return %CallSiteGetColumnNumberRT(this);
}
function CallSiteIsNative(){
return %CallSiteIsNativeRT(this);
}
function CallSiteIsConstructor(){
return %CallSiteIsConstructorRT(this);
}
function CallSiteToString(){
var aB;
var aC="";
if(this.isNative()){
aC="native";
}else{
aB=this.getScriptNameOrSourceURL();
if(!aB&&this.isEval()){
aC=this.getEvalOrigin();
aC+=", ";
}
if(aB){
aC+=aB;
}else{
aC+="<anonymous>";
}
var aD=this.getLineNumber();
if(aD!=null){
aC+=":"+aD;
var aE=this.getColumnNumber();
if(aE){
aC+=":"+aE;
}
}
}
var af="";
var aF=this.getFunctionName();
var aG=true;
var aH=this.isConstructor();
var aI=!(this.isToplevel()||aH);
if(aI){
var aJ=GetTypeName((this[g]),true);
var aK=this.getMethodName();
if(aF){
if(aJ&&
%_CallFunction(aF,aJ,x)!=0){
af+=aJ+".";
}
af+=aF;
if(aK&&
(%_CallFunction(aF,"."+aK,x)!=
aF.length-aK.length-1)){
af+=" [as "+aK+"]";
}
}else{
af+=aJ+"."+(aK||"<anonymous>");
}
}else if(aH){
af+="new "+(aF||"<anonymous>");
}else if(aF){
af+=aF;
}else{
af+=aC;
aG=false;
}
if(aG){
af+=" ("+aC+")";
}
return af;
}
b.SetUpLockedPrototype(CallSite,["receiver","fun","pos"],[
"getThis",CallSiteGetThis,
"getTypeName",CallSiteGetTypeName,
"isToplevel",CallSiteIsToplevel,
"isEval",CallSiteIsEval,
"getEvalOrigin",CallSiteGetEvalOrigin,
"getScriptNameOrSourceURL",CallSiteGetScriptNameOrSourceURL,
"getFunction",CallSiteGetFunction,
"getFunctionName",CallSiteGetFunctionName,
"getMethodName",CallSiteGetMethodName,
"getFileName",CallSiteGetFileName,
"getLineNumber",CallSiteGetLineNumber,
"getColumnNumber",CallSiteGetColumnNumber,
"isNative",CallSiteIsNative,
"getPosition",CallSiteGetPosition,
"isConstructor",CallSiteIsConstructor,
"toString",CallSiteToString
]);
function FormatEvalOrigin(Y){
var aL=Y.nameOrSourceURL();
if(aL){
return aL;
}
var aM="eval at ";
if(Y.eval_from_function_name){
aM+=Y.eval_from_function_name;
}else{
aM+="<anonymous>";
}
var aN=Y.eval_from_script;
if(aN){
if(aN.compilation_type==1){
aM+=" ("+FormatEvalOrigin(aN)+")";
}else{
if(aN.name){
aM+=" ("+aN.name;
var Z=aN.locationFromPosition(
Y.eval_from_script_position,true);
if(Z){
aM+=":"+(Z.line+1);
aM+=":"+(Z.column+1);
}
aM+=")";
}else{
aM+=" (unknown source)";
}
}
}
return aM;
}
function FormatErrorString(U){
try{
return %_CallFunction(U,ErrorToString);
}catch(e){
try{
return"<error: "+e+">";
}catch(ee){
return"<error>";
}
}
}
function GetStackFrames(aO){
var aP=new r();
var aQ=aO[0];
for(var ae=1;ae<aO.length;ae+=4){
var av=aO[ae];
var aw=aO[ae+1];
var aR=aO[ae+2];
var aS=aO[ae+3];
var ax=%_IsSmi(aR)?aR:%FunctionGetPositionForOffset(aR,aS);
aQ--;
aP.push(new CallSite(av,aw,ax,(aQ<0)));
}
return aP;
}
var aT=false;
function FormatStackTrace(L,aO){
var aP=GetStackFrames(aO);
if((%_IsFunction(E.prepareStackTrace))&&
!aT){
var aU=[];
%MoveArrayContents(aP,aU);
aT=true;
var aV=(void 0);
try{
aV=E.prepareStackTrace(L,aU);
}catch(e){
throw e;
}finally{
aT=false;
}
return aV;
}
var aW=new r();
aW.push(FormatErrorString(L));
for(var ae=0;ae<aP.length;ae++){
var aX=aP[ae];
var af;
try{
af=aX.toString();
}catch(e){
try{
af="<error: "+e+">";
}catch(ee){
af="<error>";
}
}
aW.push("    at "+af);
}
return %_CallFunction(aW,"\n",c);
}
function GetTypeName(az,aY){
if((az==null))return null;
var N=az.constructor;
if(!N){
return aY?null:
%_CallFunction(az,NoSideEffectsObjectToString);
}
var O=N.name;
if(!O){
return aY?null:
%_CallFunction(az,NoSideEffectsObjectToString);
}
return O;
}
var aZ=function(){
var ba=(void 0);
var bb=this;
while(bb){
var ba=
(bb[l]);
if((ba===(void 0))){
var aV=(bb[v]);
if((aV===(void 0))){
bb=%_GetPrototype(bb);
continue;
}
ba=FormatStackTrace(bb,aV);
(bb[v]=(void 0));
(bb[l]=ba);
}
return ba;
}
return(void 0);
};
var bc=function(bd){
if((%HasOwnProperty(this,v))){
(this[v]=(void 0));
(this[l]=bd);
}
};
var be=function(){};
function DefineError(a,bf){
var bg=bf.name;
%AddNamedProperty(a,bg,bf,2);
if(bg=='Error'){
var bh=function(){};
%FunctionSetPrototype(bh,n.prototype);
%FunctionSetInstanceClassName(bh,'Error');
%FunctionSetPrototype(bf,new bh());
}else{
%FunctionSetPrototype(bf,new E());
%InternalSetPrototype(bf,E);
}
%FunctionSetInstanceClassName(bf,'Error');
%AddNamedProperty(bf.prototype,'constructor',bf,2);
%AddNamedProperty(bf.prototype,'name',bg,2);
%SetCode(bf,function(bi){
if(%_IsConstructCall()){
try{be(this,bf);}catch(e){}
if(!(bi===(void 0))){
%AddNamedProperty(this,'message',(%_ToString(bi)),2);
}
}else{
return new bf(bi);
}
});
%SetNativeFlag(bf);
return bf;
};
E=DefineError(a,function Error(){});
K=DefineError(a,function EvalError(){});
G=DefineError(a,function RangeError(){});
J=DefineError(a,function ReferenceError(){});
I=DefineError(a,function SyntaxError(){});
F=DefineError(a,function TypeError(){});
H=DefineError(a,function URIError(){});
%AddNamedProperty(E.prototype,'message','',2);
function ErrorToString(){
if(!(%_IsSpecObject(this))){
throw MakeTypeError(14,"Error.prototype.toString");
}
return %ErrorToStringRT(this);
}
b.InstallFunctions(E.prototype,2,
['toString',ErrorToString]);
$errorToString=ErrorToString;
MakeError=function(Q,R,S,T){
return MakeGenericError(E,Q,R,S,T);
}
MakeRangeError=function(Q,R,S,T){
return MakeGenericError(G,Q,R,S,T);
}
MakeSyntaxError=function(Q,R,S,T){
return MakeGenericError(I,Q,R,S,T);
}
MakeTypeError=function(Q,R,S,T){
return MakeGenericError(F,Q,R,S,T);
}
MakeURIError=function(){
return MakeGenericError(H,240);
}
var bj=MakeRangeError(151);
%DefineAccessorPropertyUnchecked(bj,'stack',
aZ,bc,
2);
be=function captureStackTrace(L,bk){
t(L,'stack',{get:aZ,
set:bc,
configurable:true});
%CollectStackTrace(L,bk?bk:be);
};
E.captureStackTrace=be;
%InstallToContext([
"error_function",E,
"eval_error_function",K,
"get_stack_trace_line_fun",GetStackTraceLine,
"make_error_function",MakeGenericError,
"make_range_error",MakeRangeError,
"make_type_error",MakeTypeError,
"message_get_column_number",GetColumnNumber,
"message_get_line_number",GetLineNumber,
"message_get_source_line",GetSourceLine,
"no_side_effect_to_string_fun",NoSideEffectToString,
"range_error_function",G,
"reference_error_function",J,
"stack_overflow_boilerplate",bj,
"syntax_error_function",I,
"to_detail_string_fun",ToDetailString,
"type_error_function",F,
"uri_error_function",H,
]);
});

jsonõ:
(function(a,b){
"use strict";
%CheckIsBootstrapping();
var c=a.JSON;
var d=b.InternalArray;
var e;
var f;
var g;
var h;
var i=b.ImportNow("to_string_tag_symbol");
b.Import(function(j){
e=j.MathMax;
f=j.MathMin;
g=j.ObjectHasOwnProperty;
h=j.ToNumber;
});
function Revive(k,l,m){
var n=k[l];
if((typeof(n)==='object')){
if((%_IsArray(n))){
var o=n.length;
for(var p=0;p<o;p++){
var q=Revive(n,%_NumberToString(p),m);
n[p]=q;
}
}else{
for(var r in n){
if((%_CallFunction(n,r,g))){
var q=Revive(n,r,m);
if((q===(void 0))){
delete n[r];
}else{
n[r]=q;
}
}
}
}
}
return %_Call(m,k,l,n);
}
function JSONParse(s,m){
var t=%ParseJson(s);
if((typeof(m)==='function')){
return Revive({'':t},'',m);
}else{
return t;
}
}
function SerializeArray(u,v,w,x,y){
if(!%PushIfAbsent(w,u))throw MakeTypeError(18);
var z=x;
x+=y;
var A=new d();
var B=u.length;
for(var p=0;p<B;p++){
var C=JSONSerialize(%_NumberToString(p),u,v,w,
x,y);
if((C===(void 0))){
C="null";
}
A.push(C);
}
var D;
if(y==""){
D="["+A.join(",")+"]";
}else if(A.length>0){
var E=",\n"+x;
D="[\n"+x+A.join(E)+"\n"+
z+"]";
}else{
D="[]";
}
w.pop();
return D;
}
function SerializeObject(u,v,w,x,y){
if(!%PushIfAbsent(w,u))throw MakeTypeError(18);
var z=x;
x+=y;
var A=new d();
if((%_IsArray(v))){
var o=v.length;
for(var p=0;p<o;p++){
if((%_CallFunction(v,p,g))){
var r=v[p];
var C=JSONSerialize(r,u,v,w,x,y);
if(!(C===(void 0))){
var F=%QuoteJSONString(r)+":";
if(y!="")F+=" ";
F+=C;
A.push(F);
}
}
}
}else{
for(var r in u){
if((%_CallFunction(u,r,g))){
var C=JSONSerialize(r,u,v,w,x,y);
if(!(C===(void 0))){
var F=%QuoteJSONString(r)+":";
if(y!="")F+=" ";
F+=C;
A.push(F);
}
}
}
}
var D;
if(y==""){
D="{"+A.join(",")+"}";
}else if(A.length>0){
var E=",\n"+x;
D="{\n"+x+A.join(E)+"\n"+
z+"}";
}else{
D="{}";
}
w.pop();
return D;
}
function JSONSerialize(G,k,v,w,x,y){
var u=k[G];
if((%_IsSpecObject(u))){
var H=u.toJSON;
if((typeof(H)==='function')){
u=%_Call(H,u,G);
}
}
if((typeof(v)==='function')){
u=%_Call(v,k,G,u);
}
if((typeof(u)==='string')){
return %QuoteJSONString(u);
}else if((typeof(u)==='number')){
return((%_IsSmi(%IS_VAR(u))||u-u==0)?%_NumberToString(u):"null");
}else if((typeof(u)==='boolean')){
return u?"true":"false";
}else if((u===null)){
return"null";
}else if((%_IsSpecObject(u))&&!(typeof(u)==='function')){
if((%_IsArray(u))){
return SerializeArray(u,v,w,x,y);
}else if((%_ClassOf(u)==='Number')){
u=h(u);
return((%_IsSmi(%IS_VAR(u))||u-u==0)?%_NumberToString(u):"null");
}else if((%_ClassOf(u)==='String')){
return %QuoteJSONString((%_ToString(u)));
}else if((%_ClassOf(u)==='Boolean')){
return %_ValueOf(u)?"true":"false";
}else{
return SerializeObject(u,v,w,x,y);
}
}
return(void 0);
}
function JSONStringify(u,v,I){
if(%_ArgumentsLength()==1){
return %BasicJSONStringify(u);
}
if((%_IsArray(v))){
var J=new d();
var K={__proto__:null};
var o=v.length;
for(var p=0;p<o;p++){
var L=v[p];
var M;
if((typeof(L)==='string')){
M=L;
}else if((typeof(L)==='number')){
M=%_NumberToString(L);
}else if((%_ClassOf(L)==='String')||(%_ClassOf(L)==='Number')){
M=(%_ToString(L));
}else{
continue;
}
if(!K[M]){
J.push(M);
K[M]=true;
}
}
v=J;
}
if((typeof(I)==='object')){
if((%_ClassOf(I)==='Number')){
I=h(I);
}else if((%_ClassOf(I)==='String')){
I=(%_ToString(I));
}
}
var y;
if((typeof(I)==='number')){
I=e(0,f((%_ToInteger(I)),10));
y=%_SubString("          ",0,I);
}else if((typeof(I)==='string')){
if(I.length>10){
y=%_SubString(I,0,10);
}else{
y=I;
}
}else{
y="";
}
return JSONSerialize('',{'':u},v,new d(),"",y);
}
%AddNamedProperty(c,i,"JSON",1|2);
b.InstallFunctions(c,2,[
"parse",JSONParse,
"stringify",JSONStringify
]);
function JsonSerializeAdapter(G,N){
var k={};
k[G]=N;
return JSONSerialize(G,k,(void 0),new d(),"","");
}
%InstallToContext(["json_serialize_adapter",JsonSerializeAdapter]);
})

8array-iterator
=
var $arrayValues;
(function(a,b){
"use strict";
%CheckIsBootstrapping();
var c=
b.ImportNow("array_iteration_kind_symbol");
var d=
b.ImportNow("array_iterator_next_symbol");
var e=
b.ImportNow("array_iterator_object_symbol");
var f=a.Array;
var g=b.ImportNow("iterator_symbol");
var h=b.ImportNow("to_string_tag_symbol");
var i=a.Uint8Array;

var j=a.Int8Array;

var k=a.Uint16Array;

var l=a.Int16Array;

var m=a.Uint32Array;

var n=a.Int32Array;

var o=a.Float32Array;

var p=a.Float64Array;

var q=a.Uint8ClampedArray;


function ArrayIterator(){}
function CreateArrayIterator(r,s){
var t=(%_ToObject(r));
var u=new ArrayIterator;
(u[e]=t);
(u[d]=0);
(u[c]=s);
return u;
}
function ArrayIteratorIterator(){
return this;
}
function ArrayIteratorNext(){
var u=this;
var v=(void 0);
var w=true;
if(!(%_IsSpecObject(u))||
!(!(u[d]===(void 0)))){
throw MakeTypeError(36,
'Array Iterator.prototype.next',this);
}
var r=(u[e]);
if(!(r===(void 0))){
var x=(u[d]);
var y=(u[c]);
var z=(r.length>>>0);
if(x>=z){
(u[e]=(void 0));
}else{
(u[d]=x+1);
if(y==2){
v=r[x];
}else if(y==3){
v=[x,r[x]];
}else{
v=x;
}
w=false;
}
}
return %_CreateIterResultObject(v,w);
}
function ArrayEntries(){
return CreateArrayIterator(this,3);
}
function ArrayValues(){
return CreateArrayIterator(this,2);
}
function ArrayKeys(){
return CreateArrayIterator(this,1);
}
%FunctionSetPrototype(ArrayIterator,{__proto__:$iteratorPrototype});
%FunctionSetInstanceClassName(ArrayIterator,'Array Iterator');
b.InstallFunctions(ArrayIterator.prototype,2,[
'next',ArrayIteratorNext
]);
b.SetFunctionName(ArrayIteratorIterator,g);
%AddNamedProperty(ArrayIterator.prototype,g,
ArrayIteratorIterator,2);
%AddNamedProperty(ArrayIterator.prototype,h,
"Array Iterator",1|2);
b.InstallFunctions(f.prototype,2,[
'entries',ArrayEntries,
'keys',ArrayKeys
]);
b.SetFunctionName(ArrayValues,'values');
%AddNamedProperty(f.prototype,g,ArrayValues,
2);
%AddNamedProperty(i.prototype,'entries',ArrayEntries,2);
%AddNamedProperty(i.prototype,'values',ArrayValues,2);
%AddNamedProperty(i.prototype,'keys',ArrayKeys,2);
%AddNamedProperty(i.prototype,g,ArrayValues,
2);

%AddNamedProperty(j.prototype,'entries',ArrayEntries,2);
%AddNamedProperty(j.prototype,'values',ArrayValues,2);
%AddNamedProperty(j.prototype,'keys',ArrayKeys,2);
%AddNamedProperty(j.prototype,g,ArrayValues,
2);

%AddNamedProperty(k.prototype,'entries',ArrayEntries,2);
%AddNamedProperty(k.prototype,'values',ArrayValues,2);
%AddNamedProperty(k.prototype,'keys',ArrayKeys,2);
%AddNamedProperty(k.prototype,g,ArrayValues,
2);

%AddNamedProperty(l.prototype,'entries',ArrayEntries,2);
%AddNamedProperty(l.prototype,'values',ArrayValues,2);
%AddNamedProperty(l.prototype,'keys',ArrayKeys,2);
%AddNamedProperty(l.prototype,g,ArrayValues,
2);

%AddNamedProperty(m.prototype,'entries',ArrayEntries,2);
%AddNamedProperty(m.prototype,'values',ArrayValues,2);
%AddNamedProperty(m.prototype,'keys',ArrayKeys,2);
%AddNamedProperty(m.prototype,g,ArrayValues,
2);

%AddNamedProperty(n.prototype,'entries',ArrayEntries,2);
%AddNamedProperty(n.prototype,'values',ArrayValues,2);
%AddNamedProperty(n.prototype,'keys',ArrayKeys,2);
%AddNamedProperty(n.prototype,g,ArrayValues,
2);

%AddNamedProperty(o.prototype,'entries',ArrayEntries,2);
%AddNamedProperty(o.prototype,'values',ArrayValues,2);
%AddNamedProperty(o.prototype,'keys',ArrayKeys,2);
%AddNamedProperty(o.prototype,g,ArrayValues,
2);

%AddNamedProperty(p.prototype,'entries',ArrayEntries,2);
%AddNamedProperty(p.prototype,'values',ArrayValues,2);
%AddNamedProperty(p.prototype,'keys',ArrayKeys,2);
%AddNamedProperty(p.prototype,g,ArrayValues,
2);

%AddNamedProperty(q.prototype,'entries',ArrayEntries,2);
%AddNamedProperty(q.prototype,'values',ArrayValues,2);
%AddNamedProperty(q.prototype,'keys',ArrayKeys,2);
%AddNamedProperty(q.prototype,g,ArrayValues,
2);


$arrayValues=ArrayValues;
%InstallToContext(["array_values_iterator",ArrayValues]);
})

<string-iterator1
(function(a,b){
"use strict";
%CheckIsBootstrapping();
var c=a.String;
var d=b.ImportNow("iterator_symbol");
var e=
b.ImportNow("string_iterator_iterated_string_symbol");
var f=
b.ImportNow("string_iterator_next_index_symbol");
var g=b.ImportNow("to_string_tag_symbol");
function StringIterator(){}
function CreateStringIterator(h){
var i=(%_ToString(h));
var j=new StringIterator;
(j[e]=i);
(j[f]=0);
return j;
}
function StringIteratorNext(){
var j=this;
var k=(void 0);
var l=true;
if(!(%_IsSpecObject(j))||
!(!(j[f]===(void 0)))){
throw MakeTypeError(36,
'String Iterator.prototype.next');
}
var i=(j[e]);
if(!(i===(void 0))){
var m=(j[f]);
var n=(i.length>>>0);
if(m>=n){
(j[e]=(void 0));
}else{
var o=%_StringCharCodeAt(i,m);
k=%_StringCharFromCode(o);
l=false;
m++;
if(o>=0xD800&&o<=0xDBFF&&m<n){
var p=%_StringCharCodeAt(i,m);
if(p>=0xDC00&&p<=0xDFFF){
k+=%_StringCharFromCode(p);
m++;
}
}
(j[f]=m);
}
}
return %_CreateIterResultObject(k,l);
}
function StringPrototypeIterator(){
return CreateStringIterator(this);
}
%FunctionSetPrototype(StringIterator,{__proto__:$iteratorPrototype});
%FunctionSetInstanceClassName(StringIterator,'String Iterator');
b.InstallFunctions(StringIterator.prototype,2,[
'next',StringIteratorNext
]);
%AddNamedProperty(StringIterator.prototype,g,
"String Iterator",1|2);
b.SetFunctionName(StringPrototypeIterator,d);
%AddNamedProperty(c.prototype,d,
StringPrototypeIterator,2);
})

$templatesi
(function(a,b){
"use strict";
%CheckIsBootstrapping();
var c=a.Map;
var d=b.InternalArray;
var e=new c;
var f=c.prototype.get;
var g=c.prototype.set;
function SameCallSiteElements(h,i){
var j=h.length;
var i=i.raw;
if(j!==i.length)return false;
for(var k=0;k<j;++k){
if(h[k]!==i[k])return false;
}
return true;
}
function GetCachedCallSite(l,m){
var n=%_CallFunction(e,m,f);
if((n===(void 0)))return;
var j=n.length;
for(var k=0;k<j;++k){
if(SameCallSiteElements(l,n[k]))return n[k];
}
}
function SetCachedCallSite(l,m){
var n=%_CallFunction(e,m,f);
var o;
if((n===(void 0))){
o=new d(1);
o[0]=l;
%_CallFunction(e,m,o,g);
}else{
n.push(l);
}
return l;
}
function GetTemplateCallSite(l,h,m){
var p=GetCachedCallSite(h,m);
if(!(p===(void 0)))return p;
%AddNamedProperty(l,"raw",%ObjectFreeze(h),
1|2|4);
return SetCachedCallSite(%ObjectFreeze(l),m);
}
%InstallToContext(["get_template_call_site",GetTemplateCallSite]);
})

4harmony-arrayQ<
(function(a,b){
'use strict';
%CheckIsBootstrapping();
var c;
var d;
var e=a.Array;
var f=b.ImportNow("iterator_symbol");
var g;
var h;
var i;
var j;
var k;
b.Import(function(l){
c=l.GetIterator;
d=l.GetMethod;
g=l.MathMax;
h=l.MathMin;
i=l.ObjectIsFrozen;
j=l.ObjectDefineProperty;
k=l.ToNumber;
});
function InnerArrayCopyWithin(m,n,o,p,q){
m=(%_ToInteger(m));
var r;
if(m<0){
r=g(q+m,0);
}else{
r=h(m,q);
}
n=(%_ToInteger(n));
var l;
if(n<0){
l=g(q+n,0);
}else{
l=h(n,q);
}
o=(o===(void 0))?q:(%_ToInteger(o));
var s;
if(o<0){
s=g(q+o,0);
}else{
s=h(o,q);
}
var t=h(s-l,q-r);
var u=1;
if(l<r&&r<(l+t)){
u=-1;
l=l+t-1;
r=r+t-1;
}
while(t>0){
if(l in p){
p[r]=p[l];
}else{
delete p[r];
}
l=l+u;
r=r+u;
t--;
}
return p;
}
function ArrayCopyWithin(m,n,o){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"Array.prototype.copyWithin");
var p=(%_ToObject(this));
var q=(%ToLength(p.length));
return InnerArrayCopyWithin(m,n,o,p,q);
}
function InnerArrayFind(v,w,p,q){
if(!(typeof(v)==='function')){
throw MakeTypeError(13,v);
}
for(var x=0;x<q;x++){
var y=p[x];
if(%_Call(v,w,y,x,p)){
return y;
}
}
return;
}
function ArrayFind(v,w){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"Array.prototype.find");
var p=(%_ToObject(this));
var q=(%_ToInteger(p.length));
return InnerArrayFind(v,w,p,q);
}
function InnerArrayFindIndex(v,w,p,q){
if(!(typeof(v)==='function')){
throw MakeTypeError(13,v);
}
for(var x=0;x<q;x++){
var y=p[x];
if(%_Call(v,w,y,x,p)){
return x;
}
}
return-1;
}
function ArrayFindIndex(v,w){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"Array.prototype.findIndex");
var p=(%_ToObject(this));
var q=(%_ToInteger(p.length));
return InnerArrayFindIndex(v,w,p,q);
}
function InnerArrayFill(z,n,o,p,q){
var x=(n===(void 0))?0:(%_ToInteger(n));
var o=(o===(void 0))?q:(%_ToInteger(o));
if(x<0){
x+=q;
if(x<0)x=0;
}else{
if(x>q)x=q;
}
if(o<0){
o+=q;
if(o<0)o=0;
}else{
if(o>q)o=q;
}
if((o-x)>0&&i(p)){
throw MakeTypeError(10);
}
for(;x<o;x++)
p[x]=z;
return p;
}
function ArrayFill(z,n,o){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"Array.prototype.fill");
var p=(%_ToObject(this));
var q=(harmony_tolength?(%ToLength(p.length)):(p.length>>>0));
return InnerArrayFill(z,n,o,p,q);
}
function AddArrayElement(A,p,x,z){
if(A===e){
%AddElement(p,x,z);
}else{
j(p,x,{
value:z,writable:true,configurable:true,enumerable:true
});
}
}
function ArrayFrom(B,C,D){
var E=(%_ToObject(B));
var F=!(C===(void 0));
if(F){
if(!(typeof(C)==='function')){
throw MakeTypeError(13,C);
}
}
var G=d(E,f);
var H;
var I;
var J;
var K;
if(!(G===(void 0))){
I=%IsConstructor(this)?new this():[];
var L=c(E,G);
H=0;
while(true){
var M=L.next();
if(!(typeof(M)==='object')){
throw MakeTypeError(41,M);
}
if(M.done){
I.length=H;
return I;
}
K=M.value;
if(F){
J=%_Call(C,D,K,H);
}else{
J=K;
}
AddArrayElement(this,I,H,J);
H++;
}
}else{
var N=(%ToLength(E.length));
I=%IsConstructor(this)?new this(N):new e(N);
for(H=0;H<N;++H){
K=E[H];
if(F){
J=%_Call(C,D,K,H);
}else{
J=K;
}
AddArrayElement(this,I,H,J);
}
I.length=H;
return I;
}
}
function ArrayOf(){
var q=%_ArgumentsLength();
var A=this;
var p=%IsConstructor(A)?new A(q):[];
for(var x=0;x<q;x++){
AddArrayElement(A,p,x,%_Arguments(x));
}
p.length=q;
return p;
}
%FunctionSetLength(ArrayCopyWithin,2);
%FunctionSetLength(ArrayFrom,1);
%FunctionSetLength(ArrayFill,1);
%FunctionSetLength(ArrayFind,1);
%FunctionSetLength(ArrayFindIndex,1);
b.InstallFunctions(e,2,[
"from",ArrayFrom,
"of",ArrayOf
]);
b.InstallFunctions(e.prototype,2,[
"copyWithin",ArrayCopyWithin,
"find",ArrayFind,
"findIndex",ArrayFindIndex,
"fill",ArrayFill
]);
b.Export(function(r){
r.ArrayFrom=ArrayFrom;
r.InnerArrayCopyWithin=InnerArrayCopyWithin;
r.InnerArrayFill=InnerArrayFill;
r.InnerArrayFind=InnerArrayFind;
r.InnerArrayFindIndex=InnerArrayFindIndex;
});
})

Hharmony-typedarrayY°
(function(a,b){
"use strict";
%CheckIsBootstrapping();
var c=a.Uint8Array;

var d=a.Int8Array;

var e=a.Uint16Array;

var f=a.Int16Array;

var g=a.Uint32Array;

var h=a.Int32Array;

var i=a.Float32Array;

var j=a.Float64Array;

var k=a.Uint8ClampedArray;


var l=a.Array;

var m;
var n;
var o;
var p;
var q;
var r;
var s;
var t;
var u;
var v;
var w;
var x;
var y;
var z;
var A;
var B;
var C;
var D;
var E;
var F;
var G;
b.Import(function(H){
m=H.ArrayFrom;
n=H.ArrayToString;
o=H.InnerArrayCopyWithin;
p=H.InnerArrayEvery;
q=H.InnerArrayFill;
r=H.InnerArrayFilter;
s=H.InnerArrayFind;
t=H.InnerArrayFindIndex;
u=H.InnerArrayForEach;
v=H.InnerArrayIndexOf;
w=H.InnerArrayJoin;
x=H.InnerArrayLastIndexOf;
y=H.InnerArrayMap;
InnerArrayReduce=H.InnerArrayReduce;
InnerArrayReduceRight=H.InnerArrayReduceRight;
z=H.InnerArraySome;
A=H.InnerArraySort;
B=H.InnerArrayToLocaleString;
C=H.IsNaN;
D=H.MathMax;
E=H.MathMin;
F=H.PackedArrayReverse;
G=H.ToNumber;
});
function ConstructTypedArray(I,J){
if(!%IsConstructor(I)||(I.prototype===(void 0))||
!%HasOwnProperty(I.prototype,"BYTES_PER_ELEMENT")){
throw MakeTypeError(60);
}
return new I(J);
}
function ConstructTypedArrayLike(K,J){
return ConstructTypedArray(K.constructor,J);
}
function TypedArrayCopyWithin(L,M,N){
if(!%_IsTypedArray(this))throw MakeTypeError(60);
var O=%_TypedArrayGetLength(this);
return o(L,M,N,this,O);
}
%FunctionSetLength(TypedArrayCopyWithin,2);
function TypedArrayEvery(P,Q){
if(!%_IsTypedArray(this))throw MakeTypeError(60);
var O=%_TypedArrayGetLength(this);
return p(P,Q,this,O);
}
%FunctionSetLength(TypedArrayEvery,1);
function TypedArrayForEach(P,Q){
if(!%_IsTypedArray(this))throw MakeTypeError(60);
var O=%_TypedArrayGetLength(this);
u(P,Q,this,O);
}
%FunctionSetLength(TypedArrayForEach,1);
function TypedArrayFill(R,M,N){
if(!%_IsTypedArray(this))throw MakeTypeError(60);
var O=%_TypedArrayGetLength(this);
return q(R,M,N,this,O);
}
%FunctionSetLength(TypedArrayFill,1);
function TypedArrayFilter(S,T){
if(!%_IsTypedArray(this))throw MakeTypeError(60);
var O=%_TypedArrayGetLength(this);
var U=r(S,T,this,O);
return ConstructTypedArrayLike(this,U);
}
%FunctionSetLength(TypedArrayFilter,1);
function TypedArrayFind(S,T){
if(!%_IsTypedArray(this))throw MakeTypeError(60);
var O=%_TypedArrayGetLength(this);
return s(S,T,this,O);
}
%FunctionSetLength(TypedArrayFind,1);
function TypedArrayFindIndex(S,T){
if(!%_IsTypedArray(this))throw MakeTypeError(60);
var O=%_TypedArrayGetLength(this);
return t(S,T,this,O);
}
%FunctionSetLength(TypedArrayFindIndex,1);
function TypedArrayReverse(){
if(!%_IsTypedArray(this))throw MakeTypeError(60);
var O=%_TypedArrayGetLength(this);
return F(this,O);
}
function TypedArrayComparefn(V,W){
if(C(V)&&C(W)){
return C(W)?0:1;
}
if(C(V)){
return 1;
}
if(V===0&&V===W){
if(%_IsMinusZero(V)){
if(!%_IsMinusZero(W)){
return-1;
}
}else if(%_IsMinusZero(W)){
return 1;
}
}
return V-W;
}
function TypedArraySort(X){
if(!%_IsTypedArray(this))throw MakeTypeError(60);
var O=%_TypedArrayGetLength(this);
if((X===(void 0))){
X=TypedArrayComparefn;
}
return A(this,O,X);
}
function TypedArrayIndexOf(Y,Z){
if(!%_IsTypedArray(this))throw MakeTypeError(60);
var O=%_TypedArrayGetLength(this);
return v(this,Y,Z,O);
}
%FunctionSetLength(TypedArrayIndexOf,1);
function TypedArrayLastIndexOf(Y,Z){
if(!%_IsTypedArray(this))throw MakeTypeError(60);
var O=%_TypedArrayGetLength(this);
return x(this,Y,Z,O,
%_ArgumentsLength());
}
%FunctionSetLength(TypedArrayLastIndexOf,1);
function TypedArrayMap(S,T){
if(!%_IsTypedArray(this))throw MakeTypeError(60);
var O=%_TypedArrayGetLength(this);
var U=y(S,T,this,O);
return ConstructTypedArrayLike(this,U);
}
%FunctionSetLength(TypedArrayMap,1);
function TypedArraySome(P,Q){
if(!%_IsTypedArray(this))throw MakeTypeError(60);
var O=%_TypedArrayGetLength(this);
return z(P,Q,this,O);
}
%FunctionSetLength(TypedArraySome,1);
function TypedArrayToLocaleString(){
if(!%_IsTypedArray(this))throw MakeTypeError(60);
var O=%_TypedArrayGetLength(this);
return B(this,O);
}
function TypedArrayToString(){
return %_Call(n,this);
}
function TypedArrayJoin(aa){
if(!%_IsTypedArray(this))throw MakeTypeError(60);
var O=%_TypedArrayGetLength(this);
return w(aa,this,O);
}
function TypedArrayReduce(ab,ac){
if(!%_IsTypedArray(this))throw MakeTypeError(60);
var O=%_TypedArrayGetLength(this);
return InnerArrayReduce(ab,ac,this,O,
%_ArgumentsLength());
}
%FunctionSetLength(TypedArrayReduce,1);
function TypedArrayReduceRight(ab,ac){
if(!%_IsTypedArray(this))throw MakeTypeError(60);
var O=%_TypedArrayGetLength(this);
return InnerArrayReduceRight(ab,ac,this,O,
%_ArgumentsLength());
}
%FunctionSetLength(TypedArrayReduceRight,1);
function TypedArraySlice(M,N){
if(!%_IsTypedArray(this))throw MakeTypeError(60);
var ad=%_TypedArrayGetLength(this);
var ae=(%_ToInteger(M));
var af;
if(ae<0){
af=D(ad+ae,0);
}else{
af=E(ae,ad);
}
var ag;
if((N===(void 0))){
ag=ad;
}else{
ag=(%_ToInteger(N));
}
var ah;
if(ag<0){
ah=D(ad+ag,0);
}else{
ah=E(ag,ad);
}
var ai=D(ah-af,0);
var U=ConstructTypedArrayLike(this,ai);
var aj=0;
while(af<ah){
var ak=this[af];
U[aj]=ak;
af++;
aj++;
}
return U;
}
function TypedArrayOf(){
var O=%_ArgumentsLength();
var U=new this(O);
for(var al=0;al<O;al++){
U[al]=%_Arguments(al);
}
return U;
}
function TypedArrayFrom(am,an,T){
var U=%_Call(m,l,am,an,T);
return ConstructTypedArray(this,U);
}
%FunctionSetLength(TypedArrayFrom,1);
b.InstallFunctions(c,2|4|1,[
"from",TypedArrayFrom,
"of",TypedArrayOf
]);
b.InstallFunctions(c.prototype,2,[
"copyWithin",TypedArrayCopyWithin,
"every",TypedArrayEvery,
"fill",TypedArrayFill,
"filter",TypedArrayFilter,
"find",TypedArrayFind,
"findIndex",TypedArrayFindIndex,
"indexOf",TypedArrayIndexOf,
"join",TypedArrayJoin,
"lastIndexOf",TypedArrayLastIndexOf,
"forEach",TypedArrayForEach,
"map",TypedArrayMap,
"reduce",TypedArrayReduce,
"reduceRight",TypedArrayReduceRight,
"reverse",TypedArrayReverse,
"slice",TypedArraySlice,
"some",TypedArraySome,
"sort",TypedArraySort,
"toString",TypedArrayToString,
"toLocaleString",TypedArrayToLocaleString
]);

b.InstallFunctions(d,2|4|1,[
"from",TypedArrayFrom,
"of",TypedArrayOf
]);
b.InstallFunctions(d.prototype,2,[
"copyWithin",TypedArrayCopyWithin,
"every",TypedArrayEvery,
"fill",TypedArrayFill,
"filter",TypedArrayFilter,
"find",TypedArrayFind,
"findIndex",TypedArrayFindIndex,
"indexOf",TypedArrayIndexOf,
"join",TypedArrayJoin,
"lastIndexOf",TypedArrayLastIndexOf,
"forEach",TypedArrayForEach,
"map",TypedArrayMap,
"reduce",TypedArrayReduce,
"reduceRight",TypedArrayReduceRight,
"reverse",TypedArrayReverse,
"slice",TypedArraySlice,
"some",TypedArraySome,
"sort",TypedArraySort,
"toString",TypedArrayToString,
"toLocaleString",TypedArrayToLocaleString
]);

b.InstallFunctions(e,2|4|1,[
"from",TypedArrayFrom,
"of",TypedArrayOf
]);
b.InstallFunctions(e.prototype,2,[
"copyWithin",TypedArrayCopyWithin,
"every",TypedArrayEvery,
"fill",TypedArrayFill,
"filter",TypedArrayFilter,
"find",TypedArrayFind,
"findIndex",TypedArrayFindIndex,
"indexOf",TypedArrayIndexOf,
"join",TypedArrayJoin,
"lastIndexOf",TypedArrayLastIndexOf,
"forEach",TypedArrayForEach,
"map",TypedArrayMap,
"reduce",TypedArrayReduce,
"reduceRight",TypedArrayReduceRight,
"reverse",TypedArrayReverse,
"slice",TypedArraySlice,
"some",TypedArraySome,
"sort",TypedArraySort,
"toString",TypedArrayToString,
"toLocaleString",TypedArrayToLocaleString
]);

b.InstallFunctions(f,2|4|1,[
"from",TypedArrayFrom,
"of",TypedArrayOf
]);
b.InstallFunctions(f.prototype,2,[
"copyWithin",TypedArrayCopyWithin,
"every",TypedArrayEvery,
"fill",TypedArrayFill,
"filter",TypedArrayFilter,
"find",TypedArrayFind,
"findIndex",TypedArrayFindIndex,
"indexOf",TypedArrayIndexOf,
"join",TypedArrayJoin,
"lastIndexOf",TypedArrayLastIndexOf,
"forEach",TypedArrayForEach,
"map",TypedArrayMap,
"reduce",TypedArrayReduce,
"reduceRight",TypedArrayReduceRight,
"reverse",TypedArrayReverse,
"slice",TypedArraySlice,
"some",TypedArraySome,
"sort",TypedArraySort,
"toString",TypedArrayToString,
"toLocaleString",TypedArrayToLocaleString
]);

b.InstallFunctions(g,2|4|1,[
"from",TypedArrayFrom,
"of",TypedArrayOf
]);
b.InstallFunctions(g.prototype,2,[
"copyWithin",TypedArrayCopyWithin,
"every",TypedArrayEvery,
"fill",TypedArrayFill,
"filter",TypedArrayFilter,
"find",TypedArrayFind,
"findIndex",TypedArrayFindIndex,
"indexOf",TypedArrayIndexOf,
"join",TypedArrayJoin,
"lastIndexOf",TypedArrayLastIndexOf,
"forEach",TypedArrayForEach,
"map",TypedArrayMap,
"reduce",TypedArrayReduce,
"reduceRight",TypedArrayReduceRight,
"reverse",TypedArrayReverse,
"slice",TypedArraySlice,
"some",TypedArraySome,
"sort",TypedArraySort,
"toString",TypedArrayToString,
"toLocaleString",TypedArrayToLocaleString
]);

b.InstallFunctions(h,2|4|1,[
"from",TypedArrayFrom,
"of",TypedArrayOf
]);
b.InstallFunctions(h.prototype,2,[
"copyWithin",TypedArrayCopyWithin,
"every",TypedArrayEvery,
"fill",TypedArrayFill,
"filter",TypedArrayFilter,
"find",TypedArrayFind,
"findIndex",TypedArrayFindIndex,
"indexOf",TypedArrayIndexOf,
"join",TypedArrayJoin,
"lastIndexOf",TypedArrayLastIndexOf,
"forEach",TypedArrayForEach,
"map",TypedArrayMap,
"reduce",TypedArrayReduce,
"reduceRight",TypedArrayReduceRight,
"reverse",TypedArrayReverse,
"slice",TypedArraySlice,
"some",TypedArraySome,
"sort",TypedArraySort,
"toString",TypedArrayToString,
"toLocaleString",TypedArrayToLocaleString
]);

b.InstallFunctions(i,2|4|1,[
"from",TypedArrayFrom,
"of",TypedArrayOf
]);
b.InstallFunctions(i.prototype,2,[
"copyWithin",TypedArrayCopyWithin,
"every",TypedArrayEvery,
"fill",TypedArrayFill,
"filter",TypedArrayFilter,
"find",TypedArrayFind,
"findIndex",TypedArrayFindIndex,
"indexOf",TypedArrayIndexOf,
"join",TypedArrayJoin,
"lastIndexOf",TypedArrayLastIndexOf,
"forEach",TypedArrayForEach,
"map",TypedArrayMap,
"reduce",TypedArrayReduce,
"reduceRight",TypedArrayReduceRight,
"reverse",TypedArrayReverse,
"slice",TypedArraySlice,
"some",TypedArraySome,
"sort",TypedArraySort,
"toString",TypedArrayToString,
"toLocaleString",TypedArrayToLocaleString
]);

b.InstallFunctions(j,2|4|1,[
"from",TypedArrayFrom,
"of",TypedArrayOf
]);
b.InstallFunctions(j.prototype,2,[
"copyWithin",TypedArrayCopyWithin,
"every",TypedArrayEvery,
"fill",TypedArrayFill,
"filter",TypedArrayFilter,
"find",TypedArrayFind,
"findIndex",TypedArrayFindIndex,
"indexOf",TypedArrayIndexOf,
"join",TypedArrayJoin,
"lastIndexOf",TypedArrayLastIndexOf,
"forEach",TypedArrayForEach,
"map",TypedArrayMap,
"reduce",TypedArrayReduce,
"reduceRight",TypedArrayReduceRight,
"reverse",TypedArrayReverse,
"slice",TypedArraySlice,
"some",TypedArraySome,
"sort",TypedArraySort,
"toString",TypedArrayToString,
"toLocaleString",TypedArrayToLocaleString
]);

b.InstallFunctions(k,2|4|1,[
"from",TypedArrayFrom,
"of",TypedArrayOf
]);
b.InstallFunctions(k.prototype,2,[
"copyWithin",TypedArrayCopyWithin,
"every",TypedArrayEvery,
"fill",TypedArrayFill,
"filter",TypedArrayFilter,
"find",TypedArrayFind,
"findIndex",TypedArrayFindIndex,
"indexOf",TypedArrayIndexOf,
"join",TypedArrayJoin,
"lastIndexOf",TypedArrayLastIndexOf,
"forEach",TypedArrayForEach,
"map",TypedArrayMap,
"reduce",TypedArrayReduce,
"reduceRight",TypedArrayReduceRight,
"reverse",TypedArrayReverse,
"slice",TypedArraySlice,
"some",TypedArraySome,
"sort",TypedArraySort,
"toString",TypedArrayToString,
"toLocaleString",TypedArrayToLocaleString
]);


})

i18núä
(function(a,b){
"use strict";
%CheckIsBootstrapping();
var c;
var d;
var e;
var f;
var g;
var h=a.Boolean;
var i=a.Date;
var j=a.Number;
var k=a.RegExp;
var l=a.String;
var m;
var n=b.ImportNow("ObjectDefineProperties");
var o=b.ImportNow("ObjectDefineProperty");
var p;
var q;
var r;
var s;
var t;
var u;
var v;
var w;
b.Import(function(x){
c=x.ArrayIndexOf;
d=x.ArrayJoin;
e=x.ArrayPush;
f=x.IsFinite;
g=x.IsNaN;
m=x.MathFloor;
p=x.RegExpTest;
q=x.StringIndexOf;
r=x.StringLastIndexOf;
s=x.StringMatch;
t=x.StringReplace;
u=x.StringSplit;
v=x.StringSubstr;
w=x.StringSubstring;
ToNumber=x.ToNumber;
});
var y={};
%AddNamedProperty(a,"Intl",y,2);
var z={
'collator':(void 0),
'numberformat':(void 0),
'dateformat':(void 0),
'breakiterator':(void 0)
};
var A=(void 0);
var B=(void 0);
function GetUnicodeExtensionRE(){
if(((void 0)===(void 0))){
B=new k('-u(-[a-z0-9]{2,8})+','g');
}
return B;
}
var C=(void 0);
function GetAnyExtensionRE(){
if((C===(void 0))){
C=new k('-[a-z0-9]{1}-.*','g');
}
return C;
}
var D=(void 0);
function GetQuotedStringRE(){
if((D===(void 0))){
D=new k("'[^']+'",'g');
}
return D;
}
var E=(void 0);
function GetServiceRE(){
if((E===(void 0))){
E=
new k('^(collator|numberformat|dateformat|breakiterator)$');
}
return E;
}
var F=(void 0);
function GetLanguageTagRE(){
if((F===(void 0))){
BuildLanguageTagREs();
}
return F;
}
var G=(void 0);
function GetLanguageVariantRE(){
if((G===(void 0))){
BuildLanguageTagREs();
}
return G;
}
var H=(void 0);
function GetLanguageSingletonRE(){
if((H===(void 0))){
BuildLanguageTagREs();
}
return H;
}
var I=(void 0);
function GetTimezoneNameCheckRE(){
if((I===(void 0))){
I=
new k('^([A-Za-z]+)/([A-Za-z]+)(?:_([A-Za-z]+))*$');
}
return I;
}
function addBoundMethod(J,K,L,M){
%CheckIsBootstrapping();
function getter(){
if(!%IsInitializedIntlObject(this)){
throw MakeTypeError(44,K);
}
var N='__bound'+K+'__';
if((this[N]===(void 0))){
var O=this;
var P;
if((M===(void 0))||M===2){
P=function(Q,R){
if(%_IsConstructCall()){
throw MakeTypeError(79);
}
return L(O,Q,R);
}
}else if(M===1){
P=function(Q){
if(%_IsConstructCall()){
throw MakeTypeError(79);
}
return L(O,Q);
}
}else{
P=function(){
if(%_IsConstructCall()){
throw MakeTypeError(79);
}
if(%_ArgumentsLength()>0){
return L(O,%_Arguments(0));
}else{
return L(O);
}
}
}
%FunctionSetName(P,N);
%FunctionRemovePrototype(P);
%SetNativeFlag(P);
this[N]=P;
}
return this[N];
}
%FunctionSetName(getter,K);
%FunctionRemovePrototype(getter);
%SetNativeFlag(getter);
o(J.prototype,K,{
get:getter,
enumerable:false,
configurable:true
});
}
function supportedLocalesOf(S,T,U){
if((%_CallFunction(S,GetServiceRE(),s)===null)){
throw MakeError(7,S);
}
if((U===(void 0))){
U={};
}else{
U=(%_ToObject(U));
}
var V=U.localeMatcher;
if(!(V===(void 0))){
V=l(V);
if(V!=='lookup'&&V!=='best fit'){
throw MakeRangeError(147,V);
}
}else{
V='best fit';
}
var W=initializeLocaleList(T);
if((z[S]===(void 0))){
z[S]=getAvailableLocalesOf(S);
}
if(V==='best fit'){
return initializeLocaleList(bestFitSupportedLocalesOf(
W,z[S]));
}
return initializeLocaleList(lookupSupportedLocalesOf(
W,z[S]));
}
function lookupSupportedLocalesOf(W,X){
var Y=[];
for(var Z=0;Z<W.length;++Z){
var aa=%_CallFunction(W[Z],GetUnicodeExtensionRE(),
'',t);
do{
if(!(X[aa]===(void 0))){
%_CallFunction(Y,W[Z],e);
break;
}
var ab=%_CallFunction(aa,'-',r);
if(ab===-1){
break;
}
aa=%_CallFunction(aa,0,ab,w);
}while(true);
}
return Y;
}
function bestFitSupportedLocalesOf(W,X){
return lookupSupportedLocalesOf(W,X);
}
function getGetOption(U,ac){
if((U===(void 0)))throw MakeError(4,ac);
var ad=function getOption(ae,af,ag,ah){
if(!(U[ae]===(void 0))){
var ai=U[ae];
switch(af){
case'boolean':
ai=h(ai);
break;
case'string':
ai=l(ai);
break;
case'number':
ai=j(ai);
break;
default:
throw MakeError(8);
}
if(!(ag===(void 0))&&
%_CallFunction(ag,ai,c)===-1){
throw MakeRangeError(157,ai,ac,ae);
}
return ai;
}
return ah;
}
return ad;
}
function resolveLocale(S,W,U){
W=initializeLocaleList(W);
var ad=getGetOption(U,S);
var V=ad('localeMatcher','string',
['lookup','best fit'],'best fit');
var aj;
if(V==='lookup'){
aj=lookupMatcher(S,W);
}else{
aj=bestFitMatcher(S,W);
}
return aj;
}
function lookupMatcher(S,W){
if((%_CallFunction(S,GetServiceRE(),s)===null)){
throw MakeError(7,S);
}
if((z[S]===(void 0))){
z[S]=getAvailableLocalesOf(S);
}
for(var Z=0;Z<W.length;++Z){
var aa=%_CallFunction(W[Z],GetAnyExtensionRE(),'',
t);
do{
if(!(z[S][aa]===(void 0))){
var ak=
%_CallFunction(W[Z],GetUnicodeExtensionRE(),
s);
var al=(ak===null)?'':ak[0];
return{'locale':aa,'extension':al,'position':Z};
}
var ab=%_CallFunction(aa,'-',r);
if(ab===-1){
break;
}
aa=%_CallFunction(aa,0,ab,w);
}while(true);
}
if((A===(void 0))){
A=%GetDefaultICULocale();
}
return{'locale':A,'extension':'','position':-1};
}
function bestFitMatcher(S,W){
return lookupMatcher(S,W);
}
function parseExtension(al){
var am=%_CallFunction(al,'-',u);
if(am.length<=2||
(am[0]!==''&&am[1]!=='u')){
return{};
}
var an={};
var ao=(void 0);
for(var Z=2;Z<am.length;++Z){
var M=am[Z].length;
var ap=am[Z];
if(M===2){
an[ap]=(void 0);
ao=ap;
}else if(M>=3&&M<=8&&!(ao===(void 0))){
an[ao]=ap;
ao=(void 0);
}else{
return{};
}
}
return an;
}
function setOptions(aq,an,ar,ad,as){
var al='';
var at=function updateExtension(au,ai){
return'-'+au+'-'+l(ai);
}
var av=function updateProperty(ae,af,ai){
if(af==='boolean'&&(typeof ai==='string')){
ai=(ai==='true')?true:false;
}
if(!(ae===(void 0))){
defineWEProperty(as,ae,ai);
}
}
for(var au in ar){
if(%HasOwnProperty(ar,au)){
var ai=(void 0);
var aw=ar[au];
if(!(aw.property===(void 0))){
ai=ad(aw.property,aw.type,aw.values);
}
if(!(ai===(void 0))){
av(aw.property,aw.type,ai);
al+=at(au,ai);
continue;
}
if(%HasOwnProperty(an,au)){
ai=an[au];
if(!(ai===(void 0))){
av(aw.property,aw.type,ai);
al+=at(au,ai);
}else if(aw.type==='boolean'){
av(aw.property,aw.type,true);
al+=at(au,true);
}
}
}
}
return al===''?'':'-u'+al;
}
function freezeArray(ax){
var ay=ax.length;
for(var Z=0;Z<ay;Z++){
if(Z in ax){
o(ax,Z,{value:ax[Z],
configurable:false,
writable:false,
enumerable:true});
}
}
o(ax,'length',{value:ay,writable:false});
return ax;
}
function getOptimalLanguageTag(az,aj){
if(az===aj){
return az;
}
var T=%GetLanguageTagVariants([az,aj]);
if(T[0].maximized!==T[1].maximized){
return aj;
}
var aA=new k('^'+T[1].base);
return %_CallFunction(aj,aA,T[0].base,t);
}
function getAvailableLocalesOf(S){
var aB=%AvailableLocalesOf(S);
for(var Z in aB){
if(%HasOwnProperty(aB,Z)){
var aC=%_CallFunction(Z,/^([a-z]{2,3})-([A-Z][a-z]{3})-([A-Z]{2})$/,
s);
if(aC!==null){
aB[aC[1]+'-'+aC[3]]=null;
}
}
}
return aB;
}
function defineWEProperty(aD,ae,ai){
o(aD,ae,
{value:ai,writable:true,enumerable:true});
}
function addWEPropertyIfDefined(aD,ae,ai){
if(!(ai===(void 0))){
defineWEProperty(aD,ae,ai);
}
}
function defineWECProperty(aD,ae,ai){
o(aD,ae,{value:ai,
writable:true,
enumerable:true,
configurable:true});
}
function addWECPropertyIfDefined(aD,ae,ai){
if(!(ai===(void 0))){
defineWECProperty(aD,ae,ai);
}
}
function toTitleCaseWord(aE){
return %StringToUpperCase(%_CallFunction(aE,0,1,v))+
%StringToLowerCase(%_CallFunction(aE,1,v));
}
function canonicalizeLanguageTag(aF){
if(typeof aF!=='string'&&typeof aF!=='object'||
(aF===null)){
throw MakeTypeError(43);
}
var aG=l(aF);
if(isValidLanguageTag(aG)===false){
throw MakeRangeError(139,aG);
}
var aH=%CanonicalizeLanguageTag(aG);
if(aH==='invalid-tag'){
throw MakeRangeError(139,aG);
}
return aH;
}
function initializeLocaleList(T){
var aI=[];
if((T===(void 0))){
aI=[];
}else{
if(typeof T==='string'){
%_CallFunction(aI,canonicalizeLanguageTag(T),e);
return freezeArray(aI);
}
var aJ=(%_ToObject(T));
var aK=(aJ.length>>>0);
for(var aL=0;aL<aK;aL++){
if(aL in aJ){
var ai=aJ[aL];
var aH=canonicalizeLanguageTag(ai);
if(%_CallFunction(aI,aH,c)===-1){
%_CallFunction(aI,aH,e);
}
}
}
}
return freezeArray(aI);
}
function isValidLanguageTag(aa){
if(!%_CallFunction(GetLanguageTagRE(),aa,p)){
return false;
}
if(%_CallFunction(aa,'x-',q)===0){
return true;
}
aa=%_CallFunction(aa,/-x-/,u)[0];
var aM=[];
var aN=[];
var aC=%_CallFunction(aa,/-/,u);
for(var Z=1;Z<aC.length;Z++){
var ai=aC[Z];
if(%_CallFunction(GetLanguageVariantRE(),ai,p)&&
aN.length===0){
if(%_CallFunction(aM,ai,c)===-1){
%_CallFunction(aM,ai,e);
}else{
return false;
}
}
if(%_CallFunction(GetLanguageSingletonRE(),ai,p)){
if(%_CallFunction(aN,ai,c)===-1){
%_CallFunction(aN,ai,e);
}else{
return false;
}
}
}
return true;
}
function BuildLanguageTagREs(){
var aO='[a-zA-Z]';
var aP='[0-9]';
var aQ='('+aO+'|'+aP+')';
var aR='(art-lojban|cel-gaulish|no-bok|no-nyn|zh-guoyu|zh-hakka|'+
'zh-min|zh-min-nan|zh-xiang)';
var aS='(en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|'+
'i-klingon|i-lux|i-mingo|i-navajo|i-pwn|i-tao|i-tay|'+
'i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)';
var aT='('+aS+'|'+aR+')';
var aU='(x(-'+aQ+'{1,8})+)';
var aV='('+aP+'|[A-WY-Za-wy-z])';
H=new k('^'+aV+'$','i');
var al='('+aV+'(-'+aQ+'{2,8})+)';
var aW='('+aQ+'{5,8}|('+aP+aQ+'{3}))';
G=new k('^'+aW+'$','i');
var aX='('+aO+'{2}|'+aP+'{3})';
var aY='('+aO+'{4})';
var aZ='('+aO+'{3}(-'+aO+'{3}){0,2})';
var ba='('+aO+'{2,3}(-'+aZ+')?|'+aO+'{4}|'+
aO+'{5,8})';
var bb=ba+'(-'+aY+')?(-'+aX+')?(-'+
aW+')*(-'+al+')*(-'+aU+')?';
var bc=
'^('+bb+'|'+aU+'|'+aT+')$';
F=new k(bc,'i');
}
function initializeCollator(bd,T,U){
if(%IsInitializedIntlObject(bd)){
throw MakeTypeError(99,"Collator");
}
if((U===(void 0))){
U={};
}
var ad=getGetOption(U,'collator');
var be={};
defineWEProperty(be,'usage',ad(
'usage','string',['sort','search'],'sort'));
var bf=ad('sensitivity','string',
['base','accent','case','variant']);
if((bf===(void 0))&&be.usage==='sort'){
bf='variant';
}
defineWEProperty(be,'sensitivity',bf);
defineWEProperty(be,'ignorePunctuation',ad(
'ignorePunctuation','boolean',(void 0),false));
var aa=resolveLocale('collator',T,U);
var an=parseExtension(aa.extension);
var bg={
'kn':{'property':'numeric','type':'boolean'},
'kf':{'property':'caseFirst','type':'string',
'values':['false','lower','upper']}
};
setOptions(
U,an,bg,ad,be);
var bh='default';
var al='';
if(%HasOwnProperty(an,'co')&&be.usage==='sort'){
var bi=[
'big5han','dict','direct','ducet','gb2312','phonebk','phonetic',
'pinyin','reformed','searchjl','stroke','trad','unihan','zhuyin'
];
if(%_CallFunction(bi,an.co,c)!==
-1){
al='-u-co-'+an.co;
bh=an.co;
}
}else if(be.usage==='search'){
al='-u-co-search';
}
defineWEProperty(be,'collation',bh);
var bj=aa.locale+al;
var aj=n({},{
caseFirst:{writable:true},
collation:{value:be.collation,writable:true},
ignorePunctuation:{writable:true},
locale:{writable:true},
numeric:{writable:true},
requestedLocale:{value:bj,writable:true},
sensitivity:{writable:true},
strength:{writable:true},
usage:{value:be.usage,writable:true}
});
var bk=%CreateCollator(bj,
be,
aj);
%MarkAsInitializedIntlObjectOfType(bd,'collator',bk);
o(bd,'resolved',{value:aj});
return bd;
}
%AddNamedProperty(y,'Collator',function(){
var T=%_Arguments(0);
var U=%_Arguments(1);
if(!this||this===y){
return new y.Collator(T,U);
}
return initializeCollator((%_ToObject(this)),T,U);
},
2
);
%AddNamedProperty(y.Collator.prototype,'resolvedOptions',function(){
if(%_IsConstructCall()){
throw MakeTypeError(79);
}
if(!%IsInitializedIntlObjectOfType(this,'collator')){
throw MakeTypeError(100,"Collator");
}
var bl=this;
var aa=getOptimalLanguageTag(bl.resolved.requestedLocale,
bl.resolved.locale);
return{
locale:aa,
usage:bl.resolved.usage,
sensitivity:bl.resolved.sensitivity,
ignorePunctuation:bl.resolved.ignorePunctuation,
numeric:bl.resolved.numeric,
caseFirst:bl.resolved.caseFirst,
collation:bl.resolved.collation
};
},
2
);
%FunctionSetName(y.Collator.prototype.resolvedOptions,'resolvedOptions');
%FunctionRemovePrototype(y.Collator.prototype.resolvedOptions);
%SetNativeFlag(y.Collator.prototype.resolvedOptions);
%AddNamedProperty(y.Collator,'supportedLocalesOf',function(T){
if(%_IsConstructCall()){
throw MakeTypeError(79);
}
return supportedLocalesOf('collator',T,%_Arguments(1));
},
2
);
%FunctionSetName(y.Collator.supportedLocalesOf,'supportedLocalesOf');
%FunctionRemovePrototype(y.Collator.supportedLocalesOf);
%SetNativeFlag(y.Collator.supportedLocalesOf);
function compare(bd,Q,R){
return %InternalCompare(%GetImplFromInitializedIntlObject(bd),
l(Q),l(R));
};
addBoundMethod(y.Collator,'compare',compare,2);
function isWellFormedCurrencyCode(bm){
return typeof bm=="string"&&
bm.length==3&&
%_CallFunction(bm,/[^A-Za-z]/,s)==null;
}
function getNumberOption(U,ae,bn,bo,bp){
var ai=U[ae];
if(!(ai===(void 0))){
ai=j(ai);
if(g(ai)||ai<bn||ai>bo){
throw MakeRangeError(150,ae);
}
return m(ai);
}
return bp;
}
function initializeNumberFormat(bq,T,U){
if(%IsInitializedIntlObject(bq)){
throw MakeTypeError(99,"NumberFormat");
}
if((U===(void 0))){
U={};
}
var ad=getGetOption(U,'numberformat');
var aa=resolveLocale('numberformat',T,U);
var be={};
defineWEProperty(be,'style',ad(
'style','string',['decimal','percent','currency'],'decimal'));
var bm=ad('currency','string');
if(!(bm===(void 0))&&!isWellFormedCurrencyCode(bm)){
throw MakeRangeError(134,bm);
}
if(be.style==='currency'&&(bm===(void 0))){
throw MakeTypeError(22);
}
var br=ad(
'currencyDisplay','string',['code','symbol','name'],'symbol');
if(be.style==='currency'){
defineWEProperty(be,'currency',%StringToUpperCase(bm));
defineWEProperty(be,'currencyDisplay',br);
}
var bs=getNumberOption(U,'minimumIntegerDigits',1,21,1);
defineWEProperty(be,'minimumIntegerDigits',bs);
var bt=U['minimumFractionDigits'];
var bu=U['maximumFractionDigits'];
if(!(bt===(void 0))||be.style!=='currency'){
bt=getNumberOption(U,'minimumFractionDigits',0,20,0);
defineWEProperty(be,'minimumFractionDigits',bt);
}
if(!(bu===(void 0))||be.style!=='currency'){
var bv=be.style==='percent'?0:3;
bt=(bt===(void 0))?0:bt;
fallback_limit=(bt>bv)?bt:bv;
bu=getNumberOption(U,'maximumFractionDigits',bt,20,fallback_limit);
defineWEProperty(be,'maximumFractionDigits',bu);
}
var bw=U['minimumSignificantDigits'];
var bx=U['maximumSignificantDigits'];
if(!(bw===(void 0))||!(bx===(void 0))){
bw=getNumberOption(U,'minimumSignificantDigits',1,21,0);
defineWEProperty(be,'minimumSignificantDigits',bw);
bx=getNumberOption(U,'maximumSignificantDigits',bw,21,21);
defineWEProperty(be,'maximumSignificantDigits',bx);
}
defineWEProperty(be,'useGrouping',ad(
'useGrouping','boolean',(void 0),true));
var an=parseExtension(aa.extension);
var by={
'nu':{'property':(void 0),'type':'string'}
};
var al=setOptions(U,an,by,
ad,be);
var bj=aa.locale+al;
var aj=n({},{
currency:{writable:true},
currencyDisplay:{writable:true},
locale:{writable:true},
maximumFractionDigits:{writable:true},
minimumFractionDigits:{writable:true},
minimumIntegerDigits:{writable:true},
numberingSystem:{writable:true},
requestedLocale:{value:bj,writable:true},
style:{value:be.style,writable:true},
useGrouping:{writable:true}
});
if(%HasOwnProperty(be,'minimumSignificantDigits')){
defineWEProperty(aj,'minimumSignificantDigits',(void 0));
}
if(%HasOwnProperty(be,'maximumSignificantDigits')){
defineWEProperty(aj,'maximumSignificantDigits',(void 0));
}
var bz=%CreateNumberFormat(bj,
be,
aj);
if(be.style==='currency'){
o(aj,'currencyDisplay',{value:br,
writable:true});
}
%MarkAsInitializedIntlObjectOfType(bq,'numberformat',bz);
o(bq,'resolved',{value:aj});
return bq;
}
%AddNamedProperty(y,'NumberFormat',function(){
var T=%_Arguments(0);
var U=%_Arguments(1);
if(!this||this===y){
return new y.NumberFormat(T,U);
}
return initializeNumberFormat((%_ToObject(this)),T,U);
},
2
);
%AddNamedProperty(y.NumberFormat.prototype,'resolvedOptions',function(){
if(%_IsConstructCall()){
throw MakeTypeError(79);
}
if(!%IsInitializedIntlObjectOfType(this,'numberformat')){
throw MakeTypeError(100,"NumberFormat");
}
var bA=this;
var aa=getOptimalLanguageTag(bA.resolved.requestedLocale,
bA.resolved.locale);
var bB={
locale:aa,
numberingSystem:bA.resolved.numberingSystem,
style:bA.resolved.style,
useGrouping:bA.resolved.useGrouping,
minimumIntegerDigits:bA.resolved.minimumIntegerDigits,
minimumFractionDigits:bA.resolved.minimumFractionDigits,
maximumFractionDigits:bA.resolved.maximumFractionDigits,
};
if(bB.style==='currency'){
defineWECProperty(bB,'currency',bA.resolved.currency);
defineWECProperty(bB,'currencyDisplay',
bA.resolved.currencyDisplay);
}
if(%HasOwnProperty(bA.resolved,'minimumSignificantDigits')){
defineWECProperty(bB,'minimumSignificantDigits',
bA.resolved.minimumSignificantDigits);
}
if(%HasOwnProperty(bA.resolved,'maximumSignificantDigits')){
defineWECProperty(bB,'maximumSignificantDigits',
bA.resolved.maximumSignificantDigits);
}
return bB;
},
2
);
%FunctionSetName(y.NumberFormat.prototype.resolvedOptions,
'resolvedOptions');
%FunctionRemovePrototype(y.NumberFormat.prototype.resolvedOptions);
%SetNativeFlag(y.NumberFormat.prototype.resolvedOptions);
%AddNamedProperty(y.NumberFormat,'supportedLocalesOf',function(T){
if(%_IsConstructCall()){
throw MakeTypeError(79);
}
return supportedLocalesOf('numberformat',T,%_Arguments(1));
},
2
);
%FunctionSetName(y.NumberFormat.supportedLocalesOf,'supportedLocalesOf');
%FunctionRemovePrototype(y.NumberFormat.supportedLocalesOf);
%SetNativeFlag(y.NumberFormat.supportedLocalesOf);
function formatNumber(bz,ai){
var bC=ToNumber(ai)+0;
return %InternalNumberFormat(%GetImplFromInitializedIntlObject(bz),
bC);
}
function parseNumber(bz,ai){
return %InternalNumberParse(%GetImplFromInitializedIntlObject(bz),
l(ai));
}
addBoundMethod(y.NumberFormat,'format',formatNumber,1);
addBoundMethod(y.NumberFormat,'v8Parse',parseNumber,1);
function toLDMLString(U){
var ad=getGetOption(U,'dateformat');
var bD='';
var bE=ad('weekday','string',['narrow','short','long']);
bD+=appendToLDMLString(
bE,{narrow:'EEEEE',short:'EEE',long:'EEEE'});
bE=ad('era','string',['narrow','short','long']);
bD+=appendToLDMLString(
bE,{narrow:'GGGGG',short:'GGG',long:'GGGG'});
bE=ad('year','string',['2-digit','numeric']);
bD+=appendToLDMLString(bE,{'2-digit':'yy','numeric':'y'});
bE=ad('month','string',
['2-digit','numeric','narrow','short','long']);
bD+=appendToLDMLString(bE,{'2-digit':'MM','numeric':'M',
'narrow':'MMMMM','short':'MMM','long':'MMMM'});
bE=ad('day','string',['2-digit','numeric']);
bD+=appendToLDMLString(
bE,{'2-digit':'dd','numeric':'d'});
var bF=ad('hour12','boolean');
bE=ad('hour','string',['2-digit','numeric']);
if((bF===(void 0))){
bD+=appendToLDMLString(bE,{'2-digit':'jj','numeric':'j'});
}else if(bF===true){
bD+=appendToLDMLString(bE,{'2-digit':'hh','numeric':'h'});
}else{
bD+=appendToLDMLString(bE,{'2-digit':'HH','numeric':'H'});
}
bE=ad('minute','string',['2-digit','numeric']);
bD+=appendToLDMLString(bE,{'2-digit':'mm','numeric':'m'});
bE=ad('second','string',['2-digit','numeric']);
bD+=appendToLDMLString(bE,{'2-digit':'ss','numeric':'s'});
bE=ad('timeZoneName','string',['short','long']);
bD+=appendToLDMLString(bE,{short:'z',long:'zzzz'});
return bD;
}
function appendToLDMLString(bE,bG){
if(!(bE===(void 0))){
return bG[bE];
}else{
return'';
}
}
function fromLDMLString(bD){
bD=%_CallFunction(bD,GetQuotedStringRE(),'',
t);
var U={};
var bH=%_CallFunction(bD,/E{3,5}/g,s);
U=appendToDateTimeObject(
U,'weekday',bH,{EEEEE:'narrow',EEE:'short',EEEE:'long'});
bH=%_CallFunction(bD,/G{3,5}/g,s);
U=appendToDateTimeObject(
U,'era',bH,{GGGGG:'narrow',GGG:'short',GGGG:'long'});
bH=%_CallFunction(bD,/y{1,2}/g,s);
U=appendToDateTimeObject(
U,'year',bH,{y:'numeric',yy:'2-digit'});
bH=%_CallFunction(bD,/M{1,5}/g,s);
U=appendToDateTimeObject(U,'month',bH,{MM:'2-digit',
M:'numeric',MMMMM:'narrow',MMM:'short',MMMM:'long'});
bH=%_CallFunction(bD,/L{1,5}/g,s);
U=appendToDateTimeObject(U,'month',bH,{LL:'2-digit',
L:'numeric',LLLLL:'narrow',LLL:'short',LLLL:'long'});
bH=%_CallFunction(bD,/d{1,2}/g,s);
U=appendToDateTimeObject(
U,'day',bH,{d:'numeric',dd:'2-digit'});
bH=%_CallFunction(bD,/h{1,2}/g,s);
if(bH!==null){
U['hour12']=true;
}
U=appendToDateTimeObject(
U,'hour',bH,{h:'numeric',hh:'2-digit'});
bH=%_CallFunction(bD,/H{1,2}/g,s);
if(bH!==null){
U['hour12']=false;
}
U=appendToDateTimeObject(
U,'hour',bH,{H:'numeric',HH:'2-digit'});
bH=%_CallFunction(bD,/m{1,2}/g,s);
U=appendToDateTimeObject(
U,'minute',bH,{m:'numeric',mm:'2-digit'});
bH=%_CallFunction(bD,/s{1,2}/g,s);
U=appendToDateTimeObject(
U,'second',bH,{s:'numeric',ss:'2-digit'});
bH=%_CallFunction(bD,/z|zzzz/g,s);
U=appendToDateTimeObject(
U,'timeZoneName',bH,{z:'short',zzzz:'long'});
return U;
}
function appendToDateTimeObject(U,bE,bH,bG){
if((bH===null)){
if(!%HasOwnProperty(U,bE)){
defineWEProperty(U,bE,(void 0));
}
return U;
}
var ae=bH[0];
defineWEProperty(U,bE,bG[ae]);
return U;
}
function toDateTimeOptions(U,bI,bJ){
if((U===(void 0))){
U={};
}else{
U=(%_ToObject(U));
}
var bK=true;
if((bI==='date'||bI==='any')&&
(!(U.weekday===(void 0))||!(U.year===(void 0))||
!(U.month===(void 0))||!(U.day===(void 0)))){
bK=false;
}
if((bI==='time'||bI==='any')&&
(!(U.hour===(void 0))||!(U.minute===(void 0))||
!(U.second===(void 0)))){
bK=false;
}
if(bK&&(bJ==='date'||bJ==='all')){
o(U,'year',{value:'numeric',
writable:true,
enumerable:true,
configurable:true});
o(U,'month',{value:'numeric',
writable:true,
enumerable:true,
configurable:true});
o(U,'day',{value:'numeric',
writable:true,
enumerable:true,
configurable:true});
}
if(bK&&(bJ==='time'||bJ==='all')){
o(U,'hour',{value:'numeric',
writable:true,
enumerable:true,
configurable:true});
o(U,'minute',{value:'numeric',
writable:true,
enumerable:true,
configurable:true});
o(U,'second',{value:'numeric',
writable:true,
enumerable:true,
configurable:true});
}
return U;
}
function initializeDateTimeFormat(bL,T,U){
if(%IsInitializedIntlObject(bL)){
throw MakeTypeError(99,"DateTimeFormat");
}
if((U===(void 0))){
U={};
}
var aa=resolveLocale('dateformat',T,U);
U=toDateTimeOptions(U,'any','date');
var ad=getGetOption(U,'dateformat');
var V=ad('formatMatcher','string',
['basic','best fit'],'best fit');
var bD=toLDMLString(U);
var bM=canonicalizeTimeZoneID(U.timeZone);
var be={};
var an=parseExtension(aa.extension);
var bN={
'ca':{'property':(void 0),'type':'string'},
'nu':{'property':(void 0),'type':'string'}
};
var al=setOptions(U,an,bN,
ad,be);
var bj=aa.locale+al;
var aj=n({},{
calendar:{writable:true},
day:{writable:true},
era:{writable:true},
hour12:{writable:true},
hour:{writable:true},
locale:{writable:true},
minute:{writable:true},
month:{writable:true},
numberingSystem:{writable:true},
pattern:{writable:true},
requestedLocale:{value:bj,writable:true},
second:{writable:true},
timeZone:{writable:true},
timeZoneName:{writable:true},
tz:{value:bM,writable:true},
weekday:{writable:true},
year:{writable:true}
});
var bz=%CreateDateTimeFormat(
bj,{skeleton:bD,timeZone:bM},aj);
if(!(bM===(void 0))&&bM!==aj.timeZone){
throw MakeRangeError(156,bM);
}
%MarkAsInitializedIntlObjectOfType(bL,'dateformat',bz);
o(bL,'resolved',{value:aj});
return bL;
}
%AddNamedProperty(y,'DateTimeFormat',function(){
var T=%_Arguments(0);
var U=%_Arguments(1);
if(!this||this===y){
return new y.DateTimeFormat(T,U);
}
return initializeDateTimeFormat((%_ToObject(this)),T,U);
},
2
);
%AddNamedProperty(y.DateTimeFormat.prototype,'resolvedOptions',function(){
if(%_IsConstructCall()){
throw MakeTypeError(79);
}
if(!%IsInitializedIntlObjectOfType(this,'dateformat')){
throw MakeTypeError(100,"DateTimeFormat");
}
var bO={
'gregorian':'gregory',
'japanese':'japanese',
'buddhist':'buddhist',
'roc':'roc',
'persian':'persian',
'islamic-civil':'islamicc',
'islamic':'islamic',
'hebrew':'hebrew',
'chinese':'chinese',
'indian':'indian',
'coptic':'coptic',
'ethiopic':'ethiopic',
'ethiopic-amete-alem':'ethioaa'
};
var bA=this;
var bP=fromLDMLString(bA.resolved.pattern);
var bQ=bO[bA.resolved.calendar];
if((bQ===(void 0))){
bQ=bA.resolved.calendar;
}
var aa=getOptimalLanguageTag(bA.resolved.requestedLocale,
bA.resolved.locale);
var bB={
locale:aa,
numberingSystem:bA.resolved.numberingSystem,
calendar:bQ,
timeZone:bA.resolved.timeZone
};
addWECPropertyIfDefined(bB,'timeZoneName',bP.timeZoneName);
addWECPropertyIfDefined(bB,'era',bP.era);
addWECPropertyIfDefined(bB,'year',bP.year);
addWECPropertyIfDefined(bB,'month',bP.month);
addWECPropertyIfDefined(bB,'day',bP.day);
addWECPropertyIfDefined(bB,'weekday',bP.weekday);
addWECPropertyIfDefined(bB,'hour12',bP.hour12);
addWECPropertyIfDefined(bB,'hour',bP.hour);
addWECPropertyIfDefined(bB,'minute',bP.minute);
addWECPropertyIfDefined(bB,'second',bP.second);
return bB;
},
2
);
%FunctionSetName(y.DateTimeFormat.prototype.resolvedOptions,
'resolvedOptions');
%FunctionRemovePrototype(y.DateTimeFormat.prototype.resolvedOptions);
%SetNativeFlag(y.DateTimeFormat.prototype.resolvedOptions);
%AddNamedProperty(y.DateTimeFormat,'supportedLocalesOf',function(T){
if(%_IsConstructCall()){
throw MakeTypeError(79);
}
return supportedLocalesOf('dateformat',T,%_Arguments(1));
},
2
);
%FunctionSetName(y.DateTimeFormat.supportedLocalesOf,'supportedLocalesOf');
%FunctionRemovePrototype(y.DateTimeFormat.supportedLocalesOf);
%SetNativeFlag(y.DateTimeFormat.supportedLocalesOf);
function formatDate(bz,bR){
var bS;
if((bR===(void 0))){
bS=%DateCurrentTime();
}else{
bS=ToNumber(bR);
}
if(!f(bS))throw MakeRangeError(128);
return %InternalDateFormat(%GetImplFromInitializedIntlObject(bz),
new i(bS));
}
function parseDate(bz,ai){
return %InternalDateParse(%GetImplFromInitializedIntlObject(bz),
l(ai));
}
addBoundMethod(y.DateTimeFormat,'format',formatDate,0);
addBoundMethod(y.DateTimeFormat,'v8Parse',parseDate,1);
function canonicalizeTimeZoneID(bT){
if((bT===(void 0))){
return bT;
}
var bU=%StringToUpperCase(bT);
if(bU==='UTC'||bU==='GMT'||
bU==='ETC/UTC'||bU==='ETC/GMT'){
return'UTC';
}
var bH=%_CallFunction(bT,GetTimezoneNameCheckRE(),s);
if((bH===null))throw MakeRangeError(129,bT);
var bB=toTitleCaseWord(bH[1])+'/'+toTitleCaseWord(bH[2]);
var Z=3;
while(!(bH[Z]===(void 0))&&Z<bH.length){
bB=bB+'_'+toTitleCaseWord(bH[Z]);
Z++;
}
return bB;
}
function initializeBreakIterator(bV,T,U){
if(%IsInitializedIntlObject(bV)){
throw MakeTypeError(99,"v8BreakIterator");
}
if((U===(void 0))){
U={};
}
var ad=getGetOption(U,'breakiterator');
var be={};
defineWEProperty(be,'type',ad(
'type','string',['character','word','sentence','line'],'word'));
var aa=resolveLocale('breakiterator',T,U);
var aj=n({},{
requestedLocale:{value:aa.locale,writable:true},
type:{value:be.type,writable:true},
locale:{writable:true}
});
var bW=%CreateBreakIterator(aa.locale,
be,
aj);
%MarkAsInitializedIntlObjectOfType(bV,'breakiterator',
bW);
o(bV,'resolved',{value:aj});
return bV;
}
%AddNamedProperty(y,'v8BreakIterator',function(){
var T=%_Arguments(0);
var U=%_Arguments(1);
if(!this||this===y){
return new y.v8BreakIterator(T,U);
}
return initializeBreakIterator((%_ToObject(this)),T,U);
},
2
);
%AddNamedProperty(y.v8BreakIterator.prototype,'resolvedOptions',
function(){
if(%_IsConstructCall()){
throw MakeTypeError(79);
}
if(!%IsInitializedIntlObjectOfType(this,'breakiterator')){
throw MakeTypeError(100,"v8BreakIterator");
}
var bX=this;
var aa=getOptimalLanguageTag(bX.resolved.requestedLocale,
bX.resolved.locale);
return{
locale:aa,
type:bX.resolved.type
};
},
2
);
%FunctionSetName(y.v8BreakIterator.prototype.resolvedOptions,
'resolvedOptions');
%FunctionRemovePrototype(y.v8BreakIterator.prototype.resolvedOptions);
%SetNativeFlag(y.v8BreakIterator.prototype.resolvedOptions);
%AddNamedProperty(y.v8BreakIterator,'supportedLocalesOf',
function(T){
if(%_IsConstructCall()){
throw MakeTypeError(79);
}
return supportedLocalesOf('breakiterator',T,%_Arguments(1));
},
2
);
%FunctionSetName(y.v8BreakIterator.supportedLocalesOf,'supportedLocalesOf');
%FunctionRemovePrototype(y.v8BreakIterator.supportedLocalesOf);
%SetNativeFlag(y.v8BreakIterator.supportedLocalesOf);
function adoptText(bV,bY){
%BreakIteratorAdoptText(%GetImplFromInitializedIntlObject(bV),
l(bY));
}
function first(bV){
return %BreakIteratorFirst(%GetImplFromInitializedIntlObject(bV));
}
function next(bV){
return %BreakIteratorNext(%GetImplFromInitializedIntlObject(bV));
}
function current(bV){
return %BreakIteratorCurrent(%GetImplFromInitializedIntlObject(bV));
}
function breakType(bV){
return %BreakIteratorBreakType(%GetImplFromInitializedIntlObject(bV));
}
addBoundMethod(y.v8BreakIterator,'adoptText',adoptText,1);
addBoundMethod(y.v8BreakIterator,'first',first,0);
addBoundMethod(y.v8BreakIterator,'next',next,0);
addBoundMethod(y.v8BreakIterator,'current',current,0);
addBoundMethod(y.v8BreakIterator,'breakType',breakType,0);
var bZ={
'collator':y.Collator,
'numberformat':y.NumberFormat,
'dateformatall':y.DateTimeFormat,
'dateformatdate':y.DateTimeFormat,
'dateformattime':y.DateTimeFormat
};
var ca={
'collator':(void 0),
'numberformat':(void 0),
'dateformatall':(void 0),
'dateformatdate':(void 0),
'dateformattime':(void 0),
};
function cachedOrNewService(S,T,U,bJ){
var cb=((bJ===(void 0)))?U:bJ;
if((T===(void 0))&&(U===(void 0))){
if((ca[S]===(void 0))){
ca[S]=new bZ[S](T,cb);
}
return ca[S];
}
return new bZ[S](T,cb);
}
function OverrideFunction(aD,cc,cd){
%CheckIsBootstrapping();
o(aD,cc,{value:cd,
writeable:true,
configurable:true,
enumerable:false});
%FunctionSetName(cd,cc);
%FunctionRemovePrototype(cd);
%SetNativeFlag(cd);
}
OverrideFunction(l.prototype,'localeCompare',function(O){
if(%_IsConstructCall()){
throw MakeTypeError(79);
}
if((this==null)){
throw MakeTypeError(45);
}
var T=%_Arguments(1);
var U=%_Arguments(2);
var bd=cachedOrNewService('collator',T,U);
return compare(bd,this,O);
}
);
OverrideFunction(l.prototype,'normalize',function(){
if(%_IsConstructCall()){
throw MakeTypeError(79);
}
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"String.prototype.normalize");
var ce=(%_ToString(this));
var cf=%_Arguments(0);
var cg=(cf===(void 0))?'NFC':(%_ToString(cf));
var ch=['NFC','NFD','NFKC','NFKD'];
var ci=
%_CallFunction(ch,cg,c);
if(ci===-1){
throw MakeRangeError(148,
%_CallFunction(ch,', ',d));
}
return %StringNormalize(ce,ci);
}
);
OverrideFunction(j.prototype,'toLocaleString',function(){
if(%_IsConstructCall()){
throw MakeTypeError(79);
}
if(!(this instanceof j)&&typeof(this)!=='number'){
throw MakeTypeError(46,"Number");
}
var T=%_Arguments(0);
var U=%_Arguments(1);
var bq=cachedOrNewService('numberformat',T,U);
return formatNumber(bq,this);
}
);
function toLocaleDateTime(cj,T,U,bI,bJ,S){
if(!(cj instanceof i)){
throw MakeTypeError(46,"Date");
}
if(g(cj))return'Invalid Date';
var be=toDateTimeOptions(U,bI,bJ);
var bL=
cachedOrNewService(S,T,U,be);
return formatDate(bL,cj);
}
OverrideFunction(i.prototype,'toLocaleString',function(){
if(%_IsConstructCall()){
throw MakeTypeError(79);
}
var T=%_Arguments(0);
var U=%_Arguments(1);
return toLocaleDateTime(
this,T,U,'any','all','dateformatall');
}
);
OverrideFunction(i.prototype,'toLocaleDateString',function(){
if(%_IsConstructCall()){
throw MakeTypeError(79);
}
var T=%_Arguments(0);
var U=%_Arguments(1);
return toLocaleDateTime(
this,T,U,'date','date','dateformatdate');
}
);
OverrideFunction(i.prototype,'toLocaleTimeString',function(){
if(%_IsConstructCall()){
throw MakeTypeError(79);
}
var T=%_Arguments(0);
var U=%_Arguments(1);
return toLocaleDateTime(
this,T,U,'time','time','dateformattime');
}
);
})

(code-stubsi
(function(a,b){
"use strict";
b.StringLengthTFStub=function StringLengthTFStub(c,d){
var e=function(f,g,h,i){
return %_StringGetLength(%_JSValueGetValue(f));
}
return e;
}
b.StringAddTFStub=function StringAddTFStub(c,d){
var e=function(j,k){
return %StringAdd(j,k);
}
return e;
}
const kTurboFanICCallModeMask=1;
const kTurboFanICCallForUnptimizedCode=0;
const kTurboFanICCallForOptimizedCode=1;
b.MathFloorStub=function MathFloorStub(c,d){
var l=function(m,h,n,f,i){
"use strict";
if(m!==%_FixedArrayGet(n,h|0)){
return %_CallFunction(f,i,m);
}
var o=%_MathFloor(+i);
if(%_IsMinusZero(o)){
%_FixedArraySet(n,((h|0)+1)|0,1);
return-0;
}
var p=o|0;
if(p===o){
return p;
}
return o;
}
var q=(d&kTurboFanICCallModeMask);
if(q==kTurboFanICCallForOptimizedCode){
return l;
}else{
%SetForceInlineFlag(l);
var r=function(m,h,f,i){
var n=%_GetTypeFeedbackVector(%_GetCallerJSFunction());
return l(m,h,n,f,i);
}
return r;
}
}
})

0proxy…3
(function(a,b){
"use strict";
%CheckIsBootstrapping();
var c=a.Function;
var d=a.Object;
var e;
b.Import(function(f){
e=f.ToNameArray;
});
function ProxyCreate(g,h){
if(!(%_IsSpecObject(g)))
throw MakeTypeError(86,"create")
if((h===(void 0)))
h=null
else if(!((%_IsSpecObject(h))||(h===null)))
throw MakeTypeError(91)
return %CreateJSProxy(g,h)
}
function ProxyCreateFunction(g,i,j){
if(!(%_IsSpecObject(g)))
throw MakeTypeError(86,"createFunction")
if(!(typeof(i)==='function'))
throw MakeTypeError(94,"call")
if((j===(void 0))){
j=DerivedConstructTrap(i)
}else if((typeof(j)==='function')){
var k=j
j=function(){
return %Apply(k,(void 0),arguments,0,%_ArgumentsLength());
}
}else{
throw MakeTypeError(94,"construct")
}
return %CreateJSFunctionProxy(
g,i,j,c.prototype)
}
function DerivedConstructTrap(i){
return function(){
var h=this.prototype
if(!(%_IsSpecObject(h)))h=d.prototype
var l={__proto__:h};
var m=%Apply(i,l,arguments,0,%_ArgumentsLength());
return(%_IsSpecObject(m))?m:l
}
}
function DelegateCallAndConstruct(i,j){
return function(){
return %Apply(%_IsConstructCall()?j:i,
this,arguments,0,%_ArgumentsLength())
}
}
function DerivedGetTrap(n,o){
var p=this.getPropertyDescriptor(o)
if((p===(void 0))){return p}
if('value'in p){
return p.value
}else{
if((p.get===(void 0))){return p.get}
return %_CallFunction(n,p.get)
}
}
function DerivedSetTrap(n,o,q){
var p=this.getOwnPropertyDescriptor(o)
if(p){
if('writable'in p){
if(p.writable){
p.value=q
this.defineProperty(o,p)
return true
}else{
return false
}
}else{
if(p.set){
%_CallFunction(n,q,p.set)
return true
}else{
return false
}
}
}
p=this.getPropertyDescriptor(o)
if(p){
if('writable'in p){
if(p.writable){
}else{
return false
}
}else{
if(p.set){
%_CallFunction(n,q,p.set)
return true
}else{
return false
}
}
}
this.defineProperty(o,{
value:q,
writable:true,
enumerable:true,
configurable:true});
return true;
}
function DerivedHasTrap(o){
return!!this.getPropertyDescriptor(o)
}
function DerivedHasOwnTrap(o){
return!!this.getOwnPropertyDescriptor(o)
}
function DerivedKeysTrap(){
var r=this.getOwnPropertyNames()
var s=[]
for(var t=0,count=0;t<r.length;++t){
var o=r[t]
if((typeof(o)==='symbol'))continue
var p=this.getOwnPropertyDescriptor((%_ToString(o)))
if(!(p===(void 0))&&p.enumerable){
s[count++]=r[t]
}
}
return s
}
function DerivedEnumerateTrap(){
var r=this.getPropertyNames()
var s=[]
for(var t=0,count=0;t<r.length;++t){
var o=r[t]
if((typeof(o)==='symbol'))continue
var p=this.getPropertyDescriptor((%_ToString(o)))
if(!(p===(void 0))){
if(!p.configurable){
throw MakeTypeError(92,
this,o,"getPropertyDescriptor")
}
if(p.enumerable)s[count++]=r[t]
}
}
return s
}
function ProxyEnumerate(u){
var g=%GetHandler(u)
if((g.enumerate===(void 0))){
return %Apply(DerivedEnumerateTrap,g,[],0,0)
}else{
return e(g.enumerate(),"enumerate",false)
}
}
var v=new d();
%AddNamedProperty(a,"Proxy",v,2);
b.InstallFunctions(v,2,[
"create",ProxyCreate,
"createFunction",ProxyCreateFunction
])
b.Export(function(w){
w.ProxyDelegateCallAndConstruct=DelegateCallAndConstruct;
w.ProxyDerivedHasOwnTrap=DerivedHasOwnTrap;
w.ProxyDerivedKeysTrap=DerivedKeysTrap;
});
%InstallToContext([
"derived_get_trap",DerivedGetTrap,
"derived_has_trap",DerivedHasTrap,
"derived_set_trap",DerivedSetTrap,
"proxy_enumerate",ProxyEnumerate,
]);
})

$generator

(function(a,b){
"use strict";
%CheckIsBootstrapping();
var c=a.Function;
var d;
var e=b.ImportNow("to_string_tag_symbol");
b.Import(function(f){
d=f.NewFunctionString;
});
function GeneratorObjectNext(g){
if(!(%_ClassOf(this)==='Generator')){
throw MakeTypeError(36,
'[Generator].prototype.next',this);
}
var h=%GeneratorGetContinuation(this);
if(h>0){
if((%_DebugIsActive()!=0))%DebugPrepareStepInIfStepping(this);
try{
return %_GeneratorNext(this,g);
}catch(e){
%GeneratorClose(this);
throw e;
}
}else if(h==0){
return{value:void 0,done:true};
}else{
throw MakeTypeError(34);
}
}
function GeneratorObjectThrow(i){
if(!(%_ClassOf(this)==='Generator')){
throw MakeTypeError(36,
'[Generator].prototype.throw',this);
}
var h=%GeneratorGetContinuation(this);
if(h>0){
try{
return %_GeneratorThrow(this,i);
}catch(e){
%GeneratorClose(this);
throw e;
}
}else if(h==0){
throw i;
}else{
throw MakeTypeError(34);
}
}
function GeneratorFunctionConstructor(j){
var k=d(arguments,'function*');
var l=%GlobalProxy(GeneratorFunctionConstructor);
var m=%_CallFunction(l,%CompileString(k,true));
%FunctionMarkNameShouldPrintAsAnonymous(m);
return m;
}
%NeverOptimizeFunction(GeneratorObjectNext);
%NeverOptimizeFunction(GeneratorObjectThrow);
var n=GeneratorFunctionPrototype.prototype;
b.InstallFunctions(n,
2,
["next",GeneratorObjectNext,
"throw",GeneratorObjectThrow]);
%AddNamedProperty(n,"constructor",
GeneratorFunctionPrototype,2|1);
%AddNamedProperty(n,
e,"Generator",2|1);
%InternalSetPrototype(GeneratorFunctionPrototype,c.prototype);
%AddNamedProperty(GeneratorFunctionPrototype,
e,"GeneratorFunction",2|1);
%AddNamedProperty(GeneratorFunctionPrototype,"constructor",
GeneratorFunction,2|1);
%InternalSetPrototype(GeneratorFunction,c);
%SetCode(GeneratorFunction,GeneratorFunctionConstructor);
})

<harmony-atomics½8
(function(a,b){
"use strict";
%CheckIsBootstrapping();
var c=a.Object;
var d;
var e;
var f=b.ImportNow("to_string_tag_symbol");
b.Import(function(g){
d=g.MathMax;
e=g.ToNumber;
});
function CheckSharedIntegerTypedArray(h){
if(!%IsSharedIntegerTypedArray(h)){
throw MakeTypeError(62,h);
}
}
function CheckSharedInteger32TypedArray(h){
CheckSharedIntegerTypedArray(h);
if(%_ClassOf(h)!=='Int32Array'){
throw MakeTypeError(63,h);
}
}
function AtomicsCompareExchangeJS(i,j,k,l){
CheckSharedIntegerTypedArray(i);
j=(%_ToInteger(j));
if(j<0||j>=%_TypedArrayGetLength(i)){
return(void 0);
}
k=e(k);
l=e(l);
return %_AtomicsCompareExchange(i,j,k,l);
}
function AtomicsLoadJS(i,j){
CheckSharedIntegerTypedArray(i);
j=(%_ToInteger(j));
if(j<0||j>=%_TypedArrayGetLength(i)){
return(void 0);
}
return %_AtomicsLoad(i,j);
}
function AtomicsStoreJS(i,j,m){
CheckSharedIntegerTypedArray(i);
j=(%_ToInteger(j));
if(j<0||j>=%_TypedArrayGetLength(i)){
return(void 0);
}
m=e(m);
return %_AtomicsStore(i,j,m);
}
function AtomicsAddJS(h,j,m){
CheckSharedIntegerTypedArray(h);
j=(%_ToInteger(j));
if(j<0||j>=%_TypedArrayGetLength(h)){
return(void 0);
}
m=e(m);
return %_AtomicsAdd(h,j,m);
}
function AtomicsSubJS(h,j,m){
CheckSharedIntegerTypedArray(h);
j=(%_ToInteger(j));
if(j<0||j>=%_TypedArrayGetLength(h)){
return(void 0);
}
m=e(m);
return %_AtomicsSub(h,j,m);
}
function AtomicsAndJS(h,j,m){
CheckSharedIntegerTypedArray(h);
j=(%_ToInteger(j));
if(j<0||j>=%_TypedArrayGetLength(h)){
return(void 0);
}
m=e(m);
return %_AtomicsAnd(h,j,m);
}
function AtomicsOrJS(h,j,m){
CheckSharedIntegerTypedArray(h);
j=(%_ToInteger(j));
if(j<0||j>=%_TypedArrayGetLength(h)){
return(void 0);
}
m=e(m);
return %_AtomicsOr(h,j,m);
}
function AtomicsXorJS(h,j,m){
CheckSharedIntegerTypedArray(h);
j=(%_ToInteger(j));
if(j<0||j>=%_TypedArrayGetLength(h)){
return(void 0);
}
m=e(m);
return %_AtomicsXor(h,j,m);
}
function AtomicsExchangeJS(h,j,m){
CheckSharedIntegerTypedArray(h);
j=(%_ToInteger(j));
if(j<0||j>=%_TypedArrayGetLength(h)){
return(void 0);
}
m=e(m);
return %_AtomicsExchange(h,j,m);
}
function AtomicsIsLockFreeJS(n){
return %_AtomicsIsLockFree(n);
}
function AtomicsFutexWaitJS(h,j,m,o){
CheckSharedInteger32TypedArray(h);
j=(%_ToInteger(j));
if(j<0||j>=%_TypedArrayGetLength(h)){
return(void 0);
}
if((o===(void 0))){
o=(1/0);
}else{
o=e(o);
if((!%_IsSmi(%IS_VAR(o))&&!(o==o))){
o=(1/0);
}else{
o=d(0,o);
}
}
return %AtomicsFutexWait(h,j,m,o);
}
function AtomicsFutexWakeJS(h,j,p){
CheckSharedInteger32TypedArray(h);
j=(%_ToInteger(j));
if(j<0||j>=%_TypedArrayGetLength(h)){
return(void 0);
}
p=d(0,(%_ToInteger(p)));
return %AtomicsFutexWake(h,j,p);
}
function AtomicsFutexWakeOrRequeueJS(h,q,p,m,r){
CheckSharedInteger32TypedArray(h);
q=(%_ToInteger(q));
p=d(0,(%_ToInteger(p)));
m=(m|0);
r=(%_ToInteger(r));
if(q<0||q>=%_TypedArrayGetLength(h)||
r<0||r>=%_TypedArrayGetLength(h)){
return(void 0);
}
return %AtomicsFutexWakeOrRequeue(h,q,p,m,r);
}
function AtomicsConstructor(){}
var s=new AtomicsConstructor();
%InternalSetPrototype(s,c.prototype);
%AddNamedProperty(a,"Atomics",s,2);
%FunctionSetInstanceClassName(AtomicsConstructor,'Atomics');
%AddNamedProperty(s,f,"Atomics",1|2);
b.InstallConstants(s,[
"OK",0,
"NOTEQUAL",-1,
"TIMEDOUT",-2,
]);
b.InstallFunctions(s,2,[
"compareExchange",AtomicsCompareExchangeJS,
"load",AtomicsLoadJS,
"store",AtomicsStoreJS,
"add",AtomicsAddJS,
"sub",AtomicsSubJS,
"and",AtomicsAndJS,
"or",AtomicsOrJS,
"xor",AtomicsXorJS,
"exchange",AtomicsExchangeJS,
"isLockFree",AtomicsIsLockFreeJS,
"futexWait",AtomicsFutexWaitJS,
"futexWake",AtomicsFutexWakeJS,
"futexWakeOrRequeue",AtomicsFutexWakeOrRequeueJS,
]);
})

Xharmony-array-includesñ
(function(a,b){
'use strict';
%CheckIsBootstrapping();
var c=a.Array;
function InnerArrayIncludes(d,e,f,g){
if(g===0){
return false;
}
var h=(%_ToInteger(e));
var i;
if(h>=0){
i=h;
}else{
i=g+h;
if(i<0){
i=0;
}
}
while(i<g){
var j=f[i];
if($sameValueZero(d,j)){
return true;
}
++i;
}
return false;
}
function ArrayIncludes(d,e){
if((%IS_VAR(this)===null)||(this===(void 0)))throw MakeTypeError(15,"Array.prototype.includes");
var f=(%_ToObject(this));
var g=(%ToLength(f.length));
return InnerArrayIncludes(d,e,f,g);
}
function TypedArrayIncludes(d,e){
if(!%_IsTypedArray(this))throw MakeTypeError(60);
var g=%_TypedArrayGetLength(this);
return InnerArrayIncludes(d,e,this,g);
}
%FunctionSetLength(ArrayIncludes,1);
%FunctionSetLength(TypedArrayIncludes,1);
b.InstallFunctions(c.prototype,2,[
"includes",ArrayIncludes
]);
var k=a.Uint8Array;

var l=a.Int8Array;

var m=a.Uint16Array;

var n=a.Int16Array;

var o=a.Uint32Array;

var p=a.Int32Array;

var q=a.Float32Array;

var r=a.Float64Array;

var s=a.Uint8ClampedArray;


b.InstallFunctions(k.prototype,2,[
"includes",TypedArrayIncludes
]);

b.InstallFunctions(l.prototype,2,[
"includes",TypedArrayIncludes
]);

b.InstallFunctions(m.prototype,2,[
"includes",TypedArrayIncludes
]);

b.InstallFunctions(n.prototype,2,[
"includes",TypedArrayIncludes
]);

b.InstallFunctions(o.prototype,2,[
"includes",TypedArrayIncludes
]);

b.InstallFunctions(p.prototype,2,[
"includes",TypedArrayIncludes
]);

b.InstallFunctions(q.prototype,2,[
"includes",TypedArrayIncludes
]);

b.InstallFunctions(r.prototype,2,[
"includes",TypedArrayIncludes
]);

b.InstallFunctions(s.prototype,2,[
"includes",TypedArrayIncludes
]);


})

dharmony-concat-spreadable¡
(function(a,b){
'use strict';
%CheckIsBootstrapping();
var c=
b.ImportNow("is_concat_spreadable_symbol");
b.InstallConstants(a.Symbol,[
"isConcatSpreadable",c
]);
})

@harmony-tostring‰
(function(a,b){
"use strict";
%CheckIsBootstrapping();
var c=a.Symbol;
var d=b.ImportNow("to_string_tag_symbol");
b.InstallConstants(c,[
"toStringTag",d
]);
})

8harmony-regexpÅ
(function(a,b){
'use strict';
%CheckIsBootstrapping();
var c=a.RegExp;
function RegExpGetFlags(){
if(!(%_IsSpecObject(this))){
throw MakeTypeError(32,(%_ToString(this)));
}
var d='';
if(this.global)d+='g';
if(this.ignoreCase)d+='i';
if(this.multiline)d+='m';
if(this.unicode)d+='u';
if(this.sticky)d+='y';
return d;
}
%DefineAccessorPropertyUnchecked(c.prototype,'flags',
RegExpGetFlags,null,2);
%SetNativeFlag(RegExpGetFlags);
})

<harmony-reflect=
(function(a,b){
'use strict';
%CheckIsBootstrapping();
var c=a.Reflect;
var d=b.ImportNow("reflect_apply");
var e=b.ImportNow("reflect_construct");
b.InstallFunctions(c,2,[
"apply",d,
"construct",e
]);
})

8harmony-spread=
(function(a,b){
'use strict';
var c=b.InternalArray;
function SpreadArguments(){
var d=%_ArgumentsLength();
var e=new c();
for(var f=0;f<d;++f){
var g=%_Arguments(f);
var h=g.length;
for(var i=0;i<h;++i){
e.push(g[i]);
}
}
return e;
}
function SpreadIterable(j){
if((j==null)){
throw MakeTypeError(59,j);
}
var e=new c();
for(var k of j){
e.push(k);
}
return e;
}
%InstallToContext([
"spread_arguments",SpreadArguments,
"spread_iterable",SpreadIterable,
]);
})

Xharmony-object-observe™
(function(a,b){
"use strict";
%CheckIsBootstrapping();
b.InstallFunctions(a.Object,2,$observeObjectMethods);
b.InstallFunctions(a.Array,2,$observeArrayMethods);
})

dharmony-sharedarraybuffer
(function(a,b){
"use strict";
%CheckIsBootstrapping();
var c=a.SharedArrayBuffer;
var d=a.Object;
var e=b.ImportNow("to_string_tag_symbol");
function SharedArrayBufferConstructor(f){
if(%_IsConstructCall()){
var g=$toPositiveInteger(f,130);
%ArrayBufferInitialize(this,g,true);
}else{
throw MakeTypeError(21,"SharedArrayBuffer");
}
}
function SharedArrayBufferGetByteLen(){
if(!(%_ClassOf(this)==='SharedArrayBuffer')){
throw MakeTypeError(36,
'SharedArrayBuffer.prototype.byteLength',this);
}
return %_ArrayBufferGetByteLength(this);
}
function SharedArrayBufferIsViewJS(h){
return %ArrayBufferIsView(h);
}
%SetCode(c,SharedArrayBufferConstructor);
%FunctionSetPrototype(c,new d());
%AddNamedProperty(c.prototype,"constructor",
c,2);
%AddNamedProperty(c.prototype,
e,"SharedArrayBuffer",2|1);
b.InstallGetter(c.prototype,"byteLength",
SharedArrayBufferGetByteLen);
b.InstallFunctions(c,2,[
"isView",SharedArrayBufferIsViewJS
]);
})

0harmony-simd®ò
(function(a,b){
"use strict";
%CheckIsBootstrapping();
var c=a.SIMD;
var d=b.ImportNow("to_string_tag_symbol");
var e=c.Float32x4;


var f=c.Int32x4;

var g=c.Int16x8;

var h=c.Int8x16;


var i=c.Uint32x4;

var j=c.Uint16x8;

var k=c.Uint8x16;


var l=c.Bool32x4;

var m=c.Bool16x8;

var n=c.Bool8x16;



function Float32x4CheckJS(o){
return %Float32x4Check(o);
}
function Float32x4ToString(){
if(typeof(this)!=='float32x4'&&%_ClassOf(this)!=='Float32x4'){
throw MakeTypeError(36,
"Float32x4.prototype.toString",this);
}
var p=%_ValueOf(this);
var q="SIMD.Float32x4(";
q+=%Float32x4ExtractLane(p,0);
for(var r=1;r<4;r++){
q+=", "+%Float32x4ExtractLane(p,r);
}
return q+")";
}
function Float32x4ToLocaleString(){
if(typeof(this)!=='float32x4'&&%_ClassOf(this)!=='Float32x4'){
throw MakeTypeError(36,
"Float32x4.prototype.toLocaleString",this);
}
var p=%_ValueOf(this);
var q="SIMD.Float32x4(";
q+=%Float32x4ExtractLane(p,0).toLocaleString();
for(var r=1;r<4;r++){
q+=", "+%Float32x4ExtractLane(p,r).toLocaleString();
}
return q+")";
}
function Float32x4ValueOf(){
if(typeof(this)!=='float32x4'&&%_ClassOf(this)!=='Float32x4'){
throw MakeTypeError(36,
"Float32x4.prototype.valueOf",this);
}
return %_ValueOf(this);
}
function Float32x4ExtractLaneJS(s,t){
return %Float32x4ExtractLane(s,t);
}


function Int32x4CheckJS(o){
return %Int32x4Check(o);
}
function Int32x4ToString(){
if(typeof(this)!=='int32x4'&&%_ClassOf(this)!=='Int32x4'){
throw MakeTypeError(36,
"Int32x4.prototype.toString",this);
}
var p=%_ValueOf(this);
var q="SIMD.Int32x4(";
q+=%Int32x4ExtractLane(p,0);
for(var r=1;r<4;r++){
q+=", "+%Int32x4ExtractLane(p,r);
}
return q+")";
}
function Int32x4ToLocaleString(){
if(typeof(this)!=='int32x4'&&%_ClassOf(this)!=='Int32x4'){
throw MakeTypeError(36,
"Int32x4.prototype.toLocaleString",this);
}
var p=%_ValueOf(this);
var q="SIMD.Int32x4(";
q+=%Int32x4ExtractLane(p,0).toLocaleString();
for(var r=1;r<4;r++){
q+=", "+%Int32x4ExtractLane(p,r).toLocaleString();
}
return q+")";
}
function Int32x4ValueOf(){
if(typeof(this)!=='int32x4'&&%_ClassOf(this)!=='Int32x4'){
throw MakeTypeError(36,
"Int32x4.prototype.valueOf",this);
}
return %_ValueOf(this);
}
function Int32x4ExtractLaneJS(s,t){
return %Int32x4ExtractLane(s,t);
}

function Int16x8CheckJS(o){
return %Int16x8Check(o);
}
function Int16x8ToString(){
if(typeof(this)!=='int16x8'&&%_ClassOf(this)!=='Int16x8'){
throw MakeTypeError(36,
"Int16x8.prototype.toString",this);
}
var p=%_ValueOf(this);
var q="SIMD.Int16x8(";
q+=%Int16x8ExtractLane(p,0);
for(var r=1;r<8;r++){
q+=", "+%Int16x8ExtractLane(p,r);
}
return q+")";
}
function Int16x8ToLocaleString(){
if(typeof(this)!=='int16x8'&&%_ClassOf(this)!=='Int16x8'){
throw MakeTypeError(36,
"Int16x8.prototype.toLocaleString",this);
}
var p=%_ValueOf(this);
var q="SIMD.Int16x8(";
q+=%Int16x8ExtractLane(p,0).toLocaleString();
for(var r=1;r<8;r++){
q+=", "+%Int16x8ExtractLane(p,r).toLocaleString();
}
return q+")";
}
function Int16x8ValueOf(){
if(typeof(this)!=='int16x8'&&%_ClassOf(this)!=='Int16x8'){
throw MakeTypeError(36,
"Int16x8.prototype.valueOf",this);
}
return %_ValueOf(this);
}
function Int16x8ExtractLaneJS(s,t){
return %Int16x8ExtractLane(s,t);
}

function Int8x16CheckJS(o){
return %Int8x16Check(o);
}
function Int8x16ToString(){
if(typeof(this)!=='int8x16'&&%_ClassOf(this)!=='Int8x16'){
throw MakeTypeError(36,
"Int8x16.prototype.toString",this);
}
var p=%_ValueOf(this);
var q="SIMD.Int8x16(";
q+=%Int8x16ExtractLane(p,0);
for(var r=1;r<16;r++){
q+=", "+%Int8x16ExtractLane(p,r);
}
return q+")";
}
function Int8x16ToLocaleString(){
if(typeof(this)!=='int8x16'&&%_ClassOf(this)!=='Int8x16'){
throw MakeTypeError(36,
"Int8x16.prototype.toLocaleString",this);
}
var p=%_ValueOf(this);
var q="SIMD.Int8x16(";
q+=%Int8x16ExtractLane(p,0).toLocaleString();
for(var r=1;r<16;r++){
q+=", "+%Int8x16ExtractLane(p,r).toLocaleString();
}
return q+")";
}
function Int8x16ValueOf(){
if(typeof(this)!=='int8x16'&&%_ClassOf(this)!=='Int8x16'){
throw MakeTypeError(36,
"Int8x16.prototype.valueOf",this);
}
return %_ValueOf(this);
}
function Int8x16ExtractLaneJS(s,t){
return %Int8x16ExtractLane(s,t);
}


function Uint32x4CheckJS(o){
return %Uint32x4Check(o);
}
function Uint32x4ToString(){
if(typeof(this)!=='uint32x4'&&%_ClassOf(this)!=='Uint32x4'){
throw MakeTypeError(36,
"Uint32x4.prototype.toString",this);
}
var p=%_ValueOf(this);
var q="SIMD.Uint32x4(";
q+=%Uint32x4ExtractLane(p,0);
for(var r=1;r<4;r++){
q+=", "+%Uint32x4ExtractLane(p,r);
}
return q+")";
}
function Uint32x4ToLocaleString(){
if(typeof(this)!=='uint32x4'&&%_ClassOf(this)!=='Uint32x4'){
throw MakeTypeError(36,
"Uint32x4.prototype.toLocaleString",this);
}
var p=%_ValueOf(this);
var q="SIMD.Uint32x4(";
q+=%Uint32x4ExtractLane(p,0).toLocaleString();
for(var r=1;r<4;r++){
q+=", "+%Uint32x4ExtractLane(p,r).toLocaleString();
}
return q+")";
}
function Uint32x4ValueOf(){
if(typeof(this)!=='uint32x4'&&%_ClassOf(this)!=='Uint32x4'){
throw MakeTypeError(36,
"Uint32x4.prototype.valueOf",this);
}
return %_ValueOf(this);
}
function Uint32x4ExtractLaneJS(s,t){
return %Uint32x4ExtractLane(s,t);
}

function Uint16x8CheckJS(o){
return %Uint16x8Check(o);
}
function Uint16x8ToString(){
if(typeof(this)!=='uint16x8'&&%_ClassOf(this)!=='Uint16x8'){
throw MakeTypeError(36,
"Uint16x8.prototype.toString",this);
}
var p=%_ValueOf(this);
var q="SIMD.Uint16x8(";
q+=%Uint16x8ExtractLane(p,0);
for(var r=1;r<8;r++){
q+=", "+%Uint16x8ExtractLane(p,r);
}
return q+")";
}
function Uint16x8ToLocaleString(){
if(typeof(this)!=='uint16x8'&&%_ClassOf(this)!=='Uint16x8'){
throw MakeTypeError(36,
"Uint16x8.prototype.toLocaleString",this);
}
var p=%_ValueOf(this);
var q="SIMD.Uint16x8(";
q+=%Uint16x8ExtractLane(p,0).toLocaleString();
for(var r=1;r<8;r++){
q+=", "+%Uint16x8ExtractLane(p,r).toLocaleString();
}
return q+")";
}
function Uint16x8ValueOf(){
if(typeof(this)!=='uint16x8'&&%_ClassOf(this)!=='Uint16x8'){
throw MakeTypeError(36,
"Uint16x8.prototype.valueOf",this);
}
return %_ValueOf(this);
}
function Uint16x8ExtractLaneJS(s,t){
return %Uint16x8ExtractLane(s,t);
}

function Uint8x16CheckJS(o){
return %Uint8x16Check(o);
}
function Uint8x16ToString(){
if(typeof(this)!=='uint8x16'&&%_ClassOf(this)!=='Uint8x16'){
throw MakeTypeError(36,
"Uint8x16.prototype.toString",this);
}
var p=%_ValueOf(this);
var q="SIMD.Uint8x16(";
q+=%Uint8x16ExtractLane(p,0);
for(var r=1;r<16;r++){
q+=", "+%Uint8x16ExtractLane(p,r);
}
return q+")";
}
function Uint8x16ToLocaleString(){
if(typeof(this)!=='uint8x16'&&%_ClassOf(this)!=='Uint8x16'){
throw MakeTypeError(36,
"Uint8x16.prototype.toLocaleString",this);
}
var p=%_ValueOf(this);
var q="SIMD.Uint8x16(";
q+=%Uint8x16ExtractLane(p,0).toLocaleString();
for(var r=1;r<16;r++){
q+=", "+%Uint8x16ExtractLane(p,r).toLocaleString();
}
return q+")";
}
function Uint8x16ValueOf(){
if(typeof(this)!=='uint8x16'&&%_ClassOf(this)!=='Uint8x16'){
throw MakeTypeError(36,
"Uint8x16.prototype.valueOf",this);
}
return %_ValueOf(this);
}
function Uint8x16ExtractLaneJS(s,t){
return %Uint8x16ExtractLane(s,t);
}


function Bool32x4CheckJS(o){
return %Bool32x4Check(o);
}
function Bool32x4ToString(){
if(typeof(this)!=='bool32x4'&&%_ClassOf(this)!=='Bool32x4'){
throw MakeTypeError(36,
"Bool32x4.prototype.toString",this);
}
var p=%_ValueOf(this);
var q="SIMD.Bool32x4(";
q+=%Bool32x4ExtractLane(p,0);
for(var r=1;r<4;r++){
q+=", "+%Bool32x4ExtractLane(p,r);
}
return q+")";
}
function Bool32x4ToLocaleString(){
if(typeof(this)!=='bool32x4'&&%_ClassOf(this)!=='Bool32x4'){
throw MakeTypeError(36,
"Bool32x4.prototype.toLocaleString",this);
}
var p=%_ValueOf(this);
var q="SIMD.Bool32x4(";
q+=%Bool32x4ExtractLane(p,0).toLocaleString();
for(var r=1;r<4;r++){
q+=", "+%Bool32x4ExtractLane(p,r).toLocaleString();
}
return q+")";
}
function Bool32x4ValueOf(){
if(typeof(this)!=='bool32x4'&&%_ClassOf(this)!=='Bool32x4'){
throw MakeTypeError(36,
"Bool32x4.prototype.valueOf",this);
}
return %_ValueOf(this);
}
function Bool32x4ExtractLaneJS(s,t){
return %Bool32x4ExtractLane(s,t);
}

function Bool16x8CheckJS(o){
return %Bool16x8Check(o);
}
function Bool16x8ToString(){
if(typeof(this)!=='bool16x8'&&%_ClassOf(this)!=='Bool16x8'){
throw MakeTypeError(36,
"Bool16x8.prototype.toString",this);
}
var p=%_ValueOf(this);
var q="SIMD.Bool16x8(";
q+=%Bool16x8ExtractLane(p,0);
for(var r=1;r<8;r++){
q+=", "+%Bool16x8ExtractLane(p,r);
}
return q+")";
}
function Bool16x8ToLocaleString(){
if(typeof(this)!=='bool16x8'&&%_ClassOf(this)!=='Bool16x8'){
throw MakeTypeError(36,
"Bool16x8.prototype.toLocaleString",this);
}
var p=%_ValueOf(this);
var q="SIMD.Bool16x8(";
q+=%Bool16x8ExtractLane(p,0).toLocaleString();
for(var r=1;r<8;r++){
q+=", "+%Bool16x8ExtractLane(p,r).toLocaleString();
}
return q+")";
}
function Bool16x8ValueOf(){
if(typeof(this)!=='bool16x8'&&%_ClassOf(this)!=='Bool16x8'){
throw MakeTypeError(36,
"Bool16x8.prototype.valueOf",this);
}
return %_ValueOf(this);
}
function Bool16x8ExtractLaneJS(s,t){
return %Bool16x8ExtractLane(s,t);
}

function Bool8x16CheckJS(o){
return %Bool8x16Check(o);
}
function Bool8x16ToString(){
if(typeof(this)!=='bool8x16'&&%_ClassOf(this)!=='Bool8x16'){
throw MakeTypeError(36,
"Bool8x16.prototype.toString",this);
}
var p=%_ValueOf(this);
var q="SIMD.Bool8x16(";
q+=%Bool8x16ExtractLane(p,0);
for(var r=1;r<16;r++){
q+=", "+%Bool8x16ExtractLane(p,r);
}
return q+")";
}
function Bool8x16ToLocaleString(){
if(typeof(this)!=='bool8x16'&&%_ClassOf(this)!=='Bool8x16'){
throw MakeTypeError(36,
"Bool8x16.prototype.toLocaleString",this);
}
var p=%_ValueOf(this);
var q="SIMD.Bool8x16(";
q+=%Bool8x16ExtractLane(p,0).toLocaleString();
for(var r=1;r<16;r++){
q+=", "+%Bool8x16ExtractLane(p,r).toLocaleString();
}
return q+")";
}
function Bool8x16ValueOf(){
if(typeof(this)!=='bool8x16'&&%_ClassOf(this)!=='Bool8x16'){
throw MakeTypeError(36,
"Bool8x16.prototype.valueOf",this);
}
return %_ValueOf(this);
}
function Bool8x16ExtractLaneJS(s,t){
return %Bool8x16ExtractLane(s,t);
}



function Int32x4ShiftLeftByScalarJS(s,u){
return %Int32x4ShiftLeftByScalar(s,u);
}
function Int32x4ShiftRightByScalarJS(s,u){
return %Int32x4ShiftRightByScalar(s,u);
}

function Int16x8ShiftLeftByScalarJS(s,u){
return %Int16x8ShiftLeftByScalar(s,u);
}
function Int16x8ShiftRightByScalarJS(s,u){
return %Int16x8ShiftRightByScalar(s,u);
}

function Int8x16ShiftLeftByScalarJS(s,u){
return %Int8x16ShiftLeftByScalar(s,u);
}
function Int8x16ShiftRightByScalarJS(s,u){
return %Int8x16ShiftRightByScalar(s,u);
}


function Uint32x4ShiftLeftByScalarJS(s,u){
return %Uint32x4ShiftLeftByScalar(s,u);
}
function Uint32x4ShiftRightByScalarJS(s,u){
return %Uint32x4ShiftRightByScalar(s,u);
}

function Uint16x8ShiftLeftByScalarJS(s,u){
return %Uint16x8ShiftLeftByScalar(s,u);
}
function Uint16x8ShiftRightByScalarJS(s,u){
return %Uint16x8ShiftRightByScalar(s,u);
}

function Uint8x16ShiftLeftByScalarJS(s,u){
return %Uint8x16ShiftLeftByScalar(s,u);
}
function Uint8x16ShiftRightByScalarJS(s,u){
return %Uint8x16ShiftRightByScalar(s,u);
}


function Int16x8AddSaturateJS(o,v){
return %Int16x8AddSaturate(o,v);
}
function Int16x8SubSaturateJS(o,v){
return %Int16x8SubSaturate(o,v);
}

function Int8x16AddSaturateJS(o,v){
return %Int8x16AddSaturate(o,v);
}
function Int8x16SubSaturateJS(o,v){
return %Int8x16SubSaturate(o,v);
}

function Uint8x16AddSaturateJS(o,v){
return %Uint8x16AddSaturate(o,v);
}
function Uint8x16SubSaturateJS(o,v){
return %Uint8x16SubSaturate(o,v);
}

function Uint16x8AddSaturateJS(o,v){
return %Uint16x8AddSaturate(o,v);
}
function Uint16x8SubSaturateJS(o,v){
return %Uint16x8SubSaturate(o,v);
}


function Float32x4NegJS(o){
return %Float32x4Neg(o);
}


function Int32x4NegJS(o){
return %Int32x4Neg(o);
}

function Int16x8NegJS(o){
return %Int16x8Neg(o);
}

function Int8x16NegJS(o){
return %Int8x16Neg(o);
}


function Bool32x4ReplaceLaneJS(s,t,p){
return %Bool32x4ReplaceLane(s,t,p);
}
function Bool32x4AnyTrueJS(w){
return %Bool32x4AnyTrue(w);
}
function Bool32x4AllTrueJS(w){
return %Bool32x4AllTrue(w);
}

function Bool16x8ReplaceLaneJS(s,t,p){
return %Bool16x8ReplaceLane(s,t,p);
}
function Bool16x8AnyTrueJS(w){
return %Bool16x8AnyTrue(w);
}
function Bool16x8AllTrueJS(w){
return %Bool16x8AllTrue(w);
}

function Bool8x16ReplaceLaneJS(s,t,p){
return %Bool8x16ReplaceLane(s,t,p);
}
function Bool8x16AnyTrueJS(w){
return %Bool8x16AnyTrue(w);
}
function Bool8x16AllTrueJS(w){
return %Bool8x16AllTrue(w);
}


function Float32x4ReplaceLaneJS(s,t,p){
return %Float32x4ReplaceLane(s,t,((typeof(%IS_VAR(p))==='number')?p:$nonNumberToNumber(p)));
}
function Float32x4SelectJS(x,o,v){
return %Float32x4Select(x,o,v);
}
function Float32x4AddJS(o,v){
return %Float32x4Add(o,v);
}
function Float32x4SubJS(o,v){
return %Float32x4Sub(o,v);
}
function Float32x4MulJS(o,v){
return %Float32x4Mul(o,v);
}
function Float32x4MinJS(o,v){
return %Float32x4Min(o,v);
}
function Float32x4MaxJS(o,v){
return %Float32x4Max(o,v);
}
function Float32x4EqualJS(o,v){
return %Float32x4Equal(o,v);
}
function Float32x4NotEqualJS(o,v){
return %Float32x4NotEqual(o,v);
}
function Float32x4LessThanJS(o,v){
return %Float32x4LessThan(o,v);
}
function Float32x4LessThanOrEqualJS(o,v){
return %Float32x4LessThanOrEqual(o,v);
}
function Float32x4GreaterThanJS(o,v){
return %Float32x4GreaterThan(o,v);
}
function Float32x4GreaterThanOrEqualJS(o,v){
return %Float32x4GreaterThanOrEqual(o,v);
}
function Float32x4LoadJS(y,z){
return %Float32x4Load(y,z);
}
function Float32x4StoreJS(y,z,o){
return %Float32x4Store(y,z,o);
}


function Int32x4ReplaceLaneJS(s,t,p){
return %Int32x4ReplaceLane(s,t,((typeof(%IS_VAR(p))==='number')?p:$nonNumberToNumber(p)));
}
function Int32x4SelectJS(x,o,v){
return %Int32x4Select(x,o,v);
}
function Int32x4AddJS(o,v){
return %Int32x4Add(o,v);
}
function Int32x4SubJS(o,v){
return %Int32x4Sub(o,v);
}
function Int32x4MulJS(o,v){
return %Int32x4Mul(o,v);
}
function Int32x4MinJS(o,v){
return %Int32x4Min(o,v);
}
function Int32x4MaxJS(o,v){
return %Int32x4Max(o,v);
}
function Int32x4EqualJS(o,v){
return %Int32x4Equal(o,v);
}
function Int32x4NotEqualJS(o,v){
return %Int32x4NotEqual(o,v);
}
function Int32x4LessThanJS(o,v){
return %Int32x4LessThan(o,v);
}
function Int32x4LessThanOrEqualJS(o,v){
return %Int32x4LessThanOrEqual(o,v);
}
function Int32x4GreaterThanJS(o,v){
return %Int32x4GreaterThan(o,v);
}
function Int32x4GreaterThanOrEqualJS(o,v){
return %Int32x4GreaterThanOrEqual(o,v);
}
function Int32x4LoadJS(y,z){
return %Int32x4Load(y,z);
}
function Int32x4StoreJS(y,z,o){
return %Int32x4Store(y,z,o);
}

function Int16x8ReplaceLaneJS(s,t,p){
return %Int16x8ReplaceLane(s,t,((typeof(%IS_VAR(p))==='number')?p:$nonNumberToNumber(p)));
}
function Int16x8SelectJS(x,o,v){
return %Int16x8Select(x,o,v);
}
function Int16x8AddJS(o,v){
return %Int16x8Add(o,v);
}
function Int16x8SubJS(o,v){
return %Int16x8Sub(o,v);
}
function Int16x8MulJS(o,v){
return %Int16x8Mul(o,v);
}
function Int16x8MinJS(o,v){
return %Int16x8Min(o,v);
}
function Int16x8MaxJS(o,v){
return %Int16x8Max(o,v);
}
function Int16x8EqualJS(o,v){
return %Int16x8Equal(o,v);
}
function Int16x8NotEqualJS(o,v){
return %Int16x8NotEqual(o,v);
}
function Int16x8LessThanJS(o,v){
return %Int16x8LessThan(o,v);
}
function Int16x8LessThanOrEqualJS(o,v){
return %Int16x8LessThanOrEqual(o,v);
}
function Int16x8GreaterThanJS(o,v){
return %Int16x8GreaterThan(o,v);
}
function Int16x8GreaterThanOrEqualJS(o,v){
return %Int16x8GreaterThanOrEqual(o,v);
}
function Int16x8LoadJS(y,z){
return %Int16x8Load(y,z);
}
function Int16x8StoreJS(y,z,o){
return %Int16x8Store(y,z,o);
}

function Int8x16ReplaceLaneJS(s,t,p){
return %Int8x16ReplaceLane(s,t,((typeof(%IS_VAR(p))==='number')?p:$nonNumberToNumber(p)));
}
function Int8x16SelectJS(x,o,v){
return %Int8x16Select(x,o,v);
}
function Int8x16AddJS(o,v){
return %Int8x16Add(o,v);
}
function Int8x16SubJS(o,v){
return %Int8x16Sub(o,v);
}
function Int8x16MulJS(o,v){
return %Int8x16Mul(o,v);
}
function Int8x16MinJS(o,v){
return %Int8x16Min(o,v);
}
function Int8x16MaxJS(o,v){
return %Int8x16Max(o,v);
}
function Int8x16EqualJS(o,v){
return %Int8x16Equal(o,v);
}
function Int8x16NotEqualJS(o,v){
return %Int8x16NotEqual(o,v);
}
function Int8x16LessThanJS(o,v){
return %Int8x16LessThan(o,v);
}
function Int8x16LessThanOrEqualJS(o,v){
return %Int8x16LessThanOrEqual(o,v);
}
function Int8x16GreaterThanJS(o,v){
return %Int8x16GreaterThan(o,v);
}
function Int8x16GreaterThanOrEqualJS(o,v){
return %Int8x16GreaterThanOrEqual(o,v);
}
function Int8x16LoadJS(y,z){
return %Int8x16Load(y,z);
}
function Int8x16StoreJS(y,z,o){
return %Int8x16Store(y,z,o);
}


function Uint32x4ReplaceLaneJS(s,t,p){
return %Uint32x4ReplaceLane(s,t,((typeof(%IS_VAR(p))==='number')?p:$nonNumberToNumber(p)));
}
function Uint32x4SelectJS(x,o,v){
return %Uint32x4Select(x,o,v);
}
function Uint32x4AddJS(o,v){
return %Uint32x4Add(o,v);
}
function Uint32x4SubJS(o,v){
return %Uint32x4Sub(o,v);
}
function Uint32x4MulJS(o,v){
return %Uint32x4Mul(o,v);
}
function Uint32x4MinJS(o,v){
return %Uint32x4Min(o,v);
}
function Uint32x4MaxJS(o,v){
return %Uint32x4Max(o,v);
}
function Uint32x4EqualJS(o,v){
return %Uint32x4Equal(o,v);
}
function Uint32x4NotEqualJS(o,v){
return %Uint32x4NotEqual(o,v);
}
function Uint32x4LessThanJS(o,v){
return %Uint32x4LessThan(o,v);
}
function Uint32x4LessThanOrEqualJS(o,v){
return %Uint32x4LessThanOrEqual(o,v);
}
function Uint32x4GreaterThanJS(o,v){
return %Uint32x4GreaterThan(o,v);
}
function Uint32x4GreaterThanOrEqualJS(o,v){
return %Uint32x4GreaterThanOrEqual(o,v);
}
function Uint32x4LoadJS(y,z){
return %Uint32x4Load(y,z);
}
function Uint32x4StoreJS(y,z,o){
return %Uint32x4Store(y,z,o);
}

function Uint16x8ReplaceLaneJS(s,t,p){
return %Uint16x8ReplaceLane(s,t,((typeof(%IS_VAR(p))==='number')?p:$nonNumberToNumber(p)));
}
function Uint16x8SelectJS(x,o,v){
return %Uint16x8Select(x,o,v);
}
function Uint16x8AddJS(o,v){
return %Uint16x8Add(o,v);
}
function Uint16x8SubJS(o,v){
return %Uint16x8Sub(o,v);
}
function Uint16x8MulJS(o,v){
return %Uint16x8Mul(o,v);
}
function Uint16x8MinJS(o,v){
return %Uint16x8Min(o,v);
}
function Uint16x8MaxJS(o,v){
return %Uint16x8Max(o,v);
}
function Uint16x8EqualJS(o,v){
return %Uint16x8Equal(o,v);
}
function Uint16x8NotEqualJS(o,v){
return %Uint16x8NotEqual(o,v);
}
function Uint16x8LessThanJS(o,v){
return %Uint16x8LessThan(o,v);
}
function Uint16x8LessThanOrEqualJS(o,v){
return %Uint16x8LessThanOrEqual(o,v);
}
function Uint16x8GreaterThanJS(o,v){
return %Uint16x8GreaterThan(o,v);
}
function Uint16x8GreaterThanOrEqualJS(o,v){
return %Uint16x8GreaterThanOrEqual(o,v);
}
function Uint16x8LoadJS(y,z){
return %Uint16x8Load(y,z);
}
function Uint16x8StoreJS(y,z,o){
return %Uint16x8Store(y,z,o);
}

function Uint8x16ReplaceLaneJS(s,t,p){
return %Uint8x16ReplaceLane(s,t,((typeof(%IS_VAR(p))==='number')?p:$nonNumberToNumber(p)));
}
function Uint8x16SelectJS(x,o,v){
return %Uint8x16Select(x,o,v);
}
function Uint8x16AddJS(o,v){
return %Uint8x16Add(o,v);
}
function Uint8x16SubJS(o,v){
return %Uint8x16Sub(o,v);
}
function Uint8x16MulJS(o,v){
return %Uint8x16Mul(o,v);
}
function Uint8x16MinJS(o,v){
return %Uint8x16Min(o,v);
}
function Uint8x16MaxJS(o,v){
return %Uint8x16Max(o,v);
}
function Uint8x16EqualJS(o,v){
return %Uint8x16Equal(o,v);
}
function Uint8x16NotEqualJS(o,v){
return %Uint8x16NotEqual(o,v);
}
function Uint8x16LessThanJS(o,v){
return %Uint8x16LessThan(o,v);
}
function Uint8x16LessThanOrEqualJS(o,v){
return %Uint8x16LessThanOrEqual(o,v);
}
function Uint8x16GreaterThanJS(o,v){
return %Uint8x16GreaterThan(o,v);
}
function Uint8x16GreaterThanOrEqualJS(o,v){
return %Uint8x16GreaterThanOrEqual(o,v);
}
function Uint8x16LoadJS(y,z){
return %Uint8x16Load(y,z);
}
function Uint8x16StoreJS(y,z,o){
return %Uint8x16Store(y,z,o);
}



function Int32x4AndJS(o,v){
return %Int32x4And(o,v);
}
function Int32x4OrJS(o,v){
return %Int32x4Or(o,v);
}
function Int32x4XorJS(o,v){
return %Int32x4Xor(o,v);
}
function Int32x4NotJS(o){
return %Int32x4Not(o);
}

function Int16x8AndJS(o,v){
return %Int16x8And(o,v);
}
function Int16x8OrJS(o,v){
return %Int16x8Or(o,v);
}
function Int16x8XorJS(o,v){
return %Int16x8Xor(o,v);
}
function Int16x8NotJS(o){
return %Int16x8Not(o);
}

function Int8x16AndJS(o,v){
return %Int8x16And(o,v);
}
function Int8x16OrJS(o,v){
return %Int8x16Or(o,v);
}
function Int8x16XorJS(o,v){
return %Int8x16Xor(o,v);
}
function Int8x16NotJS(o){
return %Int8x16Not(o);
}


function Uint32x4AndJS(o,v){
return %Uint32x4And(o,v);
}
function Uint32x4OrJS(o,v){
return %Uint32x4Or(o,v);
}
function Uint32x4XorJS(o,v){
return %Uint32x4Xor(o,v);
}
function Uint32x4NotJS(o){
return %Uint32x4Not(o);
}

function Uint16x8AndJS(o,v){
return %Uint16x8And(o,v);
}
function Uint16x8OrJS(o,v){
return %Uint16x8Or(o,v);
}
function Uint16x8XorJS(o,v){
return %Uint16x8Xor(o,v);
}
function Uint16x8NotJS(o){
return %Uint16x8Not(o);
}

function Uint8x16AndJS(o,v){
return %Uint8x16And(o,v);
}
function Uint8x16OrJS(o,v){
return %Uint8x16Or(o,v);
}
function Uint8x16XorJS(o,v){
return %Uint8x16Xor(o,v);
}
function Uint8x16NotJS(o){
return %Uint8x16Not(o);
}


function Bool32x4AndJS(o,v){
return %Bool32x4And(o,v);
}
function Bool32x4OrJS(o,v){
return %Bool32x4Or(o,v);
}
function Bool32x4XorJS(o,v){
return %Bool32x4Xor(o,v);
}
function Bool32x4NotJS(o){
return %Bool32x4Not(o);
}

function Bool16x8AndJS(o,v){
return %Bool16x8And(o,v);
}
function Bool16x8OrJS(o,v){
return %Bool16x8Or(o,v);
}
function Bool16x8XorJS(o,v){
return %Bool16x8Xor(o,v);
}
function Bool16x8NotJS(o){
return %Bool16x8Not(o);
}

function Bool8x16AndJS(o,v){
return %Bool8x16And(o,v);
}
function Bool8x16OrJS(o,v){
return %Bool8x16Or(o,v);
}
function Bool8x16XorJS(o,v){
return %Bool8x16Xor(o,v);
}
function Bool8x16NotJS(o){
return %Bool8x16Not(o);
}



function Float32x4FromInt32x4JS(o){
return %Float32x4FromInt32x4(o);
}

function Float32x4FromUint32x4JS(o){
return %Float32x4FromUint32x4(o);
}

function Int32x4FromFloat32x4JS(o){
return %Int32x4FromFloat32x4(o);
}

function Int32x4FromUint32x4JS(o){
return %Int32x4FromUint32x4(o);
}

function Uint32x4FromFloat32x4JS(o){
return %Uint32x4FromFloat32x4(o);
}

function Uint32x4FromInt32x4JS(o){
return %Uint32x4FromInt32x4(o);
}

function Int16x8FromUint16x8JS(o){
return %Int16x8FromUint16x8(o);
}

function Uint16x8FromInt16x8JS(o){
return %Uint16x8FromInt16x8(o);
}

function Int8x16FromUint8x16JS(o){
return %Int8x16FromUint8x16(o);
}

function Uint8x16FromInt8x16JS(o){
return %Uint8x16FromInt8x16(o);
}


function Float32x4FromInt32x4BitsJS(o){
return %Float32x4FromInt32x4Bits(o);
}

function Float32x4FromUint32x4BitsJS(o){
return %Float32x4FromUint32x4Bits(o);
}

function Float32x4FromInt16x8BitsJS(o){
return %Float32x4FromInt16x8Bits(o);
}

function Float32x4FromUint16x8BitsJS(o){
return %Float32x4FromUint16x8Bits(o);
}

function Float32x4FromInt8x16BitsJS(o){
return %Float32x4FromInt8x16Bits(o);
}

function Float32x4FromUint8x16BitsJS(o){
return %Float32x4FromUint8x16Bits(o);
}

function Int32x4FromFloat32x4BitsJS(o){
return %Int32x4FromFloat32x4Bits(o);
}

function Int32x4FromUint32x4BitsJS(o){
return %Int32x4FromUint32x4Bits(o);
}

function Int32x4FromInt16x8BitsJS(o){
return %Int32x4FromInt16x8Bits(o);
}

function Int32x4FromUint16x8BitsJS(o){
return %Int32x4FromUint16x8Bits(o);
}

function Int32x4FromInt8x16BitsJS(o){
return %Int32x4FromInt8x16Bits(o);
}

function Int32x4FromUint8x16BitsJS(o){
return %Int32x4FromUint8x16Bits(o);
}

function Uint32x4FromFloat32x4BitsJS(o){
return %Uint32x4FromFloat32x4Bits(o);
}

function Uint32x4FromInt32x4BitsJS(o){
return %Uint32x4FromInt32x4Bits(o);
}

function Uint32x4FromInt16x8BitsJS(o){
return %Uint32x4FromInt16x8Bits(o);
}

function Uint32x4FromUint16x8BitsJS(o){
return %Uint32x4FromUint16x8Bits(o);
}

function Uint32x4FromInt8x16BitsJS(o){
return %Uint32x4FromInt8x16Bits(o);
}

function Uint32x4FromUint8x16BitsJS(o){
return %Uint32x4FromUint8x16Bits(o);
}

function Int16x8FromFloat32x4BitsJS(o){
return %Int16x8FromFloat32x4Bits(o);
}

function Int16x8FromInt32x4BitsJS(o){
return %Int16x8FromInt32x4Bits(o);
}

function Int16x8FromUint32x4BitsJS(o){
return %Int16x8FromUint32x4Bits(o);
}

function Int16x8FromUint16x8BitsJS(o){
return %Int16x8FromUint16x8Bits(o);
}

function Int16x8FromInt8x16BitsJS(o){
return %Int16x8FromInt8x16Bits(o);
}

function Int16x8FromUint8x16BitsJS(o){
return %Int16x8FromUint8x16Bits(o);
}

function Uint16x8FromFloat32x4BitsJS(o){
return %Uint16x8FromFloat32x4Bits(o);
}

function Uint16x8FromInt32x4BitsJS(o){
return %Uint16x8FromInt32x4Bits(o);
}

function Uint16x8FromUint32x4BitsJS(o){
return %Uint16x8FromUint32x4Bits(o);
}

function Uint16x8FromInt16x8BitsJS(o){
return %Uint16x8FromInt16x8Bits(o);
}

function Uint16x8FromInt8x16BitsJS(o){
return %Uint16x8FromInt8x16Bits(o);
}

function Uint16x8FromUint8x16BitsJS(o){
return %Uint16x8FromUint8x16Bits(o);
}

function Int8x16FromFloat32x4BitsJS(o){
return %Int8x16FromFloat32x4Bits(o);
}

function Int8x16FromInt32x4BitsJS(o){
return %Int8x16FromInt32x4Bits(o);
}

function Int8x16FromUint32x4BitsJS(o){
return %Int8x16FromUint32x4Bits(o);
}

function Int8x16FromInt16x8BitsJS(o){
return %Int8x16FromInt16x8Bits(o);
}

function Int8x16FromUint16x8BitsJS(o){
return %Int8x16FromUint16x8Bits(o);
}

function Int8x16FromUint8x16BitsJS(o){
return %Int8x16FromUint8x16Bits(o);
}

function Uint8x16FromFloat32x4BitsJS(o){
return %Uint8x16FromFloat32x4Bits(o);
}

function Uint8x16FromInt32x4BitsJS(o){
return %Uint8x16FromInt32x4Bits(o);
}

function Uint8x16FromUint32x4BitsJS(o){
return %Uint8x16FromUint32x4Bits(o);
}

function Uint8x16FromInt16x8BitsJS(o){
return %Uint8x16FromInt16x8Bits(o);
}

function Uint8x16FromUint16x8BitsJS(o){
return %Uint8x16FromUint16x8Bits(o);
}

function Uint8x16FromInt8x16BitsJS(o){
return %Uint8x16FromInt8x16Bits(o);
}


function Float32x4Load1JS(y,z){
return %Float32x4Load1(y,z);
}
function Float32x4Store1JS(y,z,o){
return %Float32x4Store1(y,z,o);
}

function Float32x4Load2JS(y,z){
return %Float32x4Load2(y,z);
}
function Float32x4Store2JS(y,z,o){
return %Float32x4Store2(y,z,o);
}

function Float32x4Load3JS(y,z){
return %Float32x4Load3(y,z);
}
function Float32x4Store3JS(y,z,o){
return %Float32x4Store3(y,z,o);
}

function Int32x4Load1JS(y,z){
return %Int32x4Load1(y,z);
}
function Int32x4Store1JS(y,z,o){
return %Int32x4Store1(y,z,o);
}

function Int32x4Load2JS(y,z){
return %Int32x4Load2(y,z);
}
function Int32x4Store2JS(y,z,o){
return %Int32x4Store2(y,z,o);
}

function Int32x4Load3JS(y,z){
return %Int32x4Load3(y,z);
}
function Int32x4Store3JS(y,z,o){
return %Int32x4Store3(y,z,o);
}

function Uint32x4Load1JS(y,z){
return %Uint32x4Load1(y,z);
}
function Uint32x4Store1JS(y,z,o){
return %Uint32x4Store1(y,z,o);
}

function Uint32x4Load2JS(y,z){
return %Uint32x4Load2(y,z);
}
function Uint32x4Store2JS(y,z,o){
return %Uint32x4Store2(y,z,o);
}

function Uint32x4Load3JS(y,z){
return %Uint32x4Load3(y,z);
}
function Uint32x4Store3JS(y,z,o){
return %Uint32x4Store3(y,z,o);
}


function Float32x4Splat(w){
return %CreateFloat32x4(w,w,w,w);
}
function Float32x4SwizzleJS(o,A,B,C,D){
return %Float32x4Swizzle(o,A,B,C,D);
}
function Float32x4ShuffleJS(o,v,A,B,C,D){
return %Float32x4Shuffle(o,v,A,B,C,D);
}

function Int32x4Splat(w){
return %CreateInt32x4(w,w,w,w);
}
function Int32x4SwizzleJS(o,A,B,C,D){
return %Int32x4Swizzle(o,A,B,C,D);
}
function Int32x4ShuffleJS(o,v,A,B,C,D){
return %Int32x4Shuffle(o,v,A,B,C,D);
}

function Uint32x4Splat(w){
return %CreateUint32x4(w,w,w,w);
}
function Uint32x4SwizzleJS(o,A,B,C,D){
return %Uint32x4Swizzle(o,A,B,C,D);
}
function Uint32x4ShuffleJS(o,v,A,B,C,D){
return %Uint32x4Shuffle(o,v,A,B,C,D);
}

function Bool32x4Splat(w){
return %CreateBool32x4(w,w,w,w);
}
function Bool32x4SwizzleJS(o,A,B,C,D){
return %Bool32x4Swizzle(o,A,B,C,D);
}
function Bool32x4ShuffleJS(o,v,A,B,C,D){
return %Bool32x4Shuffle(o,v,A,B,C,D);
}


function Int16x8Splat(w){
return %CreateInt16x8(w,w,w,w,w,w,w,w);
}
function Int16x8SwizzleJS(o,A,B,C,D,E,F,G,H){
return %Int16x8Swizzle(o,A,B,C,D,E,F,G,H);
}
function Int16x8ShuffleJS(o,v,A,B,C,D,E,F,G,H){
return %Int16x8Shuffle(o,v,A,B,C,D,E,F,G,H);
}

function Uint16x8Splat(w){
return %CreateUint16x8(w,w,w,w,w,w,w,w);
}
function Uint16x8SwizzleJS(o,A,B,C,D,E,F,G,H){
return %Uint16x8Swizzle(o,A,B,C,D,E,F,G,H);
}
function Uint16x8ShuffleJS(o,v,A,B,C,D,E,F,G,H){
return %Uint16x8Shuffle(o,v,A,B,C,D,E,F,G,H);
}

function Bool16x8Splat(w){
return %CreateBool16x8(w,w,w,w,w,w,w,w);
}
function Bool16x8SwizzleJS(o,A,B,C,D,E,F,G,H){
return %Bool16x8Swizzle(o,A,B,C,D,E,F,G,H);
}
function Bool16x8ShuffleJS(o,v,A,B,C,D,E,F,G,H){
return %Bool16x8Shuffle(o,v,A,B,C,D,E,F,G,H);
}


function Int8x16Splat(w){
return %CreateInt8x16(w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w);
}
function Int8x16SwizzleJS(o,A,B,C,D,E,F,G,H,c8,c9,c10,c11,
c12,c13,c14,c15){
return %Int8x16Swizzle(o,A,B,C,D,E,F,G,H,c8,c9,c10,c11,
c12,c13,c14,c15);
}
function Int8x16ShuffleJS(o,v,A,B,C,D,E,F,G,H,c8,c9,c10,
c11,c12,c13,c14,c15){
return %Int8x16Shuffle(o,v,A,B,C,D,E,F,G,H,c8,c9,c10,
c11,c12,c13,c14,c15);
}

function Uint8x16Splat(w){
return %CreateUint8x16(w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w);
}
function Uint8x16SwizzleJS(o,A,B,C,D,E,F,G,H,c8,c9,c10,c11,
c12,c13,c14,c15){
return %Uint8x16Swizzle(o,A,B,C,D,E,F,G,H,c8,c9,c10,c11,
c12,c13,c14,c15);
}
function Uint8x16ShuffleJS(o,v,A,B,C,D,E,F,G,H,c8,c9,c10,
c11,c12,c13,c14,c15){
return %Uint8x16Shuffle(o,v,A,B,C,D,E,F,G,H,c8,c9,c10,
c11,c12,c13,c14,c15);
}

function Bool8x16Splat(w){
return %CreateBool8x16(w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w);
}
function Bool8x16SwizzleJS(o,A,B,C,D,E,F,G,H,c8,c9,c10,c11,
c12,c13,c14,c15){
return %Bool8x16Swizzle(o,A,B,C,D,E,F,G,H,c8,c9,c10,c11,
c12,c13,c14,c15);
}
function Bool8x16ShuffleJS(o,v,A,B,C,D,E,F,G,H,c8,c9,c10,
c11,c12,c13,c14,c15){
return %Bool8x16Shuffle(o,v,A,B,C,D,E,F,G,H,c8,c9,c10,
c11,c12,c13,c14,c15);
}


function Float32x4Constructor(A,B,C,D){
if(%_IsConstructCall())throw MakeTypeError(55,"Float32x4");
return %CreateFloat32x4(((typeof(%IS_VAR(A))==='number')?A:$nonNumberToNumber(A)),((typeof(%IS_VAR(B))==='number')?B:$nonNumberToNumber(B)),
((typeof(%IS_VAR(C))==='number')?C:$nonNumberToNumber(C)),((typeof(%IS_VAR(D))==='number')?D:$nonNumberToNumber(D)));
}
function Int32x4Constructor(A,B,C,D){
if(%_IsConstructCall())throw MakeTypeError(55,"Int32x4");
return %CreateInt32x4(((typeof(%IS_VAR(A))==='number')?A:$nonNumberToNumber(A)),((typeof(%IS_VAR(B))==='number')?B:$nonNumberToNumber(B)),
((typeof(%IS_VAR(C))==='number')?C:$nonNumberToNumber(C)),((typeof(%IS_VAR(D))==='number')?D:$nonNumberToNumber(D)));
}
function Uint32x4Constructor(A,B,C,D){
if(%_IsConstructCall())throw MakeTypeError(55,"Uint32x4");
return %CreateUint32x4(((typeof(%IS_VAR(A))==='number')?A:$nonNumberToNumber(A)),((typeof(%IS_VAR(B))==='number')?B:$nonNumberToNumber(B)),
((typeof(%IS_VAR(C))==='number')?C:$nonNumberToNumber(C)),((typeof(%IS_VAR(D))==='number')?D:$nonNumberToNumber(D)));
}
function Bool32x4Constructor(A,B,C,D){
if(%_IsConstructCall())throw MakeTypeError(55,"Bool32x4");
return %CreateBool32x4(A,B,C,D);
}
function Int16x8Constructor(A,B,C,D,E,F,G,H){
if(%_IsConstructCall())throw MakeTypeError(55,"Int16x8");
return %CreateInt16x8(((typeof(%IS_VAR(A))==='number')?A:$nonNumberToNumber(A)),((typeof(%IS_VAR(B))==='number')?B:$nonNumberToNumber(B)),
((typeof(%IS_VAR(C))==='number')?C:$nonNumberToNumber(C)),((typeof(%IS_VAR(D))==='number')?D:$nonNumberToNumber(D)),
((typeof(%IS_VAR(E))==='number')?E:$nonNumberToNumber(E)),((typeof(%IS_VAR(F))==='number')?F:$nonNumberToNumber(F)),
((typeof(%IS_VAR(G))==='number')?G:$nonNumberToNumber(G)),((typeof(%IS_VAR(H))==='number')?H:$nonNumberToNumber(H)));
}
function Uint16x8Constructor(A,B,C,D,E,F,G,H){
if(%_IsConstructCall())throw MakeTypeError(55,"Uint16x8");
return %CreateUint16x8(((typeof(%IS_VAR(A))==='number')?A:$nonNumberToNumber(A)),((typeof(%IS_VAR(B))==='number')?B:$nonNumberToNumber(B)),
((typeof(%IS_VAR(C))==='number')?C:$nonNumberToNumber(C)),((typeof(%IS_VAR(D))==='number')?D:$nonNumberToNumber(D)),
((typeof(%IS_VAR(E))==='number')?E:$nonNumberToNumber(E)),((typeof(%IS_VAR(F))==='number')?F:$nonNumberToNumber(F)),
((typeof(%IS_VAR(G))==='number')?G:$nonNumberToNumber(G)),((typeof(%IS_VAR(H))==='number')?H:$nonNumberToNumber(H)));
}
function Bool16x8Constructor(A,B,C,D,E,F,G,H){
if(%_IsConstructCall())throw MakeTypeError(55,"Bool16x8");
return %CreateBool16x8(A,B,C,D,E,F,G,H);
}
function Int8x16Constructor(A,B,C,D,E,F,G,H,c8,c9,c10,c11,
c12,c13,c14,c15){
if(%_IsConstructCall())throw MakeTypeError(55,"Int8x16");
return %CreateInt8x16(((typeof(%IS_VAR(A))==='number')?A:$nonNumberToNumber(A)),((typeof(%IS_VAR(B))==='number')?B:$nonNumberToNumber(B)),
((typeof(%IS_VAR(C))==='number')?C:$nonNumberToNumber(C)),((typeof(%IS_VAR(D))==='number')?D:$nonNumberToNumber(D)),
((typeof(%IS_VAR(E))==='number')?E:$nonNumberToNumber(E)),((typeof(%IS_VAR(F))==='number')?F:$nonNumberToNumber(F)),
((typeof(%IS_VAR(G))==='number')?G:$nonNumberToNumber(G)),((typeof(%IS_VAR(H))==='number')?H:$nonNumberToNumber(H)),
((typeof(%IS_VAR(c8))==='number')?c8:$nonNumberToNumber(c8)),((typeof(%IS_VAR(c9))==='number')?c9:$nonNumberToNumber(c9)),
((typeof(%IS_VAR(c10))==='number')?c10:$nonNumberToNumber(c10)),((typeof(%IS_VAR(c11))==='number')?c11:$nonNumberToNumber(c11)),
((typeof(%IS_VAR(c12))==='number')?c12:$nonNumberToNumber(c12)),((typeof(%IS_VAR(c13))==='number')?c13:$nonNumberToNumber(c13)),
((typeof(%IS_VAR(c14))==='number')?c14:$nonNumberToNumber(c14)),((typeof(%IS_VAR(c15))==='number')?c15:$nonNumberToNumber(c15)));
}
function Uint8x16Constructor(A,B,C,D,E,F,G,H,c8,c9,c10,c11,
c12,c13,c14,c15){
if(%_IsConstructCall())throw MakeTypeError(55,"Uint8x16");
return %CreateUint8x16(((typeof(%IS_VAR(A))==='number')?A:$nonNumberToNumber(A)),((typeof(%IS_VAR(B))==='number')?B:$nonNumberToNumber(B)),
((typeof(%IS_VAR(C))==='number')?C:$nonNumberToNumber(C)),((typeof(%IS_VAR(D))==='number')?D:$nonNumberToNumber(D)),
((typeof(%IS_VAR(E))==='number')?E:$nonNumberToNumber(E)),((typeof(%IS_VAR(F))==='number')?F:$nonNumberToNumber(F)),
((typeof(%IS_VAR(G))==='number')?G:$nonNumberToNumber(G)),((typeof(%IS_VAR(H))==='number')?H:$nonNumberToNumber(H)),
((typeof(%IS_VAR(c8))==='number')?c8:$nonNumberToNumber(c8)),((typeof(%IS_VAR(c9))==='number')?c9:$nonNumberToNumber(c9)),
((typeof(%IS_VAR(c10))==='number')?c10:$nonNumberToNumber(c10)),((typeof(%IS_VAR(c11))==='number')?c11:$nonNumberToNumber(c11)),
((typeof(%IS_VAR(c12))==='number')?c12:$nonNumberToNumber(c12)),((typeof(%IS_VAR(c13))==='number')?c13:$nonNumberToNumber(c13)),
((typeof(%IS_VAR(c14))==='number')?c14:$nonNumberToNumber(c14)),((typeof(%IS_VAR(c15))==='number')?c15:$nonNumberToNumber(c15)));
}
function Bool8x16Constructor(A,B,C,D,E,F,G,H,c8,c9,c10,c11,
c12,c13,c14,c15){
if(%_IsConstructCall())throw MakeTypeError(55,"Bool8x16");
return %CreateBool8x16(A,B,C,D,E,F,G,H,c8,c9,c10,c11,c12,
c13,c14,c15);
}
function Float32x4AbsJS(o){
return %Float32x4Abs(o);
}
function Float32x4SqrtJS(o){
return %Float32x4Sqrt(o);
}
function Float32x4RecipApproxJS(o){
return %Float32x4RecipApprox(o);
}
function Float32x4RecipSqrtApproxJS(o){
return %Float32x4RecipSqrtApprox(o);
}
function Float32x4DivJS(o,v){
return %Float32x4Div(o,v);
}
function Float32x4MinNumJS(o,v){
return %Float32x4MinNum(o,v);
}
function Float32x4MaxNumJS(o,v){
return %Float32x4MaxNum(o,v);
}
%AddNamedProperty(c,d,'SIMD',1|2);
%SetCode(e,Float32x4Constructor);
%FunctionSetPrototype(e,{});
%AddNamedProperty(e.prototype,'constructor',e,
2);
%AddNamedProperty(e.prototype,d,'Float32x4',
2|1);
b.InstallFunctions(e.prototype,2,[
'toLocaleString',Float32x4ToLocaleString,
'toString',Float32x4ToString,
'valueOf',Float32x4ValueOf,
]);


%SetCode(f,Int32x4Constructor);
%FunctionSetPrototype(f,{});
%AddNamedProperty(f.prototype,'constructor',f,
2);
%AddNamedProperty(f.prototype,d,'Int32x4',
2|1);
b.InstallFunctions(f.prototype,2,[
'toLocaleString',Int32x4ToLocaleString,
'toString',Int32x4ToString,
'valueOf',Int32x4ValueOf,
]);

%SetCode(g,Int16x8Constructor);
%FunctionSetPrototype(g,{});
%AddNamedProperty(g.prototype,'constructor',g,
2);
%AddNamedProperty(g.prototype,d,'Int16x8',
2|1);
b.InstallFunctions(g.prototype,2,[
'toLocaleString',Int16x8ToLocaleString,
'toString',Int16x8ToString,
'valueOf',Int16x8ValueOf,
]);

%SetCode(h,Int8x16Constructor);
%FunctionSetPrototype(h,{});
%AddNamedProperty(h.prototype,'constructor',h,
2);
%AddNamedProperty(h.prototype,d,'Int8x16',
2|1);
b.InstallFunctions(h.prototype,2,[
'toLocaleString',Int8x16ToLocaleString,
'toString',Int8x16ToString,
'valueOf',Int8x16ValueOf,
]);


%SetCode(i,Uint32x4Constructor);
%FunctionSetPrototype(i,{});
%AddNamedProperty(i.prototype,'constructor',i,
2);
%AddNamedProperty(i.prototype,d,'Uint32x4',
2|1);
b.InstallFunctions(i.prototype,2,[
'toLocaleString',Uint32x4ToLocaleString,
'toString',Uint32x4ToString,
'valueOf',Uint32x4ValueOf,
]);

%SetCode(j,Uint16x8Constructor);
%FunctionSetPrototype(j,{});
%AddNamedProperty(j.prototype,'constructor',j,
2);
%AddNamedProperty(j.prototype,d,'Uint16x8',
2|1);
b.InstallFunctions(j.prototype,2,[
'toLocaleString',Uint16x8ToLocaleString,
'toString',Uint16x8ToString,
'valueOf',Uint16x8ValueOf,
]);

%SetCode(k,Uint8x16Constructor);
%FunctionSetPrototype(k,{});
%AddNamedProperty(k.prototype,'constructor',k,
2);
%AddNamedProperty(k.prototype,d,'Uint8x16',
2|1);
b.InstallFunctions(k.prototype,2,[
'toLocaleString',Uint8x16ToLocaleString,
'toString',Uint8x16ToString,
'valueOf',Uint8x16ValueOf,
]);


%SetCode(l,Bool32x4Constructor);
%FunctionSetPrototype(l,{});
%AddNamedProperty(l.prototype,'constructor',l,
2);
%AddNamedProperty(l.prototype,d,'Bool32x4',
2|1);
b.InstallFunctions(l.prototype,2,[
'toLocaleString',Bool32x4ToLocaleString,
'toString',Bool32x4ToString,
'valueOf',Bool32x4ValueOf,
]);

%SetCode(m,Bool16x8Constructor);
%FunctionSetPrototype(m,{});
%AddNamedProperty(m.prototype,'constructor',m,
2);
%AddNamedProperty(m.prototype,d,'Bool16x8',
2|1);
b.InstallFunctions(m.prototype,2,[
'toLocaleString',Bool16x8ToLocaleString,
'toString',Bool16x8ToString,
'valueOf',Bool16x8ValueOf,
]);

%SetCode(n,Bool8x16Constructor);
%FunctionSetPrototype(n,{});
%AddNamedProperty(n.prototype,'constructor',n,
2);
%AddNamedProperty(n.prototype,d,'Bool8x16',
2|1);
b.InstallFunctions(n.prototype,2,[
'toLocaleString',Bool8x16ToLocaleString,
'toString',Bool8x16ToString,
'valueOf',Bool8x16ValueOf,
]);



b.InstallFunctions(e,2,[
'splat',Float32x4Splat,
'check',Float32x4CheckJS,
'extractLane',Float32x4ExtractLaneJS,
'replaceLane',Float32x4ReplaceLaneJS,
'neg',Float32x4NegJS,
'abs',Float32x4AbsJS,
'sqrt',Float32x4SqrtJS,
'reciprocalApproximation',Float32x4RecipApproxJS,
'reciprocalSqrtApproximation',Float32x4RecipSqrtApproxJS,
'add',Float32x4AddJS,
'sub',Float32x4SubJS,
'mul',Float32x4MulJS,
'div',Float32x4DivJS,
'min',Float32x4MinJS,
'max',Float32x4MaxJS,
'minNum',Float32x4MinNumJS,
'maxNum',Float32x4MaxNumJS,
'lessThan',Float32x4LessThanJS,
'lessThanOrEqual',Float32x4LessThanOrEqualJS,
'greaterThan',Float32x4GreaterThanJS,
'greaterThanOrEqual',Float32x4GreaterThanOrEqualJS,
'equal',Float32x4EqualJS,
'notEqual',Float32x4NotEqualJS,
'select',Float32x4SelectJS,
'swizzle',Float32x4SwizzleJS,
'shuffle',Float32x4ShuffleJS,
'fromInt32x4',Float32x4FromInt32x4JS,
'fromUint32x4',Float32x4FromUint32x4JS,
'fromInt32x4Bits',Float32x4FromInt32x4BitsJS,
'fromUint32x4Bits',Float32x4FromUint32x4BitsJS,
'fromInt16x8Bits',Float32x4FromInt16x8BitsJS,
'fromUint16x8Bits',Float32x4FromUint16x8BitsJS,
'fromInt8x16Bits',Float32x4FromInt8x16BitsJS,
'fromUint8x16Bits',Float32x4FromUint8x16BitsJS,
'load',Float32x4LoadJS,
'load1',Float32x4Load1JS,
'load2',Float32x4Load2JS,
'load3',Float32x4Load3JS,
'store',Float32x4StoreJS,
'store1',Float32x4Store1JS,
'store2',Float32x4Store2JS,
'store3',Float32x4Store3JS,
]);
b.InstallFunctions(f,2,[
'splat',Int32x4Splat,
'check',Int32x4CheckJS,
'extractLane',Int32x4ExtractLaneJS,
'replaceLane',Int32x4ReplaceLaneJS,
'neg',Int32x4NegJS,
'add',Int32x4AddJS,
'sub',Int32x4SubJS,
'mul',Int32x4MulJS,
'min',Int32x4MinJS,
'max',Int32x4MaxJS,
'and',Int32x4AndJS,
'or',Int32x4OrJS,
'xor',Int32x4XorJS,
'not',Int32x4NotJS,
'shiftLeftByScalar',Int32x4ShiftLeftByScalarJS,
'shiftRightByScalar',Int32x4ShiftRightByScalarJS,
'lessThan',Int32x4LessThanJS,
'lessThanOrEqual',Int32x4LessThanOrEqualJS,
'greaterThan',Int32x4GreaterThanJS,
'greaterThanOrEqual',Int32x4GreaterThanOrEqualJS,
'equal',Int32x4EqualJS,
'notEqual',Int32x4NotEqualJS,
'select',Int32x4SelectJS,
'swizzle',Int32x4SwizzleJS,
'shuffle',Int32x4ShuffleJS,
'fromFloat32x4',Int32x4FromFloat32x4JS,
'fromUint32x4',Int32x4FromUint32x4JS,
'fromFloat32x4Bits',Int32x4FromFloat32x4BitsJS,
'fromUint32x4Bits',Int32x4FromUint32x4BitsJS,
'fromInt16x8Bits',Int32x4FromInt16x8BitsJS,
'fromUint16x8Bits',Int32x4FromUint16x8BitsJS,
'fromInt8x16Bits',Int32x4FromInt8x16BitsJS,
'fromUint8x16Bits',Int32x4FromUint8x16BitsJS,
'load',Int32x4LoadJS,
'load1',Int32x4Load1JS,
'load2',Int32x4Load2JS,
'load3',Int32x4Load3JS,
'store',Int32x4StoreJS,
'store1',Int32x4Store1JS,
'store2',Int32x4Store2JS,
'store3',Int32x4Store3JS,
]);
b.InstallFunctions(i,2,[
'splat',Uint32x4Splat,
'check',Uint32x4CheckJS,
'extractLane',Uint32x4ExtractLaneJS,
'replaceLane',Uint32x4ReplaceLaneJS,
'add',Uint32x4AddJS,
'sub',Uint32x4SubJS,
'mul',Uint32x4MulJS,
'min',Uint32x4MinJS,
'max',Uint32x4MaxJS,
'and',Uint32x4AndJS,
'or',Uint32x4OrJS,
'xor',Uint32x4XorJS,
'not',Uint32x4NotJS,
'shiftLeftByScalar',Uint32x4ShiftLeftByScalarJS,
'shiftRightByScalar',Uint32x4ShiftRightByScalarJS,
'lessThan',Uint32x4LessThanJS,
'lessThanOrEqual',Uint32x4LessThanOrEqualJS,
'greaterThan',Uint32x4GreaterThanJS,
'greaterThanOrEqual',Uint32x4GreaterThanOrEqualJS,
'equal',Uint32x4EqualJS,
'notEqual',Uint32x4NotEqualJS,
'select',Uint32x4SelectJS,
'swizzle',Uint32x4SwizzleJS,
'shuffle',Uint32x4ShuffleJS,
'fromFloat32x4',Uint32x4FromFloat32x4JS,
'fromInt32x4',Uint32x4FromInt32x4JS,
'fromFloat32x4Bits',Uint32x4FromFloat32x4BitsJS,
'fromInt32x4Bits',Uint32x4FromInt32x4BitsJS,
'fromInt16x8Bits',Uint32x4FromInt16x8BitsJS,
'fromUint16x8Bits',Uint32x4FromUint16x8BitsJS,
'fromInt8x16Bits',Uint32x4FromInt8x16BitsJS,
'fromUint8x16Bits',Uint32x4FromUint8x16BitsJS,
'load',Uint32x4LoadJS,
'load1',Uint32x4Load1JS,
'load2',Uint32x4Load2JS,
'load3',Uint32x4Load3JS,
'store',Uint32x4StoreJS,
'store1',Uint32x4Store1JS,
'store2',Uint32x4Store2JS,
'store3',Uint32x4Store3JS,
]);
b.InstallFunctions(l,2,[
'splat',Bool32x4Splat,
'check',Bool32x4CheckJS,
'extractLane',Bool32x4ExtractLaneJS,
'replaceLane',Bool32x4ReplaceLaneJS,
'and',Bool32x4AndJS,
'or',Bool32x4OrJS,
'xor',Bool32x4XorJS,
'not',Bool32x4NotJS,
'anyTrue',Bool32x4AnyTrueJS,
'allTrue',Bool32x4AllTrueJS,
'swizzle',Bool32x4SwizzleJS,
'shuffle',Bool32x4ShuffleJS,
]);
b.InstallFunctions(g,2,[
'splat',Int16x8Splat,
'check',Int16x8CheckJS,
'extractLane',Int16x8ExtractLaneJS,
'replaceLane',Int16x8ReplaceLaneJS,
'neg',Int16x8NegJS,
'add',Int16x8AddJS,
'sub',Int16x8SubJS,
'addSaturate',Int16x8AddSaturateJS,
'subSaturate',Int16x8SubSaturateJS,
'mul',Int16x8MulJS,
'min',Int16x8MinJS,
'max',Int16x8MaxJS,
'and',Int16x8AndJS,
'or',Int16x8OrJS,
'xor',Int16x8XorJS,
'not',Int16x8NotJS,
'shiftLeftByScalar',Int16x8ShiftLeftByScalarJS,
'shiftRightByScalar',Int16x8ShiftRightByScalarJS,
'lessThan',Int16x8LessThanJS,
'lessThanOrEqual',Int16x8LessThanOrEqualJS,
'greaterThan',Int16x8GreaterThanJS,
'greaterThanOrEqual',Int16x8GreaterThanOrEqualJS,
'equal',Int16x8EqualJS,
'notEqual',Int16x8NotEqualJS,
'select',Int16x8SelectJS,
'swizzle',Int16x8SwizzleJS,
'shuffle',Int16x8ShuffleJS,
'fromUint16x8',Int16x8FromUint16x8JS,
'fromFloat32x4Bits',Int16x8FromFloat32x4BitsJS,
'fromInt32x4Bits',Int16x8FromInt32x4BitsJS,
'fromUint32x4Bits',Int16x8FromUint32x4BitsJS,
'fromUint16x8Bits',Int16x8FromUint16x8BitsJS,
'fromInt8x16Bits',Int16x8FromInt8x16BitsJS,
'fromUint8x16Bits',Int16x8FromUint8x16BitsJS,
'load',Int16x8LoadJS,
'store',Int16x8StoreJS,
]);
b.InstallFunctions(j,2,[
'splat',Uint16x8Splat,
'check',Uint16x8CheckJS,
'extractLane',Uint16x8ExtractLaneJS,
'replaceLane',Uint16x8ReplaceLaneJS,
'add',Uint16x8AddJS,
'sub',Uint16x8SubJS,
'addSaturate',Uint16x8AddSaturateJS,
'subSaturate',Uint16x8SubSaturateJS,
'mul',Uint16x8MulJS,
'min',Uint16x8MinJS,
'max',Uint16x8MaxJS,
'and',Uint16x8AndJS,
'or',Uint16x8OrJS,
'xor',Uint16x8XorJS,
'not',Uint16x8NotJS,
'shiftLeftByScalar',Uint16x8ShiftLeftByScalarJS,
'shiftRightByScalar',Uint16x8ShiftRightByScalarJS,
'lessThan',Uint16x8LessThanJS,
'lessThanOrEqual',Uint16x8LessThanOrEqualJS,
'greaterThan',Uint16x8GreaterThanJS,
'greaterThanOrEqual',Uint16x8GreaterThanOrEqualJS,
'equal',Uint16x8EqualJS,
'notEqual',Uint16x8NotEqualJS,
'select',Uint16x8SelectJS,
'swizzle',Uint16x8SwizzleJS,
'shuffle',Uint16x8ShuffleJS,
'fromInt16x8',Uint16x8FromInt16x8JS,
'fromFloat32x4Bits',Uint16x8FromFloat32x4BitsJS,
'fromInt32x4Bits',Uint16x8FromInt32x4BitsJS,
'fromUint32x4Bits',Uint16x8FromUint32x4BitsJS,
'fromInt16x8Bits',Uint16x8FromInt16x8BitsJS,
'fromInt8x16Bits',Uint16x8FromInt8x16BitsJS,
'fromUint8x16Bits',Uint16x8FromUint8x16BitsJS,
'load',Uint16x8LoadJS,
'store',Uint16x8StoreJS,
]);
b.InstallFunctions(m,2,[
'splat',Bool16x8Splat,
'check',Bool16x8CheckJS,
'extractLane',Bool16x8ExtractLaneJS,
'replaceLane',Bool16x8ReplaceLaneJS,
'and',Bool16x8AndJS,
'or',Bool16x8OrJS,
'xor',Bool16x8XorJS,
'not',Bool16x8NotJS,
'anyTrue',Bool16x8AnyTrueJS,
'allTrue',Bool16x8AllTrueJS,
'swizzle',Bool16x8SwizzleJS,
'shuffle',Bool16x8ShuffleJS,
]);
b.InstallFunctions(h,2,[
'splat',Int8x16Splat,
'check',Int8x16CheckJS,
'extractLane',Int8x16ExtractLaneJS,
'replaceLane',Int8x16ReplaceLaneJS,
'neg',Int8x16NegJS,
'add',Int8x16AddJS,
'sub',Int8x16SubJS,
'addSaturate',Int8x16AddSaturateJS,
'subSaturate',Int8x16SubSaturateJS,
'mul',Int8x16MulJS,
'min',Int8x16MinJS,
'max',Int8x16MaxJS,
'and',Int8x16AndJS,
'or',Int8x16OrJS,
'xor',Int8x16XorJS,
'not',Int8x16NotJS,
'shiftLeftByScalar',Int8x16ShiftLeftByScalarJS,
'shiftRightByScalar',Int8x16ShiftRightByScalarJS,
'lessThan',Int8x16LessThanJS,
'lessThanOrEqual',Int8x16LessThanOrEqualJS,
'greaterThan',Int8x16GreaterThanJS,
'greaterThanOrEqual',Int8x16GreaterThanOrEqualJS,
'equal',Int8x16EqualJS,
'notEqual',Int8x16NotEqualJS,
'select',Int8x16SelectJS,
'swizzle',Int8x16SwizzleJS,
'shuffle',Int8x16ShuffleJS,
'fromUint8x16',Int8x16FromUint8x16JS,
'fromFloat32x4Bits',Int8x16FromFloat32x4BitsJS,
'fromInt32x4Bits',Int8x16FromInt32x4BitsJS,
'fromUint32x4Bits',Int8x16FromUint32x4BitsJS,
'fromInt16x8Bits',Int8x16FromInt16x8BitsJS,
'fromUint16x8Bits',Int8x16FromUint16x8BitsJS,
'fromUint8x16Bits',Int8x16FromUint8x16BitsJS,
'load',Int8x16LoadJS,
'store',Int8x16StoreJS,
]);
b.InstallFunctions(k,2,[
'splat',Uint8x16Splat,
'check',Uint8x16CheckJS,
'extractLane',Uint8x16ExtractLaneJS,
'replaceLane',Uint8x16ReplaceLaneJS,
'add',Uint8x16AddJS,
'sub',Uint8x16SubJS,
'addSaturate',Uint8x16AddSaturateJS,
'subSaturate',Uint8x16SubSaturateJS,
'mul',Uint8x16MulJS,
'min',Uint8x16MinJS,
'max',Uint8x16MaxJS,
'and',Uint8x16AndJS,
'or',Uint8x16OrJS,
'xor',Uint8x16XorJS,
'not',Uint8x16NotJS,
'shiftLeftByScalar',Uint8x16ShiftLeftByScalarJS,
'shiftRightByScalar',Uint8x16ShiftRightByScalarJS,
'lessThan',Uint8x16LessThanJS,
'lessThanOrEqual',Uint8x16LessThanOrEqualJS,
'greaterThan',Uint8x16GreaterThanJS,
'greaterThanOrEqual',Uint8x16GreaterThanOrEqualJS,
'equal',Uint8x16EqualJS,
'notEqual',Uint8x16NotEqualJS,
'select',Uint8x16SelectJS,
'swizzle',Uint8x16SwizzleJS,
'shuffle',Uint8x16ShuffleJS,
'fromInt8x16',Uint8x16FromInt8x16JS,
'fromFloat32x4Bits',Uint8x16FromFloat32x4BitsJS,
'fromInt32x4Bits',Uint8x16FromInt32x4BitsJS,
'fromUint32x4Bits',Uint8x16FromUint32x4BitsJS,
'fromInt16x8Bits',Uint8x16FromInt16x8BitsJS,
'fromUint16x8Bits',Uint8x16FromUint16x8BitsJS,
'fromInt8x16Bits',Uint8x16FromInt8x16BitsJS,
'load',Uint8x16LoadJS,
'store',Uint8x16StoreJS,
]);
b.InstallFunctions(n,2,[
'splat',Bool8x16Splat,
'check',Bool8x16CheckJS,
'extractLane',Bool8x16ExtractLaneJS,
'replaceLane',Bool8x16ReplaceLaneJS,
'and',Bool8x16AndJS,
'or',Bool8x16OrJS,
'xor',Bool8x16XorJS,
'not',Bool8x16NotJS,
'anyTrue',Bool8x16AnyTrueJS,
'allTrue',Bool8x16AllTrueJS,
'swizzle',Bool8x16SwizzleJS,
'shuffle',Bool8x16ShuffleJS,
]);
b.Export(function(I){
I.Float32x4ToString=Float32x4ToString;
I.Int32x4ToString=Int32x4ToString;
I.Uint32x4ToString=Uint32x4ToString;
I.Bool32x4ToString=Bool32x4ToString;
I.Int16x8ToString=Int16x8ToString;
I.Uint16x8ToString=Uint16x8ToString;
I.Bool16x8ToString=Bool16x8ToString;
I.Int8x16ToString=Int8x16ToString;
I.Uint8x16ToString=Uint8x16ToString;
I.Bool8x16ToString=Bool8x16ToString;
});
})

dummy<(function() {})dummy<(function(){})