Kernel.deploy.js 195 KB

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