Kernel.js 284 KB

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