Kernel.js 243 KB

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