inline.go 137 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638
  1. package otto
  2. import (
  3. "math"
  4. )
  5. func _newContext(runtime *_runtime) {
  6. {
  7. runtime.global.ObjectPrototype = &_object{
  8. runtime: runtime,
  9. class: classObject,
  10. objectClass: _classObject,
  11. prototype: nil,
  12. extensible: true,
  13. value: prototypeValueObject,
  14. }
  15. }
  16. {
  17. runtime.global.FunctionPrototype = &_object{
  18. runtime: runtime,
  19. class: classFunction,
  20. objectClass: _classObject,
  21. prototype: runtime.global.ObjectPrototype,
  22. extensible: true,
  23. value: prototypeValueFunction,
  24. }
  25. }
  26. {
  27. valueOf_function := &_object{
  28. runtime: runtime,
  29. class: classFunction,
  30. objectClass: _classObject,
  31. prototype: runtime.global.FunctionPrototype,
  32. extensible: true,
  33. property: map[string]_property{
  34. propertyLength: _property{
  35. mode: 0,
  36. value: Value{
  37. kind: valueNumber,
  38. value: 0,
  39. },
  40. },
  41. },
  42. propertyOrder: []string{
  43. propertyLength,
  44. },
  45. value: _nativeFunctionObject{
  46. name: "valueOf",
  47. call: builtinObject_valueOf,
  48. },
  49. }
  50. toString_function := &_object{
  51. runtime: runtime,
  52. class: classFunction,
  53. objectClass: _classObject,
  54. prototype: runtime.global.FunctionPrototype,
  55. extensible: true,
  56. property: map[string]_property{
  57. propertyLength: _property{
  58. mode: 0,
  59. value: Value{
  60. kind: valueNumber,
  61. value: 0,
  62. },
  63. },
  64. },
  65. propertyOrder: []string{
  66. propertyLength,
  67. },
  68. value: _nativeFunctionObject{
  69. name: "toString",
  70. call: builtinObject_toString,
  71. },
  72. }
  73. toLocaleString_function := &_object{
  74. runtime: runtime,
  75. class: classFunction,
  76. objectClass: _classObject,
  77. prototype: runtime.global.FunctionPrototype,
  78. extensible: true,
  79. property: map[string]_property{
  80. propertyLength: _property{
  81. mode: 0,
  82. value: Value{
  83. kind: valueNumber,
  84. value: 0,
  85. },
  86. },
  87. },
  88. propertyOrder: []string{
  89. propertyLength,
  90. },
  91. value: _nativeFunctionObject{
  92. name: "toLocaleString",
  93. call: builtinObject_toLocaleString,
  94. },
  95. }
  96. hasOwnProperty_function := &_object{
  97. runtime: runtime,
  98. class: classFunction,
  99. objectClass: _classObject,
  100. prototype: runtime.global.FunctionPrototype,
  101. extensible: true,
  102. property: map[string]_property{
  103. propertyLength: _property{
  104. mode: 0,
  105. value: Value{
  106. kind: valueNumber,
  107. value: 1,
  108. },
  109. },
  110. },
  111. propertyOrder: []string{
  112. propertyLength,
  113. },
  114. value: _nativeFunctionObject{
  115. name: "hasOwnProperty",
  116. call: builtinObject_hasOwnProperty,
  117. },
  118. }
  119. isPrototypeOf_function := &_object{
  120. runtime: runtime,
  121. class: classFunction,
  122. objectClass: _classObject,
  123. prototype: runtime.global.FunctionPrototype,
  124. extensible: true,
  125. property: map[string]_property{
  126. propertyLength: _property{
  127. mode: 0,
  128. value: Value{
  129. kind: valueNumber,
  130. value: 1,
  131. },
  132. },
  133. },
  134. propertyOrder: []string{
  135. propertyLength,
  136. },
  137. value: _nativeFunctionObject{
  138. name: "isPrototypeOf",
  139. call: builtinObject_isPrototypeOf,
  140. },
  141. }
  142. propertyIsEnumerable_function := &_object{
  143. runtime: runtime,
  144. class: classFunction,
  145. objectClass: _classObject,
  146. prototype: runtime.global.FunctionPrototype,
  147. extensible: true,
  148. property: map[string]_property{
  149. propertyLength: _property{
  150. mode: 0,
  151. value: Value{
  152. kind: valueNumber,
  153. value: 1,
  154. },
  155. },
  156. },
  157. propertyOrder: []string{
  158. propertyLength,
  159. },
  160. value: _nativeFunctionObject{
  161. name: "propertyIsEnumerable",
  162. call: builtinObject_propertyIsEnumerable,
  163. },
  164. }
  165. runtime.global.ObjectPrototype.property = map[string]_property{
  166. "valueOf": _property{
  167. mode: 0101,
  168. value: Value{
  169. kind: valueObject,
  170. value: valueOf_function,
  171. },
  172. },
  173. "toString": _property{
  174. mode: 0101,
  175. value: Value{
  176. kind: valueObject,
  177. value: toString_function,
  178. },
  179. },
  180. "toLocaleString": _property{
  181. mode: 0101,
  182. value: Value{
  183. kind: valueObject,
  184. value: toLocaleString_function,
  185. },
  186. },
  187. "hasOwnProperty": _property{
  188. mode: 0101,
  189. value: Value{
  190. kind: valueObject,
  191. value: hasOwnProperty_function,
  192. },
  193. },
  194. "isPrototypeOf": _property{
  195. mode: 0101,
  196. value: Value{
  197. kind: valueObject,
  198. value: isPrototypeOf_function,
  199. },
  200. },
  201. "propertyIsEnumerable": _property{
  202. mode: 0101,
  203. value: Value{
  204. kind: valueObject,
  205. value: propertyIsEnumerable_function,
  206. },
  207. },
  208. "constructor": _property{
  209. mode: 0101,
  210. value: Value{},
  211. },
  212. }
  213. runtime.global.ObjectPrototype.propertyOrder = []string{
  214. "valueOf",
  215. "toString",
  216. "toLocaleString",
  217. "hasOwnProperty",
  218. "isPrototypeOf",
  219. "propertyIsEnumerable",
  220. "constructor",
  221. }
  222. }
  223. {
  224. toString_function := &_object{
  225. runtime: runtime,
  226. class: classFunction,
  227. objectClass: _classObject,
  228. prototype: runtime.global.FunctionPrototype,
  229. extensible: true,
  230. property: map[string]_property{
  231. propertyLength: _property{
  232. mode: 0,
  233. value: Value{
  234. kind: valueNumber,
  235. value: 0,
  236. },
  237. },
  238. },
  239. propertyOrder: []string{
  240. propertyLength,
  241. },
  242. value: _nativeFunctionObject{
  243. name: "toString",
  244. call: builtinFunction_toString,
  245. },
  246. }
  247. apply_function := &_object{
  248. runtime: runtime,
  249. class: classFunction,
  250. objectClass: _classObject,
  251. prototype: runtime.global.FunctionPrototype,
  252. extensible: true,
  253. property: map[string]_property{
  254. propertyLength: _property{
  255. mode: 0,
  256. value: Value{
  257. kind: valueNumber,
  258. value: 2,
  259. },
  260. },
  261. },
  262. propertyOrder: []string{
  263. propertyLength,
  264. },
  265. value: _nativeFunctionObject{
  266. name: "apply",
  267. call: builtinFunction_apply,
  268. },
  269. }
  270. call_function := &_object{
  271. runtime: runtime,
  272. class: classFunction,
  273. objectClass: _classObject,
  274. prototype: runtime.global.FunctionPrototype,
  275. extensible: true,
  276. property: map[string]_property{
  277. propertyLength: _property{
  278. mode: 0,
  279. value: Value{
  280. kind: valueNumber,
  281. value: 1,
  282. },
  283. },
  284. },
  285. propertyOrder: []string{
  286. propertyLength,
  287. },
  288. value: _nativeFunctionObject{
  289. name: "call",
  290. call: builtinFunction_call,
  291. },
  292. }
  293. bind_function := &_object{
  294. runtime: runtime,
  295. class: classFunction,
  296. objectClass: _classObject,
  297. prototype: runtime.global.FunctionPrototype,
  298. extensible: true,
  299. property: map[string]_property{
  300. propertyLength: _property{
  301. mode: 0,
  302. value: Value{
  303. kind: valueNumber,
  304. value: 1,
  305. },
  306. },
  307. },
  308. propertyOrder: []string{
  309. propertyLength,
  310. },
  311. value: _nativeFunctionObject{
  312. name: "bind",
  313. call: builtinFunction_bind,
  314. },
  315. }
  316. runtime.global.FunctionPrototype.property = map[string]_property{
  317. "toString": _property{
  318. mode: 0101,
  319. value: Value{
  320. kind: valueObject,
  321. value: toString_function,
  322. },
  323. },
  324. "apply": _property{
  325. mode: 0101,
  326. value: Value{
  327. kind: valueObject,
  328. value: apply_function,
  329. },
  330. },
  331. "call": _property{
  332. mode: 0101,
  333. value: Value{
  334. kind: valueObject,
  335. value: call_function,
  336. },
  337. },
  338. "bind": _property{
  339. mode: 0101,
  340. value: Value{
  341. kind: valueObject,
  342. value: bind_function,
  343. },
  344. },
  345. "constructor": _property{
  346. mode: 0101,
  347. value: Value{},
  348. },
  349. propertyLength: _property{
  350. mode: 0,
  351. value: Value{
  352. kind: valueNumber,
  353. value: 0,
  354. },
  355. },
  356. }
  357. runtime.global.FunctionPrototype.propertyOrder = []string{
  358. "toString",
  359. "apply",
  360. "call",
  361. "bind",
  362. "constructor",
  363. propertyLength,
  364. }
  365. }
  366. {
  367. getPrototypeOf_function := &_object{
  368. runtime: runtime,
  369. class: classFunction,
  370. objectClass: _classObject,
  371. prototype: runtime.global.FunctionPrototype,
  372. extensible: true,
  373. property: map[string]_property{
  374. propertyLength: _property{
  375. mode: 0,
  376. value: Value{
  377. kind: valueNumber,
  378. value: 1,
  379. },
  380. },
  381. },
  382. propertyOrder: []string{
  383. propertyLength,
  384. },
  385. value: _nativeFunctionObject{
  386. name: "getPrototypeOf",
  387. call: builtinObject_getPrototypeOf,
  388. },
  389. }
  390. getOwnPropertyDescriptor_function := &_object{
  391. runtime: runtime,
  392. class: classFunction,
  393. objectClass: _classObject,
  394. prototype: runtime.global.FunctionPrototype,
  395. extensible: true,
  396. property: map[string]_property{
  397. propertyLength: _property{
  398. mode: 0,
  399. value: Value{
  400. kind: valueNumber,
  401. value: 2,
  402. },
  403. },
  404. },
  405. propertyOrder: []string{
  406. propertyLength,
  407. },
  408. value: _nativeFunctionObject{
  409. name: "getOwnPropertyDescriptor",
  410. call: builtinObject_getOwnPropertyDescriptor,
  411. },
  412. }
  413. defineProperty_function := &_object{
  414. runtime: runtime,
  415. class: classFunction,
  416. objectClass: _classObject,
  417. prototype: runtime.global.FunctionPrototype,
  418. extensible: true,
  419. property: map[string]_property{
  420. propertyLength: _property{
  421. mode: 0,
  422. value: Value{
  423. kind: valueNumber,
  424. value: 3,
  425. },
  426. },
  427. },
  428. propertyOrder: []string{
  429. propertyLength,
  430. },
  431. value: _nativeFunctionObject{
  432. name: "defineProperty",
  433. call: builtinObject_defineProperty,
  434. },
  435. }
  436. defineProperties_function := &_object{
  437. runtime: runtime,
  438. class: classFunction,
  439. objectClass: _classObject,
  440. prototype: runtime.global.FunctionPrototype,
  441. extensible: true,
  442. property: map[string]_property{
  443. propertyLength: _property{
  444. mode: 0,
  445. value: Value{
  446. kind: valueNumber,
  447. value: 2,
  448. },
  449. },
  450. },
  451. propertyOrder: []string{
  452. propertyLength,
  453. },
  454. value: _nativeFunctionObject{
  455. name: "defineProperties",
  456. call: builtinObject_defineProperties,
  457. },
  458. }
  459. create_function := &_object{
  460. runtime: runtime,
  461. class: classFunction,
  462. objectClass: _classObject,
  463. prototype: runtime.global.FunctionPrototype,
  464. extensible: true,
  465. property: map[string]_property{
  466. propertyLength: _property{
  467. mode: 0,
  468. value: Value{
  469. kind: valueNumber,
  470. value: 2,
  471. },
  472. },
  473. },
  474. propertyOrder: []string{
  475. propertyLength,
  476. },
  477. value: _nativeFunctionObject{
  478. name: "create",
  479. call: builtinObject_create,
  480. },
  481. }
  482. isExtensible_function := &_object{
  483. runtime: runtime,
  484. class: classFunction,
  485. objectClass: _classObject,
  486. prototype: runtime.global.FunctionPrototype,
  487. extensible: true,
  488. property: map[string]_property{
  489. propertyLength: _property{
  490. mode: 0,
  491. value: Value{
  492. kind: valueNumber,
  493. value: 1,
  494. },
  495. },
  496. },
  497. propertyOrder: []string{
  498. propertyLength,
  499. },
  500. value: _nativeFunctionObject{
  501. name: "isExtensible",
  502. call: builtinObject_isExtensible,
  503. },
  504. }
  505. preventExtensions_function := &_object{
  506. runtime: runtime,
  507. class: classFunction,
  508. objectClass: _classObject,
  509. prototype: runtime.global.FunctionPrototype,
  510. extensible: true,
  511. property: map[string]_property{
  512. propertyLength: _property{
  513. mode: 0,
  514. value: Value{
  515. kind: valueNumber,
  516. value: 1,
  517. },
  518. },
  519. },
  520. propertyOrder: []string{
  521. propertyLength,
  522. },
  523. value: _nativeFunctionObject{
  524. name: "preventExtensions",
  525. call: builtinObject_preventExtensions,
  526. },
  527. }
  528. isSealed_function := &_object{
  529. runtime: runtime,
  530. class: classFunction,
  531. objectClass: _classObject,
  532. prototype: runtime.global.FunctionPrototype,
  533. extensible: true,
  534. property: map[string]_property{
  535. propertyLength: _property{
  536. mode: 0,
  537. value: Value{
  538. kind: valueNumber,
  539. value: 1,
  540. },
  541. },
  542. },
  543. propertyOrder: []string{
  544. propertyLength,
  545. },
  546. value: _nativeFunctionObject{
  547. name: "isSealed",
  548. call: builtinObject_isSealed,
  549. },
  550. }
  551. seal_function := &_object{
  552. runtime: runtime,
  553. class: classFunction,
  554. objectClass: _classObject,
  555. prototype: runtime.global.FunctionPrototype,
  556. extensible: true,
  557. property: map[string]_property{
  558. propertyLength: _property{
  559. mode: 0,
  560. value: Value{
  561. kind: valueNumber,
  562. value: 1,
  563. },
  564. },
  565. },
  566. propertyOrder: []string{
  567. propertyLength,
  568. },
  569. value: _nativeFunctionObject{
  570. name: "seal",
  571. call: builtinObject_seal,
  572. },
  573. }
  574. isFrozen_function := &_object{
  575. runtime: runtime,
  576. class: classFunction,
  577. objectClass: _classObject,
  578. prototype: runtime.global.FunctionPrototype,
  579. extensible: true,
  580. property: map[string]_property{
  581. propertyLength: _property{
  582. mode: 0,
  583. value: Value{
  584. kind: valueNumber,
  585. value: 1,
  586. },
  587. },
  588. },
  589. propertyOrder: []string{
  590. propertyLength,
  591. },
  592. value: _nativeFunctionObject{
  593. name: "isFrozen",
  594. call: builtinObject_isFrozen,
  595. },
  596. }
  597. freeze_function := &_object{
  598. runtime: runtime,
  599. class: classFunction,
  600. objectClass: _classObject,
  601. prototype: runtime.global.FunctionPrototype,
  602. extensible: true,
  603. property: map[string]_property{
  604. propertyLength: _property{
  605. mode: 0,
  606. value: Value{
  607. kind: valueNumber,
  608. value: 1,
  609. },
  610. },
  611. },
  612. propertyOrder: []string{
  613. propertyLength,
  614. },
  615. value: _nativeFunctionObject{
  616. name: "freeze",
  617. call: builtinObject_freeze,
  618. },
  619. }
  620. keys_function := &_object{
  621. runtime: runtime,
  622. class: classFunction,
  623. objectClass: _classObject,
  624. prototype: runtime.global.FunctionPrototype,
  625. extensible: true,
  626. property: map[string]_property{
  627. propertyLength: _property{
  628. mode: 0,
  629. value: Value{
  630. kind: valueNumber,
  631. value: 1,
  632. },
  633. },
  634. },
  635. propertyOrder: []string{
  636. propertyLength,
  637. },
  638. value: _nativeFunctionObject{
  639. name: "keys",
  640. call: builtinObject_keys,
  641. },
  642. }
  643. getOwnPropertyNames_function := &_object{
  644. runtime: runtime,
  645. class: classFunction,
  646. objectClass: _classObject,
  647. prototype: runtime.global.FunctionPrototype,
  648. extensible: true,
  649. property: map[string]_property{
  650. propertyLength: _property{
  651. mode: 0,
  652. value: Value{
  653. kind: valueNumber,
  654. value: 1,
  655. },
  656. },
  657. },
  658. propertyOrder: []string{
  659. propertyLength,
  660. },
  661. value: _nativeFunctionObject{
  662. name: "getOwnPropertyNames",
  663. call: builtinObject_getOwnPropertyNames,
  664. },
  665. }
  666. runtime.global.Object = &_object{
  667. runtime: runtime,
  668. class: classFunction,
  669. objectClass: _classObject,
  670. prototype: runtime.global.FunctionPrototype,
  671. extensible: true,
  672. value: _nativeFunctionObject{
  673. name: classObject,
  674. call: builtinObject,
  675. construct: builtinNewObject,
  676. },
  677. property: map[string]_property{
  678. propertyLength: _property{
  679. mode: 0,
  680. value: Value{
  681. kind: valueNumber,
  682. value: 1,
  683. },
  684. },
  685. "prototype": _property{
  686. mode: 0,
  687. value: Value{
  688. kind: valueObject,
  689. value: runtime.global.ObjectPrototype,
  690. },
  691. },
  692. "getPrototypeOf": _property{
  693. mode: 0101,
  694. value: Value{
  695. kind: valueObject,
  696. value: getPrototypeOf_function,
  697. },
  698. },
  699. "getOwnPropertyDescriptor": _property{
  700. mode: 0101,
  701. value: Value{
  702. kind: valueObject,
  703. value: getOwnPropertyDescriptor_function,
  704. },
  705. },
  706. "defineProperty": _property{
  707. mode: 0101,
  708. value: Value{
  709. kind: valueObject,
  710. value: defineProperty_function,
  711. },
  712. },
  713. "defineProperties": _property{
  714. mode: 0101,
  715. value: Value{
  716. kind: valueObject,
  717. value: defineProperties_function,
  718. },
  719. },
  720. "create": _property{
  721. mode: 0101,
  722. value: Value{
  723. kind: valueObject,
  724. value: create_function,
  725. },
  726. },
  727. "isExtensible": _property{
  728. mode: 0101,
  729. value: Value{
  730. kind: valueObject,
  731. value: isExtensible_function,
  732. },
  733. },
  734. "preventExtensions": _property{
  735. mode: 0101,
  736. value: Value{
  737. kind: valueObject,
  738. value: preventExtensions_function,
  739. },
  740. },
  741. "isSealed": _property{
  742. mode: 0101,
  743. value: Value{
  744. kind: valueObject,
  745. value: isSealed_function,
  746. },
  747. },
  748. "seal": _property{
  749. mode: 0101,
  750. value: Value{
  751. kind: valueObject,
  752. value: seal_function,
  753. },
  754. },
  755. "isFrozen": _property{
  756. mode: 0101,
  757. value: Value{
  758. kind: valueObject,
  759. value: isFrozen_function,
  760. },
  761. },
  762. "freeze": _property{
  763. mode: 0101,
  764. value: Value{
  765. kind: valueObject,
  766. value: freeze_function,
  767. },
  768. },
  769. "keys": _property{
  770. mode: 0101,
  771. value: Value{
  772. kind: valueObject,
  773. value: keys_function,
  774. },
  775. },
  776. "getOwnPropertyNames": _property{
  777. mode: 0101,
  778. value: Value{
  779. kind: valueObject,
  780. value: getOwnPropertyNames_function,
  781. },
  782. },
  783. },
  784. propertyOrder: []string{
  785. propertyLength,
  786. "prototype",
  787. "getPrototypeOf",
  788. "getOwnPropertyDescriptor",
  789. "defineProperty",
  790. "defineProperties",
  791. "create",
  792. "isExtensible",
  793. "preventExtensions",
  794. "isSealed",
  795. "seal",
  796. "isFrozen",
  797. "freeze",
  798. "keys",
  799. "getOwnPropertyNames",
  800. },
  801. }
  802. runtime.global.ObjectPrototype.property["constructor"] =
  803. _property{
  804. mode: 0101,
  805. value: Value{
  806. kind: valueObject,
  807. value: runtime.global.Object,
  808. },
  809. }
  810. }
  811. {
  812. Function := &_object{
  813. runtime: runtime,
  814. class: classFunction,
  815. objectClass: _classObject,
  816. prototype: runtime.global.FunctionPrototype,
  817. extensible: true,
  818. value: _nativeFunctionObject{
  819. name: classFunction,
  820. call: builtinFunction,
  821. construct: builtinNewFunction,
  822. },
  823. property: map[string]_property{
  824. propertyLength: _property{
  825. mode: 0,
  826. value: Value{
  827. kind: valueNumber,
  828. value: 1,
  829. },
  830. },
  831. "prototype": _property{
  832. mode: 0,
  833. value: Value{
  834. kind: valueObject,
  835. value: runtime.global.FunctionPrototype,
  836. },
  837. },
  838. },
  839. propertyOrder: []string{
  840. propertyLength,
  841. "prototype",
  842. },
  843. }
  844. runtime.global.Function = Function
  845. runtime.global.FunctionPrototype.property["constructor"] =
  846. _property{
  847. mode: 0101,
  848. value: Value{
  849. kind: valueObject,
  850. value: runtime.global.Function,
  851. },
  852. }
  853. }
  854. {
  855. toString_function := &_object{
  856. runtime: runtime,
  857. class: classFunction,
  858. objectClass: _classObject,
  859. prototype: runtime.global.FunctionPrototype,
  860. extensible: true,
  861. property: map[string]_property{
  862. propertyLength: _property{
  863. mode: 0,
  864. value: Value{
  865. kind: valueNumber,
  866. value: 0,
  867. },
  868. },
  869. },
  870. propertyOrder: []string{
  871. propertyLength,
  872. },
  873. value: _nativeFunctionObject{
  874. name: "toString",
  875. call: builtinArray_toString,
  876. },
  877. }
  878. toLocaleString_function := &_object{
  879. runtime: runtime,
  880. class: classFunction,
  881. objectClass: _classObject,
  882. prototype: runtime.global.FunctionPrototype,
  883. extensible: true,
  884. property: map[string]_property{
  885. propertyLength: _property{
  886. mode: 0,
  887. value: Value{
  888. kind: valueNumber,
  889. value: 0,
  890. },
  891. },
  892. },
  893. propertyOrder: []string{
  894. propertyLength,
  895. },
  896. value: _nativeFunctionObject{
  897. name: "toLocaleString",
  898. call: builtinArray_toLocaleString,
  899. },
  900. }
  901. concat_function := &_object{
  902. runtime: runtime,
  903. class: classFunction,
  904. objectClass: _classObject,
  905. prototype: runtime.global.FunctionPrototype,
  906. extensible: true,
  907. property: map[string]_property{
  908. propertyLength: _property{
  909. mode: 0,
  910. value: Value{
  911. kind: valueNumber,
  912. value: 1,
  913. },
  914. },
  915. },
  916. propertyOrder: []string{
  917. propertyLength,
  918. },
  919. value: _nativeFunctionObject{
  920. name: "concat",
  921. call: builtinArray_concat,
  922. },
  923. }
  924. join_function := &_object{
  925. runtime: runtime,
  926. class: classFunction,
  927. objectClass: _classObject,
  928. prototype: runtime.global.FunctionPrototype,
  929. extensible: true,
  930. property: map[string]_property{
  931. propertyLength: _property{
  932. mode: 0,
  933. value: Value{
  934. kind: valueNumber,
  935. value: 1,
  936. },
  937. },
  938. },
  939. propertyOrder: []string{
  940. propertyLength,
  941. },
  942. value: _nativeFunctionObject{
  943. name: "join",
  944. call: builtinArray_join,
  945. },
  946. }
  947. splice_function := &_object{
  948. runtime: runtime,
  949. class: classFunction,
  950. objectClass: _classObject,
  951. prototype: runtime.global.FunctionPrototype,
  952. extensible: true,
  953. property: map[string]_property{
  954. propertyLength: _property{
  955. mode: 0,
  956. value: Value{
  957. kind: valueNumber,
  958. value: 2,
  959. },
  960. },
  961. },
  962. propertyOrder: []string{
  963. propertyLength,
  964. },
  965. value: _nativeFunctionObject{
  966. name: "splice",
  967. call: builtinArray_splice,
  968. },
  969. }
  970. shift_function := &_object{
  971. runtime: runtime,
  972. class: classFunction,
  973. objectClass: _classObject,
  974. prototype: runtime.global.FunctionPrototype,
  975. extensible: true,
  976. property: map[string]_property{
  977. propertyLength: _property{
  978. mode: 0,
  979. value: Value{
  980. kind: valueNumber,
  981. value: 0,
  982. },
  983. },
  984. },
  985. propertyOrder: []string{
  986. propertyLength,
  987. },
  988. value: _nativeFunctionObject{
  989. name: "shift",
  990. call: builtinArray_shift,
  991. },
  992. }
  993. pop_function := &_object{
  994. runtime: runtime,
  995. class: classFunction,
  996. objectClass: _classObject,
  997. prototype: runtime.global.FunctionPrototype,
  998. extensible: true,
  999. property: map[string]_property{
  1000. propertyLength: _property{
  1001. mode: 0,
  1002. value: Value{
  1003. kind: valueNumber,
  1004. value: 0,
  1005. },
  1006. },
  1007. },
  1008. propertyOrder: []string{
  1009. propertyLength,
  1010. },
  1011. value: _nativeFunctionObject{
  1012. name: "pop",
  1013. call: builtinArray_pop,
  1014. },
  1015. }
  1016. push_function := &_object{
  1017. runtime: runtime,
  1018. class: classFunction,
  1019. objectClass: _classObject,
  1020. prototype: runtime.global.FunctionPrototype,
  1021. extensible: true,
  1022. property: map[string]_property{
  1023. propertyLength: _property{
  1024. mode: 0,
  1025. value: Value{
  1026. kind: valueNumber,
  1027. value: 1,
  1028. },
  1029. },
  1030. },
  1031. propertyOrder: []string{
  1032. propertyLength,
  1033. },
  1034. value: _nativeFunctionObject{
  1035. name: "push",
  1036. call: builtinArray_push,
  1037. },
  1038. }
  1039. slice_function := &_object{
  1040. runtime: runtime,
  1041. class: classFunction,
  1042. objectClass: _classObject,
  1043. prototype: runtime.global.FunctionPrototype,
  1044. extensible: true,
  1045. property: map[string]_property{
  1046. propertyLength: _property{
  1047. mode: 0,
  1048. value: Value{
  1049. kind: valueNumber,
  1050. value: 2,
  1051. },
  1052. },
  1053. },
  1054. propertyOrder: []string{
  1055. propertyLength,
  1056. },
  1057. value: _nativeFunctionObject{
  1058. name: "slice",
  1059. call: builtinArray_slice,
  1060. },
  1061. }
  1062. unshift_function := &_object{
  1063. runtime: runtime,
  1064. class: classFunction,
  1065. objectClass: _classObject,
  1066. prototype: runtime.global.FunctionPrototype,
  1067. extensible: true,
  1068. property: map[string]_property{
  1069. propertyLength: _property{
  1070. mode: 0,
  1071. value: Value{
  1072. kind: valueNumber,
  1073. value: 1,
  1074. },
  1075. },
  1076. },
  1077. propertyOrder: []string{
  1078. propertyLength,
  1079. },
  1080. value: _nativeFunctionObject{
  1081. name: "unshift",
  1082. call: builtinArray_unshift,
  1083. },
  1084. }
  1085. reverse_function := &_object{
  1086. runtime: runtime,
  1087. class: classFunction,
  1088. objectClass: _classObject,
  1089. prototype: runtime.global.FunctionPrototype,
  1090. extensible: true,
  1091. property: map[string]_property{
  1092. propertyLength: _property{
  1093. mode: 0,
  1094. value: Value{
  1095. kind: valueNumber,
  1096. value: 0,
  1097. },
  1098. },
  1099. },
  1100. propertyOrder: []string{
  1101. propertyLength,
  1102. },
  1103. value: _nativeFunctionObject{
  1104. name: "reverse",
  1105. call: builtinArray_reverse,
  1106. },
  1107. }
  1108. sort_function := &_object{
  1109. runtime: runtime,
  1110. class: classFunction,
  1111. objectClass: _classObject,
  1112. prototype: runtime.global.FunctionPrototype,
  1113. extensible: true,
  1114. property: map[string]_property{
  1115. propertyLength: _property{
  1116. mode: 0,
  1117. value: Value{
  1118. kind: valueNumber,
  1119. value: 1,
  1120. },
  1121. },
  1122. },
  1123. propertyOrder: []string{
  1124. propertyLength,
  1125. },
  1126. value: _nativeFunctionObject{
  1127. name: "sort",
  1128. call: builtinArray_sort,
  1129. },
  1130. }
  1131. indexOf_function := &_object{
  1132. runtime: runtime,
  1133. class: classFunction,
  1134. objectClass: _classObject,
  1135. prototype: runtime.global.FunctionPrototype,
  1136. extensible: true,
  1137. property: map[string]_property{
  1138. propertyLength: _property{
  1139. mode: 0,
  1140. value: Value{
  1141. kind: valueNumber,
  1142. value: 1,
  1143. },
  1144. },
  1145. },
  1146. propertyOrder: []string{
  1147. propertyLength,
  1148. },
  1149. value: _nativeFunctionObject{
  1150. name: "indexOf",
  1151. call: builtinArray_indexOf,
  1152. },
  1153. }
  1154. lastIndexOf_function := &_object{
  1155. runtime: runtime,
  1156. class: classFunction,
  1157. objectClass: _classObject,
  1158. prototype: runtime.global.FunctionPrototype,
  1159. extensible: true,
  1160. property: map[string]_property{
  1161. propertyLength: _property{
  1162. mode: 0,
  1163. value: Value{
  1164. kind: valueNumber,
  1165. value: 1,
  1166. },
  1167. },
  1168. },
  1169. propertyOrder: []string{
  1170. propertyLength,
  1171. },
  1172. value: _nativeFunctionObject{
  1173. name: "lastIndexOf",
  1174. call: builtinArray_lastIndexOf,
  1175. },
  1176. }
  1177. every_function := &_object{
  1178. runtime: runtime,
  1179. class: classFunction,
  1180. objectClass: _classObject,
  1181. prototype: runtime.global.FunctionPrototype,
  1182. extensible: true,
  1183. property: map[string]_property{
  1184. propertyLength: _property{
  1185. mode: 0,
  1186. value: Value{
  1187. kind: valueNumber,
  1188. value: 1,
  1189. },
  1190. },
  1191. },
  1192. propertyOrder: []string{
  1193. propertyLength,
  1194. },
  1195. value: _nativeFunctionObject{
  1196. name: "every",
  1197. call: builtinArray_every,
  1198. },
  1199. }
  1200. some_function := &_object{
  1201. runtime: runtime,
  1202. class: classFunction,
  1203. objectClass: _classObject,
  1204. prototype: runtime.global.FunctionPrototype,
  1205. extensible: true,
  1206. property: map[string]_property{
  1207. propertyLength: _property{
  1208. mode: 0,
  1209. value: Value{
  1210. kind: valueNumber,
  1211. value: 1,
  1212. },
  1213. },
  1214. },
  1215. propertyOrder: []string{
  1216. propertyLength,
  1217. },
  1218. value: _nativeFunctionObject{
  1219. name: "some",
  1220. call: builtinArray_some,
  1221. },
  1222. }
  1223. forEach_function := &_object{
  1224. runtime: runtime,
  1225. class: classFunction,
  1226. objectClass: _classObject,
  1227. prototype: runtime.global.FunctionPrototype,
  1228. extensible: true,
  1229. property: map[string]_property{
  1230. propertyLength: _property{
  1231. mode: 0,
  1232. value: Value{
  1233. kind: valueNumber,
  1234. value: 1,
  1235. },
  1236. },
  1237. },
  1238. propertyOrder: []string{
  1239. propertyLength,
  1240. },
  1241. value: _nativeFunctionObject{
  1242. name: "forEach",
  1243. call: builtinArray_forEach,
  1244. },
  1245. }
  1246. map_function := &_object{
  1247. runtime: runtime,
  1248. class: classFunction,
  1249. objectClass: _classObject,
  1250. prototype: runtime.global.FunctionPrototype,
  1251. extensible: true,
  1252. property: map[string]_property{
  1253. propertyLength: _property{
  1254. mode: 0,
  1255. value: Value{
  1256. kind: valueNumber,
  1257. value: 1,
  1258. },
  1259. },
  1260. },
  1261. propertyOrder: []string{
  1262. propertyLength,
  1263. },
  1264. value: _nativeFunctionObject{
  1265. name: "map",
  1266. call: builtinArray_map,
  1267. },
  1268. }
  1269. filter_function := &_object{
  1270. runtime: runtime,
  1271. class: classFunction,
  1272. objectClass: _classObject,
  1273. prototype: runtime.global.FunctionPrototype,
  1274. extensible: true,
  1275. property: map[string]_property{
  1276. propertyLength: _property{
  1277. mode: 0,
  1278. value: Value{
  1279. kind: valueNumber,
  1280. value: 1,
  1281. },
  1282. },
  1283. },
  1284. propertyOrder: []string{
  1285. propertyLength,
  1286. },
  1287. value: _nativeFunctionObject{
  1288. name: "filter",
  1289. call: builtinArray_filter,
  1290. },
  1291. }
  1292. reduce_function := &_object{
  1293. runtime: runtime,
  1294. class: classFunction,
  1295. objectClass: _classObject,
  1296. prototype: runtime.global.FunctionPrototype,
  1297. extensible: true,
  1298. property: map[string]_property{
  1299. propertyLength: _property{
  1300. mode: 0,
  1301. value: Value{
  1302. kind: valueNumber,
  1303. value: 1,
  1304. },
  1305. },
  1306. },
  1307. propertyOrder: []string{
  1308. propertyLength,
  1309. },
  1310. value: _nativeFunctionObject{
  1311. name: "reduce",
  1312. call: builtinArray_reduce,
  1313. },
  1314. }
  1315. reduceRight_function := &_object{
  1316. runtime: runtime,
  1317. class: classFunction,
  1318. objectClass: _classObject,
  1319. prototype: runtime.global.FunctionPrototype,
  1320. extensible: true,
  1321. property: map[string]_property{
  1322. propertyLength: _property{
  1323. mode: 0,
  1324. value: Value{
  1325. kind: valueNumber,
  1326. value: 1,
  1327. },
  1328. },
  1329. },
  1330. propertyOrder: []string{
  1331. propertyLength,
  1332. },
  1333. value: _nativeFunctionObject{
  1334. name: "reduceRight",
  1335. call: builtinArray_reduceRight,
  1336. },
  1337. }
  1338. isArray_function := &_object{
  1339. runtime: runtime,
  1340. class: classFunction,
  1341. objectClass: _classObject,
  1342. prototype: runtime.global.FunctionPrototype,
  1343. extensible: true,
  1344. property: map[string]_property{
  1345. propertyLength: _property{
  1346. mode: 0,
  1347. value: Value{
  1348. kind: valueNumber,
  1349. value: 1,
  1350. },
  1351. },
  1352. },
  1353. propertyOrder: []string{
  1354. propertyLength,
  1355. },
  1356. value: _nativeFunctionObject{
  1357. name: "isArray",
  1358. call: builtinArray_isArray,
  1359. },
  1360. }
  1361. runtime.global.ArrayPrototype = &_object{
  1362. runtime: runtime,
  1363. class: classArray,
  1364. objectClass: _classArray,
  1365. prototype: runtime.global.ObjectPrototype,
  1366. extensible: true,
  1367. value: nil,
  1368. property: map[string]_property{
  1369. propertyLength: _property{
  1370. mode: 0100,
  1371. value: Value{
  1372. kind: valueNumber,
  1373. value: uint32(0),
  1374. },
  1375. },
  1376. "toString": _property{
  1377. mode: 0101,
  1378. value: Value{
  1379. kind: valueObject,
  1380. value: toString_function,
  1381. },
  1382. },
  1383. "toLocaleString": _property{
  1384. mode: 0101,
  1385. value: Value{
  1386. kind: valueObject,
  1387. value: toLocaleString_function,
  1388. },
  1389. },
  1390. "concat": _property{
  1391. mode: 0101,
  1392. value: Value{
  1393. kind: valueObject,
  1394. value: concat_function,
  1395. },
  1396. },
  1397. "join": _property{
  1398. mode: 0101,
  1399. value: Value{
  1400. kind: valueObject,
  1401. value: join_function,
  1402. },
  1403. },
  1404. "splice": _property{
  1405. mode: 0101,
  1406. value: Value{
  1407. kind: valueObject,
  1408. value: splice_function,
  1409. },
  1410. },
  1411. "shift": _property{
  1412. mode: 0101,
  1413. value: Value{
  1414. kind: valueObject,
  1415. value: shift_function,
  1416. },
  1417. },
  1418. "pop": _property{
  1419. mode: 0101,
  1420. value: Value{
  1421. kind: valueObject,
  1422. value: pop_function,
  1423. },
  1424. },
  1425. "push": _property{
  1426. mode: 0101,
  1427. value: Value{
  1428. kind: valueObject,
  1429. value: push_function,
  1430. },
  1431. },
  1432. "slice": _property{
  1433. mode: 0101,
  1434. value: Value{
  1435. kind: valueObject,
  1436. value: slice_function,
  1437. },
  1438. },
  1439. "unshift": _property{
  1440. mode: 0101,
  1441. value: Value{
  1442. kind: valueObject,
  1443. value: unshift_function,
  1444. },
  1445. },
  1446. "reverse": _property{
  1447. mode: 0101,
  1448. value: Value{
  1449. kind: valueObject,
  1450. value: reverse_function,
  1451. },
  1452. },
  1453. "sort": _property{
  1454. mode: 0101,
  1455. value: Value{
  1456. kind: valueObject,
  1457. value: sort_function,
  1458. },
  1459. },
  1460. "indexOf": _property{
  1461. mode: 0101,
  1462. value: Value{
  1463. kind: valueObject,
  1464. value: indexOf_function,
  1465. },
  1466. },
  1467. "lastIndexOf": _property{
  1468. mode: 0101,
  1469. value: Value{
  1470. kind: valueObject,
  1471. value: lastIndexOf_function,
  1472. },
  1473. },
  1474. "every": _property{
  1475. mode: 0101,
  1476. value: Value{
  1477. kind: valueObject,
  1478. value: every_function,
  1479. },
  1480. },
  1481. "some": _property{
  1482. mode: 0101,
  1483. value: Value{
  1484. kind: valueObject,
  1485. value: some_function,
  1486. },
  1487. },
  1488. "forEach": _property{
  1489. mode: 0101,
  1490. value: Value{
  1491. kind: valueObject,
  1492. value: forEach_function,
  1493. },
  1494. },
  1495. "map": _property{
  1496. mode: 0101,
  1497. value: Value{
  1498. kind: valueObject,
  1499. value: map_function,
  1500. },
  1501. },
  1502. "filter": _property{
  1503. mode: 0101,
  1504. value: Value{
  1505. kind: valueObject,
  1506. value: filter_function,
  1507. },
  1508. },
  1509. "reduce": _property{
  1510. mode: 0101,
  1511. value: Value{
  1512. kind: valueObject,
  1513. value: reduce_function,
  1514. },
  1515. },
  1516. "reduceRight": _property{
  1517. mode: 0101,
  1518. value: Value{
  1519. kind: valueObject,
  1520. value: reduceRight_function,
  1521. },
  1522. },
  1523. },
  1524. propertyOrder: []string{
  1525. propertyLength,
  1526. "toString",
  1527. "toLocaleString",
  1528. "concat",
  1529. "join",
  1530. "splice",
  1531. "shift",
  1532. "pop",
  1533. "push",
  1534. "slice",
  1535. "unshift",
  1536. "reverse",
  1537. "sort",
  1538. "indexOf",
  1539. "lastIndexOf",
  1540. "every",
  1541. "some",
  1542. "forEach",
  1543. "map",
  1544. "filter",
  1545. "reduce",
  1546. "reduceRight",
  1547. },
  1548. }
  1549. runtime.global.Array = &_object{
  1550. runtime: runtime,
  1551. class: classFunction,
  1552. objectClass: _classObject,
  1553. prototype: runtime.global.FunctionPrototype,
  1554. extensible: true,
  1555. value: _nativeFunctionObject{
  1556. name: classArray,
  1557. call: builtinArray,
  1558. construct: builtinNewArray,
  1559. },
  1560. property: map[string]_property{
  1561. propertyLength: _property{
  1562. mode: 0,
  1563. value: Value{
  1564. kind: valueNumber,
  1565. value: 1,
  1566. },
  1567. },
  1568. "prototype": _property{
  1569. mode: 0,
  1570. value: Value{
  1571. kind: valueObject,
  1572. value: runtime.global.ArrayPrototype,
  1573. },
  1574. },
  1575. "isArray": _property{
  1576. mode: 0101,
  1577. value: Value{
  1578. kind: valueObject,
  1579. value: isArray_function,
  1580. },
  1581. },
  1582. },
  1583. propertyOrder: []string{
  1584. propertyLength,
  1585. "prototype",
  1586. "isArray",
  1587. },
  1588. }
  1589. runtime.global.ArrayPrototype.property["constructor"] =
  1590. _property{
  1591. mode: 0101,
  1592. value: Value{
  1593. kind: valueObject,
  1594. value: runtime.global.Array,
  1595. },
  1596. }
  1597. }
  1598. {
  1599. toString_function := &_object{
  1600. runtime: runtime,
  1601. class: classFunction,
  1602. objectClass: _classObject,
  1603. prototype: runtime.global.FunctionPrototype,
  1604. extensible: true,
  1605. property: map[string]_property{
  1606. propertyLength: _property{
  1607. mode: 0,
  1608. value: Value{
  1609. kind: valueNumber,
  1610. value: 0,
  1611. },
  1612. },
  1613. },
  1614. propertyOrder: []string{
  1615. propertyLength,
  1616. },
  1617. value: _nativeFunctionObject{
  1618. name: "toString",
  1619. call: builtinString_toString,
  1620. },
  1621. }
  1622. valueOf_function := &_object{
  1623. runtime: runtime,
  1624. class: classFunction,
  1625. objectClass: _classObject,
  1626. prototype: runtime.global.FunctionPrototype,
  1627. extensible: true,
  1628. property: map[string]_property{
  1629. propertyLength: _property{
  1630. mode: 0,
  1631. value: Value{
  1632. kind: valueNumber,
  1633. value: 0,
  1634. },
  1635. },
  1636. },
  1637. propertyOrder: []string{
  1638. propertyLength,
  1639. },
  1640. value: _nativeFunctionObject{
  1641. name: "valueOf",
  1642. call: builtinString_valueOf,
  1643. },
  1644. }
  1645. charAt_function := &_object{
  1646. runtime: runtime,
  1647. class: classFunction,
  1648. objectClass: _classObject,
  1649. prototype: runtime.global.FunctionPrototype,
  1650. extensible: true,
  1651. property: map[string]_property{
  1652. propertyLength: _property{
  1653. mode: 0,
  1654. value: Value{
  1655. kind: valueNumber,
  1656. value: 1,
  1657. },
  1658. },
  1659. },
  1660. propertyOrder: []string{
  1661. propertyLength,
  1662. },
  1663. value: _nativeFunctionObject{
  1664. name: "charAt",
  1665. call: builtinString_charAt,
  1666. },
  1667. }
  1668. charCodeAt_function := &_object{
  1669. runtime: runtime,
  1670. class: classFunction,
  1671. objectClass: _classObject,
  1672. prototype: runtime.global.FunctionPrototype,
  1673. extensible: true,
  1674. property: map[string]_property{
  1675. propertyLength: _property{
  1676. mode: 0,
  1677. value: Value{
  1678. kind: valueNumber,
  1679. value: 1,
  1680. },
  1681. },
  1682. },
  1683. propertyOrder: []string{
  1684. propertyLength,
  1685. },
  1686. value: _nativeFunctionObject{
  1687. name: "charCodeAt",
  1688. call: builtinString_charCodeAt,
  1689. },
  1690. }
  1691. concat_function := &_object{
  1692. runtime: runtime,
  1693. class: classFunction,
  1694. objectClass: _classObject,
  1695. prototype: runtime.global.FunctionPrototype,
  1696. extensible: true,
  1697. property: map[string]_property{
  1698. propertyLength: _property{
  1699. mode: 0,
  1700. value: Value{
  1701. kind: valueNumber,
  1702. value: 1,
  1703. },
  1704. },
  1705. },
  1706. propertyOrder: []string{
  1707. propertyLength,
  1708. },
  1709. value: _nativeFunctionObject{
  1710. name: "concat",
  1711. call: builtinString_concat,
  1712. },
  1713. }
  1714. indexOf_function := &_object{
  1715. runtime: runtime,
  1716. class: classFunction,
  1717. objectClass: _classObject,
  1718. prototype: runtime.global.FunctionPrototype,
  1719. extensible: true,
  1720. property: map[string]_property{
  1721. propertyLength: _property{
  1722. mode: 0,
  1723. value: Value{
  1724. kind: valueNumber,
  1725. value: 1,
  1726. },
  1727. },
  1728. },
  1729. propertyOrder: []string{
  1730. propertyLength,
  1731. },
  1732. value: _nativeFunctionObject{
  1733. name: "indexOf",
  1734. call: builtinString_indexOf,
  1735. },
  1736. }
  1737. lastIndexOf_function := &_object{
  1738. runtime: runtime,
  1739. class: classFunction,
  1740. objectClass: _classObject,
  1741. prototype: runtime.global.FunctionPrototype,
  1742. extensible: true,
  1743. property: map[string]_property{
  1744. propertyLength: _property{
  1745. mode: 0,
  1746. value: Value{
  1747. kind: valueNumber,
  1748. value: 1,
  1749. },
  1750. },
  1751. },
  1752. propertyOrder: []string{
  1753. propertyLength,
  1754. },
  1755. value: _nativeFunctionObject{
  1756. name: "lastIndexOf",
  1757. call: builtinString_lastIndexOf,
  1758. },
  1759. }
  1760. match_function := &_object{
  1761. runtime: runtime,
  1762. class: classFunction,
  1763. objectClass: _classObject,
  1764. prototype: runtime.global.FunctionPrototype,
  1765. extensible: true,
  1766. property: map[string]_property{
  1767. propertyLength: _property{
  1768. mode: 0,
  1769. value: Value{
  1770. kind: valueNumber,
  1771. value: 1,
  1772. },
  1773. },
  1774. },
  1775. propertyOrder: []string{
  1776. propertyLength,
  1777. },
  1778. value: _nativeFunctionObject{
  1779. name: "match",
  1780. call: builtinString_match,
  1781. },
  1782. }
  1783. replace_function := &_object{
  1784. runtime: runtime,
  1785. class: classFunction,
  1786. objectClass: _classObject,
  1787. prototype: runtime.global.FunctionPrototype,
  1788. extensible: true,
  1789. property: map[string]_property{
  1790. propertyLength: _property{
  1791. mode: 0,
  1792. value: Value{
  1793. kind: valueNumber,
  1794. value: 2,
  1795. },
  1796. },
  1797. },
  1798. propertyOrder: []string{
  1799. propertyLength,
  1800. },
  1801. value: _nativeFunctionObject{
  1802. name: "replace",
  1803. call: builtinString_replace,
  1804. },
  1805. }
  1806. search_function := &_object{
  1807. runtime: runtime,
  1808. class: classFunction,
  1809. objectClass: _classObject,
  1810. prototype: runtime.global.FunctionPrototype,
  1811. extensible: true,
  1812. property: map[string]_property{
  1813. propertyLength: _property{
  1814. mode: 0,
  1815. value: Value{
  1816. kind: valueNumber,
  1817. value: 1,
  1818. },
  1819. },
  1820. },
  1821. propertyOrder: []string{
  1822. propertyLength,
  1823. },
  1824. value: _nativeFunctionObject{
  1825. name: "search",
  1826. call: builtinString_search,
  1827. },
  1828. }
  1829. split_function := &_object{
  1830. runtime: runtime,
  1831. class: classFunction,
  1832. objectClass: _classObject,
  1833. prototype: runtime.global.FunctionPrototype,
  1834. extensible: true,
  1835. property: map[string]_property{
  1836. propertyLength: _property{
  1837. mode: 0,
  1838. value: Value{
  1839. kind: valueNumber,
  1840. value: 2,
  1841. },
  1842. },
  1843. },
  1844. propertyOrder: []string{
  1845. propertyLength,
  1846. },
  1847. value: _nativeFunctionObject{
  1848. name: "split",
  1849. call: builtinString_split,
  1850. },
  1851. }
  1852. slice_function := &_object{
  1853. runtime: runtime,
  1854. class: classFunction,
  1855. objectClass: _classObject,
  1856. prototype: runtime.global.FunctionPrototype,
  1857. extensible: true,
  1858. property: map[string]_property{
  1859. propertyLength: _property{
  1860. mode: 0,
  1861. value: Value{
  1862. kind: valueNumber,
  1863. value: 2,
  1864. },
  1865. },
  1866. },
  1867. propertyOrder: []string{
  1868. propertyLength,
  1869. },
  1870. value: _nativeFunctionObject{
  1871. name: "slice",
  1872. call: builtinString_slice,
  1873. },
  1874. }
  1875. substring_function := &_object{
  1876. runtime: runtime,
  1877. class: classFunction,
  1878. objectClass: _classObject,
  1879. prototype: runtime.global.FunctionPrototype,
  1880. extensible: true,
  1881. property: map[string]_property{
  1882. propertyLength: _property{
  1883. mode: 0,
  1884. value: Value{
  1885. kind: valueNumber,
  1886. value: 2,
  1887. },
  1888. },
  1889. },
  1890. propertyOrder: []string{
  1891. propertyLength,
  1892. },
  1893. value: _nativeFunctionObject{
  1894. name: "substring",
  1895. call: builtinString_substring,
  1896. },
  1897. }
  1898. toLowerCase_function := &_object{
  1899. runtime: runtime,
  1900. class: classFunction,
  1901. objectClass: _classObject,
  1902. prototype: runtime.global.FunctionPrototype,
  1903. extensible: true,
  1904. property: map[string]_property{
  1905. propertyLength: _property{
  1906. mode: 0,
  1907. value: Value{
  1908. kind: valueNumber,
  1909. value: 0,
  1910. },
  1911. },
  1912. },
  1913. propertyOrder: []string{
  1914. propertyLength,
  1915. },
  1916. value: _nativeFunctionObject{
  1917. name: "toLowerCase",
  1918. call: builtinString_toLowerCase,
  1919. },
  1920. }
  1921. toUpperCase_function := &_object{
  1922. runtime: runtime,
  1923. class: classFunction,
  1924. objectClass: _classObject,
  1925. prototype: runtime.global.FunctionPrototype,
  1926. extensible: true,
  1927. property: map[string]_property{
  1928. propertyLength: _property{
  1929. mode: 0,
  1930. value: Value{
  1931. kind: valueNumber,
  1932. value: 0,
  1933. },
  1934. },
  1935. },
  1936. propertyOrder: []string{
  1937. propertyLength,
  1938. },
  1939. value: _nativeFunctionObject{
  1940. name: "toUpperCase",
  1941. call: builtinString_toUpperCase,
  1942. },
  1943. }
  1944. substr_function := &_object{
  1945. runtime: runtime,
  1946. class: classFunction,
  1947. objectClass: _classObject,
  1948. prototype: runtime.global.FunctionPrototype,
  1949. extensible: true,
  1950. property: map[string]_property{
  1951. propertyLength: _property{
  1952. mode: 0,
  1953. value: Value{
  1954. kind: valueNumber,
  1955. value: 2,
  1956. },
  1957. },
  1958. },
  1959. propertyOrder: []string{
  1960. propertyLength,
  1961. },
  1962. value: _nativeFunctionObject{
  1963. name: "substr",
  1964. call: builtinString_substr,
  1965. },
  1966. }
  1967. trim_function := &_object{
  1968. runtime: runtime,
  1969. class: classFunction,
  1970. objectClass: _classObject,
  1971. prototype: runtime.global.FunctionPrototype,
  1972. extensible: true,
  1973. property: map[string]_property{
  1974. propertyLength: _property{
  1975. mode: 0,
  1976. value: Value{
  1977. kind: valueNumber,
  1978. value: 0,
  1979. },
  1980. },
  1981. },
  1982. propertyOrder: []string{
  1983. propertyLength,
  1984. },
  1985. value: _nativeFunctionObject{
  1986. name: "trim",
  1987. call: builtinString_trim,
  1988. },
  1989. }
  1990. trimLeft_function := &_object{
  1991. runtime: runtime,
  1992. class: classFunction,
  1993. objectClass: _classObject,
  1994. prototype: runtime.global.FunctionPrototype,
  1995. extensible: true,
  1996. property: map[string]_property{
  1997. propertyLength: _property{
  1998. mode: 0,
  1999. value: Value{
  2000. kind: valueNumber,
  2001. value: 0,
  2002. },
  2003. },
  2004. },
  2005. propertyOrder: []string{
  2006. propertyLength,
  2007. },
  2008. value: _nativeFunctionObject{
  2009. name: "trimLeft",
  2010. call: builtinString_trimLeft,
  2011. },
  2012. }
  2013. trimRight_function := &_object{
  2014. runtime: runtime,
  2015. class: classFunction,
  2016. objectClass: _classObject,
  2017. prototype: runtime.global.FunctionPrototype,
  2018. extensible: true,
  2019. property: map[string]_property{
  2020. propertyLength: _property{
  2021. mode: 0,
  2022. value: Value{
  2023. kind: valueNumber,
  2024. value: 0,
  2025. },
  2026. },
  2027. },
  2028. propertyOrder: []string{
  2029. propertyLength,
  2030. },
  2031. value: _nativeFunctionObject{
  2032. name: "trimRight",
  2033. call: builtinString_trimRight,
  2034. },
  2035. }
  2036. localeCompare_function := &_object{
  2037. runtime: runtime,
  2038. class: classFunction,
  2039. objectClass: _classObject,
  2040. prototype: runtime.global.FunctionPrototype,
  2041. extensible: true,
  2042. property: map[string]_property{
  2043. propertyLength: _property{
  2044. mode: 0,
  2045. value: Value{
  2046. kind: valueNumber,
  2047. value: 1,
  2048. },
  2049. },
  2050. },
  2051. propertyOrder: []string{
  2052. propertyLength,
  2053. },
  2054. value: _nativeFunctionObject{
  2055. name: "localeCompare",
  2056. call: builtinString_localeCompare,
  2057. },
  2058. }
  2059. toLocaleLowerCase_function := &_object{
  2060. runtime: runtime,
  2061. class: classFunction,
  2062. objectClass: _classObject,
  2063. prototype: runtime.global.FunctionPrototype,
  2064. extensible: true,
  2065. property: map[string]_property{
  2066. propertyLength: _property{
  2067. mode: 0,
  2068. value: Value{
  2069. kind: valueNumber,
  2070. value: 0,
  2071. },
  2072. },
  2073. },
  2074. propertyOrder: []string{
  2075. propertyLength,
  2076. },
  2077. value: _nativeFunctionObject{
  2078. name: "toLocaleLowerCase",
  2079. call: builtinString_toLocaleLowerCase,
  2080. },
  2081. }
  2082. toLocaleUpperCase_function := &_object{
  2083. runtime: runtime,
  2084. class: classFunction,
  2085. objectClass: _classObject,
  2086. prototype: runtime.global.FunctionPrototype,
  2087. extensible: true,
  2088. property: map[string]_property{
  2089. propertyLength: _property{
  2090. mode: 0,
  2091. value: Value{
  2092. kind: valueNumber,
  2093. value: 0,
  2094. },
  2095. },
  2096. },
  2097. propertyOrder: []string{
  2098. propertyLength,
  2099. },
  2100. value: _nativeFunctionObject{
  2101. name: "toLocaleUpperCase",
  2102. call: builtinString_toLocaleUpperCase,
  2103. },
  2104. }
  2105. fromCharCode_function := &_object{
  2106. runtime: runtime,
  2107. class: classFunction,
  2108. objectClass: _classObject,
  2109. prototype: runtime.global.FunctionPrototype,
  2110. extensible: true,
  2111. property: map[string]_property{
  2112. propertyLength: _property{
  2113. mode: 0,
  2114. value: Value{
  2115. kind: valueNumber,
  2116. value: 1,
  2117. },
  2118. },
  2119. },
  2120. propertyOrder: []string{
  2121. propertyLength,
  2122. },
  2123. value: _nativeFunctionObject{
  2124. name: "fromCharCode",
  2125. call: builtinString_fromCharCode,
  2126. },
  2127. }
  2128. runtime.global.StringPrototype = &_object{
  2129. runtime: runtime,
  2130. class: classString,
  2131. objectClass: _classString,
  2132. prototype: runtime.global.ObjectPrototype,
  2133. extensible: true,
  2134. value: prototypeValueString,
  2135. property: map[string]_property{
  2136. propertyLength: _property{
  2137. mode: 0,
  2138. value: Value{
  2139. kind: valueNumber,
  2140. value: int(0),
  2141. },
  2142. },
  2143. "toString": _property{
  2144. mode: 0101,
  2145. value: Value{
  2146. kind: valueObject,
  2147. value: toString_function,
  2148. },
  2149. },
  2150. "valueOf": _property{
  2151. mode: 0101,
  2152. value: Value{
  2153. kind: valueObject,
  2154. value: valueOf_function,
  2155. },
  2156. },
  2157. "charAt": _property{
  2158. mode: 0101,
  2159. value: Value{
  2160. kind: valueObject,
  2161. value: charAt_function,
  2162. },
  2163. },
  2164. "charCodeAt": _property{
  2165. mode: 0101,
  2166. value: Value{
  2167. kind: valueObject,
  2168. value: charCodeAt_function,
  2169. },
  2170. },
  2171. "concat": _property{
  2172. mode: 0101,
  2173. value: Value{
  2174. kind: valueObject,
  2175. value: concat_function,
  2176. },
  2177. },
  2178. "indexOf": _property{
  2179. mode: 0101,
  2180. value: Value{
  2181. kind: valueObject,
  2182. value: indexOf_function,
  2183. },
  2184. },
  2185. "lastIndexOf": _property{
  2186. mode: 0101,
  2187. value: Value{
  2188. kind: valueObject,
  2189. value: lastIndexOf_function,
  2190. },
  2191. },
  2192. "match": _property{
  2193. mode: 0101,
  2194. value: Value{
  2195. kind: valueObject,
  2196. value: match_function,
  2197. },
  2198. },
  2199. "replace": _property{
  2200. mode: 0101,
  2201. value: Value{
  2202. kind: valueObject,
  2203. value: replace_function,
  2204. },
  2205. },
  2206. "search": _property{
  2207. mode: 0101,
  2208. value: Value{
  2209. kind: valueObject,
  2210. value: search_function,
  2211. },
  2212. },
  2213. "split": _property{
  2214. mode: 0101,
  2215. value: Value{
  2216. kind: valueObject,
  2217. value: split_function,
  2218. },
  2219. },
  2220. "slice": _property{
  2221. mode: 0101,
  2222. value: Value{
  2223. kind: valueObject,
  2224. value: slice_function,
  2225. },
  2226. },
  2227. "substring": _property{
  2228. mode: 0101,
  2229. value: Value{
  2230. kind: valueObject,
  2231. value: substring_function,
  2232. },
  2233. },
  2234. "toLowerCase": _property{
  2235. mode: 0101,
  2236. value: Value{
  2237. kind: valueObject,
  2238. value: toLowerCase_function,
  2239. },
  2240. },
  2241. "toUpperCase": _property{
  2242. mode: 0101,
  2243. value: Value{
  2244. kind: valueObject,
  2245. value: toUpperCase_function,
  2246. },
  2247. },
  2248. "substr": _property{
  2249. mode: 0101,
  2250. value: Value{
  2251. kind: valueObject,
  2252. value: substr_function,
  2253. },
  2254. },
  2255. "trim": _property{
  2256. mode: 0101,
  2257. value: Value{
  2258. kind: valueObject,
  2259. value: trim_function,
  2260. },
  2261. },
  2262. "trimLeft": _property{
  2263. mode: 0101,
  2264. value: Value{
  2265. kind: valueObject,
  2266. value: trimLeft_function,
  2267. },
  2268. },
  2269. "trimRight": _property{
  2270. mode: 0101,
  2271. value: Value{
  2272. kind: valueObject,
  2273. value: trimRight_function,
  2274. },
  2275. },
  2276. "localeCompare": _property{
  2277. mode: 0101,
  2278. value: Value{
  2279. kind: valueObject,
  2280. value: localeCompare_function,
  2281. },
  2282. },
  2283. "toLocaleLowerCase": _property{
  2284. mode: 0101,
  2285. value: Value{
  2286. kind: valueObject,
  2287. value: toLocaleLowerCase_function,
  2288. },
  2289. },
  2290. "toLocaleUpperCase": _property{
  2291. mode: 0101,
  2292. value: Value{
  2293. kind: valueObject,
  2294. value: toLocaleUpperCase_function,
  2295. },
  2296. },
  2297. },
  2298. propertyOrder: []string{
  2299. propertyLength,
  2300. "toString",
  2301. "valueOf",
  2302. "charAt",
  2303. "charCodeAt",
  2304. "concat",
  2305. "indexOf",
  2306. "lastIndexOf",
  2307. "match",
  2308. "replace",
  2309. "search",
  2310. "split",
  2311. "slice",
  2312. "substring",
  2313. "toLowerCase",
  2314. "toUpperCase",
  2315. "substr",
  2316. "trim",
  2317. "trimLeft",
  2318. "trimRight",
  2319. "localeCompare",
  2320. "toLocaleLowerCase",
  2321. "toLocaleUpperCase",
  2322. },
  2323. }
  2324. runtime.global.String = &_object{
  2325. runtime: runtime,
  2326. class: classFunction,
  2327. objectClass: _classObject,
  2328. prototype: runtime.global.FunctionPrototype,
  2329. extensible: true,
  2330. value: _nativeFunctionObject{
  2331. name: classString,
  2332. call: builtinString,
  2333. construct: builtinNewString,
  2334. },
  2335. property: map[string]_property{
  2336. propertyLength: _property{
  2337. mode: 0,
  2338. value: Value{
  2339. kind: valueNumber,
  2340. value: 1,
  2341. },
  2342. },
  2343. "prototype": _property{
  2344. mode: 0,
  2345. value: Value{
  2346. kind: valueObject,
  2347. value: runtime.global.StringPrototype,
  2348. },
  2349. },
  2350. "fromCharCode": _property{
  2351. mode: 0101,
  2352. value: Value{
  2353. kind: valueObject,
  2354. value: fromCharCode_function,
  2355. },
  2356. },
  2357. },
  2358. propertyOrder: []string{
  2359. propertyLength,
  2360. "prototype",
  2361. "fromCharCode",
  2362. },
  2363. }
  2364. runtime.global.StringPrototype.property["constructor"] =
  2365. _property{
  2366. mode: 0101,
  2367. value: Value{
  2368. kind: valueObject,
  2369. value: runtime.global.String,
  2370. },
  2371. }
  2372. }
  2373. {
  2374. toString_function := &_object{
  2375. runtime: runtime,
  2376. class: classFunction,
  2377. objectClass: _classObject,
  2378. prototype: runtime.global.FunctionPrototype,
  2379. extensible: true,
  2380. property: map[string]_property{
  2381. propertyLength: _property{
  2382. mode: 0,
  2383. value: Value{
  2384. kind: valueNumber,
  2385. value: 0,
  2386. },
  2387. },
  2388. },
  2389. propertyOrder: []string{
  2390. propertyLength,
  2391. },
  2392. value: _nativeFunctionObject{
  2393. name: "toString",
  2394. call: builtinBoolean_toString,
  2395. },
  2396. }
  2397. valueOf_function := &_object{
  2398. runtime: runtime,
  2399. class: classFunction,
  2400. objectClass: _classObject,
  2401. prototype: runtime.global.FunctionPrototype,
  2402. extensible: true,
  2403. property: map[string]_property{
  2404. propertyLength: _property{
  2405. mode: 0,
  2406. value: Value{
  2407. kind: valueNumber,
  2408. value: 0,
  2409. },
  2410. },
  2411. },
  2412. propertyOrder: []string{
  2413. propertyLength,
  2414. },
  2415. value: _nativeFunctionObject{
  2416. name: "valueOf",
  2417. call: builtinBoolean_valueOf,
  2418. },
  2419. }
  2420. runtime.global.BooleanPrototype = &_object{
  2421. runtime: runtime,
  2422. class: classBoolean,
  2423. objectClass: _classObject,
  2424. prototype: runtime.global.ObjectPrototype,
  2425. extensible: true,
  2426. value: prototypeValueBoolean,
  2427. property: map[string]_property{
  2428. "toString": _property{
  2429. mode: 0101,
  2430. value: Value{
  2431. kind: valueObject,
  2432. value: toString_function,
  2433. },
  2434. },
  2435. "valueOf": _property{
  2436. mode: 0101,
  2437. value: Value{
  2438. kind: valueObject,
  2439. value: valueOf_function,
  2440. },
  2441. },
  2442. },
  2443. propertyOrder: []string{
  2444. "toString",
  2445. "valueOf",
  2446. },
  2447. }
  2448. runtime.global.Boolean = &_object{
  2449. runtime: runtime,
  2450. class: classFunction,
  2451. objectClass: _classObject,
  2452. prototype: runtime.global.FunctionPrototype,
  2453. extensible: true,
  2454. value: _nativeFunctionObject{
  2455. name: classBoolean,
  2456. call: builtinBoolean,
  2457. construct: builtinNewBoolean,
  2458. },
  2459. property: map[string]_property{
  2460. propertyLength: _property{
  2461. mode: 0,
  2462. value: Value{
  2463. kind: valueNumber,
  2464. value: 1,
  2465. },
  2466. },
  2467. "prototype": _property{
  2468. mode: 0,
  2469. value: Value{
  2470. kind: valueObject,
  2471. value: runtime.global.BooleanPrototype,
  2472. },
  2473. },
  2474. },
  2475. propertyOrder: []string{
  2476. propertyLength,
  2477. "prototype",
  2478. },
  2479. }
  2480. runtime.global.BooleanPrototype.property["constructor"] =
  2481. _property{
  2482. mode: 0101,
  2483. value: Value{
  2484. kind: valueObject,
  2485. value: runtime.global.Boolean,
  2486. },
  2487. }
  2488. }
  2489. {
  2490. toString_function := &_object{
  2491. runtime: runtime,
  2492. class: classFunction,
  2493. objectClass: _classObject,
  2494. prototype: runtime.global.FunctionPrototype,
  2495. extensible: true,
  2496. property: map[string]_property{
  2497. propertyLength: _property{
  2498. mode: 0,
  2499. value: Value{
  2500. kind: valueNumber,
  2501. value: 0,
  2502. },
  2503. },
  2504. },
  2505. propertyOrder: []string{
  2506. propertyLength,
  2507. },
  2508. value: _nativeFunctionObject{
  2509. name: "toString",
  2510. call: builtinNumber_toString,
  2511. },
  2512. }
  2513. valueOf_function := &_object{
  2514. runtime: runtime,
  2515. class: classFunction,
  2516. objectClass: _classObject,
  2517. prototype: runtime.global.FunctionPrototype,
  2518. extensible: true,
  2519. property: map[string]_property{
  2520. propertyLength: _property{
  2521. mode: 0,
  2522. value: Value{
  2523. kind: valueNumber,
  2524. value: 0,
  2525. },
  2526. },
  2527. },
  2528. propertyOrder: []string{
  2529. propertyLength,
  2530. },
  2531. value: _nativeFunctionObject{
  2532. name: "valueOf",
  2533. call: builtinNumber_valueOf,
  2534. },
  2535. }
  2536. toFixed_function := &_object{
  2537. runtime: runtime,
  2538. class: classFunction,
  2539. objectClass: _classObject,
  2540. prototype: runtime.global.FunctionPrototype,
  2541. extensible: true,
  2542. property: map[string]_property{
  2543. propertyLength: _property{
  2544. mode: 0,
  2545. value: Value{
  2546. kind: valueNumber,
  2547. value: 1,
  2548. },
  2549. },
  2550. },
  2551. propertyOrder: []string{
  2552. propertyLength,
  2553. },
  2554. value: _nativeFunctionObject{
  2555. name: "toFixed",
  2556. call: builtinNumber_toFixed,
  2557. },
  2558. }
  2559. toExponential_function := &_object{
  2560. runtime: runtime,
  2561. class: classFunction,
  2562. objectClass: _classObject,
  2563. prototype: runtime.global.FunctionPrototype,
  2564. extensible: true,
  2565. property: map[string]_property{
  2566. propertyLength: _property{
  2567. mode: 0,
  2568. value: Value{
  2569. kind: valueNumber,
  2570. value: 1,
  2571. },
  2572. },
  2573. },
  2574. propertyOrder: []string{
  2575. propertyLength,
  2576. },
  2577. value: _nativeFunctionObject{
  2578. name: "toExponential",
  2579. call: builtinNumber_toExponential,
  2580. },
  2581. }
  2582. toPrecision_function := &_object{
  2583. runtime: runtime,
  2584. class: classFunction,
  2585. objectClass: _classObject,
  2586. prototype: runtime.global.FunctionPrototype,
  2587. extensible: true,
  2588. property: map[string]_property{
  2589. propertyLength: _property{
  2590. mode: 0,
  2591. value: Value{
  2592. kind: valueNumber,
  2593. value: 1,
  2594. },
  2595. },
  2596. },
  2597. propertyOrder: []string{
  2598. propertyLength,
  2599. },
  2600. value: _nativeFunctionObject{
  2601. name: "toPrecision",
  2602. call: builtinNumber_toPrecision,
  2603. },
  2604. }
  2605. toLocaleString_function := &_object{
  2606. runtime: runtime,
  2607. class: classFunction,
  2608. objectClass: _classObject,
  2609. prototype: runtime.global.FunctionPrototype,
  2610. extensible: true,
  2611. property: map[string]_property{
  2612. propertyLength: _property{
  2613. mode: 0,
  2614. value: Value{
  2615. kind: valueNumber,
  2616. value: 1,
  2617. },
  2618. },
  2619. },
  2620. propertyOrder: []string{
  2621. propertyLength,
  2622. },
  2623. value: _nativeFunctionObject{
  2624. name: "toLocaleString",
  2625. call: builtinNumber_toLocaleString,
  2626. },
  2627. }
  2628. isNaN_function := &_object{
  2629. runtime: runtime,
  2630. class: classFunction,
  2631. objectClass: _classObject,
  2632. prototype: runtime.global.FunctionPrototype,
  2633. extensible: true,
  2634. property: map[string]_property{
  2635. propertyLength: _property{
  2636. mode: 0,
  2637. value: Value{
  2638. kind: valueNumber,
  2639. value: 1,
  2640. },
  2641. },
  2642. },
  2643. propertyOrder: []string{
  2644. propertyLength,
  2645. },
  2646. value: _nativeFunctionObject{
  2647. name: "isNaN",
  2648. call: builtinNumber_isNaN,
  2649. },
  2650. }
  2651. runtime.global.NumberPrototype = &_object{
  2652. runtime: runtime,
  2653. class: classNumber,
  2654. objectClass: _classObject,
  2655. prototype: runtime.global.ObjectPrototype,
  2656. extensible: true,
  2657. value: prototypeValueNumber,
  2658. property: map[string]_property{
  2659. "toString": _property{
  2660. mode: 0101,
  2661. value: Value{
  2662. kind: valueObject,
  2663. value: toString_function,
  2664. },
  2665. },
  2666. "valueOf": _property{
  2667. mode: 0101,
  2668. value: Value{
  2669. kind: valueObject,
  2670. value: valueOf_function,
  2671. },
  2672. },
  2673. "toFixed": _property{
  2674. mode: 0101,
  2675. value: Value{
  2676. kind: valueObject,
  2677. value: toFixed_function,
  2678. },
  2679. },
  2680. "toExponential": _property{
  2681. mode: 0101,
  2682. value: Value{
  2683. kind: valueObject,
  2684. value: toExponential_function,
  2685. },
  2686. },
  2687. "toPrecision": _property{
  2688. mode: 0101,
  2689. value: Value{
  2690. kind: valueObject,
  2691. value: toPrecision_function,
  2692. },
  2693. },
  2694. "toLocaleString": _property{
  2695. mode: 0101,
  2696. value: Value{
  2697. kind: valueObject,
  2698. value: toLocaleString_function,
  2699. },
  2700. },
  2701. },
  2702. propertyOrder: []string{
  2703. "toString",
  2704. "valueOf",
  2705. "toFixed",
  2706. "toExponential",
  2707. "toPrecision",
  2708. "toLocaleString",
  2709. },
  2710. }
  2711. runtime.global.Number = &_object{
  2712. runtime: runtime,
  2713. class: classFunction,
  2714. objectClass: _classObject,
  2715. prototype: runtime.global.FunctionPrototype,
  2716. extensible: true,
  2717. value: _nativeFunctionObject{
  2718. name: classNumber,
  2719. call: builtinNumber,
  2720. construct: builtinNewNumber,
  2721. },
  2722. property: map[string]_property{
  2723. propertyLength: _property{
  2724. mode: 0,
  2725. value: Value{
  2726. kind: valueNumber,
  2727. value: 1,
  2728. },
  2729. },
  2730. "prototype": _property{
  2731. mode: 0,
  2732. value: Value{
  2733. kind: valueObject,
  2734. value: runtime.global.NumberPrototype,
  2735. },
  2736. },
  2737. "isNaN": _property{
  2738. mode: 0101,
  2739. value: Value{
  2740. kind: valueObject,
  2741. value: isNaN_function,
  2742. },
  2743. },
  2744. "MAX_VALUE": _property{
  2745. mode: 0,
  2746. value: Value{
  2747. kind: valueNumber,
  2748. value: math.MaxFloat64,
  2749. },
  2750. },
  2751. "MIN_VALUE": _property{
  2752. mode: 0,
  2753. value: Value{
  2754. kind: valueNumber,
  2755. value: math.SmallestNonzeroFloat64,
  2756. },
  2757. },
  2758. "NaN": _property{
  2759. mode: 0,
  2760. value: Value{
  2761. kind: valueNumber,
  2762. value: math.NaN(),
  2763. },
  2764. },
  2765. "NEGATIVE_INFINITY": _property{
  2766. mode: 0,
  2767. value: Value{
  2768. kind: valueNumber,
  2769. value: math.Inf(-1),
  2770. },
  2771. },
  2772. "POSITIVE_INFINITY": _property{
  2773. mode: 0,
  2774. value: Value{
  2775. kind: valueNumber,
  2776. value: math.Inf(+1),
  2777. },
  2778. },
  2779. },
  2780. propertyOrder: []string{
  2781. propertyLength,
  2782. "prototype",
  2783. "isNaN",
  2784. "MAX_VALUE",
  2785. "MIN_VALUE",
  2786. "NaN",
  2787. "NEGATIVE_INFINITY",
  2788. "POSITIVE_INFINITY",
  2789. },
  2790. }
  2791. runtime.global.NumberPrototype.property["constructor"] =
  2792. _property{
  2793. mode: 0101,
  2794. value: Value{
  2795. kind: valueObject,
  2796. value: runtime.global.Number,
  2797. },
  2798. }
  2799. }
  2800. {
  2801. abs_function := &_object{
  2802. runtime: runtime,
  2803. class: classFunction,
  2804. objectClass: _classObject,
  2805. prototype: runtime.global.FunctionPrototype,
  2806. extensible: true,
  2807. property: map[string]_property{
  2808. propertyLength: _property{
  2809. mode: 0,
  2810. value: Value{
  2811. kind: valueNumber,
  2812. value: 1,
  2813. },
  2814. },
  2815. },
  2816. propertyOrder: []string{
  2817. propertyLength,
  2818. },
  2819. value: _nativeFunctionObject{
  2820. name: "abs",
  2821. call: builtinMath_abs,
  2822. },
  2823. }
  2824. acos_function := &_object{
  2825. runtime: runtime,
  2826. class: classFunction,
  2827. objectClass: _classObject,
  2828. prototype: runtime.global.FunctionPrototype,
  2829. extensible: true,
  2830. property: map[string]_property{
  2831. propertyLength: _property{
  2832. mode: 0,
  2833. value: Value{
  2834. kind: valueNumber,
  2835. value: 1,
  2836. },
  2837. },
  2838. },
  2839. propertyOrder: []string{
  2840. propertyLength,
  2841. },
  2842. value: _nativeFunctionObject{
  2843. name: "acos",
  2844. call: builtinMath_acos,
  2845. },
  2846. }
  2847. asin_function := &_object{
  2848. runtime: runtime,
  2849. class: classFunction,
  2850. objectClass: _classObject,
  2851. prototype: runtime.global.FunctionPrototype,
  2852. extensible: true,
  2853. property: map[string]_property{
  2854. propertyLength: _property{
  2855. mode: 0,
  2856. value: Value{
  2857. kind: valueNumber,
  2858. value: 1,
  2859. },
  2860. },
  2861. },
  2862. propertyOrder: []string{
  2863. propertyLength,
  2864. },
  2865. value: _nativeFunctionObject{
  2866. name: "asin",
  2867. call: builtinMath_asin,
  2868. },
  2869. }
  2870. atan_function := &_object{
  2871. runtime: runtime,
  2872. class: classFunction,
  2873. objectClass: _classObject,
  2874. prototype: runtime.global.FunctionPrototype,
  2875. extensible: true,
  2876. property: map[string]_property{
  2877. propertyLength: _property{
  2878. mode: 0,
  2879. value: Value{
  2880. kind: valueNumber,
  2881. value: 1,
  2882. },
  2883. },
  2884. },
  2885. propertyOrder: []string{
  2886. propertyLength,
  2887. },
  2888. value: _nativeFunctionObject{
  2889. name: "atan",
  2890. call: builtinMath_atan,
  2891. },
  2892. }
  2893. atan2_function := &_object{
  2894. runtime: runtime,
  2895. class: classFunction,
  2896. objectClass: _classObject,
  2897. prototype: runtime.global.FunctionPrototype,
  2898. extensible: true,
  2899. property: map[string]_property{
  2900. propertyLength: _property{
  2901. mode: 0,
  2902. value: Value{
  2903. kind: valueNumber,
  2904. value: 1,
  2905. },
  2906. },
  2907. },
  2908. propertyOrder: []string{
  2909. propertyLength,
  2910. },
  2911. value: _nativeFunctionObject{
  2912. name: "atan2",
  2913. call: builtinMath_atan2,
  2914. },
  2915. }
  2916. ceil_function := &_object{
  2917. runtime: runtime,
  2918. class: classFunction,
  2919. objectClass: _classObject,
  2920. prototype: runtime.global.FunctionPrototype,
  2921. extensible: true,
  2922. property: map[string]_property{
  2923. propertyLength: _property{
  2924. mode: 0,
  2925. value: Value{
  2926. kind: valueNumber,
  2927. value: 1,
  2928. },
  2929. },
  2930. },
  2931. propertyOrder: []string{
  2932. propertyLength,
  2933. },
  2934. value: _nativeFunctionObject{
  2935. name: "ceil",
  2936. call: builtinMath_ceil,
  2937. },
  2938. }
  2939. cos_function := &_object{
  2940. runtime: runtime,
  2941. class: classFunction,
  2942. objectClass: _classObject,
  2943. prototype: runtime.global.FunctionPrototype,
  2944. extensible: true,
  2945. property: map[string]_property{
  2946. propertyLength: _property{
  2947. mode: 0,
  2948. value: Value{
  2949. kind: valueNumber,
  2950. value: 1,
  2951. },
  2952. },
  2953. },
  2954. propertyOrder: []string{
  2955. propertyLength,
  2956. },
  2957. value: _nativeFunctionObject{
  2958. name: "cos",
  2959. call: builtinMath_cos,
  2960. },
  2961. }
  2962. exp_function := &_object{
  2963. runtime: runtime,
  2964. class: classFunction,
  2965. objectClass: _classObject,
  2966. prototype: runtime.global.FunctionPrototype,
  2967. extensible: true,
  2968. property: map[string]_property{
  2969. propertyLength: _property{
  2970. mode: 0,
  2971. value: Value{
  2972. kind: valueNumber,
  2973. value: 1,
  2974. },
  2975. },
  2976. },
  2977. propertyOrder: []string{
  2978. propertyLength,
  2979. },
  2980. value: _nativeFunctionObject{
  2981. name: "exp",
  2982. call: builtinMath_exp,
  2983. },
  2984. }
  2985. floor_function := &_object{
  2986. runtime: runtime,
  2987. class: classFunction,
  2988. objectClass: _classObject,
  2989. prototype: runtime.global.FunctionPrototype,
  2990. extensible: true,
  2991. property: map[string]_property{
  2992. propertyLength: _property{
  2993. mode: 0,
  2994. value: Value{
  2995. kind: valueNumber,
  2996. value: 1,
  2997. },
  2998. },
  2999. },
  3000. propertyOrder: []string{
  3001. propertyLength,
  3002. },
  3003. value: _nativeFunctionObject{
  3004. name: "floor",
  3005. call: builtinMath_floor,
  3006. },
  3007. }
  3008. log_function := &_object{
  3009. runtime: runtime,
  3010. class: classFunction,
  3011. objectClass: _classObject,
  3012. prototype: runtime.global.FunctionPrototype,
  3013. extensible: true,
  3014. property: map[string]_property{
  3015. propertyLength: _property{
  3016. mode: 0,
  3017. value: Value{
  3018. kind: valueNumber,
  3019. value: 1,
  3020. },
  3021. },
  3022. },
  3023. propertyOrder: []string{
  3024. propertyLength,
  3025. },
  3026. value: _nativeFunctionObject{
  3027. name: "log",
  3028. call: builtinMath_log,
  3029. },
  3030. }
  3031. max_function := &_object{
  3032. runtime: runtime,
  3033. class: classFunction,
  3034. objectClass: _classObject,
  3035. prototype: runtime.global.FunctionPrototype,
  3036. extensible: true,
  3037. property: map[string]_property{
  3038. propertyLength: _property{
  3039. mode: 0,
  3040. value: Value{
  3041. kind: valueNumber,
  3042. value: 2,
  3043. },
  3044. },
  3045. },
  3046. propertyOrder: []string{
  3047. propertyLength,
  3048. },
  3049. value: _nativeFunctionObject{
  3050. name: "max",
  3051. call: builtinMath_max,
  3052. },
  3053. }
  3054. min_function := &_object{
  3055. runtime: runtime,
  3056. class: classFunction,
  3057. objectClass: _classObject,
  3058. prototype: runtime.global.FunctionPrototype,
  3059. extensible: true,
  3060. property: map[string]_property{
  3061. propertyLength: _property{
  3062. mode: 0,
  3063. value: Value{
  3064. kind: valueNumber,
  3065. value: 2,
  3066. },
  3067. },
  3068. },
  3069. propertyOrder: []string{
  3070. propertyLength,
  3071. },
  3072. value: _nativeFunctionObject{
  3073. name: "min",
  3074. call: builtinMath_min,
  3075. },
  3076. }
  3077. pow_function := &_object{
  3078. runtime: runtime,
  3079. class: classFunction,
  3080. objectClass: _classObject,
  3081. prototype: runtime.global.FunctionPrototype,
  3082. extensible: true,
  3083. property: map[string]_property{
  3084. propertyLength: _property{
  3085. mode: 0,
  3086. value: Value{
  3087. kind: valueNumber,
  3088. value: 2,
  3089. },
  3090. },
  3091. },
  3092. propertyOrder: []string{
  3093. propertyLength,
  3094. },
  3095. value: _nativeFunctionObject{
  3096. name: "pow",
  3097. call: builtinMath_pow,
  3098. },
  3099. }
  3100. random_function := &_object{
  3101. runtime: runtime,
  3102. class: classFunction,
  3103. objectClass: _classObject,
  3104. prototype: runtime.global.FunctionPrototype,
  3105. extensible: true,
  3106. property: map[string]_property{
  3107. propertyLength: _property{
  3108. mode: 0,
  3109. value: Value{
  3110. kind: valueNumber,
  3111. value: 0,
  3112. },
  3113. },
  3114. },
  3115. propertyOrder: []string{
  3116. propertyLength,
  3117. },
  3118. value: _nativeFunctionObject{
  3119. name: "random",
  3120. call: builtinMath_random,
  3121. },
  3122. }
  3123. round_function := &_object{
  3124. runtime: runtime,
  3125. class: classFunction,
  3126. objectClass: _classObject,
  3127. prototype: runtime.global.FunctionPrototype,
  3128. extensible: true,
  3129. property: map[string]_property{
  3130. propertyLength: _property{
  3131. mode: 0,
  3132. value: Value{
  3133. kind: valueNumber,
  3134. value: 1,
  3135. },
  3136. },
  3137. },
  3138. propertyOrder: []string{
  3139. propertyLength,
  3140. },
  3141. value: _nativeFunctionObject{
  3142. name: "round",
  3143. call: builtinMath_round,
  3144. },
  3145. }
  3146. sin_function := &_object{
  3147. runtime: runtime,
  3148. class: classFunction,
  3149. objectClass: _classObject,
  3150. prototype: runtime.global.FunctionPrototype,
  3151. extensible: true,
  3152. property: map[string]_property{
  3153. propertyLength: _property{
  3154. mode: 0,
  3155. value: Value{
  3156. kind: valueNumber,
  3157. value: 1,
  3158. },
  3159. },
  3160. },
  3161. propertyOrder: []string{
  3162. propertyLength,
  3163. },
  3164. value: _nativeFunctionObject{
  3165. name: "sin",
  3166. call: builtinMath_sin,
  3167. },
  3168. }
  3169. sqrt_function := &_object{
  3170. runtime: runtime,
  3171. class: classFunction,
  3172. objectClass: _classObject,
  3173. prototype: runtime.global.FunctionPrototype,
  3174. extensible: true,
  3175. property: map[string]_property{
  3176. propertyLength: _property{
  3177. mode: 0,
  3178. value: Value{
  3179. kind: valueNumber,
  3180. value: 1,
  3181. },
  3182. },
  3183. },
  3184. propertyOrder: []string{
  3185. propertyLength,
  3186. },
  3187. value: _nativeFunctionObject{
  3188. name: "sqrt",
  3189. call: builtinMath_sqrt,
  3190. },
  3191. }
  3192. tan_function := &_object{
  3193. runtime: runtime,
  3194. class: classFunction,
  3195. objectClass: _classObject,
  3196. prototype: runtime.global.FunctionPrototype,
  3197. extensible: true,
  3198. property: map[string]_property{
  3199. propertyLength: _property{
  3200. mode: 0,
  3201. value: Value{
  3202. kind: valueNumber,
  3203. value: 1,
  3204. },
  3205. },
  3206. },
  3207. propertyOrder: []string{
  3208. propertyLength,
  3209. },
  3210. value: _nativeFunctionObject{
  3211. name: "tan",
  3212. call: builtinMath_tan,
  3213. },
  3214. }
  3215. runtime.global.Math = &_object{
  3216. runtime: runtime,
  3217. class: "Math",
  3218. objectClass: _classObject,
  3219. prototype: runtime.global.ObjectPrototype,
  3220. extensible: true,
  3221. property: map[string]_property{
  3222. "abs": _property{
  3223. mode: 0101,
  3224. value: Value{
  3225. kind: valueObject,
  3226. value: abs_function,
  3227. },
  3228. },
  3229. "acos": _property{
  3230. mode: 0101,
  3231. value: Value{
  3232. kind: valueObject,
  3233. value: acos_function,
  3234. },
  3235. },
  3236. "asin": _property{
  3237. mode: 0101,
  3238. value: Value{
  3239. kind: valueObject,
  3240. value: asin_function,
  3241. },
  3242. },
  3243. "atan": _property{
  3244. mode: 0101,
  3245. value: Value{
  3246. kind: valueObject,
  3247. value: atan_function,
  3248. },
  3249. },
  3250. "atan2": _property{
  3251. mode: 0101,
  3252. value: Value{
  3253. kind: valueObject,
  3254. value: atan2_function,
  3255. },
  3256. },
  3257. "ceil": _property{
  3258. mode: 0101,
  3259. value: Value{
  3260. kind: valueObject,
  3261. value: ceil_function,
  3262. },
  3263. },
  3264. "cos": _property{
  3265. mode: 0101,
  3266. value: Value{
  3267. kind: valueObject,
  3268. value: cos_function,
  3269. },
  3270. },
  3271. "exp": _property{
  3272. mode: 0101,
  3273. value: Value{
  3274. kind: valueObject,
  3275. value: exp_function,
  3276. },
  3277. },
  3278. "floor": _property{
  3279. mode: 0101,
  3280. value: Value{
  3281. kind: valueObject,
  3282. value: floor_function,
  3283. },
  3284. },
  3285. "log": _property{
  3286. mode: 0101,
  3287. value: Value{
  3288. kind: valueObject,
  3289. value: log_function,
  3290. },
  3291. },
  3292. "max": _property{
  3293. mode: 0101,
  3294. value: Value{
  3295. kind: valueObject,
  3296. value: max_function,
  3297. },
  3298. },
  3299. "min": _property{
  3300. mode: 0101,
  3301. value: Value{
  3302. kind: valueObject,
  3303. value: min_function,
  3304. },
  3305. },
  3306. "pow": _property{
  3307. mode: 0101,
  3308. value: Value{
  3309. kind: valueObject,
  3310. value: pow_function,
  3311. },
  3312. },
  3313. "random": _property{
  3314. mode: 0101,
  3315. value: Value{
  3316. kind: valueObject,
  3317. value: random_function,
  3318. },
  3319. },
  3320. "round": _property{
  3321. mode: 0101,
  3322. value: Value{
  3323. kind: valueObject,
  3324. value: round_function,
  3325. },
  3326. },
  3327. "sin": _property{
  3328. mode: 0101,
  3329. value: Value{
  3330. kind: valueObject,
  3331. value: sin_function,
  3332. },
  3333. },
  3334. "sqrt": _property{
  3335. mode: 0101,
  3336. value: Value{
  3337. kind: valueObject,
  3338. value: sqrt_function,
  3339. },
  3340. },
  3341. "tan": _property{
  3342. mode: 0101,
  3343. value: Value{
  3344. kind: valueObject,
  3345. value: tan_function,
  3346. },
  3347. },
  3348. "E": _property{
  3349. mode: 0,
  3350. value: Value{
  3351. kind: valueNumber,
  3352. value: math.E,
  3353. },
  3354. },
  3355. "LN10": _property{
  3356. mode: 0,
  3357. value: Value{
  3358. kind: valueNumber,
  3359. value: math.Ln10,
  3360. },
  3361. },
  3362. "LN2": _property{
  3363. mode: 0,
  3364. value: Value{
  3365. kind: valueNumber,
  3366. value: math.Ln2,
  3367. },
  3368. },
  3369. "LOG2E": _property{
  3370. mode: 0,
  3371. value: Value{
  3372. kind: valueNumber,
  3373. value: math.Log2E,
  3374. },
  3375. },
  3376. "LOG10E": _property{
  3377. mode: 0,
  3378. value: Value{
  3379. kind: valueNumber,
  3380. value: math.Log10E,
  3381. },
  3382. },
  3383. "PI": _property{
  3384. mode: 0,
  3385. value: Value{
  3386. kind: valueNumber,
  3387. value: math.Pi,
  3388. },
  3389. },
  3390. "SQRT1_2": _property{
  3391. mode: 0,
  3392. value: Value{
  3393. kind: valueNumber,
  3394. value: sqrt1_2,
  3395. },
  3396. },
  3397. "SQRT2": _property{
  3398. mode: 0,
  3399. value: Value{
  3400. kind: valueNumber,
  3401. value: math.Sqrt2,
  3402. },
  3403. },
  3404. },
  3405. propertyOrder: []string{
  3406. "abs",
  3407. "acos",
  3408. "asin",
  3409. "atan",
  3410. "atan2",
  3411. "ceil",
  3412. "cos",
  3413. "exp",
  3414. "floor",
  3415. "log",
  3416. "max",
  3417. "min",
  3418. "pow",
  3419. "random",
  3420. "round",
  3421. "sin",
  3422. "sqrt",
  3423. "tan",
  3424. "E",
  3425. "LN10",
  3426. "LN2",
  3427. "LOG2E",
  3428. "LOG10E",
  3429. "PI",
  3430. "SQRT1_2",
  3431. "SQRT2",
  3432. },
  3433. }
  3434. }
  3435. {
  3436. toString_function := &_object{
  3437. runtime: runtime,
  3438. class: classFunction,
  3439. objectClass: _classObject,
  3440. prototype: runtime.global.FunctionPrototype,
  3441. extensible: true,
  3442. property: map[string]_property{
  3443. propertyLength: _property{
  3444. mode: 0,
  3445. value: Value{
  3446. kind: valueNumber,
  3447. value: 0,
  3448. },
  3449. },
  3450. },
  3451. propertyOrder: []string{
  3452. propertyLength,
  3453. },
  3454. value: _nativeFunctionObject{
  3455. name: "toString",
  3456. call: builtinDate_toString,
  3457. },
  3458. }
  3459. toDateString_function := &_object{
  3460. runtime: runtime,
  3461. class: classFunction,
  3462. objectClass: _classObject,
  3463. prototype: runtime.global.FunctionPrototype,
  3464. extensible: true,
  3465. property: map[string]_property{
  3466. propertyLength: _property{
  3467. mode: 0,
  3468. value: Value{
  3469. kind: valueNumber,
  3470. value: 0,
  3471. },
  3472. },
  3473. },
  3474. propertyOrder: []string{
  3475. propertyLength,
  3476. },
  3477. value: _nativeFunctionObject{
  3478. name: "toDateString",
  3479. call: builtinDate_toDateString,
  3480. },
  3481. }
  3482. toTimeString_function := &_object{
  3483. runtime: runtime,
  3484. class: classFunction,
  3485. objectClass: _classObject,
  3486. prototype: runtime.global.FunctionPrototype,
  3487. extensible: true,
  3488. property: map[string]_property{
  3489. propertyLength: _property{
  3490. mode: 0,
  3491. value: Value{
  3492. kind: valueNumber,
  3493. value: 0,
  3494. },
  3495. },
  3496. },
  3497. propertyOrder: []string{
  3498. propertyLength,
  3499. },
  3500. value: _nativeFunctionObject{
  3501. name: "toTimeString",
  3502. call: builtinDate_toTimeString,
  3503. },
  3504. }
  3505. toUTCString_function := &_object{
  3506. runtime: runtime,
  3507. class: classFunction,
  3508. objectClass: _classObject,
  3509. prototype: runtime.global.FunctionPrototype,
  3510. extensible: true,
  3511. property: map[string]_property{
  3512. propertyLength: _property{
  3513. mode: 0,
  3514. value: Value{
  3515. kind: valueNumber,
  3516. value: 0,
  3517. },
  3518. },
  3519. },
  3520. propertyOrder: []string{
  3521. propertyLength,
  3522. },
  3523. value: _nativeFunctionObject{
  3524. name: "toUTCString",
  3525. call: builtinDate_toUTCString,
  3526. },
  3527. }
  3528. toISOString_function := &_object{
  3529. runtime: runtime,
  3530. class: classFunction,
  3531. objectClass: _classObject,
  3532. prototype: runtime.global.FunctionPrototype,
  3533. extensible: true,
  3534. property: map[string]_property{
  3535. propertyLength: _property{
  3536. mode: 0,
  3537. value: Value{
  3538. kind: valueNumber,
  3539. value: 0,
  3540. },
  3541. },
  3542. },
  3543. propertyOrder: []string{
  3544. propertyLength,
  3545. },
  3546. value: _nativeFunctionObject{
  3547. name: "toISOString",
  3548. call: builtinDate_toISOString,
  3549. },
  3550. }
  3551. toJSON_function := &_object{
  3552. runtime: runtime,
  3553. class: classFunction,
  3554. objectClass: _classObject,
  3555. prototype: runtime.global.FunctionPrototype,
  3556. extensible: true,
  3557. property: map[string]_property{
  3558. propertyLength: _property{
  3559. mode: 0,
  3560. value: Value{
  3561. kind: valueNumber,
  3562. value: 1,
  3563. },
  3564. },
  3565. },
  3566. propertyOrder: []string{
  3567. propertyLength,
  3568. },
  3569. value: _nativeFunctionObject{
  3570. name: "toJSON",
  3571. call: builtinDate_toJSON,
  3572. },
  3573. }
  3574. toGMTString_function := &_object{
  3575. runtime: runtime,
  3576. class: classFunction,
  3577. objectClass: _classObject,
  3578. prototype: runtime.global.FunctionPrototype,
  3579. extensible: true,
  3580. property: map[string]_property{
  3581. propertyLength: _property{
  3582. mode: 0,
  3583. value: Value{
  3584. kind: valueNumber,
  3585. value: 0,
  3586. },
  3587. },
  3588. },
  3589. propertyOrder: []string{
  3590. propertyLength,
  3591. },
  3592. value: _nativeFunctionObject{
  3593. name: "toGMTString",
  3594. call: builtinDate_toGMTString,
  3595. },
  3596. }
  3597. toLocaleString_function := &_object{
  3598. runtime: runtime,
  3599. class: classFunction,
  3600. objectClass: _classObject,
  3601. prototype: runtime.global.FunctionPrototype,
  3602. extensible: true,
  3603. property: map[string]_property{
  3604. propertyLength: _property{
  3605. mode: 0,
  3606. value: Value{
  3607. kind: valueNumber,
  3608. value: 0,
  3609. },
  3610. },
  3611. },
  3612. propertyOrder: []string{
  3613. propertyLength,
  3614. },
  3615. value: _nativeFunctionObject{
  3616. name: "toLocaleString",
  3617. call: builtinDate_toLocaleString,
  3618. },
  3619. }
  3620. toLocaleDateString_function := &_object{
  3621. runtime: runtime,
  3622. class: classFunction,
  3623. objectClass: _classObject,
  3624. prototype: runtime.global.FunctionPrototype,
  3625. extensible: true,
  3626. property: map[string]_property{
  3627. propertyLength: _property{
  3628. mode: 0,
  3629. value: Value{
  3630. kind: valueNumber,
  3631. value: 0,
  3632. },
  3633. },
  3634. },
  3635. propertyOrder: []string{
  3636. propertyLength,
  3637. },
  3638. value: _nativeFunctionObject{
  3639. name: "toLocaleDateString",
  3640. call: builtinDate_toLocaleDateString,
  3641. },
  3642. }
  3643. toLocaleTimeString_function := &_object{
  3644. runtime: runtime,
  3645. class: classFunction,
  3646. objectClass: _classObject,
  3647. prototype: runtime.global.FunctionPrototype,
  3648. extensible: true,
  3649. property: map[string]_property{
  3650. propertyLength: _property{
  3651. mode: 0,
  3652. value: Value{
  3653. kind: valueNumber,
  3654. value: 0,
  3655. },
  3656. },
  3657. },
  3658. propertyOrder: []string{
  3659. propertyLength,
  3660. },
  3661. value: _nativeFunctionObject{
  3662. name: "toLocaleTimeString",
  3663. call: builtinDate_toLocaleTimeString,
  3664. },
  3665. }
  3666. valueOf_function := &_object{
  3667. runtime: runtime,
  3668. class: classFunction,
  3669. objectClass: _classObject,
  3670. prototype: runtime.global.FunctionPrototype,
  3671. extensible: true,
  3672. property: map[string]_property{
  3673. propertyLength: _property{
  3674. mode: 0,
  3675. value: Value{
  3676. kind: valueNumber,
  3677. value: 0,
  3678. },
  3679. },
  3680. },
  3681. propertyOrder: []string{
  3682. propertyLength,
  3683. },
  3684. value: _nativeFunctionObject{
  3685. name: "valueOf",
  3686. call: builtinDate_valueOf,
  3687. },
  3688. }
  3689. getTime_function := &_object{
  3690. runtime: runtime,
  3691. class: classFunction,
  3692. objectClass: _classObject,
  3693. prototype: runtime.global.FunctionPrototype,
  3694. extensible: true,
  3695. property: map[string]_property{
  3696. propertyLength: _property{
  3697. mode: 0,
  3698. value: Value{
  3699. kind: valueNumber,
  3700. value: 0,
  3701. },
  3702. },
  3703. },
  3704. propertyOrder: []string{
  3705. propertyLength,
  3706. },
  3707. value: _nativeFunctionObject{
  3708. name: "getTime",
  3709. call: builtinDate_getTime,
  3710. },
  3711. }
  3712. getYear_function := &_object{
  3713. runtime: runtime,
  3714. class: classFunction,
  3715. objectClass: _classObject,
  3716. prototype: runtime.global.FunctionPrototype,
  3717. extensible: true,
  3718. property: map[string]_property{
  3719. propertyLength: _property{
  3720. mode: 0,
  3721. value: Value{
  3722. kind: valueNumber,
  3723. value: 0,
  3724. },
  3725. },
  3726. },
  3727. propertyOrder: []string{
  3728. propertyLength,
  3729. },
  3730. value: _nativeFunctionObject{
  3731. name: "getYear",
  3732. call: builtinDate_getYear,
  3733. },
  3734. }
  3735. getFullYear_function := &_object{
  3736. runtime: runtime,
  3737. class: classFunction,
  3738. objectClass: _classObject,
  3739. prototype: runtime.global.FunctionPrototype,
  3740. extensible: true,
  3741. property: map[string]_property{
  3742. propertyLength: _property{
  3743. mode: 0,
  3744. value: Value{
  3745. kind: valueNumber,
  3746. value: 0,
  3747. },
  3748. },
  3749. },
  3750. propertyOrder: []string{
  3751. propertyLength,
  3752. },
  3753. value: _nativeFunctionObject{
  3754. name: "getFullYear",
  3755. call: builtinDate_getFullYear,
  3756. },
  3757. }
  3758. getUTCFullYear_function := &_object{
  3759. runtime: runtime,
  3760. class: classFunction,
  3761. objectClass: _classObject,
  3762. prototype: runtime.global.FunctionPrototype,
  3763. extensible: true,
  3764. property: map[string]_property{
  3765. propertyLength: _property{
  3766. mode: 0,
  3767. value: Value{
  3768. kind: valueNumber,
  3769. value: 0,
  3770. },
  3771. },
  3772. },
  3773. propertyOrder: []string{
  3774. propertyLength,
  3775. },
  3776. value: _nativeFunctionObject{
  3777. name: "getUTCFullYear",
  3778. call: builtinDate_getUTCFullYear,
  3779. },
  3780. }
  3781. getMonth_function := &_object{
  3782. runtime: runtime,
  3783. class: classFunction,
  3784. objectClass: _classObject,
  3785. prototype: runtime.global.FunctionPrototype,
  3786. extensible: true,
  3787. property: map[string]_property{
  3788. propertyLength: _property{
  3789. mode: 0,
  3790. value: Value{
  3791. kind: valueNumber,
  3792. value: 0,
  3793. },
  3794. },
  3795. },
  3796. propertyOrder: []string{
  3797. propertyLength,
  3798. },
  3799. value: _nativeFunctionObject{
  3800. name: "getMonth",
  3801. call: builtinDate_getMonth,
  3802. },
  3803. }
  3804. getUTCMonth_function := &_object{
  3805. runtime: runtime,
  3806. class: classFunction,
  3807. objectClass: _classObject,
  3808. prototype: runtime.global.FunctionPrototype,
  3809. extensible: true,
  3810. property: map[string]_property{
  3811. propertyLength: _property{
  3812. mode: 0,
  3813. value: Value{
  3814. kind: valueNumber,
  3815. value: 0,
  3816. },
  3817. },
  3818. },
  3819. propertyOrder: []string{
  3820. propertyLength,
  3821. },
  3822. value: _nativeFunctionObject{
  3823. name: "getUTCMonth",
  3824. call: builtinDate_getUTCMonth,
  3825. },
  3826. }
  3827. getDate_function := &_object{
  3828. runtime: runtime,
  3829. class: classFunction,
  3830. objectClass: _classObject,
  3831. prototype: runtime.global.FunctionPrototype,
  3832. extensible: true,
  3833. property: map[string]_property{
  3834. propertyLength: _property{
  3835. mode: 0,
  3836. value: Value{
  3837. kind: valueNumber,
  3838. value: 0,
  3839. },
  3840. },
  3841. },
  3842. propertyOrder: []string{
  3843. propertyLength,
  3844. },
  3845. value: _nativeFunctionObject{
  3846. name: "getDate",
  3847. call: builtinDate_getDate,
  3848. },
  3849. }
  3850. getUTCDate_function := &_object{
  3851. runtime: runtime,
  3852. class: classFunction,
  3853. objectClass: _classObject,
  3854. prototype: runtime.global.FunctionPrototype,
  3855. extensible: true,
  3856. property: map[string]_property{
  3857. propertyLength: _property{
  3858. mode: 0,
  3859. value: Value{
  3860. kind: valueNumber,
  3861. value: 0,
  3862. },
  3863. },
  3864. },
  3865. propertyOrder: []string{
  3866. propertyLength,
  3867. },
  3868. value: _nativeFunctionObject{
  3869. name: "getUTCDate",
  3870. call: builtinDate_getUTCDate,
  3871. },
  3872. }
  3873. getDay_function := &_object{
  3874. runtime: runtime,
  3875. class: classFunction,
  3876. objectClass: _classObject,
  3877. prototype: runtime.global.FunctionPrototype,
  3878. extensible: true,
  3879. property: map[string]_property{
  3880. propertyLength: _property{
  3881. mode: 0,
  3882. value: Value{
  3883. kind: valueNumber,
  3884. value: 0,
  3885. },
  3886. },
  3887. },
  3888. propertyOrder: []string{
  3889. propertyLength,
  3890. },
  3891. value: _nativeFunctionObject{
  3892. name: "getDay",
  3893. call: builtinDate_getDay,
  3894. },
  3895. }
  3896. getUTCDay_function := &_object{
  3897. runtime: runtime,
  3898. class: classFunction,
  3899. objectClass: _classObject,
  3900. prototype: runtime.global.FunctionPrototype,
  3901. extensible: true,
  3902. property: map[string]_property{
  3903. propertyLength: _property{
  3904. mode: 0,
  3905. value: Value{
  3906. kind: valueNumber,
  3907. value: 0,
  3908. },
  3909. },
  3910. },
  3911. propertyOrder: []string{
  3912. propertyLength,
  3913. },
  3914. value: _nativeFunctionObject{
  3915. name: "getUTCDay",
  3916. call: builtinDate_getUTCDay,
  3917. },
  3918. }
  3919. getHours_function := &_object{
  3920. runtime: runtime,
  3921. class: classFunction,
  3922. objectClass: _classObject,
  3923. prototype: runtime.global.FunctionPrototype,
  3924. extensible: true,
  3925. property: map[string]_property{
  3926. propertyLength: _property{
  3927. mode: 0,
  3928. value: Value{
  3929. kind: valueNumber,
  3930. value: 0,
  3931. },
  3932. },
  3933. },
  3934. propertyOrder: []string{
  3935. propertyLength,
  3936. },
  3937. value: _nativeFunctionObject{
  3938. name: "getHours",
  3939. call: builtinDate_getHours,
  3940. },
  3941. }
  3942. getUTCHours_function := &_object{
  3943. runtime: runtime,
  3944. class: classFunction,
  3945. objectClass: _classObject,
  3946. prototype: runtime.global.FunctionPrototype,
  3947. extensible: true,
  3948. property: map[string]_property{
  3949. propertyLength: _property{
  3950. mode: 0,
  3951. value: Value{
  3952. kind: valueNumber,
  3953. value: 0,
  3954. },
  3955. },
  3956. },
  3957. propertyOrder: []string{
  3958. propertyLength,
  3959. },
  3960. value: _nativeFunctionObject{
  3961. name: "getUTCHours",
  3962. call: builtinDate_getUTCHours,
  3963. },
  3964. }
  3965. getMinutes_function := &_object{
  3966. runtime: runtime,
  3967. class: classFunction,
  3968. objectClass: _classObject,
  3969. prototype: runtime.global.FunctionPrototype,
  3970. extensible: true,
  3971. property: map[string]_property{
  3972. propertyLength: _property{
  3973. mode: 0,
  3974. value: Value{
  3975. kind: valueNumber,
  3976. value: 0,
  3977. },
  3978. },
  3979. },
  3980. propertyOrder: []string{
  3981. propertyLength,
  3982. },
  3983. value: _nativeFunctionObject{
  3984. name: "getMinutes",
  3985. call: builtinDate_getMinutes,
  3986. },
  3987. }
  3988. getUTCMinutes_function := &_object{
  3989. runtime: runtime,
  3990. class: classFunction,
  3991. objectClass: _classObject,
  3992. prototype: runtime.global.FunctionPrototype,
  3993. extensible: true,
  3994. property: map[string]_property{
  3995. propertyLength: _property{
  3996. mode: 0,
  3997. value: Value{
  3998. kind: valueNumber,
  3999. value: 0,
  4000. },
  4001. },
  4002. },
  4003. propertyOrder: []string{
  4004. propertyLength,
  4005. },
  4006. value: _nativeFunctionObject{
  4007. name: "getUTCMinutes",
  4008. call: builtinDate_getUTCMinutes,
  4009. },
  4010. }
  4011. getSeconds_function := &_object{
  4012. runtime: runtime,
  4013. class: classFunction,
  4014. objectClass: _classObject,
  4015. prototype: runtime.global.FunctionPrototype,
  4016. extensible: true,
  4017. property: map[string]_property{
  4018. propertyLength: _property{
  4019. mode: 0,
  4020. value: Value{
  4021. kind: valueNumber,
  4022. value: 0,
  4023. },
  4024. },
  4025. },
  4026. propertyOrder: []string{
  4027. propertyLength,
  4028. },
  4029. value: _nativeFunctionObject{
  4030. name: "getSeconds",
  4031. call: builtinDate_getSeconds,
  4032. },
  4033. }
  4034. getUTCSeconds_function := &_object{
  4035. runtime: runtime,
  4036. class: classFunction,
  4037. objectClass: _classObject,
  4038. prototype: runtime.global.FunctionPrototype,
  4039. extensible: true,
  4040. property: map[string]_property{
  4041. propertyLength: _property{
  4042. mode: 0,
  4043. value: Value{
  4044. kind: valueNumber,
  4045. value: 0,
  4046. },
  4047. },
  4048. },
  4049. propertyOrder: []string{
  4050. propertyLength,
  4051. },
  4052. value: _nativeFunctionObject{
  4053. name: "getUTCSeconds",
  4054. call: builtinDate_getUTCSeconds,
  4055. },
  4056. }
  4057. getMilliseconds_function := &_object{
  4058. runtime: runtime,
  4059. class: classFunction,
  4060. objectClass: _classObject,
  4061. prototype: runtime.global.FunctionPrototype,
  4062. extensible: true,
  4063. property: map[string]_property{
  4064. propertyLength: _property{
  4065. mode: 0,
  4066. value: Value{
  4067. kind: valueNumber,
  4068. value: 0,
  4069. },
  4070. },
  4071. },
  4072. propertyOrder: []string{
  4073. propertyLength,
  4074. },
  4075. value: _nativeFunctionObject{
  4076. name: "getMilliseconds",
  4077. call: builtinDate_getMilliseconds,
  4078. },
  4079. }
  4080. getUTCMilliseconds_function := &_object{
  4081. runtime: runtime,
  4082. class: classFunction,
  4083. objectClass: _classObject,
  4084. prototype: runtime.global.FunctionPrototype,
  4085. extensible: true,
  4086. property: map[string]_property{
  4087. propertyLength: _property{
  4088. mode: 0,
  4089. value: Value{
  4090. kind: valueNumber,
  4091. value: 0,
  4092. },
  4093. },
  4094. },
  4095. propertyOrder: []string{
  4096. propertyLength,
  4097. },
  4098. value: _nativeFunctionObject{
  4099. name: "getUTCMilliseconds",
  4100. call: builtinDate_getUTCMilliseconds,
  4101. },
  4102. }
  4103. getTimezoneOffset_function := &_object{
  4104. runtime: runtime,
  4105. class: classFunction,
  4106. objectClass: _classObject,
  4107. prototype: runtime.global.FunctionPrototype,
  4108. extensible: true,
  4109. property: map[string]_property{
  4110. propertyLength: _property{
  4111. mode: 0,
  4112. value: Value{
  4113. kind: valueNumber,
  4114. value: 0,
  4115. },
  4116. },
  4117. },
  4118. propertyOrder: []string{
  4119. propertyLength,
  4120. },
  4121. value: _nativeFunctionObject{
  4122. name: "getTimezoneOffset",
  4123. call: builtinDate_getTimezoneOffset,
  4124. },
  4125. }
  4126. setTime_function := &_object{
  4127. runtime: runtime,
  4128. class: classFunction,
  4129. objectClass: _classObject,
  4130. prototype: runtime.global.FunctionPrototype,
  4131. extensible: true,
  4132. property: map[string]_property{
  4133. propertyLength: _property{
  4134. mode: 0,
  4135. value: Value{
  4136. kind: valueNumber,
  4137. value: 1,
  4138. },
  4139. },
  4140. },
  4141. propertyOrder: []string{
  4142. propertyLength,
  4143. },
  4144. value: _nativeFunctionObject{
  4145. name: "setTime",
  4146. call: builtinDate_setTime,
  4147. },
  4148. }
  4149. setMilliseconds_function := &_object{
  4150. runtime: runtime,
  4151. class: classFunction,
  4152. objectClass: _classObject,
  4153. prototype: runtime.global.FunctionPrototype,
  4154. extensible: true,
  4155. property: map[string]_property{
  4156. propertyLength: _property{
  4157. mode: 0,
  4158. value: Value{
  4159. kind: valueNumber,
  4160. value: 1,
  4161. },
  4162. },
  4163. },
  4164. propertyOrder: []string{
  4165. propertyLength,
  4166. },
  4167. value: _nativeFunctionObject{
  4168. name: "setMilliseconds",
  4169. call: builtinDate_setMilliseconds,
  4170. },
  4171. }
  4172. setUTCMilliseconds_function := &_object{
  4173. runtime: runtime,
  4174. class: classFunction,
  4175. objectClass: _classObject,
  4176. prototype: runtime.global.FunctionPrototype,
  4177. extensible: true,
  4178. property: map[string]_property{
  4179. propertyLength: _property{
  4180. mode: 0,
  4181. value: Value{
  4182. kind: valueNumber,
  4183. value: 1,
  4184. },
  4185. },
  4186. },
  4187. propertyOrder: []string{
  4188. propertyLength,
  4189. },
  4190. value: _nativeFunctionObject{
  4191. name: "setUTCMilliseconds",
  4192. call: builtinDate_setUTCMilliseconds,
  4193. },
  4194. }
  4195. setSeconds_function := &_object{
  4196. runtime: runtime,
  4197. class: classFunction,
  4198. objectClass: _classObject,
  4199. prototype: runtime.global.FunctionPrototype,
  4200. extensible: true,
  4201. property: map[string]_property{
  4202. propertyLength: _property{
  4203. mode: 0,
  4204. value: Value{
  4205. kind: valueNumber,
  4206. value: 2,
  4207. },
  4208. },
  4209. },
  4210. propertyOrder: []string{
  4211. propertyLength,
  4212. },
  4213. value: _nativeFunctionObject{
  4214. name: "setSeconds",
  4215. call: builtinDate_setSeconds,
  4216. },
  4217. }
  4218. setUTCSeconds_function := &_object{
  4219. runtime: runtime,
  4220. class: classFunction,
  4221. objectClass: _classObject,
  4222. prototype: runtime.global.FunctionPrototype,
  4223. extensible: true,
  4224. property: map[string]_property{
  4225. propertyLength: _property{
  4226. mode: 0,
  4227. value: Value{
  4228. kind: valueNumber,
  4229. value: 2,
  4230. },
  4231. },
  4232. },
  4233. propertyOrder: []string{
  4234. propertyLength,
  4235. },
  4236. value: _nativeFunctionObject{
  4237. name: "setUTCSeconds",
  4238. call: builtinDate_setUTCSeconds,
  4239. },
  4240. }
  4241. setMinutes_function := &_object{
  4242. runtime: runtime,
  4243. class: classFunction,
  4244. objectClass: _classObject,
  4245. prototype: runtime.global.FunctionPrototype,
  4246. extensible: true,
  4247. property: map[string]_property{
  4248. propertyLength: _property{
  4249. mode: 0,
  4250. value: Value{
  4251. kind: valueNumber,
  4252. value: 3,
  4253. },
  4254. },
  4255. },
  4256. propertyOrder: []string{
  4257. propertyLength,
  4258. },
  4259. value: _nativeFunctionObject{
  4260. name: "setMinutes",
  4261. call: builtinDate_setMinutes,
  4262. },
  4263. }
  4264. setUTCMinutes_function := &_object{
  4265. runtime: runtime,
  4266. class: classFunction,
  4267. objectClass: _classObject,
  4268. prototype: runtime.global.FunctionPrototype,
  4269. extensible: true,
  4270. property: map[string]_property{
  4271. propertyLength: _property{
  4272. mode: 0,
  4273. value: Value{
  4274. kind: valueNumber,
  4275. value: 3,
  4276. },
  4277. },
  4278. },
  4279. propertyOrder: []string{
  4280. propertyLength,
  4281. },
  4282. value: _nativeFunctionObject{
  4283. name: "setUTCMinutes",
  4284. call: builtinDate_setUTCMinutes,
  4285. },
  4286. }
  4287. setHours_function := &_object{
  4288. runtime: runtime,
  4289. class: classFunction,
  4290. objectClass: _classObject,
  4291. prototype: runtime.global.FunctionPrototype,
  4292. extensible: true,
  4293. property: map[string]_property{
  4294. propertyLength: _property{
  4295. mode: 0,
  4296. value: Value{
  4297. kind: valueNumber,
  4298. value: 4,
  4299. },
  4300. },
  4301. },
  4302. propertyOrder: []string{
  4303. propertyLength,
  4304. },
  4305. value: _nativeFunctionObject{
  4306. name: "setHours",
  4307. call: builtinDate_setHours,
  4308. },
  4309. }
  4310. setUTCHours_function := &_object{
  4311. runtime: runtime,
  4312. class: classFunction,
  4313. objectClass: _classObject,
  4314. prototype: runtime.global.FunctionPrototype,
  4315. extensible: true,
  4316. property: map[string]_property{
  4317. propertyLength: _property{
  4318. mode: 0,
  4319. value: Value{
  4320. kind: valueNumber,
  4321. value: 4,
  4322. },
  4323. },
  4324. },
  4325. propertyOrder: []string{
  4326. propertyLength,
  4327. },
  4328. value: _nativeFunctionObject{
  4329. name: "setUTCHours",
  4330. call: builtinDate_setUTCHours,
  4331. },
  4332. }
  4333. setDate_function := &_object{
  4334. runtime: runtime,
  4335. class: classFunction,
  4336. objectClass: _classObject,
  4337. prototype: runtime.global.FunctionPrototype,
  4338. extensible: true,
  4339. property: map[string]_property{
  4340. propertyLength: _property{
  4341. mode: 0,
  4342. value: Value{
  4343. kind: valueNumber,
  4344. value: 1,
  4345. },
  4346. },
  4347. },
  4348. propertyOrder: []string{
  4349. propertyLength,
  4350. },
  4351. value: _nativeFunctionObject{
  4352. name: "setDate",
  4353. call: builtinDate_setDate,
  4354. },
  4355. }
  4356. setUTCDate_function := &_object{
  4357. runtime: runtime,
  4358. class: classFunction,
  4359. objectClass: _classObject,
  4360. prototype: runtime.global.FunctionPrototype,
  4361. extensible: true,
  4362. property: map[string]_property{
  4363. propertyLength: _property{
  4364. mode: 0,
  4365. value: Value{
  4366. kind: valueNumber,
  4367. value: 1,
  4368. },
  4369. },
  4370. },
  4371. propertyOrder: []string{
  4372. propertyLength,
  4373. },
  4374. value: _nativeFunctionObject{
  4375. name: "setUTCDate",
  4376. call: builtinDate_setUTCDate,
  4377. },
  4378. }
  4379. setMonth_function := &_object{
  4380. runtime: runtime,
  4381. class: classFunction,
  4382. objectClass: _classObject,
  4383. prototype: runtime.global.FunctionPrototype,
  4384. extensible: true,
  4385. property: map[string]_property{
  4386. propertyLength: _property{
  4387. mode: 0,
  4388. value: Value{
  4389. kind: valueNumber,
  4390. value: 2,
  4391. },
  4392. },
  4393. },
  4394. propertyOrder: []string{
  4395. propertyLength,
  4396. },
  4397. value: _nativeFunctionObject{
  4398. name: "setMonth",
  4399. call: builtinDate_setMonth,
  4400. },
  4401. }
  4402. setUTCMonth_function := &_object{
  4403. runtime: runtime,
  4404. class: classFunction,
  4405. objectClass: _classObject,
  4406. prototype: runtime.global.FunctionPrototype,
  4407. extensible: true,
  4408. property: map[string]_property{
  4409. propertyLength: _property{
  4410. mode: 0,
  4411. value: Value{
  4412. kind: valueNumber,
  4413. value: 2,
  4414. },
  4415. },
  4416. },
  4417. propertyOrder: []string{
  4418. propertyLength,
  4419. },
  4420. value: _nativeFunctionObject{
  4421. name: "setUTCMonth",
  4422. call: builtinDate_setUTCMonth,
  4423. },
  4424. }
  4425. setYear_function := &_object{
  4426. runtime: runtime,
  4427. class: classFunction,
  4428. objectClass: _classObject,
  4429. prototype: runtime.global.FunctionPrototype,
  4430. extensible: true,
  4431. property: map[string]_property{
  4432. propertyLength: _property{
  4433. mode: 0,
  4434. value: Value{
  4435. kind: valueNumber,
  4436. value: 1,
  4437. },
  4438. },
  4439. },
  4440. propertyOrder: []string{
  4441. propertyLength,
  4442. },
  4443. value: _nativeFunctionObject{
  4444. name: "setYear",
  4445. call: builtinDate_setYear,
  4446. },
  4447. }
  4448. setFullYear_function := &_object{
  4449. runtime: runtime,
  4450. class: classFunction,
  4451. objectClass: _classObject,
  4452. prototype: runtime.global.FunctionPrototype,
  4453. extensible: true,
  4454. property: map[string]_property{
  4455. propertyLength: _property{
  4456. mode: 0,
  4457. value: Value{
  4458. kind: valueNumber,
  4459. value: 3,
  4460. },
  4461. },
  4462. },
  4463. propertyOrder: []string{
  4464. propertyLength,
  4465. },
  4466. value: _nativeFunctionObject{
  4467. name: "setFullYear",
  4468. call: builtinDate_setFullYear,
  4469. },
  4470. }
  4471. setUTCFullYear_function := &_object{
  4472. runtime: runtime,
  4473. class: classFunction,
  4474. objectClass: _classObject,
  4475. prototype: runtime.global.FunctionPrototype,
  4476. extensible: true,
  4477. property: map[string]_property{
  4478. propertyLength: _property{
  4479. mode: 0,
  4480. value: Value{
  4481. kind: valueNumber,
  4482. value: 3,
  4483. },
  4484. },
  4485. },
  4486. propertyOrder: []string{
  4487. propertyLength,
  4488. },
  4489. value: _nativeFunctionObject{
  4490. name: "setUTCFullYear",
  4491. call: builtinDate_setUTCFullYear,
  4492. },
  4493. }
  4494. parse_function := &_object{
  4495. runtime: runtime,
  4496. class: classFunction,
  4497. objectClass: _classObject,
  4498. prototype: runtime.global.FunctionPrototype,
  4499. extensible: true,
  4500. property: map[string]_property{
  4501. propertyLength: _property{
  4502. mode: 0,
  4503. value: Value{
  4504. kind: valueNumber,
  4505. value: 1,
  4506. },
  4507. },
  4508. },
  4509. propertyOrder: []string{
  4510. propertyLength,
  4511. },
  4512. value: _nativeFunctionObject{
  4513. name: "parse",
  4514. call: builtinDate_parse,
  4515. },
  4516. }
  4517. UTC_function := &_object{
  4518. runtime: runtime,
  4519. class: classFunction,
  4520. objectClass: _classObject,
  4521. prototype: runtime.global.FunctionPrototype,
  4522. extensible: true,
  4523. property: map[string]_property{
  4524. propertyLength: _property{
  4525. mode: 0,
  4526. value: Value{
  4527. kind: valueNumber,
  4528. value: 7,
  4529. },
  4530. },
  4531. },
  4532. propertyOrder: []string{
  4533. propertyLength,
  4534. },
  4535. value: _nativeFunctionObject{
  4536. name: "UTC",
  4537. call: builtinDate_UTC,
  4538. },
  4539. }
  4540. now_function := &_object{
  4541. runtime: runtime,
  4542. class: classFunction,
  4543. objectClass: _classObject,
  4544. prototype: runtime.global.FunctionPrototype,
  4545. extensible: true,
  4546. property: map[string]_property{
  4547. propertyLength: _property{
  4548. mode: 0,
  4549. value: Value{
  4550. kind: valueNumber,
  4551. value: 0,
  4552. },
  4553. },
  4554. },
  4555. propertyOrder: []string{
  4556. propertyLength,
  4557. },
  4558. value: _nativeFunctionObject{
  4559. name: "now",
  4560. call: builtinDate_now,
  4561. },
  4562. }
  4563. runtime.global.DatePrototype = &_object{
  4564. runtime: runtime,
  4565. class: classDate,
  4566. objectClass: _classObject,
  4567. prototype: runtime.global.ObjectPrototype,
  4568. extensible: true,
  4569. value: prototypeValueDate,
  4570. property: map[string]_property{
  4571. "toString": _property{
  4572. mode: 0101,
  4573. value: Value{
  4574. kind: valueObject,
  4575. value: toString_function,
  4576. },
  4577. },
  4578. "toDateString": _property{
  4579. mode: 0101,
  4580. value: Value{
  4581. kind: valueObject,
  4582. value: toDateString_function,
  4583. },
  4584. },
  4585. "toTimeString": _property{
  4586. mode: 0101,
  4587. value: Value{
  4588. kind: valueObject,
  4589. value: toTimeString_function,
  4590. },
  4591. },
  4592. "toUTCString": _property{
  4593. mode: 0101,
  4594. value: Value{
  4595. kind: valueObject,
  4596. value: toUTCString_function,
  4597. },
  4598. },
  4599. "toISOString": _property{
  4600. mode: 0101,
  4601. value: Value{
  4602. kind: valueObject,
  4603. value: toISOString_function,
  4604. },
  4605. },
  4606. "toJSON": _property{
  4607. mode: 0101,
  4608. value: Value{
  4609. kind: valueObject,
  4610. value: toJSON_function,
  4611. },
  4612. },
  4613. "toGMTString": _property{
  4614. mode: 0101,
  4615. value: Value{
  4616. kind: valueObject,
  4617. value: toGMTString_function,
  4618. },
  4619. },
  4620. "toLocaleString": _property{
  4621. mode: 0101,
  4622. value: Value{
  4623. kind: valueObject,
  4624. value: toLocaleString_function,
  4625. },
  4626. },
  4627. "toLocaleDateString": _property{
  4628. mode: 0101,
  4629. value: Value{
  4630. kind: valueObject,
  4631. value: toLocaleDateString_function,
  4632. },
  4633. },
  4634. "toLocaleTimeString": _property{
  4635. mode: 0101,
  4636. value: Value{
  4637. kind: valueObject,
  4638. value: toLocaleTimeString_function,
  4639. },
  4640. },
  4641. "valueOf": _property{
  4642. mode: 0101,
  4643. value: Value{
  4644. kind: valueObject,
  4645. value: valueOf_function,
  4646. },
  4647. },
  4648. "getTime": _property{
  4649. mode: 0101,
  4650. value: Value{
  4651. kind: valueObject,
  4652. value: getTime_function,
  4653. },
  4654. },
  4655. "getYear": _property{
  4656. mode: 0101,
  4657. value: Value{
  4658. kind: valueObject,
  4659. value: getYear_function,
  4660. },
  4661. },
  4662. "getFullYear": _property{
  4663. mode: 0101,
  4664. value: Value{
  4665. kind: valueObject,
  4666. value: getFullYear_function,
  4667. },
  4668. },
  4669. "getUTCFullYear": _property{
  4670. mode: 0101,
  4671. value: Value{
  4672. kind: valueObject,
  4673. value: getUTCFullYear_function,
  4674. },
  4675. },
  4676. "getMonth": _property{
  4677. mode: 0101,
  4678. value: Value{
  4679. kind: valueObject,
  4680. value: getMonth_function,
  4681. },
  4682. },
  4683. "getUTCMonth": _property{
  4684. mode: 0101,
  4685. value: Value{
  4686. kind: valueObject,
  4687. value: getUTCMonth_function,
  4688. },
  4689. },
  4690. "getDate": _property{
  4691. mode: 0101,
  4692. value: Value{
  4693. kind: valueObject,
  4694. value: getDate_function,
  4695. },
  4696. },
  4697. "getUTCDate": _property{
  4698. mode: 0101,
  4699. value: Value{
  4700. kind: valueObject,
  4701. value: getUTCDate_function,
  4702. },
  4703. },
  4704. "getDay": _property{
  4705. mode: 0101,
  4706. value: Value{
  4707. kind: valueObject,
  4708. value: getDay_function,
  4709. },
  4710. },
  4711. "getUTCDay": _property{
  4712. mode: 0101,
  4713. value: Value{
  4714. kind: valueObject,
  4715. value: getUTCDay_function,
  4716. },
  4717. },
  4718. "getHours": _property{
  4719. mode: 0101,
  4720. value: Value{
  4721. kind: valueObject,
  4722. value: getHours_function,
  4723. },
  4724. },
  4725. "getUTCHours": _property{
  4726. mode: 0101,
  4727. value: Value{
  4728. kind: valueObject,
  4729. value: getUTCHours_function,
  4730. },
  4731. },
  4732. "getMinutes": _property{
  4733. mode: 0101,
  4734. value: Value{
  4735. kind: valueObject,
  4736. value: getMinutes_function,
  4737. },
  4738. },
  4739. "getUTCMinutes": _property{
  4740. mode: 0101,
  4741. value: Value{
  4742. kind: valueObject,
  4743. value: getUTCMinutes_function,
  4744. },
  4745. },
  4746. "getSeconds": _property{
  4747. mode: 0101,
  4748. value: Value{
  4749. kind: valueObject,
  4750. value: getSeconds_function,
  4751. },
  4752. },
  4753. "getUTCSeconds": _property{
  4754. mode: 0101,
  4755. value: Value{
  4756. kind: valueObject,
  4757. value: getUTCSeconds_function,
  4758. },
  4759. },
  4760. "getMilliseconds": _property{
  4761. mode: 0101,
  4762. value: Value{
  4763. kind: valueObject,
  4764. value: getMilliseconds_function,
  4765. },
  4766. },
  4767. "getUTCMilliseconds": _property{
  4768. mode: 0101,
  4769. value: Value{
  4770. kind: valueObject,
  4771. value: getUTCMilliseconds_function,
  4772. },
  4773. },
  4774. "getTimezoneOffset": _property{
  4775. mode: 0101,
  4776. value: Value{
  4777. kind: valueObject,
  4778. value: getTimezoneOffset_function,
  4779. },
  4780. },
  4781. "setTime": _property{
  4782. mode: 0101,
  4783. value: Value{
  4784. kind: valueObject,
  4785. value: setTime_function,
  4786. },
  4787. },
  4788. "setMilliseconds": _property{
  4789. mode: 0101,
  4790. value: Value{
  4791. kind: valueObject,
  4792. value: setMilliseconds_function,
  4793. },
  4794. },
  4795. "setUTCMilliseconds": _property{
  4796. mode: 0101,
  4797. value: Value{
  4798. kind: valueObject,
  4799. value: setUTCMilliseconds_function,
  4800. },
  4801. },
  4802. "setSeconds": _property{
  4803. mode: 0101,
  4804. value: Value{
  4805. kind: valueObject,
  4806. value: setSeconds_function,
  4807. },
  4808. },
  4809. "setUTCSeconds": _property{
  4810. mode: 0101,
  4811. value: Value{
  4812. kind: valueObject,
  4813. value: setUTCSeconds_function,
  4814. },
  4815. },
  4816. "setMinutes": _property{
  4817. mode: 0101,
  4818. value: Value{
  4819. kind: valueObject,
  4820. value: setMinutes_function,
  4821. },
  4822. },
  4823. "setUTCMinutes": _property{
  4824. mode: 0101,
  4825. value: Value{
  4826. kind: valueObject,
  4827. value: setUTCMinutes_function,
  4828. },
  4829. },
  4830. "setHours": _property{
  4831. mode: 0101,
  4832. value: Value{
  4833. kind: valueObject,
  4834. value: setHours_function,
  4835. },
  4836. },
  4837. "setUTCHours": _property{
  4838. mode: 0101,
  4839. value: Value{
  4840. kind: valueObject,
  4841. value: setUTCHours_function,
  4842. },
  4843. },
  4844. "setDate": _property{
  4845. mode: 0101,
  4846. value: Value{
  4847. kind: valueObject,
  4848. value: setDate_function,
  4849. },
  4850. },
  4851. "setUTCDate": _property{
  4852. mode: 0101,
  4853. value: Value{
  4854. kind: valueObject,
  4855. value: setUTCDate_function,
  4856. },
  4857. },
  4858. "setMonth": _property{
  4859. mode: 0101,
  4860. value: Value{
  4861. kind: valueObject,
  4862. value: setMonth_function,
  4863. },
  4864. },
  4865. "setUTCMonth": _property{
  4866. mode: 0101,
  4867. value: Value{
  4868. kind: valueObject,
  4869. value: setUTCMonth_function,
  4870. },
  4871. },
  4872. "setYear": _property{
  4873. mode: 0101,
  4874. value: Value{
  4875. kind: valueObject,
  4876. value: setYear_function,
  4877. },
  4878. },
  4879. "setFullYear": _property{
  4880. mode: 0101,
  4881. value: Value{
  4882. kind: valueObject,
  4883. value: setFullYear_function,
  4884. },
  4885. },
  4886. "setUTCFullYear": _property{
  4887. mode: 0101,
  4888. value: Value{
  4889. kind: valueObject,
  4890. value: setUTCFullYear_function,
  4891. },
  4892. },
  4893. },
  4894. propertyOrder: []string{
  4895. "toString",
  4896. "toDateString",
  4897. "toTimeString",
  4898. "toUTCString",
  4899. "toISOString",
  4900. "toJSON",
  4901. "toGMTString",
  4902. "toLocaleString",
  4903. "toLocaleDateString",
  4904. "toLocaleTimeString",
  4905. "valueOf",
  4906. "getTime",
  4907. "getYear",
  4908. "getFullYear",
  4909. "getUTCFullYear",
  4910. "getMonth",
  4911. "getUTCMonth",
  4912. "getDate",
  4913. "getUTCDate",
  4914. "getDay",
  4915. "getUTCDay",
  4916. "getHours",
  4917. "getUTCHours",
  4918. "getMinutes",
  4919. "getUTCMinutes",
  4920. "getSeconds",
  4921. "getUTCSeconds",
  4922. "getMilliseconds",
  4923. "getUTCMilliseconds",
  4924. "getTimezoneOffset",
  4925. "setTime",
  4926. "setMilliseconds",
  4927. "setUTCMilliseconds",
  4928. "setSeconds",
  4929. "setUTCSeconds",
  4930. "setMinutes",
  4931. "setUTCMinutes",
  4932. "setHours",
  4933. "setUTCHours",
  4934. "setDate",
  4935. "setUTCDate",
  4936. "setMonth",
  4937. "setUTCMonth",
  4938. "setYear",
  4939. "setFullYear",
  4940. "setUTCFullYear",
  4941. },
  4942. }
  4943. runtime.global.Date = &_object{
  4944. runtime: runtime,
  4945. class: classFunction,
  4946. objectClass: _classObject,
  4947. prototype: runtime.global.FunctionPrototype,
  4948. extensible: true,
  4949. value: _nativeFunctionObject{
  4950. name: classDate,
  4951. call: builtinDate,
  4952. construct: builtinNewDate,
  4953. },
  4954. property: map[string]_property{
  4955. propertyLength: _property{
  4956. mode: 0,
  4957. value: Value{
  4958. kind: valueNumber,
  4959. value: 7,
  4960. },
  4961. },
  4962. "prototype": _property{
  4963. mode: 0,
  4964. value: Value{
  4965. kind: valueObject,
  4966. value: runtime.global.DatePrototype,
  4967. },
  4968. },
  4969. "parse": _property{
  4970. mode: 0101,
  4971. value: Value{
  4972. kind: valueObject,
  4973. value: parse_function,
  4974. },
  4975. },
  4976. "UTC": _property{
  4977. mode: 0101,
  4978. value: Value{
  4979. kind: valueObject,
  4980. value: UTC_function,
  4981. },
  4982. },
  4983. "now": _property{
  4984. mode: 0101,
  4985. value: Value{
  4986. kind: valueObject,
  4987. value: now_function,
  4988. },
  4989. },
  4990. },
  4991. propertyOrder: []string{
  4992. propertyLength,
  4993. "prototype",
  4994. "parse",
  4995. "UTC",
  4996. "now",
  4997. },
  4998. }
  4999. runtime.global.DatePrototype.property["constructor"] =
  5000. _property{
  5001. mode: 0101,
  5002. value: Value{
  5003. kind: valueObject,
  5004. value: runtime.global.Date,
  5005. },
  5006. }
  5007. }
  5008. {
  5009. toString_function := &_object{
  5010. runtime: runtime,
  5011. class: classFunction,
  5012. objectClass: _classObject,
  5013. prototype: runtime.global.FunctionPrototype,
  5014. extensible: true,
  5015. property: map[string]_property{
  5016. propertyLength: _property{
  5017. mode: 0,
  5018. value: Value{
  5019. kind: valueNumber,
  5020. value: 0,
  5021. },
  5022. },
  5023. },
  5024. propertyOrder: []string{
  5025. propertyLength,
  5026. },
  5027. value: _nativeFunctionObject{
  5028. name: "toString",
  5029. call: builtinRegExp_toString,
  5030. },
  5031. }
  5032. exec_function := &_object{
  5033. runtime: runtime,
  5034. class: classFunction,
  5035. objectClass: _classObject,
  5036. prototype: runtime.global.FunctionPrototype,
  5037. extensible: true,
  5038. property: map[string]_property{
  5039. propertyLength: _property{
  5040. mode: 0,
  5041. value: Value{
  5042. kind: valueNumber,
  5043. value: 1,
  5044. },
  5045. },
  5046. },
  5047. propertyOrder: []string{
  5048. propertyLength,
  5049. },
  5050. value: _nativeFunctionObject{
  5051. name: "exec",
  5052. call: builtinRegExp_exec,
  5053. },
  5054. }
  5055. test_function := &_object{
  5056. runtime: runtime,
  5057. class: classFunction,
  5058. objectClass: _classObject,
  5059. prototype: runtime.global.FunctionPrototype,
  5060. extensible: true,
  5061. property: map[string]_property{
  5062. propertyLength: _property{
  5063. mode: 0,
  5064. value: Value{
  5065. kind: valueNumber,
  5066. value: 1,
  5067. },
  5068. },
  5069. },
  5070. propertyOrder: []string{
  5071. propertyLength,
  5072. },
  5073. value: _nativeFunctionObject{
  5074. name: "test",
  5075. call: builtinRegExp_test,
  5076. },
  5077. }
  5078. compile_function := &_object{
  5079. runtime: runtime,
  5080. class: classFunction,
  5081. objectClass: _classObject,
  5082. prototype: runtime.global.FunctionPrototype,
  5083. extensible: true,
  5084. property: map[string]_property{
  5085. propertyLength: _property{
  5086. mode: 0,
  5087. value: Value{
  5088. kind: valueNumber,
  5089. value: 1,
  5090. },
  5091. },
  5092. },
  5093. propertyOrder: []string{
  5094. propertyLength,
  5095. },
  5096. value: _nativeFunctionObject{
  5097. name: "compile",
  5098. call: builtinRegExp_compile,
  5099. },
  5100. }
  5101. runtime.global.RegExpPrototype = &_object{
  5102. runtime: runtime,
  5103. class: classRegExp,
  5104. objectClass: _classObject,
  5105. prototype: runtime.global.ObjectPrototype,
  5106. extensible: true,
  5107. value: prototypeValueRegExp,
  5108. property: map[string]_property{
  5109. "toString": _property{
  5110. mode: 0101,
  5111. value: Value{
  5112. kind: valueObject,
  5113. value: toString_function,
  5114. },
  5115. },
  5116. "exec": _property{
  5117. mode: 0101,
  5118. value: Value{
  5119. kind: valueObject,
  5120. value: exec_function,
  5121. },
  5122. },
  5123. "test": _property{
  5124. mode: 0101,
  5125. value: Value{
  5126. kind: valueObject,
  5127. value: test_function,
  5128. },
  5129. },
  5130. "compile": _property{
  5131. mode: 0101,
  5132. value: Value{
  5133. kind: valueObject,
  5134. value: compile_function,
  5135. },
  5136. },
  5137. },
  5138. propertyOrder: []string{
  5139. "toString",
  5140. "exec",
  5141. "test",
  5142. "compile",
  5143. },
  5144. }
  5145. runtime.global.RegExp = &_object{
  5146. runtime: runtime,
  5147. class: classFunction,
  5148. objectClass: _classObject,
  5149. prototype: runtime.global.FunctionPrototype,
  5150. extensible: true,
  5151. value: _nativeFunctionObject{
  5152. name: classRegExp,
  5153. call: builtinRegExp,
  5154. construct: builtinNewRegExp,
  5155. },
  5156. property: map[string]_property{
  5157. propertyLength: _property{
  5158. mode: 0,
  5159. value: Value{
  5160. kind: valueNumber,
  5161. value: 2,
  5162. },
  5163. },
  5164. "prototype": _property{
  5165. mode: 0,
  5166. value: Value{
  5167. kind: valueObject,
  5168. value: runtime.global.RegExpPrototype,
  5169. },
  5170. },
  5171. },
  5172. propertyOrder: []string{
  5173. propertyLength,
  5174. "prototype",
  5175. },
  5176. }
  5177. runtime.global.RegExpPrototype.property["constructor"] =
  5178. _property{
  5179. mode: 0101,
  5180. value: Value{
  5181. kind: valueObject,
  5182. value: runtime.global.RegExp,
  5183. },
  5184. }
  5185. }
  5186. {
  5187. toString_function := &_object{
  5188. runtime: runtime,
  5189. class: classFunction,
  5190. objectClass: _classObject,
  5191. prototype: runtime.global.FunctionPrototype,
  5192. extensible: true,
  5193. property: map[string]_property{
  5194. propertyLength: _property{
  5195. mode: 0,
  5196. value: Value{
  5197. kind: valueNumber,
  5198. value: 0,
  5199. },
  5200. },
  5201. },
  5202. propertyOrder: []string{
  5203. propertyLength,
  5204. },
  5205. value: _nativeFunctionObject{
  5206. name: "toString",
  5207. call: builtinError_toString,
  5208. },
  5209. }
  5210. runtime.global.ErrorPrototype = &_object{
  5211. runtime: runtime,
  5212. class: classError,
  5213. objectClass: _classObject,
  5214. prototype: runtime.global.ObjectPrototype,
  5215. extensible: true,
  5216. value: nil,
  5217. property: map[string]_property{
  5218. "toString": _property{
  5219. mode: 0101,
  5220. value: Value{
  5221. kind: valueObject,
  5222. value: toString_function,
  5223. },
  5224. },
  5225. "name": _property{
  5226. mode: 0101,
  5227. value: Value{
  5228. kind: valueString,
  5229. value: classError,
  5230. },
  5231. },
  5232. "message": _property{
  5233. mode: 0101,
  5234. value: Value{
  5235. kind: valueString,
  5236. value: "",
  5237. },
  5238. },
  5239. },
  5240. propertyOrder: []string{
  5241. "toString",
  5242. "name",
  5243. "message",
  5244. },
  5245. }
  5246. runtime.global.Error = &_object{
  5247. runtime: runtime,
  5248. class: classFunction,
  5249. objectClass: _classObject,
  5250. prototype: runtime.global.FunctionPrototype,
  5251. extensible: true,
  5252. value: _nativeFunctionObject{
  5253. name: classError,
  5254. call: builtinError,
  5255. construct: builtinNewError,
  5256. },
  5257. property: map[string]_property{
  5258. propertyLength: _property{
  5259. mode: 0,
  5260. value: Value{
  5261. kind: valueNumber,
  5262. value: 1,
  5263. },
  5264. },
  5265. "prototype": _property{
  5266. mode: 0,
  5267. value: Value{
  5268. kind: valueObject,
  5269. value: runtime.global.ErrorPrototype,
  5270. },
  5271. },
  5272. },
  5273. propertyOrder: []string{
  5274. propertyLength,
  5275. "prototype",
  5276. },
  5277. }
  5278. runtime.global.ErrorPrototype.property["constructor"] =
  5279. _property{
  5280. mode: 0101,
  5281. value: Value{
  5282. kind: valueObject,
  5283. value: runtime.global.Error,
  5284. },
  5285. }
  5286. }
  5287. {
  5288. runtime.global.EvalErrorPrototype = &_object{
  5289. runtime: runtime,
  5290. class: "EvalError",
  5291. objectClass: _classObject,
  5292. prototype: runtime.global.ErrorPrototype,
  5293. extensible: true,
  5294. value: nil,
  5295. property: map[string]_property{
  5296. "name": _property{
  5297. mode: 0101,
  5298. value: Value{
  5299. kind: valueString,
  5300. value: "EvalError",
  5301. },
  5302. },
  5303. },
  5304. propertyOrder: []string{
  5305. "name",
  5306. },
  5307. }
  5308. runtime.global.EvalError = &_object{
  5309. runtime: runtime,
  5310. class: classFunction,
  5311. objectClass: _classObject,
  5312. prototype: runtime.global.FunctionPrototype,
  5313. extensible: true,
  5314. value: _nativeFunctionObject{
  5315. name: "EvalError",
  5316. call: builtinEvalError,
  5317. construct: builtinNewEvalError,
  5318. },
  5319. property: map[string]_property{
  5320. propertyLength: _property{
  5321. mode: 0,
  5322. value: Value{
  5323. kind: valueNumber,
  5324. value: 1,
  5325. },
  5326. },
  5327. "prototype": _property{
  5328. mode: 0,
  5329. value: Value{
  5330. kind: valueObject,
  5331. value: runtime.global.EvalErrorPrototype,
  5332. },
  5333. },
  5334. },
  5335. propertyOrder: []string{
  5336. propertyLength,
  5337. "prototype",
  5338. },
  5339. }
  5340. runtime.global.EvalErrorPrototype.property["constructor"] =
  5341. _property{
  5342. mode: 0101,
  5343. value: Value{
  5344. kind: valueObject,
  5345. value: runtime.global.EvalError,
  5346. },
  5347. }
  5348. }
  5349. {
  5350. runtime.global.TypeErrorPrototype = &_object{
  5351. runtime: runtime,
  5352. class: "TypeError",
  5353. objectClass: _classObject,
  5354. prototype: runtime.global.ErrorPrototype,
  5355. extensible: true,
  5356. value: nil,
  5357. property: map[string]_property{
  5358. "name": _property{
  5359. mode: 0101,
  5360. value: Value{
  5361. kind: valueString,
  5362. value: "TypeError",
  5363. },
  5364. },
  5365. },
  5366. propertyOrder: []string{
  5367. "name",
  5368. },
  5369. }
  5370. runtime.global.TypeError = &_object{
  5371. runtime: runtime,
  5372. class: classFunction,
  5373. objectClass: _classObject,
  5374. prototype: runtime.global.FunctionPrototype,
  5375. extensible: true,
  5376. value: _nativeFunctionObject{
  5377. name: "TypeError",
  5378. call: builtinTypeError,
  5379. construct: builtinNewTypeError,
  5380. },
  5381. property: map[string]_property{
  5382. propertyLength: _property{
  5383. mode: 0,
  5384. value: Value{
  5385. kind: valueNumber,
  5386. value: 1,
  5387. },
  5388. },
  5389. "prototype": _property{
  5390. mode: 0,
  5391. value: Value{
  5392. kind: valueObject,
  5393. value: runtime.global.TypeErrorPrototype,
  5394. },
  5395. },
  5396. },
  5397. propertyOrder: []string{
  5398. propertyLength,
  5399. "prototype",
  5400. },
  5401. }
  5402. runtime.global.TypeErrorPrototype.property["constructor"] =
  5403. _property{
  5404. mode: 0101,
  5405. value: Value{
  5406. kind: valueObject,
  5407. value: runtime.global.TypeError,
  5408. },
  5409. }
  5410. }
  5411. {
  5412. runtime.global.RangeErrorPrototype = &_object{
  5413. runtime: runtime,
  5414. class: "RangeError",
  5415. objectClass: _classObject,
  5416. prototype: runtime.global.ErrorPrototype,
  5417. extensible: true,
  5418. value: nil,
  5419. property: map[string]_property{
  5420. "name": _property{
  5421. mode: 0101,
  5422. value: Value{
  5423. kind: valueString,
  5424. value: "RangeError",
  5425. },
  5426. },
  5427. },
  5428. propertyOrder: []string{
  5429. "name",
  5430. },
  5431. }
  5432. runtime.global.RangeError = &_object{
  5433. runtime: runtime,
  5434. class: classFunction,
  5435. objectClass: _classObject,
  5436. prototype: runtime.global.FunctionPrototype,
  5437. extensible: true,
  5438. value: _nativeFunctionObject{
  5439. name: "RangeError",
  5440. call: builtinRangeError,
  5441. construct: builtinNewRangeError,
  5442. },
  5443. property: map[string]_property{
  5444. propertyLength: _property{
  5445. mode: 0,
  5446. value: Value{
  5447. kind: valueNumber,
  5448. value: 1,
  5449. },
  5450. },
  5451. "prototype": _property{
  5452. mode: 0,
  5453. value: Value{
  5454. kind: valueObject,
  5455. value: runtime.global.RangeErrorPrototype,
  5456. },
  5457. },
  5458. },
  5459. propertyOrder: []string{
  5460. propertyLength,
  5461. "prototype",
  5462. },
  5463. }
  5464. runtime.global.RangeErrorPrototype.property["constructor"] =
  5465. _property{
  5466. mode: 0101,
  5467. value: Value{
  5468. kind: valueObject,
  5469. value: runtime.global.RangeError,
  5470. },
  5471. }
  5472. }
  5473. {
  5474. runtime.global.ReferenceErrorPrototype = &_object{
  5475. runtime: runtime,
  5476. class: "ReferenceError",
  5477. objectClass: _classObject,
  5478. prototype: runtime.global.ErrorPrototype,
  5479. extensible: true,
  5480. value: nil,
  5481. property: map[string]_property{
  5482. "name": _property{
  5483. mode: 0101,
  5484. value: Value{
  5485. kind: valueString,
  5486. value: "ReferenceError",
  5487. },
  5488. },
  5489. },
  5490. propertyOrder: []string{
  5491. "name",
  5492. },
  5493. }
  5494. runtime.global.ReferenceError = &_object{
  5495. runtime: runtime,
  5496. class: classFunction,
  5497. objectClass: _classObject,
  5498. prototype: runtime.global.FunctionPrototype,
  5499. extensible: true,
  5500. value: _nativeFunctionObject{
  5501. name: "ReferenceError",
  5502. call: builtinReferenceError,
  5503. construct: builtinNewReferenceError,
  5504. },
  5505. property: map[string]_property{
  5506. propertyLength: _property{
  5507. mode: 0,
  5508. value: Value{
  5509. kind: valueNumber,
  5510. value: 1,
  5511. },
  5512. },
  5513. "prototype": _property{
  5514. mode: 0,
  5515. value: Value{
  5516. kind: valueObject,
  5517. value: runtime.global.ReferenceErrorPrototype,
  5518. },
  5519. },
  5520. },
  5521. propertyOrder: []string{
  5522. propertyLength,
  5523. "prototype",
  5524. },
  5525. }
  5526. runtime.global.ReferenceErrorPrototype.property["constructor"] =
  5527. _property{
  5528. mode: 0101,
  5529. value: Value{
  5530. kind: valueObject,
  5531. value: runtime.global.ReferenceError,
  5532. },
  5533. }
  5534. }
  5535. {
  5536. runtime.global.SyntaxErrorPrototype = &_object{
  5537. runtime: runtime,
  5538. class: "SyntaxError",
  5539. objectClass: _classObject,
  5540. prototype: runtime.global.ErrorPrototype,
  5541. extensible: true,
  5542. value: nil,
  5543. property: map[string]_property{
  5544. "name": _property{
  5545. mode: 0101,
  5546. value: Value{
  5547. kind: valueString,
  5548. value: "SyntaxError",
  5549. },
  5550. },
  5551. },
  5552. propertyOrder: []string{
  5553. "name",
  5554. },
  5555. }
  5556. runtime.global.SyntaxError = &_object{
  5557. runtime: runtime,
  5558. class: classFunction,
  5559. objectClass: _classObject,
  5560. prototype: runtime.global.FunctionPrototype,
  5561. extensible: true,
  5562. value: _nativeFunctionObject{
  5563. name: "SyntaxError",
  5564. call: builtinSyntaxError,
  5565. construct: builtinNewSyntaxError,
  5566. },
  5567. property: map[string]_property{
  5568. propertyLength: _property{
  5569. mode: 0,
  5570. value: Value{
  5571. kind: valueNumber,
  5572. value: 1,
  5573. },
  5574. },
  5575. "prototype": _property{
  5576. mode: 0,
  5577. value: Value{
  5578. kind: valueObject,
  5579. value: runtime.global.SyntaxErrorPrototype,
  5580. },
  5581. },
  5582. },
  5583. propertyOrder: []string{
  5584. propertyLength,
  5585. "prototype",
  5586. },
  5587. }
  5588. runtime.global.SyntaxErrorPrototype.property["constructor"] =
  5589. _property{
  5590. mode: 0101,
  5591. value: Value{
  5592. kind: valueObject,
  5593. value: runtime.global.SyntaxError,
  5594. },
  5595. }
  5596. }
  5597. {
  5598. runtime.global.URIErrorPrototype = &_object{
  5599. runtime: runtime,
  5600. class: "URIError",
  5601. objectClass: _classObject,
  5602. prototype: runtime.global.ErrorPrototype,
  5603. extensible: true,
  5604. value: nil,
  5605. property: map[string]_property{
  5606. "name": _property{
  5607. mode: 0101,
  5608. value: Value{
  5609. kind: valueString,
  5610. value: "URIError",
  5611. },
  5612. },
  5613. },
  5614. propertyOrder: []string{
  5615. "name",
  5616. },
  5617. }
  5618. runtime.global.URIError = &_object{
  5619. runtime: runtime,
  5620. class: classFunction,
  5621. objectClass: _classObject,
  5622. prototype: runtime.global.FunctionPrototype,
  5623. extensible: true,
  5624. value: _nativeFunctionObject{
  5625. name: "URIError",
  5626. call: builtinURIError,
  5627. construct: builtinNewURIError,
  5628. },
  5629. property: map[string]_property{
  5630. propertyLength: _property{
  5631. mode: 0,
  5632. value: Value{
  5633. kind: valueNumber,
  5634. value: 1,
  5635. },
  5636. },
  5637. "prototype": _property{
  5638. mode: 0,
  5639. value: Value{
  5640. kind: valueObject,
  5641. value: runtime.global.URIErrorPrototype,
  5642. },
  5643. },
  5644. },
  5645. propertyOrder: []string{
  5646. propertyLength,
  5647. "prototype",
  5648. },
  5649. }
  5650. runtime.global.URIErrorPrototype.property["constructor"] =
  5651. _property{
  5652. mode: 0101,
  5653. value: Value{
  5654. kind: valueObject,
  5655. value: runtime.global.URIError,
  5656. },
  5657. }
  5658. }
  5659. {
  5660. parse_function := &_object{
  5661. runtime: runtime,
  5662. class: classFunction,
  5663. objectClass: _classObject,
  5664. prototype: runtime.global.FunctionPrototype,
  5665. extensible: true,
  5666. property: map[string]_property{
  5667. propertyLength: _property{
  5668. mode: 0,
  5669. value: Value{
  5670. kind: valueNumber,
  5671. value: 2,
  5672. },
  5673. },
  5674. },
  5675. propertyOrder: []string{
  5676. propertyLength,
  5677. },
  5678. value: _nativeFunctionObject{
  5679. name: "parse",
  5680. call: builtinJSON_parse,
  5681. },
  5682. }
  5683. stringify_function := &_object{
  5684. runtime: runtime,
  5685. class: classFunction,
  5686. objectClass: _classObject,
  5687. prototype: runtime.global.FunctionPrototype,
  5688. extensible: true,
  5689. property: map[string]_property{
  5690. propertyLength: _property{
  5691. mode: 0,
  5692. value: Value{
  5693. kind: valueNumber,
  5694. value: 3,
  5695. },
  5696. },
  5697. },
  5698. propertyOrder: []string{
  5699. propertyLength,
  5700. },
  5701. value: _nativeFunctionObject{
  5702. name: "stringify",
  5703. call: builtinJSON_stringify,
  5704. },
  5705. }
  5706. runtime.global.JSON = &_object{
  5707. runtime: runtime,
  5708. class: "JSON",
  5709. objectClass: _classObject,
  5710. prototype: runtime.global.ObjectPrototype,
  5711. extensible: true,
  5712. property: map[string]_property{
  5713. "parse": _property{
  5714. mode: 0101,
  5715. value: Value{
  5716. kind: valueObject,
  5717. value: parse_function,
  5718. },
  5719. },
  5720. "stringify": _property{
  5721. mode: 0101,
  5722. value: Value{
  5723. kind: valueObject,
  5724. value: stringify_function,
  5725. },
  5726. },
  5727. },
  5728. propertyOrder: []string{
  5729. "parse",
  5730. "stringify",
  5731. },
  5732. }
  5733. }
  5734. {
  5735. eval_function := &_object{
  5736. runtime: runtime,
  5737. class: classFunction,
  5738. objectClass: _classObject,
  5739. prototype: runtime.global.FunctionPrototype,
  5740. extensible: true,
  5741. property: map[string]_property{
  5742. propertyLength: _property{
  5743. mode: 0,
  5744. value: Value{
  5745. kind: valueNumber,
  5746. value: 1,
  5747. },
  5748. },
  5749. },
  5750. propertyOrder: []string{
  5751. propertyLength,
  5752. },
  5753. value: _nativeFunctionObject{
  5754. name: "eval",
  5755. call: builtinGlobal_eval,
  5756. },
  5757. }
  5758. parseInt_function := &_object{
  5759. runtime: runtime,
  5760. class: classFunction,
  5761. objectClass: _classObject,
  5762. prototype: runtime.global.FunctionPrototype,
  5763. extensible: true,
  5764. property: map[string]_property{
  5765. propertyLength: _property{
  5766. mode: 0,
  5767. value: Value{
  5768. kind: valueNumber,
  5769. value: 2,
  5770. },
  5771. },
  5772. },
  5773. propertyOrder: []string{
  5774. propertyLength,
  5775. },
  5776. value: _nativeFunctionObject{
  5777. name: "parseInt",
  5778. call: builtinGlobal_parseInt,
  5779. },
  5780. }
  5781. parseFloat_function := &_object{
  5782. runtime: runtime,
  5783. class: classFunction,
  5784. objectClass: _classObject,
  5785. prototype: runtime.global.FunctionPrototype,
  5786. extensible: true,
  5787. property: map[string]_property{
  5788. propertyLength: _property{
  5789. mode: 0,
  5790. value: Value{
  5791. kind: valueNumber,
  5792. value: 1,
  5793. },
  5794. },
  5795. },
  5796. propertyOrder: []string{
  5797. propertyLength,
  5798. },
  5799. value: _nativeFunctionObject{
  5800. name: "parseFloat",
  5801. call: builtinGlobal_parseFloat,
  5802. },
  5803. }
  5804. isNaN_function := &_object{
  5805. runtime: runtime,
  5806. class: classFunction,
  5807. objectClass: _classObject,
  5808. prototype: runtime.global.FunctionPrototype,
  5809. extensible: true,
  5810. property: map[string]_property{
  5811. propertyLength: _property{
  5812. mode: 0,
  5813. value: Value{
  5814. kind: valueNumber,
  5815. value: 1,
  5816. },
  5817. },
  5818. },
  5819. propertyOrder: []string{
  5820. propertyLength,
  5821. },
  5822. value: _nativeFunctionObject{
  5823. name: "isNaN",
  5824. call: builtinGlobal_isNaN,
  5825. },
  5826. }
  5827. isFinite_function := &_object{
  5828. runtime: runtime,
  5829. class: classFunction,
  5830. objectClass: _classObject,
  5831. prototype: runtime.global.FunctionPrototype,
  5832. extensible: true,
  5833. property: map[string]_property{
  5834. propertyLength: _property{
  5835. mode: 0,
  5836. value: Value{
  5837. kind: valueNumber,
  5838. value: 1,
  5839. },
  5840. },
  5841. },
  5842. propertyOrder: []string{
  5843. propertyLength,
  5844. },
  5845. value: _nativeFunctionObject{
  5846. name: "isFinite",
  5847. call: builtinGlobal_isFinite,
  5848. },
  5849. }
  5850. decodeURI_function := &_object{
  5851. runtime: runtime,
  5852. class: classFunction,
  5853. objectClass: _classObject,
  5854. prototype: runtime.global.FunctionPrototype,
  5855. extensible: true,
  5856. property: map[string]_property{
  5857. propertyLength: _property{
  5858. mode: 0,
  5859. value: Value{
  5860. kind: valueNumber,
  5861. value: 1,
  5862. },
  5863. },
  5864. },
  5865. propertyOrder: []string{
  5866. propertyLength,
  5867. },
  5868. value: _nativeFunctionObject{
  5869. name: "decodeURI",
  5870. call: builtinGlobal_decodeURI,
  5871. },
  5872. }
  5873. decodeURIComponent_function := &_object{
  5874. runtime: runtime,
  5875. class: classFunction,
  5876. objectClass: _classObject,
  5877. prototype: runtime.global.FunctionPrototype,
  5878. extensible: true,
  5879. property: map[string]_property{
  5880. propertyLength: _property{
  5881. mode: 0,
  5882. value: Value{
  5883. kind: valueNumber,
  5884. value: 1,
  5885. },
  5886. },
  5887. },
  5888. propertyOrder: []string{
  5889. propertyLength,
  5890. },
  5891. value: _nativeFunctionObject{
  5892. name: "decodeURIComponent",
  5893. call: builtinGlobal_decodeURIComponent,
  5894. },
  5895. }
  5896. encodeURI_function := &_object{
  5897. runtime: runtime,
  5898. class: classFunction,
  5899. objectClass: _classObject,
  5900. prototype: runtime.global.FunctionPrototype,
  5901. extensible: true,
  5902. property: map[string]_property{
  5903. propertyLength: _property{
  5904. mode: 0,
  5905. value: Value{
  5906. kind: valueNumber,
  5907. value: 1,
  5908. },
  5909. },
  5910. },
  5911. propertyOrder: []string{
  5912. propertyLength,
  5913. },
  5914. value: _nativeFunctionObject{
  5915. name: "encodeURI",
  5916. call: builtinGlobal_encodeURI,
  5917. },
  5918. }
  5919. encodeURIComponent_function := &_object{
  5920. runtime: runtime,
  5921. class: classFunction,
  5922. objectClass: _classObject,
  5923. prototype: runtime.global.FunctionPrototype,
  5924. extensible: true,
  5925. property: map[string]_property{
  5926. propertyLength: _property{
  5927. mode: 0,
  5928. value: Value{
  5929. kind: valueNumber,
  5930. value: 1,
  5931. },
  5932. },
  5933. },
  5934. propertyOrder: []string{
  5935. propertyLength,
  5936. },
  5937. value: _nativeFunctionObject{
  5938. name: "encodeURIComponent",
  5939. call: builtinGlobal_encodeURIComponent,
  5940. },
  5941. }
  5942. escape_function := &_object{
  5943. runtime: runtime,
  5944. class: classFunction,
  5945. objectClass: _classObject,
  5946. prototype: runtime.global.FunctionPrototype,
  5947. extensible: true,
  5948. property: map[string]_property{
  5949. propertyLength: _property{
  5950. mode: 0,
  5951. value: Value{
  5952. kind: valueNumber,
  5953. value: 1,
  5954. },
  5955. },
  5956. },
  5957. propertyOrder: []string{
  5958. propertyLength,
  5959. },
  5960. value: _nativeFunctionObject{
  5961. name: "escape",
  5962. call: builtinGlobal_escape,
  5963. },
  5964. }
  5965. unescape_function := &_object{
  5966. runtime: runtime,
  5967. class: classFunction,
  5968. objectClass: _classObject,
  5969. prototype: runtime.global.FunctionPrototype,
  5970. extensible: true,
  5971. property: map[string]_property{
  5972. propertyLength: _property{
  5973. mode: 0,
  5974. value: Value{
  5975. kind: valueNumber,
  5976. value: 1,
  5977. },
  5978. },
  5979. },
  5980. propertyOrder: []string{
  5981. propertyLength,
  5982. },
  5983. value: _nativeFunctionObject{
  5984. name: "unescape",
  5985. call: builtinGlobal_unescape,
  5986. },
  5987. }
  5988. runtime.globalObject.property = map[string]_property{
  5989. "eval": _property{
  5990. mode: 0101,
  5991. value: Value{
  5992. kind: valueObject,
  5993. value: eval_function,
  5994. },
  5995. },
  5996. "parseInt": _property{
  5997. mode: 0101,
  5998. value: Value{
  5999. kind: valueObject,
  6000. value: parseInt_function,
  6001. },
  6002. },
  6003. "parseFloat": _property{
  6004. mode: 0101,
  6005. value: Value{
  6006. kind: valueObject,
  6007. value: parseFloat_function,
  6008. },
  6009. },
  6010. "isNaN": _property{
  6011. mode: 0101,
  6012. value: Value{
  6013. kind: valueObject,
  6014. value: isNaN_function,
  6015. },
  6016. },
  6017. "isFinite": _property{
  6018. mode: 0101,
  6019. value: Value{
  6020. kind: valueObject,
  6021. value: isFinite_function,
  6022. },
  6023. },
  6024. "decodeURI": _property{
  6025. mode: 0101,
  6026. value: Value{
  6027. kind: valueObject,
  6028. value: decodeURI_function,
  6029. },
  6030. },
  6031. "decodeURIComponent": _property{
  6032. mode: 0101,
  6033. value: Value{
  6034. kind: valueObject,
  6035. value: decodeURIComponent_function,
  6036. },
  6037. },
  6038. "encodeURI": _property{
  6039. mode: 0101,
  6040. value: Value{
  6041. kind: valueObject,
  6042. value: encodeURI_function,
  6043. },
  6044. },
  6045. "encodeURIComponent": _property{
  6046. mode: 0101,
  6047. value: Value{
  6048. kind: valueObject,
  6049. value: encodeURIComponent_function,
  6050. },
  6051. },
  6052. "escape": _property{
  6053. mode: 0101,
  6054. value: Value{
  6055. kind: valueObject,
  6056. value: escape_function,
  6057. },
  6058. },
  6059. "unescape": _property{
  6060. mode: 0101,
  6061. value: Value{
  6062. kind: valueObject,
  6063. value: unescape_function,
  6064. },
  6065. },
  6066. classObject: _property{
  6067. mode: 0101,
  6068. value: Value{
  6069. kind: valueObject,
  6070. value: runtime.global.Object,
  6071. },
  6072. },
  6073. classFunction: _property{
  6074. mode: 0101,
  6075. value: Value{
  6076. kind: valueObject,
  6077. value: runtime.global.Function,
  6078. },
  6079. },
  6080. classArray: _property{
  6081. mode: 0101,
  6082. value: Value{
  6083. kind: valueObject,
  6084. value: runtime.global.Array,
  6085. },
  6086. },
  6087. classString: _property{
  6088. mode: 0101,
  6089. value: Value{
  6090. kind: valueObject,
  6091. value: runtime.global.String,
  6092. },
  6093. },
  6094. classBoolean: _property{
  6095. mode: 0101,
  6096. value: Value{
  6097. kind: valueObject,
  6098. value: runtime.global.Boolean,
  6099. },
  6100. },
  6101. classNumber: _property{
  6102. mode: 0101,
  6103. value: Value{
  6104. kind: valueObject,
  6105. value: runtime.global.Number,
  6106. },
  6107. },
  6108. "Math": _property{
  6109. mode: 0101,
  6110. value: Value{
  6111. kind: valueObject,
  6112. value: runtime.global.Math,
  6113. },
  6114. },
  6115. classDate: _property{
  6116. mode: 0101,
  6117. value: Value{
  6118. kind: valueObject,
  6119. value: runtime.global.Date,
  6120. },
  6121. },
  6122. classRegExp: _property{
  6123. mode: 0101,
  6124. value: Value{
  6125. kind: valueObject,
  6126. value: runtime.global.RegExp,
  6127. },
  6128. },
  6129. classError: _property{
  6130. mode: 0101,
  6131. value: Value{
  6132. kind: valueObject,
  6133. value: runtime.global.Error,
  6134. },
  6135. },
  6136. "EvalError": _property{
  6137. mode: 0101,
  6138. value: Value{
  6139. kind: valueObject,
  6140. value: runtime.global.EvalError,
  6141. },
  6142. },
  6143. "TypeError": _property{
  6144. mode: 0101,
  6145. value: Value{
  6146. kind: valueObject,
  6147. value: runtime.global.TypeError,
  6148. },
  6149. },
  6150. "RangeError": _property{
  6151. mode: 0101,
  6152. value: Value{
  6153. kind: valueObject,
  6154. value: runtime.global.RangeError,
  6155. },
  6156. },
  6157. "ReferenceError": _property{
  6158. mode: 0101,
  6159. value: Value{
  6160. kind: valueObject,
  6161. value: runtime.global.ReferenceError,
  6162. },
  6163. },
  6164. "SyntaxError": _property{
  6165. mode: 0101,
  6166. value: Value{
  6167. kind: valueObject,
  6168. value: runtime.global.SyntaxError,
  6169. },
  6170. },
  6171. "URIError": _property{
  6172. mode: 0101,
  6173. value: Value{
  6174. kind: valueObject,
  6175. value: runtime.global.URIError,
  6176. },
  6177. },
  6178. "JSON": _property{
  6179. mode: 0101,
  6180. value: Value{
  6181. kind: valueObject,
  6182. value: runtime.global.JSON,
  6183. },
  6184. },
  6185. "undefined": _property{
  6186. mode: 0,
  6187. value: Value{
  6188. kind: valueUndefined,
  6189. },
  6190. },
  6191. "NaN": _property{
  6192. mode: 0,
  6193. value: Value{
  6194. kind: valueNumber,
  6195. value: math.NaN(),
  6196. },
  6197. },
  6198. "Infinity": _property{
  6199. mode: 0,
  6200. value: Value{
  6201. kind: valueNumber,
  6202. value: math.Inf(+1),
  6203. },
  6204. },
  6205. }
  6206. runtime.globalObject.propertyOrder = []string{
  6207. "eval",
  6208. "parseInt",
  6209. "parseFloat",
  6210. "isNaN",
  6211. "isFinite",
  6212. "decodeURI",
  6213. "decodeURIComponent",
  6214. "encodeURI",
  6215. "encodeURIComponent",
  6216. "escape",
  6217. "unescape",
  6218. classObject,
  6219. classFunction,
  6220. classArray,
  6221. classString,
  6222. classBoolean,
  6223. classNumber,
  6224. "Math",
  6225. classDate,
  6226. classRegExp,
  6227. classError,
  6228. "EvalError",
  6229. "TypeError",
  6230. "RangeError",
  6231. "ReferenceError",
  6232. "SyntaxError",
  6233. "URIError",
  6234. "JSON",
  6235. "undefined",
  6236. "NaN",
  6237. "Infinity",
  6238. }
  6239. }
  6240. }
  6241. func newConsoleObject(runtime *_runtime) *_object {
  6242. {
  6243. log_function := &_object{
  6244. runtime: runtime,
  6245. class: classFunction,
  6246. objectClass: _classObject,
  6247. prototype: runtime.global.FunctionPrototype,
  6248. extensible: true,
  6249. property: map[string]_property{
  6250. propertyLength: _property{
  6251. mode: 0,
  6252. value: Value{
  6253. kind: valueNumber,
  6254. value: 0,
  6255. },
  6256. },
  6257. },
  6258. propertyOrder: []string{
  6259. propertyLength,
  6260. },
  6261. value: _nativeFunctionObject{
  6262. name: "log",
  6263. call: builtinConsole_log,
  6264. },
  6265. }
  6266. debug_function := &_object{
  6267. runtime: runtime,
  6268. class: classFunction,
  6269. objectClass: _classObject,
  6270. prototype: runtime.global.FunctionPrototype,
  6271. extensible: true,
  6272. property: map[string]_property{
  6273. propertyLength: _property{
  6274. mode: 0,
  6275. value: Value{
  6276. kind: valueNumber,
  6277. value: 0,
  6278. },
  6279. },
  6280. },
  6281. propertyOrder: []string{
  6282. propertyLength,
  6283. },
  6284. value: _nativeFunctionObject{
  6285. name: "debug",
  6286. call: builtinConsole_log,
  6287. },
  6288. }
  6289. info_function := &_object{
  6290. runtime: runtime,
  6291. class: classFunction,
  6292. objectClass: _classObject,
  6293. prototype: runtime.global.FunctionPrototype,
  6294. extensible: true,
  6295. property: map[string]_property{
  6296. propertyLength: _property{
  6297. mode: 0,
  6298. value: Value{
  6299. kind: valueNumber,
  6300. value: 0,
  6301. },
  6302. },
  6303. },
  6304. propertyOrder: []string{
  6305. propertyLength,
  6306. },
  6307. value: _nativeFunctionObject{
  6308. name: "info",
  6309. call: builtinConsole_log,
  6310. },
  6311. }
  6312. error_function := &_object{
  6313. runtime: runtime,
  6314. class: classFunction,
  6315. objectClass: _classObject,
  6316. prototype: runtime.global.FunctionPrototype,
  6317. extensible: true,
  6318. property: map[string]_property{
  6319. propertyLength: _property{
  6320. mode: 0,
  6321. value: Value{
  6322. kind: valueNumber,
  6323. value: 0,
  6324. },
  6325. },
  6326. },
  6327. propertyOrder: []string{
  6328. propertyLength,
  6329. },
  6330. value: _nativeFunctionObject{
  6331. name: "error",
  6332. call: builtinConsole_error,
  6333. },
  6334. }
  6335. warn_function := &_object{
  6336. runtime: runtime,
  6337. class: classFunction,
  6338. objectClass: _classObject,
  6339. prototype: runtime.global.FunctionPrototype,
  6340. extensible: true,
  6341. property: map[string]_property{
  6342. propertyLength: _property{
  6343. mode: 0,
  6344. value: Value{
  6345. kind: valueNumber,
  6346. value: 0,
  6347. },
  6348. },
  6349. },
  6350. propertyOrder: []string{
  6351. propertyLength,
  6352. },
  6353. value: _nativeFunctionObject{
  6354. name: "warn",
  6355. call: builtinConsole_error,
  6356. },
  6357. }
  6358. dir_function := &_object{
  6359. runtime: runtime,
  6360. class: classFunction,
  6361. objectClass: _classObject,
  6362. prototype: runtime.global.FunctionPrototype,
  6363. extensible: true,
  6364. property: map[string]_property{
  6365. propertyLength: _property{
  6366. mode: 0,
  6367. value: Value{
  6368. kind: valueNumber,
  6369. value: 0,
  6370. },
  6371. },
  6372. },
  6373. propertyOrder: []string{
  6374. propertyLength,
  6375. },
  6376. value: _nativeFunctionObject{
  6377. name: "dir",
  6378. call: builtinConsole_dir,
  6379. },
  6380. }
  6381. time_function := &_object{
  6382. runtime: runtime,
  6383. class: classFunction,
  6384. objectClass: _classObject,
  6385. prototype: runtime.global.FunctionPrototype,
  6386. extensible: true,
  6387. property: map[string]_property{
  6388. propertyLength: _property{
  6389. mode: 0,
  6390. value: Value{
  6391. kind: valueNumber,
  6392. value: 0,
  6393. },
  6394. },
  6395. },
  6396. propertyOrder: []string{
  6397. propertyLength,
  6398. },
  6399. value: _nativeFunctionObject{
  6400. name: "time",
  6401. call: builtinConsole_time,
  6402. },
  6403. }
  6404. timeEnd_function := &_object{
  6405. runtime: runtime,
  6406. class: classFunction,
  6407. objectClass: _classObject,
  6408. prototype: runtime.global.FunctionPrototype,
  6409. extensible: true,
  6410. property: map[string]_property{
  6411. propertyLength: _property{
  6412. mode: 0,
  6413. value: Value{
  6414. kind: valueNumber,
  6415. value: 0,
  6416. },
  6417. },
  6418. },
  6419. propertyOrder: []string{
  6420. propertyLength,
  6421. },
  6422. value: _nativeFunctionObject{
  6423. name: "timeEnd",
  6424. call: builtinConsole_timeEnd,
  6425. },
  6426. }
  6427. trace_function := &_object{
  6428. runtime: runtime,
  6429. class: classFunction,
  6430. objectClass: _classObject,
  6431. prototype: runtime.global.FunctionPrototype,
  6432. extensible: true,
  6433. property: map[string]_property{
  6434. propertyLength: _property{
  6435. mode: 0,
  6436. value: Value{
  6437. kind: valueNumber,
  6438. value: 0,
  6439. },
  6440. },
  6441. },
  6442. propertyOrder: []string{
  6443. propertyLength,
  6444. },
  6445. value: _nativeFunctionObject{
  6446. name: "trace",
  6447. call: builtinConsole_trace,
  6448. },
  6449. }
  6450. assert_function := &_object{
  6451. runtime: runtime,
  6452. class: classFunction,
  6453. objectClass: _classObject,
  6454. prototype: runtime.global.FunctionPrototype,
  6455. extensible: true,
  6456. property: map[string]_property{
  6457. propertyLength: _property{
  6458. mode: 0,
  6459. value: Value{
  6460. kind: valueNumber,
  6461. value: 0,
  6462. },
  6463. },
  6464. },
  6465. propertyOrder: []string{
  6466. propertyLength,
  6467. },
  6468. value: _nativeFunctionObject{
  6469. name: "assert",
  6470. call: builtinConsole_assert,
  6471. },
  6472. }
  6473. return &_object{
  6474. runtime: runtime,
  6475. class: classObject,
  6476. objectClass: _classObject,
  6477. prototype: runtime.global.ObjectPrototype,
  6478. extensible: true,
  6479. property: map[string]_property{
  6480. "log": _property{
  6481. mode: 0101,
  6482. value: Value{
  6483. kind: valueObject,
  6484. value: log_function,
  6485. },
  6486. },
  6487. "debug": _property{
  6488. mode: 0101,
  6489. value: Value{
  6490. kind: valueObject,
  6491. value: debug_function,
  6492. },
  6493. },
  6494. "info": _property{
  6495. mode: 0101,
  6496. value: Value{
  6497. kind: valueObject,
  6498. value: info_function,
  6499. },
  6500. },
  6501. "error": _property{
  6502. mode: 0101,
  6503. value: Value{
  6504. kind: valueObject,
  6505. value: error_function,
  6506. },
  6507. },
  6508. "warn": _property{
  6509. mode: 0101,
  6510. value: Value{
  6511. kind: valueObject,
  6512. value: warn_function,
  6513. },
  6514. },
  6515. "dir": _property{
  6516. mode: 0101,
  6517. value: Value{
  6518. kind: valueObject,
  6519. value: dir_function,
  6520. },
  6521. },
  6522. "time": _property{
  6523. mode: 0101,
  6524. value: Value{
  6525. kind: valueObject,
  6526. value: time_function,
  6527. },
  6528. },
  6529. "timeEnd": _property{
  6530. mode: 0101,
  6531. value: Value{
  6532. kind: valueObject,
  6533. value: timeEnd_function,
  6534. },
  6535. },
  6536. "trace": _property{
  6537. mode: 0101,
  6538. value: Value{
  6539. kind: valueObject,
  6540. value: trace_function,
  6541. },
  6542. },
  6543. "assert": _property{
  6544. mode: 0101,
  6545. value: Value{
  6546. kind: valueObject,
  6547. value: assert_function,
  6548. },
  6549. },
  6550. },
  6551. propertyOrder: []string{
  6552. "log",
  6553. "debug",
  6554. "info",
  6555. "error",
  6556. "warn",
  6557. "dir",
  6558. "time",
  6559. "timeEnd",
  6560. "trace",
  6561. "assert",
  6562. },
  6563. }
  6564. }
  6565. }
  6566. func toValue_int(value int) Value {
  6567. return Value{
  6568. kind: valueNumber,
  6569. value: value,
  6570. }
  6571. }
  6572. func toValue_int32(value int32) Value {
  6573. return Value{
  6574. kind: valueNumber,
  6575. value: value,
  6576. }
  6577. }
  6578. func toValue_int64(value int64) Value {
  6579. return Value{
  6580. kind: valueNumber,
  6581. value: value,
  6582. }
  6583. }
  6584. func toValue_uint16(value uint16) Value {
  6585. return Value{
  6586. kind: valueNumber,
  6587. value: value,
  6588. }
  6589. }
  6590. func toValue_uint32(value uint32) Value {
  6591. return Value{
  6592. kind: valueNumber,
  6593. value: value,
  6594. }
  6595. }
  6596. func toValue_float64(value float64) Value {
  6597. return Value{
  6598. kind: valueNumber,
  6599. value: value,
  6600. }
  6601. }
  6602. func toValue_string(value string) Value {
  6603. return Value{
  6604. kind: valueString,
  6605. value: value,
  6606. }
  6607. }
  6608. func toValue_string16(value []uint16) Value {
  6609. return Value{
  6610. kind: valueString,
  6611. value: value,
  6612. }
  6613. }
  6614. func toValue_bool(value bool) Value {
  6615. return Value{
  6616. kind: valueBoolean,
  6617. value: value,
  6618. }
  6619. }
  6620. func toValue_object(value *_object) Value {
  6621. return Value{
  6622. kind: valueObject,
  6623. value: value,
  6624. }
  6625. }