Kernel.js 239 KB

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