2
0

Kernel.js 235 KB

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