1
0

Kernel.js 217 KB

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