Kernel.js 206 KB

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