Kernel.js 206 KB

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