Kernel.js 234 KB

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