Kernel.js 311 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279
  1. smalltalk.addPackage('Kernel', {});
  2. smalltalk.addClass('Object', smalltalk.nil, [], 'Kernel');
  3. smalltalk.addMethod(
  4. unescape('__eq'),
  5. smalltalk.method({
  6. selector: unescape('%3D'),
  7. category: 'comparing',
  8. fn: function (anObject){
  9. var self=this;
  10. return smalltalk.send(self, "__eq_eq", [anObject]);
  11. return self;},
  12. args: ["anObject"],
  13. source: unescape('%3D%20anObject%0A%09%5Eself%20%3D%3D%20anObject'),
  14. messageSends: [unescape("%3D%3D")],
  15. referencedClasses: []
  16. }),
  17. smalltalk.Object);
  18. smalltalk.addMethod(
  19. unescape('_%7E_eq'),
  20. smalltalk.method({
  21. selector: unescape('%7E%3D'),
  22. category: 'comparing',
  23. fn: function (anObject){
  24. var self=this;
  25. return smalltalk.send(smalltalk.send(self, "__eq", [anObject]), "__eq", [false]);
  26. return self;},
  27. args: ["anObject"],
  28. source: unescape('%7E%3D%20anObject%0A%09%5E%28self%20%3D%20anObject%29%20%3D%20false'),
  29. messageSends: [unescape("%3D")],
  30. referencedClasses: []
  31. }),
  32. smalltalk.Object);
  33. smalltalk.addMethod(
  34. unescape('_initialize'),
  35. smalltalk.method({
  36. selector: unescape('initialize'),
  37. category: 'initialization',
  38. fn: function (){
  39. var self=this;
  40. return self;},
  41. args: [],
  42. source: unescape('initialize'),
  43. messageSends: [],
  44. referencedClasses: []
  45. }),
  46. smalltalk.Object);
  47. smalltalk.addMethod(
  48. unescape('_yourself'),
  49. smalltalk.method({
  50. selector: unescape('yourself'),
  51. category: 'accessing',
  52. fn: function (){
  53. var self=this;
  54. return self;
  55. return self;},
  56. args: [],
  57. source: unescape('yourself%0A%09%5Eself'),
  58. messageSends: [],
  59. referencedClasses: []
  60. }),
  61. smalltalk.Object);
  62. smalltalk.addMethod(
  63. unescape('_class'),
  64. smalltalk.method({
  65. selector: unescape('class'),
  66. category: 'accessing',
  67. fn: function (){
  68. var self=this;
  69. return self.klass;
  70. return self;},
  71. args: [],
  72. source: unescape('class%0A%09%3Creturn%20self.klass%3E'),
  73. messageSends: [],
  74. referencedClasses: []
  75. }),
  76. smalltalk.Object);
  77. smalltalk.addMethod(
  78. unescape('_size'),
  79. smalltalk.method({
  80. selector: unescape('size'),
  81. category: 'accessing',
  82. fn: function (){
  83. var self=this;
  84. smalltalk.send(self, "_error_", ["Object not indexable"]);
  85. return self;},
  86. args: [],
  87. source: unescape('size%0A%09self%20error%3A%20%27Object%20not%20indexable%27'),
  88. messageSends: ["error:"],
  89. referencedClasses: []
  90. }),
  91. smalltalk.Object);
  92. smalltalk.addMethod(
  93. unescape('_copy'),
  94. smalltalk.method({
  95. selector: unescape('copy'),
  96. category: 'copying',
  97. fn: function (){
  98. var self=this;
  99. return smalltalk.send(smalltalk.send(self, "_shallowCopy", []), "_postCopy", []);
  100. return self;},
  101. args: [],
  102. source: unescape('copy%0A%09%5Eself%20shallowCopy%20postCopy'),
  103. messageSends: ["postCopy", "shallowCopy"],
  104. referencedClasses: []
  105. }),
  106. smalltalk.Object);
  107. smalltalk.addMethod(
  108. unescape('_shallowCopy'),
  109. smalltalk.method({
  110. selector: unescape('shallowCopy'),
  111. category: 'copying',
  112. fn: function (){
  113. var self=this;
  114. var copy = self.klass._new();
  115. for(var i in self) {
  116. if(/^@.+/.test(i)) {
  117. copy[i] = self[i];
  118. }
  119. }
  120. return copy;
  121. ;
  122. return self;},
  123. args: [],
  124. source: unescape('shallowCopy%0A%09%3C%0A%09%20%20%20%20var%20copy%20%3D%20self.klass._new%28%29%3B%0A%09%20%20%20%20for%28var%20i%20in%20self%29%20%7B%0A%09%09if%28/%5E@.+/.test%28i%29%29%20%7B%0A%09%09%20%20%20%20copy%5Bi%5D%20%3D%20self%5Bi%5D%3B%0A%09%09%7D%0A%09%20%20%20%20%7D%0A%09%20%20%20%20return%20copy%3B%0A%09%3E'),
  125. messageSends: [],
  126. referencedClasses: []
  127. }),
  128. smalltalk.Object);
  129. smalltalk.addMethod(
  130. unescape('_deepCopy'),
  131. smalltalk.method({
  132. selector: unescape('deepCopy'),
  133. category: 'copying',
  134. fn: function (){
  135. var self=this;
  136. var copy = self.klass._new();
  137. for(var i in self) {
  138. if(/^@.+/.test(i)) {
  139. copy[i] = self[i]._deepCopy();
  140. }
  141. }
  142. return copy;
  143. ;
  144. return self;},
  145. args: [],
  146. source: unescape('deepCopy%0A%09%3C%20%20%20%20%0A%09%20%20%20%20var%20copy%20%3D%20self.klass._new%28%29%3B%0A%09%20%20%20%20for%28var%20i%20in%20self%29%20%7B%0A%09%09if%28/%5E@.+/.test%28i%29%29%20%7B%0A%09%09%20%20%20%20copy%5Bi%5D%20%3D%20self%5Bi%5D._deepCopy%28%29%3B%0A%09%09%7D%0A%09%20%20%20%20%7D%0A%09%20%20%20%20return%20copy%3B%0A%09%3E'),
  147. messageSends: [],
  148. referencedClasses: []
  149. }),
  150. smalltalk.Object);
  151. smalltalk.addMethod(
  152. unescape('_postCopy'),
  153. smalltalk.method({
  154. selector: unescape('postCopy'),
  155. category: 'copying',
  156. fn: function (){
  157. var self=this;
  158. return self;},
  159. args: [],
  160. source: unescape('postCopy'),
  161. messageSends: [],
  162. referencedClasses: []
  163. }),
  164. smalltalk.Object);
  165. smalltalk.addMethod(
  166. unescape('__minus_gt'),
  167. smalltalk.method({
  168. selector: unescape('-%3E'),
  169. category: 'converting',
  170. fn: function (anObject){
  171. var self=this;
  172. return smalltalk.send((smalltalk.Association || Association), "_key_value_", [self, anObject]);
  173. return self;},
  174. args: ["anObject"],
  175. source: unescape('-%3E%20anObject%0A%09%5EAssociation%20key%3A%20self%20value%3A%20anObject'),
  176. messageSends: ["key:value:"],
  177. referencedClasses: ["Association"]
  178. }),
  179. smalltalk.Object);
  180. smalltalk.addMethod(
  181. unescape('_asString'),
  182. smalltalk.method({
  183. selector: unescape('asString'),
  184. category: 'converting',
  185. fn: function (){
  186. var self=this;
  187. return smalltalk.send(self, "_printString", []);
  188. return self;},
  189. args: [],
  190. source: unescape('asString%0A%09%5Eself%20printString'),
  191. messageSends: ["printString"],
  192. referencedClasses: []
  193. }),
  194. smalltalk.Object);
  195. smalltalk.addMethod(
  196. unescape('_asJavascript'),
  197. smalltalk.method({
  198. selector: unescape('asJavascript'),
  199. category: 'converting',
  200. fn: function (){
  201. var self=this;
  202. return smalltalk.send(self, "_asString", []);
  203. return self;},
  204. args: [],
  205. source: unescape('asJavascript%0A%09%5Eself%20asString'),
  206. messageSends: ["asString"],
  207. referencedClasses: []
  208. }),
  209. smalltalk.Object);
  210. smalltalk.addMethod(
  211. unescape('_perform_'),
  212. smalltalk.method({
  213. selector: unescape('perform%3A'),
  214. category: 'message handling',
  215. fn: function (aSymbol){
  216. var self=this;
  217. return smalltalk.send(self, "_perform_withArguments_", [aSymbol, []]);
  218. return self;},
  219. args: ["aSymbol"],
  220. source: unescape('perform%3A%20aSymbol%0A%09%5Eself%20perform%3A%20aSymbol%20withArguments%3A%20%23%28%29'),
  221. messageSends: ["perform:withArguments:"],
  222. referencedClasses: []
  223. }),
  224. smalltalk.Object);
  225. smalltalk.addMethod(
  226. unescape('_perform_withArguments_'),
  227. smalltalk.method({
  228. selector: unescape('perform%3AwithArguments%3A'),
  229. category: 'message handling',
  230. fn: function (aSymbol, aCollection){
  231. var self=this;
  232. return smalltalk.send(self, "_basicPerform_withArguments_", [smalltalk.send(aSymbol, "_asSelector", []), aCollection]);
  233. return self;},
  234. args: ["aSymbol", "aCollection"],
  235. source: unescape('perform%3A%20aSymbol%20withArguments%3A%20aCollection%0A%09%5Eself%20basicPerform%3A%20aSymbol%20asSelector%20withArguments%3A%20aCollection'),
  236. messageSends: ["basicPerform:withArguments:", "asSelector"],
  237. referencedClasses: []
  238. }),
  239. smalltalk.Object);
  240. smalltalk.addMethod(
  241. unescape('_instVarAt_'),
  242. smalltalk.method({
  243. selector: unescape('instVarAt%3A'),
  244. category: 'accessing',
  245. fn: function (aString){
  246. var self=this;
  247. return self['@'+aString];
  248. return self;},
  249. args: ["aString"],
  250. source: unescape('instVarAt%3A%20aString%0A%09%3Creturn%20self%5B%27@%27+aString%5D%3E'),
  251. messageSends: [],
  252. referencedClasses: []
  253. }),
  254. smalltalk.Object);
  255. smalltalk.addMethod(
  256. unescape('_instVarAt_put_'),
  257. smalltalk.method({
  258. selector: unescape('instVarAt%3Aput%3A'),
  259. category: 'accessing',
  260. fn: function (aString, anObject){
  261. var self=this;
  262. self['@' + aString] = anObject;
  263. return self;},
  264. args: ["aString", "anObject"],
  265. source: unescape('instVarAt%3A%20aString%20put%3A%20anObject%0A%09%3Cself%5B%27@%27%20+%20aString%5D%20%3D%20anObject%3E'),
  266. messageSends: [],
  267. referencedClasses: []
  268. }),
  269. smalltalk.Object);
  270. smalltalk.addMethod(
  271. unescape('_basicAt_'),
  272. smalltalk.method({
  273. selector: unescape('basicAt%3A'),
  274. category: 'accessing',
  275. fn: function (aString){
  276. var self=this;
  277. return self[aString];
  278. return self;},
  279. args: ["aString"],
  280. source: unescape('basicAt%3A%20aString%0A%09%3Creturn%20self%5BaString%5D%3E'),
  281. messageSends: [],
  282. referencedClasses: []
  283. }),
  284. smalltalk.Object);
  285. smalltalk.addMethod(
  286. unescape('_basicAt_put_'),
  287. smalltalk.method({
  288. selector: unescape('basicAt%3Aput%3A'),
  289. category: 'accessing',
  290. fn: function (aString, anObject){
  291. var self=this;
  292. return self[aString] = anObject;
  293. return self;},
  294. args: ["aString", "anObject"],
  295. source: unescape('basicAt%3A%20aString%20put%3A%20anObject%0A%09%3Creturn%20self%5BaString%5D%20%3D%20anObject%3E'),
  296. messageSends: [],
  297. referencedClasses: []
  298. }),
  299. smalltalk.Object);
  300. smalltalk.addMethod(
  301. unescape('_error_'),
  302. smalltalk.method({
  303. selector: unescape('error%3A'),
  304. category: 'error handling',
  305. fn: function (aString){
  306. var self=this;
  307. smalltalk.send((smalltalk.Error || Error), "_signal_", [aString]);
  308. return self;},
  309. args: ["aString"],
  310. source: unescape('error%3A%20aString%0A%09Error%20signal%3A%20aString'),
  311. messageSends: ["signal:"],
  312. referencedClasses: ["Error"]
  313. }),
  314. smalltalk.Object);
  315. smalltalk.addMethod(
  316. unescape('_subclassResponsibility'),
  317. smalltalk.method({
  318. selector: unescape('subclassResponsibility'),
  319. category: 'error handling',
  320. fn: function (){
  321. var self=this;
  322. smalltalk.send(self, "_error_", ["This method is a responsibility of a subclass"]);
  323. return self;},
  324. args: [],
  325. source: unescape('subclassResponsibility%0A%09self%20error%3A%20%27This%20method%20is%20a%20responsibility%20of%20a%20subclass%27'),
  326. messageSends: ["error:"],
  327. referencedClasses: []
  328. }),
  329. smalltalk.Object);
  330. smalltalk.addMethod(
  331. unescape('_shouldNotImplement'),
  332. smalltalk.method({
  333. selector: unescape('shouldNotImplement'),
  334. category: 'error handling',
  335. fn: function (){
  336. var self=this;
  337. smalltalk.send(self, "_error_", [smalltalk.send("This method should not be implemented in ", "__comma", [smalltalk.send(smalltalk.send(self, "_class", []), "_name", [])])]);
  338. return self;},
  339. args: [],
  340. source: unescape('shouldNotImplement%0A%09self%20error%3A%20%27This%20method%20should%20not%20be%20implemented%20in%20%27%2C%20self%20class%20name'),
  341. messageSends: ["error:", unescape("%2C"), "name", "class"],
  342. referencedClasses: []
  343. }),
  344. smalltalk.Object);
  345. smalltalk.addMethod(
  346. unescape('_try_catch_'),
  347. smalltalk.method({
  348. selector: unescape('try%3Acatch%3A'),
  349. category: 'error handling',
  350. fn: function (aBlock, anotherBlock){
  351. var self=this;
  352. try{aBlock()} catch(e) {anotherBlock(e)};
  353. return self;},
  354. args: ["aBlock", "anotherBlock"],
  355. source: unescape('try%3A%20aBlock%20catch%3A%20anotherBlock%0A%09%3Ctry%7BaBlock%28%29%7D%20catch%28e%29%20%7BanotherBlock%28e%29%7D%3E'),
  356. messageSends: [],
  357. referencedClasses: []
  358. }),
  359. smalltalk.Object);
  360. smalltalk.addMethod(
  361. unescape('_printString'),
  362. smalltalk.method({
  363. selector: unescape('printString'),
  364. category: 'printing',
  365. fn: function (){
  366. var self=this;
  367. return smalltalk.send("a ", "__comma", [smalltalk.send(smalltalk.send(self, "_class", []), "_name", [])]);
  368. return self;},
  369. args: [],
  370. source: unescape('printString%0A%09%5E%27a%20%27%2C%20self%20class%20name'),
  371. messageSends: [unescape("%2C"), "name", "class"],
  372. referencedClasses: []
  373. }),
  374. smalltalk.Object);
  375. smalltalk.addMethod(
  376. unescape('_printNl'),
  377. smalltalk.method({
  378. selector: unescape('printNl'),
  379. category: 'printing',
  380. fn: function (){
  381. var self=this;
  382. console.log(self);
  383. return self;},
  384. args: [],
  385. source: unescape('printNl%0A%09%3Cconsole.log%28self%29%3E'),
  386. messageSends: [],
  387. referencedClasses: []
  388. }),
  389. smalltalk.Object);
  390. smalltalk.addMethod(
  391. unescape('_isKindOf_'),
  392. smalltalk.method({
  393. selector: unescape('isKindOf%3A'),
  394. category: 'testing',
  395. fn: function (aClass){
  396. var self=this;
  397. return ((($receiver = smalltalk.send(self, "_isMemberOf_", [aClass])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return true;})() : (function(){return smalltalk.send(smalltalk.send(self, "_class", []), "_inheritsFrom_", [aClass]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return true;}), (function(){return smalltalk.send(smalltalk.send(self, "_class", []), "_inheritsFrom_", [aClass]);})]));
  398. return self;},
  399. args: ["aClass"],
  400. source: unescape('isKindOf%3A%20aClass%0A%09%5E%28self%20isMemberOf%3A%20aClass%29%0A%09%20%20%20%20ifTrue%3A%20%5Btrue%5D%0A%09%20%20%20%20ifFalse%3A%20%5Bself%20class%20inheritsFrom%3A%20aClass%5D'),
  401. messageSends: ["ifTrue:ifFalse:", "isMemberOf:", "inheritsFrom:", "class"],
  402. referencedClasses: []
  403. }),
  404. smalltalk.Object);
  405. smalltalk.addMethod(
  406. unescape('_isMemberOf_'),
  407. smalltalk.method({
  408. selector: unescape('isMemberOf%3A'),
  409. category: 'testing',
  410. fn: function (aClass){
  411. var self=this;
  412. return smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [aClass]);
  413. return self;},
  414. args: ["aClass"],
  415. source: unescape('isMemberOf%3A%20aClass%0A%09%5Eself%20class%20%3D%20aClass'),
  416. messageSends: [unescape("%3D"), "class"],
  417. referencedClasses: []
  418. }),
  419. smalltalk.Object);
  420. smalltalk.addMethod(
  421. unescape('_ifNil_'),
  422. smalltalk.method({
  423. selector: unescape('ifNil%3A'),
  424. category: 'testing',
  425. fn: function (aBlock){
  426. var self=this;
  427. return self;
  428. return self;},
  429. args: ["aBlock"],
  430. source: unescape('ifNil%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself'),
  431. messageSends: [],
  432. referencedClasses: []
  433. }),
  434. smalltalk.Object);
  435. smalltalk.addMethod(
  436. unescape('_ifNil_ifNotNil_'),
  437. smalltalk.method({
  438. selector: unescape('ifNil%3AifNotNil%3A'),
  439. category: 'testing',
  440. fn: function (aBlock, anotherBlock){
  441. var self=this;
  442. return smalltalk.send(anotherBlock, "_value", []);
  443. return self;},
  444. args: ["aBlock", "anotherBlock"],
  445. source: unescape('ifNil%3A%20aBlock%20ifNotNil%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EanotherBlock%20value'),
  446. messageSends: ["value"],
  447. referencedClasses: []
  448. }),
  449. smalltalk.Object);
  450. smalltalk.addMethod(
  451. unescape('_ifNotNil_'),
  452. smalltalk.method({
  453. selector: unescape('ifNotNil%3A'),
  454. category: 'testing',
  455. fn: function (aBlock){
  456. var self=this;
  457. return smalltalk.send(aBlock, "_value", []);
  458. return self;},
  459. args: ["aBlock"],
  460. source: unescape('ifNotNil%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EaBlock%20value'),
  461. messageSends: ["value"],
  462. referencedClasses: []
  463. }),
  464. smalltalk.Object);
  465. smalltalk.addMethod(
  466. unescape('_ifNotNil_ifNil_'),
  467. smalltalk.method({
  468. selector: unescape('ifNotNil%3AifNil%3A'),
  469. category: 'testing',
  470. fn: function (aBlock, anotherBlock){
  471. var self=this;
  472. return smalltalk.send(aBlock, "_value", []);
  473. return self;},
  474. args: ["aBlock", "anotherBlock"],
  475. source: unescape('ifNotNil%3A%20aBlock%20ifNil%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EaBlock%20value'),
  476. messageSends: ["value"],
  477. referencedClasses: []
  478. }),
  479. smalltalk.Object);
  480. smalltalk.addMethod(
  481. unescape('_isNil'),
  482. smalltalk.method({
  483. selector: unescape('isNil'),
  484. category: 'testing',
  485. fn: function (){
  486. var self=this;
  487. return false;
  488. return self;},
  489. args: [],
  490. source: unescape('isNil%0A%09%5Efalse'),
  491. messageSends: [],
  492. referencedClasses: []
  493. }),
  494. smalltalk.Object);
  495. smalltalk.addMethod(
  496. unescape('_notNil'),
  497. smalltalk.method({
  498. selector: unescape('notNil'),
  499. category: 'testing',
  500. fn: function (){
  501. var self=this;
  502. return smalltalk.send(smalltalk.send(self, "_isNil", []), "_not", []);
  503. return self;},
  504. args: [],
  505. source: unescape('notNil%0A%09%5Eself%20isNil%20not'),
  506. messageSends: ["not", "isNil"],
  507. referencedClasses: []
  508. }),
  509. smalltalk.Object);
  510. smalltalk.addMethod(
  511. unescape('_isClass'),
  512. smalltalk.method({
  513. selector: unescape('isClass'),
  514. category: 'testing',
  515. fn: function (){
  516. var self=this;
  517. return false;
  518. return self;},
  519. args: [],
  520. source: unescape('isClass%0A%09%5Efalse'),
  521. messageSends: [],
  522. referencedClasses: []
  523. }),
  524. smalltalk.Object);
  525. smalltalk.addMethod(
  526. unescape('_isMetaclass'),
  527. smalltalk.method({
  528. selector: unescape('isMetaclass'),
  529. category: 'testing',
  530. fn: function (){
  531. var self=this;
  532. return false;
  533. return self;},
  534. args: [],
  535. source: unescape('isMetaclass%0A%09%5Efalse'),
  536. messageSends: [],
  537. referencedClasses: []
  538. }),
  539. smalltalk.Object);
  540. smalltalk.addMethod(
  541. unescape('_isNumber'),
  542. smalltalk.method({
  543. selector: unescape('isNumber'),
  544. category: 'testing',
  545. fn: function (){
  546. var self=this;
  547. return false;
  548. return self;},
  549. args: [],
  550. source: unescape('isNumber%0A%09%5Efalse'),
  551. messageSends: [],
  552. referencedClasses: []
  553. }),
  554. smalltalk.Object);
  555. smalltalk.addMethod(
  556. unescape('_isString'),
  557. smalltalk.method({
  558. selector: unescape('isString'),
  559. category: 'testing',
  560. fn: function (){
  561. var self=this;
  562. return false;
  563. return self;},
  564. args: [],
  565. source: unescape('isString%0A%09%5Efalse'),
  566. messageSends: [],
  567. referencedClasses: []
  568. }),
  569. smalltalk.Object);
  570. smalltalk.addMethod(
  571. unescape('_isParseFailure'),
  572. smalltalk.method({
  573. selector: unescape('isParseFailure'),
  574. category: 'testing',
  575. fn: function (){
  576. var self=this;
  577. return false;
  578. return self;},
  579. args: [],
  580. source: unescape('isParseFailure%0A%09%5Efalse'),
  581. messageSends: [],
  582. referencedClasses: []
  583. }),
  584. smalltalk.Object);
  585. smalltalk.addMethod(
  586. unescape('_basicPerform_'),
  587. smalltalk.method({
  588. selector: unescape('basicPerform%3A'),
  589. category: 'message handling',
  590. fn: function (aSymbol){
  591. var self=this;
  592. return smalltalk.send(self, "_basicPerform_withArguments_", [aSymbol, []]);
  593. return self;},
  594. args: ["aSymbol"],
  595. source: unescape('basicPerform%3A%20aSymbol%20%0A%09%5Eself%20basicPerform%3A%20aSymbol%20withArguments%3A%20%23%28%29'),
  596. messageSends: ["basicPerform:withArguments:"],
  597. referencedClasses: []
  598. }),
  599. smalltalk.Object);
  600. smalltalk.addMethod(
  601. unescape('_basicPerform_withArguments_'),
  602. smalltalk.method({
  603. selector: unescape('basicPerform%3AwithArguments%3A'),
  604. category: 'message handling',
  605. fn: function (aSymbol, aCollection){
  606. var self=this;
  607. return self[aSymbol].apply(self, aCollection);;
  608. return self;},
  609. args: ["aSymbol", "aCollection"],
  610. source: unescape('basicPerform%3A%20aSymbol%20withArguments%3A%20aCollection%0A%09%3Creturn%20self%5BaSymbol%5D.apply%28self%2C%20aCollection%29%3B%3E'),
  611. messageSends: [],
  612. referencedClasses: []
  613. }),
  614. smalltalk.Object);
  615. smalltalk.addMethod(
  616. unescape('_basicDelete_'),
  617. smalltalk.method({
  618. selector: unescape('basicDelete%3A'),
  619. category: 'accessing',
  620. fn: function (aString){
  621. var self=this;
  622. delete self[aString]; return aString;
  623. return self;},
  624. args: ["aString"],
  625. source: unescape('basicDelete%3A%20aString%0A%20%20%20%20%3Cdelete%20self%5BaString%5D%3B%20return%20aString%3E'),
  626. messageSends: [],
  627. referencedClasses: []
  628. }),
  629. smalltalk.Object);
  630. smalltalk.addMethod(
  631. unescape('_doesNotUnderstand_'),
  632. smalltalk.method({
  633. selector: unescape('doesNotUnderstand%3A'),
  634. category: 'error handling',
  635. fn: function (aMessage){
  636. var self=this;
  637. (function($rec){smalltalk.send($rec, "_receiver_", [self]);smalltalk.send($rec, "_message_", [aMessage]);return smalltalk.send($rec, "_signal", []);})(smalltalk.send((smalltalk.MessageNotUnderstood || MessageNotUnderstood), "_new", []));
  638. return self;},
  639. args: ["aMessage"],
  640. source: unescape('doesNotUnderstand%3A%20aMessage%0A%09MessageNotUnderstood%20new%0A%09%09receiver%3A%20self%3B%0A%09%09message%3A%20aMessage%3B%0A%09%09signal'),
  641. messageSends: ["receiver:", "message:", "signal", "new"],
  642. referencedClasses: ["MessageNotUnderstood"]
  643. }),
  644. smalltalk.Object);
  645. smalltalk.addMethod(
  646. unescape('_asJSON'),
  647. smalltalk.method({
  648. selector: unescape('asJSON'),
  649. category: 'converting',
  650. fn: function (){
  651. var self=this;
  652. return JSON.stringify(self);
  653. return self;},
  654. args: [],
  655. source: unescape('asJSON%0A%09%3Creturn%20JSON.stringify%28self%29%3E'),
  656. messageSends: [],
  657. referencedClasses: []
  658. }),
  659. smalltalk.Object);
  660. smalltalk.addMethod(
  661. unescape('_halt'),
  662. smalltalk.method({
  663. selector: unescape('halt'),
  664. category: 'error handling',
  665. fn: function (){
  666. var self=this;
  667. smalltalk.send(self, "_error_", ["Halt encountered"]);
  668. return self;},
  669. args: [],
  670. source: unescape('halt%0A%09self%20error%3A%20%27Halt%20encountered%27'),
  671. messageSends: ["error:"],
  672. referencedClasses: []
  673. }),
  674. smalltalk.Object);
  675. smalltalk.addMethod(
  676. unescape('_log_block_'),
  677. smalltalk.method({
  678. selector: unescape('log%3Ablock%3A'),
  679. category: 'printing',
  680. fn: function (aString, aBlock){
  681. var self=this;
  682. var result=nil;
  683. smalltalk.send((typeof console == 'undefined' ? nil : console), "_log_", [smalltalk.send(smalltalk.send(aString, "__comma", [" time: "]), "__comma", [smalltalk.send(smalltalk.send((smalltalk.Date || Date), "_millisecondsToRun_", [(function(){return result=smalltalk.send(aBlock, "_value", []);})]), "_printString", [])])]);
  684. return result;
  685. return self;},
  686. args: ["aString", "aBlock"],
  687. source: unescape('log%3A%20aString%20block%3A%20aBlock%0A%0A%09%7C%20result%20%7C%0A%09console%20log%3A%20%20aString%2C%20%20%27%20time%3A%20%27%2C%20%28Date%20millisecondsToRun%3A%20%5Bresult%20%3A%3D%20aBlock%20value%5D%29%20printString.%0A%09%5Eresult'),
  688. messageSends: ["log:", unescape("%2C"), "printString", "millisecondsToRun:", "value"],
  689. referencedClasses: ["Date"]
  690. }),
  691. smalltalk.Object);
  692. smalltalk.addMethod(
  693. unescape('__eq_eq'),
  694. smalltalk.method({
  695. selector: unescape('%3D%3D'),
  696. category: 'comparing',
  697. fn: function (anObject){
  698. var self=this;
  699. return self === anObject;
  700. return self;},
  701. args: ["anObject"],
  702. source: unescape('%3D%3D%20anObject%0A%09%3Creturn%20self%20%3D%3D%3D%20anObject%3E'),
  703. messageSends: [],
  704. referencedClasses: []
  705. }),
  706. smalltalk.Object);
  707. smalltalk.addMethod(
  708. unescape('_%7E%7E'),
  709. smalltalk.method({
  710. selector: unescape('%7E%7E'),
  711. category: 'comparing',
  712. fn: function (anObject){
  713. var self=this;
  714. return smalltalk.send(smalltalk.send(self, "__eq_eq", [anObject]), "__eq", [false]);
  715. return self;},
  716. args: ["anObject"],
  717. source: unescape('%7E%7E%20anObject%0A%09%5E%28self%20%3D%3D%20anObject%29%20%3D%20false'),
  718. messageSends: [unescape("%3D"), unescape("%3D%3D")],
  719. referencedClasses: []
  720. }),
  721. smalltalk.Object);
  722. smalltalk.addMethod(
  723. unescape('_deprecatedAPI'),
  724. smalltalk.method({
  725. selector: unescape('deprecatedAPI'),
  726. category: 'error handling',
  727. fn: function (){
  728. var self=this;
  729. smalltalk.send((typeof console == 'undefined' ? nil : console), "_warn_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.getThisContext()), "_home", []), "_asString", []), "__comma", [unescape("%20is%20deprecated%21%20%28in%20")]), "__comma", [smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.getThisContext()), "_home", []), "_home", []), "_asString", [])]), "__comma", [unescape("%29")])]);
  730. return self;},
  731. args: [],
  732. source: unescape('deprecatedAPI%0A%09%22Just%20a%20simple%20way%20to%20deprecate%20methods.%0A%09%23deprecatedAPI%20is%20in%20the%20%27error%20handling%27%20protocol%20even%20if%20it%20doesn%27t%20throw%20an%20error%2C%0A%09but%20it%20could%20in%20the%20future.%22%0A%09console%20warn%3A%20thisContext%20home%20asString%2C%20%27%20is%20deprecated%21%20%28in%20%27%2C%20thisContext%20home%20home%20asString%2C%20%27%29%27'),
  733. messageSends: ["warn:", unescape("%2C"), "asString", "home"],
  734. referencedClasses: []
  735. }),
  736. smalltalk.Object);
  737. smalltalk.addMethod(
  738. unescape('_storeString'),
  739. smalltalk.method({
  740. selector: unescape('storeString'),
  741. category: 'printing',
  742. fn: function (){
  743. var self=this;
  744. return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(s){return smalltalk.send(self, "_storeOn_", [s]);})]);
  745. return self;},
  746. args: [],
  747. source: unescape('storeString%0A%09%22Answer%20a%20String%20representation%20of%20the%20receiver%20from%20which%20the%20receiver%20%0A%09can%20be%20reconstructed.%22%0A%0A%09%5E%20String%20streamContents%3A%20%5B%3As%20%7C%20self%20storeOn%3A%20s%5D'),
  748. messageSends: ["streamContents:", "storeOn:"],
  749. referencedClasses: ["String"]
  750. }),
  751. smalltalk.Object);
  752. smalltalk.addMethod(
  753. unescape('_storeOn_'),
  754. smalltalk.method({
  755. selector: unescape('storeOn%3A'),
  756. category: 'printing',
  757. fn: function (aStream){
  758. var self=this;
  759. smalltalk.send(aStream, "_nextPutAll_", [smalltalk.send(self, "_printString", [])]);
  760. return self;},
  761. args: ["aStream"],
  762. source: unescape('storeOn%3A%20aStream%0A%09aStream%20nextPutAll%3A%20self%20printString'),
  763. messageSends: ["nextPutAll:", "printString"],
  764. referencedClasses: []
  765. }),
  766. smalltalk.Object);
  767. smalltalk.addMethod(
  768. unescape('_initialize'),
  769. smalltalk.method({
  770. selector: unescape('initialize'),
  771. category: 'initialization',
  772. fn: function (){
  773. var self=this;
  774. return self;},
  775. args: [],
  776. source: unescape('initialize%0A%09%22no%20op%22'),
  777. messageSends: [],
  778. referencedClasses: []
  779. }),
  780. smalltalk.Object.klass);
  781. smalltalk.addClass('Smalltalk', smalltalk.Object, [], 'Kernel');
  782. smalltalk.addMethod(
  783. unescape('_classes'),
  784. smalltalk.method({
  785. selector: unescape('classes'),
  786. category: 'accessing',
  787. fn: function (){
  788. var self=this;
  789. return self.classes();
  790. return self;},
  791. args: [],
  792. source: unescape('classes%0A%09%3Creturn%20self.classes%28%29%3E'),
  793. messageSends: [],
  794. referencedClasses: []
  795. }),
  796. smalltalk.Smalltalk);
  797. smalltalk.addMethod(
  798. unescape('_at_'),
  799. smalltalk.method({
  800. selector: unescape('at%3A'),
  801. category: 'accessing',
  802. fn: function (aString){
  803. var self=this;
  804. return self[aString];
  805. return self;},
  806. args: ["aString"],
  807. source: unescape('at%3A%20aString%0A%09%3Creturn%20self%5BaString%5D%3E'),
  808. messageSends: [],
  809. referencedClasses: []
  810. }),
  811. smalltalk.Smalltalk);
  812. smalltalk.addMethod(
  813. unescape('_removeClass_'),
  814. smalltalk.method({
  815. selector: unescape('removeClass%3A'),
  816. category: 'classes',
  817. fn: function (aClass){
  818. var self=this;
  819. ((($receiver = smalltalk.send(aClass, "_isMetaclass", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_error_", [smalltalk.send(smalltalk.send(aClass, "_asString", []), "__comma", [unescape("%20is%20a%20Metaclass%20and%20cannot%20be%20removed%21")])]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self, "_error_", [smalltalk.send(smalltalk.send(aClass, "_asString", []), "__comma", [unescape("%20is%20a%20Metaclass%20and%20cannot%20be%20removed%21")])]);})]));
  820. smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_methodDictionary", []), "_values", []), "_do_", [(function(each){return smalltalk.send(aClass, "_removeCompiledMethod_", [each]);})]);
  821. smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_methodDictionary", []), "_values", []), "_do_", [(function(each){return smalltalk.send(smalltalk.send(aClass, "_class", []), "_removeCompiledMethod_", [each]);})]);
  822. smalltalk.send(self, "_basicDelete_", [smalltalk.send(aClass, "_name", [])]);
  823. return self;},
  824. args: ["aClass"],
  825. source: unescape('removeClass%3A%20aClass%0A%09aClass%20isMetaclass%20ifTrue%3A%20%5Bself%20error%3A%20aClass%20asString%2C%20%27%20is%20a%20Metaclass%20and%20cannot%20be%20removed%21%27%5D.%0A%09aClass%20methodDictionary%20values%20do%3A%20%5B%3Aeach%20%7C%0A%09%09aClass%20removeCompiledMethod%3A%20each%5D.%0A%09aClass%20class%20methodDictionary%20values%20do%3A%20%5B%3Aeach%20%7C%0A%09%09aClass%20class%20removeCompiledMethod%3A%20each%5D.%0A%09self%20basicDelete%3A%20aClass%20name'),
  826. messageSends: ["ifTrue:", "isMetaclass", "error:", unescape("%2C"), "asString", "do:", "values", "methodDictionary", "removeCompiledMethod:", "class", "basicDelete:", "name"],
  827. referencedClasses: []
  828. }),
  829. smalltalk.Smalltalk);
  830. smalltalk.addMethod(
  831. unescape('_basicParse_'),
  832. smalltalk.method({
  833. selector: unescape('basicParse%3A'),
  834. category: 'accessing',
  835. fn: function (aString){
  836. var self=this;
  837. return smalltalk.parser.parse(aString);
  838. return self;},
  839. args: ["aString"],
  840. source: unescape('basicParse%3A%20aString%0A%09%3Creturn%20smalltalk.parser.parse%28aString%29%3E'),
  841. messageSends: [],
  842. referencedClasses: []
  843. }),
  844. smalltalk.Smalltalk);
  845. smalltalk.addMethod(
  846. unescape('_parse_'),
  847. smalltalk.method({
  848. selector: unescape('parse%3A'),
  849. category: 'accessing',
  850. fn: function (aString){
  851. var self=this;
  852. var result=nil;
  853. smalltalk.send(self, "_try_catch_", [(function(){return result=smalltalk.send(self, "_basicParse_", [aString]);}), (function(ex){return smalltalk.send(smalltalk.send(self, "_parseError_parsing_", [ex, aString]), "_signal", []);})]);
  854. return result;
  855. return self;},
  856. args: ["aString"],
  857. source: unescape('parse%3A%20aString%0A%09%7C%20result%20%7C%20%0A%09self%20try%3A%20%5Bresult%20%3A%3D%20self%20basicParse%3A%20aString%5D%20catch%3A%20%5B%3Aex%20%7C%20%28self%20parseError%3A%20ex%20parsing%3A%20aString%29%20signal%5D.%0A%09%5Eresult'),
  858. messageSends: ["try:catch:", "basicParse:", "signal", "parseError:parsing:"],
  859. referencedClasses: []
  860. }),
  861. smalltalk.Smalltalk);
  862. smalltalk.addMethod(
  863. unescape('_parseError_parsing_'),
  864. smalltalk.method({
  865. selector: unescape('parseError%3Aparsing%3A'),
  866. category: 'accessing',
  867. fn: function (anException, aString){
  868. var self=this;
  869. var row=nil;
  870. var col=nil;
  871. var message=nil;
  872. var lines=nil;
  873. var badLine=nil;
  874. var code=nil;
  875. row = anException.line;
  876. col = anException.column;
  877. message = anException.message;;
  878. lines=smalltalk.send(aString, "_lines", []);
  879. badLine=smalltalk.send(lines, "_at_", [row]);
  880. badLine=smalltalk.send(smalltalk.send(smalltalk.send(badLine, "_copyFrom_to_", [(1), ((($receiver = col).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)]))]), "__comma", [unescape("%20%3D%3D%3D%3E")]), "__comma", [smalltalk.send(badLine, "_copyFrom_to_", [col, smalltalk.send(badLine, "_size", [])])]);
  881. smalltalk.send(lines, "_at_put_", [row, badLine]);
  882. code=smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(s){return smalltalk.send(lines, "_withIndexDo_", [(function(l, i){return smalltalk.send(s, "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(i, "_asString", []), "__comma", [": "]), "__comma", [l]), "__comma", [smalltalk.send((smalltalk.String || String), "_lf", [])])]);})]);})]);
  883. return smalltalk.send(smalltalk.send((smalltalk.Error || Error), "_new", []), "_messageText_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("Parse error on line ", "__comma", [row]), "__comma", [" column "]), "__comma", [col]), "__comma", [" : "]), "__comma", [message]), "__comma", [unescape("%20Below%20is%20code%20with%20line%20numbers%20and%20%3D%3D%3D%3E%20marker%20inserted%3A")]), "__comma", [smalltalk.send((smalltalk.String || String), "_lf", [])]), "__comma", [code])]);
  884. return self;},
  885. args: ["anException", "aString"],
  886. source: unescape('parseError%3A%20anException%20parsing%3A%20aString%0A%09%7C%20row%20col%20message%20lines%20badLine%20code%20%7C%0A%09%3Crow%20%3D%20anException.line%3B%0A%09col%20%3D%20anException.column%3B%0A%09message%20%3D%20anException.message%3B%3E.%0A%09lines%20%3A%3D%20aString%20lines.%0A%09badLine%20%3A%3D%20lines%20at%3A%20row.%0A%09badLine%20%3A%3D%20%28badLine%20copyFrom%3A%201%20to%3A%20col%20-%201%29%2C%20%27%20%3D%3D%3D%3E%27%2C%20%28badLine%20copyFrom%3A%20%20col%20to%3A%20badLine%20size%29.%0A%09lines%20at%3A%20row%20put%3A%20badLine.%0A%09code%20%3A%3D%20String%20streamContents%3A%20%5B%3As%20%7C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20lines%20withIndexDo%3A%20%5B%3Al%20%3Ai%20%7C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20s%20nextPutAll%3A%20i%20asString%2C%20%27%3A%20%27%2C%20l%2C%20String%20lf%5D%5D.%0A%09%5E%20Error%20new%20messageText%3A%20%28%27Parse%20error%20on%20line%20%27%20%2C%20row%20%2C%20%27%20column%20%27%20%2C%20col%20%2C%20%27%20%3A%20%27%20%2C%20message%20%2C%20%27%20Below%20is%20code%20with%20line%20numbers%20and%20%3D%3D%3D%3E%20marker%20inserted%3A%27%20%2C%20String%20lf%2C%20code%29'),
  887. messageSends: ["lines", "at:", unescape("%2C"), "copyFrom:to:", unescape("-"), "size", "at:put:", "streamContents:", "withIndexDo:", "nextPutAll:", "asString", "lf", "messageText:", "new"],
  888. referencedClasses: ["String", "Error"]
  889. }),
  890. smalltalk.Smalltalk);
  891. smalltalk.addMethod(
  892. unescape('_packages'),
  893. smalltalk.method({
  894. selector: unescape('packages'),
  895. category: 'packages',
  896. fn: function (){
  897. var self=this;
  898. return self.packages.all();
  899. return self;},
  900. args: [],
  901. source: unescape('packages%0A%09%22Return%20all%20Package%20instances%20in%20the%20system.%22%0A%0A%09%3Creturn%20self.packages.all%28%29%3E'),
  902. messageSends: [],
  903. referencedClasses: []
  904. }),
  905. smalltalk.Smalltalk);
  906. smalltalk.addMethod(
  907. unescape('_packageAt_'),
  908. smalltalk.method({
  909. selector: unescape('packageAt%3A'),
  910. category: 'packages',
  911. fn: function (packageName){
  912. var self=this;
  913. return self.packages[packageName];
  914. return self;},
  915. args: ["packageName"],
  916. source: unescape('packageAt%3A%20packageName%0A%20%20%20%20%20%20%20%3Creturn%20self.packages%5BpackageName%5D%3E'),
  917. messageSends: [],
  918. referencedClasses: []
  919. }),
  920. smalltalk.Smalltalk);
  921. smalltalk.addMethod(
  922. unescape('_packageAt_ifAbsent_'),
  923. smalltalk.method({
  924. selector: unescape('packageAt%3AifAbsent%3A'),
  925. category: 'packages',
  926. fn: function (packageName, aBlock){
  927. var self=this;
  928. return smalltalk.send(smalltalk.send(self, "_packageAt_", [packageName]), "_ifNil_", [aBlock]);
  929. return self;},
  930. args: ["packageName", "aBlock"],
  931. source: unescape('packageAt%3A%20packageName%20ifAbsent%3A%20aBlock%0A%20%20%20%20%20%20%20%5E%28self%20packageAt%3A%20packageName%29%20ifNil%3A%20aBlock'),
  932. messageSends: ["ifNil:", "packageAt:"],
  933. referencedClasses: []
  934. }),
  935. smalltalk.Smalltalk);
  936. smalltalk.addMethod(
  937. unescape('_createPackage_'),
  938. smalltalk.method({
  939. selector: unescape('createPackage%3A'),
  940. category: 'private',
  941. fn: function (packageName){
  942. var self=this;
  943. return smalltalk.addPackage(packageName, nil);
  944. return self;},
  945. args: ["packageName"],
  946. source: unescape('createPackage%3A%20packageName%0A%09%22Create%20and%20bind%20a%20new%20package%20with%20given%20name%20and%20return%20it.%22%0A%0A%20%20%20%20%20%20%3Creturn%20smalltalk.addPackage%28packageName%2C%20nil%29%3E'),
  947. messageSends: [],
  948. referencedClasses: []
  949. }),
  950. smalltalk.Smalltalk);
  951. smalltalk.addMethod(
  952. unescape('_deletePackage_'),
  953. smalltalk.method({
  954. selector: unescape('deletePackage%3A'),
  955. category: 'private',
  956. fn: function (packageName){
  957. var self=this;
  958. delete smalltalk.packages[packageName];
  959. return self;},
  960. args: ["packageName"],
  961. source: unescape('deletePackage%3A%20packageName%0A%09%22Deletes%20a%20package%20by%20deleting%20its%20binding%2C%20but%20does%20not%20check%20if%20it%20contains%20classes%20etc.%0A%09To%20remove%20a%20package%2C%20use%20%23removePackage%20instead.%22%0A%0A%20%20%20%20%20%20%20%3Cdelete%20smalltalk.packages%5BpackageName%5D%3E'),
  962. messageSends: [],
  963. referencedClasses: []
  964. }),
  965. smalltalk.Smalltalk);
  966. smalltalk.addMethod(
  967. unescape('_removePackage_'),
  968. smalltalk.method({
  969. selector: unescape('removePackage%3A'),
  970. category: 'packages',
  971. fn: function (packageName){
  972. var self=this;
  973. var pkg=nil;
  974. pkg=smalltalk.send(self, "_packageAt_ifAbsent_", [packageName, (function(){return smalltalk.send(self, "_error_", [smalltalk.send("Missing package: ", "__comma", [packageName])]);})]);
  975. smalltalk.send(smalltalk.send(pkg, "_classes", []), "_do_", [(function(each){return smalltalk.send(self, "_removeClass_", [each]);})]);
  976. smalltalk.send(self, "_deletePackage_", [packageName]);
  977. return self;},
  978. args: ["packageName"],
  979. source: unescape('removePackage%3A%20packageName%0A%09%22Removes%20a%20package%20and%20all%20its%20classes.%22%0A%0A%09%7C%20pkg%20%7C%0A%09pkg%20%3A%3D%20self%20packageAt%3A%20packageName%20ifAbsent%3A%20%5Bself%20error%3A%20%27Missing%20package%3A%20%27%2C%20packageName%5D.%0A%09pkg%20classes%20do%3A%20%5B%3Aeach%20%7C%0A%20%20%20%20%20%20%20%20%09self%20removeClass%3A%20each%5D.%0A%09self%20deletePackage%3A%20packageName'),
  980. messageSends: ["packageAt:ifAbsent:", "error:", unescape("%2C"), "do:", "classes", "removeClass:", "deletePackage:"],
  981. referencedClasses: []
  982. }),
  983. smalltalk.Smalltalk);
  984. smalltalk.addMethod(
  985. unescape('_renamePackage_to_'),
  986. smalltalk.method({
  987. selector: unescape('renamePackage%3Ato%3A'),
  988. category: 'packages',
  989. fn: function (packageName, newName){
  990. var self=this;
  991. var pkg=nil;
  992. pkg=smalltalk.send(self, "_packageAt_ifAbsent_", [packageName, (function(){return smalltalk.send(self, "_error_", [smalltalk.send("Missing package: ", "__comma", [packageName])]);})]);
  993. (($receiver = smalltalk.send(self, "_packageAt_", [newName])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_error_", [smalltalk.send("Already exists a package called: ", "__comma", [newName])]);})() : nil;
  994. smalltalk.packages[newName] = smalltalk.packages[packageName];
  995. smalltalk.send(pkg, "_name_", [newName]);
  996. smalltalk.send(self, "_deletePackage_", [packageName]);
  997. return self;},
  998. args: ["packageName", "newName"],
  999. source: unescape('renamePackage%3A%20packageName%20to%3A%20newName%0A%09%22Rename%20a%20package.%22%0A%0A%09%7C%20pkg%20%7C%0A%09pkg%20%3A%3D%20self%20packageAt%3A%20packageName%20ifAbsent%3A%20%5Bself%20error%3A%20%27Missing%20package%3A%20%27%2C%20packageName%5D.%0A%09%28self%20packageAt%3A%20newName%29%20ifNotNil%3A%20%5Bself%20error%3A%20%27Already%20exists%20a%20package%20called%3A%20%27%2C%20newName%5D.%0A%09%3Csmalltalk.packages%5BnewName%5D%20%3D%20smalltalk.packages%5BpackageName%5D%3E.%0A%09pkg%20name%3A%20newName.%0A%09self%20deletePackage%3A%20packageName.'),
  1000. messageSends: ["packageAt:ifAbsent:", "error:", unescape("%2C"), "ifNotNil:", "packageAt:", "name:", "deletePackage:"],
  1001. referencedClasses: []
  1002. }),
  1003. smalltalk.Smalltalk);
  1004. smalltalk.addMethod(
  1005. unescape('_reservedWords'),
  1006. smalltalk.method({
  1007. selector: unescape('reservedWords'),
  1008. category: 'accessing',
  1009. fn: function (){
  1010. var self=this;
  1011. return self.reservedWords;
  1012. return self;},
  1013. args: [],
  1014. source: unescape('reservedWords%0A%09%22JavaScript%20reserved%20words%22%0A%09%3Creturn%20self.reservedWords%3E'),
  1015. messageSends: [],
  1016. referencedClasses: []
  1017. }),
  1018. smalltalk.Smalltalk);
  1019. smalltalk.addMethod(
  1020. unescape('_createPackage_properties_'),
  1021. smalltalk.method({
  1022. selector: unescape('createPackage%3Aproperties%3A'),
  1023. category: 'private',
  1024. fn: function (packageName, aDict){
  1025. var self=this;
  1026. var object=nil;
  1027. object = {};;
  1028. smalltalk.send(aDict, "_keysAndValuesDo_", [(function(key, value){return object[key] = value;})]);
  1029. return smalltalk.addPackage(packageName, object);
  1030. return self;},
  1031. args: ["packageName", "aDict"],
  1032. source: unescape('createPackage%3A%20packageName%20properties%3A%20aDict%0A%09%22Create%20and%20bind%20a%20new%20package%20with%20given%20name%20and%20return%20it.%22%0A%0A%09%7C%20object%20%7C%0A%09%3Cobject%20%3D%20%7B%7D%3B%3E.%0A%09aDict%20keysAndValuesDo%3A%20%5B%3Akey%20%3Avalue%20%7C%0A%09%09%3Cobject%5Bkey%5D%20%3D%20value%3E.%0A%09%5D.%0A%20%20%20%20%20%20%20%3Creturn%20smalltalk.addPackage%28packageName%2C%20object%29%3E'),
  1033. messageSends: ["keysAndValuesDo:"],
  1034. referencedClasses: []
  1035. }),
  1036. smalltalk.Smalltalk);
  1037. smalltalk.addMethod(
  1038. unescape('_readJSObject_'),
  1039. smalltalk.method({
  1040. selector: unescape('readJSObject%3A'),
  1041. category: 'accessing',
  1042. fn: function (anObject){
  1043. var self=this;
  1044. return self.readJSObject(anObject);
  1045. return self;},
  1046. args: ["anObject"],
  1047. source: unescape('readJSObject%3A%20anObject%0A%09%3Creturn%20self.readJSObject%28anObject%29%3E'),
  1048. messageSends: [],
  1049. referencedClasses: []
  1050. }),
  1051. smalltalk.Smalltalk);
  1052. smalltalk.Smalltalk.klass.iVarNames = ['current'];
  1053. smalltalk.addMethod(
  1054. unescape('_current'),
  1055. smalltalk.method({
  1056. selector: unescape('current'),
  1057. category: 'accessing',
  1058. fn: function (){
  1059. var self=this;
  1060. return smalltalk;
  1061. return self;},
  1062. args: [],
  1063. source: unescape('current%0A%09%3Creturn%20smalltalk%3E'),
  1064. messageSends: [],
  1065. referencedClasses: []
  1066. }),
  1067. smalltalk.Smalltalk.klass);
  1068. smalltalk.addClass('Package', smalltalk.Object, [], 'Kernel');
  1069. smalltalk.Package.comment=unescape('A%20Package%20is%20similar%20to%20a%20%22class%20category%22%20typically%20found%20in%20other%20Smalltalks%20like%20Pharo%20or%20Squeak.%20Amber%20does%20not%20have%20class%20categories%20anymore%2C%20it%20had%20in%20the%20beginning%20but%20now%20each%20class%20in%20the%20system%20knows%20which%20package%20it%20belongs%20to.%0A%0AA%20Package%20has%20a%20name%2C%20an%20Array%20of%20%22requires%22%2C%20a%20comment%20and%20a%20Dictionary%20with%20other%20optional%20key%20value%20attributes.%20A%20Package%20can%20also%20be%20queried%20for%20its%20classes%2C%20but%20it%20will%20then%20resort%20to%20a%20reverse%20scan%20of%20all%20classes%20to%20find%20them.%0APackages%20are%20manipulated%20through%20%22Smalltalk%20current%22%2C%20like%20for%20example%20finding%20one%20based%20on%20a%20name%3A%0A%0A%09Smalltalk%20current%20packageAt%3A%20%27Kernel%27%0A%0A...but%20you%20can%20also%20use%3A%0A%0A%09Package%20named%3A%20%27Kernel%27%0A%0AA%20Package%20differs%20slightly%20from%20a%20Monticello%20package%20which%20can%20span%20multiple%20class%20categories%20using%20a%20naming%20convention%20based%20on%20hyphenation.%20But%20just%20as%20in%20Monticello%20a%20Package%20supports%20%22class%20extensions%22%20so%20a%20Package%0Acan%20define%20behaviors%20in%20foreign%20classes%20using%20a%20naming%20convention%20for%20method%20categories%20where%20the%20category%20starts%20with%20an%20asterisk%20and%20then%20the%20name%20of%20the%20owning%20package%20follows.%20This%20can%20easily%20be%20seen%20in%20for%20example%20class%0AString%20where%20the%20method%20category%20%22*IDE%22%20defines%20%23inspectOn%3A%20which%20thus%20is%20a%20method%20belonging%20to%20the%20IDE%20package.')
  1070. smalltalk.addMethod(
  1071. unescape('_name'),
  1072. smalltalk.method({
  1073. selector: unescape('name'),
  1074. category: 'accessing',
  1075. fn: function (){
  1076. var self=this;
  1077. return self.pkgName;
  1078. return self;},
  1079. args: [],
  1080. source: unescape('name%0A%09%3Creturn%20self.pkgName%3E'),
  1081. messageSends: [],
  1082. referencedClasses: []
  1083. }),
  1084. smalltalk.Package);
  1085. smalltalk.addMethod(
  1086. unescape('_name_'),
  1087. smalltalk.method({
  1088. selector: unescape('name%3A'),
  1089. category: 'accessing',
  1090. fn: function (aString){
  1091. var self=this;
  1092. return self.pkgName = aString;
  1093. return self;},
  1094. args: ["aString"],
  1095. source: unescape('name%3A%20aString%0A%09%3Creturn%20self.pkgName%20%3D%20aString%3E'),
  1096. messageSends: [],
  1097. referencedClasses: []
  1098. }),
  1099. smalltalk.Package);
  1100. smalltalk.addMethod(
  1101. unescape('_classes'),
  1102. smalltalk.method({
  1103. selector: unescape('classes'),
  1104. category: 'classes',
  1105. fn: function (){
  1106. var self=this;
  1107. return smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_classes", []), "_select_", [(function(c){return smalltalk.send(smalltalk.send(c, "_package", []), "__eq_eq", [self]);})]);
  1108. return self;},
  1109. args: [],
  1110. source: unescape('classes%0A%09%22We%20need%20to%20do%20a%20reverse%20scan.%22%0A%09%5ESmalltalk%20current%20classes%20select%3A%20%5B%3Ac%20%7C%20c%20package%20%3D%3D%20self%5D'),
  1111. messageSends: ["select:", "classes", "current", unescape("%3D%3D"), "package"],
  1112. referencedClasses: ["Smalltalk"]
  1113. }),
  1114. smalltalk.Package);
  1115. smalltalk.addMethod(
  1116. unescape('_printString'),
  1117. smalltalk.method({
  1118. selector: unescape('printString'),
  1119. category: 'printing',
  1120. fn: function (){
  1121. var self=this;
  1122. return smalltalk.send(self, "_name", []);
  1123. return self;},
  1124. args: [],
  1125. source: unescape('printString%0A%09%5Eself%20name'),
  1126. messageSends: ["name"],
  1127. referencedClasses: []
  1128. }),
  1129. smalltalk.Package);
  1130. smalltalk.addMethod(
  1131. unescape('_dependencies'),
  1132. smalltalk.method({
  1133. selector: unescape('dependencies'),
  1134. category: 'accessing',
  1135. fn: function (){
  1136. var self=this;
  1137. return smalltalk.send(self, "_propertyAt_ifAbsent_", ["dependencies", (function(){return [];})]);
  1138. return self;},
  1139. args: [],
  1140. source: unescape('dependencies%0A%09%5Eself%20propertyAt%3A%20%27dependencies%27%20ifAbsent%3A%20%5B%23%28%29%5D'),
  1141. messageSends: ["propertyAt:ifAbsent:"],
  1142. referencedClasses: []
  1143. }),
  1144. smalltalk.Package);
  1145. smalltalk.addMethod(
  1146. unescape('_dependencies_'),
  1147. smalltalk.method({
  1148. selector: unescape('dependencies%3A'),
  1149. category: 'accessing',
  1150. fn: function (anArray){
  1151. var self=this;
  1152. return smalltalk.send(self, "_propertyAt_put_", ["dependencies", anArray]);
  1153. return self;},
  1154. args: ["anArray"],
  1155. source: unescape('dependencies%3A%20anArray%0A%09%5Eself%20propertyAt%3A%20%27dependencies%27%20put%3A%20anArray'),
  1156. messageSends: ["propertyAt:put:"],
  1157. referencedClasses: []
  1158. }),
  1159. smalltalk.Package);
  1160. smalltalk.addMethod(
  1161. unescape('_properties'),
  1162. smalltalk.method({
  1163. selector: unescape('properties'),
  1164. category: 'accessing',
  1165. fn: function (){
  1166. var self=this;
  1167. return smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_readJSObject_", [smalltalk.send(self, "_basicAt_", ["properties"])]);
  1168. return self;},
  1169. args: [],
  1170. source: unescape('properties%0A%09%5ESmalltalk%20current%20readJSObject%3A%20%28self%20basicAt%3A%20%27properties%27%29'),
  1171. messageSends: ["readJSObject:", "current", "basicAt:"],
  1172. referencedClasses: ["Smalltalk"]
  1173. }),
  1174. smalltalk.Package);
  1175. smalltalk.addMethod(
  1176. unescape('_propertiesAsJSON'),
  1177. smalltalk.method({
  1178. selector: unescape('propertiesAsJSON'),
  1179. category: 'private',
  1180. fn: function (){
  1181. var self=this;
  1182. return JSON.stringify(self.properties);
  1183. return self;},
  1184. args: [],
  1185. source: unescape('propertiesAsJSON%0A%09%3Creturn%20JSON.stringify%28self.properties%29%3E'),
  1186. messageSends: [],
  1187. referencedClasses: []
  1188. }),
  1189. smalltalk.Package);
  1190. smalltalk.addMethod(
  1191. unescape('_properties_'),
  1192. smalltalk.method({
  1193. selector: unescape('properties%3A'),
  1194. category: 'accessing',
  1195. fn: function (aDict){
  1196. var self=this;
  1197. var object=nil;
  1198. object = {};;
  1199. smalltalk.send(aDict, "_keysAndValuesDo_", [(function(key, value){return object[key] = value;})]);
  1200. return self.properties = object;
  1201. return self;},
  1202. args: ["aDict"],
  1203. source: unescape('properties%3A%20aDict%0A%09%22We%20store%20it%20as%20a%20javascript%20object.%22%0A%09%0A%09%7C%20object%20%7C%0A%09%3Cobject%20%3D%20%7B%7D%3B%3E.%0A%09aDict%20keysAndValuesDo%3A%20%5B%3Akey%20%3Avalue%20%7C%0A%09%09%3Cobject%5Bkey%5D%20%3D%20value%3E.%0A%09%5D.%0A%09%3Creturn%20self.properties%20%3D%20object%3E'),
  1204. messageSends: ["keysAndValuesDo:"],
  1205. referencedClasses: []
  1206. }),
  1207. smalltalk.Package);
  1208. smalltalk.addMethod(
  1209. unescape('_jsProperties'),
  1210. smalltalk.method({
  1211. selector: unescape('jsProperties'),
  1212. category: 'private',
  1213. fn: function (){
  1214. var self=this;
  1215. return self.properties;
  1216. return self;},
  1217. args: [],
  1218. source: unescape('jsProperties%0A%09%3Creturn%20self.properties%3E'),
  1219. messageSends: [],
  1220. referencedClasses: []
  1221. }),
  1222. smalltalk.Package);
  1223. smalltalk.addMethod(
  1224. unescape('_jsProperties_'),
  1225. smalltalk.method({
  1226. selector: unescape('jsProperties%3A'),
  1227. category: 'private',
  1228. fn: function (aJSObject){
  1229. var self=this;
  1230. return self.properties = aJSObject;
  1231. return self;},
  1232. args: ["aJSObject"],
  1233. source: unescape('jsProperties%3A%20aJSObject%0A%09%3Creturn%20self.properties%20%3D%20aJSObject%3E'),
  1234. messageSends: [],
  1235. referencedClasses: []
  1236. }),
  1237. smalltalk.Package);
  1238. smalltalk.addMethod(
  1239. unescape('_propertyAt_'),
  1240. smalltalk.method({
  1241. selector: unescape('propertyAt%3A'),
  1242. category: 'properties',
  1243. fn: function (key){
  1244. var self=this;
  1245. return self.properties[key];
  1246. return self;},
  1247. args: ["key"],
  1248. source: unescape('propertyAt%3A%20key%0A%0A%09%3Creturn%20self.properties%5Bkey%5D%3E'),
  1249. messageSends: [],
  1250. referencedClasses: []
  1251. }),
  1252. smalltalk.Package);
  1253. smalltalk.addMethod(
  1254. unescape('_propertyAt_put_'),
  1255. smalltalk.method({
  1256. selector: unescape('propertyAt%3Aput%3A'),
  1257. category: 'properties',
  1258. fn: function (key, value){
  1259. var self=this;
  1260. return self.properties[key] = value;
  1261. return self;},
  1262. args: ["key", "value"],
  1263. source: unescape('propertyAt%3A%20key%20put%3A%20value%0A%0A%09%3Creturn%20self.properties%5Bkey%5D%20%3D%20value%3E'),
  1264. messageSends: [],
  1265. referencedClasses: []
  1266. }),
  1267. smalltalk.Package);
  1268. smalltalk.addMethod(
  1269. unescape('_propertyAt_ifAbsent_'),
  1270. smalltalk.method({
  1271. selector: unescape('propertyAt%3AifAbsent%3A'),
  1272. category: 'properties',
  1273. fn: function (key, block){
  1274. var self=this;
  1275. return (($receiver = smalltalk.send(self, "_propertyAt_", [key])) == nil || $receiver == undefined) ? (function(){return smalltalk.send(block, "_value", []);})() : $receiver;
  1276. return self;},
  1277. args: ["key", "block"],
  1278. source: unescape('propertyAt%3A%20key%20ifAbsent%3A%20block%0A%0A%09%5E%28self%20propertyAt%3A%20key%29%20ifNil%3A%20%5Bblock%20value%5D'),
  1279. messageSends: ["ifNil:", "propertyAt:", "value"],
  1280. referencedClasses: []
  1281. }),
  1282. smalltalk.Package);
  1283. smalltalk.addMethod(
  1284. unescape('_named_'),
  1285. smalltalk.method({
  1286. selector: unescape('named%3A'),
  1287. category: 'not yet classified',
  1288. fn: function (aPackageName){
  1289. var self=this;
  1290. return smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_packageAt_", [aPackageName]);
  1291. return self;},
  1292. args: ["aPackageName"],
  1293. source: unescape('named%3A%20aPackageName%0A%0A%09%5ESmalltalk%20current%20packageAt%3A%20aPackageName'),
  1294. messageSends: ["packageAt:", "current"],
  1295. referencedClasses: ["Smalltalk"]
  1296. }),
  1297. smalltalk.Package.klass);
  1298. smalltalk.addMethod(
  1299. unescape('_named_ifAbsent_'),
  1300. smalltalk.method({
  1301. selector: unescape('named%3AifAbsent%3A'),
  1302. category: 'not yet classified',
  1303. fn: function (aPackageName, aBlock){
  1304. var self=this;
  1305. return smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_packageAt_ifAbsent_", [aPackageName, aBlock]);
  1306. return self;},
  1307. args: ["aPackageName", "aBlock"],
  1308. source: unescape('named%3A%20aPackageName%20ifAbsent%3A%20aBlock%0A%0A%09%5ESmalltalk%20current%20packageAt%3A%20aPackageName%20ifAbsent%3A%20aBlock'),
  1309. messageSends: ["packageAt:ifAbsent:", "current"],
  1310. referencedClasses: ["Smalltalk"]
  1311. }),
  1312. smalltalk.Package.klass);
  1313. smalltalk.addClass('Behavior', smalltalk.Object, [], 'Kernel');
  1314. smalltalk.addMethod(
  1315. unescape('_new'),
  1316. smalltalk.method({
  1317. selector: unescape('new'),
  1318. category: 'instance creation',
  1319. fn: function (){
  1320. var self=this;
  1321. return smalltalk.send(smalltalk.send(self, "_basicNew", []), "_initialize", []);
  1322. return self;},
  1323. args: [],
  1324. source: unescape('new%0A%09%5Eself%20basicNew%20initialize'),
  1325. messageSends: ["initialize", "basicNew"],
  1326. referencedClasses: []
  1327. }),
  1328. smalltalk.Behavior);
  1329. smalltalk.addMethod(
  1330. unescape('_basicNew'),
  1331. smalltalk.method({
  1332. selector: unescape('basicNew'),
  1333. category: 'instance creation',
  1334. fn: function (){
  1335. var self=this;
  1336. return new self.fn();
  1337. return self;},
  1338. args: [],
  1339. source: unescape('basicNew%0A%09%3Creturn%20new%20self.fn%28%29%3E'),
  1340. messageSends: [],
  1341. referencedClasses: []
  1342. }),
  1343. smalltalk.Behavior);
  1344. smalltalk.addMethod(
  1345. unescape('_name'),
  1346. smalltalk.method({
  1347. selector: unescape('name'),
  1348. category: 'accessing',
  1349. fn: function (){
  1350. var self=this;
  1351. return self.className || nil;
  1352. return self;},
  1353. args: [],
  1354. source: unescape('name%0A%09%3Creturn%20self.className%20%7C%7C%20nil%3E'),
  1355. messageSends: [],
  1356. referencedClasses: []
  1357. }),
  1358. smalltalk.Behavior);
  1359. smalltalk.addMethod(
  1360. unescape('_superclass'),
  1361. smalltalk.method({
  1362. selector: unescape('superclass'),
  1363. category: 'accessing',
  1364. fn: function (){
  1365. var self=this;
  1366. return self.superclass || nil;
  1367. return self;},
  1368. args: [],
  1369. source: unescape('superclass%0A%09%3Creturn%20self.superclass%20%7C%7C%20nil%3E'),
  1370. messageSends: [],
  1371. referencedClasses: []
  1372. }),
  1373. smalltalk.Behavior);
  1374. smalltalk.addMethod(
  1375. unescape('_subclasses'),
  1376. smalltalk.method({
  1377. selector: unescape('subclasses'),
  1378. category: 'accessing',
  1379. fn: function (){
  1380. var self=this;
  1381. return smalltalk.subclasses(self);
  1382. return self;},
  1383. args: [],
  1384. source: unescape('subclasses%0A%09%3Creturn%20smalltalk.subclasses%28self%29%3E'),
  1385. messageSends: [],
  1386. referencedClasses: []
  1387. }),
  1388. smalltalk.Behavior);
  1389. smalltalk.addMethod(
  1390. unescape('_allSubclasses'),
  1391. smalltalk.method({
  1392. selector: unescape('allSubclasses'),
  1393. category: 'accessing',
  1394. fn: function (){
  1395. var self=this;
  1396. var result=nil;
  1397. result=smalltalk.send(self, "_subclasses", []);
  1398. smalltalk.send(smalltalk.send(self, "_subclasses", []), "_do_", [(function(each){return smalltalk.send(result, "_addAll_", [smalltalk.send(each, "_allSubclasses", [])]);})]);
  1399. return result;
  1400. return self;},
  1401. args: [],
  1402. source: unescape('allSubclasses%0A%09%7C%20result%20%7C%0A%09result%20%3A%3D%20self%20subclasses.%0A%09self%20subclasses%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20result%20addAll%3A%20each%20allSubclasses%5D.%0A%09%5Eresult'),
  1403. messageSends: ["subclasses", "do:", "addAll:", "allSubclasses"],
  1404. referencedClasses: []
  1405. }),
  1406. smalltalk.Behavior);
  1407. smalltalk.addMethod(
  1408. unescape('_withAllSubclasses'),
  1409. smalltalk.method({
  1410. selector: unescape('withAllSubclasses'),
  1411. category: 'accessing',
  1412. fn: function (){
  1413. var self=this;
  1414. return (function($rec){smalltalk.send($rec, "_addAll_", [smalltalk.send(self, "_allSubclasses", [])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.Array || Array), "_with_", [self]));
  1415. return self;},
  1416. args: [],
  1417. source: unescape('withAllSubclasses%0A%09%5E%28Array%20with%3A%20self%29%20addAll%3A%20self%20allSubclasses%3B%20yourself'),
  1418. messageSends: ["addAll:", "allSubclasses", "yourself", "with:"],
  1419. referencedClasses: ["Array"]
  1420. }),
  1421. smalltalk.Behavior);
  1422. smalltalk.addMethod(
  1423. unescape('_prototype'),
  1424. smalltalk.method({
  1425. selector: unescape('prototype'),
  1426. category: 'accessing',
  1427. fn: function (){
  1428. var self=this;
  1429. return self.fn.prototype;
  1430. return self;},
  1431. args: [],
  1432. source: unescape('prototype%0A%09%3Creturn%20self.fn.prototype%3E'),
  1433. messageSends: [],
  1434. referencedClasses: []
  1435. }),
  1436. smalltalk.Behavior);
  1437. smalltalk.addMethod(
  1438. unescape('_methodDictionary'),
  1439. smalltalk.method({
  1440. selector: unescape('methodDictionary'),
  1441. category: 'accessing',
  1442. fn: function (){
  1443. var self=this;
  1444. var dict = smalltalk.Dictionary._new();
  1445. var methods = self.fn.prototype.methods;
  1446. for(var i in methods) {
  1447. if(methods[i].selector) {
  1448. dict._at_put_(methods[i].selector, methods[i]);
  1449. }
  1450. };
  1451. return dict;
  1452. return self;},
  1453. args: [],
  1454. source: unescape('methodDictionary%0A%09%3Cvar%20dict%20%3D%20smalltalk.Dictionary._new%28%29%3B%0A%09var%20methods%20%3D%20self.fn.prototype.methods%3B%0A%09for%28var%20i%20in%20methods%29%20%7B%0A%09%09if%28methods%5Bi%5D.selector%29%20%7B%0A%09%09%09dict._at_put_%28methods%5Bi%5D.selector%2C%20methods%5Bi%5D%29%3B%0A%09%09%7D%0A%09%7D%3B%0A%09return%20dict%3E'),
  1455. messageSends: [],
  1456. referencedClasses: []
  1457. }),
  1458. smalltalk.Behavior);
  1459. smalltalk.addMethod(
  1460. unescape('_methodsFor_'),
  1461. smalltalk.method({
  1462. selector: unescape('methodsFor%3A'),
  1463. category: 'accessing',
  1464. fn: function (aString){
  1465. var self=this;
  1466. return (function($rec){smalltalk.send($rec, "_class_category_", [self, aString]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.ClassCategoryReader || ClassCategoryReader), "_new", []));
  1467. return self;},
  1468. args: ["aString"],
  1469. source: unescape('methodsFor%3A%20aString%0A%09%5EClassCategoryReader%20new%0A%09%20%20%20%20class%3A%20self%20category%3A%20aString%3B%0A%09%20%20%20%20yourself'),
  1470. messageSends: ["class:category:", "yourself", "new"],
  1471. referencedClasses: ["ClassCategoryReader"]
  1472. }),
  1473. smalltalk.Behavior);
  1474. smalltalk.addMethod(
  1475. unescape('_addCompiledMethod_'),
  1476. smalltalk.method({
  1477. selector: unescape('addCompiledMethod%3A'),
  1478. category: 'accessing',
  1479. fn: function (aMethod){
  1480. var self=this;
  1481. smalltalk.addMethod(aMethod.selector._asSelector(), aMethod, self);
  1482. return self;},
  1483. args: ["aMethod"],
  1484. source: unescape('addCompiledMethod%3A%20aMethod%0A%09%3Csmalltalk.addMethod%28aMethod.selector._asSelector%28%29%2C%20aMethod%2C%20self%29%3E'),
  1485. messageSends: [],
  1486. referencedClasses: []
  1487. }),
  1488. smalltalk.Behavior);
  1489. smalltalk.addMethod(
  1490. unescape('_instanceVariableNames'),
  1491. smalltalk.method({
  1492. selector: unescape('instanceVariableNames'),
  1493. category: 'accessing',
  1494. fn: function (){
  1495. var self=this;
  1496. return self.iVarNames;
  1497. return self;},
  1498. args: [],
  1499. source: unescape('instanceVariableNames%0A%09%3Creturn%20self.iVarNames%3E'),
  1500. messageSends: [],
  1501. referencedClasses: []
  1502. }),
  1503. smalltalk.Behavior);
  1504. smalltalk.addMethod(
  1505. unescape('_comment'),
  1506. smalltalk.method({
  1507. selector: unescape('comment'),
  1508. category: 'accessing',
  1509. fn: function (){
  1510. var self=this;
  1511. return (($receiver = smalltalk.send(self, "_basicAt_", ["comment"])) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
  1512. return self;},
  1513. args: [],
  1514. source: unescape('comment%0A%20%20%20%20%5E%28self%20basicAt%3A%20%27comment%27%29%20ifNil%3A%20%5B%27%27%5D'),
  1515. messageSends: ["ifNil:", "basicAt:"],
  1516. referencedClasses: []
  1517. }),
  1518. smalltalk.Behavior);
  1519. smalltalk.addMethod(
  1520. unescape('_comment_'),
  1521. smalltalk.method({
  1522. selector: unescape('comment%3A'),
  1523. category: 'accessing',
  1524. fn: function (aString){
  1525. var self=this;
  1526. smalltalk.send(self, "_basicAt_put_", ["comment", aString]);
  1527. return self;},
  1528. args: ["aString"],
  1529. source: unescape('comment%3A%20aString%0A%20%20%20%20self%20basicAt%3A%20%27comment%27%20put%3A%20aString'),
  1530. messageSends: ["basicAt:put:"],
  1531. referencedClasses: []
  1532. }),
  1533. smalltalk.Behavior);
  1534. smalltalk.addMethod(
  1535. unescape('_commentStamp'),
  1536. smalltalk.method({
  1537. selector: unescape('commentStamp'),
  1538. category: 'accessing',
  1539. fn: function (){
  1540. var self=this;
  1541. return (function($rec){smalltalk.send($rec, "_class_", [self]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.ClassCommentReader || ClassCommentReader), "_new", []));
  1542. return self;},
  1543. args: [],
  1544. source: unescape('commentStamp%0A%20%20%20%20%5EClassCommentReader%20new%0A%09class%3A%20self%3B%0A%09yourself'),
  1545. messageSends: ["class:", "yourself", "new"],
  1546. referencedClasses: ["ClassCommentReader"]
  1547. }),
  1548. smalltalk.Behavior);
  1549. smalltalk.addMethod(
  1550. unescape('_removeCompiledMethod_'),
  1551. smalltalk.method({
  1552. selector: unescape('removeCompiledMethod%3A'),
  1553. category: 'accessing',
  1554. fn: function (aMethod){
  1555. var self=this;
  1556. delete self.fn.prototype[aMethod.selector._asSelector()];
  1557. delete self.fn.prototype.methods[aMethod.selector];
  1558. smalltalk.init(self);;
  1559. return self;},
  1560. args: ["aMethod"],
  1561. source: unescape('removeCompiledMethod%3A%20aMethod%0A%09%3Cdelete%20self.fn.prototype%5BaMethod.selector._asSelector%28%29%5D%3B%0A%09delete%20self.fn.prototype.methods%5BaMethod.selector%5D%3B%0A%09smalltalk.init%28self%29%3B%3E'),
  1562. messageSends: [],
  1563. referencedClasses: []
  1564. }),
  1565. smalltalk.Behavior);
  1566. smalltalk.addMethod(
  1567. unescape('_inheritsFrom_'),
  1568. smalltalk.method({
  1569. selector: unescape('inheritsFrom%3A'),
  1570. category: 'instance creation',
  1571. fn: function (aClass){
  1572. var self=this;
  1573. return smalltalk.send(smalltalk.send(aClass, "_allSubclasses", []), "_includes_", [self]);
  1574. return self;},
  1575. args: ["aClass"],
  1576. source: unescape('inheritsFrom%3A%20aClass%0A%09%5EaClass%20allSubclasses%20includes%3A%20self'),
  1577. messageSends: ["includes:", "allSubclasses"],
  1578. referencedClasses: []
  1579. }),
  1580. smalltalk.Behavior);
  1581. smalltalk.addMethod(
  1582. unescape('_protocols'),
  1583. smalltalk.method({
  1584. selector: unescape('protocols'),
  1585. category: 'accessing',
  1586. fn: function (){
  1587. var self=this;
  1588. var protocols=nil;
  1589. protocols=smalltalk.send((smalltalk.Array || Array), "_new", []);
  1590. smalltalk.send(smalltalk.send(self, "_methodDictionary", []), "_do_", [(function(each){return ((($receiver = smalltalk.send(protocols, "_includes_", [smalltalk.send(each, "_category", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(protocols, "_add_", [smalltalk.send(each, "_category", [])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(protocols, "_add_", [smalltalk.send(each, "_category", [])]);})]));})]);
  1591. return smalltalk.send(protocols, "_sort", []);
  1592. return self;},
  1593. args: [],
  1594. source: unescape('protocols%0A%20%20%20%20%7C%20protocols%20%7C%0A%20%20%20%20protocols%20%3A%3D%20Array%20new.%0A%20%20%20%20self%20methodDictionary%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20%28protocols%20includes%3A%20each%20category%29%20ifFalse%3A%20%5B%0A%09%09protocols%20add%3A%20each%20category%5D%5D.%0A%20%20%20%20%5Eprotocols%20sort'),
  1595. messageSends: ["new", "do:", "methodDictionary", "ifFalse:", "includes:", "category", "add:", "sort"],
  1596. referencedClasses: ["Array"]
  1597. }),
  1598. smalltalk.Behavior);
  1599. smalltalk.addMethod(
  1600. unescape('_protocolsDo_'),
  1601. smalltalk.method({
  1602. selector: unescape('protocolsDo%3A'),
  1603. category: 'accessing',
  1604. fn: function (aBlock){
  1605. var self=this;
  1606. var methodsByCategory=nil;
  1607. methodsByCategory=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []);
  1608. smalltalk.send(smalltalk.send(smalltalk.send(self, "_methodDictionary", []), "_values", []), "_do_", [(function(m){return smalltalk.send(smalltalk.send(methodsByCategory, "_at_ifAbsentPut_", [smalltalk.send(m, "_category", []), (function(){return smalltalk.send((smalltalk.Array || Array), "_new", []);})]), "_add_", [m]);})]);
  1609. smalltalk.send(smalltalk.send(self, "_protocols", []), "_do_", [(function(category){return smalltalk.send(aBlock, "_value_value_", [category, smalltalk.send(methodsByCategory, "_at_", [category])]);})]);
  1610. return self;},
  1611. args: ["aBlock"],
  1612. source: unescape('protocolsDo%3A%20aBlock%0A%09%22Execute%20aBlock%20for%20each%20method%20category%20with%0A%09its%20collection%20of%20methods%20in%20the%20sort%20order%20of%20category%20name.%22%0A%0A%09%7C%20methodsByCategory%20%7C%0A%09methodsByCategory%20%3A%3D%20Dictionary%20new.%0A%09self%20methodDictionary%20values%20do%3A%20%5B%3Am%20%7C%0A%09%09%28methodsByCategory%20at%3A%20m%20category%20ifAbsentPut%3A%20%5BArray%20new%5D%29%0A%20%09%09%09add%3A%20m%5D.%20%0A%09self%20protocols%20do%3A%20%5B%3Acategory%20%7C%0A%09%09aBlock%20value%3A%20category%20value%3A%20%28methodsByCategory%20at%3A%20category%29%5D'),
  1613. messageSends: ["new", "do:", "values", "methodDictionary", "add:", "at:ifAbsentPut:", "category", "protocols", "value:value:", "at:"],
  1614. referencedClasses: ["Dictionary", "Array"]
  1615. }),
  1616. smalltalk.Behavior);
  1617. smalltalk.addMethod(
  1618. unescape('_allInstanceVariableNames'),
  1619. smalltalk.method({
  1620. selector: unescape('allInstanceVariableNames'),
  1621. category: 'accessing',
  1622. fn: function (){
  1623. var self=this;
  1624. var result=nil;
  1625. result=smalltalk.send(smalltalk.send(self, "_instanceVariableNames", []), "_copy", []);
  1626. (($receiver = smalltalk.send(self, "_superclass", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(result, "_addAll_", [smalltalk.send(smalltalk.send(self, "_superclass", []), "_allInstanceVariableNames", [])]);})() : nil;
  1627. return result;
  1628. return self;},
  1629. args: [],
  1630. source: unescape('allInstanceVariableNames%0A%09%7C%20result%20%7C%0A%09result%20%3A%3D%20self%20instanceVariableNames%20copy.%0A%09self%20superclass%20ifNotNil%3A%20%5B%0A%09%20%20%20%20result%20addAll%3A%20self%20superclass%20allInstanceVariableNames%5D.%0A%09%5Eresult'),
  1631. messageSends: ["copy", "instanceVariableNames", "ifNotNil:", "superclass", "addAll:", "allInstanceVariableNames"],
  1632. referencedClasses: []
  1633. }),
  1634. smalltalk.Behavior);
  1635. smalltalk.addMethod(
  1636. unescape('_methodAt_'),
  1637. smalltalk.method({
  1638. selector: unescape('methodAt%3A'),
  1639. category: 'accessing',
  1640. fn: function (aString){
  1641. var self=this;
  1642. return smalltalk.methods(self)[aString];
  1643. return self;},
  1644. args: ["aString"],
  1645. source: unescape('methodAt%3A%20aString%0A%09%3Creturn%20smalltalk.methods%28self%29%5BaString%5D%3E'),
  1646. messageSends: [],
  1647. referencedClasses: []
  1648. }),
  1649. smalltalk.Behavior);
  1650. smalltalk.addMethod(
  1651. unescape('_methodsFor_stamp_'),
  1652. smalltalk.method({
  1653. selector: unescape('methodsFor%3Astamp%3A'),
  1654. category: 'accessing',
  1655. fn: function (aString, aStamp){
  1656. var self=this;
  1657. return smalltalk.send(self, "_methodsFor_", [aString]);
  1658. return self;},
  1659. args: ["aString", "aStamp"],
  1660. source: unescape('methodsFor%3A%20aString%20stamp%3A%20aStamp%0A%09%22Added%20for%20compatibility%2C%20right%20now%20ignores%20stamp.%22%0A%09%5Eself%20methodsFor%3A%20aString'),
  1661. messageSends: ["methodsFor:"],
  1662. referencedClasses: []
  1663. }),
  1664. smalltalk.Behavior);
  1665. smalltalk.addMethod(
  1666. unescape('_commentStamp_prior_'),
  1667. smalltalk.method({
  1668. selector: unescape('commentStamp%3Aprior%3A'),
  1669. category: 'accessing',
  1670. fn: function (aStamp, prior){
  1671. var self=this;
  1672. return smalltalk.send(self, "_commentStamp", []);
  1673. return self;},
  1674. args: ["aStamp", "prior"],
  1675. source: unescape('commentStamp%3A%20aStamp%20prior%3A%20prior%0A%20%20%20%20%20%20%20%20%5Eself%20commentStamp'),
  1676. messageSends: ["commentStamp"],
  1677. referencedClasses: []
  1678. }),
  1679. smalltalk.Behavior);
  1680. smalltalk.addMethod(
  1681. unescape('_compile_'),
  1682. smalltalk.method({
  1683. selector: unescape('compile%3A'),
  1684. category: 'compiling',
  1685. fn: function (aString){
  1686. var self=this;
  1687. smalltalk.send(self, "_compile_category_", [aString, ""]);
  1688. return self;},
  1689. args: ["aString"],
  1690. source: unescape('compile%3A%20aString%0A%09self%20compile%3A%20aString%20category%3A%20%27%27'),
  1691. messageSends: ["compile:category:"],
  1692. referencedClasses: []
  1693. }),
  1694. smalltalk.Behavior);
  1695. smalltalk.addMethod(
  1696. unescape('_compile_category_'),
  1697. smalltalk.method({
  1698. selector: unescape('compile%3Acategory%3A'),
  1699. category: 'compiling',
  1700. fn: function (aString, anotherString){
  1701. var self=this;
  1702. var method=nil;
  1703. method=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_load_forClass_", [aString, self]);
  1704. smalltalk.send(method, "_category_", [anotherString]);
  1705. smalltalk.send(self, "_addCompiledMethod_", [method]);
  1706. return self;},
  1707. args: ["aString", "anotherString"],
  1708. source: unescape('compile%3A%20aString%20category%3A%20anotherString%0A%09%7C%20method%20%7C%0A%09method%20%3A%3D%20Compiler%20new%20load%3A%20aString%20forClass%3A%20self.%0A%09method%20category%3A%20anotherString.%0A%09self%20addCompiledMethod%3A%20method'),
  1709. messageSends: ["load:forClass:", "new", "category:", "addCompiledMethod:"],
  1710. referencedClasses: ["Compiler"]
  1711. }),
  1712. smalltalk.Behavior);
  1713. smalltalk.addClass('Class', smalltalk.Behavior, [], 'Kernel');
  1714. smalltalk.addMethod(
  1715. unescape('_category'),
  1716. smalltalk.method({
  1717. selector: unescape('category'),
  1718. category: 'accessing',
  1719. fn: function (){
  1720. var self=this;
  1721. return (($receiver = smalltalk.send(self, "_package", [])) == nil || $receiver == undefined) ? (function(){return "Unclassified";})() : (function(){return smalltalk.send(smalltalk.send(self, "_package", []), "_name", []);})();
  1722. return self;},
  1723. args: [],
  1724. source: unescape('category%0A%09%5Eself%20package%20ifNil%3A%20%5B%27Unclassified%27%5D%20ifNotNil%3A%20%5Bself%20package%20name%5D'),
  1725. messageSends: ["ifNil:ifNotNil:", "package", "name"],
  1726. referencedClasses: []
  1727. }),
  1728. smalltalk.Class);
  1729. smalltalk.addMethod(
  1730. unescape('_subclass_instanceVariableNames_'),
  1731. smalltalk.method({
  1732. selector: unescape('subclass%3AinstanceVariableNames%3A'),
  1733. category: 'class creation',
  1734. fn: function (aString, anotherString){
  1735. var self=this;
  1736. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, anotherString, nil]);
  1737. return self;},
  1738. args: ["aString", "anotherString"],
  1739. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20anotherString%0A%09%22Kept%20for%20compatibility.%22%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20anotherString%20package%3A%20nil'),
  1740. messageSends: ["subclass:instanceVariableNames:package:"],
  1741. referencedClasses: []
  1742. }),
  1743. smalltalk.Class);
  1744. smalltalk.addMethod(
  1745. unescape('_subclass_instanceVariableNames_category_'),
  1746. smalltalk.method({
  1747. selector: unescape('subclass%3AinstanceVariableNames%3Acategory%3A'),
  1748. category: 'class creation',
  1749. fn: function (aString, aString2, aString3){
  1750. var self=this;
  1751. smalltalk.send(self, "_deprecatedAPI", []);
  1752. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
  1753. return self;},
  1754. args: ["aString", "aString2", "aString3"],
  1755. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20category%3A%20aString3%0A%09%22Kept%20for%20compatibility.%22%0A%09self%20deprecatedAPI.%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3'),
  1756. messageSends: ["deprecatedAPI", "subclass:instanceVariableNames:package:"],
  1757. referencedClasses: []
  1758. }),
  1759. smalltalk.Class);
  1760. smalltalk.addMethod(
  1761. unescape('_isClass'),
  1762. smalltalk.method({
  1763. selector: unescape('isClass'),
  1764. category: 'testing',
  1765. fn: function (){
  1766. var self=this;
  1767. return true;
  1768. return self;},
  1769. args: [],
  1770. source: unescape('isClass%0A%09%5Etrue'),
  1771. messageSends: [],
  1772. referencedClasses: []
  1773. }),
  1774. smalltalk.Class);
  1775. smalltalk.addMethod(
  1776. unescape('_printString'),
  1777. smalltalk.method({
  1778. selector: unescape('printString'),
  1779. category: 'printing',
  1780. fn: function (){
  1781. var self=this;
  1782. return smalltalk.send(self, "_name", []);
  1783. return self;},
  1784. args: [],
  1785. source: unescape('printString%0A%09%5Eself%20name'),
  1786. messageSends: ["name"],
  1787. referencedClasses: []
  1788. }),
  1789. smalltalk.Class);
  1790. smalltalk.addMethod(
  1791. unescape('_rename_'),
  1792. smalltalk.method({
  1793. selector: unescape('rename%3A'),
  1794. category: 'accessing',
  1795. fn: function (aString){
  1796. var self=this;
  1797. smalltalk[aString] = self;
  1798. delete smalltalk[self.className];
  1799. self.className = aString;
  1800. ;
  1801. return self;},
  1802. args: ["aString"],
  1803. source: unescape('rename%3A%20aString%0A%09%3C%0A%09%09smalltalk%5BaString%5D%20%3D%20self%3B%0A%09%09delete%20smalltalk%5Bself.className%5D%3B%0A%09%09self.className%20%3D%20aString%3B%0A%09%3E'),
  1804. messageSends: [],
  1805. referencedClasses: []
  1806. }),
  1807. smalltalk.Class);
  1808. smalltalk.addMethod(
  1809. unescape('_subclass_instanceVariableNames_classVariableNames_poolDictionaries_category_'),
  1810. smalltalk.method({
  1811. selector: unescape('subclass%3AinstanceVariableNames%3AclassVariableNames%3ApoolDictionaries%3Acategory%3A'),
  1812. category: 'class creation',
  1813. fn: function (aString, aString2, classVars, pools, aString3){
  1814. var self=this;
  1815. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
  1816. return self;},
  1817. args: ["aString", "aString2", "classVars", "pools", "aString3"],
  1818. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20classVariableNames%3A%20classVars%20poolDictionaries%3A%20pools%20category%3A%20aString3%0A%09%22Just%20ignore%20class%20variables%20and%20pools.%20Added%20for%20compatibility.%22%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3'),
  1819. messageSends: ["subclass:instanceVariableNames:package:"],
  1820. referencedClasses: []
  1821. }),
  1822. smalltalk.Class);
  1823. smalltalk.addMethod(
  1824. unescape('_package'),
  1825. smalltalk.method({
  1826. selector: unescape('package'),
  1827. category: 'accessing',
  1828. fn: function (){
  1829. var self=this;
  1830. return self.pkg;
  1831. return self;},
  1832. args: [],
  1833. source: unescape('package%0A%09%3Creturn%20self.pkg%3E'),
  1834. messageSends: [],
  1835. referencedClasses: []
  1836. }),
  1837. smalltalk.Class);
  1838. smalltalk.addMethod(
  1839. unescape('_package_'),
  1840. smalltalk.method({
  1841. selector: unescape('package%3A'),
  1842. category: 'accessing',
  1843. fn: function (aPackage){
  1844. var self=this;
  1845. self.pkg = aPackage;
  1846. return self;},
  1847. args: ["aPackage"],
  1848. source: unescape('package%3A%20aPackage%0A%09%3Cself.pkg%20%3D%20aPackage%3E'),
  1849. messageSends: [],
  1850. referencedClasses: []
  1851. }),
  1852. smalltalk.Class);
  1853. smalltalk.addMethod(
  1854. unescape('_subclass_instanceVariableNames_package_'),
  1855. smalltalk.method({
  1856. selector: unescape('subclass%3AinstanceVariableNames%3Apackage%3A'),
  1857. category: 'class creation',
  1858. fn: function (aString, aString2, aString3){
  1859. var self=this;
  1860. return smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_superclass_subclass_instanceVariableNames_package_", [self, aString, aString2, aString3]);
  1861. return self;},
  1862. args: ["aString", "aString2", "aString3"],
  1863. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3%0A%09%5EClassBuilder%20new%0A%09%20%20%20%20superclass%3A%20self%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3'),
  1864. messageSends: ["superclass:subclass:instanceVariableNames:package:", "new"],
  1865. referencedClasses: ["ClassBuilder"]
  1866. }),
  1867. smalltalk.Class);
  1868. smalltalk.addClass('Metaclass', smalltalk.Behavior, [], 'Kernel');
  1869. smalltalk.addMethod(
  1870. unescape('_instanceClass'),
  1871. smalltalk.method({
  1872. selector: unescape('instanceClass'),
  1873. category: 'accessing',
  1874. fn: function (){
  1875. var self=this;
  1876. return self.instanceClass;
  1877. return self;},
  1878. args: [],
  1879. source: unescape('instanceClass%0A%09%3Creturn%20self.instanceClass%3E'),
  1880. messageSends: [],
  1881. referencedClasses: []
  1882. }),
  1883. smalltalk.Metaclass);
  1884. smalltalk.addMethod(
  1885. unescape('_instanceVariableNames_'),
  1886. smalltalk.method({
  1887. selector: unescape('instanceVariableNames%3A'),
  1888. category: 'accessing',
  1889. fn: function (aCollection){
  1890. var self=this;
  1891. smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_class_instanceVariableNames_", [self, aCollection]);
  1892. return self;},
  1893. args: ["aCollection"],
  1894. source: unescape('instanceVariableNames%3A%20aCollection%0A%09ClassBuilder%20new%0A%09%20%20%20%20class%3A%20self%20instanceVariableNames%3A%20aCollection'),
  1895. messageSends: ["class:instanceVariableNames:", "new"],
  1896. referencedClasses: ["ClassBuilder"]
  1897. }),
  1898. smalltalk.Metaclass);
  1899. smalltalk.addMethod(
  1900. unescape('_isMetaclass'),
  1901. smalltalk.method({
  1902. selector: unescape('isMetaclass'),
  1903. category: 'testing',
  1904. fn: function (){
  1905. var self=this;
  1906. return true;
  1907. return self;},
  1908. args: [],
  1909. source: unescape('isMetaclass%0A%09%5Etrue'),
  1910. messageSends: [],
  1911. referencedClasses: []
  1912. }),
  1913. smalltalk.Metaclass);
  1914. smalltalk.addMethod(
  1915. unescape('_printString'),
  1916. smalltalk.method({
  1917. selector: unescape('printString'),
  1918. category: 'printing',
  1919. fn: function (){
  1920. var self=this;
  1921. return smalltalk.send(smalltalk.send(smalltalk.send(self, "_instanceClass", []), "_name", []), "__comma", [" class"]);
  1922. return self;},
  1923. args: [],
  1924. source: unescape('printString%0A%09%5Eself%20instanceClass%20name%2C%20%27%20class%27'),
  1925. messageSends: [unescape("%2C"), "name", "instanceClass"],
  1926. referencedClasses: []
  1927. }),
  1928. smalltalk.Metaclass);
  1929. smalltalk.addClass('CompiledMethod', smalltalk.Object, [], 'Kernel');
  1930. smalltalk.addMethod(
  1931. unescape('_source'),
  1932. smalltalk.method({
  1933. selector: unescape('source'),
  1934. category: 'accessing',
  1935. fn: function (){
  1936. var self=this;
  1937. return (($receiver = smalltalk.send(self, "_basicAt_", ["source"])) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
  1938. return self;},
  1939. args: [],
  1940. source: unescape('source%0A%09%5E%28self%20basicAt%3A%20%27source%27%29%20ifNil%3A%20%5B%27%27%5D'),
  1941. messageSends: ["ifNil:", "basicAt:"],
  1942. referencedClasses: []
  1943. }),
  1944. smalltalk.CompiledMethod);
  1945. smalltalk.addMethod(
  1946. unescape('_source_'),
  1947. smalltalk.method({
  1948. selector: unescape('source%3A'),
  1949. category: 'accessing',
  1950. fn: function (aString){
  1951. var self=this;
  1952. smalltalk.send(self, "_basicAt_put_", ["source", aString]);
  1953. return self;},
  1954. args: ["aString"],
  1955. source: unescape('source%3A%20aString%0A%09self%20basicAt%3A%20%27source%27%20put%3A%20aString'),
  1956. messageSends: ["basicAt:put:"],
  1957. referencedClasses: []
  1958. }),
  1959. smalltalk.CompiledMethod);
  1960. smalltalk.addMethod(
  1961. unescape('_category'),
  1962. smalltalk.method({
  1963. selector: unescape('category'),
  1964. category: 'accessing',
  1965. fn: function (){
  1966. var self=this;
  1967. return (($receiver = smalltalk.send(self, "_basicAt_", ["category"])) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
  1968. return self;},
  1969. args: [],
  1970. source: unescape('category%0A%09%5E%28self%20basicAt%3A%20%27category%27%29%20ifNil%3A%20%5B%27%27%5D'),
  1971. messageSends: ["ifNil:", "basicAt:"],
  1972. referencedClasses: []
  1973. }),
  1974. smalltalk.CompiledMethod);
  1975. smalltalk.addMethod(
  1976. unescape('_category_'),
  1977. smalltalk.method({
  1978. selector: unescape('category%3A'),
  1979. category: 'accessing',
  1980. fn: function (aString){
  1981. var self=this;
  1982. smalltalk.send(self, "_basicAt_put_", ["category", aString]);
  1983. return self;},
  1984. args: ["aString"],
  1985. source: unescape('category%3A%20aString%0A%09self%20basicAt%3A%20%27category%27%20put%3A%20aString'),
  1986. messageSends: ["basicAt:put:"],
  1987. referencedClasses: []
  1988. }),
  1989. smalltalk.CompiledMethod);
  1990. smalltalk.addMethod(
  1991. unescape('_selector'),
  1992. smalltalk.method({
  1993. selector: unescape('selector'),
  1994. category: 'accessing',
  1995. fn: function (){
  1996. var self=this;
  1997. return smalltalk.send(self, "_basicAt_", ["selector"]);
  1998. return self;},
  1999. args: [],
  2000. source: unescape('selector%0A%09%5Eself%20basicAt%3A%20%27selector%27'),
  2001. messageSends: ["basicAt:"],
  2002. referencedClasses: []
  2003. }),
  2004. smalltalk.CompiledMethod);
  2005. smalltalk.addMethod(
  2006. unescape('_selector_'),
  2007. smalltalk.method({
  2008. selector: unescape('selector%3A'),
  2009. category: 'accessing',
  2010. fn: function (aString){
  2011. var self=this;
  2012. smalltalk.send(self, "_basicAt_put_", ["selector", aString]);
  2013. return self;},
  2014. args: ["aString"],
  2015. source: unescape('selector%3A%20aString%0A%09self%20basicAt%3A%20%27selector%27%20put%3A%20aString'),
  2016. messageSends: ["basicAt:put:"],
  2017. referencedClasses: []
  2018. }),
  2019. smalltalk.CompiledMethod);
  2020. smalltalk.addMethod(
  2021. unescape('_fn'),
  2022. smalltalk.method({
  2023. selector: unescape('fn'),
  2024. category: 'accessing',
  2025. fn: function (){
  2026. var self=this;
  2027. return smalltalk.send(self, "_basicAt_", ["fn"]);
  2028. return self;},
  2029. args: [],
  2030. source: unescape('fn%0A%09%5Eself%20basicAt%3A%20%27fn%27'),
  2031. messageSends: ["basicAt:"],
  2032. referencedClasses: []
  2033. }),
  2034. smalltalk.CompiledMethod);
  2035. smalltalk.addMethod(
  2036. unescape('_fn_'),
  2037. smalltalk.method({
  2038. selector: unescape('fn%3A'),
  2039. category: 'accessing',
  2040. fn: function (aBlock){
  2041. var self=this;
  2042. smalltalk.send(self, "_basicAt_put_", ["fn", aBlock]);
  2043. return self;},
  2044. args: ["aBlock"],
  2045. source: unescape('fn%3A%20aBlock%0A%09self%20basicAt%3A%20%27fn%27%20put%3A%20aBlock'),
  2046. messageSends: ["basicAt:put:"],
  2047. referencedClasses: []
  2048. }),
  2049. smalltalk.CompiledMethod);
  2050. smalltalk.addMethod(
  2051. unescape('_messageSends'),
  2052. smalltalk.method({
  2053. selector: unescape('messageSends'),
  2054. category: 'accessing',
  2055. fn: function (){
  2056. var self=this;
  2057. return smalltalk.send(self, "_basicAt_", ["messageSends"]);
  2058. return self;},
  2059. args: [],
  2060. source: unescape('messageSends%0A%09%5Eself%20basicAt%3A%20%27messageSends%27'),
  2061. messageSends: ["basicAt:"],
  2062. referencedClasses: []
  2063. }),
  2064. smalltalk.CompiledMethod);
  2065. smalltalk.addMethod(
  2066. unescape('_methodClass'),
  2067. smalltalk.method({
  2068. selector: unescape('methodClass'),
  2069. category: 'accessing',
  2070. fn: function (){
  2071. var self=this;
  2072. return smalltalk.send(self, "_basicAt_", ["methodClass"]);
  2073. return self;},
  2074. args: [],
  2075. source: unescape('methodClass%0A%09%5Eself%20basicAt%3A%20%27methodClass%27'),
  2076. messageSends: ["basicAt:"],
  2077. referencedClasses: []
  2078. }),
  2079. smalltalk.CompiledMethod);
  2080. smalltalk.addMethod(
  2081. unescape('_referencedClasses'),
  2082. smalltalk.method({
  2083. selector: unescape('referencedClasses'),
  2084. category: 'accessing',
  2085. fn: function (){
  2086. var self=this;
  2087. return smalltalk.send(self, "_basicAt_", ["referencedClasses"]);
  2088. return self;},
  2089. args: [],
  2090. source: unescape('referencedClasses%0A%09%5Eself%20basicAt%3A%20%27referencedClasses%27'),
  2091. messageSends: ["basicAt:"],
  2092. referencedClasses: []
  2093. }),
  2094. smalltalk.CompiledMethod);
  2095. smalltalk.addMethod(
  2096. unescape('_arguments'),
  2097. smalltalk.method({
  2098. selector: unescape('arguments'),
  2099. category: 'accessing',
  2100. fn: function (){
  2101. var self=this;
  2102. return self.args || [];
  2103. return self;},
  2104. args: [],
  2105. source: unescape('arguments%0A%09%3Creturn%20self.args%20%7C%7C%20%5B%5D%3E'),
  2106. messageSends: [],
  2107. referencedClasses: []
  2108. }),
  2109. smalltalk.CompiledMethod);
  2110. smalltalk.addClass('Number', smalltalk.Object, [], 'Kernel');
  2111. smalltalk.addMethod(
  2112. unescape('__eq'),
  2113. smalltalk.method({
  2114. selector: unescape('%3D'),
  2115. category: 'comparing',
  2116. fn: function (aNumber){
  2117. var self=this;
  2118. try{((($receiver = smalltalk.send(smalltalk.send(aNumber, "_class", []), "__eq", [smalltalk.send(self, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));
  2119. return Number(self) == aNumber;
  2120. return self;
  2121. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
  2122. args: ["aNumber"],
  2123. source: unescape('%3D%20aNumber%0A%09aNumber%20class%20%3D%20self%20class%20ifFalse%3A%20%5B%5Efalse%5D.%20%0A%09%3Creturn%20Number%28self%29%20%3D%3D%20aNumber%3E'),
  2124. messageSends: ["ifFalse:", unescape("%3D"), "class"],
  2125. referencedClasses: []
  2126. }),
  2127. smalltalk.Number);
  2128. smalltalk.addMethod(
  2129. unescape('__gt'),
  2130. smalltalk.method({
  2131. selector: unescape('%3E'),
  2132. category: 'comparing',
  2133. fn: function (aNumber){
  2134. var self=this;
  2135. return self > aNumber;
  2136. return self;},
  2137. args: ["aNumber"],
  2138. source: unescape('%3E%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20%3E%3E%20aNumber%3E'),
  2139. messageSends: [],
  2140. referencedClasses: []
  2141. }),
  2142. smalltalk.Number);
  2143. smalltalk.addMethod(
  2144. unescape('__lt'),
  2145. smalltalk.method({
  2146. selector: unescape('%3C'),
  2147. category: 'comparing',
  2148. fn: function (aNumber){
  2149. var self=this;
  2150. return self < aNumber;
  2151. return self;},
  2152. args: ["aNumber"],
  2153. source: unescape('%3C%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20%3C%20aNumber%3E'),
  2154. messageSends: [],
  2155. referencedClasses: []
  2156. }),
  2157. smalltalk.Number);
  2158. smalltalk.addMethod(
  2159. unescape('__gt_eq'),
  2160. smalltalk.method({
  2161. selector: unescape('%3E%3D'),
  2162. category: 'comparing',
  2163. fn: function (aNumber){
  2164. var self=this;
  2165. return self >= aNumber;
  2166. return self;},
  2167. args: ["aNumber"],
  2168. source: unescape('%3E%3D%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20%3E%3E%3D%20aNumber%3E'),
  2169. messageSends: [],
  2170. referencedClasses: []
  2171. }),
  2172. smalltalk.Number);
  2173. smalltalk.addMethod(
  2174. unescape('__lt_eq'),
  2175. smalltalk.method({
  2176. selector: unescape('%3C%3D'),
  2177. category: 'comparing',
  2178. fn: function (aNumber){
  2179. var self=this;
  2180. return self <= aNumber;
  2181. return self;},
  2182. args: ["aNumber"],
  2183. source: unescape('%3C%3D%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20%3C%3D%20aNumber%3E'),
  2184. messageSends: [],
  2185. referencedClasses: []
  2186. }),
  2187. smalltalk.Number);
  2188. smalltalk.addMethod(
  2189. unescape('__plus'),
  2190. smalltalk.method({
  2191. selector: unescape('+'),
  2192. category: 'arithmetic',
  2193. fn: function (aNumber){
  2194. var self=this;
  2195. return self + aNumber;
  2196. return self;},
  2197. args: ["aNumber"],
  2198. source: unescape('+%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20+%20aNumber%3E'),
  2199. messageSends: [],
  2200. referencedClasses: []
  2201. }),
  2202. smalltalk.Number);
  2203. smalltalk.addMethod(
  2204. unescape('__minus'),
  2205. smalltalk.method({
  2206. selector: unescape('-'),
  2207. category: 'arithmetic',
  2208. fn: function (aNumber){
  2209. var self=this;
  2210. return self - aNumber;
  2211. return self;},
  2212. args: ["aNumber"],
  2213. source: unescape('-%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20-%20aNumber%3E'),
  2214. messageSends: [],
  2215. referencedClasses: []
  2216. }),
  2217. smalltalk.Number);
  2218. smalltalk.addMethod(
  2219. unescape('__star'),
  2220. smalltalk.method({
  2221. selector: unescape('*'),
  2222. category: 'arithmetic',
  2223. fn: function (aNumber){
  2224. var self=this;
  2225. return self * aNumber;
  2226. return self;},
  2227. args: ["aNumber"],
  2228. source: unescape('*%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20*%20aNumber%3E'),
  2229. messageSends: [],
  2230. referencedClasses: []
  2231. }),
  2232. smalltalk.Number);
  2233. smalltalk.addMethod(
  2234. unescape('__slash'),
  2235. smalltalk.method({
  2236. selector: unescape('/'),
  2237. category: 'arithmetic',
  2238. fn: function (aNumber){
  2239. var self=this;
  2240. return self / aNumber;
  2241. return self;},
  2242. args: ["aNumber"],
  2243. source: unescape('/%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20/%20aNumber%3E'),
  2244. messageSends: [],
  2245. referencedClasses: []
  2246. }),
  2247. smalltalk.Number);
  2248. smalltalk.addMethod(
  2249. unescape('_max_'),
  2250. smalltalk.method({
  2251. selector: unescape('max%3A'),
  2252. category: 'arithmetic',
  2253. fn: function (aNumber){
  2254. var self=this;
  2255. return Math.max(self, aNumber);;
  2256. return self;},
  2257. args: ["aNumber"],
  2258. source: unescape('max%3A%20aNumber%0A%09%3Creturn%20Math.max%28self%2C%20aNumber%29%3B%3E'),
  2259. messageSends: [],
  2260. referencedClasses: []
  2261. }),
  2262. smalltalk.Number);
  2263. smalltalk.addMethod(
  2264. unescape('_min_'),
  2265. smalltalk.method({
  2266. selector: unescape('min%3A'),
  2267. category: 'arithmetic',
  2268. fn: function (aNumber){
  2269. var self=this;
  2270. return Math.min(self, aNumber);;
  2271. return self;},
  2272. args: ["aNumber"],
  2273. source: unescape('min%3A%20aNumber%0A%09%3Creturn%20Math.min%28self%2C%20aNumber%29%3B%3E'),
  2274. messageSends: [],
  2275. referencedClasses: []
  2276. }),
  2277. smalltalk.Number);
  2278. smalltalk.addMethod(
  2279. unescape('_rounded'),
  2280. smalltalk.method({
  2281. selector: unescape('rounded'),
  2282. category: 'converting',
  2283. fn: function (){
  2284. var self=this;
  2285. return Math.round(self);;
  2286. return self;},
  2287. args: [],
  2288. source: unescape('rounded%0A%09%3Creturn%20Math.round%28self%29%3B%3E'),
  2289. messageSends: [],
  2290. referencedClasses: []
  2291. }),
  2292. smalltalk.Number);
  2293. smalltalk.addMethod(
  2294. unescape('_truncated'),
  2295. smalltalk.method({
  2296. selector: unescape('truncated'),
  2297. category: 'converting',
  2298. fn: function (){
  2299. var self=this;
  2300. var result=nil;
  2301. ((($receiver = self >= (0)).klass === smalltalk.Boolean) ? ($receiver ? (function(){return result = Math.floor(self);;})() : (function(){return result = (Math.floor(self * (-1)) * (-1));;})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return result = Math.floor(self);;}), (function(){return result = (Math.floor(self * (-1)) * (-1));;})]));
  2302. return result;
  2303. return self;},
  2304. args: [],
  2305. source: unescape('truncated%0A%7Cresult%7C%0A%0A%20%20%20%20self%20%3E%3D%200%20%0A%20%20%20%20%20%20%20%20ifTrue%3A%20%5B%3Cresult%20%3D%20Math.floor%28self%29%3B%3E%5D%0A%20%20%20%20%20%20%20%20ifFalse%3A%20%5B%3Cresult%20%3D%20%28Math.floor%28self%20*%20%28-1%29%29%20*%20%28-1%29%29%3B%3E%5D.%0A%0A%20%20%20%20%5E%20result'),
  2306. messageSends: ["ifTrue:ifFalse:", unescape("%3E%3D")],
  2307. referencedClasses: []
  2308. }),
  2309. smalltalk.Number);
  2310. smalltalk.addMethod(
  2311. unescape('_to_'),
  2312. smalltalk.method({
  2313. selector: unescape('to%3A'),
  2314. category: 'converting',
  2315. fn: function (aNumber){
  2316. var self=this;
  2317. var array=nil;
  2318. var first=nil;
  2319. var last=nil;
  2320. var count=nil;
  2321. first=smalltalk.send(self, "_truncated", []);
  2322. last=((($receiver = smalltalk.send(aNumber, "_truncated", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));
  2323. count=(1);
  2324. array=smalltalk.send((smalltalk.Array || Array), "_new", []);
  2325. smalltalk.send(((($receiver = last).klass === smalltalk.Number) ? $receiver -first : smalltalk.send($receiver, "__minus", [first])), "_timesRepeat_", [(function(){smalltalk.send(array, "_at_put_", [count, first]);count=((($receiver = count).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));return first=((($receiver = first).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));})]);
  2326. return array;
  2327. return self;},
  2328. args: ["aNumber"],
  2329. source: unescape('to%3A%20aNumber%0A%09%7C%20array%20first%20last%20count%20%7C%0A%09first%20%3A%3D%20self%20truncated.%0A%09last%20%3A%3D%20aNumber%20truncated%20+%201.%0A%09count%20%3A%3D%201.%0A%09array%20%3A%3D%20Array%20new.%0A%09%28last%20-%20first%29%20timesRepeat%3A%20%5B%0A%09%20%20%20%20array%20at%3A%20count%20put%3A%20first.%0A%09%20%20%20%20count%20%3A%3D%20count%20+%201.%0A%09%20%20%20%20first%20%3A%3D%20first%20+%201%5D.%0A%09%5Earray'),
  2330. messageSends: ["truncated", unescape("+"), "new", "timesRepeat:", unescape("-"), "at:put:"],
  2331. referencedClasses: ["Array"]
  2332. }),
  2333. smalltalk.Number);
  2334. smalltalk.addMethod(
  2335. unescape('_timesRepeat_'),
  2336. smalltalk.method({
  2337. selector: unescape('timesRepeat%3A'),
  2338. category: 'enumerating',
  2339. fn: function (aBlock){
  2340. var self=this;
  2341. var integer=nil;
  2342. var count=nil;
  2343. integer=smalltalk.send(self, "_truncated", []);
  2344. count=(1);
  2345. (function(){while(!(function(){return ((($receiver = count).klass === smalltalk.Number) ? $receiver >self : smalltalk.send($receiver, "__gt", [self]));})()) {(function(){smalltalk.send(aBlock, "_value", []);return count=((($receiver = count).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));})()}})();
  2346. return self;},
  2347. args: ["aBlock"],
  2348. source: unescape('timesRepeat%3A%20aBlock%0A%09%7C%20integer%20count%20%7C%0A%09integer%20%3A%3D%20self%20truncated.%0A%09count%20%3A%3D%201.%0A%09%5Bcount%20%3E%20self%5D%20whileFalse%3A%20%5B%0A%09%20%20%20%20aBlock%20value.%0A%09%20%20%20%20count%20%3A%3D%20count%20+%201%5D'),
  2349. messageSends: ["truncated", "whileFalse:", unescape("%3E"), "value", unescape("+")],
  2350. referencedClasses: []
  2351. }),
  2352. smalltalk.Number);
  2353. smalltalk.addMethod(
  2354. unescape('_to_do_'),
  2355. smalltalk.method({
  2356. selector: unescape('to%3Ado%3A'),
  2357. category: 'enumerating',
  2358. fn: function (stop, aBlock){
  2359. var self=this;
  2360. var nextValue=nil;
  2361. nextValue=self;
  2362. (function(){while((function(){return ((($receiver = nextValue).klass === smalltalk.Number) ? $receiver <=stop : smalltalk.send($receiver, "__lt_eq", [stop]));})()) {(function(){smalltalk.send(aBlock, "_value_", [nextValue]);return nextValue=((($receiver = nextValue).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));})()}})();
  2363. return self;},
  2364. args: ["stop", "aBlock"],
  2365. source: unescape('to%3A%20stop%20do%3A%20aBlock%0A%09%22Evaluate%20aBlock%20for%20each%20number%20from%20self%20to%20aNumber.%22%0A%09%7C%20nextValue%20%7C%0A%09nextValue%20%3A%3D%20self.%0A%09%5BnextValue%20%3C%3D%20stop%5D%0A%09%09whileTrue%3A%20%0A%09%09%09%5BaBlock%20value%3A%20nextValue.%0A%09%09%09nextValue%20%3A%3D%20nextValue%20+%201%5D'),
  2366. messageSends: ["whileTrue:", unescape("%3C%3D"), "value:", unescape("+")],
  2367. referencedClasses: []
  2368. }),
  2369. smalltalk.Number);
  2370. smalltalk.addMethod(
  2371. unescape('_asString'),
  2372. smalltalk.method({
  2373. selector: unescape('asString'),
  2374. category: 'converting',
  2375. fn: function (){
  2376. var self=this;
  2377. return smalltalk.send(self, "_printString", []);
  2378. return self;},
  2379. args: [],
  2380. source: unescape('asString%0A%09%5Eself%20printString'),
  2381. messageSends: ["printString"],
  2382. referencedClasses: []
  2383. }),
  2384. smalltalk.Number);
  2385. smalltalk.addMethod(
  2386. unescape('_asJavascript'),
  2387. smalltalk.method({
  2388. selector: unescape('asJavascript'),
  2389. category: 'converting',
  2390. fn: function (){
  2391. var self=this;
  2392. return smalltalk.send(smalltalk.send(unescape("%28"), "__comma", [smalltalk.send(self, "_printString", [])]), "__comma", [unescape("%29")]);
  2393. return self;},
  2394. args: [],
  2395. source: unescape('asJavascript%0A%09%5E%27%28%27%2C%20self%20printString%2C%20%27%29%27'),
  2396. messageSends: [unescape("%2C"), "printString"],
  2397. referencedClasses: []
  2398. }),
  2399. smalltalk.Number);
  2400. smalltalk.addMethod(
  2401. unescape('_printString'),
  2402. smalltalk.method({
  2403. selector: unescape('printString'),
  2404. category: 'printing',
  2405. fn: function (){
  2406. var self=this;
  2407. return String(self);
  2408. return self;},
  2409. args: [],
  2410. source: unescape('printString%0A%09%3Creturn%20String%28self%29%3E'),
  2411. messageSends: [],
  2412. referencedClasses: []
  2413. }),
  2414. smalltalk.Number);
  2415. smalltalk.addMethod(
  2416. unescape('_isNumber'),
  2417. smalltalk.method({
  2418. selector: unescape('isNumber'),
  2419. category: 'testing',
  2420. fn: function (){
  2421. var self=this;
  2422. return true;
  2423. return self;},
  2424. args: [],
  2425. source: unescape('isNumber%0A%09%5Etrue'),
  2426. messageSends: [],
  2427. referencedClasses: []
  2428. }),
  2429. smalltalk.Number);
  2430. smalltalk.addMethod(
  2431. unescape('_atRandom'),
  2432. smalltalk.method({
  2433. selector: unescape('atRandom'),
  2434. category: 'converting',
  2435. fn: function (){
  2436. var self=this;
  2437. return ((($receiver = smalltalk.send(((($receiver = smalltalk.send(smalltalk.send((smalltalk.Random || Random), "_new", []), "_next", [])).klass === smalltalk.Number) ? $receiver *self : smalltalk.send($receiver, "__star", [self])), "_truncated", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));
  2438. return self;},
  2439. args: [],
  2440. source: unescape('atRandom%0A%20%20%20%20%5E%28Random%20new%20next%20*%20self%29%20truncated%20+%201'),
  2441. messageSends: [unescape("+"), "truncated", unescape("*"), "next", "new"],
  2442. referencedClasses: ["Random"]
  2443. }),
  2444. smalltalk.Number);
  2445. smalltalk.addMethod(
  2446. unescape('__at'),
  2447. smalltalk.method({
  2448. selector: unescape('@'),
  2449. category: 'converting',
  2450. fn: function (aNumber){
  2451. var self=this;
  2452. return smalltalk.send((smalltalk.Point || Point), "_x_y_", [self, aNumber]);
  2453. return self;},
  2454. args: ["aNumber"],
  2455. source: unescape('@%20aNumber%0A%09%5EPoint%20x%3A%20self%20y%3A%20aNumber'),
  2456. messageSends: ["x:y:"],
  2457. referencedClasses: ["Point"]
  2458. }),
  2459. smalltalk.Number);
  2460. smalltalk.addMethod(
  2461. unescape('_asPoint'),
  2462. smalltalk.method({
  2463. selector: unescape('asPoint'),
  2464. category: 'converting',
  2465. fn: function (){
  2466. var self=this;
  2467. return smalltalk.send((smalltalk.Point || Point), "_x_y_", [self, self]);
  2468. return self;},
  2469. args: [],
  2470. source: unescape('asPoint%0A%09%5EPoint%20x%3A%20self%20y%3A%20self'),
  2471. messageSends: ["x:y:"],
  2472. referencedClasses: ["Point"]
  2473. }),
  2474. smalltalk.Number);
  2475. smalltalk.addMethod(
  2476. unescape('_clearInterval'),
  2477. smalltalk.method({
  2478. selector: unescape('clearInterval'),
  2479. category: 'timeouts/intervals',
  2480. fn: function (){
  2481. var self=this;
  2482. clearInterval(Number(self));
  2483. return self;},
  2484. args: [],
  2485. source: unescape('clearInterval%0A%09%3CclearInterval%28Number%28self%29%29%3E'),
  2486. messageSends: [],
  2487. referencedClasses: []
  2488. }),
  2489. smalltalk.Number);
  2490. smalltalk.addMethod(
  2491. unescape('_clearTimeout'),
  2492. smalltalk.method({
  2493. selector: unescape('clearTimeout'),
  2494. category: 'timeouts/intervals',
  2495. fn: function (){
  2496. var self=this;
  2497. clearTimeout(Number(self));
  2498. return self;},
  2499. args: [],
  2500. source: unescape('clearTimeout%0A%09%3CclearTimeout%28Number%28self%29%29%3E'),
  2501. messageSends: [],
  2502. referencedClasses: []
  2503. }),
  2504. smalltalk.Number);
  2505. smalltalk.addMethod(
  2506. unescape('_even'),
  2507. smalltalk.method({
  2508. selector: unescape('even'),
  2509. category: 'testing',
  2510. fn: function (){
  2511. var self=this;
  2512. return smalltalk.send((0), "__eq", [smalltalk.send(self, "_\\\\", [(2)])]);
  2513. return self;},
  2514. args: [],
  2515. source: unescape('even%0A%09%5E%200%20%3D%20%28self%20%5C%5C%202%29'),
  2516. messageSends: [unescape("%3D"), unescape("%5C%5C%5C%5C")],
  2517. referencedClasses: []
  2518. }),
  2519. smalltalk.Number);
  2520. smalltalk.addMethod(
  2521. unescape('_odd'),
  2522. smalltalk.method({
  2523. selector: unescape('odd'),
  2524. category: 'testing',
  2525. fn: function (){
  2526. var self=this;
  2527. return smalltalk.send(smalltalk.send(self, "_even", []), "_not", []);
  2528. return self;},
  2529. args: [],
  2530. source: unescape('odd%0A%09%5E%20self%20even%20not'),
  2531. messageSends: ["not", "even"],
  2532. referencedClasses: []
  2533. }),
  2534. smalltalk.Number);
  2535. smalltalk.addMethod(
  2536. unescape('_negated'),
  2537. smalltalk.method({
  2538. selector: unescape('negated'),
  2539. category: 'arithmetic',
  2540. fn: function (){
  2541. var self=this;
  2542. return (0) - self;
  2543. return self;},
  2544. args: [],
  2545. source: unescape('negated%0A%09%5E0%20-%20self'),
  2546. messageSends: [unescape("-")],
  2547. referencedClasses: []
  2548. }),
  2549. smalltalk.Number);
  2550. smalltalk.addMethod(
  2551. unescape('__eq_eq'),
  2552. smalltalk.method({
  2553. selector: unescape('%3D%3D'),
  2554. category: 'comparing',
  2555. fn: function (aNumber){
  2556. var self=this;
  2557. try{((($receiver = smalltalk.send(smalltalk.send(aNumber, "_class", []), "__eq", [smalltalk.send(self, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq_eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq_eq', fn: function(){return false}})})();})]));
  2558. return Number(self) === Number(aNumber);
  2559. return self;
  2560. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq_eq'){return e.fn()} throw(e)}},
  2561. args: ["aNumber"],
  2562. source: unescape('%3D%3D%20aNumber%0A%09aNumber%20class%20%3D%20self%20class%20ifFalse%3A%20%5B%5Efalse%5D.%20%0A%09%3Creturn%20Number%28self%29%20%3D%3D%3D%20Number%28aNumber%29%3E'),
  2563. messageSends: ["ifFalse:", unescape("%3D"), "class"],
  2564. referencedClasses: []
  2565. }),
  2566. smalltalk.Number);
  2567. smalltalk.addMethod(
  2568. unescape('_printShowingDecimalPlaces_'),
  2569. smalltalk.method({
  2570. selector: unescape('printShowingDecimalPlaces%3A'),
  2571. category: 'printing',
  2572. fn: function (placesDesired){
  2573. var self=this;
  2574. return self.toFixed(placesDesired);
  2575. return self;},
  2576. args: ["placesDesired"],
  2577. source: unescape('printShowingDecimalPlaces%3A%20placesDesired%0A%09%3Creturn%20self.toFixed%28placesDesired%29%3E'),
  2578. messageSends: [],
  2579. referencedClasses: []
  2580. }),
  2581. smalltalk.Number);
  2582. smalltalk.addMethod(
  2583. unescape('_%5C'),
  2584. smalltalk.method({
  2585. selector: unescape('%5C'),
  2586. category: '',
  2587. fn: function (aNumber){
  2588. var self=this;
  2589. return self % aNumber;
  2590. return self;},
  2591. args: ["aNumber"],
  2592. source: unescape(''),
  2593. messageSends: [],
  2594. referencedClasses: []
  2595. }),
  2596. smalltalk.Number);
  2597. smalltalk.addMethod(
  2598. unescape('_to_by_'),
  2599. smalltalk.method({
  2600. selector: unescape('to%3Aby%3A'),
  2601. category: 'converting',
  2602. fn: function (stop, step){
  2603. var self=this;
  2604. var array=nil;
  2605. var value=nil;
  2606. var pos=nil;
  2607. value=self;
  2608. array=smalltalk.send((smalltalk.Array || Array), "_new", []);
  2609. pos=(1);
  2610. ((($receiver = smalltalk.send(step, "__eq", [(0)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_error_", [unescape("step%20must%20be%20non-zero")]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self, "_error_", [unescape("step%20must%20be%20non-zero")]);})]));
  2611. ((($receiver = ((($receiver = step).klass === smalltalk.Number) ? $receiver <(0) : smalltalk.send($receiver, "__lt", [(0)]))).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver >=stop : smalltalk.send($receiver, "__gt_eq", [stop]));})()) {(function(){smalltalk.send(array, "_at_put_", [pos, value]);pos=((($receiver = pos).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));return value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step]));})()}})();})() : (function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver <=stop : smalltalk.send($receiver, "__lt_eq", [stop]));})()) {(function(){smalltalk.send(array, "_at_put_", [pos, value]);pos=((($receiver = pos).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));return value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step]));})()}})();})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver >=stop : smalltalk.send($receiver, "__gt_eq", [stop]));})()) {(function(){smalltalk.send(array, "_at_put_", [pos, value]);pos=((($receiver = pos).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));return value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step]));})()}})();}), (function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver <=stop : smalltalk.send($receiver, "__lt_eq", [stop]));})()) {(function(){smalltalk.send(array, "_at_put_", [pos, value]);pos=((($receiver = pos).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));return value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step]));})()}})();})]));
  2612. return array;
  2613. return self;},
  2614. args: ["stop", "step"],
  2615. source: unescape('to%3A%20stop%20by%3A%20step%0A%09%7C%20array%20value%20pos%20%7C%0A%09value%20%3A%3D%20self.%0A%09array%20%3A%3D%20Array%20new.%0A%09pos%20%3A%3D%201.%0A%09step%20%3D%200%20ifTrue%3A%20%5Bself%20error%3A%20%27step%20must%20be%20non-zero%27%5D.%0A%09step%20%3C%200%0A%09%09ifTrue%3A%20%5B%5B%20value%20%3E%3D%20stop%20%5D%20whileTrue%3A%20%5B%0A%09%20%20%20%20%09%09%09array%20at%3A%20pos%20put%3A%20value.%0A%09%20%20%20%20%09%09%09pos%20%3A%3D%20pos%20+%201.%0A%09%20%20%20%20%09%09%09value%20%3A%3D%20value%20+%20step%5D%5D%0A%09%09ifFalse%3A%20%5B%5B%20value%20%3C%3D%20stop%20%5D%20whileTrue%3A%20%5B%0A%09%20%20%20%20%09%09%09array%20at%3A%20pos%20put%3A%20value.%0A%09%20%20%09%09%09pos%20%3A%3D%20pos%20+%201.%0A%09%20%20%20%20%09%09%09value%20%3A%3D%20value%20+%20step%5D%5D.%0A%09%5Earray'),
  2616. messageSends: ["new", "ifTrue:", unescape("%3D"), "error:", "ifTrue:ifFalse:", unescape("%3C"), "whileTrue:", unescape("%3E%3D"), "at:put:", unescape("+"), unescape("%3C%3D")],
  2617. referencedClasses: ["Array"]
  2618. }),
  2619. smalltalk.Number);
  2620. smalltalk.addMethod(
  2621. unescape('_to_by_do_'),
  2622. smalltalk.method({
  2623. selector: unescape('to%3Aby%3Ado%3A'),
  2624. category: 'enumerating',
  2625. fn: function (stop, step, aBlock){
  2626. var self=this;
  2627. var value=nil;
  2628. value=self;
  2629. ((($receiver = smalltalk.send(step, "__eq", [(0)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_error_", [unescape("step%20must%20be%20non-zero")]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self, "_error_", [unescape("step%20must%20be%20non-zero")]);})]));
  2630. ((($receiver = ((($receiver = step).klass === smalltalk.Number) ? $receiver <(0) : smalltalk.send($receiver, "__lt", [(0)]))).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver >=stop : smalltalk.send($receiver, "__gt_eq", [stop]));})()) {(function(){smalltalk.send(aBlock, "_value_", [value]);return value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step]));})()}})();})() : (function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver <=stop : smalltalk.send($receiver, "__lt_eq", [stop]));})()) {(function(){smalltalk.send(aBlock, "_value_", [value]);return value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step]));})()}})();})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver >=stop : smalltalk.send($receiver, "__gt_eq", [stop]));})()) {(function(){smalltalk.send(aBlock, "_value_", [value]);return value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step]));})()}})();}), (function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver <=stop : smalltalk.send($receiver, "__lt_eq", [stop]));})()) {(function(){smalltalk.send(aBlock, "_value_", [value]);return value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step]));})()}})();})]));
  2631. return self;},
  2632. args: ["stop", "step", "aBlock"],
  2633. source: unescape('to%3A%20stop%20by%3A%20step%20do%3A%20aBlock%0A%09%7C%20value%20%7C%0A%09value%20%3A%3D%20self.%0A%09step%20%3D%200%20ifTrue%3A%20%5Bself%20error%3A%20%27step%20must%20be%20non-zero%27%5D.%0A%09step%20%3C%200%0A%09%09ifTrue%3A%20%5B%5B%20value%20%3E%3D%20stop%20%5D%20whileTrue%3A%20%5B%0A%09%20%20%20%20%09%09%09aBlock%20value%3A%20value.%0A%09%20%20%20%20%09%09%09value%20%3A%3D%20value%20+%20step%5D%5D%0A%09%09ifFalse%3A%20%5B%5B%20value%20%3C%3D%20stop%20%5D%20whileTrue%3A%20%5B%0A%09%20%20%20%20%09%09%09aBlock%20value%3A%20value.%0A%09%20%20%20%20%09%09%09value%20%3A%3D%20value%20+%20step%5D%5D'),
  2634. messageSends: ["ifTrue:", unescape("%3D"), "error:", "ifTrue:ifFalse:", unescape("%3C"), "whileTrue:", unescape("%3E%3D"), "value:", unescape("+"), unescape("%3C%3D")],
  2635. referencedClasses: []
  2636. }),
  2637. smalltalk.Number);
  2638. smalltalk.addMethod(
  2639. unescape('_deepCopy'),
  2640. smalltalk.method({
  2641. selector: unescape('deepCopy'),
  2642. category: 'copying',
  2643. fn: function (){
  2644. var self=this;
  2645. return smalltalk.send(self, "_copy", []);
  2646. return self;},
  2647. args: [],
  2648. source: unescape('deepCopy%0A%09%5Eself%20copy'),
  2649. messageSends: ["copy"],
  2650. referencedClasses: []
  2651. }),
  2652. smalltalk.Number);
  2653. smalltalk.addMethod(
  2654. unescape('_copy'),
  2655. smalltalk.method({
  2656. selector: unescape('copy'),
  2657. category: 'copying',
  2658. fn: function (){
  2659. var self=this;
  2660. return self;
  2661. return self;},
  2662. args: [],
  2663. source: unescape('copy%0A%09%5Eself'),
  2664. messageSends: [],
  2665. referencedClasses: []
  2666. }),
  2667. smalltalk.Number);
  2668. smalltalk.addMethod(
  2669. unescape('_%5C%5C'),
  2670. smalltalk.method({
  2671. selector: unescape('%5C%5C'),
  2672. category: 'arithmetic',
  2673. fn: function (aNumber){
  2674. var self=this;
  2675. return self % aNumber;
  2676. return self;},
  2677. args: ["aNumber"],
  2678. source: unescape('%5C%5C%20aNumber%0A%09%3Creturn%20self%20%25%20aNumber%3E'),
  2679. messageSends: [],
  2680. referencedClasses: []
  2681. }),
  2682. smalltalk.Number);
  2683. smalltalk.addMethod(
  2684. unescape('_sqrt'),
  2685. smalltalk.method({
  2686. selector: unescape('sqrt'),
  2687. category: 'arithmetic',
  2688. fn: function (){
  2689. var self=this;
  2690. return Math.sqrt(self);
  2691. return self;},
  2692. args: [],
  2693. source: unescape('sqrt%0A%09%3Creturn%20Math.sqrt%28self%29%3E'),
  2694. messageSends: [],
  2695. referencedClasses: []
  2696. }),
  2697. smalltalk.Number);
  2698. smalltalk.addMethod(
  2699. unescape('_squared'),
  2700. smalltalk.method({
  2701. selector: unescape('squared'),
  2702. category: 'arithmetic',
  2703. fn: function (){
  2704. var self=this;
  2705. return self * self;
  2706. return self;},
  2707. args: [],
  2708. source: unescape('squared%0A%09%5Eself%20*%20self'),
  2709. messageSends: [unescape("*")],
  2710. referencedClasses: []
  2711. }),
  2712. smalltalk.Number);
  2713. smalltalk.addMethod(
  2714. unescape('_pi'),
  2715. smalltalk.method({
  2716. selector: unescape('pi'),
  2717. category: 'instance creation',
  2718. fn: function (){
  2719. var self=this;
  2720. return Math.PI;
  2721. return self;},
  2722. args: [],
  2723. source: unescape('pi%0A%09%3Creturn%20Math.PI%3E'),
  2724. messageSends: [],
  2725. referencedClasses: []
  2726. }),
  2727. smalltalk.Number.klass);
  2728. smalltalk.addClass('BlockClosure', smalltalk.Object, [], 'Kernel');
  2729. smalltalk.addMethod(
  2730. unescape('_compiledSource'),
  2731. smalltalk.method({
  2732. selector: unescape('compiledSource'),
  2733. category: 'accessing',
  2734. fn: function (){
  2735. var self=this;
  2736. return self.toString();
  2737. return self;},
  2738. args: [],
  2739. source: unescape('compiledSource%0A%09%3Creturn%20self.toString%28%29%3E'),
  2740. messageSends: [],
  2741. referencedClasses: []
  2742. }),
  2743. smalltalk.BlockClosure);
  2744. smalltalk.addMethod(
  2745. unescape('_whileTrue_'),
  2746. smalltalk.method({
  2747. selector: unescape('whileTrue%3A'),
  2748. category: 'controlling',
  2749. fn: function (aBlock){
  2750. var self=this;
  2751. while(self()) {aBlock()};
  2752. return self;},
  2753. args: ["aBlock"],
  2754. source: unescape('whileTrue%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%3Cwhile%28self%28%29%29%20%7BaBlock%28%29%7D%3E'),
  2755. messageSends: [],
  2756. referencedClasses: []
  2757. }),
  2758. smalltalk.BlockClosure);
  2759. smalltalk.addMethod(
  2760. unescape('_whileFalse_'),
  2761. smalltalk.method({
  2762. selector: unescape('whileFalse%3A'),
  2763. category: 'controlling',
  2764. fn: function (aBlock){
  2765. var self=this;
  2766. while(!self()) {aBlock()};
  2767. return self;},
  2768. args: ["aBlock"],
  2769. source: unescape('whileFalse%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%3Cwhile%28%21self%28%29%29%20%7BaBlock%28%29%7D%3E'),
  2770. messageSends: [],
  2771. referencedClasses: []
  2772. }),
  2773. smalltalk.BlockClosure);
  2774. smalltalk.addMethod(
  2775. unescape('_value'),
  2776. smalltalk.method({
  2777. selector: unescape('value'),
  2778. category: 'evaluating',
  2779. fn: function (){
  2780. var self=this;
  2781. return self();;
  2782. return self;},
  2783. args: [],
  2784. source: unescape('value%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%28%29%3B%3E'),
  2785. messageSends: [],
  2786. referencedClasses: []
  2787. }),
  2788. smalltalk.BlockClosure);
  2789. smalltalk.addMethod(
  2790. unescape('_value_'),
  2791. smalltalk.method({
  2792. selector: unescape('value%3A'),
  2793. category: 'evaluating',
  2794. fn: function (anArg){
  2795. var self=this;
  2796. return self(anArg);;
  2797. return self;},
  2798. args: ["anArg"],
  2799. source: unescape('value%3A%20anArg%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%28anArg%29%3B%3E'),
  2800. messageSends: [],
  2801. referencedClasses: []
  2802. }),
  2803. smalltalk.BlockClosure);
  2804. smalltalk.addMethod(
  2805. unescape('_value_value_'),
  2806. smalltalk.method({
  2807. selector: unescape('value%3Avalue%3A'),
  2808. category: 'evaluating',
  2809. fn: function (firstArg, secondArg){
  2810. var self=this;
  2811. return self(firstArg, secondArg);;
  2812. return self;},
  2813. args: ["firstArg", "secondArg"],
  2814. source: unescape('value%3A%20firstArg%20value%3A%20secondArg%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%28firstArg%2C%20secondArg%29%3B%3E'),
  2815. messageSends: [],
  2816. referencedClasses: []
  2817. }),
  2818. smalltalk.BlockClosure);
  2819. smalltalk.addMethod(
  2820. unescape('_value_value_value_'),
  2821. smalltalk.method({
  2822. selector: unescape('value%3Avalue%3Avalue%3A'),
  2823. category: 'evaluating',
  2824. fn: function (firstArg, secondArg, thirdArg){
  2825. var self=this;
  2826. return self(firstArg, secondArg, thirdArg);;
  2827. return self;},
  2828. args: ["firstArg", "secondArg", "thirdArg"],
  2829. source: unescape('value%3A%20firstArg%20value%3A%20secondArg%20value%3A%20thirdArg%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%28firstArg%2C%20secondArg%2C%20thirdArg%29%3B%3E'),
  2830. messageSends: [],
  2831. referencedClasses: []
  2832. }),
  2833. smalltalk.BlockClosure);
  2834. smalltalk.addMethod(
  2835. unescape('_valueWithPossibleArguments_'),
  2836. smalltalk.method({
  2837. selector: unescape('valueWithPossibleArguments%3A'),
  2838. category: 'evaluating',
  2839. fn: function (aCollection){
  2840. var self=this;
  2841. return self.apply(null, aCollection);;
  2842. return self;},
  2843. args: ["aCollection"],
  2844. source: unescape('valueWithPossibleArguments%3A%20aCollection%0A%09%3Creturn%20self.apply%28null%2C%20aCollection%29%3B%3E'),
  2845. messageSends: [],
  2846. referencedClasses: []
  2847. }),
  2848. smalltalk.BlockClosure);
  2849. smalltalk.addMethod(
  2850. unescape('_on_do_'),
  2851. smalltalk.method({
  2852. selector: unescape('on%3Ado%3A'),
  2853. category: 'error handling',
  2854. fn: function (anErrorClass, aBlock){
  2855. var self=this;
  2856. smalltalk.send(self, "_try_catch_", [self, (function(error){return ((($receiver = smalltalk.send(error, "_isKindOf_", [anErrorClass])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(aBlock, "_value_", [error]);})() : (function(){return smalltalk.send(error, "_signal", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(aBlock, "_value_", [error]);}), (function(){return smalltalk.send(error, "_signal", []);})]));})]);
  2857. return self;},
  2858. args: ["anErrorClass", "aBlock"],
  2859. source: unescape('on%3A%20anErrorClass%20do%3A%20aBlock%0A%09self%20try%3A%20self%20catch%3A%20%5B%3Aerror%20%7C%0A%09%20%20%20%20%28error%20isKindOf%3A%20anErrorClass%29%20%0A%09%20%20%20%20%20ifTrue%3A%20%5BaBlock%20value%3A%20error%5D%0A%09%20%20%20%20%20ifFalse%3A%20%5Berror%20signal%5D%5D'),
  2860. messageSends: ["try:catch:", "ifTrue:ifFalse:", "isKindOf:", "value:", "signal"],
  2861. referencedClasses: []
  2862. }),
  2863. smalltalk.BlockClosure);
  2864. smalltalk.addMethod(
  2865. unescape('_valueWithTimeout_'),
  2866. smalltalk.method({
  2867. selector: unescape('valueWithTimeout%3A'),
  2868. category: 'timeout/interval',
  2869. fn: function (aNumber){
  2870. var self=this;
  2871. return setTimeout(self, aNumber);
  2872. return self;},
  2873. args: ["aNumber"],
  2874. source: unescape('valueWithTimeout%3A%20aNumber%0A%09%3Creturn%20setTimeout%28self%2C%20aNumber%29%3E'),
  2875. messageSends: [],
  2876. referencedClasses: []
  2877. }),
  2878. smalltalk.BlockClosure);
  2879. smalltalk.addMethod(
  2880. unescape('_valueWithInterval_'),
  2881. smalltalk.method({
  2882. selector: unescape('valueWithInterval%3A'),
  2883. category: 'timeout/interval',
  2884. fn: function (aNumber){
  2885. var self=this;
  2886. return setInterval(self, aNumber);
  2887. return self;},
  2888. args: ["aNumber"],
  2889. source: unescape('valueWithInterval%3A%20aNumber%0A%09%3Creturn%20setInterval%28self%2C%20aNumber%29%3E'),
  2890. messageSends: [],
  2891. referencedClasses: []
  2892. }),
  2893. smalltalk.BlockClosure);
  2894. smalltalk.addMethod(
  2895. unescape('_whileFalse'),
  2896. smalltalk.method({
  2897. selector: unescape('whileFalse'),
  2898. category: 'controlling',
  2899. fn: function (){
  2900. var self=this;
  2901. smalltalk.send(self, "_whileFalse_", [(function(){return nil;})]);
  2902. return self;},
  2903. args: [],
  2904. source: unescape('whileFalse%0A%09%22inlined%20in%20the%20Compiler%22%0A%09self%20whileFalse%3A%20%5B%5D'),
  2905. messageSends: ["whileFalse:"],
  2906. referencedClasses: []
  2907. }),
  2908. smalltalk.BlockClosure);
  2909. smalltalk.addMethod(
  2910. unescape('_whileTrue'),
  2911. smalltalk.method({
  2912. selector: unescape('whileTrue'),
  2913. category: 'controlling',
  2914. fn: function (){
  2915. var self=this;
  2916. smalltalk.send(self, "_whileTrue_", [(function(){return nil;})]);
  2917. return self;},
  2918. args: [],
  2919. source: unescape('whileTrue%0A%09%22inlined%20in%20the%20Compiler%22%0A%09self%20whileTrue%3A%20%5B%5D'),
  2920. messageSends: ["whileTrue:"],
  2921. referencedClasses: []
  2922. }),
  2923. smalltalk.BlockClosure);
  2924. smalltalk.addMethod(
  2925. unescape('_new'),
  2926. smalltalk.method({
  2927. selector: unescape('new'),
  2928. category: 'evaluating',
  2929. fn: function (){
  2930. var self=this;
  2931. return new self();
  2932. return self;},
  2933. args: [],
  2934. source: unescape('new%0A%09%22Use%20the%20receiver%20as%20a%20JS%20constructor.%20%0A%09*Do%20not*%20use%20this%20method%20to%20instanciate%20Smalltalk%20objects%21%22%0A%09%3Creturn%20new%20self%28%29%3E'),
  2935. messageSends: [],
  2936. referencedClasses: []
  2937. }),
  2938. smalltalk.BlockClosure);
  2939. smalltalk.addMethod(
  2940. unescape('_applyTo_arguments_'),
  2941. smalltalk.method({
  2942. selector: unescape('applyTo%3Aarguments%3A'),
  2943. category: 'evaluating',
  2944. fn: function (anObject, aCollection){
  2945. var self=this;
  2946. return self.apply(anObject, aCollection);
  2947. return self;},
  2948. args: ["anObject", "aCollection"],
  2949. source: unescape('applyTo%3A%20anObject%20arguments%3A%20aCollection%0A%09%3Creturn%20self.apply%28anObject%2C%20aCollection%29%3E'),
  2950. messageSends: [],
  2951. referencedClasses: []
  2952. }),
  2953. smalltalk.BlockClosure);
  2954. smalltalk.addMethod(
  2955. unescape('_timeToRun'),
  2956. smalltalk.method({
  2957. selector: unescape('timeToRun'),
  2958. category: 'evaluating',
  2959. fn: function (){
  2960. var self=this;
  2961. return smalltalk.send((smalltalk.Date || Date), "_millisecondsToRun_", [self]);
  2962. return self;},
  2963. args: [],
  2964. source: unescape('timeToRun%0A%09%22Answer%20the%20number%20of%20milliseconds%20taken%20to%20execute%20this%20block.%22%0A%0A%09%5E%20Date%20millisecondsToRun%3A%20self'),
  2965. messageSends: ["millisecondsToRun:"],
  2966. referencedClasses: ["Date"]
  2967. }),
  2968. smalltalk.BlockClosure);
  2969. smalltalk.addMethod(
  2970. unescape('_numArgs'),
  2971. smalltalk.method({
  2972. selector: unescape('numArgs'),
  2973. category: 'accessing',
  2974. fn: function (){
  2975. var self=this;
  2976. return self.length;
  2977. return self;},
  2978. args: [],
  2979. source: unescape('numArgs%0A%09%3Creturn%20self.length%3E'),
  2980. messageSends: [],
  2981. referencedClasses: []
  2982. }),
  2983. smalltalk.BlockClosure);
  2984. smalltalk.addMethod(
  2985. unescape('_ensure_'),
  2986. smalltalk.method({
  2987. selector: unescape('ensure%3A'),
  2988. category: 'evaluating',
  2989. fn: function (aBlock){
  2990. var self=this;
  2991. var success=nil;
  2992. success=false;
  2993. smalltalk.send((function(){smalltalk.send(self, "_value", []);success=true;return smalltalk.send(aBlock, "_value", []);}), "_on_do_", [(smalltalk.Error || Error), (function(ex){((($receiver = success).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(aBlock, "_value", []);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(aBlock, "_value", []);})]));return smalltalk.send(ex, "_signal", []);})]);
  2994. return self;},
  2995. args: ["aBlock"],
  2996. source: unescape('ensure%3A%20aBlock%0A%09%7C%20success%20%7C%0A%09success%20%3A%3D%20false.%0A%09%5Bself%20value.%20success%20%3A%3D%20true.%20aBlock%20value%5D%0A%09%09on%3A%20Error%0A%09%09do%3A%20%5B%3Aex%20%7C%0A%09%09%09success%20ifFalse%3A%20%5BaBlock%20value%5D.%0A%09%09%09ex%20signal%5D'),
  2997. messageSends: ["on:do:", "value", "ifFalse:", "signal"],
  2998. referencedClasses: ["Error"]
  2999. }),
  3000. smalltalk.BlockClosure);
  3001. smalltalk.addClass('Boolean', smalltalk.Object, [], 'Kernel');
  3002. smalltalk.addMethod(
  3003. unescape('__eq'),
  3004. smalltalk.method({
  3005. selector: unescape('%3D'),
  3006. category: 'comparing',
  3007. fn: function (aBoolean){
  3008. var self=this;
  3009. try{((($receiver = smalltalk.send(smalltalk.send(aBoolean, "_class", []), "__eq", [smalltalk.send(self, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));
  3010. return Boolean(self == true) == aBoolean;
  3011. return self;
  3012. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
  3013. args: ["aBoolean"],
  3014. source: unescape('%3D%20aBoolean%0A%09aBoolean%20class%20%3D%20self%20class%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09%3Creturn%20Boolean%28self%20%3D%3D%20true%29%20%3D%3D%20aBoolean%3E'),
  3015. messageSends: ["ifFalse:", unescape("%3D"), "class"],
  3016. referencedClasses: []
  3017. }),
  3018. smalltalk.Boolean);
  3019. smalltalk.addMethod(
  3020. unescape('_shallowCopy'),
  3021. smalltalk.method({
  3022. selector: unescape('shallowCopy'),
  3023. category: 'copying',
  3024. fn: function (){
  3025. var self=this;
  3026. return self;
  3027. return self;},
  3028. args: [],
  3029. source: unescape('shallowCopy%0A%09%5Eself'),
  3030. messageSends: [],
  3031. referencedClasses: []
  3032. }),
  3033. smalltalk.Boolean);
  3034. smalltalk.addMethod(
  3035. unescape('_deepCopy'),
  3036. smalltalk.method({
  3037. selector: unescape('deepCopy'),
  3038. category: 'copying',
  3039. fn: function (){
  3040. var self=this;
  3041. return self;
  3042. return self;},
  3043. args: [],
  3044. source: unescape('deepCopy%0A%09%5Eself'),
  3045. messageSends: [],
  3046. referencedClasses: []
  3047. }),
  3048. smalltalk.Boolean);
  3049. smalltalk.addMethod(
  3050. unescape('_ifTrue_'),
  3051. smalltalk.method({
  3052. selector: unescape('ifTrue%3A'),
  3053. category: 'controlling',
  3054. fn: function (aBlock){
  3055. var self=this;
  3056. return smalltalk.send(self, "_ifTrue_ifFalse_", [aBlock, (function(){return nil;})]);
  3057. return self;},
  3058. args: ["aBlock"],
  3059. source: unescape('ifTrue%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself%20ifTrue%3A%20aBlock%20ifFalse%3A%20%5B%5D'),
  3060. messageSends: ["ifTrue:ifFalse:"],
  3061. referencedClasses: []
  3062. }),
  3063. smalltalk.Boolean);
  3064. smalltalk.addMethod(
  3065. unescape('_ifFalse_'),
  3066. smalltalk.method({
  3067. selector: unescape('ifFalse%3A'),
  3068. category: 'controlling',
  3069. fn: function (aBlock){
  3070. var self=this;
  3071. return smalltalk.send(self, "_ifTrue_ifFalse_", [(function(){return nil;}), aBlock]);
  3072. return self;},
  3073. args: ["aBlock"],
  3074. source: unescape('ifFalse%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself%20ifTrue%3A%20%5B%5D%20ifFalse%3A%20aBlock'),
  3075. messageSends: ["ifTrue:ifFalse:"],
  3076. referencedClasses: []
  3077. }),
  3078. smalltalk.Boolean);
  3079. smalltalk.addMethod(
  3080. unescape('_ifFalse_ifTrue_'),
  3081. smalltalk.method({
  3082. selector: unescape('ifFalse%3AifTrue%3A'),
  3083. category: 'controlling',
  3084. fn: function (aBlock, anotherBlock){
  3085. var self=this;
  3086. return smalltalk.send(self, "_ifTrue_ifFalse_", [anotherBlock, aBlock]);
  3087. return self;},
  3088. args: ["aBlock", "anotherBlock"],
  3089. source: unescape('ifFalse%3A%20aBlock%20ifTrue%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself%20ifTrue%3A%20anotherBlock%20ifFalse%3A%20aBlock'),
  3090. messageSends: ["ifTrue:ifFalse:"],
  3091. referencedClasses: []
  3092. }),
  3093. smalltalk.Boolean);
  3094. smalltalk.addMethod(
  3095. unescape('_ifTrue_ifFalse_'),
  3096. smalltalk.method({
  3097. selector: unescape('ifTrue%3AifFalse%3A'),
  3098. category: 'controlling',
  3099. fn: function (aBlock, anotherBlock){
  3100. var self=this;
  3101. if(self == true) {
  3102. return aBlock();
  3103. } else {
  3104. return anotherBlock();
  3105. }
  3106. ;
  3107. return self;},
  3108. args: ["aBlock", "anotherBlock"],
  3109. source: unescape('ifTrue%3A%20aBlock%20ifFalse%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%3C%0A%09%20%20%20%20if%28self%20%3D%3D%20true%29%20%7B%0A%09%09return%20aBlock%28%29%3B%0A%09%20%20%20%20%7D%20else%20%7B%0A%09%09return%20anotherBlock%28%29%3B%0A%09%20%20%20%20%7D%0A%09%3E'),
  3110. messageSends: [],
  3111. referencedClasses: []
  3112. }),
  3113. smalltalk.Boolean);
  3114. smalltalk.addMethod(
  3115. unescape('_and_'),
  3116. smalltalk.method({
  3117. selector: unescape('and%3A'),
  3118. category: 'controlling',
  3119. fn: function (aBlock){
  3120. var self=this;
  3121. return smalltalk.send(smalltalk.send(self, "__eq", [true]), "_ifTrue_ifFalse_", [aBlock, (function(){return false;})]);
  3122. return self;},
  3123. args: ["aBlock"],
  3124. source: unescape('and%3A%20aBlock%0A%09%5Eself%20%3D%20true%0A%09%20%20%20%20ifTrue%3A%20aBlock%0A%09%20%20%20%20ifFalse%3A%20%5Bfalse%5D'),
  3125. messageSends: ["ifTrue:ifFalse:", unescape("%3D")],
  3126. referencedClasses: []
  3127. }),
  3128. smalltalk.Boolean);
  3129. smalltalk.addMethod(
  3130. unescape('_or_'),
  3131. smalltalk.method({
  3132. selector: unescape('or%3A'),
  3133. category: 'controlling',
  3134. fn: function (aBlock){
  3135. var self=this;
  3136. return smalltalk.send(smalltalk.send(self, "__eq", [true]), "_ifTrue_ifFalse_", [(function(){return true;}), aBlock]);
  3137. return self;},
  3138. args: ["aBlock"],
  3139. source: unescape('or%3A%20aBlock%0A%09%5Eself%20%3D%20true%0A%09%20%20%20%20ifTrue%3A%20%5Btrue%5D%0A%09%20%20%20%20ifFalse%3A%20aBlock'),
  3140. messageSends: ["ifTrue:ifFalse:", unescape("%3D")],
  3141. referencedClasses: []
  3142. }),
  3143. smalltalk.Boolean);
  3144. smalltalk.addMethod(
  3145. unescape('_not'),
  3146. smalltalk.method({
  3147. selector: unescape('not'),
  3148. category: 'controlling',
  3149. fn: function (){
  3150. var self=this;
  3151. return smalltalk.send(self, "__eq", [false]);
  3152. return self;},
  3153. args: [],
  3154. source: unescape('not%0A%09%5Eself%20%3D%20false'),
  3155. messageSends: [unescape("%3D")],
  3156. referencedClasses: []
  3157. }),
  3158. smalltalk.Boolean);
  3159. smalltalk.addMethod(
  3160. unescape('_printString'),
  3161. smalltalk.method({
  3162. selector: unescape('printString'),
  3163. category: 'printing',
  3164. fn: function (){
  3165. var self=this;
  3166. return self.toString();
  3167. return self;},
  3168. args: [],
  3169. source: unescape('printString%0A%09%3Creturn%20self.toString%28%29%3E'),
  3170. messageSends: [],
  3171. referencedClasses: []
  3172. }),
  3173. smalltalk.Boolean);
  3174. smalltalk.addMethod(
  3175. unescape('_%26'),
  3176. smalltalk.method({
  3177. selector: unescape('%26'),
  3178. category: 'controlling',
  3179. fn: function (aBoolean){
  3180. var self=this;
  3181. if(self == true) {
  3182. return aBoolean;
  3183. } else {
  3184. return false;
  3185. }
  3186. ;
  3187. return self;},
  3188. args: ["aBoolean"],
  3189. source: unescape('%26%20aBoolean%0A%09%3C%0A%09%20%20%20%20if%28self%20%3D%3D%20true%29%20%7B%0A%09%09return%20aBoolean%3B%0A%09%20%20%20%20%7D%20else%20%7B%0A%09%09return%20false%3B%0A%09%20%20%20%20%7D%0A%09%3E'),
  3190. messageSends: [],
  3191. referencedClasses: []
  3192. }),
  3193. smalltalk.Boolean);
  3194. smalltalk.addMethod(
  3195. unescape('_%7C'),
  3196. smalltalk.method({
  3197. selector: unescape('%7C'),
  3198. category: 'controlling',
  3199. fn: function (aBoolean){
  3200. var self=this;
  3201. if(self == true) {
  3202. return true;
  3203. } else {
  3204. return aBoolean;
  3205. }
  3206. ;
  3207. return self;},
  3208. args: ["aBoolean"],
  3209. source: unescape('%7C%20aBoolean%0A%09%3C%0A%09%20%20%20%20if%28self%20%3D%3D%20true%29%20%7B%0A%09%09return%20true%3B%0A%09%20%20%20%20%7D%20else%20%7B%0A%09%09return%20aBoolean%3B%0A%09%20%20%20%20%7D%0A%09%3E'),
  3210. messageSends: [],
  3211. referencedClasses: []
  3212. }),
  3213. smalltalk.Boolean);
  3214. smalltalk.addMethod(
  3215. unescape('__eq_eq'),
  3216. smalltalk.method({
  3217. selector: unescape('%3D%3D'),
  3218. category: 'comparing',
  3219. fn: function (aBoolean){
  3220. var self=this;
  3221. try{((($receiver = smalltalk.send(smalltalk.send(aBoolean, "_class", []), "__eq", [smalltalk.send(self, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq_eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq_eq', fn: function(){return false}})})();})]));
  3222. return Boolean(self == true) === Boolean(aBoolean == true);
  3223. return self;
  3224. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq_eq'){return e.fn()} throw(e)}},
  3225. args: ["aBoolean"],
  3226. source: unescape('%3D%3D%20aBoolean%0A%09aBoolean%20class%20%3D%20self%20class%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09%3Creturn%20Boolean%28self%20%3D%3D%20true%29%20%3D%3D%3D%20Boolean%28aBoolean%20%3D%3D%20true%29%3E'),
  3227. messageSends: ["ifFalse:", unescape("%3D"), "class"],
  3228. referencedClasses: []
  3229. }),
  3230. smalltalk.Boolean);
  3231. smalltalk.addClass('Date', smalltalk.Object, [], 'Kernel');
  3232. smalltalk.Date.comment=unescape('The%20Date%20class%20is%20used%20to%20work%20with%20dates%20and%20times.')
  3233. smalltalk.addMethod(
  3234. unescape('_year'),
  3235. smalltalk.method({
  3236. selector: unescape('year'),
  3237. category: 'accessing',
  3238. fn: function (){
  3239. var self=this;
  3240. return self.getFullYear();
  3241. return self;},
  3242. args: [],
  3243. source: unescape('year%0A%09%3Creturn%20self.getFullYear%28%29%3E'),
  3244. messageSends: [],
  3245. referencedClasses: []
  3246. }),
  3247. smalltalk.Date);
  3248. smalltalk.addMethod(
  3249. unescape('_month'),
  3250. smalltalk.method({
  3251. selector: unescape('month'),
  3252. category: 'accessing',
  3253. fn: function (){
  3254. var self=this;
  3255. return self.getMonth() + 1;
  3256. return self;},
  3257. args: [],
  3258. source: unescape('month%0A%09%3Creturn%20self.getMonth%28%29%20+%201%3E'),
  3259. messageSends: [],
  3260. referencedClasses: []
  3261. }),
  3262. smalltalk.Date);
  3263. smalltalk.addMethod(
  3264. unescape('_month_'),
  3265. smalltalk.method({
  3266. selector: unescape('month%3A'),
  3267. category: 'accessing',
  3268. fn: function (aNumber){
  3269. var self=this;
  3270. self.setMonth(aNumber - 1);
  3271. return self;},
  3272. args: ["aNumber"],
  3273. source: unescape('month%3A%20aNumber%0A%09%3Cself.setMonth%28aNumber%20-%201%29%3E'),
  3274. messageSends: [],
  3275. referencedClasses: []
  3276. }),
  3277. smalltalk.Date);
  3278. smalltalk.addMethod(
  3279. unescape('_day'),
  3280. smalltalk.method({
  3281. selector: unescape('day'),
  3282. category: 'accessing',
  3283. fn: function (){
  3284. var self=this;
  3285. return smalltalk.send(self, "_dayOfWeek", []);
  3286. return self;},
  3287. args: [],
  3288. source: unescape('day%0A%09%5Eself%20dayOfWeek'),
  3289. messageSends: ["dayOfWeek"],
  3290. referencedClasses: []
  3291. }),
  3292. smalltalk.Date);
  3293. smalltalk.addMethod(
  3294. unescape('_dayOfWeek'),
  3295. smalltalk.method({
  3296. selector: unescape('dayOfWeek'),
  3297. category: 'accessing',
  3298. fn: function (){
  3299. var self=this;
  3300. return self.getDay() + 1;
  3301. return self;},
  3302. args: [],
  3303. source: unescape('dayOfWeek%0A%09%3Creturn%20self.getDay%28%29%20+%201%3E'),
  3304. messageSends: [],
  3305. referencedClasses: []
  3306. }),
  3307. smalltalk.Date);
  3308. smalltalk.addMethod(
  3309. unescape('_dayOfWeek_'),
  3310. smalltalk.method({
  3311. selector: unescape('dayOfWeek%3A'),
  3312. category: 'accessing',
  3313. fn: function (aNumber){
  3314. var self=this;
  3315. return self.setDay(aNumber - 1);
  3316. return self;},
  3317. args: ["aNumber"],
  3318. source: unescape('dayOfWeek%3A%20aNumber%0A%09%3Creturn%20self.setDay%28aNumber%20-%201%29%3E'),
  3319. messageSends: [],
  3320. referencedClasses: []
  3321. }),
  3322. smalltalk.Date);
  3323. smalltalk.addMethod(
  3324. unescape('_day_'),
  3325. smalltalk.method({
  3326. selector: unescape('day%3A'),
  3327. category: 'accessing',
  3328. fn: function (aNumber){
  3329. var self=this;
  3330. smalltalk.send(self, "_day_", [aNumber]);
  3331. return self;},
  3332. args: ["aNumber"],
  3333. source: unescape('day%3A%20aNumber%0A%09self%20day%3A%20aNumber'),
  3334. messageSends: ["day:"],
  3335. referencedClasses: []
  3336. }),
  3337. smalltalk.Date);
  3338. smalltalk.addMethod(
  3339. unescape('_year_'),
  3340. smalltalk.method({
  3341. selector: unescape('year%3A'),
  3342. category: 'accessing',
  3343. fn: function (aNumber){
  3344. var self=this;
  3345. self.setFullYear(aNumber);
  3346. return self;},
  3347. args: ["aNumber"],
  3348. source: unescape('year%3A%20aNumber%0A%09%3Cself.setFullYear%28aNumber%29%3E'),
  3349. messageSends: [],
  3350. referencedClasses: []
  3351. }),
  3352. smalltalk.Date);
  3353. smalltalk.addMethod(
  3354. unescape('_dayOfMonth'),
  3355. smalltalk.method({
  3356. selector: unescape('dayOfMonth'),
  3357. category: 'accessing',
  3358. fn: function (){
  3359. var self=this;
  3360. return self.getDate();
  3361. return self;},
  3362. args: [],
  3363. source: unescape('dayOfMonth%0A%09%3Creturn%20self.getDate%28%29%3E'),
  3364. messageSends: [],
  3365. referencedClasses: []
  3366. }),
  3367. smalltalk.Date);
  3368. smalltalk.addMethod(
  3369. unescape('_dayOfMonth_'),
  3370. smalltalk.method({
  3371. selector: unescape('dayOfMonth%3A'),
  3372. category: 'accessing',
  3373. fn: function (aNumber){
  3374. var self=this;
  3375. self.setDate(aNumber);
  3376. return self;},
  3377. args: ["aNumber"],
  3378. source: unescape('dayOfMonth%3A%20aNumber%0A%09%3Cself.setDate%28aNumber%29%3E'),
  3379. messageSends: [],
  3380. referencedClasses: []
  3381. }),
  3382. smalltalk.Date);
  3383. smalltalk.addMethod(
  3384. unescape('_asString'),
  3385. smalltalk.method({
  3386. selector: unescape('asString'),
  3387. category: 'converting',
  3388. fn: function (){
  3389. var self=this;
  3390. return self.toString();
  3391. return self;},
  3392. args: [],
  3393. source: unescape('asString%0A%09%3Creturn%20self.toString%28%29%3E'),
  3394. messageSends: [],
  3395. referencedClasses: []
  3396. }),
  3397. smalltalk.Date);
  3398. smalltalk.addMethod(
  3399. unescape('_printString'),
  3400. smalltalk.method({
  3401. selector: unescape('printString'),
  3402. category: 'printing',
  3403. fn: function (){
  3404. var self=this;
  3405. return smalltalk.send(self, "_asString", []);
  3406. return self;},
  3407. args: [],
  3408. source: unescape('printString%0A%09%5Eself%20asString'),
  3409. messageSends: ["asString"],
  3410. referencedClasses: []
  3411. }),
  3412. smalltalk.Date);
  3413. smalltalk.addMethod(
  3414. unescape('_asMilliseconds'),
  3415. smalltalk.method({
  3416. selector: unescape('asMilliseconds'),
  3417. category: 'converting',
  3418. fn: function (){
  3419. var self=this;
  3420. return smalltalk.send(self, "_time", []);
  3421. return self;},
  3422. args: [],
  3423. source: unescape('asMilliseconds%0A%09%5Eself%20time'),
  3424. messageSends: ["time"],
  3425. referencedClasses: []
  3426. }),
  3427. smalltalk.Date);
  3428. smalltalk.addMethod(
  3429. unescape('_time'),
  3430. smalltalk.method({
  3431. selector: unescape('time'),
  3432. category: 'accessing',
  3433. fn: function (){
  3434. var self=this;
  3435. return self.getTime();
  3436. return self;},
  3437. args: [],
  3438. source: unescape('time%0A%09%3Creturn%20self.getTime%28%29%3E'),
  3439. messageSends: [],
  3440. referencedClasses: []
  3441. }),
  3442. smalltalk.Date);
  3443. smalltalk.addMethod(
  3444. unescape('_time_'),
  3445. smalltalk.method({
  3446. selector: unescape('time%3A'),
  3447. category: 'accessing',
  3448. fn: function (aNumber){
  3449. var self=this;
  3450. self.setTime(aNumber);
  3451. return self;},
  3452. args: ["aNumber"],
  3453. source: unescape('time%3A%20aNumber%0A%09%3Cself.setTime%28aNumber%29%3E'),
  3454. messageSends: [],
  3455. referencedClasses: []
  3456. }),
  3457. smalltalk.Date);
  3458. smalltalk.addMethod(
  3459. unescape('_asDateString'),
  3460. smalltalk.method({
  3461. selector: unescape('asDateString'),
  3462. category: 'converting',
  3463. fn: function (){
  3464. var self=this;
  3465. return self.toDateString();
  3466. return self;},
  3467. args: [],
  3468. source: unescape('asDateString%0A%09%3Creturn%20self.toDateString%28%29%3E'),
  3469. messageSends: [],
  3470. referencedClasses: []
  3471. }),
  3472. smalltalk.Date);
  3473. smalltalk.addMethod(
  3474. unescape('_asTimeString'),
  3475. smalltalk.method({
  3476. selector: unescape('asTimeString'),
  3477. category: 'converting',
  3478. fn: function (){
  3479. var self=this;
  3480. return self.toTimeString();
  3481. return self;},
  3482. args: [],
  3483. source: unescape('asTimeString%0A%09%3Creturn%20self.toTimeString%28%29%3E'),
  3484. messageSends: [],
  3485. referencedClasses: []
  3486. }),
  3487. smalltalk.Date);
  3488. smalltalk.addMethod(
  3489. unescape('_asLocaleString'),
  3490. smalltalk.method({
  3491. selector: unescape('asLocaleString'),
  3492. category: 'converting',
  3493. fn: function (){
  3494. var self=this;
  3495. return self.toLocaleString();
  3496. return self;},
  3497. args: [],
  3498. source: unescape('asLocaleString%0A%09%3Creturn%20self.toLocaleString%28%29%3E'),
  3499. messageSends: [],
  3500. referencedClasses: []
  3501. }),
  3502. smalltalk.Date);
  3503. smalltalk.addMethod(
  3504. unescape('_asNumber'),
  3505. smalltalk.method({
  3506. selector: unescape('asNumber'),
  3507. category: 'converting',
  3508. fn: function (){
  3509. var self=this;
  3510. return smalltalk.send(self, "_asMilliseconds", []);
  3511. return self;},
  3512. args: [],
  3513. source: unescape('asNumber%0A%09%5Eself%20asMilliseconds'),
  3514. messageSends: ["asMilliseconds"],
  3515. referencedClasses: []
  3516. }),
  3517. smalltalk.Date);
  3518. smalltalk.addMethod(
  3519. unescape('_hours_'),
  3520. smalltalk.method({
  3521. selector: unescape('hours%3A'),
  3522. category: 'accessing',
  3523. fn: function (aNumber){
  3524. var self=this;
  3525. self.setHours(aNumber);
  3526. return self;},
  3527. args: ["aNumber"],
  3528. source: unescape('hours%3A%20aNumber%0A%09%3Cself.setHours%28aNumber%29%3E'),
  3529. messageSends: [],
  3530. referencedClasses: []
  3531. }),
  3532. smalltalk.Date);
  3533. smalltalk.addMethod(
  3534. unescape('_minutes_'),
  3535. smalltalk.method({
  3536. selector: unescape('minutes%3A'),
  3537. category: 'accessing',
  3538. fn: function (aNumber){
  3539. var self=this;
  3540. self.setMinutes(aNumber);
  3541. return self;},
  3542. args: ["aNumber"],
  3543. source: unescape('minutes%3A%20aNumber%0A%09%3Cself.setMinutes%28aNumber%29%3E'),
  3544. messageSends: [],
  3545. referencedClasses: []
  3546. }),
  3547. smalltalk.Date);
  3548. smalltalk.addMethod(
  3549. unescape('_seconds_'),
  3550. smalltalk.method({
  3551. selector: unescape('seconds%3A'),
  3552. category: 'accessing',
  3553. fn: function (aNumber){
  3554. var self=this;
  3555. self.setSeconds(aNumber);
  3556. return self;},
  3557. args: ["aNumber"],
  3558. source: unescape('seconds%3A%20aNumber%0A%09%3Cself.setSeconds%28aNumber%29%3E'),
  3559. messageSends: [],
  3560. referencedClasses: []
  3561. }),
  3562. smalltalk.Date);
  3563. smalltalk.addMethod(
  3564. unescape('_milliseconds_'),
  3565. smalltalk.method({
  3566. selector: unescape('milliseconds%3A'),
  3567. category: 'accessing',
  3568. fn: function (aNumber){
  3569. var self=this;
  3570. self.setMilliseconds(aNumber);
  3571. return self;},
  3572. args: ["aNumber"],
  3573. source: unescape('milliseconds%3A%20aNumber%0A%09%3Cself.setMilliseconds%28aNumber%29%3E'),
  3574. messageSends: [],
  3575. referencedClasses: []
  3576. }),
  3577. smalltalk.Date);
  3578. smalltalk.addMethod(
  3579. unescape('_hours'),
  3580. smalltalk.method({
  3581. selector: unescape('hours'),
  3582. category: 'accessing',
  3583. fn: function (){
  3584. var self=this;
  3585. return self.getHours();
  3586. return self;},
  3587. args: [],
  3588. source: unescape('hours%0A%09%3Creturn%20self.getHours%28%29%3E'),
  3589. messageSends: [],
  3590. referencedClasses: []
  3591. }),
  3592. smalltalk.Date);
  3593. smalltalk.addMethod(
  3594. unescape('_minutes'),
  3595. smalltalk.method({
  3596. selector: unescape('minutes'),
  3597. category: 'accessing',
  3598. fn: function (){
  3599. var self=this;
  3600. return self.getMinutes();
  3601. return self;},
  3602. args: [],
  3603. source: unescape('minutes%0A%09%3Creturn%20self.getMinutes%28%29%3E'),
  3604. messageSends: [],
  3605. referencedClasses: []
  3606. }),
  3607. smalltalk.Date);
  3608. smalltalk.addMethod(
  3609. unescape('_seconds'),
  3610. smalltalk.method({
  3611. selector: unescape('seconds'),
  3612. category: 'accessing',
  3613. fn: function (){
  3614. var self=this;
  3615. return self.getSeconds();
  3616. return self;},
  3617. args: [],
  3618. source: unescape('seconds%0A%09%3Creturn%20self.getSeconds%28%29%3E'),
  3619. messageSends: [],
  3620. referencedClasses: []
  3621. }),
  3622. smalltalk.Date);
  3623. smalltalk.addMethod(
  3624. unescape('_milliseconds'),
  3625. smalltalk.method({
  3626. selector: unescape('milliseconds'),
  3627. category: 'accessing',
  3628. fn: function (){
  3629. var self=this;
  3630. return self.getMilliseconds();
  3631. return self;},
  3632. args: [],
  3633. source: unescape('milliseconds%0A%09%3Creturn%20self.getMilliseconds%28%29%3E'),
  3634. messageSends: [],
  3635. referencedClasses: []
  3636. }),
  3637. smalltalk.Date);
  3638. smalltalk.addMethod(
  3639. unescape('__lt'),
  3640. smalltalk.method({
  3641. selector: unescape('%3C'),
  3642. category: 'comparing',
  3643. fn: function (aDate){
  3644. var self=this;
  3645. return self < aDate;
  3646. return self;},
  3647. args: ["aDate"],
  3648. source: unescape('%3C%20aDate%0A%09%3Creturn%20self%20%3C%20aDate%3E'),
  3649. messageSends: [],
  3650. referencedClasses: []
  3651. }),
  3652. smalltalk.Date);
  3653. smalltalk.addMethod(
  3654. unescape('__gt'),
  3655. smalltalk.method({
  3656. selector: unescape('%3E'),
  3657. category: 'comparing',
  3658. fn: function (aDate){
  3659. var self=this;
  3660. return self > aDate;
  3661. return self;},
  3662. args: ["aDate"],
  3663. source: unescape('%3E%20aDate%0A%09%3Creturn%20self%20%3E%3E%20aDate%3E'),
  3664. messageSends: [],
  3665. referencedClasses: []
  3666. }),
  3667. smalltalk.Date);
  3668. smalltalk.addMethod(
  3669. unescape('__lt_eq'),
  3670. smalltalk.method({
  3671. selector: unescape('%3C%3D'),
  3672. category: 'comparing',
  3673. fn: function (aDate){
  3674. var self=this;
  3675. return self <= aDate;
  3676. return self;},
  3677. args: ["aDate"],
  3678. source: unescape('%3C%3D%20aDate%0A%09%3Creturn%20self%20%3C%3D%20aDate%3E'),
  3679. messageSends: [],
  3680. referencedClasses: []
  3681. }),
  3682. smalltalk.Date);
  3683. smalltalk.addMethod(
  3684. unescape('__gt_eq'),
  3685. smalltalk.method({
  3686. selector: unescape('%3E%3D'),
  3687. category: 'comparing',
  3688. fn: function (aDate){
  3689. var self=this;
  3690. return self >= aDate;
  3691. return self;},
  3692. args: ["aDate"],
  3693. source: unescape('%3E%3D%20aDate%0A%09%3Creturn%20self%20%3E%3E%3D%20aDate%3E'),
  3694. messageSends: [],
  3695. referencedClasses: []
  3696. }),
  3697. smalltalk.Date);
  3698. smalltalk.addMethod(
  3699. unescape('__minus'),
  3700. smalltalk.method({
  3701. selector: unescape('-'),
  3702. category: 'arithmetic',
  3703. fn: function (aDate){
  3704. var self=this;
  3705. return self - aDate;
  3706. return self;},
  3707. args: ["aDate"],
  3708. source: unescape('-%20aDate%0A%09%3Creturn%20self%20-%20aDate%3E'),
  3709. messageSends: [],
  3710. referencedClasses: []
  3711. }),
  3712. smalltalk.Date);
  3713. smalltalk.addMethod(
  3714. unescape('__plus'),
  3715. smalltalk.method({
  3716. selector: unescape('+'),
  3717. category: 'arithmetic',
  3718. fn: function (aDate){
  3719. var self=this;
  3720. return self + aDate;
  3721. return self;},
  3722. args: ["aDate"],
  3723. source: unescape('+%20aDate%0A%09%3Creturn%20self%20+%20aDate%3E'),
  3724. messageSends: [],
  3725. referencedClasses: []
  3726. }),
  3727. smalltalk.Date);
  3728. smalltalk.addMethod(
  3729. unescape('_new_'),
  3730. smalltalk.method({
  3731. selector: unescape('new%3A'),
  3732. category: 'instance creation',
  3733. fn: function (anObject){
  3734. var self=this;
  3735. return new Date(anObject);
  3736. return self;},
  3737. args: ["anObject"],
  3738. source: unescape('new%3A%20anObject%0A%09%3Creturn%20new%20Date%28anObject%29%3E'),
  3739. messageSends: [],
  3740. referencedClasses: []
  3741. }),
  3742. smalltalk.Date.klass);
  3743. smalltalk.addMethod(
  3744. unescape('_fromString_'),
  3745. smalltalk.method({
  3746. selector: unescape('fromString%3A'),
  3747. category: 'instance creation',
  3748. fn: function (aString){
  3749. var self=this;
  3750. return smalltalk.send(self, "_new_", [aString]);
  3751. return self;},
  3752. args: ["aString"],
  3753. source: unescape('fromString%3A%20aString%0A%09%22Example%3A%20Date%20fromString%28%272011/04/15%2000%3A00%3A00%27%29%22%0A%09%5Eself%20new%3A%20aString'),
  3754. messageSends: ["new:"],
  3755. referencedClasses: []
  3756. }),
  3757. smalltalk.Date.klass);
  3758. smalltalk.addMethod(
  3759. unescape('_fromSeconds_'),
  3760. smalltalk.method({
  3761. selector: unescape('fromSeconds%3A'),
  3762. category: 'instance creation',
  3763. fn: function (aNumber){
  3764. var self=this;
  3765. return smalltalk.send(self, "_fromMilliseconds_", [((($receiver = aNumber).klass === smalltalk.Number) ? $receiver *(1000) : smalltalk.send($receiver, "__star", [(1000)]))]);
  3766. return self;},
  3767. args: ["aNumber"],
  3768. source: unescape('fromSeconds%3A%20aNumber%0A%09%5Eself%20fromMilliseconds%3A%20aNumber%20*%201000'),
  3769. messageSends: ["fromMilliseconds:", unescape("*")],
  3770. referencedClasses: []
  3771. }),
  3772. smalltalk.Date.klass);
  3773. smalltalk.addMethod(
  3774. unescape('_fromMilliseconds_'),
  3775. smalltalk.method({
  3776. selector: unescape('fromMilliseconds%3A'),
  3777. category: 'instance creation',
  3778. fn: function (aNumber){
  3779. var self=this;
  3780. return smalltalk.send(self, "_new_", [aNumber]);
  3781. return self;},
  3782. args: ["aNumber"],
  3783. source: unescape('fromMilliseconds%3A%20aNumber%0A%09%5Eself%20new%3A%20aNumber'),
  3784. messageSends: ["new:"],
  3785. referencedClasses: []
  3786. }),
  3787. smalltalk.Date.klass);
  3788. smalltalk.addMethod(
  3789. unescape('_today'),
  3790. smalltalk.method({
  3791. selector: unescape('today'),
  3792. category: 'instance creation',
  3793. fn: function (){
  3794. var self=this;
  3795. return smalltalk.send(self, "_new", []);
  3796. return self;},
  3797. args: [],
  3798. source: unescape('today%0A%09%5Eself%20new'),
  3799. messageSends: ["new"],
  3800. referencedClasses: []
  3801. }),
  3802. smalltalk.Date.klass);
  3803. smalltalk.addMethod(
  3804. unescape('_now'),
  3805. smalltalk.method({
  3806. selector: unescape('now'),
  3807. category: 'instance creation',
  3808. fn: function (){
  3809. var self=this;
  3810. return smalltalk.send(self, "_today", []);
  3811. return self;},
  3812. args: [],
  3813. source: unescape('now%0A%09%5Eself%20today'),
  3814. messageSends: ["today"],
  3815. referencedClasses: []
  3816. }),
  3817. smalltalk.Date.klass);
  3818. smalltalk.addMethod(
  3819. unescape('_millisecondsToRun_'),
  3820. smalltalk.method({
  3821. selector: unescape('millisecondsToRun%3A'),
  3822. category: 'instance creation',
  3823. fn: function (aBlock){
  3824. var self=this;
  3825. var t=nil;
  3826. t=smalltalk.send((smalltalk.Date || Date), "_now", []);
  3827. smalltalk.send(aBlock, "_value", []);
  3828. return ((($receiver = smalltalk.send((smalltalk.Date || Date), "_now", [])).klass === smalltalk.Number) ? $receiver -t : smalltalk.send($receiver, "__minus", [t]));
  3829. return self;},
  3830. args: ["aBlock"],
  3831. source: unescape('millisecondsToRun%3A%20aBlock%0A%09%7C%20t%20%7C%0A%09t%20%3A%3D%20Date%20now.%0A%09aBlock%20value.%0A%09%5EDate%20now%20-%20t'),
  3832. messageSends: ["now", "value", unescape("-")],
  3833. referencedClasses: ["Date"]
  3834. }),
  3835. smalltalk.Date.klass);
  3836. smalltalk.addClass('UndefinedObject', smalltalk.Object, [], 'Kernel');
  3837. smalltalk.addMethod(
  3838. unescape('_subclass_instanceVariableNames_'),
  3839. smalltalk.method({
  3840. selector: unescape('subclass%3AinstanceVariableNames%3A'),
  3841. category: 'class creation',
  3842. fn: function (aString, anotherString){
  3843. var self=this;
  3844. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, anotherString, nil]);
  3845. return self;},
  3846. args: ["aString", "anotherString"],
  3847. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20anotherString%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20anotherString%20package%3A%20nil'),
  3848. messageSends: ["subclass:instanceVariableNames:package:"],
  3849. referencedClasses: []
  3850. }),
  3851. smalltalk.UndefinedObject);
  3852. smalltalk.addMethod(
  3853. unescape('_subclass_instanceVariableNames_category_'),
  3854. smalltalk.method({
  3855. selector: unescape('subclass%3AinstanceVariableNames%3Acategory%3A'),
  3856. category: 'class creation',
  3857. fn: function (aString, aString2, aString3){
  3858. var self=this;
  3859. smalltalk.send(self, "_deprecatedAPI", []);
  3860. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
  3861. return self;},
  3862. args: ["aString", "aString2", "aString3"],
  3863. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20category%3A%20aString3%0A%09%22Kept%20for%20compatibility.%22%0A%09self%20deprecatedAPI.%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3'),
  3864. messageSends: ["deprecatedAPI", "subclass:instanceVariableNames:package:"],
  3865. referencedClasses: []
  3866. }),
  3867. smalltalk.UndefinedObject);
  3868. smalltalk.addMethod(
  3869. unescape('_shallowCopy'),
  3870. smalltalk.method({
  3871. selector: unescape('shallowCopy'),
  3872. category: 'copying',
  3873. fn: function (){
  3874. var self=this;
  3875. return self;
  3876. return self;},
  3877. args: [],
  3878. source: unescape('shallowCopy%0A%09%5Eself'),
  3879. messageSends: [],
  3880. referencedClasses: []
  3881. }),
  3882. smalltalk.UndefinedObject);
  3883. smalltalk.addMethod(
  3884. unescape('_deepCopy'),
  3885. smalltalk.method({
  3886. selector: unescape('deepCopy'),
  3887. category: 'copying',
  3888. fn: function (){
  3889. var self=this;
  3890. return self;
  3891. return self;},
  3892. args: [],
  3893. source: unescape('deepCopy%0A%09%5Eself'),
  3894. messageSends: [],
  3895. referencedClasses: []
  3896. }),
  3897. smalltalk.UndefinedObject);
  3898. smalltalk.addMethod(
  3899. unescape('_ifNil_'),
  3900. smalltalk.method({
  3901. selector: unescape('ifNil%3A'),
  3902. category: 'testing',
  3903. fn: function (aBlock){
  3904. var self=this;
  3905. return smalltalk.send(self, "_ifNil_ifNotNil_", [aBlock, (function(){return nil;})]);
  3906. return self;},
  3907. args: ["aBlock"],
  3908. source: unescape('ifNil%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself%20ifNil%3A%20aBlock%20ifNotNil%3A%20%5B%5D'),
  3909. messageSends: ["ifNil:ifNotNil:"],
  3910. referencedClasses: []
  3911. }),
  3912. smalltalk.UndefinedObject);
  3913. smalltalk.addMethod(
  3914. unescape('_ifNotNil_'),
  3915. smalltalk.method({
  3916. selector: unescape('ifNotNil%3A'),
  3917. category: 'testing',
  3918. fn: function (aBlock){
  3919. var self=this;
  3920. return self;
  3921. return self;},
  3922. args: ["aBlock"],
  3923. source: unescape('ifNotNil%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself'),
  3924. messageSends: [],
  3925. referencedClasses: []
  3926. }),
  3927. smalltalk.UndefinedObject);
  3928. smalltalk.addMethod(
  3929. unescape('_ifNil_ifNotNil_'),
  3930. smalltalk.method({
  3931. selector: unescape('ifNil%3AifNotNil%3A'),
  3932. category: 'testing',
  3933. fn: function (aBlock, anotherBlock){
  3934. var self=this;
  3935. return smalltalk.send(aBlock, "_value", []);
  3936. return self;},
  3937. args: ["aBlock", "anotherBlock"],
  3938. source: unescape('ifNil%3A%20aBlock%20ifNotNil%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EaBlock%20value'),
  3939. messageSends: ["value"],
  3940. referencedClasses: []
  3941. }),
  3942. smalltalk.UndefinedObject);
  3943. smalltalk.addMethod(
  3944. unescape('_ifNotNil_ifNil_'),
  3945. smalltalk.method({
  3946. selector: unescape('ifNotNil%3AifNil%3A'),
  3947. category: 'testing',
  3948. fn: function (aBlock, anotherBlock){
  3949. var self=this;
  3950. return smalltalk.send(anotherBlock, "_value", []);
  3951. return self;},
  3952. args: ["aBlock", "anotherBlock"],
  3953. source: unescape('ifNotNil%3A%20aBlock%20ifNil%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EanotherBlock%20value'),
  3954. messageSends: ["value"],
  3955. referencedClasses: []
  3956. }),
  3957. smalltalk.UndefinedObject);
  3958. smalltalk.addMethod(
  3959. unescape('_isNil'),
  3960. smalltalk.method({
  3961. selector: unescape('isNil'),
  3962. category: 'testing',
  3963. fn: function (){
  3964. var self=this;
  3965. return true;
  3966. return self;},
  3967. args: [],
  3968. source: unescape('isNil%0A%09%5Etrue'),
  3969. messageSends: [],
  3970. referencedClasses: []
  3971. }),
  3972. smalltalk.UndefinedObject);
  3973. smalltalk.addMethod(
  3974. unescape('_notNil'),
  3975. smalltalk.method({
  3976. selector: unescape('notNil'),
  3977. category: 'testing',
  3978. fn: function (){
  3979. var self=this;
  3980. return false;
  3981. return self;},
  3982. args: [],
  3983. source: unescape('notNil%0A%09%5Efalse'),
  3984. messageSends: [],
  3985. referencedClasses: []
  3986. }),
  3987. smalltalk.UndefinedObject);
  3988. smalltalk.addMethod(
  3989. unescape('_printString'),
  3990. smalltalk.method({
  3991. selector: unescape('printString'),
  3992. category: 'printing',
  3993. fn: function (){
  3994. var self=this;
  3995. return "nil";
  3996. return self;},
  3997. args: [],
  3998. source: unescape('printString%0A%20%20%20%20%5E%27nil%27'),
  3999. messageSends: [],
  4000. referencedClasses: []
  4001. }),
  4002. smalltalk.UndefinedObject);
  4003. smalltalk.addMethod(
  4004. unescape('_subclass_instanceVariableNames_package_'),
  4005. smalltalk.method({
  4006. selector: unescape('subclass%3AinstanceVariableNames%3Apackage%3A'),
  4007. category: 'class creation',
  4008. fn: function (aString, aString2, aString3){
  4009. var self=this;
  4010. return smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_superclass_subclass_instanceVariableNames_package_", [self, aString, aString2, aString3]);
  4011. return self;},
  4012. args: ["aString", "aString2", "aString3"],
  4013. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3%0A%09%5EClassBuilder%20new%0A%09%20%20%20%20superclass%3A%20self%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3'),
  4014. messageSends: ["superclass:subclass:instanceVariableNames:package:", "new"],
  4015. referencedClasses: ["ClassBuilder"]
  4016. }),
  4017. smalltalk.UndefinedObject);
  4018. smalltalk.addMethod(
  4019. unescape('_new'),
  4020. smalltalk.method({
  4021. selector: unescape('new'),
  4022. category: 'instance creation',
  4023. fn: function (){
  4024. var self=this;
  4025. smalltalk.send(self, "_error_", ["You cannot create new instances of UndefinedObject. Use nil"]);
  4026. return self;},
  4027. args: [],
  4028. source: unescape('new%0A%09%20%20%20%20self%20error%3A%20%27You%20cannot%20create%20new%20instances%20of%20UndefinedObject.%20Use%20nil%27'),
  4029. messageSends: ["error:"],
  4030. referencedClasses: []
  4031. }),
  4032. smalltalk.UndefinedObject.klass);
  4033. smalltalk.addClass('Collection', smalltalk.Object, [], 'Kernel');
  4034. smalltalk.addMethod(
  4035. unescape('_size'),
  4036. smalltalk.method({
  4037. selector: unescape('size'),
  4038. category: 'accessing',
  4039. fn: function (){
  4040. var self=this;
  4041. smalltalk.send(self, "_subclassResponsibility", []);
  4042. return self;},
  4043. args: [],
  4044. source: unescape('size%0A%09self%20subclassResponsibility'),
  4045. messageSends: ["subclassResponsibility"],
  4046. referencedClasses: []
  4047. }),
  4048. smalltalk.Collection);
  4049. smalltalk.addMethod(
  4050. unescape('_readStream'),
  4051. smalltalk.method({
  4052. selector: unescape('readStream'),
  4053. category: 'accessing',
  4054. fn: function (){
  4055. var self=this;
  4056. return smalltalk.send(self, "_stream", []);
  4057. return self;},
  4058. args: [],
  4059. source: unescape('readStream%0A%09%5Eself%20stream'),
  4060. messageSends: ["stream"],
  4061. referencedClasses: []
  4062. }),
  4063. smalltalk.Collection);
  4064. smalltalk.addMethod(
  4065. unescape('_writeStream'),
  4066. smalltalk.method({
  4067. selector: unescape('writeStream'),
  4068. category: 'accessing',
  4069. fn: function (){
  4070. var self=this;
  4071. return smalltalk.send(self, "_stream", []);
  4072. return self;},
  4073. args: [],
  4074. source: unescape('writeStream%0A%09%5Eself%20stream'),
  4075. messageSends: ["stream"],
  4076. referencedClasses: []
  4077. }),
  4078. smalltalk.Collection);
  4079. smalltalk.addMethod(
  4080. unescape('_stream'),
  4081. smalltalk.method({
  4082. selector: unescape('stream'),
  4083. category: 'accessing',
  4084. fn: function (){
  4085. var self=this;
  4086. return smalltalk.send(smalltalk.send(self, "_streamClass", []), "_on_", [self]);
  4087. return self;},
  4088. args: [],
  4089. source: unescape('stream%0A%09%5Eself%20streamClass%20on%3A%20self'),
  4090. messageSends: ["on:", "streamClass"],
  4091. referencedClasses: []
  4092. }),
  4093. smalltalk.Collection);
  4094. smalltalk.addMethod(
  4095. unescape('_streamClass'),
  4096. smalltalk.method({
  4097. selector: unescape('streamClass'),
  4098. category: 'accessing',
  4099. fn: function (){
  4100. var self=this;
  4101. return smalltalk.send(smalltalk.send(self, "_class", []), "_streamClass", []);
  4102. return self;},
  4103. args: [],
  4104. source: unescape('streamClass%0A%09%5Eself%20class%20streamClass'),
  4105. messageSends: ["streamClass", "class"],
  4106. referencedClasses: []
  4107. }),
  4108. smalltalk.Collection);
  4109. smalltalk.addMethod(
  4110. unescape('_add_'),
  4111. smalltalk.method({
  4112. selector: unescape('add%3A'),
  4113. category: 'adding/removing',
  4114. fn: function (anObject){
  4115. var self=this;
  4116. smalltalk.send(self, "_subclassResponsibility", []);
  4117. return self;},
  4118. args: ["anObject"],
  4119. source: unescape('add%3A%20anObject%0A%09self%20subclassResponsibility'),
  4120. messageSends: ["subclassResponsibility"],
  4121. referencedClasses: []
  4122. }),
  4123. smalltalk.Collection);
  4124. smalltalk.addMethod(
  4125. unescape('_addAll_'),
  4126. smalltalk.method({
  4127. selector: unescape('addAll%3A'),
  4128. category: 'adding/removing',
  4129. fn: function (aCollection){
  4130. var self=this;
  4131. smalltalk.send(aCollection, "_do_", [(function(each){return smalltalk.send(self, "_add_", [each]);})]);
  4132. return aCollection;
  4133. return self;},
  4134. args: ["aCollection"],
  4135. source: unescape('addAll%3A%20aCollection%0A%09aCollection%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20self%20add%3A%20each%5D.%0A%09%5EaCollection'),
  4136. messageSends: ["do:", "add:"],
  4137. referencedClasses: []
  4138. }),
  4139. smalltalk.Collection);
  4140. smalltalk.addMethod(
  4141. unescape('__comma'),
  4142. smalltalk.method({
  4143. selector: unescape('%2C'),
  4144. category: 'copying',
  4145. fn: function (aCollection){
  4146. var self=this;
  4147. return (function($rec){smalltalk.send($rec, "_addAll_", [aCollection]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_copy", []));
  4148. return self;},
  4149. args: ["aCollection"],
  4150. source: unescape('%2C%20aCollection%0A%09%5Eself%20copy%20%0A%09%20%20%20%20addAll%3A%20aCollection%3B%20%0A%09%20%20%20%20yourself'),
  4151. messageSends: ["addAll:", "yourself", "copy"],
  4152. referencedClasses: []
  4153. }),
  4154. smalltalk.Collection);
  4155. smalltalk.addMethod(
  4156. unescape('_copyWith_'),
  4157. smalltalk.method({
  4158. selector: unescape('copyWith%3A'),
  4159. category: 'copying',
  4160. fn: function (anObject){
  4161. var self=this;
  4162. return (function($rec){smalltalk.send($rec, "_add_", [anObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_copy", []));
  4163. return self;},
  4164. args: ["anObject"],
  4165. source: unescape('copyWith%3A%20anObject%0A%09%5Eself%20copy%20add%3A%20anObject%3B%20yourself'),
  4166. messageSends: ["add:", "yourself", "copy"],
  4167. referencedClasses: []
  4168. }),
  4169. smalltalk.Collection);
  4170. smalltalk.addMethod(
  4171. unescape('_copyWithAll_'),
  4172. smalltalk.method({
  4173. selector: unescape('copyWithAll%3A'),
  4174. category: 'copying',
  4175. fn: function (aCollection){
  4176. var self=this;
  4177. return (function($rec){smalltalk.send($rec, "_addAll_", [aCollection]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_copy", []));
  4178. return self;},
  4179. args: ["aCollection"],
  4180. source: unescape('copyWithAll%3A%20aCollection%0A%09%5Eself%20copy%20addAll%3A%20aCollection%3B%20yourself'),
  4181. messageSends: ["addAll:", "yourself", "copy"],
  4182. referencedClasses: []
  4183. }),
  4184. smalltalk.Collection);
  4185. smalltalk.addMethod(
  4186. unescape('_asArray'),
  4187. smalltalk.method({
  4188. selector: unescape('asArray'),
  4189. category: 'converting',
  4190. fn: function (){
  4191. var self=this;
  4192. var array=nil;
  4193. var index=nil;
  4194. array=smalltalk.send((smalltalk.Array || Array), "_new", []);
  4195. index=(0);
  4196. smalltalk.send(self, "_do_", [(function(each){index=((($receiver = index).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));return smalltalk.send(array, "_at_put_", [index, each]);})]);
  4197. return array;
  4198. return self;},
  4199. args: [],
  4200. source: unescape('asArray%0A%09%7C%20array%20index%20%7C%0A%09array%20%3A%3D%20Array%20new.%0A%09index%20%3A%3D%200.%0A%09self%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20index%20%3A%3D%20index%20+%201.%0A%09%20%20%20%20array%20at%3A%20index%20put%3A%20each%5D.%0A%09%5Earray'),
  4201. messageSends: ["new", "do:", unescape("+"), "at:put:"],
  4202. referencedClasses: ["Array"]
  4203. }),
  4204. smalltalk.Collection);
  4205. smalltalk.addMethod(
  4206. unescape('_do_'),
  4207. smalltalk.method({
  4208. selector: unescape('do%3A'),
  4209. category: 'enumerating',
  4210. fn: function (aBlock){
  4211. var self=this;
  4212. for(var i=0;i<self.length;i++){aBlock(self[i]);};
  4213. return self;},
  4214. args: ["aBlock"],
  4215. source: unescape('do%3A%20aBlock%0A%09%3Cfor%28var%20i%3D0%3Bi%3Cself.length%3Bi++%29%7BaBlock%28self%5Bi%5D%29%3B%7D%3E'),
  4216. messageSends: [],
  4217. referencedClasses: []
  4218. }),
  4219. smalltalk.Collection);
  4220. smalltalk.addMethod(
  4221. unescape('_collect_'),
  4222. smalltalk.method({
  4223. selector: unescape('collect%3A'),
  4224. category: 'enumerating',
  4225. fn: function (aBlock){
  4226. var self=this;
  4227. var newCollection=nil;
  4228. newCollection=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []);
  4229. smalltalk.send(self, "_do_", [(function(each){return smalltalk.send(newCollection, "_add_", [smalltalk.send(aBlock, "_value_", [each])]);})]);
  4230. return newCollection;
  4231. return self;},
  4232. args: ["aBlock"],
  4233. source: unescape('collect%3A%20aBlock%0A%09%7C%20newCollection%20%7C%0A%09newCollection%20%3A%3D%20self%20class%20new.%0A%09self%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20newCollection%20add%3A%20%28aBlock%20value%3A%20each%29%5D.%0A%09%5EnewCollection'),
  4234. messageSends: ["new", "class", "do:", "add:", "value:"],
  4235. referencedClasses: []
  4236. }),
  4237. smalltalk.Collection);
  4238. smalltalk.addMethod(
  4239. unescape('_detect_'),
  4240. smalltalk.method({
  4241. selector: unescape('detect%3A'),
  4242. category: 'enumerating',
  4243. fn: function (aBlock){
  4244. var self=this;
  4245. return smalltalk.send(self, "_detect_ifNone_", [aBlock, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
  4246. return self;},
  4247. args: ["aBlock"],
  4248. source: unescape('detect%3A%20aBlock%0A%09%5Eself%20detect%3A%20aBlock%20ifNone%3A%20%5Bself%20errorNotFound%5D'),
  4249. messageSends: ["detect:ifNone:", "errorNotFound"],
  4250. referencedClasses: []
  4251. }),
  4252. smalltalk.Collection);
  4253. smalltalk.addMethod(
  4254. unescape('_detect_ifNone_'),
  4255. smalltalk.method({
  4256. selector: unescape('detect%3AifNone%3A'),
  4257. category: 'enumerating',
  4258. fn: function (aBlock, anotherBlock){
  4259. var self=this;
  4260. for(var i = 0; i < self.length; i++)
  4261. if(aBlock(self[i]))
  4262. return self[i];
  4263. return anotherBlock();
  4264. ;
  4265. return self;},
  4266. args: ["aBlock", "anotherBlock"],
  4267. source: unescape('detect%3A%20aBlock%20ifNone%3A%20anotherBlock%0A%09%3C%0A%09%09for%28var%20i%20%3D%200%3B%20i%20%3C%20self.length%3B%20i++%29%0A%09%09%09if%28aBlock%28self%5Bi%5D%29%29%0A%09%09%09%09return%20self%5Bi%5D%3B%0A%09%09return%20anotherBlock%28%29%3B%0A%09%3E'),
  4268. messageSends: [],
  4269. referencedClasses: []
  4270. }),
  4271. smalltalk.Collection);
  4272. smalltalk.addMethod(
  4273. unescape('_do_separatedBy_'),
  4274. smalltalk.method({
  4275. selector: unescape('do%3AseparatedBy%3A'),
  4276. category: 'enumerating',
  4277. fn: function (aBlock, anotherBlock){
  4278. var self=this;
  4279. var first=nil;
  4280. first=true;
  4281. smalltalk.send(self, "_do_", [(function(each){((($receiver = first).klass === smalltalk.Boolean) ? ($receiver ? (function(){return first=false;})() : (function(){return smalltalk.send(anotherBlock, "_value", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return first=false;}), (function(){return smalltalk.send(anotherBlock, "_value", []);})]));return smalltalk.send(aBlock, "_value_", [each]);})]);
  4282. return self;},
  4283. args: ["aBlock", "anotherBlock"],
  4284. source: unescape('do%3A%20aBlock%20separatedBy%3A%20anotherBlock%0A%20%20%20%20%09%7C%20first%20%7C%0A%20%20%20%20%09first%20%3A%3D%20true.%0A%20%20%20%20%09self%20do%3A%20%5B%3Aeach%20%7C%0A%20%20%20%20%09%20%20%20%20first%0A%20%20%20%20%09%09ifTrue%3A%20%5Bfirst%20%3A%3D%20false%5D%0A%20%20%20%20%09%09ifFalse%3A%20%5BanotherBlock%20value%5D.%0A%20%20%20%20%09%20%20%20%20aBlock%20value%3A%20each%5D'),
  4285. messageSends: ["do:", "ifTrue:ifFalse:", "value", "value:"],
  4286. referencedClasses: []
  4287. }),
  4288. smalltalk.Collection);
  4289. smalltalk.addMethod(
  4290. unescape('_inject_into_'),
  4291. smalltalk.method({
  4292. selector: unescape('inject%3Ainto%3A'),
  4293. category: 'enumerating',
  4294. fn: function (anObject, aBlock){
  4295. var self=this;
  4296. var result=nil;
  4297. result=anObject;
  4298. smalltalk.send(self, "_do_", [(function(each){return result=smalltalk.send(aBlock, "_value_value_", [result, each]);})]);
  4299. return result;
  4300. return self;},
  4301. args: ["anObject", "aBlock"],
  4302. source: unescape('inject%3A%20anObject%20into%3A%20aBlock%0A%09%7C%20result%20%7C%0A%09result%20%3A%3D%20anObject.%0A%09self%20do%3A%20%5B%3Aeach%20%7C%20%0A%09%20%20%20%20result%20%3A%3D%20aBlock%20value%3A%20result%20value%3A%20each%5D.%0A%09%5Eresult'),
  4303. messageSends: ["do:", "value:value:"],
  4304. referencedClasses: []
  4305. }),
  4306. smalltalk.Collection);
  4307. smalltalk.addMethod(
  4308. unescape('_reject_'),
  4309. smalltalk.method({
  4310. selector: unescape('reject%3A'),
  4311. category: 'enumerating',
  4312. fn: function (aBlock){
  4313. var self=this;
  4314. return smalltalk.send(self, "_select_", [(function(each){return smalltalk.send(smalltalk.send(aBlock, "_value_", [each]), "__eq", [false]);})]);
  4315. return self;},
  4316. args: ["aBlock"],
  4317. source: unescape('reject%3A%20aBlock%0A%09%5Eself%20select%3A%20%5B%3Aeach%20%7C%20%28aBlock%20value%3A%20each%29%20%3D%20false%5D'),
  4318. messageSends: ["select:", unescape("%3D"), "value:"],
  4319. referencedClasses: []
  4320. }),
  4321. smalltalk.Collection);
  4322. smalltalk.addMethod(
  4323. unescape('_select_'),
  4324. smalltalk.method({
  4325. selector: unescape('select%3A'),
  4326. category: 'enumerating',
  4327. fn: function (aBlock){
  4328. var self=this;
  4329. var stream=nil;
  4330. stream=smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_new", []), "_writeStream", []);
  4331. smalltalk.send(self, "_do_", [(function(each){return ((($receiver = smalltalk.send(aBlock, "_value_", [each])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(stream, "_nextPut_", [each]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(stream, "_nextPut_", [each]);})]));})]);
  4332. return smalltalk.send(stream, "_contents", []);
  4333. return self;},
  4334. args: ["aBlock"],
  4335. source: unescape('select%3A%20aBlock%0A%09%7C%20stream%20%7C%0A%09stream%20%3A%3D%20self%20class%20new%20writeStream.%0A%09self%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20%28aBlock%20value%3A%20each%29%20ifTrue%3A%20%5B%0A%09%09stream%20nextPut%3A%20each%5D%5D.%0A%09%5Estream%20contents'),
  4336. messageSends: ["writeStream", "new", "class", "do:", "ifTrue:", "value:", "nextPut:", "contents"],
  4337. referencedClasses: []
  4338. }),
  4339. smalltalk.Collection);
  4340. smalltalk.addMethod(
  4341. unescape('_errorNotFound'),
  4342. smalltalk.method({
  4343. selector: unescape('errorNotFound'),
  4344. category: 'error handling',
  4345. fn: function (){
  4346. var self=this;
  4347. smalltalk.send(self, "_error_", ["Object is not in the collection"]);
  4348. return self;},
  4349. args: [],
  4350. source: unescape('errorNotFound%0A%09self%20error%3A%20%27Object%20is%20not%20in%20the%20collection%27'),
  4351. messageSends: ["error:"],
  4352. referencedClasses: []
  4353. }),
  4354. smalltalk.Collection);
  4355. smalltalk.addMethod(
  4356. unescape('_includes_'),
  4357. smalltalk.method({
  4358. selector: unescape('includes%3A'),
  4359. category: 'testing',
  4360. fn: function (anObject){
  4361. var self=this;
  4362. var i = self.length;
  4363. while (i--) {
  4364. if (smalltalk.send(self[i], "__eq", [anObject])) {return true;}
  4365. }
  4366. return false
  4367. ;
  4368. return self;},
  4369. args: ["anObject"],
  4370. source: unescape('includes%3A%20anObject%0A%09%3C%0A%09%09var%20i%20%3D%20self.length%3B%0A%09%09while%20%28i--%29%20%7B%0A%09%09%09if%20%28smalltalk.send%28self%5Bi%5D%2C%20%22__eq%22%2C%20%5BanObject%5D%29%29%20%7Breturn%20true%3B%7D%09%0A%09%09%7D%0A%09%09return%20false%0A%09%3E'),
  4371. messageSends: [],
  4372. referencedClasses: []
  4373. }),
  4374. smalltalk.Collection);
  4375. smalltalk.addMethod(
  4376. unescape('_notEmpty'),
  4377. smalltalk.method({
  4378. selector: unescape('notEmpty'),
  4379. category: 'testing',
  4380. fn: function (){
  4381. var self=this;
  4382. return smalltalk.send(smalltalk.send(self, "_isEmpty", []), "_not", []);
  4383. return self;},
  4384. args: [],
  4385. source: unescape('notEmpty%0A%09%5Eself%20isEmpty%20not'),
  4386. messageSends: ["not", "isEmpty"],
  4387. referencedClasses: []
  4388. }),
  4389. smalltalk.Collection);
  4390. smalltalk.addMethod(
  4391. unescape('_isEmpty'),
  4392. smalltalk.method({
  4393. selector: unescape('isEmpty'),
  4394. category: 'testing',
  4395. fn: function (){
  4396. var self=this;
  4397. return smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [(0)]);
  4398. return self;},
  4399. args: [],
  4400. source: unescape('isEmpty%0A%09%5Eself%20size%20%3D%200'),
  4401. messageSends: [unescape("%3D"), "size"],
  4402. referencedClasses: []
  4403. }),
  4404. smalltalk.Collection);
  4405. smalltalk.addMethod(
  4406. unescape('_remove_'),
  4407. smalltalk.method({
  4408. selector: unescape('remove%3A'),
  4409. category: 'adding/removing',
  4410. fn: function (anObject){
  4411. var self=this;
  4412. return smalltalk.send(self, "_remove_ifAbsent_", [anObject, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
  4413. return self;},
  4414. args: ["anObject"],
  4415. source: unescape('remove%3A%20anObject%0A%20%20%20%20%5Eself%20remove%3A%20anObject%20ifAbsent%3A%20%5Bself%20errorNotFound%5D'),
  4416. messageSends: ["remove:ifAbsent:", "errorNotFound"],
  4417. referencedClasses: []
  4418. }),
  4419. smalltalk.Collection);
  4420. smalltalk.addMethod(
  4421. unescape('_asSet'),
  4422. smalltalk.method({
  4423. selector: unescape('asSet'),
  4424. category: 'converting',
  4425. fn: function (){
  4426. var self=this;
  4427. return smalltalk.send((smalltalk.Set || Set), "_withAll_", [self]);
  4428. return self;},
  4429. args: [],
  4430. source: unescape('asSet%0A%09%5ESet%20withAll%3A%20self'),
  4431. messageSends: ["withAll:"],
  4432. referencedClasses: ["Set"]
  4433. }),
  4434. smalltalk.Collection);
  4435. smalltalk.addMethod(
  4436. unescape('_ifNotEmpty_'),
  4437. smalltalk.method({
  4438. selector: unescape('ifNotEmpty%3A'),
  4439. category: 'testing',
  4440. fn: function (aBlock){
  4441. var self=this;
  4442. smalltalk.send(smalltalk.send(self, "_notEmpty", []), "_ifTrue_", [aBlock]);
  4443. return self;},
  4444. args: ["aBlock"],
  4445. source: unescape('ifNotEmpty%3A%20aBlock%0A%09self%20notEmpty%20ifTrue%3A%20aBlock.'),
  4446. messageSends: ["ifTrue:", "notEmpty"],
  4447. referencedClasses: []
  4448. }),
  4449. smalltalk.Collection);
  4450. smalltalk.addMethod(
  4451. unescape('_ifEmpty_'),
  4452. smalltalk.method({
  4453. selector: unescape('ifEmpty%3A'),
  4454. category: 'testing',
  4455. fn: function (aBlock){
  4456. var self=this;
  4457. smalltalk.send(smalltalk.send(self, "_isEmpty", []), "_ifTrue_", [aBlock]);
  4458. return self;},
  4459. args: ["aBlock"],
  4460. source: unescape('ifEmpty%3A%20aBlock%0A%09self%20isEmpty%20ifTrue%3A%20aBlock.'),
  4461. messageSends: ["ifTrue:", "isEmpty"],
  4462. referencedClasses: []
  4463. }),
  4464. smalltalk.Collection);
  4465. smalltalk.addMethod(
  4466. unescape('_copyWithoutAll_'),
  4467. smalltalk.method({
  4468. selector: unescape('copyWithoutAll%3A'),
  4469. category: 'copying',
  4470. fn: function (aCollection){
  4471. var self=this;
  4472. return smalltalk.send(self, "_reject_", [(function(each){return smalltalk.send(aCollection, "_includes_", [each]);})]);
  4473. return self;},
  4474. args: ["aCollection"],
  4475. source: unescape('copyWithoutAll%3A%20aCollection%0A%09%22Answer%20a%20copy%20of%20the%20receiver%20that%20does%20not%20contain%20any%20elements%20%0A%09equal%20to%20those%20in%20aCollection.%22%0A%0A%09%5E%20self%20reject%3A%20%5B%3Aeach%20%7C%20aCollection%20includes%3A%20each%5D'),
  4476. messageSends: ["reject:", "includes:"],
  4477. referencedClasses: []
  4478. }),
  4479. smalltalk.Collection);
  4480. smalltalk.addMethod(
  4481. unescape('_remove_ifAbsent_'),
  4482. smalltalk.method({
  4483. selector: unescape('remove%3AifAbsent%3A'),
  4484. category: 'adding/removing',
  4485. fn: function (anObject, aBlock){
  4486. var self=this;
  4487. smalltalk.send(self, "_subclassResponsibility", []);
  4488. return self;},
  4489. args: ["anObject", "aBlock"],
  4490. source: unescape('remove%3A%20anObject%20ifAbsent%3A%20aBlock%0A%20%20%20%20self%20subclassResponsibility'),
  4491. messageSends: ["subclassResponsibility"],
  4492. referencedClasses: []
  4493. }),
  4494. smalltalk.Collection);
  4495. smalltalk.addMethod(
  4496. unescape('_streamClass'),
  4497. smalltalk.method({
  4498. selector: unescape('streamClass'),
  4499. category: 'accessing',
  4500. fn: function (){
  4501. var self=this;
  4502. return (smalltalk.Stream || Stream);
  4503. return self;},
  4504. args: [],
  4505. source: unescape('streamClass%0A%09%20%20%20%20%5EStream'),
  4506. messageSends: [],
  4507. referencedClasses: ["Stream"]
  4508. }),
  4509. smalltalk.Collection.klass);
  4510. smalltalk.addMethod(
  4511. unescape('_with_'),
  4512. smalltalk.method({
  4513. selector: unescape('with%3A'),
  4514. category: 'instance creation',
  4515. fn: function (anObject){
  4516. var self=this;
  4517. return (function($rec){smalltalk.send($rec, "_add_", [anObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  4518. return self;},
  4519. args: ["anObject"],
  4520. source: unescape('with%3A%20anObject%0A%09%20%20%20%20%5Eself%20new%0A%09%09add%3A%20anObject%3B%0A%09%09yourself'),
  4521. messageSends: ["add:", "yourself", "new"],
  4522. referencedClasses: []
  4523. }),
  4524. smalltalk.Collection.klass);
  4525. smalltalk.addMethod(
  4526. unescape('_with_with_'),
  4527. smalltalk.method({
  4528. selector: unescape('with%3Awith%3A'),
  4529. category: 'instance creation',
  4530. fn: function (anObject, anotherObject){
  4531. var self=this;
  4532. return (function($rec){smalltalk.send($rec, "_add_", [anObject]);smalltalk.send($rec, "_add_", [anotherObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  4533. return self;},
  4534. args: ["anObject", "anotherObject"],
  4535. source: unescape('with%3A%20anObject%20with%3A%20anotherObject%0A%09%20%20%20%20%5Eself%20new%0A%09%09add%3A%20anObject%3B%0A%09%09add%3A%20anotherObject%3B%0A%09%09yourself'),
  4536. messageSends: ["add:", "yourself", "new"],
  4537. referencedClasses: []
  4538. }),
  4539. smalltalk.Collection.klass);
  4540. smalltalk.addMethod(
  4541. unescape('_with_with_with_'),
  4542. smalltalk.method({
  4543. selector: unescape('with%3Awith%3Awith%3A'),
  4544. category: 'instance creation',
  4545. fn: function (firstObject, secondObject, thirdObject){
  4546. var self=this;
  4547. return (function($rec){smalltalk.send($rec, "_add_", [firstObject]);smalltalk.send($rec, "_add_", [secondObject]);smalltalk.send($rec, "_add_", [thirdObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  4548. return self;},
  4549. args: ["firstObject", "secondObject", "thirdObject"],
  4550. source: unescape('with%3A%20firstObject%20with%3A%20secondObject%20with%3A%20thirdObject%0A%09%20%20%20%20%5Eself%20new%0A%09%09add%3A%20firstObject%3B%0A%09%09add%3A%20secondObject%3B%0A%09%09add%3A%20thirdObject%3B%0A%09%09yourself'),
  4551. messageSends: ["add:", "yourself", "new"],
  4552. referencedClasses: []
  4553. }),
  4554. smalltalk.Collection.klass);
  4555. smalltalk.addMethod(
  4556. unescape('_withAll_'),
  4557. smalltalk.method({
  4558. selector: unescape('withAll%3A'),
  4559. category: 'instance creation',
  4560. fn: function (aCollection){
  4561. var self=this;
  4562. return (function($rec){smalltalk.send($rec, "_addAll_", [aCollection]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  4563. return self;},
  4564. args: ["aCollection"],
  4565. source: unescape('withAll%3A%20aCollection%0A%09%20%20%20%20%5Eself%20new%0A%09%09addAll%3A%20aCollection%3B%0A%09%09yourself'),
  4566. messageSends: ["addAll:", "yourself", "new"],
  4567. referencedClasses: []
  4568. }),
  4569. smalltalk.Collection.klass);
  4570. smalltalk.addClass('SequenceableCollection', smalltalk.Collection, [], 'Kernel');
  4571. smalltalk.addMethod(
  4572. unescape('_at_'),
  4573. smalltalk.method({
  4574. selector: unescape('at%3A'),
  4575. category: 'accessing',
  4576. fn: function (anIndex){
  4577. var self=this;
  4578. return smalltalk.send(self, "_at_ifAbsent_", [anIndex, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
  4579. return self;},
  4580. args: ["anIndex"],
  4581. source: unescape('at%3A%20anIndex%0A%09%5Eself%20at%3A%20anIndex%20ifAbsent%3A%20%5B%0A%09%20%20%20%20self%20errorNotFound%5D'),
  4582. messageSends: ["at:ifAbsent:", "errorNotFound"],
  4583. referencedClasses: []
  4584. }),
  4585. smalltalk.SequenceableCollection);
  4586. smalltalk.addMethod(
  4587. unescape('_at_ifAbsent_'),
  4588. smalltalk.method({
  4589. selector: unescape('at%3AifAbsent%3A'),
  4590. category: 'accessing',
  4591. fn: function (anIndex, aBlock){
  4592. var self=this;
  4593. smalltalk.send(self, "_subclassResponsibility", []);
  4594. return self;},
  4595. args: ["anIndex", "aBlock"],
  4596. source: unescape('at%3A%20anIndex%20ifAbsent%3A%20aBlock%0A%09self%20subclassResponsibility'),
  4597. messageSends: ["subclassResponsibility"],
  4598. referencedClasses: []
  4599. }),
  4600. smalltalk.SequenceableCollection);
  4601. smalltalk.addMethod(
  4602. unescape('_at_put_'),
  4603. smalltalk.method({
  4604. selector: unescape('at%3Aput%3A'),
  4605. category: 'accessing',
  4606. fn: function (anIndex, anObject){
  4607. var self=this;
  4608. smalltalk.send(self, "_subclassResponsibility", []);
  4609. return self;},
  4610. args: ["anIndex", "anObject"],
  4611. source: unescape('at%3A%20anIndex%20put%3A%20anObject%0A%09self%20subclassResponsibility'),
  4612. messageSends: ["subclassResponsibility"],
  4613. referencedClasses: []
  4614. }),
  4615. smalltalk.SequenceableCollection);
  4616. smalltalk.addMethod(
  4617. unescape('_copyFrom_to_'),
  4618. smalltalk.method({
  4619. selector: unescape('copyFrom%3Ato%3A'),
  4620. category: 'copying',
  4621. fn: function (anIndex, anotherIndex){
  4622. var self=this;
  4623. smalltalk.send(self, "_subclassResponsibility", []);
  4624. return self;},
  4625. args: ["anIndex", "anotherIndex"],
  4626. source: unescape('copyFrom%3A%20anIndex%20to%3A%20anotherIndex%0A%09self%20subclassResponsibility'),
  4627. messageSends: ["subclassResponsibility"],
  4628. referencedClasses: []
  4629. }),
  4630. smalltalk.SequenceableCollection);
  4631. smalltalk.addMethod(
  4632. unescape('_first'),
  4633. smalltalk.method({
  4634. selector: unescape('first'),
  4635. category: 'accessing',
  4636. fn: function (){
  4637. var self=this;
  4638. return smalltalk.send(self, "_at_", [(1)]);
  4639. return self;},
  4640. args: [],
  4641. source: unescape('first%0A%09%5Eself%20at%3A%201'),
  4642. messageSends: ["at:"],
  4643. referencedClasses: []
  4644. }),
  4645. smalltalk.SequenceableCollection);
  4646. smalltalk.addMethod(
  4647. unescape('_fourth'),
  4648. smalltalk.method({
  4649. selector: unescape('fourth'),
  4650. category: 'accessing',
  4651. fn: function (){
  4652. var self=this;
  4653. return smalltalk.send(self, "_at_", [(4)]);
  4654. return self;},
  4655. args: [],
  4656. source: unescape('fourth%0A%09%5Eself%20at%3A%204'),
  4657. messageSends: ["at:"],
  4658. referencedClasses: []
  4659. }),
  4660. smalltalk.SequenceableCollection);
  4661. smalltalk.addMethod(
  4662. unescape('_last'),
  4663. smalltalk.method({
  4664. selector: unescape('last'),
  4665. category: 'accessing',
  4666. fn: function (){
  4667. var self=this;
  4668. return smalltalk.send(self, "_at_", [smalltalk.send(self, "_size", [])]);
  4669. return self;},
  4670. args: [],
  4671. source: unescape('last%0A%09%5Eself%20at%3A%20self%20size'),
  4672. messageSends: ["at:", "size"],
  4673. referencedClasses: []
  4674. }),
  4675. smalltalk.SequenceableCollection);
  4676. smalltalk.addMethod(
  4677. unescape('_second'),
  4678. smalltalk.method({
  4679. selector: unescape('second'),
  4680. category: 'accessing',
  4681. fn: function (){
  4682. var self=this;
  4683. return smalltalk.send(self, "_at_", [(2)]);
  4684. return self;},
  4685. args: [],
  4686. source: unescape('second%0A%09%5Eself%20at%3A%202'),
  4687. messageSends: ["at:"],
  4688. referencedClasses: []
  4689. }),
  4690. smalltalk.SequenceableCollection);
  4691. smalltalk.addMethod(
  4692. unescape('_third'),
  4693. smalltalk.method({
  4694. selector: unescape('third'),
  4695. category: 'accessing',
  4696. fn: function (){
  4697. var self=this;
  4698. return smalltalk.send(self, "_at_", [(3)]);
  4699. return self;},
  4700. args: [],
  4701. source: unescape('third%0A%09%5Eself%20at%3A%203'),
  4702. messageSends: ["at:"],
  4703. referencedClasses: []
  4704. }),
  4705. smalltalk.SequenceableCollection);
  4706. smalltalk.addMethod(
  4707. unescape('_removeLast'),
  4708. smalltalk.method({
  4709. selector: unescape('removeLast'),
  4710. category: 'adding',
  4711. fn: function (){
  4712. var self=this;
  4713. smalltalk.send(self, "_remove_", [smalltalk.send(self, "_last", [])]);
  4714. return self;},
  4715. args: [],
  4716. source: unescape('removeLast%0A%09self%20remove%3A%20self%20last'),
  4717. messageSends: ["remove:", "last"],
  4718. referencedClasses: []
  4719. }),
  4720. smalltalk.SequenceableCollection);
  4721. smalltalk.addMethod(
  4722. unescape('_addLast_'),
  4723. smalltalk.method({
  4724. selector: unescape('addLast%3A'),
  4725. category: 'adding',
  4726. fn: function (anObject){
  4727. var self=this;
  4728. smalltalk.send(self, "_add_", [anObject]);
  4729. return self;},
  4730. args: ["anObject"],
  4731. source: unescape('addLast%3A%20anObject%0A%09self%20add%3A%20anObject'),
  4732. messageSends: ["add:"],
  4733. referencedClasses: []
  4734. }),
  4735. smalltalk.SequenceableCollection);
  4736. smalltalk.addMethod(
  4737. unescape('_withIndexDo_'),
  4738. smalltalk.method({
  4739. selector: unescape('withIndexDo%3A'),
  4740. category: 'enumerating',
  4741. fn: function (aBlock){
  4742. var self=this;
  4743. for(var i=0;i<self.length;i++){aBlock(self[i], i+1);};
  4744. return self;},
  4745. args: ["aBlock"],
  4746. source: unescape('withIndexDo%3A%20aBlock%0A%09%3Cfor%28var%20i%3D0%3Bi%3Cself.length%3Bi++%29%7BaBlock%28self%5Bi%5D%2C%20i+1%29%3B%7D%3E'),
  4747. messageSends: [],
  4748. referencedClasses: []
  4749. }),
  4750. smalltalk.SequenceableCollection);
  4751. smalltalk.addMethod(
  4752. unescape('_allButFirst'),
  4753. smalltalk.method({
  4754. selector: unescape('allButFirst'),
  4755. category: 'accessing',
  4756. fn: function (){
  4757. var self=this;
  4758. return smalltalk.send(self, "_copyFrom_to_", [(2), smalltalk.send(self, "_size", [])]);
  4759. return self;},
  4760. args: [],
  4761. source: unescape('allButFirst%0A%09%5Eself%20copyFrom%3A%202%20to%3A%20self%20size'),
  4762. messageSends: ["copyFrom:to:", "size"],
  4763. referencedClasses: []
  4764. }),
  4765. smalltalk.SequenceableCollection);
  4766. smalltalk.addMethod(
  4767. unescape('_allButLast'),
  4768. smalltalk.method({
  4769. selector: unescape('allButLast'),
  4770. category: 'accessing',
  4771. fn: function (){
  4772. var self=this;
  4773. return smalltalk.send(self, "_copyFrom_to_", [(1), ((($receiver = smalltalk.send(self, "_size", [])).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)]))]);
  4774. return self;},
  4775. args: [],
  4776. source: unescape('allButLast%0A%09%5Eself%20copyFrom%3A%201%20to%3A%20self%20size%20-%201'),
  4777. messageSends: ["copyFrom:to:", unescape("-"), "size"],
  4778. referencedClasses: []
  4779. }),
  4780. smalltalk.SequenceableCollection);
  4781. smalltalk.addMethod(
  4782. unescape('_indexOf_'),
  4783. smalltalk.method({
  4784. selector: unescape('indexOf%3A'),
  4785. category: 'accessing',
  4786. fn: function (anObject){
  4787. var self=this;
  4788. return smalltalk.send(self, "_indexOf_ifAbsent_", [anObject, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
  4789. return self;},
  4790. args: ["anObject"],
  4791. source: unescape('indexOf%3A%20anObject%0A%09%5Eself%20indexOf%3A%20anObject%20ifAbsent%3A%20%5Bself%20errorNotFound%5D'),
  4792. messageSends: ["indexOf:ifAbsent:", "errorNotFound"],
  4793. referencedClasses: []
  4794. }),
  4795. smalltalk.SequenceableCollection);
  4796. smalltalk.addMethod(
  4797. unescape('_indexOf_ifAbsent_'),
  4798. smalltalk.method({
  4799. selector: unescape('indexOf%3AifAbsent%3A'),
  4800. category: 'accessing',
  4801. fn: function (anObject, aBlock){
  4802. var self=this;
  4803. for(var i=0;i<self.length;i++){
  4804. if(self[i].__eq(anObject)) {return i+1}
  4805. }
  4806. return aBlock();
  4807. ;
  4808. return self;},
  4809. args: ["anObject", "aBlock"],
  4810. source: unescape('indexOf%3A%20anObject%20ifAbsent%3A%20aBlock%0A%09%3C%0A%09%09for%28var%20i%3D0%3Bi%3Cself.length%3Bi++%29%7B%0A%09%09%09if%28self%5Bi%5D.__eq%28anObject%29%29%20%7Breturn%20i+1%7D%0A%09%09%7D%0A%09%09return%20aBlock%28%29%3B%0A%09%3E'),
  4811. messageSends: [],
  4812. referencedClasses: []
  4813. }),
  4814. smalltalk.SequenceableCollection);
  4815. smalltalk.addMethod(
  4816. unescape('_indexOf_startingAt_ifAbsent_'),
  4817. smalltalk.method({
  4818. selector: unescape('indexOf%3AstartingAt%3AifAbsent%3A'),
  4819. category: 'accessing',
  4820. fn: function (anObject, start, aBlock){
  4821. var self=this;
  4822. for(var i=start-1;i<self.length;i++){
  4823. if(self[i].__eq(anObject)) {return i+1}
  4824. }
  4825. return aBlock();
  4826. ;
  4827. return self;},
  4828. args: ["anObject", "start", "aBlock"],
  4829. source: unescape('indexOf%3A%20anObject%20startingAt%3A%20start%20ifAbsent%3A%20aBlock%0A%09%3C%0A%09%09for%28var%20i%3Dstart-1%3Bi%3Cself.length%3Bi++%29%7B%0A%09%09%09if%28self%5Bi%5D.__eq%28anObject%29%29%20%7Breturn%20i+1%7D%0A%09%09%7D%0A%09%09return%20aBlock%28%29%3B%0A%09%3E'),
  4830. messageSends: [],
  4831. referencedClasses: []
  4832. }),
  4833. smalltalk.SequenceableCollection);
  4834. smalltalk.addMethod(
  4835. unescape('_indexOf_startingAt_'),
  4836. smalltalk.method({
  4837. selector: unescape('indexOf%3AstartingAt%3A'),
  4838. category: 'accessing',
  4839. fn: function (anObject, start){
  4840. var self=this;
  4841. return smalltalk.send(self, "_indexOf_startingAt_ifAbsent_", [anObject, start, (function(){return (0);})]);
  4842. return self;},
  4843. args: ["anObject", "start"],
  4844. source: unescape('indexOf%3A%20anObject%20startingAt%3A%20start%0A%09%22Answer%20the%20index%20of%20the%20first%20occurence%20of%20anElement%20after%20start%0A%09within%20the%20receiver.%20If%20the%20receiver%20does%20not%20contain%20anElement%2C%20%0A%09answer%200.%22%0A%09%5Eself%20indexOf%3A%20anObject%20startingAt%3A%20start%20ifAbsent%3A%20%5B0%5D'),
  4845. messageSends: ["indexOf:startingAt:ifAbsent:"],
  4846. referencedClasses: []
  4847. }),
  4848. smalltalk.SequenceableCollection);
  4849. smalltalk.addMethod(
  4850. unescape('_reversed'),
  4851. smalltalk.method({
  4852. selector: unescape('reversed'),
  4853. category: 'converting',
  4854. fn: function (){
  4855. var self=this;
  4856. smalltalk.send(self, "_subclassResponsibility", []);
  4857. return self;},
  4858. args: [],
  4859. source: unescape('reversed%0A%09self%20subclassResponsibility'),
  4860. messageSends: ["subclassResponsibility"],
  4861. referencedClasses: []
  4862. }),
  4863. smalltalk.SequenceableCollection);
  4864. smalltalk.addMethod(
  4865. unescape('_atRandom'),
  4866. smalltalk.method({
  4867. selector: unescape('atRandom'),
  4868. category: 'accessing',
  4869. fn: function (){
  4870. var self=this;
  4871. return smalltalk.send(self, "_at_", [smalltalk.send(smalltalk.send(self, "_size", []), "_atRandom", [])]);
  4872. return self;},
  4873. args: [],
  4874. source: unescape('atRandom%0A%09%5E%20self%20at%3A%20self%20size%20atRandom'),
  4875. messageSends: ["at:", "atRandom", "size"],
  4876. referencedClasses: []
  4877. }),
  4878. smalltalk.SequenceableCollection);
  4879. smalltalk.addClass('String', smalltalk.SequenceableCollection, [], 'Kernel');
  4880. smalltalk.addMethod(
  4881. unescape('__eq'),
  4882. smalltalk.method({
  4883. selector: unescape('%3D'),
  4884. category: 'comparing',
  4885. fn: function (aString){
  4886. var self=this;
  4887. try{((($receiver = smalltalk.send(smalltalk.send(aString, "_class", []), "__eq", [smalltalk.send(self, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));
  4888. return String(self) == aString;
  4889. return self;
  4890. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
  4891. args: ["aString"],
  4892. source: unescape('%3D%20aString%0A%09aString%20class%20%3D%20self%20class%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09%3Creturn%20String%28self%29%20%3D%3D%20aString%3E'),
  4893. messageSends: ["ifFalse:", unescape("%3D"), "class"],
  4894. referencedClasses: []
  4895. }),
  4896. smalltalk.String);
  4897. smalltalk.addMethod(
  4898. unescape('_size'),
  4899. smalltalk.method({
  4900. selector: unescape('size'),
  4901. category: 'accessing',
  4902. fn: function (){
  4903. var self=this;
  4904. return self.length;
  4905. return self;},
  4906. args: [],
  4907. source: unescape('size%0A%09%3Creturn%20self.length%3E'),
  4908. messageSends: [],
  4909. referencedClasses: []
  4910. }),
  4911. smalltalk.String);
  4912. smalltalk.addMethod(
  4913. unescape('_at_'),
  4914. smalltalk.method({
  4915. selector: unescape('at%3A'),
  4916. category: 'accessing',
  4917. fn: function (anIndex){
  4918. var self=this;
  4919. return self[anIndex - 1];
  4920. return self;},
  4921. args: ["anIndex"],
  4922. source: unescape('at%3A%20anIndex%0A%09%3Creturn%20self%5BanIndex%20-%201%5D%3E'),
  4923. messageSends: [],
  4924. referencedClasses: []
  4925. }),
  4926. smalltalk.String);
  4927. smalltalk.addMethod(
  4928. unescape('_at_put_'),
  4929. smalltalk.method({
  4930. selector: unescape('at%3Aput%3A'),
  4931. category: 'accessing',
  4932. fn: function (anIndex, anObject){
  4933. var self=this;
  4934. smalltalk.send(self, "_errorReadOnly", []);
  4935. return self;},
  4936. args: ["anIndex", "anObject"],
  4937. source: unescape('at%3A%20anIndex%20put%3A%20anObject%0A%20%20%20%20%09self%20errorReadOnly'),
  4938. messageSends: ["errorReadOnly"],
  4939. referencedClasses: []
  4940. }),
  4941. smalltalk.String);
  4942. smalltalk.addMethod(
  4943. unescape('_at_ifAbsent_'),
  4944. smalltalk.method({
  4945. selector: unescape('at%3AifAbsent%3A'),
  4946. category: 'accessing',
  4947. fn: function (anIndex, aBlock){
  4948. var self=this;
  4949. (($receiver = smalltalk.send(self, "_at_", [anIndex])) == nil || $receiver == undefined) ? (function(){return aBlock;})() : $receiver;
  4950. return self;},
  4951. args: ["anIndex", "aBlock"],
  4952. source: unescape('at%3A%20anIndex%20ifAbsent%3A%20aBlock%0A%20%20%20%20%09%28self%20at%3A%20anIndex%29%20ifNil%3A%20%5BaBlock%5D'),
  4953. messageSends: ["ifNil:", "at:"],
  4954. referencedClasses: []
  4955. }),
  4956. smalltalk.String);
  4957. smalltalk.addMethod(
  4958. unescape('_escaped'),
  4959. smalltalk.method({
  4960. selector: unescape('escaped'),
  4961. category: 'accessing',
  4962. fn: function (){
  4963. var self=this;
  4964. return escape(self);
  4965. return self;},
  4966. args: [],
  4967. source: unescape('escaped%0A%09%3Creturn%20escape%28self%29%3E'),
  4968. messageSends: [],
  4969. referencedClasses: []
  4970. }),
  4971. smalltalk.String);
  4972. smalltalk.addMethod(
  4973. unescape('_unescaped'),
  4974. smalltalk.method({
  4975. selector: unescape('unescaped'),
  4976. category: 'accessing',
  4977. fn: function (){
  4978. var self=this;
  4979. return unescape(self);
  4980. return self;},
  4981. args: [],
  4982. source: unescape('unescaped%0A%09%3Creturn%20unescape%28self%29%3E'),
  4983. messageSends: [],
  4984. referencedClasses: []
  4985. }),
  4986. smalltalk.String);
  4987. smalltalk.addMethod(
  4988. unescape('_add_'),
  4989. smalltalk.method({
  4990. selector: unescape('add%3A'),
  4991. category: 'adding',
  4992. fn: function (anObject){
  4993. var self=this;
  4994. smalltalk.send(self, "_errorReadOnly", []);
  4995. return self;},
  4996. args: ["anObject"],
  4997. source: unescape('add%3A%20anObject%0A%20%20%20%20%09self%20errorReadOnly'),
  4998. messageSends: ["errorReadOnly"],
  4999. referencedClasses: []
  5000. }),
  5001. smalltalk.String);
  5002. smalltalk.addMethod(
  5003. unescape('__comma'),
  5004. smalltalk.method({
  5005. selector: unescape('%2C'),
  5006. category: 'copying',
  5007. fn: function (aString){
  5008. var self=this;
  5009. return self + aString;
  5010. return self;},
  5011. args: ["aString"],
  5012. source: unescape('%2C%20aString%0A%09%3Creturn%20self%20+%20aString%3E'),
  5013. messageSends: [],
  5014. referencedClasses: []
  5015. }),
  5016. smalltalk.String);
  5017. smalltalk.addMethod(
  5018. unescape('_copyFrom_to_'),
  5019. smalltalk.method({
  5020. selector: unescape('copyFrom%3Ato%3A'),
  5021. category: 'copying',
  5022. fn: function (anIndex, anotherIndex){
  5023. var self=this;
  5024. return self.substring(anIndex - 1, anotherIndex);
  5025. return self;},
  5026. args: ["anIndex", "anotherIndex"],
  5027. source: unescape('copyFrom%3A%20anIndex%20to%3A%20anotherIndex%0A%09%3Creturn%20self.substring%28anIndex%20-%201%2C%20anotherIndex%29%3E'),
  5028. messageSends: [],
  5029. referencedClasses: []
  5030. }),
  5031. smalltalk.String);
  5032. smalltalk.addMethod(
  5033. unescape('_shallowCopy'),
  5034. smalltalk.method({
  5035. selector: unescape('shallowCopy'),
  5036. category: 'copying',
  5037. fn: function (){
  5038. var self=this;
  5039. return smalltalk.send(smalltalk.send(self, "_class", []), "_fromString_", [self]);
  5040. return self;},
  5041. args: [],
  5042. source: unescape('shallowCopy%0A%20%20%20%20%09%5Eself%20class%20fromString%3A%20self'),
  5043. messageSends: ["fromString:", "class"],
  5044. referencedClasses: []
  5045. }),
  5046. smalltalk.String);
  5047. smalltalk.addMethod(
  5048. unescape('_deepCopy'),
  5049. smalltalk.method({
  5050. selector: unescape('deepCopy'),
  5051. category: 'copying',
  5052. fn: function (){
  5053. var self=this;
  5054. return smalltalk.send(self, "_shallowCopy", []);
  5055. return self;},
  5056. args: [],
  5057. source: unescape('deepCopy%0A%20%20%20%20%09%5Eself%20shallowCopy'),
  5058. messageSends: ["shallowCopy"],
  5059. referencedClasses: []
  5060. }),
  5061. smalltalk.String);
  5062. smalltalk.addMethod(
  5063. unescape('_asSelector'),
  5064. smalltalk.method({
  5065. selector: unescape('asSelector'),
  5066. category: 'converting',
  5067. fn: function (){
  5068. var self=this;
  5069. var selector=nil;
  5070. selector=smalltalk.send("_", "__comma", [self]);
  5071. selector=smalltalk.send(selector, "_replace_with_", [":", "_"]);
  5072. selector=smalltalk.send(selector, "_replace_with_", [unescape("%5B+%5D"), "_plus"]);
  5073. selector=smalltalk.send(selector, "_replace_with_", [unescape("-"), "_minus"]);
  5074. selector=smalltalk.send(selector, "_replace_with_", [unescape("%5B*%5D"), "_star"]);
  5075. selector=smalltalk.send(selector, "_replace_with_", [unescape("%5B/%5D"), "_slash"]);
  5076. selector=smalltalk.send(selector, "_replace_with_", [unescape("%3E"), "_gt"]);
  5077. selector=smalltalk.send(selector, "_replace_with_", [unescape("%3C"), "_lt"]);
  5078. selector=smalltalk.send(selector, "_replace_with_", [unescape("%3D"), "_eq"]);
  5079. selector=smalltalk.send(selector, "_replace_with_", [unescape("%2C"), "_comma"]);
  5080. selector=smalltalk.send(selector, "_replace_with_", [unescape("%5B@%5D"), "_at"]);
  5081. return selector;
  5082. return self;},
  5083. args: [],
  5084. source: unescape('asSelector%0A%09%22If%20you%20change%20this%20method%2C%20change%20smalltalk.convertSelector%20too%20%28see%20js/boot.js%20file%29%22%0A%0A%09%7C%20selector%20%7C%0A%09selector%20%3A%3D%20%27_%27%2C%20self.%0A%20%20%20%20%09selector%20%3A%3D%20selector%20replace%3A%20%27%3A%27%20with%3A%20%27_%27.%0A%20%20%20%20%09selector%20%3A%3D%20selector%20replace%3A%20%27%5B+%5D%27%20with%3A%20%27_plus%27.%0A%20%20%20%20%09selector%20%3A%3D%20selector%20replace%3A%20%27-%27%20with%3A%20%27_minus%27.%0A%20%20%20%20%09selector%20%3A%3D%20selector%20replace%3A%20%27%5B*%5D%27%20with%3A%20%27_star%27.%0A%20%20%20%20%09selector%20%3A%3D%20selector%20replace%3A%20%27%5B/%5D%27%20with%3A%20%27_slash%27.%0A%20%20%20%20%09selector%20%3A%3D%20selector%20replace%3A%20%27%3E%27%20with%3A%20%27_gt%27.%0A%20%20%20%20%09selector%20%3A%3D%20selector%20replace%3A%20%27%3C%27%20with%3A%20%27_lt%27.%0A%20%20%20%20%09selector%20%3A%3D%20selector%20replace%3A%20%27%3D%27%20with%3A%20%27_eq%27.%0A%20%20%20%20%09selector%20%3A%3D%20selector%20replace%3A%20%27%2C%27%20with%3A%20%27_comma%27.%0A%20%20%20%20%09selector%20%3A%3D%20selector%20replace%3A%20%27%5B@%5D%27%20with%3A%20%27_at%27.%0A%09%5Eselector'),
  5085. messageSends: [unescape("%2C"), "replace:with:"],
  5086. referencedClasses: []
  5087. }),
  5088. smalltalk.String);
  5089. smalltalk.addMethod(
  5090. unescape('_asJavascript'),
  5091. smalltalk.method({
  5092. selector: unescape('asJavascript'),
  5093. category: 'converting',
  5094. fn: function (){
  5095. var self=this;
  5096. if(self.search(/^[a-zA-Z0-9_:.$ ]*$/) == -1)
  5097. return "unescape(\"" + escape(self) + "\")";
  5098. else
  5099. return "\"" + self + "\"";
  5100. ;
  5101. return self;},
  5102. args: [],
  5103. source: unescape('asJavascript%0A%09%3C%0A%09%09if%28self.search%28/%5E%5Ba-zA-Z0-9_%3A.%24%20%5D*%24/%29%20%3D%3D%20-1%29%0A%09%09%09return%20%22unescape%28%5C%22%22%20+%20escape%28self%29%20+%20%22%5C%22%29%22%3B%0A%09%09else%0A%09%09%09return%20%22%5C%22%22%20+%20self%20+%20%22%5C%22%22%3B%0A%09%3E'),
  5104. messageSends: [],
  5105. referencedClasses: []
  5106. }),
  5107. smalltalk.String);
  5108. smalltalk.addMethod(
  5109. unescape('_replace_with_'),
  5110. smalltalk.method({
  5111. selector: unescape('replace%3Awith%3A'),
  5112. category: 'regular expressions',
  5113. fn: function (aString, anotherString){
  5114. var self=this;
  5115. return smalltalk.send(self, "_replaceRegexp_with_", [smalltalk.send((smalltalk.RegularExpression || RegularExpression), "_fromString_flag_", [aString, "g"]), anotherString]);
  5116. return self;},
  5117. args: ["aString", "anotherString"],
  5118. source: unescape('replace%3A%20aString%20with%3A%20anotherString%0A%20%20%20%20%09%5Eself%20replaceRegexp%3A%20%28RegularExpression%20fromString%3A%20aString%20flag%3A%20%27g%27%29%20with%3A%20anotherString'),
  5119. messageSends: ["replaceRegexp:with:", "fromString:flag:"],
  5120. referencedClasses: ["RegularExpression"]
  5121. }),
  5122. smalltalk.String);
  5123. smalltalk.addMethod(
  5124. unescape('_replaceRegexp_with_'),
  5125. smalltalk.method({
  5126. selector: unescape('replaceRegexp%3Awith%3A'),
  5127. category: 'regular expressions',
  5128. fn: function (aRegexp, aString){
  5129. var self=this;
  5130. return self.replace(aRegexp, aString);
  5131. return self;},
  5132. args: ["aRegexp", "aString"],
  5133. source: unescape('replaceRegexp%3A%20aRegexp%20with%3A%20aString%0A%09%3Creturn%20self.replace%28aRegexp%2C%20aString%29%3E'),
  5134. messageSends: [],
  5135. referencedClasses: []
  5136. }),
  5137. smalltalk.String);
  5138. smalltalk.addMethod(
  5139. unescape('_tokenize_'),
  5140. smalltalk.method({
  5141. selector: unescape('tokenize%3A'),
  5142. category: 'converting',
  5143. fn: function (aString){
  5144. var self=this;
  5145. return self.split(aString);
  5146. return self;},
  5147. args: ["aString"],
  5148. source: unescape('tokenize%3A%20aString%0A%09%3Creturn%20self.split%28aString%29%3E'),
  5149. messageSends: [],
  5150. referencedClasses: []
  5151. }),
  5152. smalltalk.String);
  5153. smalltalk.addMethod(
  5154. unescape('_match_'),
  5155. smalltalk.method({
  5156. selector: unescape('match%3A'),
  5157. category: 'regular expressions',
  5158. fn: function (aRegexp){
  5159. var self=this;
  5160. return self.search(aRegexp) != -1;
  5161. return self;},
  5162. args: ["aRegexp"],
  5163. source: unescape('match%3A%20aRegexp%0A%09%3Creturn%20self.search%28aRegexp%29%20%21%3D%20-1%3E'),
  5164. messageSends: [],
  5165. referencedClasses: []
  5166. }),
  5167. smalltalk.String);
  5168. smalltalk.addMethod(
  5169. unescape('_asString'),
  5170. smalltalk.method({
  5171. selector: unescape('asString'),
  5172. category: 'converting',
  5173. fn: function (){
  5174. var self=this;
  5175. return self;
  5176. return self;},
  5177. args: [],
  5178. source: unescape('asString%0A%20%20%20%20%09%5Eself'),
  5179. messageSends: [],
  5180. referencedClasses: []
  5181. }),
  5182. smalltalk.String);
  5183. smalltalk.addMethod(
  5184. unescape('_asNumber'),
  5185. smalltalk.method({
  5186. selector: unescape('asNumber'),
  5187. category: 'converting',
  5188. fn: function (){
  5189. var self=this;
  5190. return Number(self);
  5191. return self;},
  5192. args: [],
  5193. source: unescape('asNumber%0A%09%3Creturn%20Number%28self%29%3E'),
  5194. messageSends: [],
  5195. referencedClasses: []
  5196. }),
  5197. smalltalk.String);
  5198. smalltalk.addMethod(
  5199. unescape('_errorReadOnly'),
  5200. smalltalk.method({
  5201. selector: unescape('errorReadOnly'),
  5202. category: 'error handling',
  5203. fn: function (){
  5204. var self=this;
  5205. smalltalk.send(self, "_error_", [unescape("Object%20is%20read-only")]);
  5206. return self;},
  5207. args: [],
  5208. source: unescape('errorReadOnly%0A%20%20%20%20%09self%20error%3A%20%27Object%20is%20read-only%27'),
  5209. messageSends: ["error:"],
  5210. referencedClasses: []
  5211. }),
  5212. smalltalk.String);
  5213. smalltalk.addMethod(
  5214. unescape('_printString'),
  5215. smalltalk.method({
  5216. selector: unescape('printString'),
  5217. category: 'printing',
  5218. fn: function (){
  5219. var self=this;
  5220. return smalltalk.send(smalltalk.send(unescape("%27"), "__comma", [self]), "__comma", [unescape("%27")]);
  5221. return self;},
  5222. args: [],
  5223. source: unescape('printString%0A%20%20%20%20%09%5E%27%27%27%27%2C%20self%2C%20%27%27%27%27'),
  5224. messageSends: [unescape("%2C")],
  5225. referencedClasses: []
  5226. }),
  5227. smalltalk.String);
  5228. smalltalk.addMethod(
  5229. unescape('_printNl'),
  5230. smalltalk.method({
  5231. selector: unescape('printNl'),
  5232. category: 'printing',
  5233. fn: function (){
  5234. var self=this;
  5235. console.log(self);
  5236. return self;},
  5237. args: [],
  5238. source: unescape('printNl%0A%09%3Cconsole.log%28self%29%3E'),
  5239. messageSends: [],
  5240. referencedClasses: []
  5241. }),
  5242. smalltalk.String);
  5243. smalltalk.addMethod(
  5244. unescape('_isString'),
  5245. smalltalk.method({
  5246. selector: unescape('isString'),
  5247. category: 'testing',
  5248. fn: function (){
  5249. var self=this;
  5250. return true;
  5251. return self;},
  5252. args: [],
  5253. source: unescape('isString%0A%20%20%20%20%09%5Etrue'),
  5254. messageSends: [],
  5255. referencedClasses: []
  5256. }),
  5257. smalltalk.String);
  5258. smalltalk.addMethod(
  5259. unescape('__gt'),
  5260. smalltalk.method({
  5261. selector: unescape('%3E'),
  5262. category: 'comparing',
  5263. fn: function (aString){
  5264. var self=this;
  5265. return String(self) > aString;
  5266. return self;},
  5267. args: ["aString"],
  5268. source: unescape('%3E%20aString%0A%09%3Creturn%20String%28self%29%20%3E%3E%20aString%3E'),
  5269. messageSends: [],
  5270. referencedClasses: []
  5271. }),
  5272. smalltalk.String);
  5273. smalltalk.addMethod(
  5274. unescape('__lt'),
  5275. smalltalk.method({
  5276. selector: unescape('%3C'),
  5277. category: 'comparing',
  5278. fn: function (aString){
  5279. var self=this;
  5280. return String(self) < aString;
  5281. return self;},
  5282. args: ["aString"],
  5283. source: unescape('%3C%20aString%0A%09%3Creturn%20String%28self%29%20%3C%20aString%3E'),
  5284. messageSends: [],
  5285. referencedClasses: []
  5286. }),
  5287. smalltalk.String);
  5288. smalltalk.addMethod(
  5289. unescape('__gt_eq'),
  5290. smalltalk.method({
  5291. selector: unescape('%3E%3D'),
  5292. category: 'comparing',
  5293. fn: function (aString){
  5294. var self=this;
  5295. return String(self) >= aString;
  5296. return self;},
  5297. args: ["aString"],
  5298. source: unescape('%3E%3D%20aString%0A%09%3Creturn%20String%28self%29%20%3E%3E%3D%20aString%3E'),
  5299. messageSends: [],
  5300. referencedClasses: []
  5301. }),
  5302. smalltalk.String);
  5303. smalltalk.addMethod(
  5304. unescape('__lt_eq'),
  5305. smalltalk.method({
  5306. selector: unescape('%3C%3D'),
  5307. category: 'comparing',
  5308. fn: function (aString){
  5309. var self=this;
  5310. return String(self) <= aString;
  5311. return self;},
  5312. args: ["aString"],
  5313. source: unescape('%3C%3D%20aString%0A%09%3Creturn%20String%28self%29%20%3C%3D%20aString%3E'),
  5314. messageSends: [],
  5315. referencedClasses: []
  5316. }),
  5317. smalltalk.String);
  5318. smalltalk.addMethod(
  5319. unescape('_remove_'),
  5320. smalltalk.method({
  5321. selector: unescape('remove%3A'),
  5322. category: 'adding',
  5323. fn: function (anObject){
  5324. var self=this;
  5325. smalltalk.send(self, "_errorReadOnly", []);
  5326. return self;},
  5327. args: ["anObject"],
  5328. source: unescape('remove%3A%20anObject%0A%09self%20errorReadOnly'),
  5329. messageSends: ["errorReadOnly"],
  5330. referencedClasses: []
  5331. }),
  5332. smalltalk.String);
  5333. smalltalk.addMethod(
  5334. unescape('_trimLeft_'),
  5335. smalltalk.method({
  5336. selector: unescape('trimLeft%3A'),
  5337. category: 'regular expressions',
  5338. fn: function (separators){
  5339. var self=this;
  5340. return smalltalk.send(self, "_replaceRegexp_with_", [smalltalk.send((smalltalk.RegularExpression || RegularExpression), "_fromString_flag_", [smalltalk.send(smalltalk.send(unescape("%5E%5B"), "__comma", [separators]), "__comma", [unescape("%5D+")]), "g"]), ""]);
  5341. return self;},
  5342. args: ["separators"],
  5343. source: unescape('trimLeft%3A%20separators%0A%0A%20%20%20%20%09%5Eself%20replaceRegexp%3A%20%28RegularExpression%20fromString%3A%20%27%5E%5B%27%2C%20separators%2C%20%27%5D+%27%20flag%3A%20%27g%27%29%20with%3A%20%27%27'),
  5344. messageSends: ["replaceRegexp:with:", "fromString:flag:", unescape("%2C")],
  5345. referencedClasses: ["RegularExpression"]
  5346. }),
  5347. smalltalk.String);
  5348. smalltalk.addMethod(
  5349. unescape('_trimRight_'),
  5350. smalltalk.method({
  5351. selector: unescape('trimRight%3A'),
  5352. category: 'regular expressions',
  5353. fn: function (separators){
  5354. var self=this;
  5355. return smalltalk.send(self, "_replaceRegexp_with_", [smalltalk.send((smalltalk.RegularExpression || RegularExpression), "_fromString_flag_", [smalltalk.send(smalltalk.send(unescape("%5B"), "__comma", [separators]), "__comma", [unescape("%5D+%24")]), "g"]), ""]);
  5356. return self;},
  5357. args: ["separators"],
  5358. source: unescape('trimRight%3A%20separators%0A%0A%20%20%20%20%09%5Eself%20replaceRegexp%3A%20%28RegularExpression%20fromString%3A%20%27%5B%27%2C%20separators%2C%20%27%5D+%24%27%20flag%3A%20%27g%27%29%20with%3A%20%27%27'),
  5359. messageSends: ["replaceRegexp:with:", "fromString:flag:", unescape("%2C")],
  5360. referencedClasses: ["RegularExpression"]
  5361. }),
  5362. smalltalk.String);
  5363. smalltalk.addMethod(
  5364. unescape('_trimLeft'),
  5365. smalltalk.method({
  5366. selector: unescape('trimLeft'),
  5367. category: 'regular expressions',
  5368. fn: function (){
  5369. var self=this;
  5370. return smalltalk.send(self, "_trimLeft_", [unescape("%5Cs")]);
  5371. return self;},
  5372. args: [],
  5373. source: unescape('trimLeft%0A%09%5Eself%20trimLeft%3A%20%27%5Cs%27'),
  5374. messageSends: ["trimLeft:"],
  5375. referencedClasses: []
  5376. }),
  5377. smalltalk.String);
  5378. smalltalk.addMethod(
  5379. unescape('_trimRight'),
  5380. smalltalk.method({
  5381. selector: unescape('trimRight'),
  5382. category: 'regular expressions',
  5383. fn: function (){
  5384. var self=this;
  5385. return smalltalk.send(self, "_trimRight_", [unescape("%5Cs")]);
  5386. return self;},
  5387. args: [],
  5388. source: unescape('trimRight%0A%09%5Eself%20trimRight%3A%20%27%5Cs%27'),
  5389. messageSends: ["trimRight:"],
  5390. referencedClasses: []
  5391. }),
  5392. smalltalk.String);
  5393. smalltalk.addMethod(
  5394. unescape('_trimBoth'),
  5395. smalltalk.method({
  5396. selector: unescape('trimBoth'),
  5397. category: 'regular expressions',
  5398. fn: function (){
  5399. var self=this;
  5400. return smalltalk.send(self, "_trimBoth_", [unescape("%5Cs")]);
  5401. return self;},
  5402. args: [],
  5403. source: unescape('trimBoth%0A%09%5Eself%20trimBoth%3A%20%27%5Cs%27'),
  5404. messageSends: ["trimBoth:"],
  5405. referencedClasses: []
  5406. }),
  5407. smalltalk.String);
  5408. smalltalk.addMethod(
  5409. unescape('_trimBoth_'),
  5410. smalltalk.method({
  5411. selector: unescape('trimBoth%3A'),
  5412. category: 'regular expressions',
  5413. fn: function (separators){
  5414. var self=this;
  5415. return smalltalk.send(smalltalk.send(self, "_trimLeft_", [separators]), "_trimRight_", [separators]);
  5416. return self;},
  5417. args: ["separators"],
  5418. source: unescape('trimBoth%3A%20separators%0A%0A%20%20%20%20%09%5E%28self%20trimLeft%3A%20separators%29%20trimRight%3A%20separators'),
  5419. messageSends: ["trimRight:", "trimLeft:"],
  5420. referencedClasses: []
  5421. }),
  5422. smalltalk.String);
  5423. smalltalk.addMethod(
  5424. unescape('_asLowercase'),
  5425. smalltalk.method({
  5426. selector: unescape('asLowercase'),
  5427. category: 'converting',
  5428. fn: function (){
  5429. var self=this;
  5430. return self.toLowerCase();
  5431. return self;},
  5432. args: [],
  5433. source: unescape('asLowercase%0A%09%3Creturn%20self.toLowerCase%28%29%3E'),
  5434. messageSends: [],
  5435. referencedClasses: []
  5436. }),
  5437. smalltalk.String);
  5438. smalltalk.addMethod(
  5439. unescape('_asUppercase'),
  5440. smalltalk.method({
  5441. selector: unescape('asUppercase'),
  5442. category: 'converting',
  5443. fn: function (){
  5444. var self=this;
  5445. return self.toUpperCase();
  5446. return self;},
  5447. args: [],
  5448. source: unescape('asUppercase%0A%09%3Creturn%20self.toUpperCase%28%29%3E'),
  5449. messageSends: [],
  5450. referencedClasses: []
  5451. }),
  5452. smalltalk.String);
  5453. smalltalk.addMethod(
  5454. unescape('_join_'),
  5455. smalltalk.method({
  5456. selector: unescape('join%3A'),
  5457. category: 'split join',
  5458. fn: function (aCollection){
  5459. var self=this;
  5460. return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(stream){return smalltalk.send(aCollection, "_do_separatedBy_", [(function(each){return smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(each, "_asString", [])]);}), (function(){return smalltalk.send(stream, "_nextPutAll_", [self]);})]);})]);
  5461. return self;},
  5462. args: ["aCollection"],
  5463. source: unescape('join%3A%20aCollection%20%0A%09%5E%20String%0A%09%09streamContents%3A%20%5B%3Astream%20%7C%20aCollection%0A%09%09%09%09do%3A%20%5B%3Aeach%20%7C%20stream%20nextPutAll%3A%20each%20asString%5D%20%0A%09%09%09%09separatedBy%3A%20%5Bstream%20nextPutAll%3A%20self%5D%5D'),
  5464. messageSends: ["streamContents:", "do:separatedBy:", "nextPutAll:", "asString"],
  5465. referencedClasses: ["String"]
  5466. }),
  5467. smalltalk.String);
  5468. smalltalk.addMethod(
  5469. unescape('_includesSubString_'),
  5470. smalltalk.method({
  5471. selector: unescape('includesSubString%3A'),
  5472. category: 'testing',
  5473. fn: function (subString){
  5474. var self=this;
  5475. return self.indexOf(subString) != -1 ;
  5476. return self;},
  5477. args: ["subString"],
  5478. source: unescape('includesSubString%3A%20subString%0A%09%3C%20return%20self.indexOf%28subString%29%20%21%3D%20-1%20%3E'),
  5479. messageSends: [],
  5480. referencedClasses: []
  5481. }),
  5482. smalltalk.String);
  5483. smalltalk.addMethod(
  5484. unescape('_asciiValue'),
  5485. smalltalk.method({
  5486. selector: unescape('asciiValue'),
  5487. category: 'accessing',
  5488. fn: function (){
  5489. var self=this;
  5490. return self.charCodeAt(0);;
  5491. return self;},
  5492. args: [],
  5493. source: unescape('asciiValue%0A%09%3Creturn%20self.charCodeAt%280%29%3B%3E'),
  5494. messageSends: [],
  5495. referencedClasses: []
  5496. }),
  5497. smalltalk.String);
  5498. smalltalk.addMethod(
  5499. unescape('_lineIndicesDo_'),
  5500. smalltalk.method({
  5501. selector: unescape('lineIndicesDo%3A'),
  5502. category: 'split join',
  5503. fn: function (aBlock){
  5504. var self=this;
  5505. try{var cr=nil;
  5506. var lf=nil;
  5507. var start=nil;
  5508. var sz=nil;
  5509. var nextLF=nil;
  5510. var nextCR=nil;
  5511. start=(1);
  5512. sz=smalltalk.send(self, "_size", []);
  5513. cr=smalltalk.send((smalltalk.String || String), "_cr", []);
  5514. nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, (1)]);
  5515. lf=smalltalk.send((smalltalk.String || String), "_lf", []);
  5516. nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, (1)]);
  5517. (function(){while((function(){return ((($receiver = start).klass === smalltalk.Number) ? $receiver <=sz : smalltalk.send($receiver, "__lt_eq", [sz]));})()) {(function(){((($receiver = smalltalk.send(smalltalk.send(nextLF, "__eq", [(0)]), "_and_", [(function(){return smalltalk.send(nextCR, "__eq", [(0)]);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(aBlock, "_value_value_value_", [start, sz, sz]);return (function(){throw({name: 'stReturn', selector: '_lineIndicesDo_', fn: function(){return self}})})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(aBlock, "_value_value_value_", [start, sz, sz]);return (function(){throw({name: 'stReturn', selector: '_lineIndicesDo_', fn: function(){return self}})})();})]));return ((($receiver = smalltalk.send(smalltalk.send(nextCR, "__eq", [(0)]), "_or_", [(function(){return smalltalk.send((0) < nextLF, "_and_", [(function(){return ((($receiver = nextLF).klass === smalltalk.Number) ? $receiver <nextCR : smalltalk.send($receiver, "__lt", [nextCR]));})]);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextLF).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);start=(1) + nextLF;return nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]);})() : (function(){return ((($receiver = smalltalk.send((1) + nextCR, "__eq", [nextLF])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);start=(1) + nextLF;nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]);return nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]);})() : (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextCR]);start=(1) + nextCR;return nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);start=(1) + nextLF;nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]);return nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]);}), (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextCR]);start=(1) + nextCR;return nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]);})]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextLF).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);start=(1) + nextLF;return nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]);}), (function(){return ((($receiver = smalltalk.send((1) + nextCR, "__eq", [nextLF])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);start=(1) + nextLF;nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]);return nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]);})() : (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextCR]);start=(1) + nextCR;return nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);start=(1) + nextLF;nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]);return nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]);}), (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextCR]);start=(1) + nextCR;return nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]);})]));})]));})()}})();
  5518. return self;
  5519. } catch(e) {if(e.name === 'stReturn' && e.selector === '_lineIndicesDo_'){return e.fn()} throw(e)}},
  5520. args: ["aBlock"],
  5521. source: unescape('lineIndicesDo%3A%20aBlock%0A%09%22execute%20aBlock%20with%203%20arguments%20for%20each%20line%3A%0A%09-%20start%20index%20of%20line%0A%09-%20end%20index%20of%20line%20without%20line%20delimiter%0A%09-%20end%20index%20of%20line%20including%20line%20delimiter%28s%29%20CR%2C%20LF%20or%20CRLF%22%0A%09%0A%09%7C%20cr%20lf%20start%20sz%20nextLF%20nextCR%20%7C%0A%09start%20%3A%3D%201.%0A%09sz%20%3A%3D%20self%20size.%0A%09cr%20%3A%3D%20String%20cr.%0A%09nextCR%20%3A%3D%20self%20indexOf%3A%20cr%20startingAt%3A%201.%0A%09lf%20%3A%3D%20String%20lf.%0A%09nextLF%20%3A%3D%20self%20indexOf%3A%20lf%20startingAt%3A%201.%0A%09%5B%20start%20%3C%3D%20sz%20%5D%20whileTrue%3A%20%5B%0A%09%09%28nextLF%20%3D%200%20and%3A%20%5B%20nextCR%20%3D%200%20%5D%29%0A%09%09%09ifTrue%3A%20%5B%20%22No%20more%20CR%2C%20nor%20LF%2C%20the%20string%20is%20over%22%0A%09%09%09%09%09aBlock%20value%3A%20start%20value%3A%20sz%20value%3A%20sz.%0A%09%09%09%09%09%5Eself%20%5D.%0A%09%09%28nextCR%20%3D%200%20or%3A%20%5B%200%20%3C%20nextLF%20and%3A%20%5B%20nextLF%20%3C%20nextCR%20%5D%20%5D%29%0A%09%09%09ifTrue%3A%20%5B%20%22Found%20a%20LF%22%0A%09%09%09%09%09aBlock%20value%3A%20start%20value%3A%20nextLF%20-%201%20value%3A%20nextLF.%0A%09%09%09%09%09start%20%3A%3D%201%20+%20nextLF.%0A%09%09%09%09%09nextLF%20%3A%3D%20self%20indexOf%3A%20lf%20startingAt%3A%20start%20%5D%0A%09%09%09ifFalse%3A%20%5B%201%20+%20nextCR%20%3D%20nextLF%0A%09%09%09%09ifTrue%3A%20%5B%20%22Found%20a%20CR-LF%20pair%22%0A%09%09%09%09%09aBlock%20value%3A%20start%20value%3A%20nextCR%20-%201%20value%3A%20nextLF.%0A%09%09%09%09%09start%20%3A%3D%201%20+%20nextLF.%0A%09%09%09%09%09nextCR%20%3A%3D%20self%20indexOf%3A%20cr%20startingAt%3A%20start.%0A%09%09%09%09%09nextLF%20%3A%3D%20self%20indexOf%3A%20lf%20startingAt%3A%20start%20%5D%0A%09%09%09%09ifFalse%3A%20%5B%20%22Found%20a%20CR%22%0A%09%09%09%09%09aBlock%20value%3A%20start%20value%3A%20nextCR%20-%201%20value%3A%20nextCR.%0A%09%09%09%09%09start%20%3A%3D%201%20+%20nextCR.%0A%09%09%09%09%09nextCR%20%3A%3D%20self%20indexOf%3A%20cr%20startingAt%3A%20start%20%5D%5D%5D'),
  5522. messageSends: ["size", "cr", "indexOf:startingAt:", "lf", "whileTrue:", unescape("%3C%3D"), "ifTrue:", "and:", unescape("%3D"), "value:value:value:", "ifTrue:ifFalse:", "or:", unescape("%3C"), unescape("-"), unescape("+")],
  5523. referencedClasses: ["String"]
  5524. }),
  5525. smalltalk.String);
  5526. smalltalk.addMethod(
  5527. unescape('_linesDo_'),
  5528. smalltalk.method({
  5529. selector: unescape('linesDo%3A'),
  5530. category: 'split join',
  5531. fn: function (aBlock){
  5532. var self=this;
  5533. smalltalk.send(self, "_lineIndicesDo_", [(function(start, endWithoutDelimiters, end){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_copyFrom_to_", [start, endWithoutDelimiters])]);})]);
  5534. return self;},
  5535. args: ["aBlock"],
  5536. source: unescape('linesDo%3A%20aBlock%0A%09%22Execute%20aBlock%20with%20each%20line%20in%20this%20string.%20The%20terminating%20line%0A%09delimiters%20CR%2C%20LF%20or%20CRLF%20pairs%20are%20not%20included%20in%20what%20is%20passed%20to%20aBlock%22%0A%0A%09self%20lineIndicesDo%3A%20%5B%3Astart%20%3AendWithoutDelimiters%20%3Aend%20%7C%0A%09%09aBlock%20value%3A%20%28self%20copyFrom%3A%20start%20to%3A%20endWithoutDelimiters%29%5D'),
  5537. messageSends: ["lineIndicesDo:", "value:", "copyFrom:to:"],
  5538. referencedClasses: []
  5539. }),
  5540. smalltalk.String);
  5541. smalltalk.addMethod(
  5542. unescape('_lines'),
  5543. smalltalk.method({
  5544. selector: unescape('lines'),
  5545. category: 'split join',
  5546. fn: function (){
  5547. var self=this;
  5548. var lines=nil;
  5549. lines=smalltalk.send((smalltalk.Array || Array), "_new", []);
  5550. smalltalk.send(self, "_linesDo_", [(function(aLine){return smalltalk.send(lines, "_add_", [aLine]);})]);
  5551. return lines;
  5552. return self;},
  5553. args: [],
  5554. source: unescape('lines%0A%09%22Answer%20an%20array%20of%20lines%20composing%20this%20receiver%20without%20the%20line%20ending%20delimiters.%22%0A%0A%09%7C%20lines%20%7C%0A%09lines%20%3A%3D%20Array%20new.%0A%09self%20linesDo%3A%20%5B%3AaLine%20%7C%20lines%20add%3A%20aLine%5D.%0A%09%5Elines'),
  5555. messageSends: ["new", "linesDo:", "add:"],
  5556. referencedClasses: ["Array"]
  5557. }),
  5558. smalltalk.String);
  5559. smalltalk.addMethod(
  5560. unescape('_lineNumber_'),
  5561. smalltalk.method({
  5562. selector: unescape('lineNumber%3A'),
  5563. category: 'split join',
  5564. fn: function (anIndex){
  5565. var self=this;
  5566. try{var lineCount=nil;
  5567. lineCount=(0);
  5568. smalltalk.send(self, "_lineIndicesDo_", [(function(start, endWithoutDelimiters, end){return ((($receiver = smalltalk.send(lineCount=((($receiver = lineCount).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])), "__eq", [anIndex])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '_lineNumber_', fn: function(){return smalltalk.send(self, "_copyFrom_to_", [start, endWithoutDelimiters])}})})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (function(){throw({name: 'stReturn', selector: '_lineNumber_', fn: function(){return smalltalk.send(self, "_copyFrom_to_", [start, endWithoutDelimiters])}})})();})]));})]);
  5569. (function(){throw({name: 'stReturn', selector: '_lineNumber_', fn: function(){return nil}})})();
  5570. return self;
  5571. } catch(e) {if(e.name === 'stReturn' && e.selector === '_lineNumber_'){return e.fn()} throw(e)}},
  5572. args: ["anIndex"],
  5573. source: unescape('lineNumber%3A%20anIndex%0A%09%22Answer%20a%20string%20containing%20the%20characters%20in%20the%20given%20line%20number.%22%0A%0A%09%7C%20lineCount%20%7C%0A%09lineCount%20%3A%3D%200.%0A%09self%20lineIndicesDo%3A%20%5B%3Astart%20%3AendWithoutDelimiters%20%3Aend%20%7C%0A%09%09%28lineCount%20%3A%3D%20lineCount%20+%201%29%20%3D%20anIndex%20ifTrue%3A%20%5B%5Eself%20copyFrom%3A%20start%20to%3A%20endWithoutDelimiters%5D%5D.%0A%09%5Enil'),
  5574. messageSends: ["lineIndicesDo:", "ifTrue:", unescape("%3D"), unescape("+"), "copyFrom:to:"],
  5575. referencedClasses: []
  5576. }),
  5577. smalltalk.String);
  5578. smalltalk.addMethod(
  5579. unescape('_reversed'),
  5580. smalltalk.method({
  5581. selector: unescape('reversed'),
  5582. category: 'converting',
  5583. fn: function (){
  5584. var self=this;
  5585. return self.split("").reverse().join("");
  5586. return self;},
  5587. args: [],
  5588. source: unescape('reversed%0A%09%3Creturn%20self.split%28%22%22%29.reverse%28%29.join%28%22%22%29%3E'),
  5589. messageSends: [],
  5590. referencedClasses: []
  5591. }),
  5592. smalltalk.String);
  5593. smalltalk.addMethod(
  5594. unescape('__eq_eq'),
  5595. smalltalk.method({
  5596. selector: unescape('%3D%3D'),
  5597. category: 'comparing',
  5598. fn: function (aString){
  5599. var self=this;
  5600. try{((($receiver = smalltalk.send(smalltalk.send(aString, "_class", []), "__eq", [smalltalk.send(self, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq_eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq_eq', fn: function(){return false}})})();})]));
  5601. return String(self) === String(aString);
  5602. return self;
  5603. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq_eq'){return e.fn()} throw(e)}},
  5604. args: ["aString"],
  5605. source: unescape('%3D%3D%20aString%0A%09aString%20class%20%3D%20self%20class%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09%3Creturn%20String%28self%29%20%3D%3D%3D%20String%28aString%29%3E'),
  5606. messageSends: ["ifFalse:", unescape("%3D"), "class"],
  5607. referencedClasses: []
  5608. }),
  5609. smalltalk.String);
  5610. smalltalk.addMethod(
  5611. unescape('_asJavaScriptSelector'),
  5612. smalltalk.method({
  5613. selector: unescape('asJavaScriptSelector'),
  5614. category: 'converting',
  5615. fn: function (){
  5616. var self=this;
  5617. return smalltalk.send(smalltalk.send(smalltalk.send(self, "_asSelector", []), "_replace_with_", [unescape("%5E_"), ""]), "_replace_with_", [unescape("_.*"), ""]);
  5618. return self;},
  5619. args: [],
  5620. source: unescape('asJavaScriptSelector%0A%09%5E%28self%20asSelector%20replace%3A%20%27%5E_%27%20with%3A%20%27%27%29%20replace%3A%20%27_.*%27%20with%3A%20%27%27.'),
  5621. messageSends: ["replace:with:", "asSelector"],
  5622. referencedClasses: []
  5623. }),
  5624. smalltalk.String);
  5625. smalltalk.addMethod(
  5626. unescape('_streamClass'),
  5627. smalltalk.method({
  5628. selector: unescape('streamClass'),
  5629. category: 'accessing',
  5630. fn: function (){
  5631. var self=this;
  5632. return (smalltalk.StringStream || StringStream);
  5633. return self;},
  5634. args: [],
  5635. source: unescape('streamClass%0A%09%20%20%20%20%5EStringStream'),
  5636. messageSends: [],
  5637. referencedClasses: ["StringStream"]
  5638. }),
  5639. smalltalk.String.klass);
  5640. smalltalk.addMethod(
  5641. unescape('_fromString_'),
  5642. smalltalk.method({
  5643. selector: unescape('fromString%3A'),
  5644. category: 'instance creation',
  5645. fn: function (aString){
  5646. var self=this;
  5647. return new self.fn(aString);
  5648. return self;},
  5649. args: ["aString"],
  5650. source: unescape('fromString%3A%20aString%0A%09%20%20%20%20%3Creturn%20new%20self.fn%28aString%29%3E'),
  5651. messageSends: [],
  5652. referencedClasses: []
  5653. }),
  5654. smalltalk.String.klass);
  5655. smalltalk.addMethod(
  5656. unescape('_cr'),
  5657. smalltalk.method({
  5658. selector: unescape('cr'),
  5659. category: 'accessing',
  5660. fn: function (){
  5661. var self=this;
  5662. return '\r';
  5663. return self;},
  5664. args: [],
  5665. source: unescape('cr%0A%09%3Creturn%20%27%5Cr%27%3E'),
  5666. messageSends: [],
  5667. referencedClasses: []
  5668. }),
  5669. smalltalk.String.klass);
  5670. smalltalk.addMethod(
  5671. unescape('_lf'),
  5672. smalltalk.method({
  5673. selector: unescape('lf'),
  5674. category: 'accessing',
  5675. fn: function (){
  5676. var self=this;
  5677. return '\n';
  5678. return self;},
  5679. args: [],
  5680. source: unescape('lf%0A%09%3Creturn%20%27%5Cn%27%3E'),
  5681. messageSends: [],
  5682. referencedClasses: []
  5683. }),
  5684. smalltalk.String.klass);
  5685. smalltalk.addMethod(
  5686. unescape('_space'),
  5687. smalltalk.method({
  5688. selector: unescape('space'),
  5689. category: 'accessing',
  5690. fn: function (){
  5691. var self=this;
  5692. return ' ';
  5693. return self;},
  5694. args: [],
  5695. source: unescape('space%0A%09%3Creturn%20%27%20%27%3E'),
  5696. messageSends: [],
  5697. referencedClasses: []
  5698. }),
  5699. smalltalk.String.klass);
  5700. smalltalk.addMethod(
  5701. unescape('_tab'),
  5702. smalltalk.method({
  5703. selector: unescape('tab'),
  5704. category: 'accessing',
  5705. fn: function (){
  5706. var self=this;
  5707. return '\t';
  5708. return self;},
  5709. args: [],
  5710. source: unescape('tab%0A%09%3Creturn%20%27%5Ct%27%3E'),
  5711. messageSends: [],
  5712. referencedClasses: []
  5713. }),
  5714. smalltalk.String.klass);
  5715. smalltalk.addMethod(
  5716. unescape('_crlf'),
  5717. smalltalk.method({
  5718. selector: unescape('crlf'),
  5719. category: 'accessing',
  5720. fn: function (){
  5721. var self=this;
  5722. return '\r\n';
  5723. return self;},
  5724. args: [],
  5725. source: unescape('crlf%0A%09%3Creturn%20%27%5Cr%5Cn%27%3E'),
  5726. messageSends: [],
  5727. referencedClasses: []
  5728. }),
  5729. smalltalk.String.klass);
  5730. smalltalk.addMethod(
  5731. unescape('_streamContents_'),
  5732. smalltalk.method({
  5733. selector: unescape('streamContents%3A'),
  5734. category: 'instance creation',
  5735. fn: function (blockWithArg){
  5736. var self=this;
  5737. var stream=nil;
  5738. stream=smalltalk.send(smalltalk.send(self, "_streamClass", []), "_on_", [smalltalk.send((smalltalk.String || String), "_new", [])]);
  5739. smalltalk.send(blockWithArg, "_value_", [stream]);
  5740. return smalltalk.send(stream, "_contents", []);
  5741. return self;},
  5742. args: ["blockWithArg"],
  5743. source: unescape('streamContents%3A%20blockWithArg%0A%09%7Cstream%7C%0A%09stream%20%3A%3D%20%28self%20streamClass%20on%3A%20String%20new%29.%0A%09blockWithArg%20value%3A%20stream.%0A%09%5E%20stream%20contents'),
  5744. messageSends: ["on:", "streamClass", "new", "value:", "contents"],
  5745. referencedClasses: ["String"]
  5746. }),
  5747. smalltalk.String.klass);
  5748. smalltalk.addMethod(
  5749. unescape('_value_'),
  5750. smalltalk.method({
  5751. selector: unescape('value%3A'),
  5752. category: 'instance creation',
  5753. fn: function (aUTFCharCode){
  5754. var self=this;
  5755. return String.fromCharCode(aUTFCharCode);;
  5756. return self;},
  5757. args: ["aUTFCharCode"],
  5758. source: unescape('value%3A%20aUTFCharCode%0A%0A%09%3Creturn%20String.fromCharCode%28aUTFCharCode%29%3B%3E'),
  5759. messageSends: [],
  5760. referencedClasses: []
  5761. }),
  5762. smalltalk.String.klass);
  5763. smalltalk.addClass('Array', smalltalk.SequenceableCollection, [], 'Kernel');
  5764. smalltalk.addMethod(
  5765. unescape('_size'),
  5766. smalltalk.method({
  5767. selector: unescape('size'),
  5768. category: 'accessing',
  5769. fn: function (){
  5770. var self=this;
  5771. return self.length;
  5772. return self;},
  5773. args: [],
  5774. source: unescape('size%0A%09%3Creturn%20self.length%3E'),
  5775. messageSends: [],
  5776. referencedClasses: []
  5777. }),
  5778. smalltalk.Array);
  5779. smalltalk.addMethod(
  5780. unescape('_at_put_'),
  5781. smalltalk.method({
  5782. selector: unescape('at%3Aput%3A'),
  5783. category: 'accessing',
  5784. fn: function (anIndex, anObject){
  5785. var self=this;
  5786. return self[anIndex - 1] = anObject;
  5787. return self;},
  5788. args: ["anIndex", "anObject"],
  5789. source: unescape('at%3A%20anIndex%20put%3A%20anObject%0A%09%3Creturn%20self%5BanIndex%20-%201%5D%20%3D%20anObject%3E'),
  5790. messageSends: [],
  5791. referencedClasses: []
  5792. }),
  5793. smalltalk.Array);
  5794. smalltalk.addMethod(
  5795. unescape('_at_ifAbsent_'),
  5796. smalltalk.method({
  5797. selector: unescape('at%3AifAbsent%3A'),
  5798. category: 'accessing',
  5799. fn: function (anIndex, aBlock){
  5800. var self=this;
  5801. var value = self[anIndex - 1];
  5802. if(value === undefined) {
  5803. return aBlock();
  5804. } else {
  5805. return value;
  5806. }
  5807. ;
  5808. return self;},
  5809. args: ["anIndex", "aBlock"],
  5810. source: unescape('at%3A%20anIndex%20ifAbsent%3A%20aBlock%0A%09%3C%0A%09%20%20%20%20var%20value%20%3D%20self%5BanIndex%20-%201%5D%3B%0A%09%20%20%20%20if%28value%20%3D%3D%3D%20undefined%29%20%7B%0A%09%09return%20aBlock%28%29%3B%0A%09%20%20%20%20%7D%20else%20%7B%0A%09%09return%20value%3B%0A%09%20%20%20%20%7D%0A%09%3E'),
  5811. messageSends: [],
  5812. referencedClasses: []
  5813. }),
  5814. smalltalk.Array);
  5815. smalltalk.addMethod(
  5816. unescape('_add_'),
  5817. smalltalk.method({
  5818. selector: unescape('add%3A'),
  5819. category: 'adding/removing',
  5820. fn: function (anObject){
  5821. var self=this;
  5822. self.push(anObject); return anObject;;
  5823. return self;},
  5824. args: ["anObject"],
  5825. source: unescape('add%3A%20anObject%0A%09%3Cself.push%28anObject%29%3B%20return%20anObject%3B%3E'),
  5826. messageSends: [],
  5827. referencedClasses: []
  5828. }),
  5829. smalltalk.Array);
  5830. smalltalk.addMethod(
  5831. unescape('_shallowCopy'),
  5832. smalltalk.method({
  5833. selector: unescape('shallowCopy'),
  5834. category: 'copying',
  5835. fn: function (){
  5836. var self=this;
  5837. var newCollection=nil;
  5838. newCollection=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []);
  5839. smalltalk.send(self, "_do_", [(function(each){return smalltalk.send(newCollection, "_add_", [each]);})]);
  5840. return newCollection;
  5841. return self;},
  5842. args: [],
  5843. source: unescape('shallowCopy%0A%09%7C%20newCollection%20%7C%0A%09newCollection%20%3A%3D%20self%20class%20new.%0A%09self%20do%3A%20%5B%3Aeach%20%7C%20newCollection%20add%3A%20each%5D.%0A%09%5EnewCollection'),
  5844. messageSends: ["new", "class", "do:", "add:"],
  5845. referencedClasses: []
  5846. }),
  5847. smalltalk.Array);
  5848. smalltalk.addMethod(
  5849. unescape('_deepCopy'),
  5850. smalltalk.method({
  5851. selector: unescape('deepCopy'),
  5852. category: 'copying',
  5853. fn: function (){
  5854. var self=this;
  5855. var newCollection=nil;
  5856. newCollection=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []);
  5857. smalltalk.send(self, "_do_", [(function(each){return smalltalk.send(newCollection, "_add_", [smalltalk.send(each, "_deepCopy", [])]);})]);
  5858. return newCollection;
  5859. return self;},
  5860. args: [],
  5861. source: unescape('deepCopy%0A%09%7C%20newCollection%20%7C%0A%09newCollection%20%3A%3D%20self%20class%20new.%0A%09self%20do%3A%20%5B%3Aeach%20%7C%20newCollection%20add%3A%20each%20deepCopy%5D.%0A%09%5EnewCollection'),
  5862. messageSends: ["new", "class", "do:", "add:", "deepCopy"],
  5863. referencedClasses: []
  5864. }),
  5865. smalltalk.Array);
  5866. smalltalk.addMethod(
  5867. unescape('_copyFrom_to_'),
  5868. smalltalk.method({
  5869. selector: unescape('copyFrom%3Ato%3A'),
  5870. category: 'copying',
  5871. fn: function (anIndex, anotherIndex){
  5872. var self=this;
  5873. var array=nil;
  5874. array=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []);
  5875. smalltalk.send(anIndex, "_to_do_", [anotherIndex, (function(each){return smalltalk.send(array, "_add_", [smalltalk.send(self, "_at_", [each])]);})]);
  5876. return array;
  5877. return self;},
  5878. args: ["anIndex", "anotherIndex"],
  5879. source: unescape('copyFrom%3A%20anIndex%20to%3A%20anotherIndex%0A%09%7C%20array%20%7C%0A%09array%20%3A%3D%20self%20class%20new.%0A%09anIndex%20to%3A%20anotherIndex%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20array%20add%3A%20%28self%20at%3A%20each%29%5D.%0A%09%5Earray'),
  5880. messageSends: ["new", "class", "to:do:", "add:", "at:"],
  5881. referencedClasses: []
  5882. }),
  5883. smalltalk.Array);
  5884. smalltalk.addMethod(
  5885. unescape('_join_'),
  5886. smalltalk.method({
  5887. selector: unescape('join%3A'),
  5888. category: 'enumerating',
  5889. fn: function (aString){
  5890. var self=this;
  5891. return self.join(aString);
  5892. return self;},
  5893. args: ["aString"],
  5894. source: unescape('join%3A%20aString%0A%09%3Creturn%20self.join%28aString%29%3E'),
  5895. messageSends: [],
  5896. referencedClasses: []
  5897. }),
  5898. smalltalk.Array);
  5899. smalltalk.addMethod(
  5900. unescape('_asJavascript'),
  5901. smalltalk.method({
  5902. selector: unescape('asJavascript'),
  5903. category: 'converting',
  5904. fn: function (){
  5905. var self=this;
  5906. return smalltalk.send(smalltalk.send(unescape("%5B"), "__comma", [smalltalk.send(smalltalk.send(self, "_collect_", [(function(each){return smalltalk.send(each, "_asJavascript", []);})]), "_join_", [unescape("%2C%20")])]), "__comma", [unescape("%5D")]);
  5907. return self;},
  5908. args: [],
  5909. source: unescape('asJavascript%0A%09%5E%27%5B%27%2C%20%28%28self%20collect%3A%20%5B%3Aeach%20%7C%20each%20asJavascript%5D%29%20join%3A%20%27%2C%20%27%29%2C%20%20%27%5D%27'),
  5910. messageSends: [unescape("%2C"), "join:", "collect:", "asJavascript"],
  5911. referencedClasses: []
  5912. }),
  5913. smalltalk.Array);
  5914. smalltalk.addMethod(
  5915. unescape('_sort'),
  5916. smalltalk.method({
  5917. selector: unescape('sort'),
  5918. category: 'enumerating',
  5919. fn: function (){
  5920. var self=this;
  5921. return smalltalk.send(self, "_basicPerform_", ["sort"]);
  5922. return self;},
  5923. args: [],
  5924. source: unescape('sort%0A%20%20%20%20%5Eself%20basicPerform%3A%20%27sort%27'),
  5925. messageSends: ["basicPerform:"],
  5926. referencedClasses: []
  5927. }),
  5928. smalltalk.Array);
  5929. smalltalk.addMethod(
  5930. unescape('_sort_'),
  5931. smalltalk.method({
  5932. selector: unescape('sort%3A'),
  5933. category: 'enumerating',
  5934. fn: function (aBlock){
  5935. var self=this;
  5936. return self.sort(function(a, b) {
  5937. if(aBlock(a,b)) {return -1} else {return 1}
  5938. })
  5939. ;
  5940. return self;},
  5941. args: ["aBlock"],
  5942. source: unescape('sort%3A%20aBlock%0A%09%3C%0A%09%09return%20self.sort%28function%28a%2C%20b%29%20%7B%0A%09%09%09if%28aBlock%28a%2Cb%29%29%20%7Breturn%20-1%7D%20else%20%7Breturn%201%7D%0A%09%09%7D%29%0A%09%3E'),
  5943. messageSends: [],
  5944. referencedClasses: []
  5945. }),
  5946. smalltalk.Array);
  5947. smalltalk.addMethod(
  5948. unescape('_remove_'),
  5949. smalltalk.method({
  5950. selector: unescape('remove%3A'),
  5951. category: 'adding/removing',
  5952. fn: function (anObject){
  5953. var self=this;
  5954. for(var i=0;i<self.length;i++) {
  5955. if(self[i] == anObject) {
  5956. self.splice(i,1);
  5957. break;
  5958. }
  5959. }
  5960. ;
  5961. return self;},
  5962. args: ["anObject"],
  5963. source: unescape('remove%3A%20anObject%0A%09%3C%0A%09%09for%28var%20i%3D0%3Bi%3Cself.length%3Bi++%29%20%7B%0A%09%09%09if%28self%5Bi%5D%20%3D%3D%20anObject%29%20%7B%0A%09%09%09%09self.splice%28i%2C1%29%3B%0A%09%09%09%09break%3B%0A%09%09%09%7D%0A%09%09%7D%0A%09%3E'),
  5964. messageSends: [],
  5965. referencedClasses: []
  5966. }),
  5967. smalltalk.Array);
  5968. smalltalk.addMethod(
  5969. unescape('_sorted'),
  5970. smalltalk.method({
  5971. selector: unescape('sorted'),
  5972. category: 'enumerating',
  5973. fn: function (){
  5974. var self=this;
  5975. return smalltalk.send(smalltalk.send(self, "_copy", []), "_sort", []);
  5976. return self;},
  5977. args: [],
  5978. source: unescape('sorted%0A%09%5Eself%20copy%20sort'),
  5979. messageSends: ["sort", "copy"],
  5980. referencedClasses: []
  5981. }),
  5982. smalltalk.Array);
  5983. smalltalk.addMethod(
  5984. unescape('_sorted_'),
  5985. smalltalk.method({
  5986. selector: unescape('sorted%3A'),
  5987. category: 'enumerating',
  5988. fn: function (aBlock){
  5989. var self=this;
  5990. return smalltalk.send(smalltalk.send(self, "_copy", []), "_sort_", [aBlock]);
  5991. return self;},
  5992. args: ["aBlock"],
  5993. source: unescape('sorted%3A%20aBlock%0A%09%5Eself%20copy%20sort%3A%20aBlock'),
  5994. messageSends: ["sort:", "copy"],
  5995. referencedClasses: []
  5996. }),
  5997. smalltalk.Array);
  5998. smalltalk.addMethod(
  5999. unescape('_removeFrom_to_'),
  6000. smalltalk.method({
  6001. selector: unescape('removeFrom%3Ato%3A'),
  6002. category: 'adding/removing',
  6003. fn: function (aNumber, anotherNumber){
  6004. var self=this;
  6005. self.splice(aNumber - 1,anotherNumber - 1);
  6006. return self;},
  6007. args: ["aNumber", "anotherNumber"],
  6008. source: unescape('removeFrom%3A%20aNumber%20to%3A%20anotherNumber%0A%09%3Cself.splice%28aNumber%20-%201%2CanotherNumber%20-%201%29%3E'),
  6009. messageSends: [],
  6010. referencedClasses: []
  6011. }),
  6012. smalltalk.Array);
  6013. smalltalk.addMethod(
  6014. unescape('_printString'),
  6015. smalltalk.method({
  6016. selector: unescape('printString'),
  6017. category: 'enumerating',
  6018. fn: function (){
  6019. var self=this;
  6020. var str=nil;
  6021. str=smalltalk.send("", "_writeStream", []);
  6022. smalltalk.send(str, "_nextPutAll_", [smalltalk.send(smalltalk.send(self, "_printString", [], smalltalk.SequenceableCollection), "__comma", [unescape("%20%28")])]);
  6023. smalltalk.send(self, "_do_separatedBy_", [(function(each){return smalltalk.send(str, "_nextPutAll_", [smalltalk.send(each, "_printString", [])]);}), (function(){return smalltalk.send(str, "_nextPutAll_", [" "]);})]);
  6024. smalltalk.send(str, "_nextPutAll_", [unescape("%29")]);
  6025. return smalltalk.send(str, "_contents", []);
  6026. return self;},
  6027. args: [],
  6028. source: unescape('printString%0A%09%7C%20str%20%7C%0A%09str%20%3A%3D%20%27%27%20writeStream.%0A%09str%20nextPutAll%3A%20super%20printString%2C%20%27%20%28%27.%0A%09self%20%0A%09%09do%3A%20%5B%3Aeach%20%7C%20str%20nextPutAll%3A%20each%20printString%5D%0A%09%09separatedBy%3A%20%5Bstr%20nextPutAll%3A%20%27%20%27%5D.%0A%09str%20nextPutAll%3A%20%27%29%27.%0A%09%5Estr%20contents'),
  6029. messageSends: ["writeStream", "nextPutAll:", unescape("%2C"), "printString", "do:separatedBy:", "contents"],
  6030. referencedClasses: []
  6031. }),
  6032. smalltalk.Array);
  6033. smalltalk.addMethod(
  6034. unescape('_reversed'),
  6035. smalltalk.method({
  6036. selector: unescape('reversed'),
  6037. category: 'converting',
  6038. fn: function (){
  6039. var self=this;
  6040. return self._copy().reverse();
  6041. return self;},
  6042. args: [],
  6043. source: unescape('reversed%0A%09%3Creturn%20self._copy%28%29.reverse%28%29%3E'),
  6044. messageSends: [],
  6045. referencedClasses: []
  6046. }),
  6047. smalltalk.Array);
  6048. smalltalk.addMethod(
  6049. unescape('__eq'),
  6050. smalltalk.method({
  6051. selector: unescape('%3D'),
  6052. category: 'comparing',
  6053. fn: function (aCollection){
  6054. var self=this;
  6055. try{((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [smalltalk.send(aCollection, "_class", [])]), "_and_", [(function(){return smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [smalltalk.send(aCollection, "_size", [])]);})])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));
  6056. smalltalk.send(self, "_withIndexDo_", [(function(each, i){return ((($receiver = smalltalk.send(smalltalk.send(aCollection, "_at_", [i]), "__eq", [each])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));})]);
  6057. (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return true}})})();
  6058. return self;
  6059. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
  6060. args: ["aCollection"],
  6061. source: unescape('%3D%20aCollection%0A%09%28self%20class%20%3D%20aCollection%20class%20and%3A%20%5B%0A%20%20%20%20%20%20%20%20%09self%20size%20%3D%20aCollection%20size%5D%29%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09self%20withIndexDo%3A%20%5B%3Aeach%20%3Ai%20%7C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%28aCollection%20at%3A%20i%29%20%3D%20each%20ifFalse%3A%20%5B%5Efalse%5D%5D.%0A%09%5Etrue'),
  6062. messageSends: ["ifFalse:", "and:", unescape("%3D"), "class", "size", "withIndexDo:", "at:"],
  6063. referencedClasses: []
  6064. }),
  6065. smalltalk.Array);
  6066. smalltalk.addClass('RegularExpression', smalltalk.Object, [], 'Kernel');
  6067. smalltalk.addMethod(
  6068. unescape('_compile_'),
  6069. smalltalk.method({
  6070. selector: unescape('compile%3A'),
  6071. category: 'evaluating',
  6072. fn: function (aString){
  6073. var self=this;
  6074. return self.compile(aString);
  6075. return self;},
  6076. args: ["aString"],
  6077. source: unescape('compile%3A%20aString%0A%09%3Creturn%20self.compile%28aString%29%3E'),
  6078. messageSends: [],
  6079. referencedClasses: []
  6080. }),
  6081. smalltalk.RegularExpression);
  6082. smalltalk.addMethod(
  6083. unescape('_exec_'),
  6084. smalltalk.method({
  6085. selector: unescape('exec%3A'),
  6086. category: 'evaluating',
  6087. fn: function (aString){
  6088. var self=this;
  6089. return self.exec(aString) || nil;
  6090. return self;},
  6091. args: ["aString"],
  6092. source: unescape('exec%3A%20aString%0A%09%3Creturn%20self.exec%28aString%29%20%7C%7C%20nil%3E'),
  6093. messageSends: [],
  6094. referencedClasses: []
  6095. }),
  6096. smalltalk.RegularExpression);
  6097. smalltalk.addMethod(
  6098. unescape('_test_'),
  6099. smalltalk.method({
  6100. selector: unescape('test%3A'),
  6101. category: 'evaluating',
  6102. fn: function (aString){
  6103. var self=this;
  6104. return self.test(aString);
  6105. return self;},
  6106. args: ["aString"],
  6107. source: unescape('test%3A%20aString%0A%09%3Creturn%20self.test%28aString%29%3E'),
  6108. messageSends: [],
  6109. referencedClasses: []
  6110. }),
  6111. smalltalk.RegularExpression);
  6112. smalltalk.addMethod(
  6113. unescape('_fromString_flag_'),
  6114. smalltalk.method({
  6115. selector: unescape('fromString%3Aflag%3A'),
  6116. category: 'instance creation',
  6117. fn: function (aString, anotherString){
  6118. var self=this;
  6119. return new RegExp(aString, anotherString);
  6120. return self;},
  6121. args: ["aString", "anotherString"],
  6122. source: unescape('fromString%3A%20aString%20flag%3A%20anotherString%0A%09%3Creturn%20new%20RegExp%28aString%2C%20anotherString%29%3E'),
  6123. messageSends: [],
  6124. referencedClasses: []
  6125. }),
  6126. smalltalk.RegularExpression.klass);
  6127. smalltalk.addMethod(
  6128. unescape('_fromString_'),
  6129. smalltalk.method({
  6130. selector: unescape('fromString%3A'),
  6131. category: 'instance creation',
  6132. fn: function (aString){
  6133. var self=this;
  6134. return smalltalk.send(self, "_fromString_flag_", [aString, ""]);
  6135. return self;},
  6136. args: ["aString"],
  6137. source: unescape('fromString%3A%20aString%0A%09%20%20%20%20%5Eself%20fromString%3A%20aString%20flag%3A%20%27%27'),
  6138. messageSends: ["fromString:flag:"],
  6139. referencedClasses: []
  6140. }),
  6141. smalltalk.RegularExpression.klass);
  6142. smalltalk.addClass('Error', smalltalk.Object, ['messageText'], 'Kernel');
  6143. smalltalk.addMethod(
  6144. unescape('_messageText'),
  6145. smalltalk.method({
  6146. selector: unescape('messageText'),
  6147. category: 'accessing',
  6148. fn: function (){
  6149. var self=this;
  6150. return self['@messageText'];
  6151. return self;},
  6152. args: [],
  6153. source: unescape('messageText%0A%09%5EmessageText'),
  6154. messageSends: [],
  6155. referencedClasses: []
  6156. }),
  6157. smalltalk.Error);
  6158. smalltalk.addMethod(
  6159. unescape('_messageText_'),
  6160. smalltalk.method({
  6161. selector: unescape('messageText%3A'),
  6162. category: 'accessing',
  6163. fn: function (aString){
  6164. var self=this;
  6165. self['@messageText']=aString;
  6166. return self;},
  6167. args: ["aString"],
  6168. source: unescape('messageText%3A%20aString%0A%09messageText%20%3A%3D%20aString'),
  6169. messageSends: [],
  6170. referencedClasses: []
  6171. }),
  6172. smalltalk.Error);
  6173. smalltalk.addMethod(
  6174. unescape('_signal'),
  6175. smalltalk.method({
  6176. selector: unescape('signal'),
  6177. category: 'signaling',
  6178. fn: function (){
  6179. var self=this;
  6180. self.context = smalltalk.getThisContext(); self.smalltalkError = true; throw(self);
  6181. return self;},
  6182. args: [],
  6183. source: unescape('signal%0A%09%3Cself.context%20%3D%20smalltalk.getThisContext%28%29%3B%20self.smalltalkError%20%3D%20true%3B%20throw%28self%29%3E'),
  6184. messageSends: [],
  6185. referencedClasses: []
  6186. }),
  6187. smalltalk.Error);
  6188. smalltalk.addMethod(
  6189. unescape('_context'),
  6190. smalltalk.method({
  6191. selector: unescape('context'),
  6192. category: 'accessing',
  6193. fn: function (){
  6194. var self=this;
  6195. return self.context;
  6196. return self;},
  6197. args: [],
  6198. source: unescape('context%0A%09%3Creturn%20self.context%3E'),
  6199. messageSends: [],
  6200. referencedClasses: []
  6201. }),
  6202. smalltalk.Error);
  6203. smalltalk.addMethod(
  6204. unescape('_jsStack'),
  6205. smalltalk.method({
  6206. selector: unescape('jsStack'),
  6207. category: 'accessing',
  6208. fn: function (){
  6209. var self=this;
  6210. return self.stack;
  6211. return self;},
  6212. args: [],
  6213. source: unescape('jsStack%0A%09%3Creturn%20self.stack%3E'),
  6214. messageSends: [],
  6215. referencedClasses: []
  6216. }),
  6217. smalltalk.Error);
  6218. smalltalk.addMethod(
  6219. unescape('_isSmalltalkError'),
  6220. smalltalk.method({
  6221. selector: unescape('isSmalltalkError'),
  6222. category: 'testing',
  6223. fn: function (){
  6224. var self=this;
  6225. return self.smalltalkError === true;
  6226. return self;},
  6227. args: [],
  6228. source: unescape('isSmalltalkError%0A%09%3Creturn%20self.smalltalkError%20%3D%3D%3D%20true%3E'),
  6229. messageSends: [],
  6230. referencedClasses: []
  6231. }),
  6232. smalltalk.Error);
  6233. smalltalk.addMethod(
  6234. unescape('_signal_'),
  6235. smalltalk.method({
  6236. selector: unescape('signal%3A'),
  6237. category: 'instance creation',
  6238. fn: function (aString){
  6239. var self=this;
  6240. return (function($rec){smalltalk.send($rec, "_messageText_", [aString]);return smalltalk.send($rec, "_signal", []);})(smalltalk.send(self, "_new", []));
  6241. return self;},
  6242. args: ["aString"],
  6243. source: unescape('signal%3A%20aString%0A%09%20%20%20%20%5Eself%20new%0A%09%09messageText%3A%20aString%3B%0A%09%09signal'),
  6244. messageSends: ["messageText:", "signal", "new"],
  6245. referencedClasses: []
  6246. }),
  6247. smalltalk.Error.klass);
  6248. smalltalk.addClass('MethodContext', smalltalk.Object, [], 'Kernel');
  6249. smalltalk.addMethod(
  6250. unescape('_receiver'),
  6251. smalltalk.method({
  6252. selector: unescape('receiver'),
  6253. category: 'accessing',
  6254. fn: function (){
  6255. var self=this;
  6256. return self.receiver;
  6257. return self;},
  6258. args: [],
  6259. source: unescape('receiver%0A%09%3Creturn%20self.receiver%3E'),
  6260. messageSends: [],
  6261. referencedClasses: []
  6262. }),
  6263. smalltalk.MethodContext);
  6264. smalltalk.addMethod(
  6265. unescape('_selector'),
  6266. smalltalk.method({
  6267. selector: unescape('selector'),
  6268. category: 'accessing',
  6269. fn: function (){
  6270. var self=this;
  6271. return smalltalk.convertSelector(self.selector);
  6272. return self;},
  6273. args: [],
  6274. source: unescape('selector%0A%09%3Creturn%20smalltalk.convertSelector%28self.selector%29%3E'),
  6275. messageSends: [],
  6276. referencedClasses: []
  6277. }),
  6278. smalltalk.MethodContext);
  6279. smalltalk.addMethod(
  6280. unescape('_home'),
  6281. smalltalk.method({
  6282. selector: unescape('home'),
  6283. category: 'accessing',
  6284. fn: function (){
  6285. var self=this;
  6286. return self.homeContext;
  6287. return self;},
  6288. args: [],
  6289. source: unescape('home%0A%09%3Creturn%20self.homeContext%3E'),
  6290. messageSends: [],
  6291. referencedClasses: []
  6292. }),
  6293. smalltalk.MethodContext);
  6294. smalltalk.addMethod(
  6295. unescape('_temps'),
  6296. smalltalk.method({
  6297. selector: unescape('temps'),
  6298. category: 'accessing',
  6299. fn: function (){
  6300. var self=this;
  6301. return self.temps;
  6302. return self;},
  6303. args: [],
  6304. source: unescape('temps%0A%09%3Creturn%20self.temps%3E'),
  6305. messageSends: [],
  6306. referencedClasses: []
  6307. }),
  6308. smalltalk.MethodContext);
  6309. smalltalk.addMethod(
  6310. unescape('_printString'),
  6311. smalltalk.method({
  6312. selector: unescape('printString'),
  6313. category: 'accessing',
  6314. fn: function (){
  6315. var self=this;
  6316. return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_printString", [], smalltalk.Object), "__comma", [unescape("%28")]), "__comma", [smalltalk.send(self, "_asString", [])]), "__comma", [unescape("%29")]);
  6317. return self;},
  6318. args: [],
  6319. source: unescape('printString%0A%09%5Esuper%20printString%2C%20%27%28%27%2C%20self%20asString%2C%20%27%29%27'),
  6320. messageSends: [unescape("%2C"), "printString", "asString"],
  6321. referencedClasses: []
  6322. }),
  6323. smalltalk.MethodContext);
  6324. smalltalk.addMethod(
  6325. unescape('_asString'),
  6326. smalltalk.method({
  6327. selector: unescape('asString'),
  6328. category: 'accessing',
  6329. fn: function (){
  6330. var self=this;
  6331. return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_receiver", []), "_class", []), "_printString", []), "__comma", [unescape("%20%3E%3E%20")]), "__comma", [smalltalk.send(self, "_selector", [])]);
  6332. return self;},
  6333. args: [],
  6334. source: unescape('asString%0A%09%5Eself%20receiver%20class%20printString%2C%20%27%20%3E%3E%20%27%2C%20self%20selector'),
  6335. messageSends: [unescape("%2C"), "printString", "class", "receiver", "selector"],
  6336. referencedClasses: []
  6337. }),
  6338. smalltalk.MethodContext);
  6339. smalltalk.addClass('Association', smalltalk.Object, ['key', 'value'], 'Kernel');
  6340. smalltalk.addMethod(
  6341. unescape('__eq'),
  6342. smalltalk.method({
  6343. selector: unescape('%3D'),
  6344. category: 'comparing',
  6345. fn: function (anAssociation){
  6346. var self=this;
  6347. return smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [smalltalk.send(anAssociation, "_class", [])]), "_and_", [(function(){return smalltalk.send(smalltalk.send(smalltalk.send(self, "_key", []), "__eq", [smalltalk.send(anAssociation, "_key", [])]), "_and_", [(function(){return smalltalk.send(smalltalk.send(self, "_value", []), "__eq", [smalltalk.send(anAssociation, "_value", [])]);})]);})]);
  6348. return self;},
  6349. args: ["anAssociation"],
  6350. source: unescape('%3D%20anAssociation%0A%09%5Eself%20class%20%3D%20anAssociation%20class%20and%3A%20%5B%0A%09%20%20%20%20self%20key%20%3D%20anAssociation%20key%20and%3A%20%5B%0A%09%09self%20value%20%3D%20anAssociation%20value%5D%5D'),
  6351. messageSends: ["and:", unescape("%3D"), "class", "key", "value"],
  6352. referencedClasses: []
  6353. }),
  6354. smalltalk.Association);
  6355. smalltalk.addMethod(
  6356. unescape('_key_'),
  6357. smalltalk.method({
  6358. selector: unescape('key%3A'),
  6359. category: 'accessing',
  6360. fn: function (aKey){
  6361. var self=this;
  6362. self['@key']=aKey;
  6363. return self;},
  6364. args: ["aKey"],
  6365. source: unescape('key%3A%20aKey%0A%09key%20%3A%3D%20aKey'),
  6366. messageSends: [],
  6367. referencedClasses: []
  6368. }),
  6369. smalltalk.Association);
  6370. smalltalk.addMethod(
  6371. unescape('_key'),
  6372. smalltalk.method({
  6373. selector: unescape('key'),
  6374. category: 'accessing',
  6375. fn: function (){
  6376. var self=this;
  6377. return self['@key'];
  6378. return self;},
  6379. args: [],
  6380. source: unescape('key%0A%09%5Ekey'),
  6381. messageSends: [],
  6382. referencedClasses: []
  6383. }),
  6384. smalltalk.Association);
  6385. smalltalk.addMethod(
  6386. unescape('_value_'),
  6387. smalltalk.method({
  6388. selector: unescape('value%3A'),
  6389. category: 'accessing',
  6390. fn: function (aValue){
  6391. var self=this;
  6392. self['@value']=aValue;
  6393. return self;},
  6394. args: ["aValue"],
  6395. source: unescape('value%3A%20aValue%0A%09value%20%3A%3D%20aValue'),
  6396. messageSends: [],
  6397. referencedClasses: []
  6398. }),
  6399. smalltalk.Association);
  6400. smalltalk.addMethod(
  6401. unescape('_value'),
  6402. smalltalk.method({
  6403. selector: unescape('value'),
  6404. category: 'accessing',
  6405. fn: function (){
  6406. var self=this;
  6407. return self['@value'];
  6408. return self;},
  6409. args: [],
  6410. source: unescape('value%0A%09%5Evalue'),
  6411. messageSends: [],
  6412. referencedClasses: []
  6413. }),
  6414. smalltalk.Association);
  6415. smalltalk.addMethod(
  6416. unescape('_storeOn_'),
  6417. smalltalk.method({
  6418. selector: unescape('storeOn%3A'),
  6419. category: 'comparing',
  6420. fn: function (aStream){
  6421. var self=this;
  6422. smalltalk.send(self['@key'], "_storeOn_", [aStream]);
  6423. smalltalk.send(aStream, "_nextPutAll_", [unescape("-%3E")]);
  6424. smalltalk.send(self['@value'], "_storeOn_", [aStream]);
  6425. return self;},
  6426. args: ["aStream"],
  6427. source: unescape('storeOn%3A%20aStream%0A%09%22Store%20in%20the%20format%20%28key-%3Evalue%29%22%0A%0A%09%22aStream%20nextPutAll%3A%20%27%28%27.%22%0A%09key%20storeOn%3A%20aStream.%0A%09aStream%20nextPutAll%3A%20%27-%3E%27.%0A%09value%20storeOn%3A%20aStream.%0A%09%22aStream%20nextPutAll%3A%20%27%29%27%22'),
  6428. messageSends: ["storeOn:", "nextPutAll:"],
  6429. referencedClasses: []
  6430. }),
  6431. smalltalk.Association);
  6432. smalltalk.addMethod(
  6433. unescape('_key_value_'),
  6434. smalltalk.method({
  6435. selector: unescape('key%3Avalue%3A'),
  6436. category: 'instance creation',
  6437. fn: function (aKey, aValue){
  6438. var self=this;
  6439. return (function($rec){smalltalk.send($rec, "_key_", [aKey]);smalltalk.send($rec, "_value_", [aValue]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  6440. return self;},
  6441. args: ["aKey", "aValue"],
  6442. source: unescape('key%3A%20aKey%20value%3A%20aValue%0A%09%20%20%20%20%5Eself%20new%0A%09%09key%3A%20aKey%3B%0A%09%09value%3A%20aValue%3B%0A%09%09yourself'),
  6443. messageSends: ["key:", "value:", "yourself", "new"],
  6444. referencedClasses: []
  6445. }),
  6446. smalltalk.Association.klass);
  6447. smalltalk.addClass('Dictionary', smalltalk.Collection, [], 'Kernel');
  6448. smalltalk.addMethod(
  6449. unescape('__eq'),
  6450. smalltalk.method({
  6451. selector: unescape('%3D'),
  6452. category: 'comparing',
  6453. fn: function (aDictionary){
  6454. var self=this;
  6455. try{((($receiver = smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [smalltalk.send(aDictionary, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));
  6456. ((($receiver = smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [smalltalk.send(aDictionary, "_size", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));
  6457. (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return smalltalk.send(smalltalk.send(self, "_associations", []), "__eq", [smalltalk.send(aDictionary, "_associations", [])])}})})();
  6458. return self;
  6459. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
  6460. args: ["aDictionary"],
  6461. source: unescape('%3D%20aDictionary%0A%09self%20class%20%3D%20aDictionary%20class%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09self%20size%20%3D%20aDictionary%20size%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09%5Eself%20associations%20%3D%20aDictionary%20associations'),
  6462. messageSends: ["ifFalse:", unescape("%3D"), "class", "size", "associations"],
  6463. referencedClasses: []
  6464. }),
  6465. smalltalk.Dictionary);
  6466. smalltalk.addMethod(
  6467. unescape('_shallowCopy'),
  6468. smalltalk.method({
  6469. selector: unescape('shallowCopy'),
  6470. category: 'copying',
  6471. fn: function (){
  6472. var self=this;
  6473. var copy=nil;
  6474. copy=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []);
  6475. smalltalk.send(self, "_associationsDo_", [(function(each){return smalltalk.send(copy, "_at_put_", [smalltalk.send(each, "_key", []), smalltalk.send(each, "_value", [])]);})]);
  6476. return copy;
  6477. return self;},
  6478. args: [],
  6479. source: unescape('shallowCopy%0A%09%7C%20copy%20%7C%0A%09copy%20%3A%3D%20self%20class%20new.%0A%09self%20associationsDo%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20copy%20at%3A%20each%20key%20%20put%3A%20each%20value%5D.%0A%09%5Ecopy'),
  6480. messageSends: ["new", "class", "associationsDo:", "at:put:", "key", "value"],
  6481. referencedClasses: []
  6482. }),
  6483. smalltalk.Dictionary);
  6484. smalltalk.addMethod(
  6485. unescape('_size'),
  6486. smalltalk.method({
  6487. selector: unescape('size'),
  6488. category: 'accessing',
  6489. fn: function (){
  6490. var self=this;
  6491. return smalltalk.send(smalltalk.send(self, "_keys", []), "_size", []);
  6492. return self;},
  6493. args: [],
  6494. source: unescape('size%0A%09%5Eself%20keys%20size'),
  6495. messageSends: ["size", "keys"],
  6496. referencedClasses: []
  6497. }),
  6498. smalltalk.Dictionary);
  6499. smalltalk.addMethod(
  6500. unescape('_associations'),
  6501. smalltalk.method({
  6502. selector: unescape('associations'),
  6503. category: 'accessing',
  6504. fn: function (){
  6505. var self=this;
  6506. var associations=nil;
  6507. associations=[];
  6508. smalltalk.send(smalltalk.send(self, "_keys", []), "_do_", [(function(each){return smalltalk.send(associations, "_add_", [smalltalk.send((smalltalk.Association || Association), "_key_value_", [each, smalltalk.send(self, "_at_", [each])])]);})]);
  6509. return associations;
  6510. return self;},
  6511. args: [],
  6512. source: unescape('associations%0A%09%7C%20associations%20%7C%0A%09associations%20%3A%3D%20%23%28%29.%0A%09self%20keys%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20associations%20add%3A%20%28Association%20key%3A%20each%20value%3A%20%28self%20at%3A%20each%29%29%5D.%0A%09%5Eassociations'),
  6513. messageSends: ["do:", "keys", "add:", "key:value:", "at:"],
  6514. referencedClasses: ["Association"]
  6515. }),
  6516. smalltalk.Dictionary);
  6517. smalltalk.addMethod(
  6518. unescape('_keys'),
  6519. smalltalk.method({
  6520. selector: unescape('keys'),
  6521. category: 'accessing',
  6522. fn: function (){
  6523. var self=this;
  6524. var keys = [];
  6525. for(var i in self) {
  6526. if(self.hasOwnProperty(i)) {
  6527. keys.push(i);
  6528. }
  6529. };
  6530. return keys;
  6531. ;
  6532. return self;},
  6533. args: [],
  6534. source: unescape('keys%0A%09%3C%0A%09%09var%20keys%20%3D%20%5B%5D%3B%0A%09%09for%28var%20i%20in%20self%29%20%7B%0A%09%09%09if%28self.hasOwnProperty%28i%29%29%20%7B%0A%09%09%09%09keys.push%28i%29%3B%0A%09%09%09%7D%0A%09%09%7D%3B%0A%09%09return%20keys%3B%0A%09%3E'),
  6535. messageSends: [],
  6536. referencedClasses: []
  6537. }),
  6538. smalltalk.Dictionary);
  6539. smalltalk.addMethod(
  6540. unescape('_values'),
  6541. smalltalk.method({
  6542. selector: unescape('values'),
  6543. category: 'accessing',
  6544. fn: function (){
  6545. var self=this;
  6546. return smalltalk.send(smalltalk.send(self, "_keys", []), "_collect_", [(function(each){return smalltalk.send(self, "_at_", [each]);})]);
  6547. return self;},
  6548. args: [],
  6549. source: unescape('values%0A%20%20%20%20%09%5Eself%20keys%20collect%3A%20%5B%3Aeach%20%7C%20self%20at%3A%20each%5D'),
  6550. messageSends: ["collect:", "keys", "at:"],
  6551. referencedClasses: []
  6552. }),
  6553. smalltalk.Dictionary);
  6554. smalltalk.addMethod(
  6555. unescape('_at_put_'),
  6556. smalltalk.method({
  6557. selector: unescape('at%3Aput%3A'),
  6558. category: 'accessing',
  6559. fn: function (aKey, aValue){
  6560. var self=this;
  6561. return smalltalk.send(self, "_basicAt_put_", [aKey, aValue]);
  6562. return self;},
  6563. args: ["aKey", "aValue"],
  6564. source: unescape('at%3A%20aKey%20put%3A%20aValue%0A%09%5Eself%20basicAt%3A%20aKey%20put%3A%20aValue'),
  6565. messageSends: ["basicAt:put:"],
  6566. referencedClasses: []
  6567. }),
  6568. smalltalk.Dictionary);
  6569. smalltalk.addMethod(
  6570. unescape('_at_ifAbsent_'),
  6571. smalltalk.method({
  6572. selector: unescape('at%3AifAbsent%3A'),
  6573. category: 'accessing',
  6574. fn: function (aKey, aBlock){
  6575. var self=this;
  6576. return smalltalk.send(smalltalk.send(self, "_includesKey_", [aKey]), "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_basicAt_", [aKey]);}), aBlock]);
  6577. return self;},
  6578. args: ["aKey", "aBlock"],
  6579. source: unescape('at%3A%20aKey%20ifAbsent%3A%20aBlock%0A%09%5E%28self%20includesKey%3A%20aKey%29%0A%09%09ifTrue%3A%20%5Bself%20basicAt%3A%20aKey%5D%0A%09%09ifFalse%3A%20aBlock'),
  6580. messageSends: ["ifTrue:ifFalse:", "includesKey:", "basicAt:"],
  6581. referencedClasses: []
  6582. }),
  6583. smalltalk.Dictionary);
  6584. smalltalk.addMethod(
  6585. unescape('_at_ifAbsentPut_'),
  6586. smalltalk.method({
  6587. selector: unescape('at%3AifAbsentPut%3A'),
  6588. category: 'accessing',
  6589. fn: function (aKey, aBlock){
  6590. var self=this;
  6591. return smalltalk.send(self, "_at_ifAbsent_", [aKey, (function(){return smalltalk.send(self, "_at_put_", [aKey, smalltalk.send(aBlock, "_value", [])]);})]);
  6592. return self;},
  6593. args: ["aKey", "aBlock"],
  6594. source: unescape('at%3A%20aKey%20ifAbsentPut%3A%20aBlock%0A%20%20%20%20%09%5Eself%20at%3A%20aKey%20ifAbsent%3A%20%5B%0A%20%20%20%20%09%20%20%20%20self%20at%3A%20aKey%20put%3A%20aBlock%20value%5D'),
  6595. messageSends: ["at:ifAbsent:", "at:put:", "value"],
  6596. referencedClasses: []
  6597. }),
  6598. smalltalk.Dictionary);
  6599. smalltalk.addMethod(
  6600. unescape('_at_ifPresent_'),
  6601. smalltalk.method({
  6602. selector: unescape('at%3AifPresent%3A'),
  6603. category: 'accessing',
  6604. fn: function (aKey, aBlock){
  6605. var self=this;
  6606. return (($receiver = smalltalk.send(self, "_basicAt_", [aKey])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_at_", [aKey])]);})() : nil;
  6607. return self;},
  6608. args: ["aKey", "aBlock"],
  6609. source: unescape('at%3A%20aKey%20ifPresent%3A%20aBlock%0A%09%5E%28self%20basicAt%3A%20aKey%29%20ifNotNil%3A%20%5BaBlock%20value%3A%20%28self%20at%3A%20aKey%29%5D'),
  6610. messageSends: ["ifNotNil:", "basicAt:", "value:", "at:"],
  6611. referencedClasses: []
  6612. }),
  6613. smalltalk.Dictionary);
  6614. smalltalk.addMethod(
  6615. unescape('_at_ifPresent_ifAbsent_'),
  6616. smalltalk.method({
  6617. selector: unescape('at%3AifPresent%3AifAbsent%3A'),
  6618. category: 'accessing',
  6619. fn: function (aKey, aBlock, anotherBlock){
  6620. var self=this;
  6621. return smalltalk.send(smalltalk.send(self, "_basicAt_", [aKey]), "_ifNil_ifNotNil_", [anotherBlock, (function(){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_at_", [aKey])]);})]);
  6622. return self;},
  6623. args: ["aKey", "aBlock", "anotherBlock"],
  6624. source: unescape('at%3A%20aKey%20ifPresent%3A%20aBlock%20ifAbsent%3A%20anotherBlock%0A%09%5E%28self%20basicAt%3A%20aKey%29%0A%09%20%20%20%20ifNil%3A%20anotherBlock%0A%09%20%20%20%20ifNotNil%3A%20%5BaBlock%20value%3A%20%28self%20at%3A%20aKey%29%5D'),
  6625. messageSends: ["ifNil:ifNotNil:", "basicAt:", "value:", "at:"],
  6626. referencedClasses: []
  6627. }),
  6628. smalltalk.Dictionary);
  6629. smalltalk.addMethod(
  6630. unescape('_add_'),
  6631. smalltalk.method({
  6632. selector: unescape('add%3A'),
  6633. category: 'adding/removing',
  6634. fn: function (anAssociation){
  6635. var self=this;
  6636. smalltalk.send(self, "_at_put_", [smalltalk.send(anAssociation, "_key", []), smalltalk.send(anAssociation, "_value", [])]);
  6637. return self;},
  6638. args: ["anAssociation"],
  6639. source: unescape('add%3A%20anAssociation%0A%20%20%20%20%09self%20at%3A%20anAssociation%20key%20put%3A%20anAssociation%20value'),
  6640. messageSends: ["at:put:", "key", "value"],
  6641. referencedClasses: []
  6642. }),
  6643. smalltalk.Dictionary);
  6644. smalltalk.addMethod(
  6645. unescape('_addAll_'),
  6646. smalltalk.method({
  6647. selector: unescape('addAll%3A'),
  6648. category: 'adding/removing',
  6649. fn: function (aDictionary){
  6650. var self=this;
  6651. smalltalk.send(self, "_addAll_", [smalltalk.send(aDictionary, "_associations", [])], smalltalk.Collection);
  6652. return aDictionary;
  6653. return self;},
  6654. args: ["aDictionary"],
  6655. source: unescape('addAll%3A%20aDictionary%0A%20%20%20%20%09super%20addAll%3A%20aDictionary%20associations.%0A%20%20%20%20%09%5EaDictionary'),
  6656. messageSends: ["addAll:", "associations"],
  6657. referencedClasses: []
  6658. }),
  6659. smalltalk.Dictionary);
  6660. smalltalk.addMethod(
  6661. unescape('__comma'),
  6662. smalltalk.method({
  6663. selector: unescape('%2C'),
  6664. category: 'copying',
  6665. fn: function (aCollection){
  6666. var self=this;
  6667. smalltalk.send(self, "_shouldNotImplement", []);
  6668. return self;},
  6669. args: ["aCollection"],
  6670. source: unescape('%2C%20aCollection%0A%09self%20shouldNotImplement'),
  6671. messageSends: ["shouldNotImplement"],
  6672. referencedClasses: []
  6673. }),
  6674. smalltalk.Dictionary);
  6675. smalltalk.addMethod(
  6676. unescape('_copyFrom_to_'),
  6677. smalltalk.method({
  6678. selector: unescape('copyFrom%3Ato%3A'),
  6679. category: 'copying',
  6680. fn: function (anIndex, anotherIndex){
  6681. var self=this;
  6682. smalltalk.send(self, "_shouldNotImplement", []);
  6683. return self;},
  6684. args: ["anIndex", "anotherIndex"],
  6685. source: unescape('copyFrom%3A%20anIndex%20to%3A%20anotherIndex%0A%09self%20shouldNotImplement'),
  6686. messageSends: ["shouldNotImplement"],
  6687. referencedClasses: []
  6688. }),
  6689. smalltalk.Dictionary);
  6690. smalltalk.addMethod(
  6691. unescape('_associationsDo_'),
  6692. smalltalk.method({
  6693. selector: unescape('associationsDo%3A'),
  6694. category: 'enumerating',
  6695. fn: function (aBlock){
  6696. var self=this;
  6697. smalltalk.send(smalltalk.send(self, "_associations", []), "_do_", [aBlock]);
  6698. return self;},
  6699. args: ["aBlock"],
  6700. source: unescape('associationsDo%3A%20aBlock%0A%20%20%20%20%09self%20associations%20do%3A%20aBlock'),
  6701. messageSends: ["do:", "associations"],
  6702. referencedClasses: []
  6703. }),
  6704. smalltalk.Dictionary);
  6705. smalltalk.addMethod(
  6706. unescape('_keysAndValuesDo_'),
  6707. smalltalk.method({
  6708. selector: unescape('keysAndValuesDo%3A'),
  6709. category: 'enumerating',
  6710. fn: function (aBlock){
  6711. var self=this;
  6712. smalltalk.send(self, "_associationsDo_", [(function(each){return smalltalk.send(aBlock, "_value_value_", [smalltalk.send(each, "_key", []), smalltalk.send(each, "_value", [])]);})]);
  6713. return self;},
  6714. args: ["aBlock"],
  6715. source: unescape('keysAndValuesDo%3A%20aBlock%0A%20%20%20%20%09self%20associationsDo%3A%20%5B%3Aeach%20%7C%0A%20%20%20%20%09%20%20%20%20aBlock%20value%3A%20each%20key%20value%3A%20each%20value%5D'),
  6716. messageSends: ["associationsDo:", "value:value:", "key", "value"],
  6717. referencedClasses: []
  6718. }),
  6719. smalltalk.Dictionary);
  6720. smalltalk.addMethod(
  6721. unescape('_do_'),
  6722. smalltalk.method({
  6723. selector: unescape('do%3A'),
  6724. category: 'enumerating',
  6725. fn: function (aBlock){
  6726. var self=this;
  6727. smalltalk.send(smalltalk.send(self, "_values", []), "_do_", [aBlock]);
  6728. return self;},
  6729. args: ["aBlock"],
  6730. source: unescape('do%3A%20aBlock%0A%20%20%20%20%09self%20values%20do%3A%20aBlock'),
  6731. messageSends: ["do:", "values"],
  6732. referencedClasses: []
  6733. }),
  6734. smalltalk.Dictionary);
  6735. smalltalk.addMethod(
  6736. unescape('_select_'),
  6737. smalltalk.method({
  6738. selector: unescape('select%3A'),
  6739. category: 'enumerating',
  6740. fn: function (aBlock){
  6741. var self=this;
  6742. var newDict=nil;
  6743. newDict=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []);
  6744. smalltalk.send(self, "_keysAndValuesDo_", [(function(key, value){return ((($receiver = smalltalk.send(aBlock, "_value_", [value])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(newDict, "_at_put_", [key, value]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(newDict, "_at_put_", [key, value]);})]));})]);
  6745. return newDict;
  6746. return self;},
  6747. args: ["aBlock"],
  6748. source: unescape('select%3A%20aBlock%0A%20%20%20%20%09%7C%20newDict%20%7C%0A%20%20%20%20%09newDict%20%3A%3D%20self%20class%20new.%0A%20%20%20%20%09self%20keysAndValuesDo%3A%20%5B%3Akey%20%3Avalue%20%7C%0A%20%20%20%20%09%20%20%20%20%28aBlock%20value%3A%20value%29%20ifTrue%3A%20%5BnewDict%20at%3A%20key%20put%3A%20value%5D%5D.%0A%20%20%20%20%09%5EnewDict'),
  6749. messageSends: ["new", "class", "keysAndValuesDo:", "ifTrue:", "value:", "at:put:"],
  6750. referencedClasses: []
  6751. }),
  6752. smalltalk.Dictionary);
  6753. smalltalk.addMethod(
  6754. unescape('_collect_'),
  6755. smalltalk.method({
  6756. selector: unescape('collect%3A'),
  6757. category: 'enumerating',
  6758. fn: function (aBlock){
  6759. var self=this;
  6760. var newDict=nil;
  6761. newDict=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []);
  6762. smalltalk.send(self, "_keysAndValuesDo_", [(function(key, value){return smalltalk.send(newDict, "_at_put_", [key, smalltalk.send(aBlock, "_value_", [value])]);})]);
  6763. return newDict;
  6764. return self;},
  6765. args: ["aBlock"],
  6766. source: unescape('collect%3A%20aBlock%0A%20%20%20%20%09%7C%20newDict%20%7C%0A%20%20%20%20%09newDict%20%3A%3D%20self%20class%20new.%0A%20%20%20%20%09self%20keysAndValuesDo%3A%20%5B%3Akey%20%3Avalue%20%7C%0A%20%20%20%20%09%20%20%20%20newDict%20at%3A%20key%20put%3A%20%28aBlock%20value%3A%20value%29%5D.%0A%20%20%20%20%09%5EnewDict'),
  6767. messageSends: ["new", "class", "keysAndValuesDo:", "at:put:", "value:"],
  6768. referencedClasses: []
  6769. }),
  6770. smalltalk.Dictionary);
  6771. smalltalk.addMethod(
  6772. unescape('_detect_ifNone_'),
  6773. smalltalk.method({
  6774. selector: unescape('detect%3AifNone%3A'),
  6775. category: 'enumerating',
  6776. fn: function (aBlock, anotherBlock){
  6777. var self=this;
  6778. return smalltalk.send(smalltalk.send(self, "_values", []), "_detect_ifNone_", [aBlock, anotherBlock]);
  6779. return self;},
  6780. args: ["aBlock", "anotherBlock"],
  6781. source: unescape('detect%3A%20aBlock%20ifNone%3A%20anotherBlock%0A%09%5Eself%20values%20detect%3A%20aBlock%20ifNone%3A%20anotherBlock'),
  6782. messageSends: ["detect:ifNone:", "values"],
  6783. referencedClasses: []
  6784. }),
  6785. smalltalk.Dictionary);
  6786. smalltalk.addMethod(
  6787. unescape('_includes_'),
  6788. smalltalk.method({
  6789. selector: unescape('includes%3A'),
  6790. category: 'enumerating',
  6791. fn: function (anObject){
  6792. var self=this;
  6793. return smalltalk.send(smalltalk.send(self, "_values", []), "_includes_", [anObject]);
  6794. return self;},
  6795. args: ["anObject"],
  6796. source: unescape('includes%3A%20anObject%0A%09%5Eself%20values%20includes%3A%20anObject'),
  6797. messageSends: ["includes:", "values"],
  6798. referencedClasses: []
  6799. }),
  6800. smalltalk.Dictionary);
  6801. smalltalk.addMethod(
  6802. unescape('_removeKey_'),
  6803. smalltalk.method({
  6804. selector: unescape('removeKey%3A'),
  6805. category: 'adding/removing',
  6806. fn: function (aKey){
  6807. var self=this;
  6808. smalltalk.send(self, "_remove_", [aKey]);
  6809. return self;},
  6810. args: ["aKey"],
  6811. source: unescape('removeKey%3A%20aKey%0A%20%20%20%20self%20remove%3A%20aKey'),
  6812. messageSends: ["remove:"],
  6813. referencedClasses: []
  6814. }),
  6815. smalltalk.Dictionary);
  6816. smalltalk.addMethod(
  6817. unescape('_at_'),
  6818. smalltalk.method({
  6819. selector: unescape('at%3A'),
  6820. category: 'accessing',
  6821. fn: function (aKey){
  6822. var self=this;
  6823. return smalltalk.send(self, "_at_ifAbsent_", [aKey, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
  6824. return self;},
  6825. args: ["aKey"],
  6826. source: unescape('at%3A%20aKey%0A%09%5Eself%20at%3A%20aKey%20ifAbsent%3A%20%5Bself%20errorNotFound%5D'),
  6827. messageSends: ["at:ifAbsent:", "errorNotFound"],
  6828. referencedClasses: []
  6829. }),
  6830. smalltalk.Dictionary);
  6831. smalltalk.addMethod(
  6832. unescape('_printString'),
  6833. smalltalk.method({
  6834. selector: unescape('printString'),
  6835. category: 'printing',
  6836. fn: function (){
  6837. var self=this;
  6838. return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(aStream){(function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_printString", [], smalltalk.Collection)]);return smalltalk.send($rec, "_nextPutAll_", [unescape("%28")]);})(aStream);smalltalk.send(smalltalk.send(self, "_associations", []), "_do_separatedBy_", [(function(anAssociation){return (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(anAssociation, "_key", []), "_printString", [])]);smalltalk.send($rec, "_nextPutAll_", [unescape("%20-%3E%20")]);return smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(anAssociation, "_value", []), "_printString", [])]);})(aStream);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [unescape("%20%2C%20")]);})]);return smalltalk.send(aStream, "_nextPutAll_", [unescape("%29")]);})]);
  6839. return self;},
  6840. args: [],
  6841. source: unescape('printString%0A%09%5EString%20streamContents%3A%20%5B%3AaStream%7C%20%20%0A%09%09aStream%20%0A%09%09%09nextPutAll%3A%20super%20printString%3B%0A%09%09%09nextPutAll%3A%20%27%28%27.%0A%09%09%09%09self%20associations%20%0A%09%09%09%09%09do%3A%20%5B%3AanAssociation%7C%20%20%0A%09%09%09%09%09%09aStream%20%0A%09%09%09%09%09%09%09nextPutAll%3A%20anAssociation%20key%20printString%3B%0A%09%09%09%09%09%09%09%09nextPutAll%3A%20%27%20-%3E%20%27%3B%0A%09%09%09%09%09%09%09%09nextPutAll%3A%20anAssociation%20value%20printString%5D%0A%09%09%09%09%09%09%09separatedBy%3A%20%5BaStream%20nextPutAll%3A%20%27%20%2C%20%27%5D.%0A%09%09%09%09%09%09aStream%20nextPutAll%3A%20%27%29%27%5D'),
  6842. messageSends: ["streamContents:", "nextPutAll:", "printString", "do:separatedBy:", "associations", "key", "value"],
  6843. referencedClasses: ["String"]
  6844. }),
  6845. smalltalk.Dictionary);
  6846. smalltalk.addMethod(
  6847. unescape('_storeOn_'),
  6848. smalltalk.method({
  6849. selector: unescape('storeOn%3A'),
  6850. category: 'printing',
  6851. fn: function (aStream){
  6852. var self=this;
  6853. smalltalk.send(aStream, "_nextPutAll_", [unescape("%23%7B")]);
  6854. smalltalk.send(smalltalk.send(self, "_associations", []), "_do_separatedBy_", [(function(each){return smalltalk.send(each, "_storeOn_", [aStream]);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [". "]);})]);
  6855. smalltalk.send(aStream, "_nextPutAll_", [unescape("%7D")]);
  6856. return self;},
  6857. args: ["aStream"],
  6858. source: unescape('storeOn%3A%20aStream%0A%09aStream%20nextPutAll%3A%20%27%23%7B%27.%0A%09self%20associations%0A%09%09do%3A%20%5B%3Aeach%20%7C%20each%20storeOn%3A%20aStream%5D%0A%09%09separatedBy%3A%20%5B%20aStream%20nextPutAll%3A%20%27.%20%27%5D.%0A%09aStream%20nextPutAll%3A%20%27%7D%27'),
  6859. messageSends: ["nextPutAll:", "do:separatedBy:", "associations", "storeOn:"],
  6860. referencedClasses: []
  6861. }),
  6862. smalltalk.Dictionary);
  6863. smalltalk.addMethod(
  6864. unescape('_includesKey_'),
  6865. smalltalk.method({
  6866. selector: unescape('includesKey%3A'),
  6867. category: 'testing',
  6868. fn: function (aKey){
  6869. var self=this;
  6870. return self.hasOwnProperty(aKey);
  6871. return self;},
  6872. args: ["aKey"],
  6873. source: unescape('includesKey%3A%20aKey%0A%09%3Creturn%20self.hasOwnProperty%28aKey%29%3E'),
  6874. messageSends: [],
  6875. referencedClasses: []
  6876. }),
  6877. smalltalk.Dictionary);
  6878. smalltalk.addMethod(
  6879. unescape('_remove_ifAbsent_'),
  6880. smalltalk.method({
  6881. selector: unescape('remove%3AifAbsent%3A'),
  6882. category: 'adding/removing',
  6883. fn: function (aKey, aBlock){
  6884. var self=this;
  6885. return smalltalk.send(self, "_removeKey_ifAbsent_", [aKey, aBlock]);
  6886. return self;},
  6887. args: ["aKey", "aBlock"],
  6888. source: unescape('remove%3A%20aKey%20ifAbsent%3A%20aBlock%0A%20%20%20%20%5Eself%20removeKey%3A%20aKey%20ifAbsent%3A%20aBlock'),
  6889. messageSends: ["removeKey:ifAbsent:"],
  6890. referencedClasses: []
  6891. }),
  6892. smalltalk.Dictionary);
  6893. smalltalk.addMethod(
  6894. unescape('_removeKey_ifAbsent_'),
  6895. smalltalk.method({
  6896. selector: unescape('removeKey%3AifAbsent%3A'),
  6897. category: 'adding/removing',
  6898. fn: function (aKey, aBlock){
  6899. var self=this;
  6900. return ((($receiver = smalltalk.send(self, "_includesKey_", [aKey])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(aBlock, "_value", []);})() : (function(){return smalltalk.send(self, "_basicDelete_", [aKey]);})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){return smalltalk.send(aBlock, "_value", []);}), (function(){return smalltalk.send(self, "_basicDelete_", [aKey]);})]));
  6901. return self;},
  6902. args: ["aKey", "aBlock"],
  6903. source: unescape('removeKey%3A%20aKey%20ifAbsent%3A%20aBlock%0A%09%5E%28self%20includesKey%3A%20aKey%29%20%0A%09%09ifFalse%3A%20%5BaBlock%20value%5D%0A%09%09ifTrue%3A%20%5Bself%20basicDelete%3A%20aKey%5D'),
  6904. messageSends: ["ifFalse:ifTrue:", "includesKey:", "value", "basicDelete:"],
  6905. referencedClasses: []
  6906. }),
  6907. smalltalk.Dictionary);
  6908. smalltalk.addMethod(
  6909. unescape('_fromPairs_'),
  6910. smalltalk.method({
  6911. selector: unescape('fromPairs%3A'),
  6912. category: 'instance creation',
  6913. fn: function (aCollection){
  6914. var self=this;
  6915. var dict=nil;
  6916. dict=smalltalk.send(self, "_new", []);
  6917. smalltalk.send(aCollection, "_do_", [(function(each){return smalltalk.send(dict, "_add_", [each]);})]);
  6918. return dict;
  6919. return self;},
  6920. args: ["aCollection"],
  6921. source: unescape('fromPairs%3A%20aCollection%0A%09%7C%20dict%20%7C%0A%09dict%20%3A%3D%20self%20new.%0A%09aCollection%20do%3A%20%5B%3Aeach%20%7C%20dict%20add%3A%20each%5D.%0A%09%5Edict'),
  6922. messageSends: ["new", "do:", "add:"],
  6923. referencedClasses: []
  6924. }),
  6925. smalltalk.Dictionary.klass);
  6926. smalltalk.addClass('ClassBuilder', smalltalk.Object, [], 'Kernel');
  6927. smalltalk.addMethod(
  6928. unescape('_superclass_subclass_'),
  6929. smalltalk.method({
  6930. selector: unescape('superclass%3Asubclass%3A'),
  6931. category: 'class creation',
  6932. fn: function (aClass, aString){
  6933. var self=this;
  6934. return smalltalk.send(self, "_superclass_subclass_instanceVariableNames_package_", [aClass, aString, "", nil]);
  6935. return self;},
  6936. args: ["aClass", "aString"],
  6937. source: unescape('superclass%3A%20aClass%20subclass%3A%20aString%0A%09%5Eself%20superclass%3A%20aClass%20subclass%3A%20aString%20instanceVariableNames%3A%20%27%27%20package%3A%20nil'),
  6938. messageSends: ["superclass:subclass:instanceVariableNames:package:"],
  6939. referencedClasses: []
  6940. }),
  6941. smalltalk.ClassBuilder);
  6942. smalltalk.addMethod(
  6943. unescape('_class_instanceVariableNames_'),
  6944. smalltalk.method({
  6945. selector: unescape('class%3AinstanceVariableNames%3A'),
  6946. category: 'class creation',
  6947. fn: function (aClass, aString){
  6948. var self=this;
  6949. ((($receiver = smalltalk.send(aClass, "_isMetaclass", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_error_", [smalltalk.send(smalltalk.send(aClass, "_name", []), "__comma", [" is not a metaclass"])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self, "_error_", [smalltalk.send(smalltalk.send(aClass, "_name", []), "__comma", [" is not a metaclass"])]);})]));
  6950. smalltalk.send(aClass, "_basicAt_put_", ["iVarNames", smalltalk.send(self, "_instanceVariableNamesFor_", [aString])]);
  6951. smalltalk.send(self, "_setupClass_", [aClass]);
  6952. return self;},
  6953. args: ["aClass", "aString"],
  6954. source: unescape('class%3A%20aClass%20instanceVariableNames%3A%20aString%0A%09aClass%20isMetaclass%20ifFalse%3A%20%5Bself%20error%3A%20aClass%20name%2C%20%27%20is%20not%20a%20metaclass%27%5D.%0A%09aClass%20basicAt%3A%20%27iVarNames%27%20put%3A%20%28self%20instanceVariableNamesFor%3A%20aString%29.%0A%09self%20setupClass%3A%20aClass'),
  6955. messageSends: ["ifFalse:", "isMetaclass", "error:", unescape("%2C"), "name", "basicAt:put:", "instanceVariableNamesFor:", "setupClass:"],
  6956. referencedClasses: []
  6957. }),
  6958. smalltalk.ClassBuilder);
  6959. smalltalk.addMethod(
  6960. unescape('_instanceVariableNamesFor_'),
  6961. smalltalk.method({
  6962. selector: unescape('instanceVariableNamesFor%3A'),
  6963. category: 'private',
  6964. fn: function (aString){
  6965. var self=this;
  6966. return smalltalk.send(smalltalk.send(aString, "_tokenize_", [" "]), "_reject_", [(function(each){return smalltalk.send(each, "_isEmpty", []);})]);
  6967. return self;},
  6968. args: ["aString"],
  6969. source: unescape('instanceVariableNamesFor%3A%20aString%0A%09%5E%28aString%20tokenize%3A%20%27%20%27%29%20reject%3A%20%5B%3Aeach%20%7C%20each%20isEmpty%5D'),
  6970. messageSends: ["reject:", "tokenize:", "isEmpty"],
  6971. referencedClasses: []
  6972. }),
  6973. smalltalk.ClassBuilder);
  6974. smalltalk.addMethod(
  6975. unescape('_addSubclassOf_named_instanceVariableNames_'),
  6976. smalltalk.method({
  6977. selector: unescape('addSubclassOf%3Anamed%3AinstanceVariableNames%3A'),
  6978. category: 'private',
  6979. fn: function (aClass, aString, aCollection){
  6980. var self=this;
  6981. smalltalk.addClass(aString, aClass, aCollection);
  6982. return smalltalk[aString];
  6983. return self;},
  6984. args: ["aClass", "aString", "aCollection"],
  6985. source: unescape('addSubclassOf%3A%20aClass%20named%3A%20aString%20instanceVariableNames%3A%20aCollection%0A%09%3Csmalltalk.addClass%28aString%2C%20aClass%2C%20aCollection%29%3B%0A%09%20%20%20%20return%20smalltalk%5BaString%5D%3E'),
  6986. messageSends: [],
  6987. referencedClasses: []
  6988. }),
  6989. smalltalk.ClassBuilder);
  6990. smalltalk.addMethod(
  6991. unescape('_setupClass_'),
  6992. smalltalk.method({
  6993. selector: unescape('setupClass%3A'),
  6994. category: 'private',
  6995. fn: function (aClass){
  6996. var self=this;
  6997. smalltalk.init(aClass);;
  6998. return self;},
  6999. args: ["aClass"],
  7000. source: unescape('setupClass%3A%20aClass%0A%09%3Csmalltalk.init%28aClass%29%3B%3E'),
  7001. messageSends: [],
  7002. referencedClasses: []
  7003. }),
  7004. smalltalk.ClassBuilder);
  7005. smalltalk.addMethod(
  7006. unescape('_superclass_subclass_instanceVariableNames_package_'),
  7007. smalltalk.method({
  7008. selector: unescape('superclass%3Asubclass%3AinstanceVariableNames%3Apackage%3A'),
  7009. category: 'class creation',
  7010. fn: function (aClass, aString, aString2, aString3){
  7011. var self=this;
  7012. var newClass=nil;
  7013. newClass=smalltalk.send(self, "_addSubclassOf_named_instanceVariableNames_package_", [aClass, aString, smalltalk.send(self, "_instanceVariableNamesFor_", [aString2]), (($receiver = aString3) == nil || $receiver == undefined) ? (function(){return "unclassified";})() : $receiver]);
  7014. smalltalk.send(self, "_setupClass_", [newClass]);
  7015. return newClass;
  7016. return self;},
  7017. args: ["aClass", "aString", "aString2", "aString3"],
  7018. source: unescape('superclass%3A%20aClass%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3%0A%09%7C%20newClass%20%7C%0A%09newClass%20%3A%3D%20self%20addSubclassOf%3A%20aClass%0A%09%09%09%09named%3A%20aString%20instanceVariableNames%3A%20%28self%20instanceVariableNamesFor%3A%20aString2%29%0A%09%09%09%09package%3A%20%28aString3%20ifNil%3A%20%5B%27unclassified%27%5D%29.%0A%09self%20setupClass%3A%20newClass.%0A%09%5EnewClass'),
  7019. messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "instanceVariableNamesFor:", "ifNil:", "setupClass:"],
  7020. referencedClasses: []
  7021. }),
  7022. smalltalk.ClassBuilder);
  7023. smalltalk.addMethod(
  7024. unescape('_addSubclassOf_named_instanceVariableNames_package_'),
  7025. smalltalk.method({
  7026. selector: unescape('addSubclassOf%3Anamed%3AinstanceVariableNames%3Apackage%3A'),
  7027. category: 'private',
  7028. fn: function (aClass, aString, aCollection, packageName){
  7029. var self=this;
  7030. smalltalk.addClass(aString, aClass, aCollection, packageName);
  7031. return smalltalk[aString];
  7032. return self;},
  7033. args: ["aClass", "aString", "aCollection", "packageName"],
  7034. source: unescape('addSubclassOf%3A%20aClass%20named%3A%20aString%20instanceVariableNames%3A%20aCollection%20package%3A%20packageName%0A%09%3Csmalltalk.addClass%28aString%2C%20aClass%2C%20aCollection%2C%20packageName%29%3B%0A%09%20%20%20%20return%20smalltalk%5BaString%5D%3E'),
  7035. messageSends: [],
  7036. referencedClasses: []
  7037. }),
  7038. smalltalk.ClassBuilder);
  7039. smalltalk.addMethod(
  7040. unescape('_copyClass_named_'),
  7041. smalltalk.method({
  7042. selector: unescape('copyClass%3Anamed%3A'),
  7043. category: 'private',
  7044. fn: function (aClass, aString){
  7045. var self=this;
  7046. var newClass=nil;
  7047. newClass=smalltalk.send(self, "_addSubclassOf_named_instanceVariableNames_package_", [smalltalk.send(aClass, "_superclass", []), aString, smalltalk.send(aClass, "_instanceVariableNames", []), smalltalk.send(smalltalk.send(aClass, "_package", []), "_name", [])]);
  7048. smalltalk.send(self, "_setupClass_", [newClass]);
  7049. smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_methodDictionary", []), "_values", []), "_do_", [(function(each){smalltalk.send(newClass, "_addCompiledMethod_", [smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_load_forClass_", [smalltalk.send(each, "_source", []), newClass])]);return smalltalk.send(smalltalk.send(smalltalk.send(newClass, "_methodDictionary", []), "_at_", [smalltalk.send(each, "_selector", [])]), "_category_", [smalltalk.send(each, "_category", [])]);})]);
  7050. smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_methodDictionary", []), "_values", []), "_do_", [(function(each){smalltalk.send(smalltalk.send(newClass, "_class", []), "_addCompiledMethod_", [smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_load_forClass_", [smalltalk.send(each, "_source", []), smalltalk.send(newClass, "_class", [])])]);return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(newClass, "_class", []), "_methodDictionary", []), "_at_", [smalltalk.send(each, "_selector", [])]), "_category_", [smalltalk.send(each, "_category", [])]);})]);
  7051. smalltalk.send(self, "_setupClass_", [newClass]);
  7052. return newClass;
  7053. return self;},
  7054. args: ["aClass", "aString"],
  7055. source: unescape('copyClass%3A%20aClass%20named%3A%20aString%0A%09%7C%20newClass%20%7C%0A%0A%09newClass%20%3A%3D%20self%20%0A%09%09addSubclassOf%3A%20aClass%20superclass%0A%09%09named%3A%20aString%20%0A%09%09instanceVariableNames%3A%20aClass%20instanceVariableNames%20%0A%09%09package%3A%20aClass%20package%20name.%0A%0A%09self%20setupClass%3A%20newClass.%0A%0A%09aClass%20methodDictionary%20values%20do%3A%20%5B%3Aeach%20%7C%0A%09%09newClass%20addCompiledMethod%3A%20%28Compiler%20new%20load%3A%20each%20source%20forClass%3A%20newClass%29.%0A%09%09%28newClass%20methodDictionary%20at%3A%20each%20selector%29%20category%3A%20each%20category%5D.%0A%0A%09aClass%20class%20methodDictionary%20values%20do%3A%20%5B%3Aeach%20%7C%0A%09%09newClass%20class%20addCompiledMethod%3A%20%28Compiler%20new%20load%3A%20each%20source%20forClass%3A%20newClass%20class%29.%0A%09%09%28newClass%20class%20methodDictionary%20at%3A%20each%20selector%29%20category%3A%20each%20category%5D.%0A%0A%09self%20setupClass%3A%20newClass.%0A%09%5EnewClass'),
  7056. messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "superclass", "instanceVariableNames", "name", "package", "setupClass:", "do:", "values", "methodDictionary", "addCompiledMethod:", "load:forClass:", "new", "source", "category:", "at:", "selector", "category", "class"],
  7057. referencedClasses: ["Compiler"]
  7058. }),
  7059. smalltalk.ClassBuilder);
  7060. smalltalk.addClass('ClassCategoryReader', smalltalk.Object, ['class', 'category', 'chunkParser'], 'Kernel');
  7061. smalltalk.addMethod(
  7062. unescape('_initialize'),
  7063. smalltalk.method({
  7064. selector: unescape('initialize'),
  7065. category: 'initialization',
  7066. fn: function (){
  7067. var self=this;
  7068. smalltalk.send(self, "_initialize", [], smalltalk.Object);
  7069. self['@chunkParser']=smalltalk.send((smalltalk.ChunkParser || ChunkParser), "_new", []);
  7070. return self;},
  7071. args: [],
  7072. source: unescape('initialize%0A%09super%20initialize.%0A%09chunkParser%20%3A%3D%20ChunkParser%20new.'),
  7073. messageSends: ["initialize", "new"],
  7074. referencedClasses: ["ChunkParser"]
  7075. }),
  7076. smalltalk.ClassCategoryReader);
  7077. smalltalk.addMethod(
  7078. unescape('_class_category_'),
  7079. smalltalk.method({
  7080. selector: unescape('class%3Acategory%3A'),
  7081. category: 'accessing',
  7082. fn: function (aClass, aString){
  7083. var self=this;
  7084. self['@class']=aClass;
  7085. self['@category']=aString;
  7086. return self;},
  7087. args: ["aClass", "aString"],
  7088. source: unescape('class%3A%20aClass%20category%3A%20aString%0A%09class%20%3A%3D%20aClass.%0A%09category%20%3A%3D%20aString'),
  7089. messageSends: [],
  7090. referencedClasses: []
  7091. }),
  7092. smalltalk.ClassCategoryReader);
  7093. smalltalk.addMethod(
  7094. unescape('_scanFrom_'),
  7095. smalltalk.method({
  7096. selector: unescape('scanFrom%3A'),
  7097. category: 'fileIn',
  7098. fn: function (aChunkParser){
  7099. var self=this;
  7100. var chunk=nil;
  7101. (function(){while(!(function(){chunk=smalltalk.send(aChunkParser, "_nextChunk", []);return smalltalk.send(chunk, "_isEmpty", []);})()) {(function(){return smalltalk.send(self, "_compileMethod_", [chunk]);})()}})();
  7102. return self;},
  7103. args: ["aChunkParser"],
  7104. source: unescape('scanFrom%3A%20aChunkParser%0A%09%7C%20chunk%20%7C%0A%09%5Bchunk%20%3A%3D%20aChunkParser%20nextChunk.%0A%09chunk%20isEmpty%5D%20whileFalse%3A%20%5B%0A%09%20%20%20%20self%20compileMethod%3A%20chunk%5D'),
  7105. messageSends: ["whileFalse:", "nextChunk", "isEmpty", "compileMethod:"],
  7106. referencedClasses: []
  7107. }),
  7108. smalltalk.ClassCategoryReader);
  7109. smalltalk.addMethod(
  7110. unescape('_compileMethod_'),
  7111. smalltalk.method({
  7112. selector: unescape('compileMethod%3A'),
  7113. category: 'private',
  7114. fn: function (aString){
  7115. var self=this;
  7116. var method=nil;
  7117. method=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_load_forClass_", [aString, self['@class']]);
  7118. smalltalk.send(method, "_category_", [self['@category']]);
  7119. smalltalk.send(self['@class'], "_addCompiledMethod_", [method]);
  7120. return self;},
  7121. args: ["aString"],
  7122. source: unescape('compileMethod%3A%20aString%0A%09%7C%20method%20%7C%0A%09method%20%3A%3D%20Compiler%20new%20load%3A%20aString%20forClass%3A%20class.%0A%09method%20category%3A%20category.%0A%09class%20addCompiledMethod%3A%20method'),
  7123. messageSends: ["load:forClass:", "new", "category:", "addCompiledMethod:"],
  7124. referencedClasses: ["Compiler"]
  7125. }),
  7126. smalltalk.ClassCategoryReader);
  7127. smalltalk.addClass('Stream', smalltalk.Object, ['collection', 'position', 'streamSize'], 'Kernel');
  7128. smalltalk.addMethod(
  7129. unescape('_collection'),
  7130. smalltalk.method({
  7131. selector: unescape('collection'),
  7132. category: 'accessing',
  7133. fn: function (){
  7134. var self=this;
  7135. return self['@collection'];
  7136. return self;},
  7137. args: [],
  7138. source: unescape('collection%0A%09%5Ecollection'),
  7139. messageSends: [],
  7140. referencedClasses: []
  7141. }),
  7142. smalltalk.Stream);
  7143. smalltalk.addMethod(
  7144. unescape('_setCollection_'),
  7145. smalltalk.method({
  7146. selector: unescape('setCollection%3A'),
  7147. category: 'accessing',
  7148. fn: function (aCollection){
  7149. var self=this;
  7150. self['@collection']=aCollection;
  7151. return self;},
  7152. args: ["aCollection"],
  7153. source: unescape('setCollection%3A%20aCollection%0A%09collection%20%3A%3D%20aCollection'),
  7154. messageSends: [],
  7155. referencedClasses: []
  7156. }),
  7157. smalltalk.Stream);
  7158. smalltalk.addMethod(
  7159. unescape('_position'),
  7160. smalltalk.method({
  7161. selector: unescape('position'),
  7162. category: 'accessing',
  7163. fn: function (){
  7164. var self=this;
  7165. return (($receiver = self['@position']) == nil || $receiver == undefined) ? (function(){return self['@position']=(0);})() : $receiver;
  7166. return self;},
  7167. args: [],
  7168. source: unescape('position%0A%09%5Eposition%20ifNil%3A%20%5Bposition%20%3A%3D%200%5D'),
  7169. messageSends: ["ifNil:"],
  7170. referencedClasses: []
  7171. }),
  7172. smalltalk.Stream);
  7173. smalltalk.addMethod(
  7174. unescape('_position_'),
  7175. smalltalk.method({
  7176. selector: unescape('position%3A'),
  7177. category: 'accessing',
  7178. fn: function (anInteger){
  7179. var self=this;
  7180. self['@position']=anInteger;
  7181. return self;},
  7182. args: ["anInteger"],
  7183. source: unescape('position%3A%20anInteger%0A%09position%20%3A%3D%20anInteger'),
  7184. messageSends: [],
  7185. referencedClasses: []
  7186. }),
  7187. smalltalk.Stream);
  7188. smalltalk.addMethod(
  7189. unescape('_streamSize'),
  7190. smalltalk.method({
  7191. selector: unescape('streamSize'),
  7192. category: 'accessing',
  7193. fn: function (){
  7194. var self=this;
  7195. return self['@streamSize'];
  7196. return self;},
  7197. args: [],
  7198. source: unescape('streamSize%0A%09%5EstreamSize'),
  7199. messageSends: [],
  7200. referencedClasses: []
  7201. }),
  7202. smalltalk.Stream);
  7203. smalltalk.addMethod(
  7204. unescape('_setStreamSize_'),
  7205. smalltalk.method({
  7206. selector: unescape('setStreamSize%3A'),
  7207. category: 'accessing',
  7208. fn: function (anInteger){
  7209. var self=this;
  7210. self['@streamSize']=anInteger;
  7211. return self;},
  7212. args: ["anInteger"],
  7213. source: unescape('setStreamSize%3A%20anInteger%0A%09streamSize%20%3A%3D%20anInteger'),
  7214. messageSends: [],
  7215. referencedClasses: []
  7216. }),
  7217. smalltalk.Stream);
  7218. smalltalk.addMethod(
  7219. unescape('_contents'),
  7220. smalltalk.method({
  7221. selector: unescape('contents'),
  7222. category: 'accessing',
  7223. fn: function (){
  7224. var self=this;
  7225. return smalltalk.send(smalltalk.send(self, "_collection", []), "_copyFrom_to_", [(1), smalltalk.send(self, "_streamSize", [])]);
  7226. return self;},
  7227. args: [],
  7228. source: unescape('contents%0A%09%5Eself%20collection%0A%09%20%20%20%20copyFrom%3A%201%20%0A%09%20%20%20%20to%3A%20self%20streamSize'),
  7229. messageSends: ["copyFrom:to:", "collection", "streamSize"],
  7230. referencedClasses: []
  7231. }),
  7232. smalltalk.Stream);
  7233. smalltalk.addMethod(
  7234. unescape('_size'),
  7235. smalltalk.method({
  7236. selector: unescape('size'),
  7237. category: 'accessing',
  7238. fn: function (){
  7239. var self=this;
  7240. return smalltalk.send(self, "_streamSize", []);
  7241. return self;},
  7242. args: [],
  7243. source: unescape('size%0A%09%5Eself%20streamSize'),
  7244. messageSends: ["streamSize"],
  7245. referencedClasses: []
  7246. }),
  7247. smalltalk.Stream);
  7248. smalltalk.addMethod(
  7249. unescape('_reset'),
  7250. smalltalk.method({
  7251. selector: unescape('reset'),
  7252. category: 'actions',
  7253. fn: function (){
  7254. var self=this;
  7255. smalltalk.send(self, "_position_", [(0)]);
  7256. return self;},
  7257. args: [],
  7258. source: unescape('reset%0A%09self%20position%3A%200'),
  7259. messageSends: ["position:"],
  7260. referencedClasses: []
  7261. }),
  7262. smalltalk.Stream);
  7263. smalltalk.addMethod(
  7264. unescape('_close'),
  7265. smalltalk.method({
  7266. selector: unescape('close'),
  7267. category: 'actions',
  7268. fn: function (){
  7269. var self=this;
  7270. return self;},
  7271. args: [],
  7272. source: unescape('close'),
  7273. messageSends: [],
  7274. referencedClasses: []
  7275. }),
  7276. smalltalk.Stream);
  7277. smalltalk.addMethod(
  7278. unescape('_flush'),
  7279. smalltalk.method({
  7280. selector: unescape('flush'),
  7281. category: 'actions',
  7282. fn: function (){
  7283. var self=this;
  7284. return self;},
  7285. args: [],
  7286. source: unescape('flush'),
  7287. messageSends: [],
  7288. referencedClasses: []
  7289. }),
  7290. smalltalk.Stream);
  7291. smalltalk.addMethod(
  7292. unescape('_resetContents'),
  7293. smalltalk.method({
  7294. selector: unescape('resetContents'),
  7295. category: 'actions',
  7296. fn: function (){
  7297. var self=this;
  7298. smalltalk.send(self, "_reset", []);
  7299. smalltalk.send(self, "_setStreamSize_", [(0)]);
  7300. return self;},
  7301. args: [],
  7302. source: unescape('resetContents%0A%09self%20reset.%0A%09self%20setStreamSize%3A%200'),
  7303. messageSends: ["reset", "setStreamSize:"],
  7304. referencedClasses: []
  7305. }),
  7306. smalltalk.Stream);
  7307. smalltalk.addMethod(
  7308. unescape('_do_'),
  7309. smalltalk.method({
  7310. selector: unescape('do%3A'),
  7311. category: 'enumerating',
  7312. fn: function (aBlock){
  7313. var self=this;
  7314. (function(){while(!(function(){return smalltalk.send(self, "_atEnd", []);})()) {(function(){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_next", [])]);})()}})();
  7315. return self;},
  7316. args: ["aBlock"],
  7317. source: unescape('do%3A%20aBlock%0A%09%5Bself%20atEnd%5D%20whileFalse%3A%20%5BaBlock%20value%3A%20self%20next%5D'),
  7318. messageSends: ["whileFalse:", "atEnd", "value:", "next"],
  7319. referencedClasses: []
  7320. }),
  7321. smalltalk.Stream);
  7322. smalltalk.addMethod(
  7323. unescape('_setToEnd'),
  7324. smalltalk.method({
  7325. selector: unescape('setToEnd'),
  7326. category: 'positioning',
  7327. fn: function (){
  7328. var self=this;
  7329. smalltalk.send(self, "_position_", [smalltalk.send(self, "_size", [])]);
  7330. return self;},
  7331. args: [],
  7332. source: unescape('setToEnd%0A%09self%20position%3A%20self%20size'),
  7333. messageSends: ["position:", "size"],
  7334. referencedClasses: []
  7335. }),
  7336. smalltalk.Stream);
  7337. smalltalk.addMethod(
  7338. unescape('_skip_'),
  7339. smalltalk.method({
  7340. selector: unescape('skip%3A'),
  7341. category: 'positioning',
  7342. fn: function (anInteger){
  7343. var self=this;
  7344. smalltalk.send(self, "_position_", [smalltalk.send(((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +anInteger : smalltalk.send($receiver, "__plus", [anInteger])), "_min_max_", [smalltalk.send(self, "_size", []), (0)])]);
  7345. return self;},
  7346. args: ["anInteger"],
  7347. source: unescape('skip%3A%20anInteger%0A%09self%20position%3A%20%28%28self%20position%20+%20anInteger%29%20min%3A%20self%20size%20max%3A%200%29'),
  7348. messageSends: ["position:", "min:max:", unescape("+"), "position", "size"],
  7349. referencedClasses: []
  7350. }),
  7351. smalltalk.Stream);
  7352. smalltalk.addMethod(
  7353. unescape('_next'),
  7354. smalltalk.method({
  7355. selector: unescape('next'),
  7356. category: 'reading',
  7357. fn: function (){
  7358. var self=this;
  7359. smalltalk.send(self, "_position_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);
  7360. return smalltalk.send(self['@collection'], "_at_", [smalltalk.send(self, "_position", [])]);
  7361. return self;},
  7362. args: [],
  7363. source: unescape('next%0A%09self%20position%3A%20self%20position%20+%201.%20%0A%09%5Ecollection%20at%3A%20self%20position'),
  7364. messageSends: ["position:", unescape("+"), "position", "at:"],
  7365. referencedClasses: []
  7366. }),
  7367. smalltalk.Stream);
  7368. smalltalk.addMethod(
  7369. unescape('_next_'),
  7370. smalltalk.method({
  7371. selector: unescape('next%3A'),
  7372. category: 'reading',
  7373. fn: function (anInteger){
  7374. var self=this;
  7375. var tempCollection=nil;
  7376. tempCollection=smalltalk.send(smalltalk.send(smalltalk.send(self, "_collection", []), "_class", []), "_new", []);
  7377. smalltalk.send(anInteger, "_timesRepeat_", [(function(){return ((($receiver = smalltalk.send(self, "_atEnd", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(tempCollection, "_add_", [smalltalk.send(self, "_next", [])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(tempCollection, "_add_", [smalltalk.send(self, "_next", [])]);})]));})]);
  7378. return tempCollection;
  7379. return self;},
  7380. args: ["anInteger"],
  7381. source: unescape('next%3A%20anInteger%0A%09%7C%20tempCollection%20%7C%0A%09tempCollection%20%3A%3D%20self%20collection%20class%20new.%0A%09anInteger%20timesRepeat%3A%20%5B%0A%09%20%20%20%20self%20atEnd%20ifFalse%3A%20%5B%0A%09%09tempCollection%20add%3A%20self%20next%5D%5D.%0A%09%5EtempCollection'),
  7382. messageSends: ["new", "class", "collection", "timesRepeat:", "ifFalse:", "atEnd", "add:", "next"],
  7383. referencedClasses: []
  7384. }),
  7385. smalltalk.Stream);
  7386. smalltalk.addMethod(
  7387. unescape('_nextPut_'),
  7388. smalltalk.method({
  7389. selector: unescape('nextPut%3A'),
  7390. category: 'writing',
  7391. fn: function (anObject){
  7392. var self=this;
  7393. smalltalk.send(self, "_position_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);
  7394. smalltalk.send(smalltalk.send(self, "_collection", []), "_at_put_", [smalltalk.send(self, "_position", []), anObject]);
  7395. smalltalk.send(self, "_setStreamSize_", [smalltalk.send(smalltalk.send(self, "_streamSize", []), "_max_", [smalltalk.send(self, "_position", [])])]);
  7396. return self;},
  7397. args: ["anObject"],
  7398. source: unescape('nextPut%3A%20anObject%0A%09self%20position%3A%20self%20position%20+%201.%0A%09self%20collection%20at%3A%20self%20position%20put%3A%20anObject.%0A%09self%20setStreamSize%3A%20%28self%20streamSize%20max%3A%20self%20position%29'),
  7399. messageSends: ["position:", unescape("+"), "position", "at:put:", "collection", "setStreamSize:", "max:", "streamSize"],
  7400. referencedClasses: []
  7401. }),
  7402. smalltalk.Stream);
  7403. smalltalk.addMethod(
  7404. unescape('_nextPutAll_'),
  7405. smalltalk.method({
  7406. selector: unescape('nextPutAll%3A'),
  7407. category: 'writing',
  7408. fn: function (aCollection){
  7409. var self=this;
  7410. smalltalk.send(aCollection, "_do_", [(function(each){return smalltalk.send(self, "_nextPut_", [each]);})]);
  7411. return self;},
  7412. args: ["aCollection"],
  7413. source: unescape('nextPutAll%3A%20aCollection%0A%09aCollection%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20self%20nextPut%3A%20each%5D'),
  7414. messageSends: ["do:", "nextPut:"],
  7415. referencedClasses: []
  7416. }),
  7417. smalltalk.Stream);
  7418. smalltalk.addMethod(
  7419. unescape('_peek'),
  7420. smalltalk.method({
  7421. selector: unescape('peek'),
  7422. category: 'reading',
  7423. fn: function (){
  7424. var self=this;
  7425. return ((($receiver = smalltalk.send(self, "_atEnd", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(smalltalk.send(self, "_collection", []), "_at_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(smalltalk.send(self, "_collection", []), "_at_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);})]));
  7426. return self;},
  7427. args: [],
  7428. source: unescape('peek%0A%09%5Eself%20atEnd%20ifFalse%3A%20%5B%0A%09%20%20%20%20self%20collection%20at%3A%20self%20position%20+%201%5D'),
  7429. messageSends: ["ifFalse:", "atEnd", "at:", "collection", unescape("+"), "position"],
  7430. referencedClasses: []
  7431. }),
  7432. smalltalk.Stream);
  7433. smalltalk.addMethod(
  7434. unescape('_atEnd'),
  7435. smalltalk.method({
  7436. selector: unescape('atEnd'),
  7437. category: 'testing',
  7438. fn: function (){
  7439. var self=this;
  7440. return smalltalk.send(smalltalk.send(self, "_position", []), "__eq", [smalltalk.send(self, "_size", [])]);
  7441. return self;},
  7442. args: [],
  7443. source: unescape('atEnd%0A%09%5Eself%20position%20%3D%20self%20size'),
  7444. messageSends: [unescape("%3D"), "position", "size"],
  7445. referencedClasses: []
  7446. }),
  7447. smalltalk.Stream);
  7448. smalltalk.addMethod(
  7449. unescape('_atStart'),
  7450. smalltalk.method({
  7451. selector: unescape('atStart'),
  7452. category: 'testing',
  7453. fn: function (){
  7454. var self=this;
  7455. return smalltalk.send(smalltalk.send(self, "_position", []), "__eq", [(0)]);
  7456. return self;},
  7457. args: [],
  7458. source: unescape('atStart%0A%09%5Eself%20position%20%3D%200'),
  7459. messageSends: [unescape("%3D"), "position"],
  7460. referencedClasses: []
  7461. }),
  7462. smalltalk.Stream);
  7463. smalltalk.addMethod(
  7464. unescape('_isEmpty'),
  7465. smalltalk.method({
  7466. selector: unescape('isEmpty'),
  7467. category: 'testing',
  7468. fn: function (){
  7469. var self=this;
  7470. return smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [(0)]);
  7471. return self;},
  7472. args: [],
  7473. source: unescape('isEmpty%0A%09%5Eself%20size%20%3D%200'),
  7474. messageSends: [unescape("%3D"), "size"],
  7475. referencedClasses: []
  7476. }),
  7477. smalltalk.Stream);
  7478. smalltalk.addMethod(
  7479. unescape('_on_'),
  7480. smalltalk.method({
  7481. selector: unescape('on%3A'),
  7482. category: 'instance creation',
  7483. fn: function (aCollection){
  7484. var self=this;
  7485. return (function($rec){smalltalk.send($rec, "_setCollection_", [aCollection]);smalltalk.send($rec, "_setStreamSize_", [smalltalk.send(aCollection, "_size", [])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  7486. return self;},
  7487. args: ["aCollection"],
  7488. source: unescape('on%3A%20aCollection%0A%09%20%20%20%20%5Eself%20new%20%0A%09%09setCollection%3A%20aCollection%3B%0A%09%09setStreamSize%3A%20aCollection%20size%3B%0A%09%09yourself'),
  7489. messageSends: ["setCollection:", "setStreamSize:", "size", "yourself", "new"],
  7490. referencedClasses: []
  7491. }),
  7492. smalltalk.Stream.klass);
  7493. smalltalk.addClass('StringStream', smalltalk.Stream, [], 'Kernel');
  7494. smalltalk.addMethod(
  7495. unescape('_next_'),
  7496. smalltalk.method({
  7497. selector: unescape('next%3A'),
  7498. category: 'reading',
  7499. fn: function (anInteger){
  7500. var self=this;
  7501. var tempCollection=nil;
  7502. tempCollection=smalltalk.send(smalltalk.send(smalltalk.send(self, "_collection", []), "_class", []), "_new", []);
  7503. smalltalk.send(anInteger, "_timesRepeat_", [(function(){return ((($receiver = smalltalk.send(self, "_atEnd", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return tempCollection=smalltalk.send(tempCollection, "__comma", [smalltalk.send(self, "_next", [])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return tempCollection=smalltalk.send(tempCollection, "__comma", [smalltalk.send(self, "_next", [])]);})]));})]);
  7504. return tempCollection;
  7505. return self;},
  7506. args: ["anInteger"],
  7507. source: unescape('next%3A%20anInteger%0A%09%7C%20tempCollection%20%7C%0A%09tempCollection%20%3A%3D%20self%20collection%20class%20new.%0A%09anInteger%20timesRepeat%3A%20%5B%0A%09%20%20%20%20self%20atEnd%20ifFalse%3A%20%5B%0A%09%09tempCollection%20%3A%3D%20tempCollection%2C%20self%20next%5D%5D.%0A%09%5EtempCollection'),
  7508. messageSends: ["new", "class", "collection", "timesRepeat:", "ifFalse:", "atEnd", unescape("%2C"), "next"],
  7509. referencedClasses: []
  7510. }),
  7511. smalltalk.StringStream);
  7512. smalltalk.addMethod(
  7513. unescape('_nextPut_'),
  7514. smalltalk.method({
  7515. selector: unescape('nextPut%3A'),
  7516. category: 'writing',
  7517. fn: function (aString){
  7518. var self=this;
  7519. smalltalk.send(self, "_nextPutAll_", [aString]);
  7520. return self;},
  7521. args: ["aString"],
  7522. source: unescape('nextPut%3A%20aString%0A%09self%20nextPutAll%3A%20aString'),
  7523. messageSends: ["nextPutAll:"],
  7524. referencedClasses: []
  7525. }),
  7526. smalltalk.StringStream);
  7527. smalltalk.addMethod(
  7528. unescape('_nextPutAll_'),
  7529. smalltalk.method({
  7530. selector: unescape('nextPutAll%3A'),
  7531. category: 'writing',
  7532. fn: function (aString){
  7533. var self=this;
  7534. smalltalk.send(self, "_setCollection_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_collection", []), "_copyFrom_to_", [(1), smalltalk.send(self, "_position", [])]), "__comma", [aString]), "__comma", [smalltalk.send(smalltalk.send(self, "_collection", []), "_copyFrom_to_", [((($receiver = ((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))).klass === smalltalk.Number) ? $receiver +smalltalk.send(aString, "_size", []) : smalltalk.send($receiver, "__plus", [smalltalk.send(aString, "_size", [])])), smalltalk.send(smalltalk.send(self, "_collection", []), "_size", [])])])]);
  7535. smalltalk.send(self, "_position_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +smalltalk.send(aString, "_size", []) : smalltalk.send($receiver, "__plus", [smalltalk.send(aString, "_size", [])]))]);
  7536. smalltalk.send(self, "_setStreamSize_", [smalltalk.send(smalltalk.send(self, "_streamSize", []), "_max_", [smalltalk.send(self, "_position", [])])]);
  7537. return self;},
  7538. args: ["aString"],
  7539. source: unescape('nextPutAll%3A%20aString%0A%09self%20setCollection%3A%20%0A%09%20%20%20%20%28self%20collection%20copyFrom%3A%201%20to%3A%20self%20position%29%2C%0A%09%20%20%20%20aString%2C%0A%09%20%20%20%20%28self%20collection%20copyFrom%3A%20%28self%20position%20+%201%20+%20aString%20size%29%20to%3A%20self%20collection%20size%29.%0A%09self%20position%3A%20self%20position%20+%20aString%20size.%0A%09self%20setStreamSize%3A%20%28self%20streamSize%20max%3A%20self%20position%29'),
  7540. messageSends: ["setCollection:", unescape("%2C"), "copyFrom:to:", "collection", "position", unescape("+"), "size", "position:", "setStreamSize:", "max:", "streamSize"],
  7541. referencedClasses: []
  7542. }),
  7543. smalltalk.StringStream);
  7544. smalltalk.addMethod(
  7545. unescape('_cr'),
  7546. smalltalk.method({
  7547. selector: unescape('cr'),
  7548. category: 'writing',
  7549. fn: function (){
  7550. var self=this;
  7551. return smalltalk.send(self, "_nextPutAll_", [smalltalk.send((smalltalk.String || String), "_cr", [])]);
  7552. return self;},
  7553. args: [],
  7554. source: unescape('cr%0A%09%5Eself%20nextPutAll%3A%20String%20cr'),
  7555. messageSends: ["nextPutAll:", "cr"],
  7556. referencedClasses: ["String"]
  7557. }),
  7558. smalltalk.StringStream);
  7559. smalltalk.addMethod(
  7560. unescape('_crlf'),
  7561. smalltalk.method({
  7562. selector: unescape('crlf'),
  7563. category: 'writing',
  7564. fn: function (){
  7565. var self=this;
  7566. return smalltalk.send(self, "_nextPutAll_", [smalltalk.send((smalltalk.String || String), "_crlf", [])]);
  7567. return self;},
  7568. args: [],
  7569. source: unescape('crlf%0A%09%5Eself%20nextPutAll%3A%20String%20crlf'),
  7570. messageSends: ["nextPutAll:", "crlf"],
  7571. referencedClasses: ["String"]
  7572. }),
  7573. smalltalk.StringStream);
  7574. smalltalk.addMethod(
  7575. unescape('_lf'),
  7576. smalltalk.method({
  7577. selector: unescape('lf'),
  7578. category: 'writing',
  7579. fn: function (){
  7580. var self=this;
  7581. return smalltalk.send(self, "_nextPutAll_", [smalltalk.send((smalltalk.String || String), "_lf", [])]);
  7582. return self;},
  7583. args: [],
  7584. source: unescape('lf%0A%09%5Eself%20nextPutAll%3A%20String%20lf'),
  7585. messageSends: ["nextPutAll:", "lf"],
  7586. referencedClasses: ["String"]
  7587. }),
  7588. smalltalk.StringStream);
  7589. smalltalk.addMethod(
  7590. unescape('_space'),
  7591. smalltalk.method({
  7592. selector: unescape('space'),
  7593. category: 'writing',
  7594. fn: function (){
  7595. var self=this;
  7596. smalltalk.send(self, "_nextPut_", [" "]);
  7597. return self;},
  7598. args: [],
  7599. source: unescape('space%0A%09self%20nextPut%3A%20%27%20%27'),
  7600. messageSends: ["nextPut:"],
  7601. referencedClasses: []
  7602. }),
  7603. smalltalk.StringStream);
  7604. smalltalk.addClass('ClassCommentReader', smalltalk.Object, ['class', 'chunkParser'], 'Kernel');
  7605. smalltalk.addMethod(
  7606. unescape('_class_'),
  7607. smalltalk.method({
  7608. selector: unescape('class%3A'),
  7609. category: 'accessing',
  7610. fn: function (aClass){
  7611. var self=this;
  7612. self['@class']=aClass;
  7613. return self;},
  7614. args: ["aClass"],
  7615. source: unescape('class%3A%20aClass%0A%09class%20%3A%3D%20aClass'),
  7616. messageSends: [],
  7617. referencedClasses: []
  7618. }),
  7619. smalltalk.ClassCommentReader);
  7620. smalltalk.addMethod(
  7621. unescape('_scanFrom_'),
  7622. smalltalk.method({
  7623. selector: unescape('scanFrom%3A'),
  7624. category: 'fileIn',
  7625. fn: function (aChunkParser){
  7626. var self=this;
  7627. var chunk=nil;
  7628. chunk=smalltalk.send(aChunkParser, "_nextChunk", []);
  7629. ((($receiver = smalltalk.send(chunk, "_isEmpty", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_setComment_", [chunk]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self, "_setComment_", [chunk]);})]));
  7630. return self;},
  7631. args: ["aChunkParser"],
  7632. source: unescape('scanFrom%3A%20aChunkParser%0A%09%7C%20chunk%20%7C%0A%09chunk%20%3A%3D%20aChunkParser%20nextChunk.%0A%09chunk%20isEmpty%20ifFalse%3A%20%5B%0A%09%20%20%20%20self%20setComment%3A%20chunk%5D.'),
  7633. messageSends: ["nextChunk", "ifFalse:", "isEmpty", "setComment:"],
  7634. referencedClasses: []
  7635. }),
  7636. smalltalk.ClassCommentReader);
  7637. smalltalk.addMethod(
  7638. unescape('_initialize'),
  7639. smalltalk.method({
  7640. selector: unescape('initialize'),
  7641. category: 'initialization',
  7642. fn: function (){
  7643. var self=this;
  7644. smalltalk.send(self, "_initialize", [], smalltalk.Object);
  7645. self['@chunkParser']=smalltalk.send((smalltalk.ChunkParser || ChunkParser), "_new", []);
  7646. return self;},
  7647. args: [],
  7648. source: unescape('initialize%0A%09super%20initialize.%0A%09chunkParser%20%3A%3D%20ChunkParser%20new.'),
  7649. messageSends: ["initialize", "new"],
  7650. referencedClasses: ["ChunkParser"]
  7651. }),
  7652. smalltalk.ClassCommentReader);
  7653. smalltalk.addMethod(
  7654. unescape('_setComment_'),
  7655. smalltalk.method({
  7656. selector: unescape('setComment%3A'),
  7657. category: 'private',
  7658. fn: function (aString){
  7659. var self=this;
  7660. smalltalk.send(self['@class'], "_comment_", [aString]);
  7661. return self;},
  7662. args: ["aString"],
  7663. source: unescape('setComment%3A%20aString%0A%20%20%20%20class%20comment%3A%20aString'),
  7664. messageSends: ["comment:"],
  7665. referencedClasses: []
  7666. }),
  7667. smalltalk.ClassCommentReader);
  7668. smalltalk.addClass('Random', smalltalk.Object, [], 'Kernel');
  7669. smalltalk.addMethod(
  7670. unescape('_next'),
  7671. smalltalk.method({
  7672. selector: unescape('next'),
  7673. category: 'accessing',
  7674. fn: function (){
  7675. var self=this;
  7676. return Math.random();
  7677. return self;},
  7678. args: [],
  7679. source: unescape('next%0A%09%3Creturn%20Math.random%28%29%3E'),
  7680. messageSends: [],
  7681. referencedClasses: []
  7682. }),
  7683. smalltalk.Random);
  7684. smalltalk.addMethod(
  7685. unescape('_next_'),
  7686. smalltalk.method({
  7687. selector: unescape('next%3A'),
  7688. category: 'accessing',
  7689. fn: function (anInteger){
  7690. var self=this;
  7691. return smalltalk.send(smalltalk.send((1), "_to_", [anInteger]), "_collect_", [(function(each){return smalltalk.send(self, "_next", []);})]);
  7692. return self;},
  7693. args: ["anInteger"],
  7694. source: unescape('next%3A%20anInteger%0A%20%20%20%20%5E%281%20to%3A%20anInteger%29%20collect%3A%20%5B%3Aeach%20%7C%20self%20next%5D'),
  7695. messageSends: ["collect:", "to:", "next"],
  7696. referencedClasses: []
  7697. }),
  7698. smalltalk.Random);
  7699. smalltalk.addClass('Point', smalltalk.Object, ['x', 'y'], 'Kernel');
  7700. smalltalk.addMethod(
  7701. unescape('_x'),
  7702. smalltalk.method({
  7703. selector: unescape('x'),
  7704. category: 'accessing',
  7705. fn: function (){
  7706. var self=this;
  7707. return self['@x'];
  7708. return self;},
  7709. args: [],
  7710. source: unescape('x%0A%09%5Ex'),
  7711. messageSends: [],
  7712. referencedClasses: []
  7713. }),
  7714. smalltalk.Point);
  7715. smalltalk.addMethod(
  7716. unescape('_y'),
  7717. smalltalk.method({
  7718. selector: unescape('y'),
  7719. category: 'accessing',
  7720. fn: function (){
  7721. var self=this;
  7722. return self['@y'];
  7723. return self;},
  7724. args: [],
  7725. source: unescape('y%0A%09%5Ey'),
  7726. messageSends: [],
  7727. referencedClasses: []
  7728. }),
  7729. smalltalk.Point);
  7730. smalltalk.addMethod(
  7731. unescape('_y_'),
  7732. smalltalk.method({
  7733. selector: unescape('y%3A'),
  7734. category: 'accessing',
  7735. fn: function (aNumber){
  7736. var self=this;
  7737. self['@y']=aNumber;
  7738. return self;},
  7739. args: ["aNumber"],
  7740. source: unescape('y%3A%20aNumber%0A%09y%20%3A%3D%20aNumber'),
  7741. messageSends: [],
  7742. referencedClasses: []
  7743. }),
  7744. smalltalk.Point);
  7745. smalltalk.addMethod(
  7746. unescape('_x_'),
  7747. smalltalk.method({
  7748. selector: unescape('x%3A'),
  7749. category: 'accessing',
  7750. fn: function (aNumber){
  7751. var self=this;
  7752. self['@x']=aNumber;
  7753. return self;},
  7754. args: ["aNumber"],
  7755. source: unescape('x%3A%20aNumber%0A%09x%20%3A%3D%20aNumber'),
  7756. messageSends: [],
  7757. referencedClasses: []
  7758. }),
  7759. smalltalk.Point);
  7760. smalltalk.addMethod(
  7761. unescape('__star'),
  7762. smalltalk.method({
  7763. selector: unescape('*'),
  7764. category: 'arithmetic',
  7765. fn: function (aPoint){
  7766. var self=this;
  7767. return smalltalk.send((smalltalk.Point || Point), "_x_y_", [((($receiver = smalltalk.send(self, "_x", [])).klass === smalltalk.Number) ? $receiver *smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", []) : smalltalk.send($receiver, "__star", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", [])])), ((($receiver = smalltalk.send(self, "_y", [])).klass === smalltalk.Number) ? $receiver *smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", []) : smalltalk.send($receiver, "__star", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", [])]))]);
  7768. return self;},
  7769. args: ["aPoint"],
  7770. source: unescape('*%20aPoint%0A%09%5EPoint%20x%3A%20self%20x%20*%20aPoint%20asPoint%20x%20y%3A%20self%20y%20*%20aPoint%20asPoint%20y'),
  7771. messageSends: ["x:y:", unescape("*"), "x", "asPoint", "y"],
  7772. referencedClasses: ["Point"]
  7773. }),
  7774. smalltalk.Point);
  7775. smalltalk.addMethod(
  7776. unescape('__plus'),
  7777. smalltalk.method({
  7778. selector: unescape('+'),
  7779. category: 'arithmetic',
  7780. fn: function (aPoint){
  7781. var self=this;
  7782. return smalltalk.send((smalltalk.Point || Point), "_x_y_", [((($receiver = smalltalk.send(self, "_x", [])).klass === smalltalk.Number) ? $receiver +smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", []) : smalltalk.send($receiver, "__plus", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", [])])), ((($receiver = smalltalk.send(self, "_y", [])).klass === smalltalk.Number) ? $receiver +smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", []) : smalltalk.send($receiver, "__plus", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", [])]))]);
  7783. return self;},
  7784. args: ["aPoint"],
  7785. source: unescape('+%20aPoint%0A%09%5EPoint%20x%3A%20self%20x%20+%20aPoint%20asPoint%20x%20y%3A%20self%20y%20+%20aPoint%20asPoint%20y'),
  7786. messageSends: ["x:y:", unescape("+"), "x", "asPoint", "y"],
  7787. referencedClasses: ["Point"]
  7788. }),
  7789. smalltalk.Point);
  7790. smalltalk.addMethod(
  7791. unescape('__minus'),
  7792. smalltalk.method({
  7793. selector: unescape('-'),
  7794. category: 'arithmetic',
  7795. fn: function (aPoint){
  7796. var self=this;
  7797. return smalltalk.send((smalltalk.Point || Point), "_x_y_", [((($receiver = smalltalk.send(self, "_x", [])).klass === smalltalk.Number) ? $receiver -smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", []) : smalltalk.send($receiver, "__minus", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", [])])), ((($receiver = smalltalk.send(self, "_y", [])).klass === smalltalk.Number) ? $receiver -smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", []) : smalltalk.send($receiver, "__minus", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", [])]))]);
  7798. return self;},
  7799. args: ["aPoint"],
  7800. source: unescape('-%20aPoint%0A%09%5EPoint%20x%3A%20self%20x%20-%20aPoint%20asPoint%20x%20y%3A%20self%20y%20-%20aPoint%20asPoint%20y'),
  7801. messageSends: ["x:y:", unescape("-"), "x", "asPoint", "y"],
  7802. referencedClasses: ["Point"]
  7803. }),
  7804. smalltalk.Point);
  7805. smalltalk.addMethod(
  7806. unescape('__slash'),
  7807. smalltalk.method({
  7808. selector: unescape('/'),
  7809. category: 'arithmetic',
  7810. fn: function (aPoint){
  7811. var self=this;
  7812. return smalltalk.send((smalltalk.Point || Point), "_x_y_", [((($receiver = smalltalk.send(self, "_x", [])).klass === smalltalk.Number) ? $receiver /smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", []) : smalltalk.send($receiver, "__slash", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", [])])), ((($receiver = smalltalk.send(self, "_y", [])).klass === smalltalk.Number) ? $receiver /smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", []) : smalltalk.send($receiver, "__slash", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", [])]))]);
  7813. return self;},
  7814. args: ["aPoint"],
  7815. source: unescape('/%20aPoint%0A%09%5EPoint%20x%3A%20self%20x%20/%20aPoint%20asPoint%20x%20y%3A%20self%20y%20/%20aPoint%20asPoint%20y'),
  7816. messageSends: ["x:y:", unescape("/"), "x", "asPoint", "y"],
  7817. referencedClasses: ["Point"]
  7818. }),
  7819. smalltalk.Point);
  7820. smalltalk.addMethod(
  7821. unescape('_asPoint'),
  7822. smalltalk.method({
  7823. selector: unescape('asPoint'),
  7824. category: 'converting',
  7825. fn: function (){
  7826. var self=this;
  7827. return self;
  7828. return self;},
  7829. args: [],
  7830. source: unescape('asPoint%0A%09%5Eself'),
  7831. messageSends: [],
  7832. referencedClasses: []
  7833. }),
  7834. smalltalk.Point);
  7835. smalltalk.addMethod(
  7836. unescape('__eq'),
  7837. smalltalk.method({
  7838. selector: unescape('%3D'),
  7839. category: 'arithmetic',
  7840. fn: function (aPoint){
  7841. var self=this;
  7842. return smalltalk.send(smalltalk.send(smalltalk.send(aPoint, "_class", []), "__eq", [smalltalk.send(self, "_class", [])]), "_and_", [(function(){return smalltalk.send(smalltalk.send(smalltalk.send(aPoint, "_x", []), "__eq", [smalltalk.send(self, "_x", [])]), "_&", [smalltalk.send(smalltalk.send(aPoint, "_y", []), "__eq", [smalltalk.send(self, "_y", [])])]);})]);
  7843. return self;},
  7844. args: ["aPoint"],
  7845. source: unescape('%3D%20aPoint%0A%09%5EaPoint%20class%20%3D%20self%20class%20and%3A%20%5B%0A%09%09%28aPoint%20x%20%3D%20self%20x%29%20%26%20%28aPoint%20y%20%3D%20self%20y%29%5D'),
  7846. messageSends: ["and:", unescape("%3D"), "class", unescape("%26"), "x", "y"],
  7847. referencedClasses: []
  7848. }),
  7849. smalltalk.Point);
  7850. smalltalk.addMethod(
  7851. unescape('_x_y_'),
  7852. smalltalk.method({
  7853. selector: unescape('x%3Ay%3A'),
  7854. category: 'instance creation',
  7855. fn: function (aNumber, anotherNumber){
  7856. var self=this;
  7857. return (function($rec){smalltalk.send($rec, "_x_", [aNumber]);smalltalk.send($rec, "_y_", [anotherNumber]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  7858. return self;},
  7859. args: ["aNumber", "anotherNumber"],
  7860. source: unescape('x%3A%20aNumber%20y%3A%20anotherNumber%0A%09%5Eself%20new%0A%09%09x%3A%20aNumber%3B%0A%09%09y%3A%20anotherNumber%3B%0A%09%09yourself'),
  7861. messageSends: ["x:", "y:", "yourself", "new"],
  7862. referencedClasses: []
  7863. }),
  7864. smalltalk.Point.klass);
  7865. smalltalk.addClass('Message', smalltalk.Object, ['selector', 'arguments'], 'Kernel');
  7866. smalltalk.addMethod(
  7867. unescape('_selector'),
  7868. smalltalk.method({
  7869. selector: unescape('selector'),
  7870. category: 'accessing',
  7871. fn: function (){
  7872. var self=this;
  7873. return self['@selector'];
  7874. return self;},
  7875. args: [],
  7876. source: unescape('selector%0A%09%5Eselector'),
  7877. messageSends: [],
  7878. referencedClasses: []
  7879. }),
  7880. smalltalk.Message);
  7881. smalltalk.addMethod(
  7882. unescape('_selector_'),
  7883. smalltalk.method({
  7884. selector: unescape('selector%3A'),
  7885. category: 'accessing',
  7886. fn: function (aString){
  7887. var self=this;
  7888. self['@selector']=aString;
  7889. return self;},
  7890. args: ["aString"],
  7891. source: unescape('selector%3A%20aString%0A%09selector%20%3A%3D%20aString'),
  7892. messageSends: [],
  7893. referencedClasses: []
  7894. }),
  7895. smalltalk.Message);
  7896. smalltalk.addMethod(
  7897. unescape('_arguments_'),
  7898. smalltalk.method({
  7899. selector: unescape('arguments%3A'),
  7900. category: 'accessing',
  7901. fn: function (anArray){
  7902. var self=this;
  7903. self['@arguments']=anArray;
  7904. return self;},
  7905. args: ["anArray"],
  7906. source: unescape('arguments%3A%20anArray%0A%09arguments%20%3A%3D%20anArray'),
  7907. messageSends: [],
  7908. referencedClasses: []
  7909. }),
  7910. smalltalk.Message);
  7911. smalltalk.addMethod(
  7912. unescape('_arguments'),
  7913. smalltalk.method({
  7914. selector: unescape('arguments'),
  7915. category: 'accessing',
  7916. fn: function (){
  7917. var self=this;
  7918. return self['@arguments'];
  7919. return self;},
  7920. args: [],
  7921. source: unescape('arguments%0A%09%5Earguments'),
  7922. messageSends: [],
  7923. referencedClasses: []
  7924. }),
  7925. smalltalk.Message);
  7926. smalltalk.addMethod(
  7927. unescape('_printString'),
  7928. smalltalk.method({
  7929. selector: unescape('printString'),
  7930. category: 'printing',
  7931. fn: function (){
  7932. var self=this;
  7933. return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(aStream){return (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_printString", [], smalltalk.Object)]);smalltalk.send($rec, "_nextPutAll_", [unescape("%28")]);smalltalk.send($rec, "_nextPutAll_", [self['@selector']]);return smalltalk.send($rec, "_nextPutAll_", [unescape("%29")]);})(aStream);})]);
  7934. return self;},
  7935. args: [],
  7936. source: unescape('printString%0A%09%5E%20String%20streamContents%3A%20%5B%3AaStream%7C%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09%09%09aStream%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09%09%09%09nextPutAll%3A%20super%20printString%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09%09%09%09nextPutAll%3A%20%27%28%27%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09%09%09%09nextPutAll%3A%20selector%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09%09%09%09nextPutAll%3A%20%27%29%27%20%09%09%09%09%5D'),
  7937. messageSends: ["streamContents:", "nextPutAll:", "printString"],
  7938. referencedClasses: ["String"]
  7939. }),
  7940. smalltalk.Message);
  7941. smalltalk.addMethod(
  7942. unescape('_selector_arguments_'),
  7943. smalltalk.method({
  7944. selector: unescape('selector%3Aarguments%3A'),
  7945. category: 'instance creation',
  7946. fn: function (aString, anArray){
  7947. var self=this;
  7948. return (function($rec){smalltalk.send($rec, "_selector_", [aString]);smalltalk.send($rec, "_arguments_", [anArray]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  7949. return self;},
  7950. args: ["aString", "anArray"],
  7951. source: unescape('selector%3A%20aString%20arguments%3A%20anArray%0A%09%5Eself%20new%0A%09%09selector%3A%20aString%3B%0A%09%09arguments%3A%20anArray%3B%0A%09%09yourself'),
  7952. messageSends: ["selector:", "arguments:", "yourself", "new"],
  7953. referencedClasses: []
  7954. }),
  7955. smalltalk.Message.klass);
  7956. smalltalk.addClass('MessageNotUnderstood', smalltalk.Error, ['message', 'receiver'], 'Kernel');
  7957. smalltalk.addMethod(
  7958. unescape('_message'),
  7959. smalltalk.method({
  7960. selector: unescape('message'),
  7961. category: 'accessing',
  7962. fn: function (){
  7963. var self=this;
  7964. return self['@message'];
  7965. return self;},
  7966. args: [],
  7967. source: unescape('message%0A%09%5Emessage'),
  7968. messageSends: [],
  7969. referencedClasses: []
  7970. }),
  7971. smalltalk.MessageNotUnderstood);
  7972. smalltalk.addMethod(
  7973. unescape('_message_'),
  7974. smalltalk.method({
  7975. selector: unescape('message%3A'),
  7976. category: 'accessing',
  7977. fn: function (aMessage){
  7978. var self=this;
  7979. self['@message']=aMessage;
  7980. return self;},
  7981. args: ["aMessage"],
  7982. source: unescape('message%3A%20aMessage%0A%09message%20%3A%3D%20aMessage'),
  7983. messageSends: [],
  7984. referencedClasses: []
  7985. }),
  7986. smalltalk.MessageNotUnderstood);
  7987. smalltalk.addMethod(
  7988. unescape('_receiver'),
  7989. smalltalk.method({
  7990. selector: unescape('receiver'),
  7991. category: 'accessing',
  7992. fn: function (){
  7993. var self=this;
  7994. return self['@receiver'];
  7995. return self;},
  7996. args: [],
  7997. source: unescape('receiver%0A%09%5Ereceiver'),
  7998. messageSends: [],
  7999. referencedClasses: []
  8000. }),
  8001. smalltalk.MessageNotUnderstood);
  8002. smalltalk.addMethod(
  8003. unescape('_receiver_'),
  8004. smalltalk.method({
  8005. selector: unescape('receiver%3A'),
  8006. category: 'accessing',
  8007. fn: function (anObject){
  8008. var self=this;
  8009. self['@receiver']=anObject;
  8010. return self;},
  8011. args: ["anObject"],
  8012. source: unescape('receiver%3A%20anObject%0A%09receiver%20%3A%3D%20anObject'),
  8013. messageSends: [],
  8014. referencedClasses: []
  8015. }),
  8016. smalltalk.MessageNotUnderstood);
  8017. smalltalk.addMethod(
  8018. unescape('_messageText'),
  8019. smalltalk.method({
  8020. selector: unescape('messageText'),
  8021. category: 'accessing',
  8022. fn: function (){
  8023. var self=this;
  8024. return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_receiver", []), "_asString", []), "__comma", [unescape("%20does%20not%20understand%20%23")]), "__comma", [smalltalk.send(smalltalk.send(self, "_message", []), "_selector", [])]);
  8025. return self;},
  8026. args: [],
  8027. source: unescape('messageText%0A%09%5Eself%20receiver%20asString%2C%20%27%20does%20not%20understand%20%23%27%2C%20self%20message%20selector'),
  8028. messageSends: [unescape("%2C"), "asString", "receiver", "selector", "message"],
  8029. referencedClasses: []
  8030. }),
  8031. smalltalk.MessageNotUnderstood);
  8032. smalltalk.addClass('ErrorHandler', smalltalk.Object, [], 'Kernel');
  8033. smalltalk.addMethod(
  8034. unescape('_handleError_'),
  8035. smalltalk.method({
  8036. selector: unescape('handleError%3A'),
  8037. category: 'error handling',
  8038. fn: function (anError){
  8039. var self=this;
  8040. (($receiver = smalltalk.send(anError, "_context", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_logErrorContext_", [smalltalk.send(anError, "_context", [])]);})() : nil;
  8041. smalltalk.send(self, "_logError_", [anError]);
  8042. return self;},
  8043. args: ["anError"],
  8044. source: unescape('handleError%3A%20anError%0A%09anError%20context%20ifNotNil%3A%20%5Bself%20logErrorContext%3A%20anError%20context%5D.%0A%09self%20logError%3A%20anError'),
  8045. messageSends: ["ifNotNil:", "context", "logErrorContext:", "logError:"],
  8046. referencedClasses: []
  8047. }),
  8048. smalltalk.ErrorHandler);
  8049. smalltalk.addMethod(
  8050. unescape('_logContext_'),
  8051. smalltalk.method({
  8052. selector: unescape('logContext%3A'),
  8053. category: 'private',
  8054. fn: function (aContext){
  8055. var self=this;
  8056. (($receiver = smalltalk.send(aContext, "_home", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_logContext_", [smalltalk.send(aContext, "_home", [])]);})() : nil;
  8057. smalltalk.send(self, "_log_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aContext, "_receiver", []), "_asString", []), "__comma", [unescape("%3E%3E")]), "__comma", [smalltalk.send(aContext, "_selector", [])])]);
  8058. return self;},
  8059. args: ["aContext"],
  8060. source: unescape('logContext%3A%20aContext%0A%09aContext%20home%20ifNotNil%3A%20%5B%0A%09%09self%20logContext%3A%20aContext%20home%5D.%0A%09self%20log%3A%20aContext%20receiver%20asString%2C%20%27%3E%3E%27%2C%20aContext%20selector'),
  8061. messageSends: ["ifNotNil:", "home", "logContext:", "log:", unescape("%2C"), "asString", "receiver", "selector"],
  8062. referencedClasses: []
  8063. }),
  8064. smalltalk.ErrorHandler);
  8065. smalltalk.addMethod(
  8066. unescape('_logErrorContext_'),
  8067. smalltalk.method({
  8068. selector: unescape('logErrorContext%3A'),
  8069. category: 'private',
  8070. fn: function (aContext){
  8071. var self=this;
  8072. (($receiver = aContext) != nil && $receiver != undefined) ? (function(){return (($receiver = smalltalk.send(aContext, "_home", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_logContext_", [smalltalk.send(aContext, "_home", [])]);})() : nil;})() : nil;
  8073. return self;},
  8074. args: ["aContext"],
  8075. source: unescape('logErrorContext%3A%20aContext%0A%09aContext%20ifNotNil%3A%20%5B%0A%09%09aContext%20home%20ifNotNil%3A%20%5B%0A%09%09%09self%20logContext%3A%20aContext%20home%5D%5D'),
  8076. messageSends: ["ifNotNil:", "home", "logContext:"],
  8077. referencedClasses: []
  8078. }),
  8079. smalltalk.ErrorHandler);
  8080. smalltalk.addMethod(
  8081. unescape('_logError_'),
  8082. smalltalk.method({
  8083. selector: unescape('logError%3A'),
  8084. category: 'private',
  8085. fn: function (anError){
  8086. var self=this;
  8087. smalltalk.send(self, "_log_", [smalltalk.send(anError, "_messageText", [])]);
  8088. return self;},
  8089. args: ["anError"],
  8090. source: unescape('logError%3A%20anError%0A%09self%20log%3A%20anError%20messageText'),
  8091. messageSends: ["log:", "messageText"],
  8092. referencedClasses: []
  8093. }),
  8094. smalltalk.ErrorHandler);
  8095. smalltalk.addMethod(
  8096. unescape('_log_'),
  8097. smalltalk.method({
  8098. selector: unescape('log%3A'),
  8099. category: 'private',
  8100. fn: function (aString){
  8101. var self=this;
  8102. smalltalk.send((typeof console == 'undefined' ? nil : console), "_log_", [aString]);
  8103. return self;},
  8104. args: ["aString"],
  8105. source: unescape('log%3A%20aString%0A%09console%20log%3A%20aString'),
  8106. messageSends: ["log:"],
  8107. referencedClasses: []
  8108. }),
  8109. smalltalk.ErrorHandler);
  8110. smalltalk.ErrorHandler.klass.iVarNames = ['current'];
  8111. smalltalk.addMethod(
  8112. unescape('_current'),
  8113. smalltalk.method({
  8114. selector: unescape('current'),
  8115. category: 'accessing',
  8116. fn: function (){
  8117. var self=this;
  8118. return (($receiver = self['@current']) == nil || $receiver == undefined) ? (function(){return self['@current']=smalltalk.send(self, "_new", []);})() : $receiver;
  8119. return self;},
  8120. args: [],
  8121. source: unescape('current%0A%09%5Ecurrent%20ifNil%3A%20%5Bcurrent%20%3A%3D%20self%20new%5D'),
  8122. messageSends: ["ifNil:", "new"],
  8123. referencedClasses: []
  8124. }),
  8125. smalltalk.ErrorHandler.klass);
  8126. smalltalk.addMethod(
  8127. unescape('_initialize'),
  8128. smalltalk.method({
  8129. selector: unescape('initialize'),
  8130. category: 'initialization',
  8131. fn: function (){
  8132. var self=this;
  8133. smalltalk.send(self, "_register", []);
  8134. return self;},
  8135. args: [],
  8136. source: unescape('initialize%0A%09self%20register'),
  8137. messageSends: ["register"],
  8138. referencedClasses: []
  8139. }),
  8140. smalltalk.ErrorHandler.klass);
  8141. smalltalk.addMethod(
  8142. unescape('_register'),
  8143. smalltalk.method({
  8144. selector: unescape('register'),
  8145. category: 'initialization',
  8146. fn: function (){
  8147. var self=this;
  8148. smalltalk.send((smalltalk.ErrorHandler || ErrorHandler), "_setCurrent_", [smalltalk.send(self, "_new", [])]);
  8149. return self;},
  8150. args: [],
  8151. source: unescape('register%0A%09ErrorHandler%20setCurrent%3A%20self%20new'),
  8152. messageSends: ["setCurrent:", "new"],
  8153. referencedClasses: ["ErrorHandler"]
  8154. }),
  8155. smalltalk.ErrorHandler.klass);
  8156. smalltalk.addMethod(
  8157. unescape('_setCurrent_'),
  8158. smalltalk.method({
  8159. selector: unescape('setCurrent%3A'),
  8160. category: 'accessing',
  8161. fn: function (anHandler){
  8162. var self=this;
  8163. self['@current']=anHandler;
  8164. return self;},
  8165. args: ["anHandler"],
  8166. source: unescape('setCurrent%3A%20anHandler%0A%09current%20%3A%3D%20anHandler'),
  8167. messageSends: [],
  8168. referencedClasses: []
  8169. }),
  8170. smalltalk.ErrorHandler.klass);
  8171. smalltalk.addClass('JSObjectProxy', smalltalk.Object, ['jsObject'], 'Kernel');
  8172. smalltalk.addMethod(
  8173. unescape('_jsObject_'),
  8174. smalltalk.method({
  8175. selector: unescape('jsObject%3A'),
  8176. category: 'accessing',
  8177. fn: function (aJSObject){
  8178. var self=this;
  8179. self['@jsObject']=aJSObject;
  8180. return self;},
  8181. args: ["aJSObject"],
  8182. source: unescape('jsObject%3A%20aJSObject%0A%09jsObject%20%3A%3D%20aJSObject'),
  8183. messageSends: [],
  8184. referencedClasses: []
  8185. }),
  8186. smalltalk.JSObjectProxy);
  8187. smalltalk.addMethod(
  8188. unescape('_jsObject'),
  8189. smalltalk.method({
  8190. selector: unescape('jsObject'),
  8191. category: 'accessing',
  8192. fn: function (){
  8193. var self=this;
  8194. return self['@jsObject'];
  8195. return self;},
  8196. args: [],
  8197. source: unescape('jsObject%0A%09%5EjsObject'),
  8198. messageSends: [],
  8199. referencedClasses: []
  8200. }),
  8201. smalltalk.JSObjectProxy);
  8202. smalltalk.addMethod(
  8203. unescape('_printString'),
  8204. smalltalk.method({
  8205. selector: unescape('printString'),
  8206. category: 'proxy',
  8207. fn: function (){
  8208. var self=this;
  8209. return smalltalk.send(smalltalk.send(self, "_jsObject", []), "_toString", []);
  8210. return self;},
  8211. args: [],
  8212. source: unescape('printString%0A%09%5Eself%20jsObject%20toString'),
  8213. messageSends: ["toString", "jsObject"],
  8214. referencedClasses: []
  8215. }),
  8216. smalltalk.JSObjectProxy);
  8217. smalltalk.addMethod(
  8218. unescape('_inspectOn_'),
  8219. smalltalk.method({
  8220. selector: unescape('inspectOn%3A'),
  8221. category: 'proxy',
  8222. fn: function (anInspector){
  8223. var self=this;
  8224. var variables=nil;
  8225. variables=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []);
  8226. smalltalk.send(variables, "_at_put_", [unescape("%23self"), smalltalk.send(self, "_jsObject", [])]);
  8227. smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
  8228. for(var i in self['@jsObject']) {
  8229. variables._at_put_(i, self['@jsObject'][i]);
  8230. };
  8231. smalltalk.send(anInspector, "_setVariables_", [variables]);
  8232. return self;},
  8233. args: ["anInspector"],
  8234. source: unescape('inspectOn%3A%20anInspector%0A%09%7C%20variables%20%7C%0A%09variables%20%3A%3D%20Dictionary%20new.%0A%09variables%20at%3A%20%27%23self%27%20put%3A%20self%20jsObject.%0A%09anInspector%20setLabel%3A%20self%20printString.%0A%09%3Cfor%28var%20i%20in%20self%5B%27@jsObject%27%5D%29%20%7B%0A%09%09variables._at_put_%28i%2C%20self%5B%27@jsObject%27%5D%5Bi%5D%29%3B%0A%09%7D%3E.%0A%09anInspector%20setVariables%3A%20variables'),
  8235. messageSends: ["new", "at:put:", "jsObject", "setLabel:", "printString", "setVariables:"],
  8236. referencedClasses: ["Dictionary"]
  8237. }),
  8238. smalltalk.JSObjectProxy);
  8239. smalltalk.addMethod(
  8240. unescape('_doesNotUnderstand_'),
  8241. smalltalk.method({
  8242. selector: unescape('doesNotUnderstand%3A'),
  8243. category: 'proxy',
  8244. fn: function (aMessage){
  8245. var self=this;
  8246. var obj=nil;
  8247. var selector=nil;
  8248. var jsSelector=nil;
  8249. var arguments=nil;
  8250. obj=smalltalk.send(self, "_jsObject", []);
  8251. selector=smalltalk.send(aMessage, "_selector", []);
  8252. jsSelector=smalltalk.send(selector, "_asJavaScriptSelector", []);
  8253. arguments=smalltalk.send(aMessage, "_arguments", []);
  8254. if(obj[jsSelector] != undefined) {return smalltalk.send(obj, jsSelector, arguments)};
  8255. smalltalk.send(self, "_doesNotUnderstand_", [aMessage], smalltalk.Object);
  8256. return self;},
  8257. args: ["aMessage"],
  8258. source: unescape('doesNotUnderstand%3A%20aMessage%0A%09%7C%20obj%20selector%20jsSelector%20arguments%20%7C%0A%09obj%20%3A%3D%20self%20jsObject.%0A%09selector%20%3A%3D%20aMessage%20selector.%0A%09jsSelector%20%3A%3D%20selector%20asJavaScriptSelector.%0A%09arguments%20%3A%3D%20aMessage%20arguments.%0A%09%3Cif%28obj%5BjsSelector%5D%20%21%3D%20undefined%29%20%7Breturn%20smalltalk.send%28obj%2C%20jsSelector%2C%20arguments%29%7D%3E.%0A%09super%20doesNotUnderstand%3A%20aMessage'),
  8259. messageSends: ["jsObject", "selector", "asJavaScriptSelector", "arguments", "doesNotUnderstand:"],
  8260. referencedClasses: []
  8261. }),
  8262. smalltalk.JSObjectProxy);
  8263. smalltalk.addMethod(
  8264. unescape('_at_'),
  8265. smalltalk.method({
  8266. selector: unescape('at%3A'),
  8267. category: 'accessing',
  8268. fn: function (aString){
  8269. var self=this;
  8270. return self['@jsObject'][aString];
  8271. return self;},
  8272. args: ["aString"],
  8273. source: unescape('at%3A%20aString%0A%09%3Creturn%20self%5B%27@jsObject%27%5D%5BaString%5D%3E'),
  8274. messageSends: [],
  8275. referencedClasses: []
  8276. }),
  8277. smalltalk.JSObjectProxy);
  8278. smalltalk.addMethod(
  8279. unescape('_at_put_'),
  8280. smalltalk.method({
  8281. selector: unescape('at%3Aput%3A'),
  8282. category: 'accessing',
  8283. fn: function (aString, anObject){
  8284. var self=this;
  8285. self['@jsObject'][aString] = anObject;
  8286. return self;},
  8287. args: ["aString", "anObject"],
  8288. source: unescape('at%3A%20aString%20put%3A%20anObject%0A%09%3Cself%5B%27@jsObject%27%5D%5BaString%5D%20%3D%20anObject%3E'),
  8289. messageSends: [],
  8290. referencedClasses: []
  8291. }),
  8292. smalltalk.JSObjectProxy);
  8293. smalltalk.addMethod(
  8294. unescape('_on_'),
  8295. smalltalk.method({
  8296. selector: unescape('on%3A'),
  8297. category: 'instance creation',
  8298. fn: function (aJSObject){
  8299. var self=this;
  8300. return (function($rec){smalltalk.send($rec, "_jsObject_", [aJSObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  8301. return self;},
  8302. args: ["aJSObject"],
  8303. source: unescape('on%3A%20aJSObject%0A%09%5Eself%20new%0A%09%09jsObject%3A%20aJSObject%3B%0A%09%09yourself'),
  8304. messageSends: ["jsObject:", "yourself", "new"],
  8305. referencedClasses: []
  8306. }),
  8307. smalltalk.JSObjectProxy.klass);
  8308. smalltalk.addClass('Set', smalltalk.Collection, ['elements'], 'Kernel');
  8309. smalltalk.addMethod(
  8310. unescape('_add_'),
  8311. smalltalk.method({
  8312. selector: unescape('add%3A'),
  8313. category: 'adding/removing',
  8314. fn: function (anObject){
  8315. var self=this;
  8316. var found;
  8317. for(var i in self['@elements']) {
  8318. if(anObject == self['@elements'][i]) {
  8319. found = true;
  8320. break;
  8321. }
  8322. }
  8323. if(!found) {self['@elements'].push(anObject)}
  8324. ;
  8325. return self;},
  8326. args: ["anObject"],
  8327. source: unescape('add%3A%20anObject%0A%09%3C%0A%09%09var%20found%3B%0A%09%09for%28var%20i%20in%20self%5B%27@elements%27%5D%29%20%7B%0A%09%09%09if%28anObject%20%3D%3D%20self%5B%27@elements%27%5D%5Bi%5D%29%20%7B%0A%09%09%09%09found%20%3D%20true%3B%0A%09%09%09%09break%3B%0A%09%09%09%7D%0A%09%09%7D%0A%09%09if%28%21found%29%20%7Bself%5B%27@elements%27%5D.push%28anObject%29%7D%0A%09%3E'),
  8328. messageSends: [],
  8329. referencedClasses: []
  8330. }),
  8331. smalltalk.Set);
  8332. smalltalk.addMethod(
  8333. unescape('_remove_'),
  8334. smalltalk.method({
  8335. selector: unescape('remove%3A'),
  8336. category: 'adding/removing',
  8337. fn: function (anObject){
  8338. var self=this;
  8339. smalltalk.send(self['@elements'], "_remove_", [anObject]);
  8340. return self;},
  8341. args: ["anObject"],
  8342. source: unescape('remove%3A%20anObject%0A%09elements%20remove%3A%20anObject'),
  8343. messageSends: ["remove:"],
  8344. referencedClasses: []
  8345. }),
  8346. smalltalk.Set);
  8347. smalltalk.addMethod(
  8348. unescape('_initialize'),
  8349. smalltalk.method({
  8350. selector: unescape('initialize'),
  8351. category: 'initialization',
  8352. fn: function (){
  8353. var self=this;
  8354. smalltalk.send(self, "_initialize", [], smalltalk.Collection);
  8355. self['@elements']=[];
  8356. return self;},
  8357. args: [],
  8358. source: unescape('initialize%0A%09super%20initialize.%0A%09elements%20%3A%3D%20%23%28%29'),
  8359. messageSends: ["initialize"],
  8360. referencedClasses: []
  8361. }),
  8362. smalltalk.Set);
  8363. smalltalk.addMethod(
  8364. unescape('_size'),
  8365. smalltalk.method({
  8366. selector: unescape('size'),
  8367. category: 'accessing',
  8368. fn: function (){
  8369. var self=this;
  8370. return smalltalk.send(self['@elements'], "_size", []);
  8371. return self;},
  8372. args: [],
  8373. source: unescape('size%0A%09%5Eelements%20size'),
  8374. messageSends: ["size"],
  8375. referencedClasses: []
  8376. }),
  8377. smalltalk.Set);
  8378. smalltalk.addMethod(
  8379. unescape('_asArray'),
  8380. smalltalk.method({
  8381. selector: unescape('asArray'),
  8382. category: 'converting',
  8383. fn: function (){
  8384. var self=this;
  8385. return smalltalk.send(self['@elements'], "_copy", []);
  8386. return self;},
  8387. args: [],
  8388. source: unescape('asArray%0A%09%5Eelements%20copy'),
  8389. messageSends: ["copy"],
  8390. referencedClasses: []
  8391. }),
  8392. smalltalk.Set);
  8393. smalltalk.addMethod(
  8394. unescape('_detect_ifNone_'),
  8395. smalltalk.method({
  8396. selector: unescape('detect%3AifNone%3A'),
  8397. category: 'enumerating',
  8398. fn: function (aBlock, anotherBlock){
  8399. var self=this;
  8400. return smalltalk.send(self['@elements'], "_detect_ifNone_", [aBlock, anotherBlock]);
  8401. return self;},
  8402. args: ["aBlock", "anotherBlock"],
  8403. source: unescape('detect%3A%20aBlock%20ifNone%3A%20anotherBlock%0A%09%5Eelements%20detect%3A%20aBlock%20ifNone%3A%20anotherBlock'),
  8404. messageSends: ["detect:ifNone:"],
  8405. referencedClasses: []
  8406. }),
  8407. smalltalk.Set);
  8408. smalltalk.addMethod(
  8409. unescape('_do_'),
  8410. smalltalk.method({
  8411. selector: unescape('do%3A'),
  8412. category: 'enumerating',
  8413. fn: function (aBlock){
  8414. var self=this;
  8415. smalltalk.send(self['@elements'], "_do_", [aBlock]);
  8416. return self;},
  8417. args: ["aBlock"],
  8418. source: unescape('do%3A%20aBlock%0A%09elements%20do%3A%20aBlock'),
  8419. messageSends: ["do:"],
  8420. referencedClasses: []
  8421. }),
  8422. smalltalk.Set);
  8423. smalltalk.addMethod(
  8424. unescape('_includes_'),
  8425. smalltalk.method({
  8426. selector: unescape('includes%3A'),
  8427. category: 'testing',
  8428. fn: function (anObject){
  8429. var self=this;
  8430. return smalltalk.send(self['@elements'], "_includes_", [anObject]);
  8431. return self;},
  8432. args: ["anObject"],
  8433. source: unescape('includes%3A%20anObject%0A%09%5Eelements%20includes%3A%20anObject'),
  8434. messageSends: ["includes:"],
  8435. referencedClasses: []
  8436. }),
  8437. smalltalk.Set);
  8438. smalltalk.addMethod(
  8439. unescape('__eq'),
  8440. smalltalk.method({
  8441. selector: unescape('%3D'),
  8442. category: 'comparing',
  8443. fn: function (aCollection){
  8444. var self=this;
  8445. return smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [smalltalk.send(aCollection, "_class", [])]), "_and_", [(function(){return smalltalk.send(self['@elements'], "__eq", [smalltalk.send(aCollection, "_asArray", [])]);})]);
  8446. return self;},
  8447. args: ["aCollection"],
  8448. source: unescape('%3D%20aCollection%0A%09%5Eself%20class%20%3D%20aCollection%20class%20and%3A%20%5B%0A%20%20%20%20%20%20%20%20%09elements%20%3D%20aCollection%20asArray%5D'),
  8449. messageSends: ["and:", unescape("%3D"), "class", "asArray"],
  8450. referencedClasses: []
  8451. }),
  8452. smalltalk.Set);
  8453. smalltalk.addClass('Transcript', smalltalk.Object, ['textarea'], 'Kernel');
  8454. smalltalk.Transcript.klass.iVarNames = ['current'];
  8455. smalltalk.addMethod(
  8456. unescape('_open'),
  8457. smalltalk.method({
  8458. selector: unescape('open'),
  8459. category: 'instance creation',
  8460. fn: function (){
  8461. var self=this;
  8462. smalltalk.send(smalltalk.send(self, "_current", []), "_open", []);
  8463. return self;},
  8464. args: [],
  8465. source: unescape('open%0A%20%20%20%20self%20current%20open'),
  8466. messageSends: ["open", "current"],
  8467. referencedClasses: []
  8468. }),
  8469. smalltalk.Transcript.klass);
  8470. smalltalk.addMethod(
  8471. unescape('_new'),
  8472. smalltalk.method({
  8473. selector: unescape('new'),
  8474. category: 'instance creation',
  8475. fn: function (){
  8476. var self=this;
  8477. smalltalk.send(self, "_shouldNotImplement", []);
  8478. return self;},
  8479. args: [],
  8480. source: unescape('new%0A%20%20%20%20self%20shouldNotImplement'),
  8481. messageSends: ["shouldNotImplement"],
  8482. referencedClasses: []
  8483. }),
  8484. smalltalk.Transcript.klass);
  8485. smalltalk.addMethod(
  8486. unescape('_current'),
  8487. smalltalk.method({
  8488. selector: unescape('current'),
  8489. category: 'instance creation',
  8490. fn: function (){
  8491. var self=this;
  8492. return self['@current'];
  8493. return self;},
  8494. args: [],
  8495. source: unescape('current%0A%20%20%20%20%5Ecurrent'),
  8496. messageSends: [],
  8497. referencedClasses: []
  8498. }),
  8499. smalltalk.Transcript.klass);
  8500. smalltalk.addMethod(
  8501. unescape('_show_'),
  8502. smalltalk.method({
  8503. selector: unescape('show%3A'),
  8504. category: 'printing',
  8505. fn: function (anObject){
  8506. var self=this;
  8507. smalltalk.send(smalltalk.send(self, "_current", []), "_show_", [anObject]);
  8508. return self;},
  8509. args: ["anObject"],
  8510. source: unescape('show%3A%20anObject%0A%20%20%20%20self%20current%20show%3A%20anObject'),
  8511. messageSends: ["show:", "current"],
  8512. referencedClasses: []
  8513. }),
  8514. smalltalk.Transcript.klass);
  8515. smalltalk.addMethod(
  8516. unescape('_cr'),
  8517. smalltalk.method({
  8518. selector: unescape('cr'),
  8519. category: 'printing',
  8520. fn: function (){
  8521. var self=this;
  8522. smalltalk.send(smalltalk.send(self, "_current", []), "_show_", [smalltalk.send((smalltalk.String || String), "_cr", [])]);
  8523. return self;},
  8524. args: [],
  8525. source: unescape('cr%0A%20%20%20%20self%20current%20show%3A%20String%20cr'),
  8526. messageSends: ["show:", "current", "cr"],
  8527. referencedClasses: ["String"]
  8528. }),
  8529. smalltalk.Transcript.klass);
  8530. smalltalk.addMethod(
  8531. unescape('_clear'),
  8532. smalltalk.method({
  8533. selector: unescape('clear'),
  8534. category: 'printing',
  8535. fn: function (){
  8536. var self=this;
  8537. smalltalk.send(smalltalk.send(self, "_current", []), "_clear", []);
  8538. return self;},
  8539. args: [],
  8540. source: unescape('clear%0A%20%20%20%20self%20current%20clear'),
  8541. messageSends: ["clear", "current"],
  8542. referencedClasses: []
  8543. }),
  8544. smalltalk.Transcript.klass);
  8545. smalltalk.addMethod(
  8546. unescape('_register_'),
  8547. smalltalk.method({
  8548. selector: unescape('register%3A'),
  8549. category: 'instance creation',
  8550. fn: function (aTranscript){
  8551. var self=this;
  8552. self['@current']=aTranscript;
  8553. return self;},
  8554. args: ["aTranscript"],
  8555. source: unescape('register%3A%20aTranscript%0A%09current%20%3A%3D%20aTranscript'),
  8556. messageSends: [],
  8557. referencedClasses: []
  8558. }),
  8559. smalltalk.Transcript.klass);
  8560. smalltalk.addClass('ConsoleTranscript', smalltalk.Object, ['textarea'], 'Kernel');
  8561. smalltalk.addMethod(
  8562. unescape('_clear'),
  8563. smalltalk.method({
  8564. selector: unescape('clear'),
  8565. category: 'printing',
  8566. fn: function (){
  8567. var self=this;
  8568. return self;},
  8569. args: [],
  8570. source: unescape('clear%0A%09%22no%20op%22'),
  8571. messageSends: [],
  8572. referencedClasses: []
  8573. }),
  8574. smalltalk.ConsoleTranscript);
  8575. smalltalk.addMethod(
  8576. unescape('_cr'),
  8577. smalltalk.method({
  8578. selector: unescape('cr'),
  8579. category: 'printing',
  8580. fn: function (){
  8581. var self=this;
  8582. return self;},
  8583. args: [],
  8584. source: unescape('cr%0A%09%22no%20op%22'),
  8585. messageSends: [],
  8586. referencedClasses: []
  8587. }),
  8588. smalltalk.ConsoleTranscript);
  8589. smalltalk.addMethod(
  8590. unescape('_show_'),
  8591. smalltalk.method({
  8592. selector: unescape('show%3A'),
  8593. category: 'printing',
  8594. fn: function (anObject){
  8595. var self=this;
  8596. var string=nil;
  8597. string=smalltalk.send(anObject, "_asString", []);
  8598. console.log(String(string));
  8599. return self;},
  8600. args: ["anObject"],
  8601. source: unescape('show%3A%20anObject%0A%09%7C%20string%20%7C%0A%09string%20%3A%3D%20anObject%20asString.%0A%09%3Cconsole.log%28String%28string%29%29%3E'),
  8602. messageSends: ["asString"],
  8603. referencedClasses: []
  8604. }),
  8605. smalltalk.ConsoleTranscript);
  8606. smalltalk.addMethod(
  8607. unescape('_open'),
  8608. smalltalk.method({
  8609. selector: unescape('open'),
  8610. category: 'actions',
  8611. fn: function (){
  8612. var self=this;
  8613. return self;},
  8614. args: [],
  8615. source: unescape('open'),
  8616. messageSends: [],
  8617. referencedClasses: []
  8618. }),
  8619. smalltalk.ConsoleTranscript);
  8620. smalltalk.addMethod(
  8621. unescape('_initialize'),
  8622. smalltalk.method({
  8623. selector: unescape('initialize'),
  8624. category: 'initialization',
  8625. fn: function (){
  8626. var self=this;
  8627. smalltalk.send((smalltalk.Transcript || Transcript), "_register_", [smalltalk.send(self, "_new", [])]);
  8628. return self;},
  8629. args: [],
  8630. source: unescape('initialize%0A%09Transcript%20register%3A%20self%20new'),
  8631. messageSends: ["register:", "new"],
  8632. referencedClasses: ["Transcript"]
  8633. }),
  8634. smalltalk.ConsoleTranscript.klass);