1
0

Kernel.js 215 KB

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