1
0

server.js 343 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233
  1. /* ====================================================================
  2. |
  3. | Jtalk Smalltalk
  4. | http://jtalk-project.org
  5. |
  6. ======================================================================
  7. ======================================================================
  8. |
  9. | Copyright (c) 2010-2011
  10. | Nicolas Petton <petton.nicolas@gmail.com>
  11. |
  12. | Jtalk is released under the MIT license
  13. |
  14. | Permission is hereby granted, free of charge, to any person obtaining
  15. | a copy of this software and associated documentation files (the
  16. | 'Software'), to deal in the Software without restriction, including
  17. | without limitation the rights to use, copy, modify, merge, publish,
  18. | distribute, sublicense, and/or sell copies of the Software, and to
  19. | permit persons to whom the Software is furnished to do so, subject to
  20. | the following conditions:
  21. |
  22. | The above copyright notice and this permission notice shall be
  23. | included in all copies or substantial portions of the Software.
  24. |
  25. | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
  26. | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  27. | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  28. | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  29. | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  30. | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  31. | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  32. |
  33. ==================================================================== */
  34. /* Smalltalk constructors definition */
  35. function SmalltalkObject(){};
  36. function SmalltalkBehavior(){};
  37. function SmalltalkClass(){};
  38. function SmalltalkModule(){};
  39. function SmalltalkMetaclass(){
  40. this.meta = true;
  41. };
  42. function SmalltalkMethod(){};
  43. function SmalltalkNil(){};
  44. function SmalltalkSymbol(string){
  45. this.value = string;
  46. };
  47. function Smalltalk(){
  48. var st = this;
  49. this.thisContext = undefined;
  50. /* We hold all Modules in a separate Object */
  51. st.modules = {};
  52. /* Smalltalk Module object. To add a Module, use smalltalk.addModule() */
  53. function mod(spec) {
  54. var that = new SmalltalkModule();
  55. that.moduleName = spec.moduleName;
  56. that.requires = spec.requires || [];
  57. that.fn = spec.fn || function(){};
  58. return that;
  59. };
  60. /* Smalltalk class creation. A class is an instance of an automatically
  61. created metaclass object. Newly created classes (not their metaclass)
  62. should be added to the smalltalk object, see smalltalk.addClass().
  63. Superclass linking is *not* handled here, see smalltalk.init() */
  64. function klass(spec) {
  65. var spec = spec || {};
  66. var that;
  67. if(spec.meta) {
  68. that = new SmalltalkMetaclass();
  69. } else {
  70. that = new (klass({meta: true})).fn;
  71. that.klass.instanceClass = that;
  72. that.className = spec.className;
  73. that.klass.className = that.className + ' class';
  74. }
  75. that.fn = spec.fn || function(){};
  76. that.superclass = spec.superclass;
  77. that.iVarNames = spec.iVarNames || [];
  78. if(that.superclass) {
  79. that.klass.superclass = that.superclass.klass;
  80. }
  81. that.module = spec.module;
  82. // For a while we keep the category attribute...
  83. if(!(spec.module === undefined)) {
  84. that.category = spec.module.moduleName;
  85. }
  86. that.fn.prototype.methods = {};
  87. that.fn.prototype.inheritedMethods = {};
  88. that.fn.prototype.klass = that;
  89. return that;
  90. };
  91. /* Smalltalk method object. To add a method to a class,
  92. use smalltalk.addMethod() */
  93. st.method = function(spec) {
  94. var that = new SmalltalkMethod();
  95. that.selector = spec.selector;
  96. that.jsSelector = spec.jsSelector;
  97. that.args = spec.args || {};
  98. that.category = spec.category;
  99. that.source = spec.source;
  100. that.messageSends = spec.messageSends || [];
  101. that.referencedClasses = spec.referencedClasses || [];
  102. that.fn = spec.fn;
  103. return that
  104. };
  105. /* Initialize a class in its class hierarchy. Handle both class and
  106. metaclasses. */
  107. st.init = function(klass) {
  108. var subclasses = st.subclasses(klass);
  109. var methods;
  110. if(klass.superclass && klass.superclass !== nil) {
  111. methods = st.methods(klass.superclass);
  112. //Methods linking
  113. for(var i in methods) {
  114. if(!klass.fn.prototype.methods[i]) {
  115. klass.fn.prototype.inheritedMethods[i] = methods[i];
  116. klass.fn.prototype[methods[i].jsSelector] = methods[i].fn;
  117. }
  118. }
  119. }
  120. for(var i=0;i<subclasses.length;i++) {
  121. st.init(subclasses[i]);
  122. }
  123. if(klass.klass && !klass.meta) {
  124. st.init(klass.klass);
  125. }
  126. };
  127. /* Answer all registered Modules */
  128. st.modules.all = function() {
  129. var modules = [];
  130. for(var i in st.modules) {
  131. modules.push(st.modules[i]);
  132. }
  133. return modules
  134. };
  135. /* Answer all registered Smalltalk classes */
  136. st.classes = function() {
  137. var classes = [];
  138. for(var i in st) {
  139. if(i.search(/^[A-Z]/g) != -1) {
  140. classes.push(st[i]);
  141. }
  142. }
  143. return classes
  144. };
  145. /* Answer all methods (included inherited ones) of klass. */
  146. st.methods = function(klass) {
  147. var methods = {};
  148. for(var i in klass.fn.prototype.methods) {
  149. methods[i] = klass.fn.prototype.methods[i]
  150. }
  151. for(var i in klass.fn.prototype.inheritedMethods) {
  152. methods[i] = klass.fn.prototype.inheritedMethods[i]
  153. }
  154. return methods;
  155. }
  156. /* Answer the direct subclasses of klass. */
  157. st.subclasses = function(klass) {
  158. var subclasses = [];
  159. var classes = st.classes();
  160. for(var i in classes) {
  161. if(classes[i].fn) {
  162. //Metaclasses
  163. if(classes[i].klass && classes[i].klass.superclass === klass) {
  164. subclasses.push(classes[i].klass);
  165. }
  166. //Classes
  167. if(classes[i].superclass === klass) {
  168. subclasses.push(classes[i]);
  169. }
  170. }
  171. }
  172. return subclasses;
  173. };
  174. /* Create a new class wrapping a JavaScript constructor, and add it to the
  175. global smalltalk object. Module is lazily created if it does not exist with given name. */
  176. st.mapClassName = function(className, moduleName, fn, superclass) {
  177. modul = st.addModule(moduleName);
  178. st[className] = klass({
  179. className: className,
  180. module: modul,
  181. superclass: superclass,
  182. fn: fn
  183. });
  184. };
  185. /* Add a module to the smalltalk.modules object, creating a new one if needed.
  186. If moduleName is nil or empty we return nil, which is an allowed module for a class. */
  187. st.addModule = function(moduleName) {
  188. if(!moduleName) {return nil;}
  189. if(!(st.modules[moduleName])) {
  190. st.modules[moduleName] = mod({
  191. moduleName: moduleName
  192. });
  193. }
  194. return st.modules[moduleName];
  195. };
  196. /* Add a class to the smalltalk object, creating a new one if needed.
  197. Module is lazily created if it does not exist with given name.*/
  198. st.addClass = function(className, superclass, iVarNames, moduleName) {
  199. modul = st.addModule(moduleName);
  200. if(st[className]) {
  201. st[className].superclass = superclass;
  202. st[className].iVarNames = iVarNames;
  203. st[className].module = modul || st[className].module;
  204. } else {
  205. st[className] = klass({
  206. className: className,
  207. iVarNames: iVarNames,
  208. superclass: superclass,
  209. module: modul
  210. });
  211. }
  212. };
  213. /* Add a method to a class */
  214. st.addMethod = function(jsSelector, method, klass) {
  215. klass.fn.prototype[jsSelector] = method.fn;
  216. klass.fn.prototype.methods[method.selector] = method;
  217. method.methodClass = klass;
  218. method.jsSelector = jsSelector;
  219. };
  220. /* Handles Smalltalk message send. Automatically converts undefined to the nil object.
  221. If the receiver does not understand the selector, call its #doesNotUnderstand: method */
  222. sendWithoutContext = function(receiver, selector, args, klass) {
  223. if(receiver === undefined || receiver === null) {
  224. receiver = nil;
  225. }
  226. if(!klass && receiver.klass && receiver[selector]) {
  227. return receiver[selector].apply(receiver, args);
  228. } else if(klass && klass.fn.prototype[selector]) {
  229. return klass.fn.prototype[selector].apply(receiver, args)
  230. }
  231. return messageNotUnderstood(receiver, selector, args);
  232. };
  233. /* Handles unhandled errors during message sends */
  234. sendWithContext = function(receiver, selector, args, klass) {
  235. if(st.thisContext) {
  236. return withContextSend(receiver, selector, args, klass);
  237. } else {
  238. try {return withContextSend(receiver, selector, args, klass)}
  239. catch(error) {
  240. // Reset the context stack in any case
  241. st.thisContext = undefined;
  242. if(error.smalltalkError) {
  243. handleError(error);
  244. } else {
  245. throw(error);
  246. }
  247. }
  248. }
  249. };
  250. /* Same as sendWithoutContext but creates a methodContext. */
  251. withContextSend = function(receiver, selector, args, klass) {
  252. var call, context;
  253. if(receiver === undefined || receiver === null) {
  254. receiver = nil;
  255. }
  256. if(!klass && receiver.klass && receiver[selector]) {
  257. context = pushContext(receiver, selector, args);
  258. call = receiver[selector].apply(receiver, args);
  259. popContext(context);
  260. return call;
  261. } else if(klass && klass.fn.prototype[selector]) {
  262. context = pushContext(receiver, selector, args);
  263. call = klass.fn.prototype[selector].apply(receiver, args);
  264. popContext(context);
  265. return call;
  266. }
  267. return messageNotUnderstood(receiver, selector, args);
  268. };
  269. /* Handles Smalltalk errors. Triggers the registered ErrorHandler
  270. (See the Smalltalk class ErrorHandler and its subclasses */
  271. function handleError(error) {
  272. st.thisContext = undefined;
  273. smalltalk.ErrorHandler._current()._handleError_(error);
  274. }
  275. /* Handles #dnu: *and* JavaScript method calls.
  276. if the receiver has no klass, we consider it a JS object (outside of the
  277. Jtalk system). Else assume that the receiver understands #doesNotUnderstand: */
  278. function messageNotUnderstood(receiver, selector, args) {
  279. /* Handles JS method calls. */
  280. if(receiver.klass === undefined || receiver.allowJavaScriptCalls) {
  281. return callJavaScriptMethod(receiver, selector, args);
  282. }
  283. /* Handles not understood messages. Also see the Jtalk counter-part
  284. Object>>doesNotUnderstand: */
  285. return receiver._doesNotUnderstand_(
  286. st.Message._new()
  287. ._selector_(st.convertSelector(selector))
  288. ._arguments_(args)
  289. );
  290. };
  291. function callJavaScriptMethod(receiver, selector, args) {
  292. /* Call a method of a JS object, or answer a property if it exists.
  293. Else try wrapping a JSObjectProxy around the receiver.
  294. Converts keyword-based selectors by using the first
  295. keyword only, but keeping all message arguments.
  296. Example:
  297. "self do: aBlock with: anObject" -> "self.do(aBlock, anObject)" */
  298. var jsSelector = selector
  299. .replace(/^_/, '')
  300. .replace(/_.*/g, '');
  301. var jsProperty = receiver[jsSelector];
  302. if(typeof jsProperty === "function") {
  303. return jsProperty.apply(receiver, args);
  304. } else if(jsProperty !== undefined) {
  305. if(args[0]) {
  306. receiver[jsSelector] = args[0];
  307. return nil;
  308. } else {
  309. return jsProperty
  310. }
  311. }
  312. return st.send(st.JSObjectProxy._on_(receiver), selector, args);
  313. };
  314. /* Reuse old contexts stored in oldContexts */
  315. st.oldContexts = [];
  316. /* Handle thisContext pseudo variable */
  317. st.getThisContext = function() {
  318. if(st.thisContext) {
  319. return st.thisContext.copy();
  320. } else {
  321. return undefined;
  322. }
  323. }
  324. pushContext = function(receiver, selector, temps) {
  325. if(st.thisContext) {
  326. return st.thisContext = st.thisContext.newContext(receiver, selector, temps);
  327. } else {
  328. return st.thisContext = new SmalltalkMethodContext(receiver, selector, temps);
  329. }
  330. };
  331. popContext = function(context) {
  332. if(context) {
  333. context.removeYourself();
  334. }
  335. };
  336. /* Convert a string to a valid smalltalk selector.
  337. if you modify the following functions, also change String>>asSelector
  338. accordingly */
  339. st.convertSelector = function(selector) {
  340. if(selector.match(/__/)) {
  341. return convertBinarySelector(selector);
  342. } else {
  343. return convertKeywordSelector(selector);
  344. }
  345. };
  346. function convertKeywordSelector(selector) {
  347. return selector.replace(/^_/, '').replace(/_/g, ':');
  348. };
  349. function convertBinarySelector(selector) {
  350. return selector
  351. .replace(/^_/, '')
  352. .replace(/_plus/, '+')
  353. .replace(/_minus/, '-')
  354. .replace(/_star/, '*')
  355. .replace(/_slash/, '/')
  356. .replace(/_gt/, '>')
  357. .replace(/_lt/, '<')
  358. .replace(/_eq/, '=')
  359. .replace(/_comma/, ',')
  360. .replace(/_at/, '@')
  361. };
  362. /* Converts a JavaScript object to valid Smalltalk Object */
  363. st.readJSObject = function(js) {
  364. var object = js;
  365. var readObject = (js.constructor === Object);
  366. var readArray = (js.constructor === Array);
  367. if(readObject) {
  368. object = smalltalk.Dictionary._new();
  369. }
  370. for(var i in js) {
  371. if(readObject) {
  372. object._at_put_(i, st.readJSObject(js[i]));
  373. }
  374. if(readArray) {
  375. object[i] = st.readJSObject(js[i]);
  376. }
  377. }
  378. return object;
  379. };
  380. /* Toggle deployment mode (no context will be handled during message send */
  381. st.setDeploymentMode = function() {
  382. st.send = sendWithoutContext;
  383. };
  384. st.setDevelopmentMode = function() {
  385. st.send = sendWithContext;
  386. }
  387. /* Set development mode by default */
  388. st.setDevelopmentMode();
  389. }
  390. function SmalltalkMethodContext(receiver, selector, temps, home) {
  391. var that = this;
  392. that.receiver = receiver;
  393. that.selector = selector;
  394. that.temps = temps || {};
  395. that.homeContext = home;
  396. that.copy = function() {
  397. var home = that.homeContext;
  398. if(home) {home = home.copy()}
  399. return new SmalltalkMethodContext(
  400. that.receiver,
  401. that.selector,
  402. that.temps,
  403. home
  404. );
  405. }
  406. that.newContext = function(receiver, selector, temps) {
  407. var c = smalltalk.oldContexts.pop();
  408. if(c) {
  409. c.homeContext = that;
  410. c.receiver = receiver;
  411. c.selector = selector;
  412. c.temps = temps || {};
  413. } else {
  414. c = new SmalltalkMethodContext(receiver, selector, temps, that);
  415. }
  416. return c;
  417. }
  418. that.removeYourself = function() {
  419. smalltalk.thisContext = that.homeContext;
  420. that.homeContext = undefined;
  421. smalltalk.oldContexts.push(that);
  422. }
  423. }
  424. /* Global Smalltalk objects. */
  425. var nil = new SmalltalkNil();
  426. var smalltalk = new Smalltalk();
  427. if(this.jQuery) {
  428. this.jQuery.allowJavaScriptCalls = true;
  429. }
  430. /****************************************************************************************/
  431. /* Base classes mapping. If you edit this part, do not forget to set the superclass of the
  432. object metaclass to Class after the definition of Object */
  433. smalltalk.mapClassName("Object", "Kernel", SmalltalkObject);
  434. smalltalk.mapClassName("Smalltalk", "Kernel", Smalltalk, smalltalk.Object);
  435. smalltalk.mapClassName("Module", "Kernel", SmalltalkModule, smalltalk.Object);
  436. smalltalk.mapClassName("Behavior", "Kernel", SmalltalkBehavior, smalltalk.Object);
  437. smalltalk.mapClassName("Class", "Kernel", SmalltalkClass, smalltalk.Behavior);
  438. smalltalk.mapClassName("Metaclass", "Kernel", SmalltalkMetaclass, smalltalk.Behavior);
  439. smalltalk.mapClassName("CompiledMethod", "Kernel", SmalltalkMethod, smalltalk.Object);
  440. smalltalk.Object.klass.superclass = smalltalk.Class;
  441. smalltalk.mapClassName("Number", "Kernel", Number, smalltalk.Object);
  442. smalltalk.mapClassName("BlockClosure", "Kernel", Function, smalltalk.Object);
  443. smalltalk.mapClassName("Boolean", "Kernel", Boolean, smalltalk.Object);
  444. smalltalk.mapClassName("Date", "Kernel", Date, smalltalk.Object);
  445. smalltalk.mapClassName("UndefinedObject", "Kernel", SmalltalkNil, smalltalk.Object);
  446. smalltalk.mapClassName("Collection", "Kernel", null, smalltalk.Object);
  447. smalltalk.mapClassName("SequenceableCollection", "Kernel", null, smalltalk.Collection);
  448. smalltalk.mapClassName("String", "Kernel", String, smalltalk.SequenceableCollection);
  449. smalltalk.mapClassName("Array", "Kernel", Array, smalltalk.SequenceableCollection);
  450. smalltalk.mapClassName("RegularExpression", "Kernel", RegExp, smalltalk.String);
  451. smalltalk.mapClassName("Error", "Kernel", Error, smalltalk.Object);
  452. smalltalk.mapClassName("MethodContext", "Kernel", SmalltalkMethodContext, smalltalk.Object);
  453. smalltalk.addClass('Object', smalltalk.nil, [], 'Kernel');
  454. smalltalk.addMethod(
  455. '__eq',
  456. smalltalk.method({
  457. selector: '=',
  458. category: 'comparing',
  459. fn: function (anObject){
  460. var self=this;
  461. return smalltalk.send(self, "__eq_eq", [anObject]);
  462. return self;},
  463. args: ["anObject"],
  464. source: unescape('%3D%20anObject%0A%09%5Eself%20%3D%3D%20anObject'),
  465. messageSends: [unescape("%3D%3D")],
  466. referencedClasses: []
  467. }),
  468. smalltalk.Object);
  469. smalltalk.addMethod(
  470. '_~_eq',
  471. smalltalk.method({
  472. selector: '~=',
  473. category: 'comparing',
  474. fn: function (anObject){
  475. var self=this;
  476. return smalltalk.send(smalltalk.send(self, "__eq", [anObject]), "__eq", [false]);
  477. return self;},
  478. args: ["anObject"],
  479. source: unescape('%7E%3D%20anObject%0A%09%5E%28self%20%3D%20anObject%29%20%3D%20false'),
  480. messageSends: [unescape("%3D")],
  481. referencedClasses: []
  482. }),
  483. smalltalk.Object);
  484. smalltalk.addMethod(
  485. '_initialize',
  486. smalltalk.method({
  487. selector: 'initialize',
  488. category: 'initialization',
  489. fn: function (){
  490. var self=this;
  491. return self;},
  492. args: [],
  493. source: unescape('initialize'),
  494. messageSends: [],
  495. referencedClasses: []
  496. }),
  497. smalltalk.Object);
  498. smalltalk.addMethod(
  499. '_yourself',
  500. smalltalk.method({
  501. selector: 'yourself',
  502. category: 'accessing',
  503. fn: function (){
  504. var self=this;
  505. return self;
  506. return self;},
  507. args: [],
  508. source: unescape('yourself%0A%09%5Eself'),
  509. messageSends: [],
  510. referencedClasses: []
  511. }),
  512. smalltalk.Object);
  513. smalltalk.addMethod(
  514. '_class',
  515. smalltalk.method({
  516. selector: 'class',
  517. category: 'accessing',
  518. fn: function (){
  519. var self=this;
  520. return self.klass;
  521. return self;},
  522. args: [],
  523. source: unescape('class%0A%09%3Creturn%20self.klass%3E'),
  524. messageSends: [],
  525. referencedClasses: []
  526. }),
  527. smalltalk.Object);
  528. smalltalk.addMethod(
  529. '_size',
  530. smalltalk.method({
  531. selector: 'size',
  532. category: 'accessing',
  533. fn: function (){
  534. var self=this;
  535. smalltalk.send(self, "_error_", ["Object not indexable"]);
  536. return self;},
  537. args: [],
  538. source: unescape('size%0A%09self%20error%3A%20%27Object%20not%20indexable%27'),
  539. messageSends: ["error:"],
  540. referencedClasses: []
  541. }),
  542. smalltalk.Object);
  543. smalltalk.addMethod(
  544. '_copy',
  545. smalltalk.method({
  546. selector: 'copy',
  547. category: 'copying',
  548. fn: function (){
  549. var self=this;
  550. return smalltalk.send(smalltalk.send(self, "_shallowCopy", []), "_postCopy", []);
  551. return self;},
  552. args: [],
  553. source: unescape('copy%0A%09%5Eself%20shallowCopy%20postCopy'),
  554. messageSends: ["postCopy", "shallowCopy"],
  555. referencedClasses: []
  556. }),
  557. smalltalk.Object);
  558. smalltalk.addMethod(
  559. '_shallowCopy',
  560. smalltalk.method({
  561. selector: 'shallowCopy',
  562. category: 'copying',
  563. fn: function (){
  564. var self=this;
  565. var copy = self.klass._new();
  566. for(var i in self) {
  567. if(/^@.+/.test(i)) {
  568. copy[i] = self[i];
  569. }
  570. }
  571. return copy;
  572. ;
  573. return self;},
  574. args: [],
  575. 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'),
  576. messageSends: [],
  577. referencedClasses: []
  578. }),
  579. smalltalk.Object);
  580. smalltalk.addMethod(
  581. '_deepCopy',
  582. smalltalk.method({
  583. selector: 'deepCopy',
  584. category: 'copying',
  585. fn: function (){
  586. var self=this;
  587. var copy = self.klass._new();
  588. for(var i in self) {
  589. if(/^@.+/.test(i)) {
  590. copy[i] = self[i]._deepCopy();
  591. }
  592. }
  593. return copy;
  594. ;
  595. return self;},
  596. args: [],
  597. 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'),
  598. messageSends: [],
  599. referencedClasses: []
  600. }),
  601. smalltalk.Object);
  602. smalltalk.addMethod(
  603. '_postCopy',
  604. smalltalk.method({
  605. selector: 'postCopy',
  606. category: 'copying',
  607. fn: function (){
  608. var self=this;
  609. return self;},
  610. args: [],
  611. source: unescape('postCopy'),
  612. messageSends: [],
  613. referencedClasses: []
  614. }),
  615. smalltalk.Object);
  616. smalltalk.addMethod(
  617. '__minus_gt',
  618. smalltalk.method({
  619. selector: '->',
  620. category: 'converting',
  621. fn: function (anObject){
  622. var self=this;
  623. return smalltalk.send((smalltalk.Association || Association), "_key_value_", [self, anObject]);
  624. return self;},
  625. args: ["anObject"],
  626. source: unescape('-%3E%20anObject%0A%09%5EAssociation%20key%3A%20self%20value%3A%20anObject'),
  627. messageSends: ["key:value:"],
  628. referencedClasses: [smalltalk.nil]
  629. }),
  630. smalltalk.Object);
  631. smalltalk.addMethod(
  632. '_asString',
  633. smalltalk.method({
  634. selector: 'asString',
  635. category: 'converting',
  636. fn: function (){
  637. var self=this;
  638. return smalltalk.send(self, "_printString", []);
  639. return self;},
  640. args: [],
  641. source: unescape('asString%0A%09%5Eself%20printString'),
  642. messageSends: ["printString"],
  643. referencedClasses: []
  644. }),
  645. smalltalk.Object);
  646. smalltalk.addMethod(
  647. '_asJavascript',
  648. smalltalk.method({
  649. selector: 'asJavascript',
  650. category: 'converting',
  651. fn: function (){
  652. var self=this;
  653. return smalltalk.send(self, "_asString", []);
  654. return self;},
  655. args: [],
  656. source: unescape('asJavascript%0A%09%5Eself%20asString'),
  657. messageSends: ["asString"],
  658. referencedClasses: []
  659. }),
  660. smalltalk.Object);
  661. smalltalk.addMethod(
  662. '_perform_',
  663. smalltalk.method({
  664. selector: 'perform:',
  665. category: 'message handling',
  666. fn: function (aSymbol){
  667. var self=this;
  668. return smalltalk.send(self, "_perform_withArguments_", [aSymbol, []]);
  669. return self;},
  670. args: ["aSymbol"],
  671. source: unescape('perform%3A%20aSymbol%0A%09%5Eself%20perform%3A%20aSymbol%20withArguments%3A%20%23%28%29'),
  672. messageSends: ["perform:withArguments:"],
  673. referencedClasses: []
  674. }),
  675. smalltalk.Object);
  676. smalltalk.addMethod(
  677. '_perform_withArguments_',
  678. smalltalk.method({
  679. selector: 'perform:withArguments:',
  680. category: 'message handling',
  681. fn: function (aSymbol, aCollection){
  682. var self=this;
  683. return smalltalk.send(self, "_basicPerform_withArguments_", [smalltalk.send(aSymbol, "_asSelector", []), aCollection]);
  684. return self;},
  685. args: ["aSymbol", "aCollection"],
  686. source: unescape('perform%3A%20aSymbol%20withArguments%3A%20aCollection%0A%09%5Eself%20basicPerform%3A%20aSymbol%20asSelector%20withArguments%3A%20aCollection'),
  687. messageSends: ["basicPerform:withArguments:", "asSelector"],
  688. referencedClasses: []
  689. }),
  690. smalltalk.Object);
  691. smalltalk.addMethod(
  692. '_instVarAt_',
  693. smalltalk.method({
  694. selector: 'instVarAt:',
  695. category: 'accessing',
  696. fn: function (aString){
  697. var self=this;
  698. return self['@'+aString];
  699. return self;},
  700. args: ["aString"],
  701. source: unescape('instVarAt%3A%20aString%0A%09%3Creturn%20self%5B%27@%27+aString%5D%3E'),
  702. messageSends: [],
  703. referencedClasses: []
  704. }),
  705. smalltalk.Object);
  706. smalltalk.addMethod(
  707. '_instVarAt_put_',
  708. smalltalk.method({
  709. selector: 'instVarAt:put:',
  710. category: 'accessing',
  711. fn: function (aString, anObject){
  712. var self=this;
  713. self['@' + aString] = anObject;
  714. return self;},
  715. args: ["aString", "anObject"],
  716. source: unescape('instVarAt%3A%20aString%20put%3A%20anObject%0A%09%3Cself%5B%27@%27%20+%20aString%5D%20%3D%20anObject%3E'),
  717. messageSends: [],
  718. referencedClasses: []
  719. }),
  720. smalltalk.Object);
  721. smalltalk.addMethod(
  722. '_basicAt_',
  723. smalltalk.method({
  724. selector: 'basicAt:',
  725. category: 'accessing',
  726. fn: function (aString){
  727. var self=this;
  728. return self[aString];
  729. return self;},
  730. args: ["aString"],
  731. source: unescape('basicAt%3A%20aString%0A%09%3Creturn%20self%5BaString%5D%3E'),
  732. messageSends: [],
  733. referencedClasses: []
  734. }),
  735. smalltalk.Object);
  736. smalltalk.addMethod(
  737. '_basicAt_put_',
  738. smalltalk.method({
  739. selector: 'basicAt:put:',
  740. category: 'accessing',
  741. fn: function (aString, anObject){
  742. var self=this;
  743. return self[aString] = anObject;
  744. return self;},
  745. args: ["aString", "anObject"],
  746. source: unescape('basicAt%3A%20aString%20put%3A%20anObject%0A%09%3Creturn%20self%5BaString%5D%20%3D%20anObject%3E'),
  747. messageSends: [],
  748. referencedClasses: []
  749. }),
  750. smalltalk.Object);
  751. smalltalk.addMethod(
  752. '_error_',
  753. smalltalk.method({
  754. selector: 'error:',
  755. category: 'error handling',
  756. fn: function (aString){
  757. var self=this;
  758. smalltalk.send((smalltalk.Error || Error), "_signal_", [aString]);
  759. return self;},
  760. args: ["aString"],
  761. source: unescape('error%3A%20aString%0A%09Error%20signal%3A%20aString'),
  762. messageSends: ["signal:"],
  763. referencedClasses: [smalltalk.Error]
  764. }),
  765. smalltalk.Object);
  766. smalltalk.addMethod(
  767. '_subclassResponsibility',
  768. smalltalk.method({
  769. selector: 'subclassResponsibility',
  770. category: 'error handling',
  771. fn: function (){
  772. var self=this;
  773. smalltalk.send(self, "_error_", ["This method is a responsibility of a subclass"]);
  774. return self;},
  775. args: [],
  776. source: unescape('subclassResponsibility%0A%09self%20error%3A%20%27This%20method%20is%20a%20responsibility%20of%20a%20subclass%27'),
  777. messageSends: ["error:"],
  778. referencedClasses: []
  779. }),
  780. smalltalk.Object);
  781. smalltalk.addMethod(
  782. '_shouldNotImplement',
  783. smalltalk.method({
  784. selector: 'shouldNotImplement',
  785. category: 'error handling',
  786. fn: function (){
  787. var self=this;
  788. smalltalk.send(self, "_error_", [smalltalk.send("This method should not be implemented in ", "__comma", [smalltalk.send(smalltalk.send(self, "_class", []), "_name", [])])]);
  789. return self;},
  790. args: [],
  791. source: unescape('shouldNotImplement%0A%09self%20error%3A%20%27This%20method%20should%20not%20be%20implemented%20in%20%27%2C%20self%20class%20name'),
  792. messageSends: ["error:", unescape("%2C"), "name", "class"],
  793. referencedClasses: []
  794. }),
  795. smalltalk.Object);
  796. smalltalk.addMethod(
  797. '_try_catch_',
  798. smalltalk.method({
  799. selector: 'try:catch:',
  800. category: 'error handling',
  801. fn: function (aBlock, anotherBlock){
  802. var self=this;
  803. try{aBlock()} catch(e) {anotherBlock(e)};
  804. return self;},
  805. args: ["aBlock", "anotherBlock"],
  806. source: unescape('try%3A%20aBlock%20catch%3A%20anotherBlock%0A%09%3Ctry%7BaBlock%28%29%7D%20catch%28e%29%20%7BanotherBlock%28e%29%7D%3E'),
  807. messageSends: [],
  808. referencedClasses: []
  809. }),
  810. smalltalk.Object);
  811. smalltalk.addMethod(
  812. '_printString',
  813. smalltalk.method({
  814. selector: 'printString',
  815. category: 'printing',
  816. fn: function (){
  817. var self=this;
  818. return smalltalk.send("a ", "__comma", [smalltalk.send(smalltalk.send(self, "_class", []), "_name", [])]);
  819. return self;},
  820. args: [],
  821. source: unescape('printString%0A%09%5E%27a%20%27%2C%20self%20class%20name'),
  822. messageSends: [unescape("%2C"), "name", "class"],
  823. referencedClasses: []
  824. }),
  825. smalltalk.Object);
  826. smalltalk.addMethod(
  827. '_printNl',
  828. smalltalk.method({
  829. selector: 'printNl',
  830. category: 'printing',
  831. fn: function (){
  832. var self=this;
  833. console.log(self);
  834. return self;},
  835. args: [],
  836. source: unescape('printNl%0A%09%3Cconsole.log%28self%29%3E'),
  837. messageSends: [],
  838. referencedClasses: []
  839. }),
  840. smalltalk.Object);
  841. smalltalk.addMethod(
  842. '_isKindOf_',
  843. smalltalk.method({
  844. selector: 'isKindOf:',
  845. category: 'testing',
  846. fn: function (aClass){
  847. var self=this;
  848. return (($receiver = smalltalk.send(self, "_isMemberOf_", [aClass])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return true;})() : (function(){return smalltalk.send(smalltalk.send(self, "_class", []), "_inheritsFrom_", [aClass]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return true;}), (function(){return smalltalk.send(smalltalk.send(self, "_class", []), "_inheritsFrom_", [aClass]);})]);
  849. return self;},
  850. args: ["aClass"],
  851. 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'),
  852. messageSends: ["ifTrue:ifFalse:", "isMemberOf:", "inheritsFrom:", "class"],
  853. referencedClasses: []
  854. }),
  855. smalltalk.Object);
  856. smalltalk.addMethod(
  857. '_isMemberOf_',
  858. smalltalk.method({
  859. selector: 'isMemberOf:',
  860. category: 'testing',
  861. fn: function (aClass){
  862. var self=this;
  863. return smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [aClass]);
  864. return self;},
  865. args: ["aClass"],
  866. source: unescape('isMemberOf%3A%20aClass%0A%09%5Eself%20class%20%3D%20aClass'),
  867. messageSends: [unescape("%3D"), "class"],
  868. referencedClasses: []
  869. }),
  870. smalltalk.Object);
  871. smalltalk.addMethod(
  872. '_ifNil_',
  873. smalltalk.method({
  874. selector: 'ifNil:',
  875. category: 'testing',
  876. fn: function (aBlock){
  877. var self=this;
  878. return self;
  879. return self;},
  880. args: ["aBlock"],
  881. source: unescape('ifNil%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself'),
  882. messageSends: [],
  883. referencedClasses: []
  884. }),
  885. smalltalk.Object);
  886. smalltalk.addMethod(
  887. '_ifNil_ifNotNil_',
  888. smalltalk.method({
  889. selector: 'ifNil:ifNotNil:',
  890. category: 'testing',
  891. fn: function (aBlock, anotherBlock){
  892. var self=this;
  893. return smalltalk.send(anotherBlock, "_value", []);
  894. return self;},
  895. args: ["aBlock", "anotherBlock"],
  896. source: unescape('ifNil%3A%20aBlock%20ifNotNil%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EanotherBlock%20value'),
  897. messageSends: ["value"],
  898. referencedClasses: []
  899. }),
  900. smalltalk.Object);
  901. smalltalk.addMethod(
  902. '_ifNotNil_',
  903. smalltalk.method({
  904. selector: 'ifNotNil:',
  905. category: 'testing',
  906. fn: function (aBlock){
  907. var self=this;
  908. return smalltalk.send(aBlock, "_value", []);
  909. return self;},
  910. args: ["aBlock"],
  911. source: unescape('ifNotNil%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EaBlock%20value'),
  912. messageSends: ["value"],
  913. referencedClasses: []
  914. }),
  915. smalltalk.Object);
  916. smalltalk.addMethod(
  917. '_ifNotNil_ifNil_',
  918. smalltalk.method({
  919. selector: 'ifNotNil:ifNil:',
  920. category: 'testing',
  921. fn: function (aBlock, anotherBlock){
  922. var self=this;
  923. return smalltalk.send(aBlock, "_value", []);
  924. return self;},
  925. args: ["aBlock", "anotherBlock"],
  926. source: unescape('ifNotNil%3A%20aBlock%20ifNil%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EaBlock%20value'),
  927. messageSends: ["value"],
  928. referencedClasses: []
  929. }),
  930. smalltalk.Object);
  931. smalltalk.addMethod(
  932. '_isNil',
  933. smalltalk.method({
  934. selector: 'isNil',
  935. category: 'testing',
  936. fn: function (){
  937. var self=this;
  938. return false;
  939. return self;},
  940. args: [],
  941. source: unescape('isNil%0A%09%5Efalse'),
  942. messageSends: [],
  943. referencedClasses: []
  944. }),
  945. smalltalk.Object);
  946. smalltalk.addMethod(
  947. '_notNil',
  948. smalltalk.method({
  949. selector: 'notNil',
  950. category: 'testing',
  951. fn: function (){
  952. var self=this;
  953. return smalltalk.send(smalltalk.send(self, "_isNil", []), "_not", []);
  954. return self;},
  955. args: [],
  956. source: unescape('notNil%0A%09%5Eself%20isNil%20not'),
  957. messageSends: ["not", "isNil"],
  958. referencedClasses: []
  959. }),
  960. smalltalk.Object);
  961. smalltalk.addMethod(
  962. '_isClass',
  963. smalltalk.method({
  964. selector: 'isClass',
  965. category: 'testing',
  966. fn: function (){
  967. var self=this;
  968. return false;
  969. return self;},
  970. args: [],
  971. source: unescape('isClass%0A%09%5Efalse'),
  972. messageSends: [],
  973. referencedClasses: []
  974. }),
  975. smalltalk.Object);
  976. smalltalk.addMethod(
  977. '_isMetaclass',
  978. smalltalk.method({
  979. selector: 'isMetaclass',
  980. category: 'testing',
  981. fn: function (){
  982. var self=this;
  983. return false;
  984. return self;},
  985. args: [],
  986. source: unescape('isMetaclass%0A%09%5Efalse'),
  987. messageSends: [],
  988. referencedClasses: []
  989. }),
  990. smalltalk.Object);
  991. smalltalk.addMethod(
  992. '_isNumber',
  993. smalltalk.method({
  994. selector: 'isNumber',
  995. category: 'testing',
  996. fn: function (){
  997. var self=this;
  998. return false;
  999. return self;},
  1000. args: [],
  1001. source: unescape('isNumber%0A%09%5Efalse'),
  1002. messageSends: [],
  1003. referencedClasses: []
  1004. }),
  1005. smalltalk.Object);
  1006. smalltalk.addMethod(
  1007. '_isString',
  1008. smalltalk.method({
  1009. selector: 'isString',
  1010. category: 'testing',
  1011. fn: function (){
  1012. var self=this;
  1013. return false;
  1014. return self;},
  1015. args: [],
  1016. source: unescape('isString%0A%09%5Efalse'),
  1017. messageSends: [],
  1018. referencedClasses: []
  1019. }),
  1020. smalltalk.Object);
  1021. smalltalk.addMethod(
  1022. '_isParseFailure',
  1023. smalltalk.method({
  1024. selector: 'isParseFailure',
  1025. category: 'testing',
  1026. fn: function (){
  1027. var self=this;
  1028. return false;
  1029. return self;},
  1030. args: [],
  1031. source: unescape('isParseFailure%0A%09%5Efalse'),
  1032. messageSends: [],
  1033. referencedClasses: []
  1034. }),
  1035. smalltalk.Object);
  1036. smalltalk.addMethod(
  1037. '_basicPerform_',
  1038. smalltalk.method({
  1039. selector: 'basicPerform:',
  1040. category: 'message handling',
  1041. fn: function (aSymbol){
  1042. var self=this;
  1043. return smalltalk.send(self, "_basicPerform_withArguments_", [aSymbol, []]);
  1044. return self;},
  1045. args: ["aSymbol"],
  1046. source: unescape('basicPerform%3A%20aSymbol%20%0A%09%5Eself%20basicPerform%3A%20aSymbol%20withArguments%3A%20%23%28%29'),
  1047. messageSends: ["basicPerform:withArguments:"],
  1048. referencedClasses: []
  1049. }),
  1050. smalltalk.Object);
  1051. smalltalk.addMethod(
  1052. '_basicPerform_withArguments_',
  1053. smalltalk.method({
  1054. selector: 'basicPerform:withArguments:',
  1055. category: 'message handling',
  1056. fn: function (aSymbol, aCollection){
  1057. var self=this;
  1058. return self[aSymbol].apply(self, aCollection);;
  1059. return self;},
  1060. args: ["aSymbol", "aCollection"],
  1061. source: unescape('basicPerform%3A%20aSymbol%20withArguments%3A%20aCollection%0A%09%3Creturn%20self%5BaSymbol%5D.apply%28self%2C%20aCollection%29%3B%3E'),
  1062. messageSends: [],
  1063. referencedClasses: []
  1064. }),
  1065. smalltalk.Object);
  1066. smalltalk.addMethod(
  1067. '_basicDelete_',
  1068. smalltalk.method({
  1069. selector: 'basicDelete:',
  1070. category: 'accessing',
  1071. fn: function (aString){
  1072. var self=this;
  1073. delete self[aString];
  1074. return self;},
  1075. args: ["aString"],
  1076. source: unescape('basicDelete%3A%20aString%0A%20%20%20%20%3Cdelete%20self%5BaString%5D%3E'),
  1077. messageSends: [],
  1078. referencedClasses: []
  1079. }),
  1080. smalltalk.Object);
  1081. smalltalk.addMethod(
  1082. '_doesNotUnderstand_',
  1083. smalltalk.method({
  1084. selector: 'doesNotUnderstand:',
  1085. category: 'error handling',
  1086. fn: function (aMessage){
  1087. var self=this;
  1088. (function($rec){smalltalk.send($rec, "_receiver_", [self]);smalltalk.send($rec, "_message_", [aMessage]);return smalltalk.send($rec, "_signal", []);})(smalltalk.send((smalltalk.MessageNotUnderstood || MessageNotUnderstood), "_new", []));
  1089. return self;},
  1090. args: ["aMessage"],
  1091. source: unescape('doesNotUnderstand%3A%20aMessage%0A%09MessageNotUnderstood%20new%0A%09%09receiver%3A%20self%3B%0A%09%09message%3A%20aMessage%3B%0A%09%09signal'),
  1092. messageSends: ["receiver:", "message:", "signal", "new"],
  1093. referencedClasses: [smalltalk.nil]
  1094. }),
  1095. smalltalk.Object);
  1096. smalltalk.addMethod(
  1097. '_asJSON',
  1098. smalltalk.method({
  1099. selector: 'asJSON',
  1100. category: 'converting',
  1101. fn: function (){
  1102. var self=this;
  1103. return JSON.stringify(self._asJSONObject());
  1104. return self;},
  1105. args: [],
  1106. source: unescape('asJSON%0A%09%3Creturn%20JSON.stringify%28self._asJSONObject%28%29%29%3E'),
  1107. messageSends: [],
  1108. referencedClasses: []
  1109. }),
  1110. smalltalk.Object);
  1111. smalltalk.addMethod(
  1112. '_asJSONObject',
  1113. smalltalk.method({
  1114. selector: 'asJSONObject',
  1115. category: 'converting',
  1116. fn: function (){
  1117. var self=this;
  1118. var object=nil;
  1119. object=smalltalk.send((smalltalk.Object || Object), "_new", []);
  1120. 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", [])]);})]);
  1121. return object;
  1122. return self;},
  1123. args: [],
  1124. 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'),
  1125. messageSends: ["new", "do:", "instanceVariableNames", "class", "basicAt:put:", "asJSONObject", "instVarAt:"],
  1126. referencedClasses: [smalltalk.Object]
  1127. }),
  1128. smalltalk.Object);
  1129. smalltalk.addMethod(
  1130. '_halt',
  1131. smalltalk.method({
  1132. selector: 'halt',
  1133. category: 'error handling',
  1134. fn: function (){
  1135. var self=this;
  1136. smalltalk.send(self, "_error_", ["Halt encountered"]);
  1137. return self;},
  1138. args: [],
  1139. source: unescape('halt%0A%09self%20error%3A%20%27Halt%20encountered%27'),
  1140. messageSends: ["error:"],
  1141. referencedClasses: []
  1142. }),
  1143. smalltalk.Object);
  1144. smalltalk.addMethod(
  1145. '_log_block_',
  1146. smalltalk.method({
  1147. selector: 'log:block:',
  1148. category: 'printing',
  1149. fn: function (aString, aBlock){
  1150. var self=this;
  1151. var result=nil;
  1152. smalltalk.send((typeof console == 'undefined' ? nil : console), "_log_", [smalltalk.send(smalltalk.send(aString, "__comma", [" time: "]), "__comma", [smalltalk.send(smalltalk.send((smalltalk.Date || Date), "_millisecondsToRun_", [(function(){return result=smalltalk.send(aBlock, "_value", []);})]), "_printString", [])])]);
  1153. return result;
  1154. return self;},
  1155. args: ["aString", "aBlock"],
  1156. source: unescape('log%3A%20aString%20block%3A%20aBlock%0A%0A%09%7C%20result%20%7C%0A%09console%20log%3A%20%20aString%2C%20%20%27%20time%3A%20%27%2C%20%28Date%20millisecondsToRun%3A%20%5Bresult%20%3A%3D%20aBlock%20value%5D%29%20printString.%0A%09%5Eresult'),
  1157. messageSends: ["log:", unescape("%2C"), "printString", "millisecondsToRun:", "value"],
  1158. referencedClasses: [smalltalk.Date]
  1159. }),
  1160. smalltalk.Object);
  1161. smalltalk.addMethod(
  1162. '__eq_eq',
  1163. smalltalk.method({
  1164. selector: '==',
  1165. category: 'comparing',
  1166. fn: function (anObject){
  1167. var self=this;
  1168. return self === anObject;
  1169. return self;},
  1170. args: ["anObject"],
  1171. source: unescape('%3D%3D%20anObject%0A%09%3Creturn%20self%20%3D%3D%3D%20anObject%3E'),
  1172. messageSends: [],
  1173. referencedClasses: []
  1174. }),
  1175. smalltalk.Object);
  1176. smalltalk.addMethod(
  1177. '_~~',
  1178. smalltalk.method({
  1179. selector: '~~',
  1180. category: 'comparing',
  1181. fn: function (anObject){
  1182. var self=this;
  1183. return smalltalk.send(smalltalk.send(self, "__eq_eq", [anObject]), "__eq", [false]);
  1184. return self;},
  1185. args: ["anObject"],
  1186. source: unescape('%7E%7E%20anObject%0A%09%5E%28self%20%3D%3D%20anObject%29%20%3D%20false'),
  1187. messageSends: [unescape("%3D"), unescape("%3D%3D")],
  1188. referencedClasses: []
  1189. }),
  1190. smalltalk.Object);
  1191. smalltalk.addMethod(
  1192. '_initialize',
  1193. smalltalk.method({
  1194. selector: 'initialize',
  1195. category: 'initialization',
  1196. fn: function (){
  1197. var self=this;
  1198. return self;},
  1199. args: [],
  1200. source: unescape('initialize%0A%09%22no%20op%22'),
  1201. messageSends: [],
  1202. referencedClasses: []
  1203. }),
  1204. smalltalk.Object.klass);
  1205. smalltalk.addClass('Smalltalk', smalltalk.Object, [], 'Kernel');
  1206. smalltalk.addMethod(
  1207. '_classes',
  1208. smalltalk.method({
  1209. selector: 'classes',
  1210. category: 'accessing',
  1211. fn: function (){
  1212. var self=this;
  1213. return self.classes();
  1214. return self;},
  1215. args: [],
  1216. source: unescape('classes%0A%09%3Creturn%20self.classes%28%29%3E'),
  1217. messageSends: [],
  1218. referencedClasses: []
  1219. }),
  1220. smalltalk.Smalltalk);
  1221. smalltalk.addMethod(
  1222. '_readJSON_',
  1223. smalltalk.method({
  1224. selector: 'readJSON:',
  1225. category: 'accessing',
  1226. fn: function (anObject){
  1227. var self=this;
  1228. return self.readJSObject(anObject);
  1229. return self;},
  1230. args: ["anObject"],
  1231. source: unescape('readJSON%3A%20anObject%0A%09%3Creturn%20self.readJSObject%28anObject%29%3E'),
  1232. messageSends: [],
  1233. referencedClasses: []
  1234. }),
  1235. smalltalk.Smalltalk);
  1236. smalltalk.addMethod(
  1237. '_at_',
  1238. smalltalk.method({
  1239. selector: 'at:',
  1240. category: 'accessing',
  1241. fn: function (aString){
  1242. var self=this;
  1243. return self[aString];
  1244. return self;},
  1245. args: ["aString"],
  1246. source: unescape('at%3A%20aString%0A%09%3Creturn%20self%5BaString%5D%3E'),
  1247. messageSends: [],
  1248. referencedClasses: []
  1249. }),
  1250. smalltalk.Smalltalk);
  1251. smalltalk.addMethod(
  1252. '_removeClass_',
  1253. smalltalk.method({
  1254. selector: 'removeClass:',
  1255. category: 'accessing',
  1256. fn: function (aClass){
  1257. var self=this;
  1258. (($receiver = smalltalk.send(aClass, "_isMetaclass", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_error_", [smalltalk.send(smalltalk.send(aClass, "_asString", []), "__comma", [unescape("%20is%20a%20Metaclass%20and%20cannot%20be%20removed%21")])]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self, "_error_", [smalltalk.send(smalltalk.send(aClass, "_asString", []), "__comma", [unescape("%20is%20a%20Metaclass%20and%20cannot%20be%20removed%21")])]);})]);
  1259. smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_methodDictionary", []), "_values", []), "_do_", [(function(each){return smalltalk.send(aClass, "_removeCompiledMethod_", [each]);})]);
  1260. smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_methodDictionary", []), "_values", []), "_do_", [(function(each){return smalltalk.send(smalltalk.send(aClass, "_class", []), "_removeCompiledMethod_", [each]);})]);
  1261. smalltalk.send(self, "_basicDelete_", [smalltalk.send(aClass, "_name", [])]);
  1262. return self;},
  1263. args: ["aClass"],
  1264. 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'),
  1265. messageSends: ["ifTrue:", "isMetaclass", "error:", unescape("%2C"), "asString", "do:", "values", "methodDictionary", "removeCompiledMethod:", "class", "basicDelete:", "name"],
  1266. referencedClasses: []
  1267. }),
  1268. smalltalk.Smalltalk);
  1269. smalltalk.addMethod(
  1270. '_basicParse_',
  1271. smalltalk.method({
  1272. selector: 'basicParse:',
  1273. category: 'accessing',
  1274. fn: function (aString){
  1275. var self=this;
  1276. return smalltalk.parser.parse(aString);
  1277. return self;},
  1278. args: ["aString"],
  1279. source: unescape('basicParse%3A%20aString%0A%09%3Creturn%20smalltalk.parser.parse%28aString%29%3E'),
  1280. messageSends: [],
  1281. referencedClasses: []
  1282. }),
  1283. smalltalk.Smalltalk);
  1284. smalltalk.addMethod(
  1285. '_parse_',
  1286. smalltalk.method({
  1287. selector: 'parse:',
  1288. category: 'accessing',
  1289. fn: function (aString){
  1290. var self=this;
  1291. var result=nil;
  1292. smalltalk.send(self, "_try_catch_", [(function(){return result=smalltalk.send(self, "_basicParse_", [aString]);}), (function(ex){return smalltalk.send(smalltalk.send(self, "_parseError_parsing_", [ex, aString]), "_signal", []);})]);
  1293. return result;
  1294. return self;},
  1295. args: ["aString"],
  1296. source: unescape('parse%3A%20aString%0A%09%7C%20result%20%7C%20%0A%09self%20try%3A%20%5Bresult%20%3A%3D%20self%20basicParse%3A%20aString%5D%20catch%3A%20%5B%3Aex%20%7C%20%28self%20parseError%3A%20ex%20parsing%3A%20aString%29%20signal%5D.%0A%09%5Eresult'),
  1297. messageSends: ["try:catch:", "basicParse:", "signal", "parseError:parsing:"],
  1298. referencedClasses: []
  1299. }),
  1300. smalltalk.Smalltalk);
  1301. smalltalk.addMethod(
  1302. '_parseError_parsing_',
  1303. smalltalk.method({
  1304. selector: 'parseError:parsing:',
  1305. category: 'accessing',
  1306. fn: function (anException, aString){
  1307. var self=this;
  1308. var row=nil;
  1309. var col=nil;
  1310. var message=nil;
  1311. var lines=nil;
  1312. var badLine=nil;
  1313. var code=nil;
  1314. row = anException.line;
  1315. col = anException.column;
  1316. message = anException.message;;
  1317. lines=smalltalk.send(aString, "_lines", []);
  1318. badLine=smalltalk.send(lines, "_at_", [row]);
  1319. badLine=smalltalk.send(smalltalk.send(smalltalk.send(badLine, "_copyFrom_to_", [(1), (($receiver = col).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])]), "__comma", [unescape("%20%3D%3D%3D%3E")]), "__comma", [smalltalk.send(badLine, "_copyFrom_to_", [col, smalltalk.send(badLine, "_size", [])])]);
  1320. smalltalk.send(lines, "_at_put_", [row, badLine]);
  1321. code=smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(s){return smalltalk.send(lines, "_withIndexDo_", [(function(l, i){return smalltalk.send(s, "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(i, "_asString", []), "__comma", [": "]), "__comma", [l]), "__comma", [smalltalk.send((smalltalk.String || String), "_lf", [])])]);})]);})]);
  1322. return smalltalk.send(smalltalk.send((smalltalk.Error || Error), "_new", []), "_messageText_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("Parse error on line ", "__comma", [row]), "__comma", [" column "]), "__comma", [col]), "__comma", [" : "]), "__comma", [message]), "__comma", [unescape("%20Below%20is%20code%20with%20line%20numbers%20and%20%3D%3D%3D%3E%20marker%20inserted%3A")]), "__comma", [smalltalk.send((smalltalk.String || String), "_lf", [])]), "__comma", [code])]);
  1323. return self;},
  1324. args: ["anException", "aString"],
  1325. source: unescape('parseError%3A%20anException%20parsing%3A%20aString%0A%09%7C%20row%20col%20message%20lines%20badLine%20code%20%7C%0A%09%3Crow%20%3D%20anException.line%3B%0A%09col%20%3D%20anException.column%3B%0A%09message%20%3D%20anException.message%3B%3E.%0A%09lines%20%3A%3D%20aString%20lines.%0A%09badLine%20%3A%3D%20lines%20at%3A%20row.%0A%09badLine%20%3A%3D%20%28badLine%20copyFrom%3A%201%20to%3A%20col%20-%201%29%2C%20%27%20%3D%3D%3D%3E%27%2C%20%28badLine%20copyFrom%3A%20%20col%20to%3A%20badLine%20size%29.%0A%09lines%20at%3A%20row%20put%3A%20badLine.%0A%09code%20%3A%3D%20String%20streamContents%3A%20%5B%3As%20%7C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20lines%20withIndexDo%3A%20%5B%3Al%20%3Ai%20%7C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20s%20nextPutAll%3A%20i%20asString%2C%20%27%3A%20%27%2C%20l%2C%20String%20lf%5D%5D.%0A%09%5E%20Error%20new%20messageText%3A%20%28%27Parse%20error%20on%20line%20%27%20%2C%20row%20%2C%20%27%20column%20%27%20%2C%20col%20%2C%20%27%20%3A%20%27%20%2C%20message%20%2C%20%27%20Below%20is%20code%20with%20line%20numbers%20and%20%3D%3D%3D%3E%20marker%20inserted%3A%27%20%2C%20String%20lf%2C%20code%29'),
  1326. messageSends: ["lines", "at:", unescape("%2C"), "copyFrom:to:", unescape("-"), "size", "at:put:", "streamContents:", "withIndexDo:", "nextPutAll:", "asString", "lf", "messageText:", "new"],
  1327. referencedClasses: [smalltalk.String,smalltalk.Error]
  1328. }),
  1329. smalltalk.Smalltalk);
  1330. smalltalk.addMethod(
  1331. '_modules',
  1332. smalltalk.method({
  1333. selector: 'modules',
  1334. category: 'accessing',
  1335. fn: function (){
  1336. var self=this;
  1337. return self.modules.all();
  1338. return self;},
  1339. args: [],
  1340. source: unescape('modules%0A%09%3Creturn%20self.modules.all%28%29%3E'),
  1341. messageSends: [],
  1342. referencedClasses: []
  1343. }),
  1344. smalltalk.Smalltalk);
  1345. smalltalk.Smalltalk.klass.iVarNames = ['current'];
  1346. smalltalk.addMethod(
  1347. '_current',
  1348. smalltalk.method({
  1349. selector: 'current',
  1350. category: 'accessing',
  1351. fn: function (){
  1352. var self=this;
  1353. return smalltalk;
  1354. return self;},
  1355. args: [],
  1356. source: unescape('current%0A%09%3Creturn%20smalltalk%3E'),
  1357. messageSends: [],
  1358. referencedClasses: []
  1359. }),
  1360. smalltalk.Smalltalk.klass);
  1361. smalltalk.addClass('Module', smalltalk.Object, [], 'Kernel');
  1362. smalltalk.addMethod(
  1363. '_name',
  1364. smalltalk.method({
  1365. selector: 'name',
  1366. category: 'accessing',
  1367. fn: function (){
  1368. var self=this;
  1369. return self.moduleName || nil;
  1370. return self;},
  1371. args: [],
  1372. source: unescape('name%0A%09%3Creturn%20self.moduleName%20%7C%7C%20nil%3E'),
  1373. messageSends: [],
  1374. referencedClasses: []
  1375. }),
  1376. smalltalk.Module);
  1377. smalltalk.addMethod(
  1378. '_requires',
  1379. smalltalk.method({
  1380. selector: 'requires',
  1381. category: 'accessing',
  1382. fn: function (){
  1383. var self=this;
  1384. return self.requires || nil;
  1385. return self;},
  1386. args: [],
  1387. source: unescape('requires%0A%09%3Creturn%20self.requires%20%7C%7C%20nil%3E'),
  1388. messageSends: [],
  1389. referencedClasses: []
  1390. }),
  1391. smalltalk.Module);
  1392. smalltalk.addMethod(
  1393. '_name_',
  1394. smalltalk.method({
  1395. selector: 'name:',
  1396. category: 'accessing',
  1397. fn: function (aString){
  1398. var self=this;
  1399. return self.moduleName = aString;
  1400. return self;},
  1401. args: ["aString"],
  1402. source: unescape('name%3A%20aString%0A%09%3Creturn%20self.moduleName%20%3D%20aString%3E'),
  1403. messageSends: [],
  1404. referencedClasses: []
  1405. }),
  1406. smalltalk.Module);
  1407. smalltalk.addClass('Behavior', smalltalk.Object, [], 'Kernel');
  1408. smalltalk.addMethod(
  1409. '_new',
  1410. smalltalk.method({
  1411. selector: 'new',
  1412. category: 'instance creation',
  1413. fn: function (){
  1414. var self=this;
  1415. return smalltalk.send(smalltalk.send(self, "_basicNew", []), "_initialize", []);
  1416. return self;},
  1417. args: [],
  1418. source: unescape('new%0A%09%5Eself%20basicNew%20initialize'),
  1419. messageSends: ["initialize", "basicNew"],
  1420. referencedClasses: []
  1421. }),
  1422. smalltalk.Behavior);
  1423. smalltalk.addMethod(
  1424. '_basicNew',
  1425. smalltalk.method({
  1426. selector: 'basicNew',
  1427. category: 'instance creation',
  1428. fn: function (){
  1429. var self=this;
  1430. return new self.fn();
  1431. return self;},
  1432. args: [],
  1433. source: unescape('basicNew%0A%09%3Creturn%20new%20self.fn%28%29%3E'),
  1434. messageSends: [],
  1435. referencedClasses: []
  1436. }),
  1437. smalltalk.Behavior);
  1438. smalltalk.addMethod(
  1439. '_name',
  1440. smalltalk.method({
  1441. selector: 'name',
  1442. category: 'accessing',
  1443. fn: function (){
  1444. var self=this;
  1445. return self.className || nil;
  1446. return self;},
  1447. args: [],
  1448. source: unescape('name%0A%09%3Creturn%20self.className%20%7C%7C%20nil%3E'),
  1449. messageSends: [],
  1450. referencedClasses: []
  1451. }),
  1452. smalltalk.Behavior);
  1453. smalltalk.addMethod(
  1454. '_superclass',
  1455. smalltalk.method({
  1456. selector: 'superclass',
  1457. category: 'accessing',
  1458. fn: function (){
  1459. var self=this;
  1460. return self.superclass || nil;
  1461. return self;},
  1462. args: [],
  1463. source: unescape('superclass%0A%09%3Creturn%20self.superclass%20%7C%7C%20nil%3E'),
  1464. messageSends: [],
  1465. referencedClasses: []
  1466. }),
  1467. smalltalk.Behavior);
  1468. smalltalk.addMethod(
  1469. '_subclasses',
  1470. smalltalk.method({
  1471. selector: 'subclasses',
  1472. category: 'accessing',
  1473. fn: function (){
  1474. var self=this;
  1475. return smalltalk.subclasses(self);
  1476. return self;},
  1477. args: [],
  1478. source: unescape('subclasses%0A%09%3Creturn%20smalltalk.subclasses%28self%29%3E'),
  1479. messageSends: [],
  1480. referencedClasses: []
  1481. }),
  1482. smalltalk.Behavior);
  1483. smalltalk.addMethod(
  1484. '_allSubclasses',
  1485. smalltalk.method({
  1486. selector: 'allSubclasses',
  1487. category: 'accessing',
  1488. fn: function (){
  1489. var self=this;
  1490. var result=nil;
  1491. result=smalltalk.send(self, "_subclasses", []);
  1492. smalltalk.send(smalltalk.send(self, "_subclasses", []), "_do_", [(function(each){return smalltalk.send(result, "_addAll_", [smalltalk.send(each, "_allSubclasses", [])]);})]);
  1493. return result;
  1494. return self;},
  1495. args: [],
  1496. 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'),
  1497. messageSends: ["subclasses", "do:", "addAll:", "allSubclasses"],
  1498. referencedClasses: []
  1499. }),
  1500. smalltalk.Behavior);
  1501. smalltalk.addMethod(
  1502. '_withAllSubclasses',
  1503. smalltalk.method({
  1504. selector: 'withAllSubclasses',
  1505. category: 'accessing',
  1506. fn: function (){
  1507. var self=this;
  1508. return (function($rec){smalltalk.send($rec, "_addAll_", [smalltalk.send(self, "_allSubclasses", [])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.Array || Array), "_with_", [self]));
  1509. return self;},
  1510. args: [],
  1511. source: unescape('withAllSubclasses%0A%09%5E%28Array%20with%3A%20self%29%20addAll%3A%20self%20allSubclasses%3B%20yourself'),
  1512. messageSends: ["addAll:", "allSubclasses", "yourself", "with:"],
  1513. referencedClasses: [smalltalk.Array]
  1514. }),
  1515. smalltalk.Behavior);
  1516. smalltalk.addMethod(
  1517. '_prototype',
  1518. smalltalk.method({
  1519. selector: 'prototype',
  1520. category: 'accessing',
  1521. fn: function (){
  1522. var self=this;
  1523. return self.fn.prototype;
  1524. return self;},
  1525. args: [],
  1526. source: unescape('prototype%0A%09%3Creturn%20self.fn.prototype%3E'),
  1527. messageSends: [],
  1528. referencedClasses: []
  1529. }),
  1530. smalltalk.Behavior);
  1531. smalltalk.addMethod(
  1532. '_methodDictionary',
  1533. smalltalk.method({
  1534. selector: 'methodDictionary',
  1535. category: 'accessing',
  1536. fn: function (){
  1537. var self=this;
  1538. var dict = smalltalk.Dictionary._new();
  1539. var methods = self.fn.prototype.methods;
  1540. for(var i in methods) {
  1541. if(methods[i].selector) {
  1542. dict._at_put_(methods[i].selector, methods[i]);
  1543. }
  1544. };
  1545. return dict;
  1546. return self;},
  1547. args: [],
  1548. 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'),
  1549. messageSends: [],
  1550. referencedClasses: []
  1551. }),
  1552. smalltalk.Behavior);
  1553. smalltalk.addMethod(
  1554. '_methodsFor_',
  1555. smalltalk.method({
  1556. selector: 'methodsFor:',
  1557. category: 'accessing',
  1558. fn: function (aString){
  1559. var self=this;
  1560. return (function($rec){smalltalk.send($rec, "_class_category_", [self, aString]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.ClassCategoryReader || ClassCategoryReader), "_new", []));
  1561. return self;},
  1562. args: ["aString"],
  1563. 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'),
  1564. messageSends: ["class:category:", "yourself", "new"],
  1565. referencedClasses: [smalltalk.nil]
  1566. }),
  1567. smalltalk.Behavior);
  1568. smalltalk.addMethod(
  1569. '_addCompiledMethod_',
  1570. smalltalk.method({
  1571. selector: 'addCompiledMethod:',
  1572. category: 'accessing',
  1573. fn: function (aMethod){
  1574. var self=this;
  1575. smalltalk.addMethod(aMethod.selector._asSelector(), aMethod, self);
  1576. return self;},
  1577. args: ["aMethod"],
  1578. source: unescape('addCompiledMethod%3A%20aMethod%0A%09%3Csmalltalk.addMethod%28aMethod.selector._asSelector%28%29%2C%20aMethod%2C%20self%29%3E'),
  1579. messageSends: [],
  1580. referencedClasses: []
  1581. }),
  1582. smalltalk.Behavior);
  1583. smalltalk.addMethod(
  1584. '_instanceVariableNames',
  1585. smalltalk.method({
  1586. selector: 'instanceVariableNames',
  1587. category: 'accessing',
  1588. fn: function (){
  1589. var self=this;
  1590. return self.iVarNames;
  1591. return self;},
  1592. args: [],
  1593. source: unescape('instanceVariableNames%0A%09%3Creturn%20self.iVarNames%3E'),
  1594. messageSends: [],
  1595. referencedClasses: []
  1596. }),
  1597. smalltalk.Behavior);
  1598. smalltalk.addMethod(
  1599. '_comment',
  1600. smalltalk.method({
  1601. selector: 'comment',
  1602. category: 'accessing',
  1603. fn: function (){
  1604. var self=this;
  1605. return (($receiver = smalltalk.send(self, "_basicAt_", ["comment"])) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
  1606. return self;},
  1607. args: [],
  1608. source: unescape('comment%0A%20%20%20%20%5E%28self%20basicAt%3A%20%27comment%27%29%20ifNil%3A%20%5B%27%27%5D'),
  1609. messageSends: ["ifNil:", "basicAt:"],
  1610. referencedClasses: []
  1611. }),
  1612. smalltalk.Behavior);
  1613. smalltalk.addMethod(
  1614. '_comment_',
  1615. smalltalk.method({
  1616. selector: 'comment:',
  1617. category: 'accessing',
  1618. fn: function (aString){
  1619. var self=this;
  1620. smalltalk.send(self, "_basicAt_put_", ["comment", aString]);
  1621. return self;},
  1622. args: ["aString"],
  1623. source: unescape('comment%3A%20aString%0A%20%20%20%20self%20basicAt%3A%20%27comment%27%20put%3A%20aString'),
  1624. messageSends: ["basicAt:put:"],
  1625. referencedClasses: []
  1626. }),
  1627. smalltalk.Behavior);
  1628. smalltalk.addMethod(
  1629. '_commentStamp',
  1630. smalltalk.method({
  1631. selector: 'commentStamp',
  1632. category: 'accessing',
  1633. fn: function (){
  1634. var self=this;
  1635. return (function($rec){smalltalk.send($rec, "_class_", [self]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.ClassCommentReader || ClassCommentReader), "_new", []));
  1636. return self;},
  1637. args: [],
  1638. source: unescape('commentStamp%0A%20%20%20%20%5EClassCommentReader%20new%0A%09class%3A%20self%3B%0A%09yourself'),
  1639. messageSends: ["class:", "yourself", "new"],
  1640. referencedClasses: [smalltalk.nil]
  1641. }),
  1642. smalltalk.Behavior);
  1643. smalltalk.addMethod(
  1644. '_removeCompiledMethod_',
  1645. smalltalk.method({
  1646. selector: 'removeCompiledMethod:',
  1647. category: 'accessing',
  1648. fn: function (aMethod){
  1649. var self=this;
  1650. delete self.fn.prototype[aMethod.selector._asSelector()];
  1651. delete self.fn.prototype.methods[aMethod.selector];
  1652. smalltalk.init(self);;
  1653. return self;},
  1654. args: ["aMethod"],
  1655. 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'),
  1656. messageSends: [],
  1657. referencedClasses: []
  1658. }),
  1659. smalltalk.Behavior);
  1660. smalltalk.addMethod(
  1661. '_inheritsFrom_',
  1662. smalltalk.method({
  1663. selector: 'inheritsFrom:',
  1664. category: 'instance creation',
  1665. fn: function (aClass){
  1666. var self=this;
  1667. return smalltalk.send(smalltalk.send(aClass, "_allSubclasses", []), "_includes_", [self]);
  1668. return self;},
  1669. args: ["aClass"],
  1670. source: unescape('inheritsFrom%3A%20aClass%0A%09%5EaClass%20allSubclasses%20includes%3A%20self'),
  1671. messageSends: ["includes:", "allSubclasses"],
  1672. referencedClasses: []
  1673. }),
  1674. smalltalk.Behavior);
  1675. smalltalk.addMethod(
  1676. '_protocols',
  1677. smalltalk.method({
  1678. selector: 'protocols',
  1679. category: 'accessing',
  1680. fn: function (){
  1681. var self=this;
  1682. var protocols=nil;
  1683. protocols=smalltalk.send((smalltalk.Array || Array), "_new", []);
  1684. smalltalk.send(smalltalk.send(self, "_methodDictionary", []), "_do_", [(function(each){return (($receiver = smalltalk.send(protocols, "_includes_", [smalltalk.send(each, "_category", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(protocols, "_add_", [smalltalk.send(each, "_category", [])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(protocols, "_add_", [smalltalk.send(each, "_category", [])]);})]);})]);
  1685. return smalltalk.send(protocols, "_sort", []);
  1686. return self;},
  1687. args: [],
  1688. 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'),
  1689. messageSends: ["new", "do:", "methodDictionary", "ifFalse:", "includes:", "category", "add:", "sort"],
  1690. referencedClasses: [smalltalk.Array]
  1691. }),
  1692. smalltalk.Behavior);
  1693. smalltalk.addMethod(
  1694. '_protocolsDo_',
  1695. smalltalk.method({
  1696. selector: 'protocolsDo:',
  1697. category: 'accessing',
  1698. fn: function (aBlock){
  1699. var self=this;
  1700. var methodsByCategory=nil;
  1701. methodsByCategory=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []);
  1702. smalltalk.send(smalltalk.send(smalltalk.send(self, "_methodDictionary", []), "_values", []), "_do_", [(function(m){return smalltalk.send(smalltalk.send(methodsByCategory, "_at_ifAbsentPut_", [smalltalk.send(m, "_category", []), (function(){return smalltalk.send((smalltalk.Array || Array), "_new", []);})]), "_add_", [m]);})]);
  1703. smalltalk.send(smalltalk.send(self, "_protocols", []), "_do_", [(function(category){return smalltalk.send(aBlock, "_value_value_", [category, smalltalk.send(methodsByCategory, "_at_", [category])]);})]);
  1704. return self;},
  1705. args: ["aBlock"],
  1706. 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'),
  1707. messageSends: ["new", "do:", "values", "methodDictionary", "add:", "at:ifAbsentPut:", "category", "protocols", "value:value:", "at:"],
  1708. referencedClasses: [smalltalk.nil,smalltalk.Array]
  1709. }),
  1710. smalltalk.Behavior);
  1711. smalltalk.addMethod(
  1712. '_allInstanceVariableNames',
  1713. smalltalk.method({
  1714. selector: 'allInstanceVariableNames',
  1715. category: 'accessing',
  1716. fn: function (){
  1717. var self=this;
  1718. var result=nil;
  1719. result=smalltalk.send(smalltalk.send(self, "_instanceVariableNames", []), "_copy", []);
  1720. (($receiver = smalltalk.send(self, "_superclass", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(result, "_addAll_", [smalltalk.send(smalltalk.send(self, "_superclass", []), "_allInstanceVariableNames", [])]);})() : nil;
  1721. return result;
  1722. return self;},
  1723. args: [],
  1724. 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'),
  1725. messageSends: ["copy", "instanceVariableNames", "ifNotNil:", "superclass", "addAll:", "allInstanceVariableNames"],
  1726. referencedClasses: []
  1727. }),
  1728. smalltalk.Behavior);
  1729. smalltalk.addMethod(
  1730. '_methodAt_',
  1731. smalltalk.method({
  1732. selector: 'methodAt:',
  1733. category: 'accessing',
  1734. fn: function (aString){
  1735. var self=this;
  1736. return smalltalk.methods(self)[aString];
  1737. return self;},
  1738. args: ["aString"],
  1739. source: unescape('methodAt%3A%20aString%0A%09%3Creturn%20smalltalk.methods%28self%29%5BaString%5D%3E'),
  1740. messageSends: [],
  1741. referencedClasses: []
  1742. }),
  1743. smalltalk.Behavior);
  1744. smalltalk.addMethod(
  1745. '_methodsFor_stamp_',
  1746. smalltalk.method({
  1747. selector: 'methodsFor:stamp:',
  1748. category: 'accessing',
  1749. fn: function (aString, aStamp){
  1750. var self=this;
  1751. return smalltalk.send(self, "_methodsFor_", [aString]);
  1752. return self;},
  1753. args: ["aString", "aStamp"],
  1754. 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'),
  1755. messageSends: ["methodsFor:"],
  1756. referencedClasses: []
  1757. }),
  1758. smalltalk.Behavior);
  1759. smalltalk.addMethod(
  1760. '_commentStamp_prior_',
  1761. smalltalk.method({
  1762. selector: 'commentStamp:prior:',
  1763. category: 'accessing',
  1764. fn: function (aStamp, prior){
  1765. var self=this;
  1766. return smalltalk.send(self, "_commentStamp", []);
  1767. return self;},
  1768. args: ["aStamp", "prior"],
  1769. source: unescape('commentStamp%3A%20aStamp%20prior%3A%20prior%0A%20%20%20%20%20%20%20%20%5Eself%20commentStamp'),
  1770. messageSends: ["commentStamp"],
  1771. referencedClasses: []
  1772. }),
  1773. smalltalk.Behavior);
  1774. smalltalk.addMethod(
  1775. '_compile_',
  1776. smalltalk.method({
  1777. selector: 'compile:',
  1778. category: 'compiling',
  1779. fn: function (aString){
  1780. var self=this;
  1781. smalltalk.send(self, "_compile_category_", [aString, ""]);
  1782. return self;},
  1783. args: ["aString"],
  1784. source: unescape('compile%3A%20aString%0A%09self%20compile%3A%20aString%20category%3A%20%27%27'),
  1785. messageSends: ["compile:category:"],
  1786. referencedClasses: []
  1787. }),
  1788. smalltalk.Behavior);
  1789. smalltalk.addMethod(
  1790. '_compile_category_',
  1791. smalltalk.method({
  1792. selector: 'compile:category:',
  1793. category: 'compiling',
  1794. fn: function (aString, anotherString){
  1795. var self=this;
  1796. var method=nil;
  1797. method=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_load_forClass_", [aString, self]);
  1798. smalltalk.send(method, "_category_", [anotherString]);
  1799. smalltalk.send(self, "_addCompiledMethod_", [method]);
  1800. return self;},
  1801. args: ["aString", "anotherString"],
  1802. source: unescape('compile%3A%20aString%20category%3A%20anotherString%0A%09%7C%20method%20%7C%0A%09method%20%3A%3D%20Compiler%20new%20load%3A%20aString%20forClass%3A%20self.%0A%09method%20category%3A%20anotherString.%0A%09self%20addCompiledMethod%3A%20method'),
  1803. messageSends: ["load:forClass:", "new", "category:", "addCompiledMethod:"],
  1804. referencedClasses: [smalltalk.nil]
  1805. }),
  1806. smalltalk.Behavior);
  1807. smalltalk.addClass('Class', smalltalk.Behavior, [], 'Kernel');
  1808. smalltalk.addMethod(
  1809. '_category',
  1810. smalltalk.method({
  1811. selector: 'category',
  1812. category: 'accessing',
  1813. fn: function (){
  1814. var self=this;
  1815. return (($receiver = smalltalk.send(self, "_module", [])) == nil || $receiver == undefined) ? (function(){return "unclassified";})() : (function(){return smalltalk.send(smalltalk.send(self, "_module", []), "_name", []);})();
  1816. return self;},
  1817. args: [],
  1818. source: unescape('category%0A%09%5Eself%20module%20ifNil%3A%20%5B%27unclassified%27%5D%20ifNotNil%3A%20%5Bself%20module%20name%5D'),
  1819. messageSends: ["ifNil:ifNotNil:", "module", "name"],
  1820. referencedClasses: []
  1821. }),
  1822. smalltalk.Class);
  1823. smalltalk.addMethod(
  1824. '_subclass_instanceVariableNames_',
  1825. smalltalk.method({
  1826. selector: 'subclass:instanceVariableNames:',
  1827. category: 'class creation',
  1828. fn: function (aString, anotherString){
  1829. var self=this;
  1830. return smalltalk.send(self, "_subclass_instanceVariableNames_module_", [aString, anotherString, nil]);
  1831. return self;},
  1832. args: ["aString", "anotherString"],
  1833. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20anotherString%0A%09%22Kept%20for%20compatibility.%22%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20anotherString%20module%3A%20nil'),
  1834. messageSends: ["subclass:instanceVariableNames:module:"],
  1835. referencedClasses: []
  1836. }),
  1837. smalltalk.Class);
  1838. smalltalk.addMethod(
  1839. '_subclass_instanceVariableNames_category_',
  1840. smalltalk.method({
  1841. selector: 'subclass:instanceVariableNames:category:',
  1842. category: 'class creation',
  1843. fn: function (aString, aString2, aString3){
  1844. var self=this;
  1845. return smalltalk.send(self, "_subclass_instanceVariableNames_module_", [aString, aString2, aString3]);
  1846. return self;},
  1847. args: ["aString", "aString2", "aString3"],
  1848. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20category%3A%20aString3%0A%09%22Kept%20for%20compatibility.%22%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20module%3A%20aString3'),
  1849. messageSends: ["subclass:instanceVariableNames:module:"],
  1850. referencedClasses: []
  1851. }),
  1852. smalltalk.Class);
  1853. smalltalk.addMethod(
  1854. '_isClass',
  1855. smalltalk.method({
  1856. selector: 'isClass',
  1857. category: 'testing',
  1858. fn: function (){
  1859. var self=this;
  1860. return true;
  1861. return self;},
  1862. args: [],
  1863. source: unescape('isClass%0A%09%5Etrue'),
  1864. messageSends: [],
  1865. referencedClasses: []
  1866. }),
  1867. smalltalk.Class);
  1868. smalltalk.addMethod(
  1869. '_printString',
  1870. smalltalk.method({
  1871. selector: 'printString',
  1872. category: 'printing',
  1873. fn: function (){
  1874. var self=this;
  1875. return smalltalk.send(self, "_name", []);
  1876. return self;},
  1877. args: [],
  1878. source: unescape('printString%0A%09%5Eself%20name'),
  1879. messageSends: ["name"],
  1880. referencedClasses: []
  1881. }),
  1882. smalltalk.Class);
  1883. smalltalk.addMethod(
  1884. '_rename_',
  1885. smalltalk.method({
  1886. selector: 'rename:',
  1887. category: 'accessing',
  1888. fn: function (aString){
  1889. var self=this;
  1890. smalltalk[aString] = self;
  1891. delete smalltalk[self.className];
  1892. self.className = aString;
  1893. ;
  1894. return self;},
  1895. args: ["aString"],
  1896. 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'),
  1897. messageSends: [],
  1898. referencedClasses: []
  1899. }),
  1900. smalltalk.Class);
  1901. smalltalk.addMethod(
  1902. '_subclass_instanceVariableNames_classVariableNames_poolDictionaries_category_',
  1903. smalltalk.method({
  1904. selector: 'subclass:instanceVariableNames:classVariableNames:poolDictionaries:category:',
  1905. category: 'class creation',
  1906. fn: function (aString, aString2, classVars, pools, aString3){
  1907. var self=this;
  1908. return smalltalk.send(self, "_subclass_instanceVariableNames_module_", [aString, aString2, aString3]);
  1909. return self;},
  1910. args: ["aString", "aString2", "classVars", "pools", "aString3"],
  1911. 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%20module%3A%20aString3'),
  1912. messageSends: ["subclass:instanceVariableNames:module:"],
  1913. referencedClasses: []
  1914. }),
  1915. smalltalk.Class);
  1916. smalltalk.addMethod(
  1917. '_module',
  1918. smalltalk.method({
  1919. selector: 'module',
  1920. category: 'accessing',
  1921. fn: function (){
  1922. var self=this;
  1923. return self.module;
  1924. return self;},
  1925. args: [],
  1926. source: unescape('module%0A%09%3Creturn%20self.module%3E'),
  1927. messageSends: [],
  1928. referencedClasses: []
  1929. }),
  1930. smalltalk.Class);
  1931. smalltalk.addMethod(
  1932. '_module_',
  1933. smalltalk.method({
  1934. selector: 'module:',
  1935. category: 'accessing',
  1936. fn: function (aModule){
  1937. var self=this;
  1938. self.module = aModule;
  1939. return self;},
  1940. args: ["aModule"],
  1941. source: unescape('module%3A%20aModule%0A%09%3Cself.module%20%3D%20aModule%3E'),
  1942. messageSends: [],
  1943. referencedClasses: []
  1944. }),
  1945. smalltalk.Class);
  1946. smalltalk.addMethod(
  1947. '_subclass_instanceVariableNames_module_',
  1948. smalltalk.method({
  1949. selector: 'subclass:instanceVariableNames:module:',
  1950. category: 'class creation',
  1951. fn: function (aString, aString2, aString3){
  1952. var self=this;
  1953. return smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_superclass_subclass_instanceVariableNames_module_", [self, aString, aString2, aString3]);
  1954. return self;},
  1955. args: ["aString", "aString2", "aString3"],
  1956. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20module%3A%20aString3%0A%09%5EClassBuilder%20new%0A%09%20%20%20%20superclass%3A%20self%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20module%3A%20aString3'),
  1957. messageSends: ["superclass:subclass:instanceVariableNames:module:", "new"],
  1958. referencedClasses: [smalltalk.nil]
  1959. }),
  1960. smalltalk.Class);
  1961. smalltalk.addClass('Metaclass', smalltalk.Behavior, [], 'Kernel');
  1962. smalltalk.addMethod(
  1963. '_instanceClass',
  1964. smalltalk.method({
  1965. selector: 'instanceClass',
  1966. category: 'accessing',
  1967. fn: function (){
  1968. var self=this;
  1969. return self.instanceClass;
  1970. return self;},
  1971. args: [],
  1972. source: unescape('instanceClass%0A%09%3Creturn%20self.instanceClass%3E'),
  1973. messageSends: [],
  1974. referencedClasses: []
  1975. }),
  1976. smalltalk.Metaclass);
  1977. smalltalk.addMethod(
  1978. '_instanceVariableNames_',
  1979. smalltalk.method({
  1980. selector: 'instanceVariableNames:',
  1981. category: 'accessing',
  1982. fn: function (aCollection){
  1983. var self=this;
  1984. smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_class_instanceVariableNames_", [self, aCollection]);
  1985. return self;},
  1986. args: ["aCollection"],
  1987. source: unescape('instanceVariableNames%3A%20aCollection%0A%09ClassBuilder%20new%0A%09%20%20%20%20class%3A%20self%20instanceVariableNames%3A%20aCollection'),
  1988. messageSends: ["class:instanceVariableNames:", "new"],
  1989. referencedClasses: [smalltalk.nil]
  1990. }),
  1991. smalltalk.Metaclass);
  1992. smalltalk.addMethod(
  1993. '_isMetaclass',
  1994. smalltalk.method({
  1995. selector: 'isMetaclass',
  1996. category: 'testing',
  1997. fn: function (){
  1998. var self=this;
  1999. return true;
  2000. return self;},
  2001. args: [],
  2002. source: unescape('isMetaclass%0A%09%5Etrue'),
  2003. messageSends: [],
  2004. referencedClasses: []
  2005. }),
  2006. smalltalk.Metaclass);
  2007. smalltalk.addMethod(
  2008. '_printString',
  2009. smalltalk.method({
  2010. selector: 'printString',
  2011. category: 'printing',
  2012. fn: function (){
  2013. var self=this;
  2014. return smalltalk.send(smalltalk.send(smalltalk.send(self, "_instanceClass", []), "_name", []), "__comma", [" class"]);
  2015. return self;},
  2016. args: [],
  2017. source: unescape('printString%0A%09%5Eself%20instanceClass%20name%2C%20%27%20class%27'),
  2018. messageSends: [unescape("%2C"), "name", "instanceClass"],
  2019. referencedClasses: []
  2020. }),
  2021. smalltalk.Metaclass);
  2022. smalltalk.addClass('CompiledMethod', smalltalk.Object, [], 'Kernel');
  2023. smalltalk.addMethod(
  2024. '_source',
  2025. smalltalk.method({
  2026. selector: 'source',
  2027. category: 'accessing',
  2028. fn: function (){
  2029. var self=this;
  2030. return (($receiver = smalltalk.send(self, "_basicAt_", ["source"])) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
  2031. return self;},
  2032. args: [],
  2033. source: unescape('source%0A%09%5E%28self%20basicAt%3A%20%27source%27%29%20ifNil%3A%20%5B%27%27%5D'),
  2034. messageSends: ["ifNil:", "basicAt:"],
  2035. referencedClasses: []
  2036. }),
  2037. smalltalk.CompiledMethod);
  2038. smalltalk.addMethod(
  2039. '_source_',
  2040. smalltalk.method({
  2041. selector: 'source:',
  2042. category: 'accessing',
  2043. fn: function (aString){
  2044. var self=this;
  2045. smalltalk.send(self, "_basicAt_put_", ["source", aString]);
  2046. return self;},
  2047. args: ["aString"],
  2048. source: unescape('source%3A%20aString%0A%09self%20basicAt%3A%20%27source%27%20put%3A%20aString'),
  2049. messageSends: ["basicAt:put:"],
  2050. referencedClasses: []
  2051. }),
  2052. smalltalk.CompiledMethod);
  2053. smalltalk.addMethod(
  2054. '_category',
  2055. smalltalk.method({
  2056. selector: 'category',
  2057. category: 'accessing',
  2058. fn: function (){
  2059. var self=this;
  2060. return (($receiver = smalltalk.send(self, "_basicAt_", ["category"])) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
  2061. return self;},
  2062. args: [],
  2063. source: unescape('category%0A%09%5E%28self%20basicAt%3A%20%27category%27%29%20ifNil%3A%20%5B%27%27%5D'),
  2064. messageSends: ["ifNil:", "basicAt:"],
  2065. referencedClasses: []
  2066. }),
  2067. smalltalk.CompiledMethod);
  2068. smalltalk.addMethod(
  2069. '_category_',
  2070. smalltalk.method({
  2071. selector: 'category:',
  2072. category: 'accessing',
  2073. fn: function (aString){
  2074. var self=this;
  2075. smalltalk.send(self, "_basicAt_put_", ["category", aString]);
  2076. return self;},
  2077. args: ["aString"],
  2078. source: unescape('category%3A%20aString%0A%09self%20basicAt%3A%20%27category%27%20put%3A%20aString'),
  2079. messageSends: ["basicAt:put:"],
  2080. referencedClasses: []
  2081. }),
  2082. smalltalk.CompiledMethod);
  2083. smalltalk.addMethod(
  2084. '_selector',
  2085. smalltalk.method({
  2086. selector: 'selector',
  2087. category: 'accessing',
  2088. fn: function (){
  2089. var self=this;
  2090. return smalltalk.send(self, "_basicAt_", ["selector"]);
  2091. return self;},
  2092. args: [],
  2093. source: unescape('selector%0A%09%5Eself%20basicAt%3A%20%27selector%27'),
  2094. messageSends: ["basicAt:"],
  2095. referencedClasses: []
  2096. }),
  2097. smalltalk.CompiledMethod);
  2098. smalltalk.addMethod(
  2099. '_selector_',
  2100. smalltalk.method({
  2101. selector: 'selector:',
  2102. category: 'accessing',
  2103. fn: function (aString){
  2104. var self=this;
  2105. smalltalk.send(self, "_basicAt_put_", ["selector", aString]);
  2106. return self;},
  2107. args: ["aString"],
  2108. source: unescape('selector%3A%20aString%0A%09self%20basicAt%3A%20%27selector%27%20put%3A%20aString'),
  2109. messageSends: ["basicAt:put:"],
  2110. referencedClasses: []
  2111. }),
  2112. smalltalk.CompiledMethod);
  2113. smalltalk.addMethod(
  2114. '_fn',
  2115. smalltalk.method({
  2116. selector: 'fn',
  2117. category: 'accessing',
  2118. fn: function (){
  2119. var self=this;
  2120. return smalltalk.send(self, "_basicAt_", ["fn"]);
  2121. return self;},
  2122. args: [],
  2123. source: unescape('fn%0A%09%5Eself%20basicAt%3A%20%27fn%27'),
  2124. messageSends: ["basicAt:"],
  2125. referencedClasses: []
  2126. }),
  2127. smalltalk.CompiledMethod);
  2128. smalltalk.addMethod(
  2129. '_fn_',
  2130. smalltalk.method({
  2131. selector: 'fn:',
  2132. category: 'accessing',
  2133. fn: function (aBlock){
  2134. var self=this;
  2135. smalltalk.send(self, "_basicAt_put_", ["fn", aBlock]);
  2136. return self;},
  2137. args: ["aBlock"],
  2138. source: unescape('fn%3A%20aBlock%0A%09self%20basicAt%3A%20%27fn%27%20put%3A%20aBlock'),
  2139. messageSends: ["basicAt:put:"],
  2140. referencedClasses: []
  2141. }),
  2142. smalltalk.CompiledMethod);
  2143. smalltalk.addMethod(
  2144. '_messageSends',
  2145. smalltalk.method({
  2146. selector: 'messageSends',
  2147. category: 'accessing',
  2148. fn: function (){
  2149. var self=this;
  2150. return smalltalk.send(self, "_basicAt_", ["messageSends"]);
  2151. return self;},
  2152. args: [],
  2153. source: unescape('messageSends%0A%09%5Eself%20basicAt%3A%20%27messageSends%27'),
  2154. messageSends: ["basicAt:"],
  2155. referencedClasses: []
  2156. }),
  2157. smalltalk.CompiledMethod);
  2158. smalltalk.addMethod(
  2159. '_methodClass',
  2160. smalltalk.method({
  2161. selector: 'methodClass',
  2162. category: 'accessing',
  2163. fn: function (){
  2164. var self=this;
  2165. return smalltalk.send(self, "_basicAt_", ["methodClass"]);
  2166. return self;},
  2167. args: [],
  2168. source: unescape('methodClass%0A%09%5Eself%20basicAt%3A%20%27methodClass%27'),
  2169. messageSends: ["basicAt:"],
  2170. referencedClasses: []
  2171. }),
  2172. smalltalk.CompiledMethod);
  2173. smalltalk.addMethod(
  2174. '_referencedClasses',
  2175. smalltalk.method({
  2176. selector: 'referencedClasses',
  2177. category: 'accessing',
  2178. fn: function (){
  2179. var self=this;
  2180. return smalltalk.send(self, "_basicAt_", ["referencedClasses"]);
  2181. return self;},
  2182. args: [],
  2183. source: unescape('referencedClasses%0A%09%5Eself%20basicAt%3A%20%27referencedClasses%27'),
  2184. messageSends: ["basicAt:"],
  2185. referencedClasses: []
  2186. }),
  2187. smalltalk.CompiledMethod);
  2188. smalltalk.addMethod(
  2189. '_arguments',
  2190. smalltalk.method({
  2191. selector: 'arguments',
  2192. category: 'accessing',
  2193. fn: function (){
  2194. var self=this;
  2195. return self.args || [];
  2196. return self;},
  2197. args: [],
  2198. source: unescape('arguments%0A%09%3Creturn%20self.args%20%7C%7C%20%5B%5D%3E'),
  2199. messageSends: [],
  2200. referencedClasses: []
  2201. }),
  2202. smalltalk.CompiledMethod);
  2203. smalltalk.addClass('Number', smalltalk.Object, [], 'Kernel');
  2204. smalltalk.addMethod(
  2205. '__gt',
  2206. smalltalk.method({
  2207. selector: '>',
  2208. category: 'comparing',
  2209. fn: function (aNumber){
  2210. var self=this;
  2211. return self > aNumber;
  2212. return self;},
  2213. args: ["aNumber"],
  2214. source: unescape('%3E%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20%3E%3E%20aNumber%3E'),
  2215. messageSends: [],
  2216. referencedClasses: []
  2217. }),
  2218. smalltalk.Number);
  2219. smalltalk.addMethod(
  2220. '__lt',
  2221. smalltalk.method({
  2222. selector: '<',
  2223. category: 'comparing',
  2224. fn: function (aNumber){
  2225. var self=this;
  2226. return self < aNumber;
  2227. return self;},
  2228. args: ["aNumber"],
  2229. source: unescape('%3C%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20%3C%20aNumber%3E'),
  2230. messageSends: [],
  2231. referencedClasses: []
  2232. }),
  2233. smalltalk.Number);
  2234. smalltalk.addMethod(
  2235. '__gt_eq',
  2236. smalltalk.method({
  2237. selector: '>=',
  2238. category: 'comparing',
  2239. fn: function (aNumber){
  2240. var self=this;
  2241. return self >= aNumber;
  2242. return self;},
  2243. args: ["aNumber"],
  2244. source: unescape('%3E%3D%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20%3E%3E%3D%20aNumber%3E'),
  2245. messageSends: [],
  2246. referencedClasses: []
  2247. }),
  2248. smalltalk.Number);
  2249. smalltalk.addMethod(
  2250. '__lt_eq',
  2251. smalltalk.method({
  2252. selector: '<=',
  2253. category: 'comparing',
  2254. fn: function (aNumber){
  2255. var self=this;
  2256. return self <= aNumber;
  2257. return self;},
  2258. args: ["aNumber"],
  2259. source: unescape('%3C%3D%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20%3C%3D%20aNumber%3E'),
  2260. messageSends: [],
  2261. referencedClasses: []
  2262. }),
  2263. smalltalk.Number);
  2264. smalltalk.addMethod(
  2265. '__plus',
  2266. smalltalk.method({
  2267. selector: '+',
  2268. category: 'arithmetic',
  2269. fn: function (aNumber){
  2270. var self=this;
  2271. return self + aNumber;
  2272. return self;},
  2273. args: ["aNumber"],
  2274. source: unescape('+%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20+%20aNumber%3E'),
  2275. messageSends: [],
  2276. referencedClasses: []
  2277. }),
  2278. smalltalk.Number);
  2279. smalltalk.addMethod(
  2280. '__minus',
  2281. smalltalk.method({
  2282. selector: '-',
  2283. category: 'arithmetic',
  2284. fn: function (aNumber){
  2285. var self=this;
  2286. return self - aNumber;
  2287. return self;},
  2288. args: ["aNumber"],
  2289. source: unescape('-%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20-%20aNumber%3E'),
  2290. messageSends: [],
  2291. referencedClasses: []
  2292. }),
  2293. smalltalk.Number);
  2294. smalltalk.addMethod(
  2295. '__star',
  2296. smalltalk.method({
  2297. selector: '*',
  2298. category: 'arithmetic',
  2299. fn: function (aNumber){
  2300. var self=this;
  2301. return self * aNumber;
  2302. return self;},
  2303. args: ["aNumber"],
  2304. source: unescape('*%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20*%20aNumber%3E'),
  2305. messageSends: [],
  2306. referencedClasses: []
  2307. }),
  2308. smalltalk.Number);
  2309. smalltalk.addMethod(
  2310. '__slash',
  2311. smalltalk.method({
  2312. selector: '/',
  2313. category: 'arithmetic',
  2314. fn: function (aNumber){
  2315. var self=this;
  2316. return self / aNumber;
  2317. return self;},
  2318. args: ["aNumber"],
  2319. source: unescape('/%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20/%20aNumber%3E'),
  2320. messageSends: [],
  2321. referencedClasses: []
  2322. }),
  2323. smalltalk.Number);
  2324. smalltalk.addMethod(
  2325. '_max_',
  2326. smalltalk.method({
  2327. selector: 'max:',
  2328. category: 'arithmetic',
  2329. fn: function (aNumber){
  2330. var self=this;
  2331. return Math.max(self, aNumber);;
  2332. return self;},
  2333. args: ["aNumber"],
  2334. source: unescape('max%3A%20aNumber%0A%09%3Creturn%20Math.max%28self%2C%20aNumber%29%3B%3E'),
  2335. messageSends: [],
  2336. referencedClasses: []
  2337. }),
  2338. smalltalk.Number);
  2339. smalltalk.addMethod(
  2340. '_min_',
  2341. smalltalk.method({
  2342. selector: 'min:',
  2343. category: 'arithmetic',
  2344. fn: function (aNumber){
  2345. var self=this;
  2346. return Math.min(self, aNumber);;
  2347. return self;},
  2348. args: ["aNumber"],
  2349. source: unescape('min%3A%20aNumber%0A%09%3Creturn%20Math.min%28self%2C%20aNumber%29%3B%3E'),
  2350. messageSends: [],
  2351. referencedClasses: []
  2352. }),
  2353. smalltalk.Number);
  2354. smalltalk.addMethod(
  2355. '_rounded',
  2356. smalltalk.method({
  2357. selector: 'rounded',
  2358. category: 'converting',
  2359. fn: function (){
  2360. var self=this;
  2361. return Math.round(self);;
  2362. return self;},
  2363. args: [],
  2364. source: unescape('rounded%0A%09%3Creturn%20Math.round%28self%29%3B%3E'),
  2365. messageSends: [],
  2366. referencedClasses: []
  2367. }),
  2368. smalltalk.Number);
  2369. smalltalk.addMethod(
  2370. '_truncated',
  2371. smalltalk.method({
  2372. selector: 'truncated',
  2373. category: 'converting',
  2374. fn: function (){
  2375. var self=this;
  2376. return Math.floor(self);;
  2377. return self;},
  2378. args: [],
  2379. source: unescape('truncated%0A%09%3Creturn%20Math.floor%28self%29%3B%3E'),
  2380. messageSends: [],
  2381. referencedClasses: []
  2382. }),
  2383. smalltalk.Number);
  2384. smalltalk.addMethod(
  2385. '_to_',
  2386. smalltalk.method({
  2387. selector: 'to:',
  2388. category: 'converting',
  2389. fn: function (aNumber){
  2390. var self=this;
  2391. var array=nil;
  2392. var first=nil;
  2393. var last=nil;
  2394. var count=nil;
  2395. first=smalltalk.send(self, "_truncated", []);
  2396. last=(($receiver = smalltalk.send(aNumber, "_truncated", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]);
  2397. count=(1);
  2398. (($receiver = (($receiver = first).klass === smalltalk.Number) ? $receiver <=last : smalltalk.send($receiver, "__lt_eq", [last])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_error_", ["Wrong interval"]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self, "_error_", ["Wrong interval"]);})]);
  2399. array=smalltalk.send((smalltalk.Array || Array), "_new", []);
  2400. smalltalk.send((($receiver = last).klass === smalltalk.Number) ? $receiver -first : smalltalk.send($receiver, "__minus", [first]), "_timesRepeat_", [(function(){smalltalk.send(array, "_at_put_", [count, first]);count=(($receiver = count).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]);return first=(($receiver = first).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]);})]);
  2401. return array;
  2402. return self;},
  2403. args: ["aNumber"],
  2404. 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'),
  2405. messageSends: ["truncated", unescape("+"), "ifFalse:", unescape("%3C%3D"), "error:", "new", "timesRepeat:", unescape("-"), "at:put:"],
  2406. referencedClasses: [smalltalk.Array]
  2407. }),
  2408. smalltalk.Number);
  2409. smalltalk.addMethod(
  2410. '_timesRepeat_',
  2411. smalltalk.method({
  2412. selector: 'timesRepeat:',
  2413. category: 'enumerating',
  2414. fn: function (aBlock){
  2415. var self=this;
  2416. var integer=nil;
  2417. var count=nil;
  2418. integer=smalltalk.send(self, "_truncated", []);
  2419. count=(1);
  2420. (function(){while(!(function(){return (($receiver = count).klass === smalltalk.Number) ? $receiver >self : smalltalk.send($receiver, "__gt", [self]);})()) {(function(){smalltalk.send(aBlock, "_value", []);return count=(($receiver = count).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]);})()}})();
  2421. return self;},
  2422. args: ["aBlock"],
  2423. 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'),
  2424. messageSends: ["truncated", "whileFalse:", unescape("%3E"), "value", unescape("+")],
  2425. referencedClasses: []
  2426. }),
  2427. smalltalk.Number);
  2428. smalltalk.addMethod(
  2429. '_to_do_',
  2430. smalltalk.method({
  2431. selector: 'to:do:',
  2432. category: 'enumerating',
  2433. fn: function (aNumber, aBlock){
  2434. var self=this;
  2435. return smalltalk.send(smalltalk.send(self, "_to_", [aNumber]), "_do_", [aBlock]);
  2436. return self;},
  2437. args: ["aNumber", "aBlock"],
  2438. source: unescape('to%3A%20aNumber%20do%3A%20aBlock%0A%09%5E%28self%20to%3A%20aNumber%29%20do%3A%20aBlock'),
  2439. messageSends: ["do:", "to:"],
  2440. referencedClasses: []
  2441. }),
  2442. smalltalk.Number);
  2443. smalltalk.addMethod(
  2444. '_asString',
  2445. smalltalk.method({
  2446. selector: 'asString',
  2447. category: 'converting',
  2448. fn: function (){
  2449. var self=this;
  2450. return smalltalk.send(self, "_printString", []);
  2451. return self;},
  2452. args: [],
  2453. source: unescape('asString%0A%09%5Eself%20printString'),
  2454. messageSends: ["printString"],
  2455. referencedClasses: []
  2456. }),
  2457. smalltalk.Number);
  2458. smalltalk.addMethod(
  2459. '_asJavascript',
  2460. smalltalk.method({
  2461. selector: 'asJavascript',
  2462. category: 'converting',
  2463. fn: function (){
  2464. var self=this;
  2465. return smalltalk.send(smalltalk.send(unescape("%28"), "__comma", [smalltalk.send(self, "_printString", [])]), "__comma", [unescape("%29")]);
  2466. return self;},
  2467. args: [],
  2468. source: unescape('asJavascript%0A%09%5E%27%28%27%2C%20self%20printString%2C%20%27%29%27'),
  2469. messageSends: [unescape("%2C"), "printString"],
  2470. referencedClasses: []
  2471. }),
  2472. smalltalk.Number);
  2473. smalltalk.addMethod(
  2474. '_printString',
  2475. smalltalk.method({
  2476. selector: 'printString',
  2477. category: 'printing',
  2478. fn: function (){
  2479. var self=this;
  2480. return String(self);
  2481. return self;},
  2482. args: [],
  2483. source: unescape('printString%0A%09%3Creturn%20String%28self%29%3E'),
  2484. messageSends: [],
  2485. referencedClasses: []
  2486. }),
  2487. smalltalk.Number);
  2488. smalltalk.addMethod(
  2489. '_isNumber',
  2490. smalltalk.method({
  2491. selector: 'isNumber',
  2492. category: 'testing',
  2493. fn: function (){
  2494. var self=this;
  2495. return true;
  2496. return self;},
  2497. args: [],
  2498. source: unescape('isNumber%0A%09%5Etrue'),
  2499. messageSends: [],
  2500. referencedClasses: []
  2501. }),
  2502. smalltalk.Number);
  2503. smalltalk.addMethod(
  2504. '_atRandom',
  2505. smalltalk.method({
  2506. selector: 'atRandom',
  2507. category: 'converting',
  2508. fn: function (){
  2509. var self=this;
  2510. return (($receiver = smalltalk.send((($receiver = smalltalk.send(smalltalk.send((smalltalk.Random || Random), "_new", []), "_next", [])).klass === smalltalk.Number) ? $receiver *self : smalltalk.send($receiver, "__star", [self]), "_truncated", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]);
  2511. return self;},
  2512. args: [],
  2513. source: unescape('atRandom%0A%20%20%20%20%5E%28Random%20new%20next%20*%20self%29%20truncated%20+%201'),
  2514. messageSends: [unescape("+"), "truncated", unescape("*"), "next", "new"],
  2515. referencedClasses: [smalltalk.nil]
  2516. }),
  2517. smalltalk.Number);
  2518. smalltalk.addMethod(
  2519. '__at',
  2520. smalltalk.method({
  2521. selector: '@',
  2522. category: 'converting',
  2523. fn: function (aNumber){
  2524. var self=this;
  2525. return smalltalk.send((smalltalk.Point || Point), "_x_y_", [self, aNumber]);
  2526. return self;},
  2527. args: ["aNumber"],
  2528. source: unescape('@%20aNumber%0A%09%5EPoint%20x%3A%20self%20y%3A%20aNumber'),
  2529. messageSends: ["x:y:"],
  2530. referencedClasses: [smalltalk.nil]
  2531. }),
  2532. smalltalk.Number);
  2533. smalltalk.addMethod(
  2534. '_asPoint',
  2535. smalltalk.method({
  2536. selector: 'asPoint',
  2537. category: 'converting',
  2538. fn: function (){
  2539. var self=this;
  2540. return smalltalk.send((smalltalk.Point || Point), "_x_y_", [self, self]);
  2541. return self;},
  2542. args: [],
  2543. source: unescape('asPoint%0A%09%5EPoint%20x%3A%20self%20y%3A%20self'),
  2544. messageSends: ["x:y:"],
  2545. referencedClasses: [smalltalk.nil]
  2546. }),
  2547. smalltalk.Number);
  2548. smalltalk.addMethod(
  2549. '_clearInterval',
  2550. smalltalk.method({
  2551. selector: 'clearInterval',
  2552. category: 'timeouts/intervals',
  2553. fn: function (){
  2554. var self=this;
  2555. clearInterval(Number(self));
  2556. return self;},
  2557. args: [],
  2558. source: unescape('clearInterval%0A%09%3CclearInterval%28Number%28self%29%29%3E'),
  2559. messageSends: [],
  2560. referencedClasses: []
  2561. }),
  2562. smalltalk.Number);
  2563. smalltalk.addMethod(
  2564. '_asJSONObject',
  2565. smalltalk.method({
  2566. selector: 'asJSONObject',
  2567. category: 'converting',
  2568. fn: function (){
  2569. var self=this;
  2570. return self;
  2571. return self;},
  2572. args: [],
  2573. source: unescape('asJSONObject%0A%09%5Eself'),
  2574. messageSends: [],
  2575. referencedClasses: []
  2576. }),
  2577. smalltalk.Number);
  2578. smalltalk.addMethod(
  2579. '_clearTimeout',
  2580. smalltalk.method({
  2581. selector: 'clearTimeout',
  2582. category: 'timeouts/intervals',
  2583. fn: function (){
  2584. var self=this;
  2585. clearTimeout(Number(self));
  2586. return self;},
  2587. args: [],
  2588. source: unescape('clearTimeout%0A%09%3CclearTimeout%28Number%28self%29%29%3E'),
  2589. messageSends: [],
  2590. referencedClasses: []
  2591. }),
  2592. smalltalk.Number);
  2593. smalltalk.addMethod(
  2594. '_modulo_',
  2595. smalltalk.method({
  2596. selector: 'modulo:',
  2597. category: 'arithmetic',
  2598. fn: function (aNumber){
  2599. var self=this;
  2600. return self % aNumber;
  2601. return self;},
  2602. args: ["aNumber"],
  2603. source: unescape('modulo%3A%20aNumber%0A%09%3Creturn%20self%20%25%20aNumber%3E'),
  2604. messageSends: [],
  2605. referencedClasses: []
  2606. }),
  2607. smalltalk.Number);
  2608. smalltalk.addMethod(
  2609. '_even',
  2610. smalltalk.method({
  2611. selector: 'even',
  2612. category: 'testing',
  2613. fn: function (){
  2614. var self=this;
  2615. return (0) == smalltalk.send(self, "_modulo_", [(2)]);
  2616. return self;},
  2617. args: [],
  2618. source: unescape('even%0A%09%5E%200%20%3D%20%28self%20modulo%3A%202%29'),
  2619. messageSends: [unescape("%3D"), "modulo:"],
  2620. referencedClasses: []
  2621. }),
  2622. smalltalk.Number);
  2623. smalltalk.addMethod(
  2624. '_odd',
  2625. smalltalk.method({
  2626. selector: 'odd',
  2627. category: 'testing',
  2628. fn: function (){
  2629. var self=this;
  2630. return smalltalk.send(smalltalk.send(self, "_even", []), "_not", []);
  2631. return self;},
  2632. args: [],
  2633. source: unescape('odd%0A%09%5E%20self%20even%20not'),
  2634. messageSends: ["not", "even"],
  2635. referencedClasses: []
  2636. }),
  2637. smalltalk.Number);
  2638. smalltalk.addMethod(
  2639. '_negated',
  2640. smalltalk.method({
  2641. selector: 'negated',
  2642. category: 'arithmetic',
  2643. fn: function (){
  2644. var self=this;
  2645. return (0) - self;
  2646. return self;},
  2647. args: [],
  2648. source: unescape('negated%0A%09%5E0%20-%20self'),
  2649. messageSends: [unescape("-")],
  2650. referencedClasses: []
  2651. }),
  2652. smalltalk.Number);
  2653. smalltalk.addMethod(
  2654. '__eq',
  2655. smalltalk.method({
  2656. selector: '=',
  2657. category: 'comparing',
  2658. fn: function (aNumber){
  2659. var self=this;
  2660. try{(($receiver = smalltalk.send(smalltalk.send(aNumber, "_class", []), "__eq", [smalltalk.send(self, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]);
  2661. return Number(self) == aNumber;
  2662. return self;
  2663. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
  2664. args: ["aNumber"],
  2665. source: unescape('%3D%20aNumber%0A%09aNumber%20class%20%3D%20self%20class%20ifFalse%3A%20%5B%5Efalse%5D.%20%0A%09%3Creturn%20Number%28self%29%20%3D%3D%20aNumber%3E%20'),
  2666. messageSends: ["ifFalse:", unescape("%3D"), "class"],
  2667. referencedClasses: []
  2668. }),
  2669. smalltalk.Number);
  2670. smalltalk.addMethod(
  2671. '__eq_eq',
  2672. smalltalk.method({
  2673. selector: '==',
  2674. category: 'comparing',
  2675. fn: function (aNumber){
  2676. var self=this;
  2677. try{(($receiver = smalltalk.send(smalltalk.send(aNumber, "_class", []), "__eq", [smalltalk.send(self, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq_eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq_eq', fn: function(){return false}})})();})]);
  2678. return Number(self) === Number(aNumber);
  2679. return self;
  2680. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq_eq'){return e.fn()} throw(e)}},
  2681. args: ["aNumber"],
  2682. source: unescape('%3D%3D%20aNumber%0A%09aNumber%20class%20%3D%20self%20class%20ifFalse%3A%20%5B%5Efalse%5D.%20%0A%09%3Creturn%20Number%28self%29%20%3D%3D%3D%20Number%28aNumber%29%3E%20'),
  2683. messageSends: ["ifFalse:", unescape("%3D"), "class"],
  2684. referencedClasses: []
  2685. }),
  2686. smalltalk.Number);
  2687. smalltalk.addMethod(
  2688. '_pi',
  2689. smalltalk.method({
  2690. selector: 'pi',
  2691. category: 'instance creation',
  2692. fn: function (){
  2693. var self=this;
  2694. return Math.PI;
  2695. return self;},
  2696. args: [],
  2697. source: unescape('pi%0A%09%3Creturn%20Math.PI%3E'),
  2698. messageSends: [],
  2699. referencedClasses: []
  2700. }),
  2701. smalltalk.Number.klass);
  2702. smalltalk.addClass('BlockClosure', smalltalk.Object, [], 'Kernel');
  2703. smalltalk.addMethod(
  2704. '_compiledSource',
  2705. smalltalk.method({
  2706. selector: 'compiledSource',
  2707. category: 'accessing',
  2708. fn: function (){
  2709. var self=this;
  2710. return self.toString();
  2711. return self;},
  2712. args: [],
  2713. source: unescape('compiledSource%0A%09%3Creturn%20self.toString%28%29%3E'),
  2714. messageSends: [],
  2715. referencedClasses: []
  2716. }),
  2717. smalltalk.BlockClosure);
  2718. smalltalk.addMethod(
  2719. '_whileTrue_',
  2720. smalltalk.method({
  2721. selector: 'whileTrue:',
  2722. category: 'controlling',
  2723. fn: function (aBlock){
  2724. var self=this;
  2725. while(self()) {aBlock()};
  2726. return self;},
  2727. args: ["aBlock"],
  2728. 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'),
  2729. messageSends: [],
  2730. referencedClasses: []
  2731. }),
  2732. smalltalk.BlockClosure);
  2733. smalltalk.addMethod(
  2734. '_whileFalse_',
  2735. smalltalk.method({
  2736. selector: 'whileFalse:',
  2737. category: 'controlling',
  2738. fn: function (aBlock){
  2739. var self=this;
  2740. while(!self()) {aBlock()};
  2741. return self;},
  2742. args: ["aBlock"],
  2743. 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'),
  2744. messageSends: [],
  2745. referencedClasses: []
  2746. }),
  2747. smalltalk.BlockClosure);
  2748. smalltalk.addMethod(
  2749. '_value',
  2750. smalltalk.method({
  2751. selector: 'value',
  2752. category: 'evaluating',
  2753. fn: function (){
  2754. var self=this;
  2755. return self();;
  2756. return self;},
  2757. args: [],
  2758. source: unescape('value%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%28%29%3B%3E'),
  2759. messageSends: [],
  2760. referencedClasses: []
  2761. }),
  2762. smalltalk.BlockClosure);
  2763. smalltalk.addMethod(
  2764. '_value_',
  2765. smalltalk.method({
  2766. selector: 'value:',
  2767. category: 'evaluating',
  2768. fn: function (anArg){
  2769. var self=this;
  2770. return self(anArg);;
  2771. return self;},
  2772. args: ["anArg"],
  2773. source: unescape('value%3A%20anArg%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%28anArg%29%3B%3E'),
  2774. messageSends: [],
  2775. referencedClasses: []
  2776. }),
  2777. smalltalk.BlockClosure);
  2778. smalltalk.addMethod(
  2779. '_value_value_',
  2780. smalltalk.method({
  2781. selector: 'value:value:',
  2782. category: 'evaluating',
  2783. fn: function (firstArg, secondArg){
  2784. var self=this;
  2785. return self(firstArg, secondArg);;
  2786. return self;},
  2787. args: ["firstArg", "secondArg"],
  2788. 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'),
  2789. messageSends: [],
  2790. referencedClasses: []
  2791. }),
  2792. smalltalk.BlockClosure);
  2793. smalltalk.addMethod(
  2794. '_value_value_value_',
  2795. smalltalk.method({
  2796. selector: 'value:value:value:',
  2797. category: 'evaluating',
  2798. fn: function (firstArg, secondArg, thirdArg){
  2799. var self=this;
  2800. return self(firstArg, secondArg, thirdArg);;
  2801. return self;},
  2802. args: ["firstArg", "secondArg", "thirdArg"],
  2803. 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'),
  2804. messageSends: [],
  2805. referencedClasses: []
  2806. }),
  2807. smalltalk.BlockClosure);
  2808. smalltalk.addMethod(
  2809. '_valueWithPossibleArguments_',
  2810. smalltalk.method({
  2811. selector: 'valueWithPossibleArguments:',
  2812. category: 'evaluating',
  2813. fn: function (aCollection){
  2814. var self=this;
  2815. return self.apply(null, aCollection);;
  2816. return self;},
  2817. args: ["aCollection"],
  2818. source: unescape('valueWithPossibleArguments%3A%20aCollection%0A%09%3Creturn%20self.apply%28null%2C%20aCollection%29%3B%3E'),
  2819. messageSends: [],
  2820. referencedClasses: []
  2821. }),
  2822. smalltalk.BlockClosure);
  2823. smalltalk.addMethod(
  2824. '_on_do_',
  2825. smalltalk.method({
  2826. selector: 'on:do:',
  2827. category: 'error handling',
  2828. fn: function (anErrorClass, aBlock){
  2829. var self=this;
  2830. smalltalk.send(self, "_try_catch_", [self, (function(error){return (($receiver = smalltalk.send(error, "_isKindOf_", [anErrorClass])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(aBlock, "_value_", [error]);})() : (function(){return smalltalk.send(error, "_signal", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(aBlock, "_value_", [error]);}), (function(){return smalltalk.send(error, "_signal", []);})]);})]);
  2831. return self;},
  2832. args: ["anErrorClass", "aBlock"],
  2833. 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'),
  2834. messageSends: ["try:catch:", "ifTrue:ifFalse:", "isKindOf:", "value:", "signal"],
  2835. referencedClasses: []
  2836. }),
  2837. smalltalk.BlockClosure);
  2838. smalltalk.addMethod(
  2839. '_valueWithTimeout_',
  2840. smalltalk.method({
  2841. selector: 'valueWithTimeout:',
  2842. category: 'timeout/interval',
  2843. fn: function (aNumber){
  2844. var self=this;
  2845. return setTimeout(self, aNumber);
  2846. return self;},
  2847. args: ["aNumber"],
  2848. source: unescape('valueWithTimeout%3A%20aNumber%0A%09%3Creturn%20setTimeout%28self%2C%20aNumber%29%3E'),
  2849. messageSends: [],
  2850. referencedClasses: []
  2851. }),
  2852. smalltalk.BlockClosure);
  2853. smalltalk.addMethod(
  2854. '_valueWithInterval_',
  2855. smalltalk.method({
  2856. selector: 'valueWithInterval:',
  2857. category: 'timeout/interval',
  2858. fn: function (aNumber){
  2859. var self=this;
  2860. return setInterval(self, aNumber);
  2861. return self;},
  2862. args: ["aNumber"],
  2863. source: unescape('valueWithInterval%3A%20aNumber%0A%09%3Creturn%20setInterval%28self%2C%20aNumber%29%3E'),
  2864. messageSends: [],
  2865. referencedClasses: []
  2866. }),
  2867. smalltalk.BlockClosure);
  2868. smalltalk.addMethod(
  2869. '_whileFalse',
  2870. smalltalk.method({
  2871. selector: 'whileFalse',
  2872. category: 'controlling',
  2873. fn: function (){
  2874. var self=this;
  2875. smalltalk.send(self, "_whileFalse_", [(function(){return nil;})]);
  2876. return self;},
  2877. args: [],
  2878. source: unescape('whileFalse%0A%09%22inlined%20in%20the%20Compiler%22%0A%09self%20whileFalse%3A%20%5B%5D'),
  2879. messageSends: ["whileFalse:"],
  2880. referencedClasses: []
  2881. }),
  2882. smalltalk.BlockClosure);
  2883. smalltalk.addMethod(
  2884. '_whileTrue',
  2885. smalltalk.method({
  2886. selector: 'whileTrue',
  2887. category: 'controlling',
  2888. fn: function (){
  2889. var self=this;
  2890. smalltalk.send(self, "_whileTrue_", [(function(){return nil;})]);
  2891. return self;},
  2892. args: [],
  2893. source: unescape('whileTrue%0A%09%22inlined%20in%20the%20Compiler%22%0A%09self%20whileTrue%3A%20%5B%5D'),
  2894. messageSends: ["whileTrue:"],
  2895. referencedClasses: []
  2896. }),
  2897. smalltalk.BlockClosure);
  2898. smalltalk.addMethod(
  2899. '_new',
  2900. smalltalk.method({
  2901. selector: 'new',
  2902. category: 'evaluating',
  2903. fn: function (){
  2904. var self=this;
  2905. return new self();
  2906. return self;},
  2907. args: [],
  2908. 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'),
  2909. messageSends: [],
  2910. referencedClasses: []
  2911. }),
  2912. smalltalk.BlockClosure);
  2913. smalltalk.addMethod(
  2914. '_applyTo_arguments_',
  2915. smalltalk.method({
  2916. selector: 'applyTo:arguments:',
  2917. category: 'evaluating',
  2918. fn: function (anObject, aCollection){
  2919. var self=this;
  2920. return self.apply(anObject, aCollection);
  2921. return self;},
  2922. args: ["anObject", "aCollection"],
  2923. source: unescape('applyTo%3A%20anObject%20arguments%3A%20aCollection%0A%09%3Creturn%20self.apply%28anObject%2C%20aCollection%29%3E'),
  2924. messageSends: [],
  2925. referencedClasses: []
  2926. }),
  2927. smalltalk.BlockClosure);
  2928. smalltalk.addMethod(
  2929. '_timeToRun',
  2930. smalltalk.method({
  2931. selector: 'timeToRun',
  2932. category: 'evaluating',
  2933. fn: function (){
  2934. var self=this;
  2935. return smalltalk.send((smalltalk.Date || Date), "_millisecondsToRun_", [self]);
  2936. return self;},
  2937. args: [],
  2938. source: unescape('timeToRun%0A%09%22Answer%20the%20number%20of%20milliseconds%20taken%20to%20execute%20this%20block.%22%0A%0A%09%5E%20Date%20millisecondsToRun%3A%20self'),
  2939. messageSends: ["millisecondsToRun:"],
  2940. referencedClasses: [smalltalk.Date]
  2941. }),
  2942. smalltalk.BlockClosure);
  2943. smalltalk.addClass('Boolean', smalltalk.Object, [], 'Kernel');
  2944. smalltalk.addMethod(
  2945. '_shallowCopy',
  2946. smalltalk.method({
  2947. selector: 'shallowCopy',
  2948. category: 'copying',
  2949. fn: function (){
  2950. var self=this;
  2951. return self;
  2952. return self;},
  2953. args: [],
  2954. source: unescape('shallowCopy%0A%09%5Eself'),
  2955. messageSends: [],
  2956. referencedClasses: []
  2957. }),
  2958. smalltalk.Boolean);
  2959. smalltalk.addMethod(
  2960. '_deepCopy',
  2961. smalltalk.method({
  2962. selector: 'deepCopy',
  2963. category: 'copying',
  2964. fn: function (){
  2965. var self=this;
  2966. return self;
  2967. return self;},
  2968. args: [],
  2969. source: unescape('deepCopy%0A%09%5Eself'),
  2970. messageSends: [],
  2971. referencedClasses: []
  2972. }),
  2973. smalltalk.Boolean);
  2974. smalltalk.addMethod(
  2975. '_ifTrue_',
  2976. smalltalk.method({
  2977. selector: 'ifTrue:',
  2978. category: 'controlling',
  2979. fn: function (aBlock){
  2980. var self=this;
  2981. return smalltalk.send(self, "_ifTrue_ifFalse_", [aBlock, (function(){return nil;})]);
  2982. return self;},
  2983. args: ["aBlock"],
  2984. source: unescape('ifTrue%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself%20ifTrue%3A%20aBlock%20ifFalse%3A%20%5B%5D'),
  2985. messageSends: ["ifTrue:ifFalse:"],
  2986. referencedClasses: []
  2987. }),
  2988. smalltalk.Boolean);
  2989. smalltalk.addMethod(
  2990. '_ifFalse_',
  2991. smalltalk.method({
  2992. selector: 'ifFalse:',
  2993. category: 'controlling',
  2994. fn: function (aBlock){
  2995. var self=this;
  2996. return smalltalk.send(self, "_ifTrue_ifFalse_", [(function(){return nil;}), aBlock]);
  2997. return self;},
  2998. args: ["aBlock"],
  2999. source: unescape('ifFalse%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself%20ifTrue%3A%20%5B%5D%20ifFalse%3A%20aBlock'),
  3000. messageSends: ["ifTrue:ifFalse:"],
  3001. referencedClasses: []
  3002. }),
  3003. smalltalk.Boolean);
  3004. smalltalk.addMethod(
  3005. '_ifFalse_ifTrue_',
  3006. smalltalk.method({
  3007. selector: 'ifFalse:ifTrue:',
  3008. category: 'controlling',
  3009. fn: function (aBlock, anotherBlock){
  3010. var self=this;
  3011. return smalltalk.send(self, "_ifTrue_ifFalse_", [anotherBlock, aBlock]);
  3012. return self;},
  3013. args: ["aBlock", "anotherBlock"],
  3014. source: unescape('ifFalse%3A%20aBlock%20ifTrue%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself%20ifTrue%3A%20anotherBlock%20ifFalse%3A%20aBlock'),
  3015. messageSends: ["ifTrue:ifFalse:"],
  3016. referencedClasses: []
  3017. }),
  3018. smalltalk.Boolean);
  3019. smalltalk.addMethod(
  3020. '_ifTrue_ifFalse_',
  3021. smalltalk.method({
  3022. selector: 'ifTrue:ifFalse:',
  3023. category: 'controlling',
  3024. fn: function (aBlock, anotherBlock){
  3025. var self=this;
  3026. if(self == true) {
  3027. return aBlock();
  3028. } else {
  3029. return anotherBlock();
  3030. }
  3031. ;
  3032. return self;},
  3033. args: ["aBlock", "anotherBlock"],
  3034. 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'),
  3035. messageSends: [],
  3036. referencedClasses: []
  3037. }),
  3038. smalltalk.Boolean);
  3039. smalltalk.addMethod(
  3040. '_and_',
  3041. smalltalk.method({
  3042. selector: 'and:',
  3043. category: 'controlling',
  3044. fn: function (aBlock){
  3045. var self=this;
  3046. return smalltalk.send(smalltalk.send(self, "__eq", [true]), "_ifTrue_ifFalse_", [aBlock, (function(){return false;})]);
  3047. return self;},
  3048. args: ["aBlock"],
  3049. 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'),
  3050. messageSends: ["ifTrue:ifFalse:", unescape("%3D")],
  3051. referencedClasses: []
  3052. }),
  3053. smalltalk.Boolean);
  3054. smalltalk.addMethod(
  3055. '_or_',
  3056. smalltalk.method({
  3057. selector: 'or:',
  3058. category: 'controlling',
  3059. fn: function (aBlock){
  3060. var self=this;
  3061. return smalltalk.send(smalltalk.send(self, "__eq", [true]), "_ifTrue_ifFalse_", [(function(){return true;}), aBlock]);
  3062. return self;},
  3063. args: ["aBlock"],
  3064. 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'),
  3065. messageSends: ["ifTrue:ifFalse:", unescape("%3D")],
  3066. referencedClasses: []
  3067. }),
  3068. smalltalk.Boolean);
  3069. smalltalk.addMethod(
  3070. '_not',
  3071. smalltalk.method({
  3072. selector: 'not',
  3073. category: 'controlling',
  3074. fn: function (){
  3075. var self=this;
  3076. return smalltalk.send(self, "__eq", [false]);
  3077. return self;},
  3078. args: [],
  3079. source: unescape('not%0A%09%5Eself%20%3D%20false'),
  3080. messageSends: [unescape("%3D")],
  3081. referencedClasses: []
  3082. }),
  3083. smalltalk.Boolean);
  3084. smalltalk.addMethod(
  3085. '_printString',
  3086. smalltalk.method({
  3087. selector: 'printString',
  3088. category: 'printing',
  3089. fn: function (){
  3090. var self=this;
  3091. return self.toString();
  3092. return self;},
  3093. args: [],
  3094. source: unescape('printString%0A%09%3Creturn%20self.toString%28%29%3E'),
  3095. messageSends: [],
  3096. referencedClasses: []
  3097. }),
  3098. smalltalk.Boolean);
  3099. smalltalk.addMethod(
  3100. '_asJSONObject',
  3101. smalltalk.method({
  3102. selector: 'asJSONObject',
  3103. category: 'converting',
  3104. fn: function (){
  3105. var self=this;
  3106. return self;
  3107. return self;},
  3108. args: [],
  3109. source: unescape('asJSONObject%0A%09%5Eself'),
  3110. messageSends: [],
  3111. referencedClasses: []
  3112. }),
  3113. smalltalk.Boolean);
  3114. smalltalk.addMethod(
  3115. '_&',
  3116. smalltalk.method({
  3117. selector: '&',
  3118. category: 'controlling',
  3119. fn: function (aBoolean){
  3120. var self=this;
  3121. if(self == true) {
  3122. return aBoolean;
  3123. } else {
  3124. return false;
  3125. }
  3126. ;
  3127. return self;},
  3128. args: ["aBoolean"],
  3129. source: unescape('%26%20aBoolean%0A%09%3C%0A%09%20%20%20%20if%28self%20%3D%3D%20true%29%20%7B%0A%09%09return%20aBoolean%3B%0A%09%20%20%20%20%7D%20else%20%7B%0A%09%09return%20false%3B%0A%09%20%20%20%20%7D%0A%09%3E'),
  3130. messageSends: [],
  3131. referencedClasses: []
  3132. }),
  3133. smalltalk.Boolean);
  3134. smalltalk.addMethod(
  3135. '_|',
  3136. smalltalk.method({
  3137. selector: '|',
  3138. category: 'controlling',
  3139. fn: function (aBoolean){
  3140. var self=this;
  3141. if(self == true) {
  3142. return true;
  3143. } else {
  3144. return aBoolean;
  3145. }
  3146. ;
  3147. return self;},
  3148. args: ["aBoolean"],
  3149. source: unescape('%7C%20aBoolean%0A%09%3C%0A%09%20%20%20%20if%28self%20%3D%3D%20true%29%20%7B%0A%09%09return%20true%3B%0A%09%20%20%20%20%7D%20else%20%7B%0A%09%09return%20aBoolean%3B%0A%09%20%20%20%20%7D%0A%09%3E'),
  3150. messageSends: [],
  3151. referencedClasses: []
  3152. }),
  3153. smalltalk.Boolean);
  3154. smalltalk.addMethod(
  3155. '__eq',
  3156. smalltalk.method({
  3157. selector: '=',
  3158. category: 'comparing',
  3159. fn: function (aBoolean){
  3160. var self=this;
  3161. try{(($receiver = smalltalk.send(smalltalk.send(aBoolean, "_class", []), "__eq", [smalltalk.send(self, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]);
  3162. return Boolean(self == true) == aBoolean;
  3163. return self;
  3164. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
  3165. args: ["aBoolean"],
  3166. source: unescape('%3D%20aBoolean%0A%09aBoolean%20class%20%3D%20self%20class%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09%3Creturn%20Boolean%28self%20%3D%3D%20true%29%20%3D%3D%20aBoolean%3E'),
  3167. messageSends: ["ifFalse:", unescape("%3D"), "class"],
  3168. referencedClasses: []
  3169. }),
  3170. smalltalk.Boolean);
  3171. smalltalk.addMethod(
  3172. '__eq_eq',
  3173. smalltalk.method({
  3174. selector: '==',
  3175. category: 'comparing',
  3176. fn: function (aBoolean){
  3177. var self=this;
  3178. try{(($receiver = smalltalk.send(smalltalk.send(aBoolean, "_class", []), "__eq", [smalltalk.send(self, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq_eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq_eq', fn: function(){return false}})})();})]);
  3179. return Boolean(self == true) === Boolean(aBoolean == true);
  3180. return self;
  3181. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq_eq'){return e.fn()} throw(e)}},
  3182. args: ["aBoolean"],
  3183. source: unescape('%3D%3D%20aBoolean%0A%09aBoolean%20class%20%3D%20self%20class%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09%3Creturn%20Boolean%28self%20%3D%3D%20true%29%20%3D%3D%3D%20Boolean%28aBoolean%20%3D%3D%20true%29%3E'),
  3184. messageSends: ["ifFalse:", unescape("%3D"), "class"],
  3185. referencedClasses: []
  3186. }),
  3187. smalltalk.Boolean);
  3188. smalltalk.addClass('Date', smalltalk.Object, [], 'Kernel');
  3189. smalltalk.Date.comment=unescape('The%20Date%20class%20is%20used%20to%20work%20with%20dates%20and%20times.')
  3190. smalltalk.addMethod(
  3191. '_year',
  3192. smalltalk.method({
  3193. selector: 'year',
  3194. category: 'accessing',
  3195. fn: function (){
  3196. var self=this;
  3197. return self.getFullYear();
  3198. return self;},
  3199. args: [],
  3200. source: unescape('year%0A%09%3Creturn%20self.getFullYear%28%29%3E'),
  3201. messageSends: [],
  3202. referencedClasses: []
  3203. }),
  3204. smalltalk.Date);
  3205. smalltalk.addMethod(
  3206. '_month',
  3207. smalltalk.method({
  3208. selector: 'month',
  3209. category: 'accessing',
  3210. fn: function (){
  3211. var self=this;
  3212. return self.getMonth() + 1;
  3213. return self;},
  3214. args: [],
  3215. source: unescape('month%0A%09%3Creturn%20self.getMonth%28%29%20+%201%3E'),
  3216. messageSends: [],
  3217. referencedClasses: []
  3218. }),
  3219. smalltalk.Date);
  3220. smalltalk.addMethod(
  3221. '_month_',
  3222. smalltalk.method({
  3223. selector: 'month:',
  3224. category: 'accessing',
  3225. fn: function (aNumber){
  3226. var self=this;
  3227. self.setMonth(aNumber - 1);
  3228. return self;},
  3229. args: ["aNumber"],
  3230. source: unescape('month%3A%20aNumber%0A%09%3Cself.setMonth%28aNumber%20-%201%29%3E'),
  3231. messageSends: [],
  3232. referencedClasses: []
  3233. }),
  3234. smalltalk.Date);
  3235. smalltalk.addMethod(
  3236. '_day',
  3237. smalltalk.method({
  3238. selector: 'day',
  3239. category: 'accessing',
  3240. fn: function (){
  3241. var self=this;
  3242. return smalltalk.send(self, "_dayOfWeek", []);
  3243. return self;},
  3244. args: [],
  3245. source: unescape('day%0A%09%5Eself%20dayOfWeek'),
  3246. messageSends: ["dayOfWeek"],
  3247. referencedClasses: []
  3248. }),
  3249. smalltalk.Date);
  3250. smalltalk.addMethod(
  3251. '_dayOfWeek',
  3252. smalltalk.method({
  3253. selector: 'dayOfWeek',
  3254. category: 'accessing',
  3255. fn: function (){
  3256. var self=this;
  3257. return self.getDay() + 1;
  3258. return self;},
  3259. args: [],
  3260. source: unescape('dayOfWeek%0A%09%3Creturn%20self.getDay%28%29%20+%201%3E'),
  3261. messageSends: [],
  3262. referencedClasses: []
  3263. }),
  3264. smalltalk.Date);
  3265. smalltalk.addMethod(
  3266. '_dayOfWeek_',
  3267. smalltalk.method({
  3268. selector: 'dayOfWeek:',
  3269. category: 'accessing',
  3270. fn: function (aNumber){
  3271. var self=this;
  3272. return self.setDay(aNumber - 1);
  3273. return self;},
  3274. args: ["aNumber"],
  3275. source: unescape('dayOfWeek%3A%20aNumber%0A%09%3Creturn%20self.setDay%28aNumber%20-%201%29%3E'),
  3276. messageSends: [],
  3277. referencedClasses: []
  3278. }),
  3279. smalltalk.Date);
  3280. smalltalk.addMethod(
  3281. '_day_',
  3282. smalltalk.method({
  3283. selector: 'day:',
  3284. category: 'accessing',
  3285. fn: function (aNumber){
  3286. var self=this;
  3287. smalltalk.send(self, "_day_", [aNumber]);
  3288. return self;},
  3289. args: ["aNumber"],
  3290. source: unescape('day%3A%20aNumber%0A%09self%20day%3A%20aNumber'),
  3291. messageSends: ["day:"],
  3292. referencedClasses: []
  3293. }),
  3294. smalltalk.Date);
  3295. smalltalk.addMethod(
  3296. '_year_',
  3297. smalltalk.method({
  3298. selector: 'year:',
  3299. category: 'accessing',
  3300. fn: function (aNumber){
  3301. var self=this;
  3302. self.setFullYear(aNumber);
  3303. return self;},
  3304. args: ["aNumber"],
  3305. source: unescape('year%3A%20aNumber%0A%09%3Cself.setFullYear%28aNumber%29%3E'),
  3306. messageSends: [],
  3307. referencedClasses: []
  3308. }),
  3309. smalltalk.Date);
  3310. smalltalk.addMethod(
  3311. '_dayOfMonth',
  3312. smalltalk.method({
  3313. selector: 'dayOfMonth',
  3314. category: 'accessing',
  3315. fn: function (){
  3316. var self=this;
  3317. return self.getDate();
  3318. return self;},
  3319. args: [],
  3320. source: unescape('dayOfMonth%0A%09%3Creturn%20self.getDate%28%29%3E'),
  3321. messageSends: [],
  3322. referencedClasses: []
  3323. }),
  3324. smalltalk.Date);
  3325. smalltalk.addMethod(
  3326. '_dayOfMonth_',
  3327. smalltalk.method({
  3328. selector: 'dayOfMonth:',
  3329. category: 'accessing',
  3330. fn: function (aNumber){
  3331. var self=this;
  3332. self.setDate(aNumber);
  3333. return self;},
  3334. args: ["aNumber"],
  3335. source: unescape('dayOfMonth%3A%20aNumber%0A%09%3Cself.setDate%28aNumber%29%3E'),
  3336. messageSends: [],
  3337. referencedClasses: []
  3338. }),
  3339. smalltalk.Date);
  3340. smalltalk.addMethod(
  3341. '_asString',
  3342. smalltalk.method({
  3343. selector: 'asString',
  3344. category: 'converting',
  3345. fn: function (){
  3346. var self=this;
  3347. return self.toString();
  3348. return self;},
  3349. args: [],
  3350. source: unescape('asString%0A%09%3Creturn%20self.toString%28%29%3E'),
  3351. messageSends: [],
  3352. referencedClasses: []
  3353. }),
  3354. smalltalk.Date);
  3355. smalltalk.addMethod(
  3356. '_printString',
  3357. smalltalk.method({
  3358. selector: 'printString',
  3359. category: 'printing',
  3360. fn: function (){
  3361. var self=this;
  3362. return smalltalk.send(self, "_asString", []);
  3363. return self;},
  3364. args: [],
  3365. source: unescape('printString%0A%09%5Eself%20asString'),
  3366. messageSends: ["asString"],
  3367. referencedClasses: []
  3368. }),
  3369. smalltalk.Date);
  3370. smalltalk.addMethod(
  3371. '_asMilliseconds',
  3372. smalltalk.method({
  3373. selector: 'asMilliseconds',
  3374. category: 'converting',
  3375. fn: function (){
  3376. var self=this;
  3377. return smalltalk.send(self, "_time", []);
  3378. return self;},
  3379. args: [],
  3380. source: unescape('asMilliseconds%0A%09%5Eself%20time'),
  3381. messageSends: ["time"],
  3382. referencedClasses: []
  3383. }),
  3384. smalltalk.Date);
  3385. smalltalk.addMethod(
  3386. '_time',
  3387. smalltalk.method({
  3388. selector: 'time',
  3389. category: 'accessing',
  3390. fn: function (){
  3391. var self=this;
  3392. return self.getTime();
  3393. return self;},
  3394. args: [],
  3395. source: unescape('time%0A%09%3Creturn%20self.getTime%28%29%3E'),
  3396. messageSends: [],
  3397. referencedClasses: []
  3398. }),
  3399. smalltalk.Date);
  3400. smalltalk.addMethod(
  3401. '_time_',
  3402. smalltalk.method({
  3403. selector: 'time:',
  3404. category: 'accessing',
  3405. fn: function (aNumber){
  3406. var self=this;
  3407. self.setTime(aNumber);
  3408. return self;},
  3409. args: ["aNumber"],
  3410. source: unescape('time%3A%20aNumber%0A%09%3Cself.setTime%28aNumber%29%3E'),
  3411. messageSends: [],
  3412. referencedClasses: []
  3413. }),
  3414. smalltalk.Date);
  3415. smalltalk.addMethod(
  3416. '_asDateString',
  3417. smalltalk.method({
  3418. selector: 'asDateString',
  3419. category: 'converting',
  3420. fn: function (){
  3421. var self=this;
  3422. return self.toDateString();
  3423. return self;},
  3424. args: [],
  3425. source: unescape('asDateString%0A%09%3Creturn%20self.toDateString%28%29%3E'),
  3426. messageSends: [],
  3427. referencedClasses: []
  3428. }),
  3429. smalltalk.Date);
  3430. smalltalk.addMethod(
  3431. '_asTimeString',
  3432. smalltalk.method({
  3433. selector: 'asTimeString',
  3434. category: 'converting',
  3435. fn: function (){
  3436. var self=this;
  3437. return self.toTimeString();
  3438. return self;},
  3439. args: [],
  3440. source: unescape('asTimeString%0A%09%3Creturn%20self.toTimeString%28%29%3E'),
  3441. messageSends: [],
  3442. referencedClasses: []
  3443. }),
  3444. smalltalk.Date);
  3445. smalltalk.addMethod(
  3446. '_asLocaleString',
  3447. smalltalk.method({
  3448. selector: 'asLocaleString',
  3449. category: 'converting',
  3450. fn: function (){
  3451. var self=this;
  3452. return self.toLocaleString();
  3453. return self;},
  3454. args: [],
  3455. source: unescape('asLocaleString%0A%09%3Creturn%20self.toLocaleString%28%29%3E'),
  3456. messageSends: [],
  3457. referencedClasses: []
  3458. }),
  3459. smalltalk.Date);
  3460. smalltalk.addMethod(
  3461. '_asNumber',
  3462. smalltalk.method({
  3463. selector: 'asNumber',
  3464. category: 'converting',
  3465. fn: function (){
  3466. var self=this;
  3467. return smalltalk.send(self, "_asMilliseconds", []);
  3468. return self;},
  3469. args: [],
  3470. source: unescape('asNumber%0A%09%5Eself%20asMilliseconds'),
  3471. messageSends: ["asMilliseconds"],
  3472. referencedClasses: []
  3473. }),
  3474. smalltalk.Date);
  3475. smalltalk.addMethod(
  3476. '_hours_',
  3477. smalltalk.method({
  3478. selector: 'hours:',
  3479. category: 'accessing',
  3480. fn: function (aNumber){
  3481. var self=this;
  3482. self.setHours(aNumber);
  3483. return self;},
  3484. args: ["aNumber"],
  3485. source: unescape('hours%3A%20aNumber%0A%09%3Cself.setHours%28aNumber%29%3E'),
  3486. messageSends: [],
  3487. referencedClasses: []
  3488. }),
  3489. smalltalk.Date);
  3490. smalltalk.addMethod(
  3491. '_minutes_',
  3492. smalltalk.method({
  3493. selector: 'minutes:',
  3494. category: 'accessing',
  3495. fn: function (aNumber){
  3496. var self=this;
  3497. self.setMinutes(aNumber);
  3498. return self;},
  3499. args: ["aNumber"],
  3500. source: unescape('minutes%3A%20aNumber%0A%09%3Cself.setMinutes%28aNumber%29%3E'),
  3501. messageSends: [],
  3502. referencedClasses: []
  3503. }),
  3504. smalltalk.Date);
  3505. smalltalk.addMethod(
  3506. '_seconds_',
  3507. smalltalk.method({
  3508. selector: 'seconds:',
  3509. category: 'accessing',
  3510. fn: function (aNumber){
  3511. var self=this;
  3512. self.setSeconds(aNumber);
  3513. return self;},
  3514. args: ["aNumber"],
  3515. source: unescape('seconds%3A%20aNumber%0A%09%3Cself.setSeconds%28aNumber%29%3E'),
  3516. messageSends: [],
  3517. referencedClasses: []
  3518. }),
  3519. smalltalk.Date);
  3520. smalltalk.addMethod(
  3521. '_milliseconds_',
  3522. smalltalk.method({
  3523. selector: 'milliseconds:',
  3524. category: 'accessing',
  3525. fn: function (aNumber){
  3526. var self=this;
  3527. self.setMilliseconds(aNumber);
  3528. return self;},
  3529. args: ["aNumber"],
  3530. source: unescape('milliseconds%3A%20aNumber%0A%09%3Cself.setMilliseconds%28aNumber%29%3E'),
  3531. messageSends: [],
  3532. referencedClasses: []
  3533. }),
  3534. smalltalk.Date);
  3535. smalltalk.addMethod(
  3536. '_hours',
  3537. smalltalk.method({
  3538. selector: 'hours',
  3539. category: 'accessing',
  3540. fn: function (){
  3541. var self=this;
  3542. return self.getHours();
  3543. return self;},
  3544. args: [],
  3545. source: unescape('hours%0A%09%3Creturn%20self.getHours%28%29%3E'),
  3546. messageSends: [],
  3547. referencedClasses: []
  3548. }),
  3549. smalltalk.Date);
  3550. smalltalk.addMethod(
  3551. '_minutes',
  3552. smalltalk.method({
  3553. selector: 'minutes',
  3554. category: 'accessing',
  3555. fn: function (){
  3556. var self=this;
  3557. return self.getMinutes();
  3558. return self;},
  3559. args: [],
  3560. source: unescape('minutes%0A%09%3Creturn%20self.getMinutes%28%29%3E'),
  3561. messageSends: [],
  3562. referencedClasses: []
  3563. }),
  3564. smalltalk.Date);
  3565. smalltalk.addMethod(
  3566. '_seconds',
  3567. smalltalk.method({
  3568. selector: 'seconds',
  3569. category: 'accessing',
  3570. fn: function (){
  3571. var self=this;
  3572. return self.getSeconds();
  3573. return self;},
  3574. args: [],
  3575. source: unescape('seconds%0A%09%3Creturn%20self.getSeconds%28%29%3E'),
  3576. messageSends: [],
  3577. referencedClasses: []
  3578. }),
  3579. smalltalk.Date);
  3580. smalltalk.addMethod(
  3581. '_milliseconds',
  3582. smalltalk.method({
  3583. selector: 'milliseconds',
  3584. category: 'accessing',
  3585. fn: function (){
  3586. var self=this;
  3587. return self.getMilliseconds();
  3588. return self;},
  3589. args: [],
  3590. source: unescape('milliseconds%0A%09%3Creturn%20self.getMilliseconds%28%29%3E'),
  3591. messageSends: [],
  3592. referencedClasses: []
  3593. }),
  3594. smalltalk.Date);
  3595. smalltalk.addMethod(
  3596. '__lt',
  3597. smalltalk.method({
  3598. selector: '<',
  3599. category: 'comparing',
  3600. fn: function (aDate){
  3601. var self=this;
  3602. return self < aDate;
  3603. return self;},
  3604. args: ["aDate"],
  3605. source: unescape('%3C%20aDate%0A%09%3Creturn%20self%20%3C%20aDate%3E'),
  3606. messageSends: [],
  3607. referencedClasses: []
  3608. }),
  3609. smalltalk.Date);
  3610. smalltalk.addMethod(
  3611. '__gt',
  3612. smalltalk.method({
  3613. selector: '>',
  3614. category: 'comparing',
  3615. fn: function (aDate){
  3616. var self=this;
  3617. return self > aDate;
  3618. return self;},
  3619. args: ["aDate"],
  3620. source: unescape('%3E%20aDate%0A%09%3Creturn%20self%20%3E%3E%20aDate%3E'),
  3621. messageSends: [],
  3622. referencedClasses: []
  3623. }),
  3624. smalltalk.Date);
  3625. smalltalk.addMethod(
  3626. '__lt_eq',
  3627. smalltalk.method({
  3628. selector: '<=',
  3629. category: 'comparing',
  3630. fn: function (aDate){
  3631. var self=this;
  3632. self <= aDate;
  3633. return self;},
  3634. args: ["aDate"],
  3635. source: unescape('%3C%3D%20aDate%0A%09%3Cself%20%3C%3D%20aDate%3E'),
  3636. messageSends: [],
  3637. referencedClasses: []
  3638. }),
  3639. smalltalk.Date);
  3640. smalltalk.addMethod(
  3641. '__gt_eq',
  3642. smalltalk.method({
  3643. selector: '>=',
  3644. category: 'comparing',
  3645. fn: function (aDate){
  3646. var self=this;
  3647. self >= aDate;
  3648. return self;},
  3649. args: ["aDate"],
  3650. source: unescape('%3E%3D%20aDate%0A%09%3Cself%20%3E%3E%3D%20aDate%3E'),
  3651. messageSends: [],
  3652. referencedClasses: []
  3653. }),
  3654. smalltalk.Date);
  3655. smalltalk.addMethod(
  3656. '__minus',
  3657. smalltalk.method({
  3658. selector: '-',
  3659. category: 'arithmetic',
  3660. fn: function (aDate){
  3661. var self=this;
  3662. return self - aDate;
  3663. return self;},
  3664. args: ["aDate"],
  3665. source: unescape('-%20aDate%0A%09%3Creturn%20self%20-%20aDate%3E'),
  3666. messageSends: [],
  3667. referencedClasses: []
  3668. }),
  3669. smalltalk.Date);
  3670. smalltalk.addMethod(
  3671. '__plus',
  3672. smalltalk.method({
  3673. selector: '+',
  3674. category: 'arithmetic',
  3675. fn: function (aDate){
  3676. var self=this;
  3677. return self + aDate;
  3678. return self;},
  3679. args: ["aDate"],
  3680. source: unescape('+%20aDate%0A%09%3Creturn%20self%20+%20aDate%3E'),
  3681. messageSends: [],
  3682. referencedClasses: []
  3683. }),
  3684. smalltalk.Date);
  3685. smalltalk.addMethod(
  3686. '_asJSONObject',
  3687. smalltalk.method({
  3688. selector: 'asJSONObject',
  3689. category: 'converting',
  3690. fn: function (){
  3691. var self=this;
  3692. return self;
  3693. return self;},
  3694. args: [],
  3695. source: unescape('asJSONObject%0A%09%5Eself'),
  3696. messageSends: [],
  3697. referencedClasses: []
  3698. }),
  3699. smalltalk.Date);
  3700. smalltalk.addMethod(
  3701. '_new_',
  3702. smalltalk.method({
  3703. selector: 'new:',
  3704. category: 'instance creation',
  3705. fn: function (anObject){
  3706. var self=this;
  3707. return new Date(anObject);
  3708. return self;},
  3709. args: ["anObject"],
  3710. source: unescape('new%3A%20anObject%0A%09%3Creturn%20new%20Date%28anObject%29%3E'),
  3711. messageSends: [],
  3712. referencedClasses: []
  3713. }),
  3714. smalltalk.Date.klass);
  3715. smalltalk.addMethod(
  3716. '_fromString_',
  3717. smalltalk.method({
  3718. selector: 'fromString:',
  3719. category: 'instance creation',
  3720. fn: function (aString){
  3721. var self=this;
  3722. return smalltalk.send(self, "_new_", [aString]);
  3723. return self;},
  3724. args: ["aString"],
  3725. 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'),
  3726. messageSends: ["new:"],
  3727. referencedClasses: []
  3728. }),
  3729. smalltalk.Date.klass);
  3730. smalltalk.addMethod(
  3731. '_fromSeconds_',
  3732. smalltalk.method({
  3733. selector: 'fromSeconds:',
  3734. category: 'instance creation',
  3735. fn: function (aNumber){
  3736. var self=this;
  3737. return smalltalk.send(self, "_fromMilliseconds_", [(($receiver = aNumber).klass === smalltalk.Number) ? $receiver *(1000) : smalltalk.send($receiver, "__star", [(1000)])]);
  3738. return self;},
  3739. args: ["aNumber"],
  3740. source: unescape('fromSeconds%3A%20aNumber%0A%09%5Eself%20fromMilliseconds%3A%20aNumber%20*%201000'),
  3741. messageSends: ["fromMilliseconds:", unescape("*")],
  3742. referencedClasses: []
  3743. }),
  3744. smalltalk.Date.klass);
  3745. smalltalk.addMethod(
  3746. '_fromMilliseconds_',
  3747. smalltalk.method({
  3748. selector: 'fromMilliseconds:',
  3749. category: 'instance creation',
  3750. fn: function (aNumber){
  3751. var self=this;
  3752. return smalltalk.send(self, "_new_", [aNumber]);
  3753. return self;},
  3754. args: ["aNumber"],
  3755. source: unescape('fromMilliseconds%3A%20aNumber%0A%09%5Eself%20new%3A%20aNumber'),
  3756. messageSends: ["new:"],
  3757. referencedClasses: []
  3758. }),
  3759. smalltalk.Date.klass);
  3760. smalltalk.addMethod(
  3761. '_today',
  3762. smalltalk.method({
  3763. selector: 'today',
  3764. category: 'instance creation',
  3765. fn: function (){
  3766. var self=this;
  3767. return smalltalk.send(self, "_new", []);
  3768. return self;},
  3769. args: [],
  3770. source: unescape('today%0A%09%5Eself%20new'),
  3771. messageSends: ["new"],
  3772. referencedClasses: []
  3773. }),
  3774. smalltalk.Date.klass);
  3775. smalltalk.addMethod(
  3776. '_now',
  3777. smalltalk.method({
  3778. selector: 'now',
  3779. category: 'instance creation',
  3780. fn: function (){
  3781. var self=this;
  3782. return smalltalk.send(self, "_today", []);
  3783. return self;},
  3784. args: [],
  3785. source: unescape('now%0A%09%5Eself%20today'),
  3786. messageSends: ["today"],
  3787. referencedClasses: []
  3788. }),
  3789. smalltalk.Date.klass);
  3790. smalltalk.addMethod(
  3791. '_millisecondsToRun_',
  3792. smalltalk.method({
  3793. selector: 'millisecondsToRun:',
  3794. category: 'instance creation',
  3795. fn: function (aBlock){
  3796. var self=this;
  3797. var t=nil;
  3798. t=smalltalk.send((smalltalk.Date || Date), "_now", []);
  3799. smalltalk.send(aBlock, "_value", []);
  3800. return (($receiver = smalltalk.send((smalltalk.Date || Date), "_now", [])).klass === smalltalk.Number) ? $receiver -t : smalltalk.send($receiver, "__minus", [t]);
  3801. return self;},
  3802. args: ["aBlock"],
  3803. 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'),
  3804. messageSends: ["now", "value", unescape("-")],
  3805. referencedClasses: [smalltalk.Date]
  3806. }),
  3807. smalltalk.Date.klass);
  3808. smalltalk.addClass('UndefinedObject', smalltalk.Object, [], 'Kernel');
  3809. smalltalk.addMethod(
  3810. '_subclass_instanceVariableNames_',
  3811. smalltalk.method({
  3812. selector: 'subclass:instanceVariableNames:',
  3813. category: 'class creation',
  3814. fn: function (aString, anotherString){
  3815. var self=this;
  3816. return smalltalk.send(self, "_subclass_instanceVariableNames_module_", [aString, anotherString, nil]);
  3817. return self;},
  3818. args: ["aString", "anotherString"],
  3819. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20anotherString%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20anotherString%20module%3A%20nil'),
  3820. messageSends: ["subclass:instanceVariableNames:module:"],
  3821. referencedClasses: []
  3822. }),
  3823. smalltalk.UndefinedObject);
  3824. smalltalk.addMethod(
  3825. '_subclass_instanceVariableNames_category_',
  3826. smalltalk.method({
  3827. selector: 'subclass:instanceVariableNames:category:',
  3828. category: 'class creation',
  3829. fn: function (aString, aString2, aString3){
  3830. var self=this;
  3831. return smalltalk.send(self, "_subclass_instanceVariableNames_module_", [aString, aString2, aString3]);
  3832. return self;},
  3833. args: ["aString", "aString2", "aString3"],
  3834. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20category%3A%20aString3%0A%09%22Kept%20for%20compatibility.%22%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20module%3A%20aString3'),
  3835. messageSends: ["subclass:instanceVariableNames:module:"],
  3836. referencedClasses: []
  3837. }),
  3838. smalltalk.UndefinedObject);
  3839. smalltalk.addMethod(
  3840. '_shallowCopy',
  3841. smalltalk.method({
  3842. selector: 'shallowCopy',
  3843. category: 'copying',
  3844. fn: function (){
  3845. var self=this;
  3846. return self;
  3847. return self;},
  3848. args: [],
  3849. source: unescape('shallowCopy%0A%09%5Eself'),
  3850. messageSends: [],
  3851. referencedClasses: []
  3852. }),
  3853. smalltalk.UndefinedObject);
  3854. smalltalk.addMethod(
  3855. '_deepCopy',
  3856. smalltalk.method({
  3857. selector: 'deepCopy',
  3858. category: 'copying',
  3859. fn: function (){
  3860. var self=this;
  3861. return self;
  3862. return self;},
  3863. args: [],
  3864. source: unescape('deepCopy%0A%09%5Eself'),
  3865. messageSends: [],
  3866. referencedClasses: []
  3867. }),
  3868. smalltalk.UndefinedObject);
  3869. smalltalk.addMethod(
  3870. '_ifNil_',
  3871. smalltalk.method({
  3872. selector: 'ifNil:',
  3873. category: 'testing',
  3874. fn: function (aBlock){
  3875. var self=this;
  3876. return smalltalk.send(self, "_ifNil_ifNotNil_", [aBlock, (function(){return nil;})]);
  3877. return self;},
  3878. args: ["aBlock"],
  3879. source: unescape('ifNil%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself%20ifNil%3A%20aBlock%20ifNotNil%3A%20%5B%5D'),
  3880. messageSends: ["ifNil:ifNotNil:"],
  3881. referencedClasses: []
  3882. }),
  3883. smalltalk.UndefinedObject);
  3884. smalltalk.addMethod(
  3885. '_ifNotNil_',
  3886. smalltalk.method({
  3887. selector: 'ifNotNil:',
  3888. category: 'testing',
  3889. fn: function (aBlock){
  3890. var self=this;
  3891. return self;
  3892. return self;},
  3893. args: ["aBlock"],
  3894. source: unescape('ifNotNil%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself'),
  3895. messageSends: [],
  3896. referencedClasses: []
  3897. }),
  3898. smalltalk.UndefinedObject);
  3899. smalltalk.addMethod(
  3900. '_ifNil_ifNotNil_',
  3901. smalltalk.method({
  3902. selector: 'ifNil:ifNotNil:',
  3903. category: 'testing',
  3904. fn: function (aBlock, anotherBlock){
  3905. var self=this;
  3906. return smalltalk.send(aBlock, "_value", []);
  3907. return self;},
  3908. args: ["aBlock", "anotherBlock"],
  3909. source: unescape('ifNil%3A%20aBlock%20ifNotNil%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EaBlock%20value'),
  3910. messageSends: ["value"],
  3911. referencedClasses: []
  3912. }),
  3913. smalltalk.UndefinedObject);
  3914. smalltalk.addMethod(
  3915. '_ifNotNil_ifNil_',
  3916. smalltalk.method({
  3917. selector: 'ifNotNil:ifNil:',
  3918. category: 'testing',
  3919. fn: function (aBlock, anotherBlock){
  3920. var self=this;
  3921. return smalltalk.send(anotherBlock, "_value", []);
  3922. return self;},
  3923. args: ["aBlock", "anotherBlock"],
  3924. source: unescape('ifNotNil%3A%20aBlock%20ifNil%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EanotherBlock%20value'),
  3925. messageSends: ["value"],
  3926. referencedClasses: []
  3927. }),
  3928. smalltalk.UndefinedObject);
  3929. smalltalk.addMethod(
  3930. '_isNil',
  3931. smalltalk.method({
  3932. selector: 'isNil',
  3933. category: 'testing',
  3934. fn: function (){
  3935. var self=this;
  3936. return true;
  3937. return self;},
  3938. args: [],
  3939. source: unescape('isNil%0A%09%5Etrue'),
  3940. messageSends: [],
  3941. referencedClasses: []
  3942. }),
  3943. smalltalk.UndefinedObject);
  3944. smalltalk.addMethod(
  3945. '_notNil',
  3946. smalltalk.method({
  3947. selector: 'notNil',
  3948. category: 'testing',
  3949. fn: function (){
  3950. var self=this;
  3951. return false;
  3952. return self;},
  3953. args: [],
  3954. source: unescape('notNil%0A%09%5Efalse'),
  3955. messageSends: [],
  3956. referencedClasses: []
  3957. }),
  3958. smalltalk.UndefinedObject);
  3959. smalltalk.addMethod(
  3960. '_printString',
  3961. smalltalk.method({
  3962. selector: 'printString',
  3963. category: 'printing',
  3964. fn: function (){
  3965. var self=this;
  3966. return "nil";
  3967. return self;},
  3968. args: [],
  3969. source: unescape('printString%0A%20%20%20%20%5E%27nil%27'),
  3970. messageSends: [],
  3971. referencedClasses: []
  3972. }),
  3973. smalltalk.UndefinedObject);
  3974. smalltalk.addMethod(
  3975. '_subclass_instanceVariableNames_module_',
  3976. smalltalk.method({
  3977. selector: 'subclass:instanceVariableNames:module:',
  3978. category: 'class creation',
  3979. fn: function (aString, aString2, aString3){
  3980. var self=this;
  3981. return smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_superclass_subclass_instanceVariableNames_module_", [self, aString, aString2, aString3]);
  3982. return self;},
  3983. args: ["aString", "aString2", "aString3"],
  3984. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20module%3A%20aString3%0A%09%5EClassBuilder%20new%0A%09%20%20%20%20superclass%3A%20self%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20module%3A%20aString3'),
  3985. messageSends: ["superclass:subclass:instanceVariableNames:module:", "new"],
  3986. referencedClasses: [smalltalk.nil]
  3987. }),
  3988. smalltalk.UndefinedObject);
  3989. smalltalk.addMethod(
  3990. '_new',
  3991. smalltalk.method({
  3992. selector: 'new',
  3993. category: 'instance creation',
  3994. fn: function (){
  3995. var self=this;
  3996. smalltalk.send(self, "_error_", ["You cannot create new instances of UndefinedObject. Use nil"]);
  3997. return self;},
  3998. args: [],
  3999. source: unescape('new%0A%09%20%20%20%20self%20error%3A%20%27You%20cannot%20create%20new%20instances%20of%20UndefinedObject.%20Use%20nil%27'),
  4000. messageSends: ["error:"],
  4001. referencedClasses: []
  4002. }),
  4003. smalltalk.UndefinedObject.klass);
  4004. smalltalk.addClass('Collection', smalltalk.Object, [], 'Kernel');
  4005. smalltalk.addMethod(
  4006. '_size',
  4007. smalltalk.method({
  4008. selector: 'size',
  4009. category: 'accessing',
  4010. fn: function (){
  4011. var self=this;
  4012. smalltalk.send(self, "_subclassResponsibility", []);
  4013. return self;},
  4014. args: [],
  4015. source: unescape('size%0A%09self%20subclassResponsibility'),
  4016. messageSends: ["subclassResponsibility"],
  4017. referencedClasses: []
  4018. }),
  4019. smalltalk.Collection);
  4020. smalltalk.addMethod(
  4021. '_readStream',
  4022. smalltalk.method({
  4023. selector: 'readStream',
  4024. category: 'accessing',
  4025. fn: function (){
  4026. var self=this;
  4027. return smalltalk.send(self, "_stream", []);
  4028. return self;},
  4029. args: [],
  4030. source: unescape('readStream%0A%09%5Eself%20stream'),
  4031. messageSends: ["stream"],
  4032. referencedClasses: []
  4033. }),
  4034. smalltalk.Collection);
  4035. smalltalk.addMethod(
  4036. '_writeStream',
  4037. smalltalk.method({
  4038. selector: 'writeStream',
  4039. category: 'accessing',
  4040. fn: function (){
  4041. var self=this;
  4042. return smalltalk.send(self, "_stream", []);
  4043. return self;},
  4044. args: [],
  4045. source: unescape('writeStream%0A%09%5Eself%20stream'),
  4046. messageSends: ["stream"],
  4047. referencedClasses: []
  4048. }),
  4049. smalltalk.Collection);
  4050. smalltalk.addMethod(
  4051. '_stream',
  4052. smalltalk.method({
  4053. selector: 'stream',
  4054. category: 'accessing',
  4055. fn: function (){
  4056. var self=this;
  4057. return smalltalk.send(smalltalk.send(self, "_streamClass", []), "_on_", [self]);
  4058. return self;},
  4059. args: [],
  4060. source: unescape('stream%0A%09%5Eself%20streamClass%20on%3A%20self'),
  4061. messageSends: ["on:", "streamClass"],
  4062. referencedClasses: []
  4063. }),
  4064. smalltalk.Collection);
  4065. smalltalk.addMethod(
  4066. '_streamClass',
  4067. smalltalk.method({
  4068. selector: 'streamClass',
  4069. category: 'accessing',
  4070. fn: function (){
  4071. var self=this;
  4072. return smalltalk.send(smalltalk.send(self, "_class", []), "_streamClass", []);
  4073. return self;},
  4074. args: [],
  4075. source: unescape('streamClass%0A%09%5Eself%20class%20streamClass'),
  4076. messageSends: ["streamClass", "class"],
  4077. referencedClasses: []
  4078. }),
  4079. smalltalk.Collection);
  4080. smalltalk.addMethod(
  4081. '_add_',
  4082. smalltalk.method({
  4083. selector: 'add:',
  4084. category: 'adding/removing',
  4085. fn: function (anObject){
  4086. var self=this;
  4087. smalltalk.send(self, "_subclassResponsibility", []);
  4088. return self;},
  4089. args: ["anObject"],
  4090. source: unescape('add%3A%20anObject%0A%09self%20subclassResponsibility'),
  4091. messageSends: ["subclassResponsibility"],
  4092. referencedClasses: []
  4093. }),
  4094. smalltalk.Collection);
  4095. smalltalk.addMethod(
  4096. '_addAll_',
  4097. smalltalk.method({
  4098. selector: 'addAll:',
  4099. category: 'adding/removing',
  4100. fn: function (aCollection){
  4101. var self=this;
  4102. smalltalk.send(aCollection, "_do_", [(function(each){return smalltalk.send(self, "_add_", [each]);})]);
  4103. return aCollection;
  4104. return self;},
  4105. args: ["aCollection"],
  4106. 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'),
  4107. messageSends: ["do:", "add:"],
  4108. referencedClasses: []
  4109. }),
  4110. smalltalk.Collection);
  4111. smalltalk.addMethod(
  4112. '__comma',
  4113. smalltalk.method({
  4114. selector: ',',
  4115. category: 'copying',
  4116. fn: function (aCollection){
  4117. var self=this;
  4118. return (function($rec){smalltalk.send($rec, "_addAll_", [aCollection]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_copy", []));
  4119. return self;},
  4120. args: ["aCollection"],
  4121. 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'),
  4122. messageSends: ["addAll:", "yourself", "copy"],
  4123. referencedClasses: []
  4124. }),
  4125. smalltalk.Collection);
  4126. smalltalk.addMethod(
  4127. '_copyWith_',
  4128. smalltalk.method({
  4129. selector: 'copyWith:',
  4130. category: 'copying',
  4131. fn: function (anObject){
  4132. var self=this;
  4133. return (function($rec){smalltalk.send($rec, "_add_", [anObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_copy", []));
  4134. return self;},
  4135. args: ["anObject"],
  4136. source: unescape('copyWith%3A%20anObject%0A%09%5Eself%20copy%20add%3A%20anObject%3B%20yourself'),
  4137. messageSends: ["add:", "yourself", "copy"],
  4138. referencedClasses: []
  4139. }),
  4140. smalltalk.Collection);
  4141. smalltalk.addMethod(
  4142. '_copyWithAll_',
  4143. smalltalk.method({
  4144. selector: 'copyWithAll:',
  4145. category: 'copying',
  4146. fn: function (aCollection){
  4147. var self=this;
  4148. return (function($rec){smalltalk.send($rec, "_addAll_", [aCollection]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_copy", []));
  4149. return self;},
  4150. args: ["aCollection"],
  4151. source: unescape('copyWithAll%3A%20aCollection%0A%09%5Eself%20copy%20addAll%3A%20aCollection%3B%20yourself'),
  4152. messageSends: ["addAll:", "yourself", "copy"],
  4153. referencedClasses: []
  4154. }),
  4155. smalltalk.Collection);
  4156. smalltalk.addMethod(
  4157. '_asArray',
  4158. smalltalk.method({
  4159. selector: 'asArray',
  4160. category: 'converting',
  4161. fn: function (){
  4162. var self=this;
  4163. var array=nil;
  4164. var index=nil;
  4165. array=smalltalk.send((smalltalk.Array || Array), "_new", []);
  4166. index=(0);
  4167. smalltalk.send(self, "_do_", [(function(each){index=(($receiver = index).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]);return smalltalk.send(array, "_at_put_", [index, each]);})]);
  4168. return array;
  4169. return self;},
  4170. args: [],
  4171. 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'),
  4172. messageSends: ["new", "do:", unescape("+"), "at:put:"],
  4173. referencedClasses: [smalltalk.Array]
  4174. }),
  4175. smalltalk.Collection);
  4176. smalltalk.addMethod(
  4177. '_do_',
  4178. smalltalk.method({
  4179. selector: 'do:',
  4180. category: 'enumerating',
  4181. fn: function (aBlock){
  4182. var self=this;
  4183. for(var i=0;i<self.length;i++){aBlock(self[i]);};
  4184. return self;},
  4185. args: ["aBlock"],
  4186. source: unescape('do%3A%20aBlock%0A%09%3Cfor%28var%20i%3D0%3Bi%3Cself.length%3Bi++%29%7BaBlock%28self%5Bi%5D%29%3B%7D%3E'),
  4187. messageSends: [],
  4188. referencedClasses: []
  4189. }),
  4190. smalltalk.Collection);
  4191. smalltalk.addMethod(
  4192. '_collect_',
  4193. smalltalk.method({
  4194. selector: 'collect:',
  4195. category: 'enumerating',
  4196. fn: function (aBlock){
  4197. var self=this;
  4198. var newCollection=nil;
  4199. newCollection=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []);
  4200. smalltalk.send(self, "_do_", [(function(each){return smalltalk.send(newCollection, "_add_", [smalltalk.send(aBlock, "_value_", [each])]);})]);
  4201. return newCollection;
  4202. return self;},
  4203. args: ["aBlock"],
  4204. 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'),
  4205. messageSends: ["new", "class", "do:", "add:", "value:"],
  4206. referencedClasses: []
  4207. }),
  4208. smalltalk.Collection);
  4209. smalltalk.addMethod(
  4210. '_detect_',
  4211. smalltalk.method({
  4212. selector: 'detect:',
  4213. category: 'enumerating',
  4214. fn: function (aBlock){
  4215. var self=this;
  4216. return smalltalk.send(self, "_detect_ifNone_", [aBlock, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
  4217. return self;},
  4218. args: ["aBlock"],
  4219. source: unescape('detect%3A%20aBlock%0A%09%5Eself%20detect%3A%20aBlock%20ifNone%3A%20%5Bself%20errorNotFound%5D'),
  4220. messageSends: ["detect:ifNone:", "errorNotFound"],
  4221. referencedClasses: []
  4222. }),
  4223. smalltalk.Collection);
  4224. smalltalk.addMethod(
  4225. '_detect_ifNone_',
  4226. smalltalk.method({
  4227. selector: 'detect:ifNone:',
  4228. category: 'enumerating',
  4229. fn: function (aBlock, anotherBlock){
  4230. var self=this;
  4231. for(var i = 0; i < self.length; i++)
  4232. if(aBlock(self[i]))
  4233. return self[i];
  4234. return anotherBlock();
  4235. ;
  4236. return self;},
  4237. args: ["aBlock", "anotherBlock"],
  4238. 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'),
  4239. messageSends: [],
  4240. referencedClasses: []
  4241. }),
  4242. smalltalk.Collection);
  4243. smalltalk.addMethod(
  4244. '_do_separatedBy_',
  4245. smalltalk.method({
  4246. selector: 'do:separatedBy:',
  4247. category: 'enumerating',
  4248. fn: function (aBlock, anotherBlock){
  4249. var self=this;
  4250. var first=nil;
  4251. first=true;
  4252. smalltalk.send(self, "_do_", [(function(each){(($receiver = first).klass === smalltalk.Boolean) ? ($receiver ? (function(){return first=false;})() : (function(){return smalltalk.send(anotherBlock, "_value", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return first=false;}), (function(){return smalltalk.send(anotherBlock, "_value", []);})]);return smalltalk.send(aBlock, "_value_", [each]);})]);
  4253. return self;},
  4254. args: ["aBlock", "anotherBlock"],
  4255. 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'),
  4256. messageSends: ["do:", "ifTrue:ifFalse:", "value", "value:"],
  4257. referencedClasses: []
  4258. }),
  4259. smalltalk.Collection);
  4260. smalltalk.addMethod(
  4261. '_inject_into_',
  4262. smalltalk.method({
  4263. selector: 'inject:into:',
  4264. category: 'enumerating',
  4265. fn: function (anObject, aBlock){
  4266. var self=this;
  4267. var result=nil;
  4268. result=anObject;
  4269. smalltalk.send(self, "_do_", [(function(each){return result=smalltalk.send(aBlock, "_value_value_", [result, each]);})]);
  4270. return result;
  4271. return self;},
  4272. args: ["anObject", "aBlock"],
  4273. 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'),
  4274. messageSends: ["do:", "value:value:"],
  4275. referencedClasses: []
  4276. }),
  4277. smalltalk.Collection);
  4278. smalltalk.addMethod(
  4279. '_reject_',
  4280. smalltalk.method({
  4281. selector: 'reject:',
  4282. category: 'enumerating',
  4283. fn: function (aBlock){
  4284. var self=this;
  4285. return smalltalk.send(self, "_select_", [(function(each){return smalltalk.send(smalltalk.send(aBlock, "_value_", [each]), "__eq", [false]);})]);
  4286. return self;},
  4287. args: ["aBlock"],
  4288. 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'),
  4289. messageSends: ["select:", unescape("%3D"), "value:"],
  4290. referencedClasses: []
  4291. }),
  4292. smalltalk.Collection);
  4293. smalltalk.addMethod(
  4294. '_select_',
  4295. smalltalk.method({
  4296. selector: 'select:',
  4297. category: 'enumerating',
  4298. fn: function (aBlock){
  4299. var self=this;
  4300. var stream=nil;
  4301. stream=smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_new", []), "_writeStream", []);
  4302. smalltalk.send(self, "_do_", [(function(each){return (($receiver = smalltalk.send(aBlock, "_value_", [each])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(stream, "_nextPut_", [each]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(stream, "_nextPut_", [each]);})]);})]);
  4303. return smalltalk.send(stream, "_contents", []);
  4304. return self;},
  4305. args: ["aBlock"],
  4306. 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'),
  4307. messageSends: ["writeStream", "new", "class", "do:", "ifTrue:", "value:", "nextPut:", "contents"],
  4308. referencedClasses: []
  4309. }),
  4310. smalltalk.Collection);
  4311. smalltalk.addMethod(
  4312. '_errorNotFound',
  4313. smalltalk.method({
  4314. selector: 'errorNotFound',
  4315. category: 'error handling',
  4316. fn: function (){
  4317. var self=this;
  4318. smalltalk.send(self, "_error_", ["Object is not in the collection"]);
  4319. return self;},
  4320. args: [],
  4321. source: unescape('errorNotFound%0A%09self%20error%3A%20%27Object%20is%20not%20in%20the%20collection%27'),
  4322. messageSends: ["error:"],
  4323. referencedClasses: []
  4324. }),
  4325. smalltalk.Collection);
  4326. smalltalk.addMethod(
  4327. '_includes_',
  4328. smalltalk.method({
  4329. selector: 'includes:',
  4330. category: 'testing',
  4331. fn: function (anObject){
  4332. var self=this;
  4333. var i = self.length;
  4334. while (i--) {
  4335. if (smalltalk.send(self[i], "__eq", [anObject])) {return true;}
  4336. }
  4337. return false
  4338. ;
  4339. return self;},
  4340. args: ["anObject"],
  4341. 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'),
  4342. messageSends: [],
  4343. referencedClasses: []
  4344. }),
  4345. smalltalk.Collection);
  4346. smalltalk.addMethod(
  4347. '_notEmpty',
  4348. smalltalk.method({
  4349. selector: 'notEmpty',
  4350. category: 'testing',
  4351. fn: function (){
  4352. var self=this;
  4353. return smalltalk.send(smalltalk.send(self, "_isEmpty", []), "_not", []);
  4354. return self;},
  4355. args: [],
  4356. source: unescape('notEmpty%0A%09%5Eself%20isEmpty%20not'),
  4357. messageSends: ["not", "isEmpty"],
  4358. referencedClasses: []
  4359. }),
  4360. smalltalk.Collection);
  4361. smalltalk.addMethod(
  4362. '_isEmpty',
  4363. smalltalk.method({
  4364. selector: 'isEmpty',
  4365. category: 'testing',
  4366. fn: function (){
  4367. var self=this;
  4368. return smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [(0)]);
  4369. return self;},
  4370. args: [],
  4371. source: unescape('isEmpty%0A%09%5Eself%20size%20%3D%200'),
  4372. messageSends: [unescape("%3D"), "size"],
  4373. referencedClasses: []
  4374. }),
  4375. smalltalk.Collection);
  4376. smalltalk.addMethod(
  4377. '_remove_',
  4378. smalltalk.method({
  4379. selector: 'remove:',
  4380. category: 'adding/removing',
  4381. fn: function (anObject){
  4382. var self=this;
  4383. smalltalk.send(self, "_subclassResponsibility", []);
  4384. return self;},
  4385. args: ["anObject"],
  4386. source: unescape('remove%3A%20anObject%0A%20%20%20%20self%20subclassResponsibility'),
  4387. messageSends: ["subclassResponsibility"],
  4388. referencedClasses: []
  4389. }),
  4390. smalltalk.Collection);
  4391. smalltalk.addMethod(
  4392. '_asSet',
  4393. smalltalk.method({
  4394. selector: 'asSet',
  4395. category: 'converting',
  4396. fn: function (){
  4397. var self=this;
  4398. return smalltalk.send((smalltalk.Set || Set), "_withAll_", [self]);
  4399. return self;},
  4400. args: [],
  4401. source: unescape('asSet%0A%09%5ESet%20withAll%3A%20self'),
  4402. messageSends: ["withAll:"],
  4403. referencedClasses: [smalltalk.nil]
  4404. }),
  4405. smalltalk.Collection);
  4406. smalltalk.addMethod(
  4407. '_streamClass',
  4408. smalltalk.method({
  4409. selector: 'streamClass',
  4410. category: 'accessing',
  4411. fn: function (){
  4412. var self=this;
  4413. return (smalltalk.Stream || Stream);
  4414. return self;},
  4415. args: [],
  4416. source: unescape('streamClass%0A%09%20%20%20%20%5EStream'),
  4417. messageSends: [],
  4418. referencedClasses: [smalltalk.nil]
  4419. }),
  4420. smalltalk.Collection.klass);
  4421. smalltalk.addMethod(
  4422. '_with_',
  4423. smalltalk.method({
  4424. selector: 'with:',
  4425. category: 'instance creation',
  4426. fn: function (anObject){
  4427. var self=this;
  4428. return (function($rec){smalltalk.send($rec, "_add_", [anObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  4429. return self;},
  4430. args: ["anObject"],
  4431. source: unescape('with%3A%20anObject%0A%09%20%20%20%20%5Eself%20new%0A%09%09add%3A%20anObject%3B%0A%09%09yourself'),
  4432. messageSends: ["add:", "yourself", "new"],
  4433. referencedClasses: []
  4434. }),
  4435. smalltalk.Collection.klass);
  4436. smalltalk.addMethod(
  4437. '_with_with_',
  4438. smalltalk.method({
  4439. selector: 'with:with:',
  4440. category: 'instance creation',
  4441. fn: function (anObject, anotherObject){
  4442. var self=this;
  4443. return (function($rec){smalltalk.send($rec, "_add_", [anObject]);smalltalk.send($rec, "_add_", [anotherObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  4444. return self;},
  4445. args: ["anObject", "anotherObject"],
  4446. 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'),
  4447. messageSends: ["add:", "yourself", "new"],
  4448. referencedClasses: []
  4449. }),
  4450. smalltalk.Collection.klass);
  4451. smalltalk.addMethod(
  4452. '_with_with_with_',
  4453. smalltalk.method({
  4454. selector: 'with:with:with:',
  4455. category: 'instance creation',
  4456. fn: function (firstObject, secondObject, thirdObject){
  4457. var self=this;
  4458. 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", []));
  4459. return self;},
  4460. args: ["firstObject", "secondObject", "thirdObject"],
  4461. 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'),
  4462. messageSends: ["add:", "yourself", "new"],
  4463. referencedClasses: []
  4464. }),
  4465. smalltalk.Collection.klass);
  4466. smalltalk.addMethod(
  4467. '_withAll_',
  4468. smalltalk.method({
  4469. selector: 'withAll:',
  4470. category: 'instance creation',
  4471. fn: function (aCollection){
  4472. var self=this;
  4473. return (function($rec){smalltalk.send($rec, "_addAll_", [aCollection]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  4474. return self;},
  4475. args: ["aCollection"],
  4476. source: unescape('withAll%3A%20aCollection%0A%09%20%20%20%20%5Eself%20new%0A%09%09addAll%3A%20aCollection%3B%0A%09%09yourself'),
  4477. messageSends: ["addAll:", "yourself", "new"],
  4478. referencedClasses: []
  4479. }),
  4480. smalltalk.Collection.klass);
  4481. smalltalk.addClass('SequenceableCollection', smalltalk.Collection, [], 'Kernel');
  4482. smalltalk.addMethod(
  4483. '_at_',
  4484. smalltalk.method({
  4485. selector: 'at:',
  4486. category: 'accessing',
  4487. fn: function (anIndex){
  4488. var self=this;
  4489. return smalltalk.send(self, "_at_ifAbsent_", [anIndex, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
  4490. return self;},
  4491. args: ["anIndex"],
  4492. source: unescape('at%3A%20anIndex%0A%09%5Eself%20at%3A%20anIndex%20ifAbsent%3A%20%5B%0A%09%20%20%20%20self%20errorNotFound%5D'),
  4493. messageSends: ["at:ifAbsent:", "errorNotFound"],
  4494. referencedClasses: []
  4495. }),
  4496. smalltalk.SequenceableCollection);
  4497. smalltalk.addMethod(
  4498. '_at_ifAbsent_',
  4499. smalltalk.method({
  4500. selector: 'at:ifAbsent:',
  4501. category: 'accessing',
  4502. fn: function (anIndex, aBlock){
  4503. var self=this;
  4504. smalltalk.send(self, "_subclassResponsibility", []);
  4505. return self;},
  4506. args: ["anIndex", "aBlock"],
  4507. source: unescape('at%3A%20anIndex%20ifAbsent%3A%20aBlock%0A%09self%20subclassResponsibility'),
  4508. messageSends: ["subclassResponsibility"],
  4509. referencedClasses: []
  4510. }),
  4511. smalltalk.SequenceableCollection);
  4512. smalltalk.addMethod(
  4513. '_at_put_',
  4514. smalltalk.method({
  4515. selector: 'at:put:',
  4516. category: 'accessing',
  4517. fn: function (anIndex, anObject){
  4518. var self=this;
  4519. smalltalk.send(self, "_subclassResponsibility", []);
  4520. return self;},
  4521. args: ["anIndex", "anObject"],
  4522. source: unescape('at%3A%20anIndex%20put%3A%20anObject%0A%09self%20subclassResponsibility'),
  4523. messageSends: ["subclassResponsibility"],
  4524. referencedClasses: []
  4525. }),
  4526. smalltalk.SequenceableCollection);
  4527. smalltalk.addMethod(
  4528. '_copyFrom_to_',
  4529. smalltalk.method({
  4530. selector: 'copyFrom:to:',
  4531. category: 'copying',
  4532. fn: function (anIndex, anotherIndex){
  4533. var self=this;
  4534. smalltalk.send(self, "_subclassResponsibility", []);
  4535. return self;},
  4536. args: ["anIndex", "anotherIndex"],
  4537. source: unescape('copyFrom%3A%20anIndex%20to%3A%20anotherIndex%0A%09self%20subclassResponsibility'),
  4538. messageSends: ["subclassResponsibility"],
  4539. referencedClasses: []
  4540. }),
  4541. smalltalk.SequenceableCollection);
  4542. smalltalk.addMethod(
  4543. '_first',
  4544. smalltalk.method({
  4545. selector: 'first',
  4546. category: 'accessing',
  4547. fn: function (){
  4548. var self=this;
  4549. return smalltalk.send(self, "_at_", [(1)]);
  4550. return self;},
  4551. args: [],
  4552. source: unescape('first%0A%09%5Eself%20at%3A%201'),
  4553. messageSends: ["at:"],
  4554. referencedClasses: []
  4555. }),
  4556. smalltalk.SequenceableCollection);
  4557. smalltalk.addMethod(
  4558. '_fourth',
  4559. smalltalk.method({
  4560. selector: 'fourth',
  4561. category: 'accessing',
  4562. fn: function (){
  4563. var self=this;
  4564. return smalltalk.send(self, "_at_", [(4)]);
  4565. return self;},
  4566. args: [],
  4567. source: unescape('fourth%0A%09%5Eself%20at%3A%204'),
  4568. messageSends: ["at:"],
  4569. referencedClasses: []
  4570. }),
  4571. smalltalk.SequenceableCollection);
  4572. smalltalk.addMethod(
  4573. '_last',
  4574. smalltalk.method({
  4575. selector: 'last',
  4576. category: 'accessing',
  4577. fn: function (){
  4578. var self=this;
  4579. return smalltalk.send(self, "_at_", [smalltalk.send(self, "_size", [])]);
  4580. return self;},
  4581. args: [],
  4582. source: unescape('last%0A%09%5Eself%20at%3A%20self%20size'),
  4583. messageSends: ["at:", "size"],
  4584. referencedClasses: []
  4585. }),
  4586. smalltalk.SequenceableCollection);
  4587. smalltalk.addMethod(
  4588. '_second',
  4589. smalltalk.method({
  4590. selector: 'second',
  4591. category: 'accessing',
  4592. fn: function (){
  4593. var self=this;
  4594. return smalltalk.send(self, "_at_", [(2)]);
  4595. return self;},
  4596. args: [],
  4597. source: unescape('second%0A%09%5Eself%20at%3A%202'),
  4598. messageSends: ["at:"],
  4599. referencedClasses: []
  4600. }),
  4601. smalltalk.SequenceableCollection);
  4602. smalltalk.addMethod(
  4603. '_third',
  4604. smalltalk.method({
  4605. selector: 'third',
  4606. category: 'accessing',
  4607. fn: function (){
  4608. var self=this;
  4609. return smalltalk.send(self, "_at_", [(3)]);
  4610. return self;},
  4611. args: [],
  4612. source: unescape('third%0A%09%5Eself%20at%3A%203'),
  4613. messageSends: ["at:"],
  4614. referencedClasses: []
  4615. }),
  4616. smalltalk.SequenceableCollection);
  4617. smalltalk.addMethod(
  4618. '_removeLast',
  4619. smalltalk.method({
  4620. selector: 'removeLast',
  4621. category: 'adding',
  4622. fn: function (){
  4623. var self=this;
  4624. smalltalk.send(self, "_remove_", [smalltalk.send(self, "_last", [])]);
  4625. return self;},
  4626. args: [],
  4627. source: unescape('removeLast%0A%09self%20remove%3A%20self%20last'),
  4628. messageSends: ["remove:", "last"],
  4629. referencedClasses: []
  4630. }),
  4631. smalltalk.SequenceableCollection);
  4632. smalltalk.addMethod(
  4633. '_addLast_',
  4634. smalltalk.method({
  4635. selector: 'addLast:',
  4636. category: 'adding',
  4637. fn: function (anObject){
  4638. var self=this;
  4639. smalltalk.send(self, "_add_", [anObject]);
  4640. return self;},
  4641. args: ["anObject"],
  4642. source: unescape('addLast%3A%20anObject%0A%09self%20add%3A%20anObject'),
  4643. messageSends: ["add:"],
  4644. referencedClasses: []
  4645. }),
  4646. smalltalk.SequenceableCollection);
  4647. smalltalk.addMethod(
  4648. '_withIndexDo_',
  4649. smalltalk.method({
  4650. selector: 'withIndexDo:',
  4651. category: 'enumerating',
  4652. fn: function (aBlock){
  4653. var self=this;
  4654. for(var i=0;i<self.length;i++){aBlock(self[i], i+1);};
  4655. return self;},
  4656. args: ["aBlock"],
  4657. 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'),
  4658. messageSends: [],
  4659. referencedClasses: []
  4660. }),
  4661. smalltalk.SequenceableCollection);
  4662. smalltalk.addMethod(
  4663. '_allButFirst',
  4664. smalltalk.method({
  4665. selector: 'allButFirst',
  4666. category: 'accessing',
  4667. fn: function (){
  4668. var self=this;
  4669. return smalltalk.send(self, "_copyFrom_to_", [(2), smalltalk.send(self, "_size", [])]);
  4670. return self;},
  4671. args: [],
  4672. source: unescape('allButFirst%0A%09%5Eself%20copyFrom%3A%202%20to%3A%20self%20size'),
  4673. messageSends: ["copyFrom:to:", "size"],
  4674. referencedClasses: []
  4675. }),
  4676. smalltalk.SequenceableCollection);
  4677. smalltalk.addMethod(
  4678. '_allButLast',
  4679. smalltalk.method({
  4680. selector: 'allButLast',
  4681. category: 'accessing',
  4682. fn: function (){
  4683. var self=this;
  4684. return smalltalk.send(self, "_copyFrom_to_", [(1), (($receiver = smalltalk.send(self, "_size", [])).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])]);
  4685. return self;},
  4686. args: [],
  4687. source: unescape('allButLast%0A%09%5Eself%20copyFrom%3A%201%20to%3A%20self%20size%20-%201'),
  4688. messageSends: ["copyFrom:to:", unescape("-"), "size"],
  4689. referencedClasses: []
  4690. }),
  4691. smalltalk.SequenceableCollection);
  4692. smalltalk.addMethod(
  4693. '_indexOf_',
  4694. smalltalk.method({
  4695. selector: 'indexOf:',
  4696. category: 'accessing',
  4697. fn: function (anObject){
  4698. var self=this;
  4699. return smalltalk.send(self, "_indexOf_ifAbsent_", [anObject, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
  4700. return self;},
  4701. args: ["anObject"],
  4702. source: unescape('indexOf%3A%20anObject%0A%09%5Eself%20indexOf%3A%20anObject%20ifAbsent%3A%20%5Bself%20errorNotFound%5D'),
  4703. messageSends: ["indexOf:ifAbsent:", "errorNotFound"],
  4704. referencedClasses: []
  4705. }),
  4706. smalltalk.SequenceableCollection);
  4707. smalltalk.addMethod(
  4708. '_indexOf_ifAbsent_',
  4709. smalltalk.method({
  4710. selector: 'indexOf:ifAbsent:',
  4711. category: 'accessing',
  4712. fn: function (anObject, aBlock){
  4713. var self=this;
  4714. for(var i=0;i<self.length;i++){
  4715. if(self[i].__eq(anObject)) {return i+1}
  4716. }
  4717. return aBlock();
  4718. ;
  4719. return self;},
  4720. args: ["anObject", "aBlock"],
  4721. 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'),
  4722. messageSends: [],
  4723. referencedClasses: []
  4724. }),
  4725. smalltalk.SequenceableCollection);
  4726. smalltalk.addMethod(
  4727. '_indexOf_startingAt_ifAbsent_',
  4728. smalltalk.method({
  4729. selector: 'indexOf:startingAt:ifAbsent:',
  4730. category: 'accessing',
  4731. fn: function (anObject, start, aBlock){
  4732. var self=this;
  4733. for(var i=start-1;i<self.length;i++){
  4734. if(self[i].__eq(anObject)) {return i+1}
  4735. }
  4736. return aBlock();
  4737. ;
  4738. return self;},
  4739. args: ["anObject", "start", "aBlock"],
  4740. source: unescape('indexOf%3A%20anObject%20startingAt%3A%20start%20ifAbsent%3A%20aBlock%0A%09%3C%0A%09%09for%28var%20i%3Dstart-1%3Bi%3Cself.length%3Bi++%29%7B%0A%09%09%09if%28self%5Bi%5D.__eq%28anObject%29%29%20%7Breturn%20i+1%7D%0A%09%09%7D%0A%09%09return%20aBlock%28%29%3B%0A%09%3E'),
  4741. messageSends: [],
  4742. referencedClasses: []
  4743. }),
  4744. smalltalk.SequenceableCollection);
  4745. smalltalk.addMethod(
  4746. '_indexOf_startingAt_',
  4747. smalltalk.method({
  4748. selector: 'indexOf:startingAt:',
  4749. category: 'accessing',
  4750. fn: function (anObject, start){
  4751. var self=this;
  4752. return smalltalk.send(self, "_indexOf_startingAt_ifAbsent_", [anObject, start, (function(){return (0);})]);
  4753. return self;},
  4754. args: ["anObject", "start"],
  4755. source: unescape('indexOf%3A%20anObject%20startingAt%3A%20start%0A%09%22Answer%20the%20index%20of%20the%20first%20occurence%20of%20anElement%20after%20start%0A%09within%20the%20receiver.%20If%20the%20receiver%20does%20not%20contain%20anElement%2C%20%0A%09answer%200.%22%0A%09%5Eself%20indexOf%3A%20anObject%20startingAt%3A%20start%20ifAbsent%3A%20%5B0%5D'),
  4756. messageSends: ["indexOf:startingAt:ifAbsent:"],
  4757. referencedClasses: []
  4758. }),
  4759. smalltalk.SequenceableCollection);
  4760. smalltalk.addMethod(
  4761. '_reversed',
  4762. smalltalk.method({
  4763. selector: 'reversed',
  4764. category: 'converting',
  4765. fn: function (){
  4766. var self=this;
  4767. smalltalk.send(self, "_subclassResponsibility", []);
  4768. return self;},
  4769. args: [],
  4770. source: unescape('reversed%0A%09self%20subclassResponsibility'),
  4771. messageSends: ["subclassResponsibility"],
  4772. referencedClasses: []
  4773. }),
  4774. smalltalk.SequenceableCollection);
  4775. smalltalk.addClass('String', smalltalk.SequenceableCollection, [], 'Kernel');
  4776. smalltalk.addMethod(
  4777. '_size',
  4778. smalltalk.method({
  4779. selector: 'size',
  4780. category: 'accessing',
  4781. fn: function (){
  4782. var self=this;
  4783. return self.length;
  4784. return self;},
  4785. args: [],
  4786. source: unescape('size%0A%09%3Creturn%20self.length%3E'),
  4787. messageSends: [],
  4788. referencedClasses: []
  4789. }),
  4790. smalltalk.String);
  4791. smalltalk.addMethod(
  4792. '_at_',
  4793. smalltalk.method({
  4794. selector: 'at:',
  4795. category: 'accessing',
  4796. fn: function (anIndex){
  4797. var self=this;
  4798. return self[anIndex - 1];
  4799. return self;},
  4800. args: ["anIndex"],
  4801. source: unescape('at%3A%20anIndex%0A%09%3Creturn%20self%5BanIndex%20-%201%5D%3E'),
  4802. messageSends: [],
  4803. referencedClasses: []
  4804. }),
  4805. smalltalk.String);
  4806. smalltalk.addMethod(
  4807. '_at_put_',
  4808. smalltalk.method({
  4809. selector: 'at:put:',
  4810. category: 'accessing',
  4811. fn: function (anIndex, anObject){
  4812. var self=this;
  4813. smalltalk.send(self, "_errorReadOnly", []);
  4814. return self;},
  4815. args: ["anIndex", "anObject"],
  4816. source: unescape('at%3A%20anIndex%20put%3A%20anObject%0A%20%20%20%20%09self%20errorReadOnly'),
  4817. messageSends: ["errorReadOnly"],
  4818. referencedClasses: []
  4819. }),
  4820. smalltalk.String);
  4821. smalltalk.addMethod(
  4822. '_at_ifAbsent_',
  4823. smalltalk.method({
  4824. selector: 'at:ifAbsent:',
  4825. category: 'accessing',
  4826. fn: function (anIndex, aBlock){
  4827. var self=this;
  4828. (($receiver = smalltalk.send(self, "_at_", [anIndex])) == nil || $receiver == undefined) ? (function(){return aBlock;})() : $receiver;
  4829. return self;},
  4830. args: ["anIndex", "aBlock"],
  4831. source: unescape('at%3A%20anIndex%20ifAbsent%3A%20aBlock%0A%20%20%20%20%09%28self%20at%3A%20anIndex%29%20ifNil%3A%20%5BaBlock%5D'),
  4832. messageSends: ["ifNil:", "at:"],
  4833. referencedClasses: []
  4834. }),
  4835. smalltalk.String);
  4836. smalltalk.addMethod(
  4837. '_escaped',
  4838. smalltalk.method({
  4839. selector: 'escaped',
  4840. category: 'accessing',
  4841. fn: function (){
  4842. var self=this;
  4843. return escape(self);
  4844. return self;},
  4845. args: [],
  4846. source: unescape('escaped%0A%09%3Creturn%20escape%28self%29%3E'),
  4847. messageSends: [],
  4848. referencedClasses: []
  4849. }),
  4850. smalltalk.String);
  4851. smalltalk.addMethod(
  4852. '_unescaped',
  4853. smalltalk.method({
  4854. selector: 'unescaped',
  4855. category: 'accessing',
  4856. fn: function (){
  4857. var self=this;
  4858. return unescape(self);
  4859. return self;},
  4860. args: [],
  4861. source: unescape('unescaped%0A%09%3Creturn%20unescape%28self%29%3E'),
  4862. messageSends: [],
  4863. referencedClasses: []
  4864. }),
  4865. smalltalk.String);
  4866. smalltalk.addMethod(
  4867. '_add_',
  4868. smalltalk.method({
  4869. selector: 'add:',
  4870. category: 'adding',
  4871. fn: function (anObject){
  4872. var self=this;
  4873. smalltalk.send(self, "_errorReadOnly", []);
  4874. return self;},
  4875. args: ["anObject"],
  4876. source: unescape('add%3A%20anObject%0A%20%20%20%20%09self%20errorReadOnly'),
  4877. messageSends: ["errorReadOnly"],
  4878. referencedClasses: []
  4879. }),
  4880. smalltalk.String);
  4881. smalltalk.addMethod(
  4882. '__comma',
  4883. smalltalk.method({
  4884. selector: ',',
  4885. category: 'copying',
  4886. fn: function (aString){
  4887. var self=this;
  4888. return self + aString;
  4889. return self;},
  4890. args: ["aString"],
  4891. source: unescape('%2C%20aString%0A%09%3Creturn%20self%20+%20aString%3E'),
  4892. messageSends: [],
  4893. referencedClasses: []
  4894. }),
  4895. smalltalk.String);
  4896. smalltalk.addMethod(
  4897. '_copyFrom_to_',
  4898. smalltalk.method({
  4899. selector: 'copyFrom:to:',
  4900. category: 'copying',
  4901. fn: function (anIndex, anotherIndex){
  4902. var self=this;
  4903. return self.substring(anIndex - 1, anotherIndex);
  4904. return self;},
  4905. args: ["anIndex", "anotherIndex"],
  4906. source: unescape('copyFrom%3A%20anIndex%20to%3A%20anotherIndex%0A%09%3Creturn%20self.substring%28anIndex%20-%201%2C%20anotherIndex%29%3E'),
  4907. messageSends: [],
  4908. referencedClasses: []
  4909. }),
  4910. smalltalk.String);
  4911. smalltalk.addMethod(
  4912. '_shallowCopy',
  4913. smalltalk.method({
  4914. selector: 'shallowCopy',
  4915. category: 'copying',
  4916. fn: function (){
  4917. var self=this;
  4918. return smalltalk.send(smalltalk.send(self, "_class", []), "_fromString_", [self]);
  4919. return self;},
  4920. args: [],
  4921. source: unescape('shallowCopy%0A%20%20%20%20%09%5Eself%20class%20fromString%3A%20self'),
  4922. messageSends: ["fromString:", "class"],
  4923. referencedClasses: []
  4924. }),
  4925. smalltalk.String);
  4926. smalltalk.addMethod(
  4927. '_deepCopy',
  4928. smalltalk.method({
  4929. selector: 'deepCopy',
  4930. category: 'copying',
  4931. fn: function (){
  4932. var self=this;
  4933. return smalltalk.send(self, "_shallowCopy", []);
  4934. return self;},
  4935. args: [],
  4936. source: unescape('deepCopy%0A%20%20%20%20%09%5Eself%20shallowCopy'),
  4937. messageSends: ["shallowCopy"],
  4938. referencedClasses: []
  4939. }),
  4940. smalltalk.String);
  4941. smalltalk.addMethod(
  4942. '_asSelector',
  4943. smalltalk.method({
  4944. selector: 'asSelector',
  4945. category: 'converting',
  4946. fn: function (){
  4947. var self=this;
  4948. var selector=nil;
  4949. selector=smalltalk.send("_", "__comma", [self]);
  4950. selector=smalltalk.send(selector, "_replace_with_", [":", "_"]);
  4951. selector=smalltalk.send(selector, "_replace_with_", [unescape("%5B+%5D"), "_plus"]);
  4952. selector=smalltalk.send(selector, "_replace_with_", [unescape("-"), "_minus"]);
  4953. selector=smalltalk.send(selector, "_replace_with_", [unescape("%5B*%5D"), "_star"]);
  4954. selector=smalltalk.send(selector, "_replace_with_", [unescape("%5B/%5D"), "_slash"]);
  4955. selector=smalltalk.send(selector, "_replace_with_", [unescape("%3E"), "_gt"]);
  4956. selector=smalltalk.send(selector, "_replace_with_", [unescape("%3C"), "_lt"]);
  4957. selector=smalltalk.send(selector, "_replace_with_", [unescape("%3D"), "_eq"]);
  4958. selector=smalltalk.send(selector, "_replace_with_", [unescape("%2C"), "_comma"]);
  4959. selector=smalltalk.send(selector, "_replace_with_", [unescape("%5B@%5D"), "_at"]);
  4960. return selector;
  4961. return self;},
  4962. args: [],
  4963. 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'),
  4964. messageSends: [unescape("%2C"), "replace:with:"],
  4965. referencedClasses: []
  4966. }),
  4967. smalltalk.String);
  4968. smalltalk.addMethod(
  4969. '_asJavascript',
  4970. smalltalk.method({
  4971. selector: 'asJavascript',
  4972. category: 'converting',
  4973. fn: function (){
  4974. var self=this;
  4975. if(self.search(/^[a-zA-Z0-9_:.$ ]*$/) == -1)
  4976. return "unescape(\"" + escape(self) + "\")";
  4977. else
  4978. return "\"" + self + "\"";
  4979. ;
  4980. return self;},
  4981. args: [],
  4982. 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'),
  4983. messageSends: [],
  4984. referencedClasses: []
  4985. }),
  4986. smalltalk.String);
  4987. smalltalk.addMethod(
  4988. '_replace_with_',
  4989. smalltalk.method({
  4990. selector: 'replace:with:',
  4991. category: 'regular expressions',
  4992. fn: function (aString, anotherString){
  4993. var self=this;
  4994. return smalltalk.send(self, "_replaceRegexp_with_", [smalltalk.send((smalltalk.RegularExpression || RegularExpression), "_fromString_flag_", [aString, "g"]), anotherString]);
  4995. return self;},
  4996. args: ["aString", "anotherString"],
  4997. 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'),
  4998. messageSends: ["replaceRegexp:with:", "fromString:flag:"],
  4999. referencedClasses: [smalltalk.RegularExpression]
  5000. }),
  5001. smalltalk.String);
  5002. smalltalk.addMethod(
  5003. '_replaceRegexp_with_',
  5004. smalltalk.method({
  5005. selector: 'replaceRegexp:with:',
  5006. category: 'regular expressions',
  5007. fn: function (aRegexp, aString){
  5008. var self=this;
  5009. return self.replace(aRegexp, aString);
  5010. return self;},
  5011. args: ["aRegexp", "aString"],
  5012. source: unescape('replaceRegexp%3A%20aRegexp%20with%3A%20aString%0A%09%3Creturn%20self.replace%28aRegexp%2C%20aString%29%3E'),
  5013. messageSends: [],
  5014. referencedClasses: []
  5015. }),
  5016. smalltalk.String);
  5017. smalltalk.addMethod(
  5018. '_tokenize_',
  5019. smalltalk.method({
  5020. selector: 'tokenize:',
  5021. category: 'converting',
  5022. fn: function (aString){
  5023. var self=this;
  5024. return self.split(aString);
  5025. return self;},
  5026. args: ["aString"],
  5027. source: unescape('tokenize%3A%20aString%0A%09%3Creturn%20self.split%28aString%29%3E'),
  5028. messageSends: [],
  5029. referencedClasses: []
  5030. }),
  5031. smalltalk.String);
  5032. smalltalk.addMethod(
  5033. '_match_',
  5034. smalltalk.method({
  5035. selector: 'match:',
  5036. category: 'regular expressions',
  5037. fn: function (aRegexp){
  5038. var self=this;
  5039. return self.search(aRegexp) != -1;
  5040. return self;},
  5041. args: ["aRegexp"],
  5042. source: unescape('match%3A%20aRegexp%0A%09%3Creturn%20self.search%28aRegexp%29%20%21%3D%20-1%3E'),
  5043. messageSends: [],
  5044. referencedClasses: []
  5045. }),
  5046. smalltalk.String);
  5047. smalltalk.addMethod(
  5048. '_asString',
  5049. smalltalk.method({
  5050. selector: 'asString',
  5051. category: 'converting',
  5052. fn: function (){
  5053. var self=this;
  5054. return self;
  5055. return self;},
  5056. args: [],
  5057. source: unescape('asString%0A%20%20%20%20%09%5Eself'),
  5058. messageSends: [],
  5059. referencedClasses: []
  5060. }),
  5061. smalltalk.String);
  5062. smalltalk.addMethod(
  5063. '_asNumber',
  5064. smalltalk.method({
  5065. selector: 'asNumber',
  5066. category: 'converting',
  5067. fn: function (){
  5068. var self=this;
  5069. return Number(self);
  5070. return self;},
  5071. args: [],
  5072. source: unescape('asNumber%0A%09%3Creturn%20Number%28self%29%3E'),
  5073. messageSends: [],
  5074. referencedClasses: []
  5075. }),
  5076. smalltalk.String);
  5077. smalltalk.addMethod(
  5078. '_errorReadOnly',
  5079. smalltalk.method({
  5080. selector: 'errorReadOnly',
  5081. category: 'error handling',
  5082. fn: function (){
  5083. var self=this;
  5084. smalltalk.send(self, "_error_", [unescape("Object%20is%20read-only")]);
  5085. return self;},
  5086. args: [],
  5087. source: unescape('errorReadOnly%0A%20%20%20%20%09self%20error%3A%20%27Object%20is%20read-only%27'),
  5088. messageSends: ["error:"],
  5089. referencedClasses: []
  5090. }),
  5091. smalltalk.String);
  5092. smalltalk.addMethod(
  5093. '_printString',
  5094. smalltalk.method({
  5095. selector: 'printString',
  5096. category: 'printing',
  5097. fn: function (){
  5098. var self=this;
  5099. return smalltalk.send(smalltalk.send(unescape("%27"), "__comma", [self]), "__comma", [unescape("%27")]);
  5100. return self;},
  5101. args: [],
  5102. source: unescape('printString%0A%20%20%20%20%09%5E%27%27%27%27%2C%20self%2C%20%27%27%27%27'),
  5103. messageSends: [unescape("%2C")],
  5104. referencedClasses: []
  5105. }),
  5106. smalltalk.String);
  5107. smalltalk.addMethod(
  5108. '_printNl',
  5109. smalltalk.method({
  5110. selector: 'printNl',
  5111. category: 'printing',
  5112. fn: function (){
  5113. var self=this;
  5114. console.log(self);
  5115. return self;},
  5116. args: [],
  5117. source: unescape('printNl%0A%09%3Cconsole.log%28self%29%3E'),
  5118. messageSends: [],
  5119. referencedClasses: []
  5120. }),
  5121. smalltalk.String);
  5122. smalltalk.addMethod(
  5123. '_isString',
  5124. smalltalk.method({
  5125. selector: 'isString',
  5126. category: 'testing',
  5127. fn: function (){
  5128. var self=this;
  5129. return true;
  5130. return self;},
  5131. args: [],
  5132. source: unescape('isString%0A%20%20%20%20%09%5Etrue'),
  5133. messageSends: [],
  5134. referencedClasses: []
  5135. }),
  5136. smalltalk.String);
  5137. smalltalk.addMethod(
  5138. '__gt',
  5139. smalltalk.method({
  5140. selector: '>',
  5141. category: 'comparing',
  5142. fn: function (aString){
  5143. var self=this;
  5144. return String(self) > aString;
  5145. return self;},
  5146. args: ["aString"],
  5147. source: unescape('%3E%20aString%0A%09%3Creturn%20String%28self%29%20%3E%3E%20aString%3E'),
  5148. messageSends: [],
  5149. referencedClasses: []
  5150. }),
  5151. smalltalk.String);
  5152. smalltalk.addMethod(
  5153. '__lt',
  5154. smalltalk.method({
  5155. selector: '<',
  5156. category: 'comparing',
  5157. fn: function (aString){
  5158. var self=this;
  5159. return String(self) < aString;
  5160. return self;},
  5161. args: ["aString"],
  5162. source: unescape('%3C%20aString%0A%09%3Creturn%20String%28self%29%20%3C%20aString%3E'),
  5163. messageSends: [],
  5164. referencedClasses: []
  5165. }),
  5166. smalltalk.String);
  5167. smalltalk.addMethod(
  5168. '__gt_eq',
  5169. smalltalk.method({
  5170. selector: '>=',
  5171. category: 'comparing',
  5172. fn: function (aString){
  5173. var self=this;
  5174. return String(self) >= aString;
  5175. return self;},
  5176. args: ["aString"],
  5177. source: unescape('%3E%3D%20aString%0A%09%3Creturn%20String%28self%29%20%3E%3E%3D%20aString%3E'),
  5178. messageSends: [],
  5179. referencedClasses: []
  5180. }),
  5181. smalltalk.String);
  5182. smalltalk.addMethod(
  5183. '__lt_eq',
  5184. smalltalk.method({
  5185. selector: '<=',
  5186. category: 'comparing',
  5187. fn: function (aString){
  5188. var self=this;
  5189. return String(self) <= aString;
  5190. return self;},
  5191. args: ["aString"],
  5192. source: unescape('%3C%3D%20aString%0A%09%3Creturn%20String%28self%29%20%3C%3D%20aString%3E'),
  5193. messageSends: [],
  5194. referencedClasses: []
  5195. }),
  5196. smalltalk.String);
  5197. smalltalk.addMethod(
  5198. '_remove_',
  5199. smalltalk.method({
  5200. selector: 'remove:',
  5201. category: 'adding',
  5202. fn: function (anObject){
  5203. var self=this;
  5204. smalltalk.send(self, "_errorReadOnly", []);
  5205. return self;},
  5206. args: ["anObject"],
  5207. source: unescape('remove%3A%20anObject%0A%09self%20errorReadOnly'),
  5208. messageSends: ["errorReadOnly"],
  5209. referencedClasses: []
  5210. }),
  5211. smalltalk.String);
  5212. smalltalk.addMethod(
  5213. '_asJSONObject',
  5214. smalltalk.method({
  5215. selector: 'asJSONObject',
  5216. category: 'converting',
  5217. fn: function (){
  5218. var self=this;
  5219. return self;
  5220. return self;},
  5221. args: [],
  5222. source: unescape('asJSONObject%0A%09%5Eself'),
  5223. messageSends: [],
  5224. referencedClasses: []
  5225. }),
  5226. smalltalk.String);
  5227. smalltalk.addMethod(
  5228. '_trimLeft_',
  5229. smalltalk.method({
  5230. selector: 'trimLeft:',
  5231. category: 'regular expressions',
  5232. fn: function (separators){
  5233. var self=this;
  5234. return smalltalk.send(self, "_replaceRegexp_with_", [smalltalk.send((smalltalk.RegularExpression || RegularExpression), "_fromString_flag_", [smalltalk.send(smalltalk.send(unescape("%5E%5B"), "__comma", [separators]), "__comma", [unescape("%5D+")]), "g"]), ""]);
  5235. return self;},
  5236. args: ["separators"],
  5237. 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'),
  5238. messageSends: ["replaceRegexp:with:", "fromString:flag:", unescape("%2C")],
  5239. referencedClasses: [smalltalk.RegularExpression]
  5240. }),
  5241. smalltalk.String);
  5242. smalltalk.addMethod(
  5243. '_trimRight_',
  5244. smalltalk.method({
  5245. selector: 'trimRight:',
  5246. category: 'regular expressions',
  5247. fn: function (separators){
  5248. var self=this;
  5249. return smalltalk.send(self, "_replaceRegexp_with_", [smalltalk.send((smalltalk.RegularExpression || RegularExpression), "_fromString_flag_", [smalltalk.send(smalltalk.send(unescape("%5B"), "__comma", [separators]), "__comma", [unescape("%5D+%24")]), "g"]), ""]);
  5250. return self;},
  5251. args: ["separators"],
  5252. 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'),
  5253. messageSends: ["replaceRegexp:with:", "fromString:flag:", unescape("%2C")],
  5254. referencedClasses: [smalltalk.RegularExpression]
  5255. }),
  5256. smalltalk.String);
  5257. smalltalk.addMethod(
  5258. '_trimLeft',
  5259. smalltalk.method({
  5260. selector: 'trimLeft',
  5261. category: 'regular expressions',
  5262. fn: function (){
  5263. var self=this;
  5264. return smalltalk.send(self, "_trimLeft_", [unescape("%5Cs")]);
  5265. return self;},
  5266. args: [],
  5267. source: unescape('trimLeft%0A%09%5Eself%20trimLeft%3A%20%27%5Cs%27'),
  5268. messageSends: ["trimLeft:"],
  5269. referencedClasses: []
  5270. }),
  5271. smalltalk.String);
  5272. smalltalk.addMethod(
  5273. '_trimRight',
  5274. smalltalk.method({
  5275. selector: 'trimRight',
  5276. category: 'regular expressions',
  5277. fn: function (){
  5278. var self=this;
  5279. return smalltalk.send(self, "_trimRight_", [unescape("%5Cs")]);
  5280. return self;},
  5281. args: [],
  5282. source: unescape('trimRight%0A%09%5Eself%20trimRight%3A%20%27%5Cs%27'),
  5283. messageSends: ["trimRight:"],
  5284. referencedClasses: []
  5285. }),
  5286. smalltalk.String);
  5287. smalltalk.addMethod(
  5288. '_trimBoth',
  5289. smalltalk.method({
  5290. selector: 'trimBoth',
  5291. category: 'regular expressions',
  5292. fn: function (){
  5293. var self=this;
  5294. return smalltalk.send(self, "_trimBoth_", [unescape("%5Cs")]);
  5295. return self;},
  5296. args: [],
  5297. source: unescape('trimBoth%0A%09%5Eself%20trimBoth%3A%20%27%5Cs%27'),
  5298. messageSends: ["trimBoth:"],
  5299. referencedClasses: []
  5300. }),
  5301. smalltalk.String);
  5302. smalltalk.addMethod(
  5303. '_trimBoth_',
  5304. smalltalk.method({
  5305. selector: 'trimBoth:',
  5306. category: 'regular expressions',
  5307. fn: function (separators){
  5308. var self=this;
  5309. return smalltalk.send(smalltalk.send(self, "_trimLeft_", [separators]), "_trimRight_", [separators]);
  5310. return self;},
  5311. args: ["separators"],
  5312. source: unescape('trimBoth%3A%20separators%0A%0A%20%20%20%20%09%5E%28self%20trimLeft%3A%20separators%29%20trimRight%3A%20separators'),
  5313. messageSends: ["trimRight:", "trimLeft:"],
  5314. referencedClasses: []
  5315. }),
  5316. smalltalk.String);
  5317. smalltalk.addMethod(
  5318. '_asLowercase',
  5319. smalltalk.method({
  5320. selector: 'asLowercase',
  5321. category: 'converting',
  5322. fn: function (){
  5323. var self=this;
  5324. return self.toLowerCase();
  5325. return self;},
  5326. args: [],
  5327. source: unescape('asLowercase%0A%09%3Creturn%20self.toLowerCase%28%29%3E'),
  5328. messageSends: [],
  5329. referencedClasses: []
  5330. }),
  5331. smalltalk.String);
  5332. smalltalk.addMethod(
  5333. '_asUppercase',
  5334. smalltalk.method({
  5335. selector: 'asUppercase',
  5336. category: 'converting',
  5337. fn: function (){
  5338. var self=this;
  5339. return self.toUpperCase();
  5340. return self;},
  5341. args: [],
  5342. source: unescape('asUppercase%0A%09%3Creturn%20self.toUpperCase%28%29%3E'),
  5343. messageSends: [],
  5344. referencedClasses: []
  5345. }),
  5346. smalltalk.String);
  5347. smalltalk.addMethod(
  5348. '_join_',
  5349. smalltalk.method({
  5350. selector: 'join:',
  5351. category: 'split join',
  5352. fn: function (aCollection){
  5353. var self=this;
  5354. return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(stream){return smalltalk.send(aCollection, "_do_separatedBy_", [(function(each){return smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(each, "_asString", [])]);}), (function(){return smalltalk.send(stream, "_nextPutAll_", [self]);})]);})]);
  5355. return self;},
  5356. args: ["aCollection"],
  5357. 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'),
  5358. messageSends: ["streamContents:", "do:separatedBy:", "nextPutAll:", "asString"],
  5359. referencedClasses: [smalltalk.String]
  5360. }),
  5361. smalltalk.String);
  5362. smalltalk.addMethod(
  5363. '_includesSubString_',
  5364. smalltalk.method({
  5365. selector: 'includesSubString:',
  5366. category: 'testing',
  5367. fn: function (subString){
  5368. var self=this;
  5369. return self.indexOf(subString) != -1 ;
  5370. return self;},
  5371. args: ["subString"],
  5372. source: unescape('includesSubString%3A%20subString%0A%09%3C%20return%20self.indexOf%28subString%29%20%21%3D%20-1%20%3E'),
  5373. messageSends: [],
  5374. referencedClasses: []
  5375. }),
  5376. smalltalk.String);
  5377. smalltalk.addMethod(
  5378. '_asciiValue',
  5379. smalltalk.method({
  5380. selector: 'asciiValue',
  5381. category: 'accessing',
  5382. fn: function (){
  5383. var self=this;
  5384. return self.charCodeAt(0);;
  5385. return self;},
  5386. args: [],
  5387. source: unescape('asciiValue%0A%09%3Creturn%20self.charCodeAt%280%29%3B%3E'),
  5388. messageSends: [],
  5389. referencedClasses: []
  5390. }),
  5391. smalltalk.String);
  5392. smalltalk.addMethod(
  5393. '_lineIndicesDo_',
  5394. smalltalk.method({
  5395. selector: 'lineIndicesDo:',
  5396. category: 'split join',
  5397. fn: function (aBlock){
  5398. var self=this;
  5399. try{var cr=nil;
  5400. var lf=nil;
  5401. var start=nil;
  5402. var sz=nil;
  5403. var nextLF=nil;
  5404. var nextCR=nil;
  5405. start=(1);
  5406. sz=smalltalk.send(self, "_size", []);
  5407. cr=smalltalk.send((smalltalk.String || String), "_cr", []);
  5408. nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, (1)]);
  5409. lf=smalltalk.send((smalltalk.String || String), "_lf", []);
  5410. nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, (1)]);
  5411. (function(){while((function(){return (($receiver = start).klass === smalltalk.Number) ? $receiver <=sz : smalltalk.send($receiver, "__lt_eq", [sz]);})()) {(function(){(($receiver = smalltalk.send(smalltalk.send(nextLF, "__eq", [(0)]), "_and_", [(function(){return smalltalk.send(nextCR, "__eq", [(0)]);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(aBlock, "_value_value_value_", [start, sz, sz]);return (function(){throw({name: 'stReturn', selector: '_lineIndicesDo_', fn: function(){return self}})})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(aBlock, "_value_value_value_", [start, sz, sz]);return (function(){throw({name: 'stReturn', selector: '_lineIndicesDo_', fn: function(){return self}})})();})]);return (($receiver = smalltalk.send(smalltalk.send(nextCR, "__eq", [(0)]), "_or_", [(function(){return smalltalk.send((0) < nextLF, "_and_", [(function(){return (($receiver = nextLF).klass === smalltalk.Number) ? $receiver <nextCR : smalltalk.send($receiver, "__lt", [nextCR]);})]);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(aBlock, "_value_value_value_", [start, (($receiver = nextLF).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)]), nextLF]);start=(1) + nextLF;return nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]);})() : (function(){return (($receiver = smalltalk.send((1) + nextCR, "__eq", [nextLF])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(aBlock, "_value_value_value_", [start, (($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)]), nextLF]);start=(1) + nextLF;nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]);return nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]);})() : (function(){smalltalk.send(aBlock, "_value_value_value_", [start, (($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)]), nextCR]);start=(1) + nextCR;return nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){smalltalk.send(aBlock, "_value_value_value_", [start, (($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)]), nextLF]);start=(1) + nextLF;nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]);return nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]);}), (function(){smalltalk.send(aBlock, "_value_value_value_", [start, (($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)]), nextCR]);start=(1) + nextCR;return nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]);})]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){smalltalk.send(aBlock, "_value_value_value_", [start, (($receiver = nextLF).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)]), nextLF]);start=(1) + nextLF;return nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]);}), (function(){return (($receiver = smalltalk.send((1) + nextCR, "__eq", [nextLF])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(aBlock, "_value_value_value_", [start, (($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)]), nextLF]);start=(1) + nextLF;nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]);return nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]);})() : (function(){smalltalk.send(aBlock, "_value_value_value_", [start, (($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)]), nextCR]);start=(1) + nextCR;return nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){smalltalk.send(aBlock, "_value_value_value_", [start, (($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)]), nextLF]);start=(1) + nextLF;nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]);return nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]);}), (function(){smalltalk.send(aBlock, "_value_value_value_", [start, (($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)]), nextCR]);start=(1) + nextCR;return nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]);})]);})]);})()}})();
  5412. return self;
  5413. } catch(e) {if(e.name === 'stReturn' && e.selector === '_lineIndicesDo_'){return e.fn()} throw(e)}},
  5414. args: ["aBlock"],
  5415. source: unescape('lineIndicesDo%3A%20aBlock%0A%09%22execute%20aBlock%20with%203%20arguments%20for%20each%20line%3A%0A%09-%20start%20index%20of%20line%0A%09-%20end%20index%20of%20line%20without%20line%20delimiter%0A%09-%20end%20index%20of%20line%20including%20line%20delimiter%28s%29%20CR%2C%20LF%20or%20CRLF%22%0A%09%0A%09%7C%20cr%20lf%20start%20sz%20nextLF%20nextCR%20%7C%0A%09start%20%3A%3D%201.%0A%09sz%20%3A%3D%20self%20size.%0A%09cr%20%3A%3D%20String%20cr.%0A%09nextCR%20%3A%3D%20self%20indexOf%3A%20cr%20startingAt%3A%201.%0A%09lf%20%3A%3D%20String%20lf.%0A%09nextLF%20%3A%3D%20self%20indexOf%3A%20lf%20startingAt%3A%201.%0A%09%5B%20start%20%3C%3D%20sz%20%5D%20whileTrue%3A%20%5B%0A%09%09%28nextLF%20%3D%200%20and%3A%20%5B%20nextCR%20%3D%200%20%5D%29%0A%09%09%09ifTrue%3A%20%5B%20%22No%20more%20CR%2C%20nor%20LF%2C%20the%20string%20is%20over%22%0A%09%09%09%09%09aBlock%20value%3A%20start%20value%3A%20sz%20value%3A%20sz.%0A%09%09%09%09%09%5Eself%20%5D.%0A%09%09%28nextCR%20%3D%200%20or%3A%20%5B%200%20%3C%20nextLF%20and%3A%20%5B%20nextLF%20%3C%20nextCR%20%5D%20%5D%29%0A%09%09%09ifTrue%3A%20%5B%20%22Found%20a%20LF%22%0A%09%09%09%09%09aBlock%20value%3A%20start%20value%3A%20nextLF%20-%201%20value%3A%20nextLF.%0A%09%09%09%09%09start%20%3A%3D%201%20+%20nextLF.%0A%09%09%09%09%09nextLF%20%3A%3D%20self%20indexOf%3A%20lf%20startingAt%3A%20start%20%5D%0A%09%09%09ifFalse%3A%20%5B%201%20+%20nextCR%20%3D%20nextLF%0A%09%09%09%09ifTrue%3A%20%5B%20%22Found%20a%20CR-LF%20pair%22%0A%09%09%09%09%09aBlock%20value%3A%20start%20value%3A%20nextCR%20-%201%20value%3A%20nextLF.%0A%09%09%09%09%09start%20%3A%3D%201%20+%20nextLF.%0A%09%09%09%09%09nextCR%20%3A%3D%20self%20indexOf%3A%20cr%20startingAt%3A%20start.%0A%09%09%09%09%09nextLF%20%3A%3D%20self%20indexOf%3A%20lf%20startingAt%3A%20start%20%5D%0A%09%09%09%09ifFalse%3A%20%5B%20%22Found%20a%20CR%22%0A%09%09%09%09%09aBlock%20value%3A%20start%20value%3A%20nextCR%20-%201%20value%3A%20nextCR.%0A%09%09%09%09%09start%20%3A%3D%201%20+%20nextCR.%0A%09%09%09%09%09nextCR%20%3A%3D%20self%20indexOf%3A%20cr%20startingAt%3A%20start%20%5D%5D%5D'),
  5416. messageSends: ["size", "cr", "indexOf:startingAt:", "lf", "whileTrue:", unescape("%3C%3D"), "ifTrue:", "and:", unescape("%3D"), "value:value:value:", "ifTrue:ifFalse:", "or:", unescape("%3C"), unescape("-"), unescape("+")],
  5417. referencedClasses: [smalltalk.String]
  5418. }),
  5419. smalltalk.String);
  5420. smalltalk.addMethod(
  5421. '_linesDo_',
  5422. smalltalk.method({
  5423. selector: 'linesDo:',
  5424. category: 'split join',
  5425. fn: function (aBlock){
  5426. var self=this;
  5427. smalltalk.send(self, "_lineIndicesDo_", [(function(start, endWithoutDelimiters, end){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_copyFrom_to_", [start, endWithoutDelimiters])]);})]);
  5428. return self;},
  5429. args: ["aBlock"],
  5430. source: unescape('linesDo%3A%20aBlock%0A%09%22Execute%20aBlock%20with%20each%20line%20in%20this%20string.%20The%20terminating%20line%0A%09delimiters%20CR%2C%20LF%20or%20CRLF%20pairs%20are%20not%20included%20in%20what%20is%20passed%20to%20aBlock%22%0A%0A%09self%20lineIndicesDo%3A%20%5B%3Astart%20%3AendWithoutDelimiters%20%3Aend%20%7C%0A%09%09aBlock%20value%3A%20%28self%20copyFrom%3A%20start%20to%3A%20endWithoutDelimiters%29%5D'),
  5431. messageSends: ["lineIndicesDo:", "value:", "copyFrom:to:"],
  5432. referencedClasses: []
  5433. }),
  5434. smalltalk.String);
  5435. smalltalk.addMethod(
  5436. '_lines',
  5437. smalltalk.method({
  5438. selector: 'lines',
  5439. category: 'split join',
  5440. fn: function (){
  5441. var self=this;
  5442. var lines=nil;
  5443. lines=smalltalk.send((smalltalk.Array || Array), "_new", []);
  5444. smalltalk.send(self, "_linesDo_", [(function(aLine){return smalltalk.send(lines, "_add_", [aLine]);})]);
  5445. return lines;
  5446. return self;},
  5447. args: [],
  5448. source: unescape('lines%0A%09%22Answer%20an%20array%20of%20lines%20composing%20this%20receiver%20without%20the%20line%20ending%20delimiters.%22%0A%0A%09%7C%20lines%20%7C%0A%09lines%20%3A%3D%20Array%20new.%0A%09self%20linesDo%3A%20%5B%3AaLine%20%7C%20lines%20add%3A%20aLine%5D.%0A%09%5Elines'),
  5449. messageSends: ["new", "linesDo:", "add:"],
  5450. referencedClasses: [smalltalk.Array]
  5451. }),
  5452. smalltalk.String);
  5453. smalltalk.addMethod(
  5454. '_lineNumber_',
  5455. smalltalk.method({
  5456. selector: 'lineNumber:',
  5457. category: 'split join',
  5458. fn: function (anIndex){
  5459. var self=this;
  5460. try{var lineCount=nil;
  5461. lineCount=(0);
  5462. smalltalk.send(self, "_lineIndicesDo_", [(function(start, endWithoutDelimiters, end){return (($receiver = smalltalk.send(lineCount=(($receiver = lineCount).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]), "__eq", [anIndex])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '_lineNumber_', fn: function(){return smalltalk.send(self, "_copyFrom_to_", [start, endWithoutDelimiters])}})})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (function(){throw({name: 'stReturn', selector: '_lineNumber_', fn: function(){return smalltalk.send(self, "_copyFrom_to_", [start, endWithoutDelimiters])}})})();})]);})]);
  5463. (function(){throw({name: 'stReturn', selector: '_lineNumber_', fn: function(){return nil}})})();
  5464. return self;
  5465. } catch(e) {if(e.name === 'stReturn' && e.selector === '_lineNumber_'){return e.fn()} throw(e)}},
  5466. args: ["anIndex"],
  5467. source: unescape('lineNumber%3A%20anIndex%0A%09%22Answer%20a%20string%20containing%20the%20characters%20in%20the%20given%20line%20number.%22%0A%0A%09%7C%20lineCount%20%7C%0A%09lineCount%20%3A%3D%200.%0A%09self%20lineIndicesDo%3A%20%5B%3Astart%20%3AendWithoutDelimiters%20%3Aend%20%7C%0A%09%09%28lineCount%20%3A%3D%20lineCount%20+%201%29%20%3D%20anIndex%20ifTrue%3A%20%5B%5Eself%20copyFrom%3A%20start%20to%3A%20endWithoutDelimiters%5D%5D.%0A%09%5Enil'),
  5468. messageSends: ["lineIndicesDo:", "ifTrue:", unescape("%3D"), unescape("+"), "copyFrom:to:"],
  5469. referencedClasses: []
  5470. }),
  5471. smalltalk.String);
  5472. smalltalk.addMethod(
  5473. '_reversed',
  5474. smalltalk.method({
  5475. selector: 'reversed',
  5476. category: 'converting',
  5477. fn: function (){
  5478. var self=this;
  5479. return self.split("").reverse().join("");
  5480. return self;},
  5481. args: [],
  5482. source: unescape('reversed%0A%09%3Creturn%20self.split%28%22%22%29.reverse%28%29.join%28%22%22%29%3E'),
  5483. messageSends: [],
  5484. referencedClasses: []
  5485. }),
  5486. smalltalk.String);
  5487. smalltalk.addMethod(
  5488. '__eq',
  5489. smalltalk.method({
  5490. selector: '=',
  5491. category: 'comparing',
  5492. fn: function (aString){
  5493. var self=this;
  5494. try{(($receiver = smalltalk.send(smalltalk.send(aString, "_class", []), "__eq", [smalltalk.send(self, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]);
  5495. return String(self) == aString;
  5496. return self;
  5497. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
  5498. args: ["aString"],
  5499. source: unescape('%3D%20aString%0A%09aString%20class%20%3D%20self%20class%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09%3Creturn%20String%28self%29%20%3D%3D%20aString%3E'),
  5500. messageSends: ["ifFalse:", unescape("%3D"), "class"],
  5501. referencedClasses: []
  5502. }),
  5503. smalltalk.String);
  5504. smalltalk.addMethod(
  5505. '__eq_eq',
  5506. smalltalk.method({
  5507. selector: '==',
  5508. category: 'comparing',
  5509. fn: function (aString){
  5510. var self=this;
  5511. try{(($receiver = smalltalk.send(smalltalk.send(aString, "_class", []), "__eq", [smalltalk.send(self, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq_eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq_eq', fn: function(){return false}})})();})]);
  5512. return String(self) === String(aString);
  5513. return self;
  5514. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq_eq'){return e.fn()} throw(e)}},
  5515. args: ["aString"],
  5516. source: unescape('%3D%3D%20aString%0A%09aString%20class%20%3D%20self%20class%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09%3Creturn%20String%28self%29%20%3D%3D%3D%20String%28aString%29%3E'),
  5517. messageSends: ["ifFalse:", unescape("%3D"), "class"],
  5518. referencedClasses: []
  5519. }),
  5520. smalltalk.String);
  5521. smalltalk.addMethod(
  5522. '_streamClass',
  5523. smalltalk.method({
  5524. selector: 'streamClass',
  5525. category: 'accessing',
  5526. fn: function (){
  5527. var self=this;
  5528. return (smalltalk.StringStream || StringStream);
  5529. return self;},
  5530. args: [],
  5531. source: unescape('streamClass%0A%09%20%20%20%20%5EStringStream'),
  5532. messageSends: [],
  5533. referencedClasses: [smalltalk.nil]
  5534. }),
  5535. smalltalk.String.klass);
  5536. smalltalk.addMethod(
  5537. '_fromString_',
  5538. smalltalk.method({
  5539. selector: 'fromString:',
  5540. category: 'instance creation',
  5541. fn: function (aString){
  5542. var self=this;
  5543. return new self.fn(aString);
  5544. return self;},
  5545. args: ["aString"],
  5546. source: unescape('fromString%3A%20aString%0A%09%20%20%20%20%3Creturn%20new%20self.fn%28aString%29%3E'),
  5547. messageSends: [],
  5548. referencedClasses: []
  5549. }),
  5550. smalltalk.String.klass);
  5551. smalltalk.addMethod(
  5552. '_cr',
  5553. smalltalk.method({
  5554. selector: 'cr',
  5555. category: 'accessing',
  5556. fn: function (){
  5557. var self=this;
  5558. return '\r';
  5559. return self;},
  5560. args: [],
  5561. source: unescape('cr%0A%09%3Creturn%20%27%5Cr%27%3E'),
  5562. messageSends: [],
  5563. referencedClasses: []
  5564. }),
  5565. smalltalk.String.klass);
  5566. smalltalk.addMethod(
  5567. '_lf',
  5568. smalltalk.method({
  5569. selector: 'lf',
  5570. category: 'accessing',
  5571. fn: function (){
  5572. var self=this;
  5573. return '\n';
  5574. return self;},
  5575. args: [],
  5576. source: unescape('lf%0A%09%3Creturn%20%27%5Cn%27%3E'),
  5577. messageSends: [],
  5578. referencedClasses: []
  5579. }),
  5580. smalltalk.String.klass);
  5581. smalltalk.addMethod(
  5582. '_space',
  5583. smalltalk.method({
  5584. selector: 'space',
  5585. category: 'accessing',
  5586. fn: function (){
  5587. var self=this;
  5588. return ' ';
  5589. return self;},
  5590. args: [],
  5591. source: unescape('space%0A%09%3Creturn%20%27%20%27%3E'),
  5592. messageSends: [],
  5593. referencedClasses: []
  5594. }),
  5595. smalltalk.String.klass);
  5596. smalltalk.addMethod(
  5597. '_tab',
  5598. smalltalk.method({
  5599. selector: 'tab',
  5600. category: 'accessing',
  5601. fn: function (){
  5602. var self=this;
  5603. return '\t';
  5604. return self;},
  5605. args: [],
  5606. source: unescape('tab%0A%09%3Creturn%20%27%5Ct%27%3E'),
  5607. messageSends: [],
  5608. referencedClasses: []
  5609. }),
  5610. smalltalk.String.klass);
  5611. smalltalk.addMethod(
  5612. '_crlf',
  5613. smalltalk.method({
  5614. selector: 'crlf',
  5615. category: 'accessing',
  5616. fn: function (){
  5617. var self=this;
  5618. return '\r\n';
  5619. return self;},
  5620. args: [],
  5621. source: unescape('crlf%0A%09%3Creturn%20%27%5Cr%5Cn%27%3E'),
  5622. messageSends: [],
  5623. referencedClasses: []
  5624. }),
  5625. smalltalk.String.klass);
  5626. smalltalk.addMethod(
  5627. '_streamContents_',
  5628. smalltalk.method({
  5629. selector: 'streamContents:',
  5630. category: 'instance creation',
  5631. fn: function (blockWithArg){
  5632. var self=this;
  5633. var stream=nil;
  5634. stream=smalltalk.send(smalltalk.send(self, "_streamClass", []), "_on_", [smalltalk.send((smalltalk.String || String), "_new", [])]);
  5635. smalltalk.send(blockWithArg, "_value_", [stream]);
  5636. return smalltalk.send(stream, "_contents", []);
  5637. return self;},
  5638. args: ["blockWithArg"],
  5639. 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'),
  5640. messageSends: ["on:", "streamClass", "new", "value:", "contents"],
  5641. referencedClasses: [smalltalk.String]
  5642. }),
  5643. smalltalk.String.klass);
  5644. smalltalk.addMethod(
  5645. '_value_',
  5646. smalltalk.method({
  5647. selector: 'value:',
  5648. category: 'instance creation',
  5649. fn: function (aUTFCharCode){
  5650. var self=this;
  5651. return String.fromCharCode(aUTFCharCode);;
  5652. return self;},
  5653. args: ["aUTFCharCode"],
  5654. source: unescape('value%3A%20aUTFCharCode%0A%0A%09%3Creturn%20String.fromCharCode%28aUTFCharCode%29%3B%3E'),
  5655. messageSends: [],
  5656. referencedClasses: []
  5657. }),
  5658. smalltalk.String.klass);
  5659. smalltalk.addClass('Array', smalltalk.SequenceableCollection, [], 'Kernel');
  5660. smalltalk.addMethod(
  5661. '_size',
  5662. smalltalk.method({
  5663. selector: 'size',
  5664. category: 'accessing',
  5665. fn: function (){
  5666. var self=this;
  5667. return self.length;
  5668. return self;},
  5669. args: [],
  5670. source: unescape('size%0A%09%3Creturn%20self.length%3E'),
  5671. messageSends: [],
  5672. referencedClasses: []
  5673. }),
  5674. smalltalk.Array);
  5675. smalltalk.addMethod(
  5676. '_at_put_',
  5677. smalltalk.method({
  5678. selector: 'at:put:',
  5679. category: 'accessing',
  5680. fn: function (anIndex, anObject){
  5681. var self=this;
  5682. return self[anIndex - 1] = anObject;
  5683. return self;},
  5684. args: ["anIndex", "anObject"],
  5685. source: unescape('at%3A%20anIndex%20put%3A%20anObject%0A%09%3Creturn%20self%5BanIndex%20-%201%5D%20%3D%20anObject%3E'),
  5686. messageSends: [],
  5687. referencedClasses: []
  5688. }),
  5689. smalltalk.Array);
  5690. smalltalk.addMethod(
  5691. '_at_ifAbsent_',
  5692. smalltalk.method({
  5693. selector: 'at:ifAbsent:',
  5694. category: 'accessing',
  5695. fn: function (anIndex, aBlock){
  5696. var self=this;
  5697. var value = self[anIndex - 1];
  5698. if(value === undefined) {
  5699. return aBlock();
  5700. } else {
  5701. return value;
  5702. }
  5703. ;
  5704. return self;},
  5705. args: ["anIndex", "aBlock"],
  5706. 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'),
  5707. messageSends: [],
  5708. referencedClasses: []
  5709. }),
  5710. smalltalk.Array);
  5711. smalltalk.addMethod(
  5712. '_add_',
  5713. smalltalk.method({
  5714. selector: 'add:',
  5715. category: 'adding/removing',
  5716. fn: function (anObject){
  5717. var self=this;
  5718. self.push(anObject); return anObject;;
  5719. return self;},
  5720. args: ["anObject"],
  5721. source: unescape('add%3A%20anObject%0A%09%3Cself.push%28anObject%29%3B%20return%20anObject%3B%3E'),
  5722. messageSends: [],
  5723. referencedClasses: []
  5724. }),
  5725. smalltalk.Array);
  5726. smalltalk.addMethod(
  5727. '_shallowCopy',
  5728. smalltalk.method({
  5729. selector: 'shallowCopy',
  5730. category: 'copying',
  5731. fn: function (){
  5732. var self=this;
  5733. var newCollection=nil;
  5734. newCollection=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []);
  5735. smalltalk.send(self, "_do_", [(function(each){return smalltalk.send(newCollection, "_add_", [each]);})]);
  5736. return newCollection;
  5737. return self;},
  5738. args: [],
  5739. 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'),
  5740. messageSends: ["new", "class", "do:", "add:"],
  5741. referencedClasses: []
  5742. }),
  5743. smalltalk.Array);
  5744. smalltalk.addMethod(
  5745. '_deepCopy',
  5746. smalltalk.method({
  5747. selector: 'deepCopy',
  5748. category: 'copying',
  5749. fn: function (){
  5750. var self=this;
  5751. var newCollection=nil;
  5752. newCollection=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []);
  5753. smalltalk.send(self, "_do_", [(function(each){return smalltalk.send(newCollection, "_add_", [smalltalk.send(each, "_deepCopy", [])]);})]);
  5754. return newCollection;
  5755. return self;},
  5756. args: [],
  5757. 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'),
  5758. messageSends: ["new", "class", "do:", "add:", "deepCopy"],
  5759. referencedClasses: []
  5760. }),
  5761. smalltalk.Array);
  5762. smalltalk.addMethod(
  5763. '_copyFrom_to_',
  5764. smalltalk.method({
  5765. selector: 'copyFrom:to:',
  5766. category: 'copying',
  5767. fn: function (anIndex, anotherIndex){
  5768. var self=this;
  5769. var array=nil;
  5770. array=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []);
  5771. smalltalk.send(anIndex, "_to_do_", [anotherIndex, (function(each){return smalltalk.send(array, "_add_", [smalltalk.send(self, "_at_", [each])]);})]);
  5772. return array;
  5773. return self;},
  5774. args: ["anIndex", "anotherIndex"],
  5775. 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'),
  5776. messageSends: ["new", "class", "to:do:", "add:", "at:"],
  5777. referencedClasses: []
  5778. }),
  5779. smalltalk.Array);
  5780. smalltalk.addMethod(
  5781. '_join_',
  5782. smalltalk.method({
  5783. selector: 'join:',
  5784. category: 'enumerating',
  5785. fn: function (aString){
  5786. var self=this;
  5787. return self.join(aString);
  5788. return self;},
  5789. args: ["aString"],
  5790. source: unescape('join%3A%20aString%0A%09%3Creturn%20self.join%28aString%29%3E'),
  5791. messageSends: [],
  5792. referencedClasses: []
  5793. }),
  5794. smalltalk.Array);
  5795. smalltalk.addMethod(
  5796. '_asJavascript',
  5797. smalltalk.method({
  5798. selector: 'asJavascript',
  5799. category: 'converting',
  5800. fn: function (){
  5801. var self=this;
  5802. 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")]);
  5803. return self;},
  5804. args: [],
  5805. 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'),
  5806. messageSends: [unescape("%2C"), "join:", "collect:", "asJavascript"],
  5807. referencedClasses: []
  5808. }),
  5809. smalltalk.Array);
  5810. smalltalk.addMethod(
  5811. '_sort',
  5812. smalltalk.method({
  5813. selector: 'sort',
  5814. category: 'enumerating',
  5815. fn: function (){
  5816. var self=this;
  5817. return smalltalk.send(self, "_basicPerform_", ["sort"]);
  5818. return self;},
  5819. args: [],
  5820. source: unescape('sort%0A%20%20%20%20%5Eself%20basicPerform%3A%20%27sort%27'),
  5821. messageSends: ["basicPerform:"],
  5822. referencedClasses: []
  5823. }),
  5824. smalltalk.Array);
  5825. smalltalk.addMethod(
  5826. '_sort_',
  5827. smalltalk.method({
  5828. selector: 'sort:',
  5829. category: 'enumerating',
  5830. fn: function (aBlock){
  5831. var self=this;
  5832. return self.sort(function(a, b) {
  5833. if(aBlock(a,b)) {return -1} else {return 1}
  5834. })
  5835. ;
  5836. return self;},
  5837. args: ["aBlock"],
  5838. 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'),
  5839. messageSends: [],
  5840. referencedClasses: []
  5841. }),
  5842. smalltalk.Array);
  5843. smalltalk.addMethod(
  5844. '_remove_',
  5845. smalltalk.method({
  5846. selector: 'remove:',
  5847. category: 'adding/removing',
  5848. fn: function (anObject){
  5849. var self=this;
  5850. for(var i=0;i<self.length;i++) {
  5851. if(self[i] == anObject) {
  5852. self.splice(i,1);
  5853. break;
  5854. }
  5855. }
  5856. ;
  5857. return self;},
  5858. args: ["anObject"],
  5859. 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'),
  5860. messageSends: [],
  5861. referencedClasses: []
  5862. }),
  5863. smalltalk.Array);
  5864. smalltalk.addMethod(
  5865. '_sorted',
  5866. smalltalk.method({
  5867. selector: 'sorted',
  5868. category: 'enumerating',
  5869. fn: function (){
  5870. var self=this;
  5871. return smalltalk.send(smalltalk.send(self, "_copy", []), "_sort", []);
  5872. return self;},
  5873. args: [],
  5874. source: unescape('sorted%0A%09%5Eself%20copy%20sort'),
  5875. messageSends: ["sort", "copy"],
  5876. referencedClasses: []
  5877. }),
  5878. smalltalk.Array);
  5879. smalltalk.addMethod(
  5880. '_sorted_',
  5881. smalltalk.method({
  5882. selector: 'sorted:',
  5883. category: 'enumerating',
  5884. fn: function (aBlock){
  5885. var self=this;
  5886. return smalltalk.send(smalltalk.send(self, "_copy", []), "_sort_", [aBlock]);
  5887. return self;},
  5888. args: ["aBlock"],
  5889. source: unescape('sorted%3A%20aBlock%0A%09%5Eself%20copy%20sort%3A%20aBlock'),
  5890. messageSends: ["sort:", "copy"],
  5891. referencedClasses: []
  5892. }),
  5893. smalltalk.Array);
  5894. smalltalk.addMethod(
  5895. '_asJSONObject',
  5896. smalltalk.method({
  5897. selector: 'asJSONObject',
  5898. category: 'converting',
  5899. fn: function (){
  5900. var self=this;
  5901. return smalltalk.send(self, "_collect_", [(function(each){return smalltalk.send(each, "_asJSONObject", []);})]);
  5902. return self;},
  5903. args: [],
  5904. source: unescape('asJSONObject%0A%09%5Eself%20collect%3A%20%5B%3Aeach%20%7C%20each%20asJSONObject%5D'),
  5905. messageSends: ["collect:", "asJSONObject"],
  5906. referencedClasses: []
  5907. }),
  5908. smalltalk.Array);
  5909. smalltalk.addMethod(
  5910. '_removeFrom_to_',
  5911. smalltalk.method({
  5912. selector: 'removeFrom:to:',
  5913. category: 'adding/removing',
  5914. fn: function (aNumber, anotherNumber){
  5915. var self=this;
  5916. self.splice(aNumber - 1,anotherNumber - 1);
  5917. return self;},
  5918. args: ["aNumber", "anotherNumber"],
  5919. source: unescape('removeFrom%3A%20aNumber%20to%3A%20anotherNumber%0A%09%3Cself.splice%28aNumber%20-%201%2CanotherNumber%20-%201%29%3E'),
  5920. messageSends: [],
  5921. referencedClasses: []
  5922. }),
  5923. smalltalk.Array);
  5924. smalltalk.addMethod(
  5925. '_printString',
  5926. smalltalk.method({
  5927. selector: 'printString',
  5928. category: 'enumerating',
  5929. fn: function (){
  5930. var self=this;
  5931. var str=nil;
  5932. str=smalltalk.send("", "_writeStream", []);
  5933. smalltalk.send(str, "_nextPutAll_", [smalltalk.send(smalltalk.send(self, "_printString", [], smalltalk.SequenceableCollection), "__comma", [unescape("%20%28")])]);
  5934. smalltalk.send(self, "_do_separatedBy_", [(function(each){return smalltalk.send(str, "_nextPutAll_", [smalltalk.send(each, "_printString", [])]);}), (function(){return smalltalk.send(str, "_nextPutAll_", [" "]);})]);
  5935. smalltalk.send(str, "_nextPutAll_", [unescape("%29")]);
  5936. return smalltalk.send(str, "_contents", []);
  5937. return self;},
  5938. args: [],
  5939. 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'),
  5940. messageSends: ["writeStream", "nextPutAll:", unescape("%2C"), "printString", "do:separatedBy:", "contents"],
  5941. referencedClasses: []
  5942. }),
  5943. smalltalk.Array);
  5944. smalltalk.addMethod(
  5945. '_reversed',
  5946. smalltalk.method({
  5947. selector: 'reversed',
  5948. category: 'converting',
  5949. fn: function (){
  5950. var self=this;
  5951. return self._copy().reverse();
  5952. return self;},
  5953. args: [],
  5954. source: unescape('reversed%0A%09%3Creturn%20self._copy%28%29.reverse%28%29%3E'),
  5955. messageSends: [],
  5956. referencedClasses: []
  5957. }),
  5958. smalltalk.Array);
  5959. smalltalk.addMethod(
  5960. '__eq',
  5961. smalltalk.method({
  5962. selector: '=',
  5963. category: 'comparing',
  5964. fn: function (aCollection){
  5965. var self=this;
  5966. try{(($receiver = smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [smalltalk.send(aCollection, "_class", [])]), "_and_", [(function(){return smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [smalltalk.send(aCollection, "_size", [])]);})])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]);
  5967. smalltalk.send(self, "_withIndexDo_", [(function(each, i){return (($receiver = smalltalk.send(smalltalk.send(aCollection, "_at_", [i]), "__eq", [each])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]);})]);
  5968. (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return true}})})();
  5969. return self;
  5970. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
  5971. args: ["aCollection"],
  5972. source: unescape('%3D%20aCollection%0A%09%28self%20class%20%3D%20aCollection%20class%20and%3A%20%5B%0A%20%20%20%20%20%20%20%20%09self%20size%20%3D%20aCollection%20size%5D%29%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09self%20withIndexDo%3A%20%5B%3Aeach%20%3Ai%20%7C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%28aCollection%20at%3A%20i%29%20%3D%20each%20ifFalse%3A%20%5B%5Efalse%5D%5D.%0A%09%5Etrue'),
  5973. messageSends: ["ifFalse:", "and:", unescape("%3D"), "class", "size", "withIndexDo:", "at:"],
  5974. referencedClasses: []
  5975. }),
  5976. smalltalk.Array);
  5977. smalltalk.addClass('RegularExpression', smalltalk.Object, [], 'Kernel');
  5978. smalltalk.addMethod(
  5979. '_compile_',
  5980. smalltalk.method({
  5981. selector: 'compile:',
  5982. category: 'evaluating',
  5983. fn: function (aString){
  5984. var self=this;
  5985. return self.compile(aString);
  5986. return self;},
  5987. args: ["aString"],
  5988. source: unescape('compile%3A%20aString%0A%09%3Creturn%20self.compile%28aString%29%3E'),
  5989. messageSends: [],
  5990. referencedClasses: []
  5991. }),
  5992. smalltalk.RegularExpression);
  5993. smalltalk.addMethod(
  5994. '_exec_',
  5995. smalltalk.method({
  5996. selector: 'exec:',
  5997. category: 'evaluating',
  5998. fn: function (aString){
  5999. var self=this;
  6000. return self.exec(aString) || nil;
  6001. return self;},
  6002. args: ["aString"],
  6003. source: unescape('exec%3A%20aString%0A%09%3Creturn%20self.exec%28aString%29%20%7C%7C%20nil%3E'),
  6004. messageSends: [],
  6005. referencedClasses: []
  6006. }),
  6007. smalltalk.RegularExpression);
  6008. smalltalk.addMethod(
  6009. '_test_',
  6010. smalltalk.method({
  6011. selector: 'test:',
  6012. category: 'evaluating',
  6013. fn: function (aString){
  6014. var self=this;
  6015. return self.test(aString);
  6016. return self;},
  6017. args: ["aString"],
  6018. source: unescape('test%3A%20aString%0A%09%3Creturn%20self.test%28aString%29%3E'),
  6019. messageSends: [],
  6020. referencedClasses: []
  6021. }),
  6022. smalltalk.RegularExpression);
  6023. smalltalk.addMethod(
  6024. '_fromString_flag_',
  6025. smalltalk.method({
  6026. selector: 'fromString:flag:',
  6027. category: 'instance creation',
  6028. fn: function (aString, anotherString){
  6029. var self=this;
  6030. return new RegExp(aString, anotherString);
  6031. return self;},
  6032. args: ["aString", "anotherString"],
  6033. source: unescape('fromString%3A%20aString%20flag%3A%20anotherString%0A%09%3Creturn%20new%20RegExp%28aString%2C%20anotherString%29%3E'),
  6034. messageSends: [],
  6035. referencedClasses: []
  6036. }),
  6037. smalltalk.RegularExpression.klass);
  6038. smalltalk.addMethod(
  6039. '_fromString_',
  6040. smalltalk.method({
  6041. selector: 'fromString:',
  6042. category: 'instance creation',
  6043. fn: function (aString){
  6044. var self=this;
  6045. return smalltalk.send(self, "_fromString_flag_", [aString, ""]);
  6046. return self;},
  6047. args: ["aString"],
  6048. source: unescape('fromString%3A%20aString%0A%09%20%20%20%20%5Eself%20fromString%3A%20aString%20flag%3A%20%27%27'),
  6049. messageSends: ["fromString:flag:"],
  6050. referencedClasses: []
  6051. }),
  6052. smalltalk.RegularExpression.klass);
  6053. smalltalk.addClass('Error', smalltalk.Object, ['messageText'], 'Kernel');
  6054. smalltalk.addMethod(
  6055. '_messageText',
  6056. smalltalk.method({
  6057. selector: 'messageText',
  6058. category: 'accessing',
  6059. fn: function (){
  6060. var self=this;
  6061. return self['@messageText'];
  6062. return self;},
  6063. args: [],
  6064. source: unescape('messageText%0A%09%5EmessageText'),
  6065. messageSends: [],
  6066. referencedClasses: []
  6067. }),
  6068. smalltalk.Error);
  6069. smalltalk.addMethod(
  6070. '_messageText_',
  6071. smalltalk.method({
  6072. selector: 'messageText:',
  6073. category: 'accessing',
  6074. fn: function (aString){
  6075. var self=this;
  6076. self['@messageText']=aString;
  6077. return self;},
  6078. args: ["aString"],
  6079. source: unescape('messageText%3A%20aString%0A%09messageText%20%3A%3D%20aString'),
  6080. messageSends: [],
  6081. referencedClasses: []
  6082. }),
  6083. smalltalk.Error);
  6084. smalltalk.addMethod(
  6085. '_signal',
  6086. smalltalk.method({
  6087. selector: 'signal',
  6088. category: 'signaling',
  6089. fn: function (){
  6090. var self=this;
  6091. self.context = smalltalk.getThisContext(); self.smalltalkError = true; throw(self);
  6092. return self;},
  6093. args: [],
  6094. source: unescape('signal%0A%09%3Cself.context%20%3D%20smalltalk.getThisContext%28%29%3B%20self.smalltalkError%20%3D%20true%3B%20throw%28self%29%3E'),
  6095. messageSends: [],
  6096. referencedClasses: []
  6097. }),
  6098. smalltalk.Error);
  6099. smalltalk.addMethod(
  6100. '_context',
  6101. smalltalk.method({
  6102. selector: 'context',
  6103. category: 'accessing',
  6104. fn: function (){
  6105. var self=this;
  6106. return self.context;
  6107. return self;},
  6108. args: [],
  6109. source: unescape('context%0A%09%3Creturn%20self.context%3E'),
  6110. messageSends: [],
  6111. referencedClasses: []
  6112. }),
  6113. smalltalk.Error);
  6114. smalltalk.addMethod(
  6115. '_signal_',
  6116. smalltalk.method({
  6117. selector: 'signal:',
  6118. category: 'instance creation',
  6119. fn: function (aString){
  6120. var self=this;
  6121. return (function($rec){smalltalk.send($rec, "_messageText_", [aString]);return smalltalk.send($rec, "_signal", []);})(smalltalk.send(self, "_new", []));
  6122. return self;},
  6123. args: ["aString"],
  6124. source: unescape('signal%3A%20aString%0A%09%20%20%20%20%5Eself%20new%0A%09%09messageText%3A%20aString%3B%0A%09%09signal'),
  6125. messageSends: ["messageText:", "signal", "new"],
  6126. referencedClasses: []
  6127. }),
  6128. smalltalk.Error.klass);
  6129. smalltalk.addClass('MethodContext', smalltalk.Object, [], 'Kernel');
  6130. smalltalk.addMethod(
  6131. '_receiver',
  6132. smalltalk.method({
  6133. selector: 'receiver',
  6134. category: 'accessing',
  6135. fn: function (){
  6136. var self=this;
  6137. return self.receiver;
  6138. return self;},
  6139. args: [],
  6140. source: unescape('receiver%0A%09%3Creturn%20self.receiver%3E'),
  6141. messageSends: [],
  6142. referencedClasses: []
  6143. }),
  6144. smalltalk.MethodContext);
  6145. smalltalk.addMethod(
  6146. '_selector',
  6147. smalltalk.method({
  6148. selector: 'selector',
  6149. category: 'accessing',
  6150. fn: function (){
  6151. var self=this;
  6152. return smalltalk.convertSelector(self.selector);
  6153. return self;},
  6154. args: [],
  6155. source: unescape('selector%0A%09%3Creturn%20smalltalk.convertSelector%28self.selector%29%3E'),
  6156. messageSends: [],
  6157. referencedClasses: []
  6158. }),
  6159. smalltalk.MethodContext);
  6160. smalltalk.addMethod(
  6161. '_home',
  6162. smalltalk.method({
  6163. selector: 'home',
  6164. category: 'accessing',
  6165. fn: function (){
  6166. var self=this;
  6167. return self.homeContext;
  6168. return self;},
  6169. args: [],
  6170. source: unescape('home%0A%09%3Creturn%20self.homeContext%3E'),
  6171. messageSends: [],
  6172. referencedClasses: []
  6173. }),
  6174. smalltalk.MethodContext);
  6175. smalltalk.addMethod(
  6176. '_temps',
  6177. smalltalk.method({
  6178. selector: 'temps',
  6179. category: 'accessing',
  6180. fn: function (){
  6181. var self=this;
  6182. return self.temps;
  6183. return self;},
  6184. args: [],
  6185. source: unescape('temps%0A%09%3Creturn%20self.temps%3E'),
  6186. messageSends: [],
  6187. referencedClasses: []
  6188. }),
  6189. smalltalk.MethodContext);
  6190. smalltalk.addMethod(
  6191. '_printString',
  6192. smalltalk.method({
  6193. selector: 'printString',
  6194. category: 'accessing',
  6195. fn: function (){
  6196. var self=this;
  6197. return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_printString", [], smalltalk.Object), "__comma", [unescape("%28")]), "__comma", [smalltalk.send(self, "_asString", [])]), "__comma", [unescape("%29")]);
  6198. return self;},
  6199. args: [],
  6200. source: unescape('printString%0A%09%5Esuper%20printString%2C%20%27%28%27%2C%20self%20asString%2C%20%27%29%27'),
  6201. messageSends: [unescape("%2C"), "printString", "asString"],
  6202. referencedClasses: []
  6203. }),
  6204. smalltalk.MethodContext);
  6205. smalltalk.addMethod(
  6206. '_asString',
  6207. smalltalk.method({
  6208. selector: 'asString',
  6209. category: 'accessing',
  6210. fn: function (){
  6211. var self=this;
  6212. 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", [])]);
  6213. return self;},
  6214. args: [],
  6215. source: unescape('asString%0A%09%5Eself%20receiver%20class%20printString%2C%20%27%20%3E%3E%20%27%2C%20self%20selector'),
  6216. messageSends: [unescape("%2C"), "printString", "class", "receiver", "selector"],
  6217. referencedClasses: []
  6218. }),
  6219. smalltalk.MethodContext);
  6220. smalltalk.addClass('Association', smalltalk.Object, ['key', 'value'], 'Kernel');
  6221. smalltalk.addMethod(
  6222. '__eq',
  6223. smalltalk.method({
  6224. selector: '=',
  6225. category: 'comparing',
  6226. fn: function (anAssociation){
  6227. var self=this;
  6228. 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", [])]);})]);})]);
  6229. return self;},
  6230. args: ["anAssociation"],
  6231. 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%0A'),
  6232. messageSends: ["and:", unescape("%3D"), "class", "key", "value"],
  6233. referencedClasses: []
  6234. }),
  6235. smalltalk.Association);
  6236. smalltalk.addMethod(
  6237. '_key_',
  6238. smalltalk.method({
  6239. selector: 'key:',
  6240. category: 'accessing',
  6241. fn: function (aKey){
  6242. var self=this;
  6243. self['@key']=aKey;
  6244. return self;},
  6245. args: ["aKey"],
  6246. source: unescape('key%3A%20aKey%0A%09key%20%3A%3D%20aKey'),
  6247. messageSends: [],
  6248. referencedClasses: []
  6249. }),
  6250. smalltalk.Association);
  6251. smalltalk.addMethod(
  6252. '_key',
  6253. smalltalk.method({
  6254. selector: 'key',
  6255. category: 'accessing',
  6256. fn: function (){
  6257. var self=this;
  6258. return self['@key'];
  6259. return self;},
  6260. args: [],
  6261. source: unescape('key%0A%09%5Ekey'),
  6262. messageSends: [],
  6263. referencedClasses: []
  6264. }),
  6265. smalltalk.Association);
  6266. smalltalk.addMethod(
  6267. '_value_',
  6268. smalltalk.method({
  6269. selector: 'value:',
  6270. category: 'accessing',
  6271. fn: function (aValue){
  6272. var self=this;
  6273. self['@value']=aValue;
  6274. return self;},
  6275. args: ["aValue"],
  6276. source: unescape('value%3A%20aValue%0A%09value%20%3A%3D%20aValue'),
  6277. messageSends: [],
  6278. referencedClasses: []
  6279. }),
  6280. smalltalk.Association);
  6281. smalltalk.addMethod(
  6282. '_value',
  6283. smalltalk.method({
  6284. selector: 'value',
  6285. category: 'accessing',
  6286. fn: function (){
  6287. var self=this;
  6288. return self['@value'];
  6289. return self;},
  6290. args: [],
  6291. source: unescape('value%0A%09%5Evalue'),
  6292. messageSends: [],
  6293. referencedClasses: []
  6294. }),
  6295. smalltalk.Association);
  6296. smalltalk.addMethod(
  6297. '_key_value_',
  6298. smalltalk.method({
  6299. selector: 'key:value:',
  6300. category: 'instance creation',
  6301. fn: function (aKey, aValue){
  6302. var self=this;
  6303. return (function($rec){smalltalk.send($rec, "_key_", [aKey]);smalltalk.send($rec, "_value_", [aValue]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  6304. return self;},
  6305. args: ["aKey", "aValue"],
  6306. 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'),
  6307. messageSends: ["key:", "value:", "yourself", "new"],
  6308. referencedClasses: []
  6309. }),
  6310. smalltalk.Association.klass);
  6311. smalltalk.addClass('Dictionary', smalltalk.Collection, ['keys'], 'Kernel');
  6312. smalltalk.addMethod(
  6313. '__eq',
  6314. smalltalk.method({
  6315. selector: '=',
  6316. category: 'comparing',
  6317. fn: function (aDictionary){
  6318. var self=this;
  6319. try{(($receiver = smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [smalltalk.send(aDictionary, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]);
  6320. (($receiver = smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [smalltalk.send(aDictionary, "_size", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]);
  6321. (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return smalltalk.send(smalltalk.send(self, "_associations", []), "__eq", [smalltalk.send(aDictionary, "_associations", [])])}})})();
  6322. return self;
  6323. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
  6324. args: ["aDictionary"],
  6325. source: unescape('%3D%20aDictionary%0A%09self%20class%20%3D%20aDictionary%20class%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09self%20size%20%3D%20aDictionary%20size%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09%5Eself%20associations%20%3D%20aDictionary%20associations'),
  6326. messageSends: ["ifFalse:", unescape("%3D"), "class", "size", "associations"],
  6327. referencedClasses: []
  6328. }),
  6329. smalltalk.Dictionary);
  6330. smalltalk.addMethod(
  6331. '_shallowCopy',
  6332. smalltalk.method({
  6333. selector: 'shallowCopy',
  6334. category: 'copying',
  6335. fn: function (){
  6336. var self=this;
  6337. var copy=nil;
  6338. copy=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []);
  6339. smalltalk.send(self, "_associationsDo_", [(function(each){return smalltalk.send(copy, "_at_put_", [smalltalk.send(each, "_key", []), smalltalk.send(each, "_value", [])]);})]);
  6340. return copy;
  6341. return self;},
  6342. args: [],
  6343. 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'),
  6344. messageSends: ["new", "class", "associationsDo:", "at:put:", "key", "value"],
  6345. referencedClasses: []
  6346. }),
  6347. smalltalk.Dictionary);
  6348. smalltalk.addMethod(
  6349. '_initialize',
  6350. smalltalk.method({
  6351. selector: 'initialize',
  6352. category: 'initialization',
  6353. fn: function (){
  6354. var self=this;
  6355. smalltalk.send(self, "_initialize", [], smalltalk.Collection);
  6356. self['@keys']=[];
  6357. return self;},
  6358. args: [],
  6359. source: unescape('initialize%0A%20%20%20%20%09super%20initialize.%0A%20%20%20%20%09keys%20%3A%3D%20%23%28%29'),
  6360. messageSends: ["initialize"],
  6361. referencedClasses: []
  6362. }),
  6363. smalltalk.Dictionary);
  6364. smalltalk.addMethod(
  6365. '_size',
  6366. smalltalk.method({
  6367. selector: 'size',
  6368. category: 'accessing',
  6369. fn: function (){
  6370. var self=this;
  6371. return smalltalk.send(self['@keys'], "_size", []);
  6372. return self;},
  6373. args: [],
  6374. source: unescape('size%0A%09%5Ekeys%20size'),
  6375. messageSends: ["size"],
  6376. referencedClasses: []
  6377. }),
  6378. smalltalk.Dictionary);
  6379. smalltalk.addMethod(
  6380. '_associations',
  6381. smalltalk.method({
  6382. selector: 'associations',
  6383. category: 'accessing',
  6384. fn: function (){
  6385. var self=this;
  6386. var associations=nil;
  6387. associations=[];
  6388. smalltalk.send(self['@keys'], "_do_", [(function(each){return smalltalk.send(associations, "_add_", [smalltalk.send((smalltalk.Association || Association), "_key_value_", [each, smalltalk.send(self, "_at_", [each])])]);})]);
  6389. return associations;
  6390. return self;},
  6391. args: [],
  6392. 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'),
  6393. messageSends: ["do:", "add:", "key:value:", "at:"],
  6394. referencedClasses: [smalltalk.Association]
  6395. }),
  6396. smalltalk.Dictionary);
  6397. smalltalk.addMethod(
  6398. '_keys',
  6399. smalltalk.method({
  6400. selector: 'keys',
  6401. category: 'accessing',
  6402. fn: function (){
  6403. var self=this;
  6404. return smalltalk.send(self['@keys'], "_copy", []);
  6405. return self;},
  6406. args: [],
  6407. source: unescape('keys%0A%09%5Ekeys%20copy'),
  6408. messageSends: ["copy"],
  6409. referencedClasses: []
  6410. }),
  6411. smalltalk.Dictionary);
  6412. smalltalk.addMethod(
  6413. '_values',
  6414. smalltalk.method({
  6415. selector: 'values',
  6416. category: 'accessing',
  6417. fn: function (){
  6418. var self=this;
  6419. return smalltalk.send(self['@keys'], "_collect_", [(function(each){return smalltalk.send(self, "_at_", [each]);})]);
  6420. return self;},
  6421. args: [],
  6422. source: unescape('values%0A%20%20%20%20%09%5Ekeys%20collect%3A%20%5B%3Aeach%20%7C%20self%20at%3A%20each%5D'),
  6423. messageSends: ["collect:", "at:"],
  6424. referencedClasses: []
  6425. }),
  6426. smalltalk.Dictionary);
  6427. smalltalk.addMethod(
  6428. '_at_put_',
  6429. smalltalk.method({
  6430. selector: 'at:put:',
  6431. category: 'accessing',
  6432. fn: function (aKey, aValue){
  6433. var self=this;
  6434. (($receiver = smalltalk.send(self['@keys'], "_includes_", [aKey])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self['@keys'], "_add_", [aKey]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self['@keys'], "_add_", [aKey]);})]);
  6435. return smalltalk.send(self, "_basicAt_put_", [aKey, aValue]);
  6436. return self;},
  6437. args: ["aKey", "aValue"],
  6438. 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'),
  6439. messageSends: ["ifFalse:", "includes:", "add:", "basicAt:put:"],
  6440. referencedClasses: []
  6441. }),
  6442. smalltalk.Dictionary);
  6443. smalltalk.addMethod(
  6444. '_at_ifAbsent_',
  6445. smalltalk.method({
  6446. selector: 'at:ifAbsent:',
  6447. category: 'accessing',
  6448. fn: function (aKey, aBlock){
  6449. var self=this;
  6450. return smalltalk.send(smalltalk.send(smalltalk.send(self, "_keys", []), "_includes_", [aKey]), "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_basicAt_", [aKey]);}), aBlock]);
  6451. return self;},
  6452. args: ["aKey", "aBlock"],
  6453. 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'),
  6454. messageSends: ["ifTrue:ifFalse:", "includes:", "keys", "basicAt:"],
  6455. referencedClasses: []
  6456. }),
  6457. smalltalk.Dictionary);
  6458. smalltalk.addMethod(
  6459. '_at_ifAbsentPut_',
  6460. smalltalk.method({
  6461. selector: 'at:ifAbsentPut:',
  6462. category: 'accessing',
  6463. fn: function (aKey, aBlock){
  6464. var self=this;
  6465. return smalltalk.send(self, "_at_ifAbsent_", [aKey, (function(){return smalltalk.send(self, "_at_put_", [aKey, smalltalk.send(aBlock, "_value", [])]);})]);
  6466. return self;},
  6467. args: ["aKey", "aBlock"],
  6468. 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'),
  6469. messageSends: ["at:ifAbsent:", "at:put:", "value"],
  6470. referencedClasses: []
  6471. }),
  6472. smalltalk.Dictionary);
  6473. smalltalk.addMethod(
  6474. '_at_ifPresent_',
  6475. smalltalk.method({
  6476. selector: 'at:ifPresent:',
  6477. category: 'accessing',
  6478. fn: function (aKey, aBlock){
  6479. var self=this;
  6480. return (($receiver = smalltalk.send(self, "_basicAt_", [aKey])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_at_", [aKey])]);})() : nil;
  6481. return self;},
  6482. args: ["aKey", "aBlock"],
  6483. 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'),
  6484. messageSends: ["ifNotNil:", "basicAt:", "value:", "at:"],
  6485. referencedClasses: []
  6486. }),
  6487. smalltalk.Dictionary);
  6488. smalltalk.addMethod(
  6489. '_at_ifPresent_ifAbsent_',
  6490. smalltalk.method({
  6491. selector: 'at:ifPresent:ifAbsent:',
  6492. category: 'accessing',
  6493. fn: function (aKey, aBlock, anotherBlock){
  6494. var self=this;
  6495. return smalltalk.send(smalltalk.send(self, "_basicAt_", [aKey]), "_ifNil_ifNotNil_", [anotherBlock, (function(){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_at_", [aKey])]);})]);
  6496. return self;},
  6497. args: ["aKey", "aBlock", "anotherBlock"],
  6498. 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'),
  6499. messageSends: ["ifNil:ifNotNil:", "basicAt:", "value:", "at:"],
  6500. referencedClasses: []
  6501. }),
  6502. smalltalk.Dictionary);
  6503. smalltalk.addMethod(
  6504. '_add_',
  6505. smalltalk.method({
  6506. selector: 'add:',
  6507. category: 'adding/removing',
  6508. fn: function (anAssociation){
  6509. var self=this;
  6510. smalltalk.send(self, "_at_put_", [smalltalk.send(anAssociation, "_key", []), smalltalk.send(anAssociation, "_value", [])]);
  6511. return self;},
  6512. args: ["anAssociation"],
  6513. source: unescape('add%3A%20anAssociation%0A%20%20%20%20%09self%20at%3A%20anAssociation%20key%20put%3A%20anAssociation%20value'),
  6514. messageSends: ["at:put:", "key", "value"],
  6515. referencedClasses: []
  6516. }),
  6517. smalltalk.Dictionary);
  6518. smalltalk.addMethod(
  6519. '_addAll_',
  6520. smalltalk.method({
  6521. selector: 'addAll:',
  6522. category: 'adding/removing',
  6523. fn: function (aDictionary){
  6524. var self=this;
  6525. smalltalk.send(self, "_addAll_", [smalltalk.send(aDictionary, "_associations", [])], smalltalk.Collection);
  6526. return aDictionary;
  6527. return self;},
  6528. args: ["aDictionary"],
  6529. source: unescape('addAll%3A%20aDictionary%0A%20%20%20%20%09super%20addAll%3A%20aDictionary%20associations.%0A%20%20%20%20%09%5EaDictionary'),
  6530. messageSends: ["addAll:", "associations"],
  6531. referencedClasses: []
  6532. }),
  6533. smalltalk.Dictionary);
  6534. smalltalk.addMethod(
  6535. '__comma',
  6536. smalltalk.method({
  6537. selector: ',',
  6538. category: 'copying',
  6539. fn: function (aCollection){
  6540. var self=this;
  6541. smalltalk.send(self, "_shouldNotImplement", []);
  6542. return self;},
  6543. args: ["aCollection"],
  6544. source: unescape('%2C%20aCollection%0A%09self%20shouldNotImplement'),
  6545. messageSends: ["shouldNotImplement"],
  6546. referencedClasses: []
  6547. }),
  6548. smalltalk.Dictionary);
  6549. smalltalk.addMethod(
  6550. '_copyFrom_to_',
  6551. smalltalk.method({
  6552. selector: 'copyFrom:to:',
  6553. category: 'copying',
  6554. fn: function (anIndex, anotherIndex){
  6555. var self=this;
  6556. smalltalk.send(self, "_shouldNotImplement", []);
  6557. return self;},
  6558. args: ["anIndex", "anotherIndex"],
  6559. source: unescape('copyFrom%3A%20anIndex%20to%3A%20anotherIndex%0A%09self%20shouldNotImplement'),
  6560. messageSends: ["shouldNotImplement"],
  6561. referencedClasses: []
  6562. }),
  6563. smalltalk.Dictionary);
  6564. smalltalk.addMethod(
  6565. '_associationsDo_',
  6566. smalltalk.method({
  6567. selector: 'associationsDo:',
  6568. category: 'enumerating',
  6569. fn: function (aBlock){
  6570. var self=this;
  6571. smalltalk.send(smalltalk.send(self, "_associations", []), "_do_", [aBlock]);
  6572. return self;},
  6573. args: ["aBlock"],
  6574. source: unescape('associationsDo%3A%20aBlock%0A%20%20%20%20%09self%20associations%20do%3A%20aBlock'),
  6575. messageSends: ["do:", "associations"],
  6576. referencedClasses: []
  6577. }),
  6578. smalltalk.Dictionary);
  6579. smalltalk.addMethod(
  6580. '_keysAndValuesDo_',
  6581. smalltalk.method({
  6582. selector: 'keysAndValuesDo:',
  6583. category: 'enumerating',
  6584. fn: function (aBlock){
  6585. var self=this;
  6586. smalltalk.send(self, "_associationsDo_", [(function(each){return smalltalk.send(aBlock, "_value_value_", [smalltalk.send(each, "_key", []), smalltalk.send(each, "_value", [])]);})]);
  6587. return self;},
  6588. args: ["aBlock"],
  6589. 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'),
  6590. messageSends: ["associationsDo:", "value:value:", "key", "value"],
  6591. referencedClasses: []
  6592. }),
  6593. smalltalk.Dictionary);
  6594. smalltalk.addMethod(
  6595. '_do_',
  6596. smalltalk.method({
  6597. selector: 'do:',
  6598. category: 'enumerating',
  6599. fn: function (aBlock){
  6600. var self=this;
  6601. smalltalk.send(smalltalk.send(self, "_values", []), "_do_", [aBlock]);
  6602. return self;},
  6603. args: ["aBlock"],
  6604. source: unescape('do%3A%20aBlock%0A%20%20%20%20%09self%20values%20do%3A%20aBlock'),
  6605. messageSends: ["do:", "values"],
  6606. referencedClasses: []
  6607. }),
  6608. smalltalk.Dictionary);
  6609. smalltalk.addMethod(
  6610. '_select_',
  6611. smalltalk.method({
  6612. selector: 'select:',
  6613. category: 'enumerating',
  6614. fn: function (aBlock){
  6615. var self=this;
  6616. var newDict=nil;
  6617. newDict=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []);
  6618. smalltalk.send(self, "_keysAndValuesDo_", [(function(key, value){return (($receiver = smalltalk.send(aBlock, "_value_", [value])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(newDict, "_at_put_", [key, value]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(newDict, "_at_put_", [key, value]);})]);})]);
  6619. return newDict;
  6620. return self;},
  6621. args: ["aBlock"],
  6622. 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'),
  6623. messageSends: ["new", "class", "keysAndValuesDo:", "ifTrue:", "value:", "at:put:"],
  6624. referencedClasses: []
  6625. }),
  6626. smalltalk.Dictionary);
  6627. smalltalk.addMethod(
  6628. '_collect_',
  6629. smalltalk.method({
  6630. selector: 'collect:',
  6631. category: 'enumerating',
  6632. fn: function (aBlock){
  6633. var self=this;
  6634. var newDict=nil;
  6635. newDict=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []);
  6636. smalltalk.send(self, "_keysAndValuesDo_", [(function(key, value){return smalltalk.send(newDict, "_at_put_", [key, smalltalk.send(aBlock, "_value_", [value])]);})]);
  6637. return newDict;
  6638. return self;},
  6639. args: ["aBlock"],
  6640. 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'),
  6641. messageSends: ["new", "class", "keysAndValuesDo:", "at:put:", "value:"],
  6642. referencedClasses: []
  6643. }),
  6644. smalltalk.Dictionary);
  6645. smalltalk.addMethod(
  6646. '_detect_ifNone_',
  6647. smalltalk.method({
  6648. selector: 'detect:ifNone:',
  6649. category: 'enumerating',
  6650. fn: function (aBlock, anotherBlock){
  6651. var self=this;
  6652. return smalltalk.send(smalltalk.send(self, "_values", []), "_detect_ifNone_", [aBlock, anotherBlock]);
  6653. return self;},
  6654. args: ["aBlock", "anotherBlock"],
  6655. source: unescape('detect%3A%20aBlock%20ifNone%3A%20anotherBlock%0A%09%5Eself%20values%20detect%3A%20aBlock%20ifNone%3A%20anotherBlock'),
  6656. messageSends: ["detect:ifNone:", "values"],
  6657. referencedClasses: []
  6658. }),
  6659. smalltalk.Dictionary);
  6660. smalltalk.addMethod(
  6661. '_includes_',
  6662. smalltalk.method({
  6663. selector: 'includes:',
  6664. category: 'enumerating',
  6665. fn: function (anObject){
  6666. var self=this;
  6667. return smalltalk.send(smalltalk.send(self, "_values", []), "_includes_", [anObject]);
  6668. return self;},
  6669. args: ["anObject"],
  6670. source: unescape('includes%3A%20anObject%0A%09%5Eself%20values%20includes%3A%20anObject'),
  6671. messageSends: ["includes:", "values"],
  6672. referencedClasses: []
  6673. }),
  6674. smalltalk.Dictionary);
  6675. smalltalk.addMethod(
  6676. '_remove_',
  6677. smalltalk.method({
  6678. selector: 'remove:',
  6679. category: 'adding/removing',
  6680. fn: function (aKey){
  6681. var self=this;
  6682. smalltalk.send(self, "_removeKey_", [aKey]);
  6683. return self;},
  6684. args: ["aKey"],
  6685. source: unescape('remove%3A%20aKey%0A%20%20%20%20self%20removeKey%3A%20aKey'),
  6686. messageSends: ["removeKey:"],
  6687. referencedClasses: []
  6688. }),
  6689. smalltalk.Dictionary);
  6690. smalltalk.addMethod(
  6691. '_removeKey_',
  6692. smalltalk.method({
  6693. selector: 'removeKey:',
  6694. category: 'adding/removing',
  6695. fn: function (aKey){
  6696. var self=this;
  6697. smalltalk.send(self['@keys'], "_remove_", [aKey]);
  6698. return self;},
  6699. args: ["aKey"],
  6700. source: unescape('removeKey%3A%20aKey%0A%20%20%20%20keys%20remove%3A%20aKey'),
  6701. messageSends: ["remove:"],
  6702. referencedClasses: []
  6703. }),
  6704. smalltalk.Dictionary);
  6705. smalltalk.addMethod(
  6706. '_at_',
  6707. smalltalk.method({
  6708. selector: 'at:',
  6709. category: 'accessing',
  6710. fn: function (aKey){
  6711. var self=this;
  6712. return smalltalk.send(self, "_at_ifAbsent_", [aKey, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
  6713. return self;},
  6714. args: ["aKey"],
  6715. source: unescape('at%3A%20aKey%0A%09%5Eself%20at%3A%20aKey%20ifAbsent%3A%20%5Bself%20errorNotFound%5D'),
  6716. messageSends: ["at:ifAbsent:", "errorNotFound"],
  6717. referencedClasses: []
  6718. }),
  6719. smalltalk.Dictionary);
  6720. smalltalk.addMethod(
  6721. '_asJSONObject',
  6722. smalltalk.method({
  6723. selector: 'asJSONObject',
  6724. category: 'converting',
  6725. fn: function (){
  6726. var self=this;
  6727. var object=nil;
  6728. object=smalltalk.send((smalltalk.Object || Object), "_new", []);
  6729. smalltalk.send(self, "_keysAndValuesDo_", [(function(key, value){return smalltalk.send(object, "_basicAt_put_", [key, smalltalk.send(value, "_asJSONObject", [])]);})]);
  6730. return object;
  6731. return self;},
  6732. args: [],
  6733. 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'),
  6734. messageSends: ["new", "keysAndValuesDo:", "basicAt:put:", "asJSONObject"],
  6735. referencedClasses: [smalltalk.Object]
  6736. }),
  6737. smalltalk.Dictionary);
  6738. smalltalk.addMethod(
  6739. '_printString',
  6740. smalltalk.method({
  6741. selector: 'printString',
  6742. category: 'printing',
  6743. fn: function (){
  6744. var self=this;
  6745. return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(aStream){(function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_printString", [], smalltalk.Collection)]);return smalltalk.send($rec, "_nextPutAll_", [unescape("%28")]);})(aStream);smalltalk.send(smalltalk.send(self, "_associations", []), "_do_separatedBy_", [(function(anAssociation){return (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(anAssociation, "_key", []), "_printString", [])]);smalltalk.send($rec, "_nextPutAll_", [unescape("%20-%3E%20")]);return smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(anAssociation, "_value", []), "_printString", [])]);})(aStream);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [unescape("%20%2C%20")]);})]);return smalltalk.send(aStream, "_nextPutAll_", [unescape("%29")]);})]);
  6746. return self;},
  6747. args: [],
  6748. 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'),
  6749. messageSends: ["streamContents:", "nextPutAll:", "printString", "do:separatedBy:", "associations", "key", "value"],
  6750. referencedClasses: [smalltalk.String]
  6751. }),
  6752. smalltalk.Dictionary);
  6753. smalltalk.addMethod(
  6754. '_fromPairs_',
  6755. smalltalk.method({
  6756. selector: 'fromPairs:',
  6757. category: 'instance creation',
  6758. fn: function (aCollection){
  6759. var self=this;
  6760. var dict=nil;
  6761. dict=smalltalk.send(self, "_new", []);
  6762. smalltalk.send(aCollection, "_do_", [(function(each){return smalltalk.send(dict, "_add_", [each]);})]);
  6763. return dict;
  6764. return self;},
  6765. args: ["aCollection"],
  6766. source: unescape('fromPairs%3A%20aCollection%0A%09%7C%20dict%20%7C%0A%09dict%20%3A%3D%20self%20new.%0A%09aCollection%20do%3A%20%5B%3Aeach%20%7C%20dict%20add%3A%20each%5D.%0A%09%5Edict'),
  6767. messageSends: ["new", "do:", "add:"],
  6768. referencedClasses: []
  6769. }),
  6770. smalltalk.Dictionary.klass);
  6771. smalltalk.addClass('ClassBuilder', smalltalk.Object, [], 'Kernel');
  6772. smalltalk.addMethod(
  6773. '_superclass_subclass_',
  6774. smalltalk.method({
  6775. selector: 'superclass:subclass:',
  6776. category: 'class creation',
  6777. fn: function (aClass, aString){
  6778. var self=this;
  6779. return smalltalk.send(self, "_superclass_subclass_instanceVariableNames_module_", [aClass, aString, "", nil]);
  6780. return self;},
  6781. args: ["aClass", "aString"],
  6782. source: unescape('superclass%3A%20aClass%20subclass%3A%20aString%0A%09%5Eself%20superclass%3A%20aClass%20subclass%3A%20aString%20instanceVariableNames%3A%20%27%27%20module%3A%20nil'),
  6783. messageSends: ["superclass:subclass:instanceVariableNames:module:"],
  6784. referencedClasses: []
  6785. }),
  6786. smalltalk.ClassBuilder);
  6787. smalltalk.addMethod(
  6788. '_class_instanceVariableNames_',
  6789. smalltalk.method({
  6790. selector: 'class:instanceVariableNames:',
  6791. category: 'class creation',
  6792. fn: function (aClass, aString){
  6793. var self=this;
  6794. (($receiver = smalltalk.send(aClass, "_isMetaclass", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_error_", [smalltalk.send(smalltalk.send(aClass, "_name", []), "__comma", [" is not a metaclass"])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self, "_error_", [smalltalk.send(smalltalk.send(aClass, "_name", []), "__comma", [" is not a metaclass"])]);})]);
  6795. smalltalk.send(aClass, "_basicAt_put_", ["iVarNames", smalltalk.send(self, "_instanceVariableNamesFor_", [aString])]);
  6796. smalltalk.send(self, "_setupClass_", [aClass]);
  6797. return self;},
  6798. args: ["aClass", "aString"],
  6799. 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'),
  6800. messageSends: ["ifFalse:", "isMetaclass", "error:", unescape("%2C"), "name", "basicAt:put:", "instanceVariableNamesFor:", "setupClass:"],
  6801. referencedClasses: []
  6802. }),
  6803. smalltalk.ClassBuilder);
  6804. smalltalk.addMethod(
  6805. '_instanceVariableNamesFor_',
  6806. smalltalk.method({
  6807. selector: 'instanceVariableNamesFor:',
  6808. category: 'private',
  6809. fn: function (aString){
  6810. var self=this;
  6811. return smalltalk.send(smalltalk.send(aString, "_tokenize_", [" "]), "_reject_", [(function(each){return smalltalk.send(each, "_isEmpty", []);})]);
  6812. return self;},
  6813. args: ["aString"],
  6814. 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'),
  6815. messageSends: ["reject:", "tokenize:", "isEmpty"],
  6816. referencedClasses: []
  6817. }),
  6818. smalltalk.ClassBuilder);
  6819. smalltalk.addMethod(
  6820. '_addSubclassOf_named_instanceVariableNames_',
  6821. smalltalk.method({
  6822. selector: 'addSubclassOf:named:instanceVariableNames:',
  6823. category: 'private',
  6824. fn: function (aClass, aString, aCollection){
  6825. var self=this;
  6826. smalltalk.addClass(aString, aClass, aCollection);
  6827. return smalltalk[aString];
  6828. return self;},
  6829. args: ["aClass", "aString", "aCollection"],
  6830. 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'),
  6831. messageSends: [],
  6832. referencedClasses: []
  6833. }),
  6834. smalltalk.ClassBuilder);
  6835. smalltalk.addMethod(
  6836. '_setupClass_',
  6837. smalltalk.method({
  6838. selector: 'setupClass:',
  6839. category: 'private',
  6840. fn: function (aClass){
  6841. var self=this;
  6842. smalltalk.init(aClass);;
  6843. return self;},
  6844. args: ["aClass"],
  6845. source: unescape('setupClass%3A%20aClass%0A%09%3Csmalltalk.init%28aClass%29%3B%3E'),
  6846. messageSends: [],
  6847. referencedClasses: []
  6848. }),
  6849. smalltalk.ClassBuilder);
  6850. smalltalk.addMethod(
  6851. '_superclass_subclass_instanceVariableNames_module_',
  6852. smalltalk.method({
  6853. selector: 'superclass:subclass:instanceVariableNames:module:',
  6854. category: 'class creation',
  6855. fn: function (aClass, aString, aString2, aString3){
  6856. var self=this;
  6857. var newClass=nil;
  6858. newClass=smalltalk.send(self, "_addSubclassOf_named_instanceVariableNames_module_", [aClass, aString, smalltalk.send(self, "_instanceVariableNamesFor_", [aString2]), (($receiver = aString3) == nil || $receiver == undefined) ? (function(){return "unclassified";})() : $receiver]);
  6859. smalltalk.send(self, "_setupClass_", [newClass]);
  6860. return self;},
  6861. args: ["aClass", "aString", "aString2", "aString3"],
  6862. source: unescape('superclass%3A%20aClass%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20module%3A%20aString3%0A%09%7C%20newClass%20%7C%0A%09newClass%20%3A%3D%20self%20addSubclassOf%3A%20aClass%0A%09%09%09%09named%3A%20aString%20instanceVariableNames%3A%20%28self%20instanceVariableNamesFor%3A%20aString2%29%0A%09%09%09%09module%3A%20%28aString3%20ifNil%3A%20%5B%27unclassified%27%5D%29.%0A%09self%20setupClass%3A%20newClass'),
  6863. messageSends: ["addSubclassOf:named:instanceVariableNames:module:", "instanceVariableNamesFor:", "ifNil:", "setupClass:"],
  6864. referencedClasses: []
  6865. }),
  6866. smalltalk.ClassBuilder);
  6867. smalltalk.addMethod(
  6868. '_addSubclassOf_named_instanceVariableNames_module_',
  6869. smalltalk.method({
  6870. selector: 'addSubclassOf:named:instanceVariableNames:module:',
  6871. category: 'private',
  6872. fn: function (aClass, aString, aCollection, moduleName){
  6873. var self=this;
  6874. smalltalk.addClass(aString, aClass, aCollection, moduleName);
  6875. return smalltalk[aString];
  6876. return self;},
  6877. args: ["aClass", "aString", "aCollection", "moduleName"],
  6878. source: unescape('addSubclassOf%3A%20aClass%20named%3A%20aString%20instanceVariableNames%3A%20aCollection%20module%3A%20moduleName%0A%09%3Csmalltalk.addClass%28aString%2C%20aClass%2C%20aCollection%2C%20moduleName%29%3B%0A%09%20%20%20%20return%20smalltalk%5BaString%5D%3E'),
  6879. messageSends: [],
  6880. referencedClasses: []
  6881. }),
  6882. smalltalk.ClassBuilder);
  6883. smalltalk.addClass('ClassCategoryReader', smalltalk.Object, ['class', 'category', 'chunkParser'], 'Kernel');
  6884. smalltalk.addMethod(
  6885. '_initialize',
  6886. smalltalk.method({
  6887. selector: 'initialize',
  6888. category: 'initialization',
  6889. fn: function (){
  6890. var self=this;
  6891. smalltalk.send(self, "_initialize", [], smalltalk.Object);
  6892. self['@chunkParser']=smalltalk.send((smalltalk.ChunkParser || ChunkParser), "_new", []);
  6893. return self;},
  6894. args: [],
  6895. source: unescape('initialize%0A%09super%20initialize.%0A%09chunkParser%20%3A%3D%20ChunkParser%20new.'),
  6896. messageSends: ["initialize", "new"],
  6897. referencedClasses: [smalltalk.nil]
  6898. }),
  6899. smalltalk.ClassCategoryReader);
  6900. smalltalk.addMethod(
  6901. '_class_category_',
  6902. smalltalk.method({
  6903. selector: 'class:category:',
  6904. category: 'accessing',
  6905. fn: function (aClass, aString){
  6906. var self=this;
  6907. self['@class']=aClass;
  6908. self['@category']=aString;
  6909. return self;},
  6910. args: ["aClass", "aString"],
  6911. source: unescape('class%3A%20aClass%20category%3A%20aString%0A%09class%20%3A%3D%20aClass.%0A%09category%20%3A%3D%20aString'),
  6912. messageSends: [],
  6913. referencedClasses: []
  6914. }),
  6915. smalltalk.ClassCategoryReader);
  6916. smalltalk.addMethod(
  6917. '_scanFrom_',
  6918. smalltalk.method({
  6919. selector: 'scanFrom:',
  6920. category: 'fileIn',
  6921. fn: function (aChunkParser){
  6922. var self=this;
  6923. var chunk=nil;
  6924. (function(){while(!(function(){chunk=smalltalk.send(aChunkParser, "_nextChunk", []);return smalltalk.send(chunk, "_isEmpty", []);})()) {(function(){return smalltalk.send(self, "_compileMethod_", [chunk]);})()}})();
  6925. return self;},
  6926. args: ["aChunkParser"],
  6927. source: unescape('scanFrom%3A%20aChunkParser%0A%09%7C%20chunk%20%7C%0A%09%5Bchunk%20%3A%3D%20aChunkParser%20nextChunk.%0A%09chunk%20isEmpty%5D%20whileFalse%3A%20%5B%0A%09%20%20%20%20self%20compileMethod%3A%20chunk%5D'),
  6928. messageSends: ["whileFalse:", "nextChunk", "isEmpty", "compileMethod:"],
  6929. referencedClasses: []
  6930. }),
  6931. smalltalk.ClassCategoryReader);
  6932. smalltalk.addMethod(
  6933. '_compileMethod_',
  6934. smalltalk.method({
  6935. selector: 'compileMethod:',
  6936. category: 'private',
  6937. fn: function (aString){
  6938. var self=this;
  6939. var method=nil;
  6940. method=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_load_forClass_", [aString, self['@class']]);
  6941. smalltalk.send(method, "_category_", [self['@category']]);
  6942. smalltalk.send(self['@class'], "_addCompiledMethod_", [method]);
  6943. return self;},
  6944. args: ["aString"],
  6945. 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'),
  6946. messageSends: ["load:forClass:", "new", "category:", "addCompiledMethod:"],
  6947. referencedClasses: [smalltalk.nil]
  6948. }),
  6949. smalltalk.ClassCategoryReader);
  6950. smalltalk.addClass('Stream', smalltalk.Object, ['collection', 'position', 'streamSize'], 'Kernel');
  6951. smalltalk.addMethod(
  6952. '_collection',
  6953. smalltalk.method({
  6954. selector: 'collection',
  6955. category: 'accessing',
  6956. fn: function (){
  6957. var self=this;
  6958. return self['@collection'];
  6959. return self;},
  6960. args: [],
  6961. source: unescape('collection%0A%09%5Ecollection'),
  6962. messageSends: [],
  6963. referencedClasses: []
  6964. }),
  6965. smalltalk.Stream);
  6966. smalltalk.addMethod(
  6967. '_setCollection_',
  6968. smalltalk.method({
  6969. selector: 'setCollection:',
  6970. category: 'accessing',
  6971. fn: function (aCollection){
  6972. var self=this;
  6973. self['@collection']=aCollection;
  6974. return self;},
  6975. args: ["aCollection"],
  6976. source: unescape('setCollection%3A%20aCollection%0A%09collection%20%3A%3D%20aCollection'),
  6977. messageSends: [],
  6978. referencedClasses: []
  6979. }),
  6980. smalltalk.Stream);
  6981. smalltalk.addMethod(
  6982. '_position',
  6983. smalltalk.method({
  6984. selector: 'position',
  6985. category: 'accessing',
  6986. fn: function (){
  6987. var self=this;
  6988. return (($receiver = self['@position']) == nil || $receiver == undefined) ? (function(){return self['@position']=(0);})() : $receiver;
  6989. return self;},
  6990. args: [],
  6991. source: unescape('position%0A%09%5Eposition%20ifNil%3A%20%5Bposition%20%3A%3D%200%5D'),
  6992. messageSends: ["ifNil:"],
  6993. referencedClasses: []
  6994. }),
  6995. smalltalk.Stream);
  6996. smalltalk.addMethod(
  6997. '_position_',
  6998. smalltalk.method({
  6999. selector: 'position:',
  7000. category: 'accessing',
  7001. fn: function (anInteger){
  7002. var self=this;
  7003. self['@position']=anInteger;
  7004. return self;},
  7005. args: ["anInteger"],
  7006. source: unescape('position%3A%20anInteger%0A%09position%20%3A%3D%20anInteger'),
  7007. messageSends: [],
  7008. referencedClasses: []
  7009. }),
  7010. smalltalk.Stream);
  7011. smalltalk.addMethod(
  7012. '_streamSize',
  7013. smalltalk.method({
  7014. selector: 'streamSize',
  7015. category: 'accessing',
  7016. fn: function (){
  7017. var self=this;
  7018. return self['@streamSize'];
  7019. return self;},
  7020. args: [],
  7021. source: unescape('streamSize%0A%09%5EstreamSize'),
  7022. messageSends: [],
  7023. referencedClasses: []
  7024. }),
  7025. smalltalk.Stream);
  7026. smalltalk.addMethod(
  7027. '_setStreamSize_',
  7028. smalltalk.method({
  7029. selector: 'setStreamSize:',
  7030. category: 'accessing',
  7031. fn: function (anInteger){
  7032. var self=this;
  7033. self['@streamSize']=anInteger;
  7034. return self;},
  7035. args: ["anInteger"],
  7036. source: unescape('setStreamSize%3A%20anInteger%0A%09streamSize%20%3A%3D%20anInteger'),
  7037. messageSends: [],
  7038. referencedClasses: []
  7039. }),
  7040. smalltalk.Stream);
  7041. smalltalk.addMethod(
  7042. '_contents',
  7043. smalltalk.method({
  7044. selector: 'contents',
  7045. category: 'accessing',
  7046. fn: function (){
  7047. var self=this;
  7048. return smalltalk.send(smalltalk.send(self, "_collection", []), "_copyFrom_to_", [(1), smalltalk.send(self, "_streamSize", [])]);
  7049. return self;},
  7050. args: [],
  7051. 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'),
  7052. messageSends: ["copyFrom:to:", "collection", "streamSize"],
  7053. referencedClasses: []
  7054. }),
  7055. smalltalk.Stream);
  7056. smalltalk.addMethod(
  7057. '_size',
  7058. smalltalk.method({
  7059. selector: 'size',
  7060. category: 'accessing',
  7061. fn: function (){
  7062. var self=this;
  7063. return smalltalk.send(self, "_streamSize", []);
  7064. return self;},
  7065. args: [],
  7066. source: unescape('size%0A%09%5Eself%20streamSize'),
  7067. messageSends: ["streamSize"],
  7068. referencedClasses: []
  7069. }),
  7070. smalltalk.Stream);
  7071. smalltalk.addMethod(
  7072. '_reset',
  7073. smalltalk.method({
  7074. selector: 'reset',
  7075. category: 'actions',
  7076. fn: function (){
  7077. var self=this;
  7078. smalltalk.send(self, "_position_", [(0)]);
  7079. return self;},
  7080. args: [],
  7081. source: unescape('reset%0A%09self%20position%3A%200'),
  7082. messageSends: ["position:"],
  7083. referencedClasses: []
  7084. }),
  7085. smalltalk.Stream);
  7086. smalltalk.addMethod(
  7087. '_close',
  7088. smalltalk.method({
  7089. selector: 'close',
  7090. category: 'actions',
  7091. fn: function (){
  7092. var self=this;
  7093. return self;},
  7094. args: [],
  7095. source: unescape('close'),
  7096. messageSends: [],
  7097. referencedClasses: []
  7098. }),
  7099. smalltalk.Stream);
  7100. smalltalk.addMethod(
  7101. '_flush',
  7102. smalltalk.method({
  7103. selector: 'flush',
  7104. category: 'actions',
  7105. fn: function (){
  7106. var self=this;
  7107. return self;},
  7108. args: [],
  7109. source: unescape('flush'),
  7110. messageSends: [],
  7111. referencedClasses: []
  7112. }),
  7113. smalltalk.Stream);
  7114. smalltalk.addMethod(
  7115. '_resetContents',
  7116. smalltalk.method({
  7117. selector: 'resetContents',
  7118. category: 'actions',
  7119. fn: function (){
  7120. var self=this;
  7121. smalltalk.send(self, "_reset", []);
  7122. smalltalk.send(self, "_setStreamSize_", [(0)]);
  7123. return self;},
  7124. args: [],
  7125. source: unescape('resetContents%0A%09self%20reset.%0A%09self%20setStreamSize%3A%200'),
  7126. messageSends: ["reset", "setStreamSize:"],
  7127. referencedClasses: []
  7128. }),
  7129. smalltalk.Stream);
  7130. smalltalk.addMethod(
  7131. '_do_',
  7132. smalltalk.method({
  7133. selector: 'do:',
  7134. category: 'enumerating',
  7135. fn: function (aBlock){
  7136. var self=this;
  7137. (function(){while(!(function(){return smalltalk.send(self, "_atEnd", []);})()) {(function(){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_next", [])]);})()}})();
  7138. return self;},
  7139. args: ["aBlock"],
  7140. source: unescape('do%3A%20aBlock%0A%09%5Bself%20atEnd%5D%20whileFalse%3A%20%5BaBlock%20value%3A%20self%20next%5D'),
  7141. messageSends: ["whileFalse:", "atEnd", "value:", "next"],
  7142. referencedClasses: []
  7143. }),
  7144. smalltalk.Stream);
  7145. smalltalk.addMethod(
  7146. '_setToEnd',
  7147. smalltalk.method({
  7148. selector: 'setToEnd',
  7149. category: 'positioning',
  7150. fn: function (){
  7151. var self=this;
  7152. smalltalk.send(self, "_position_", [smalltalk.send(self, "_size", [])]);
  7153. return self;},
  7154. args: [],
  7155. source: unescape('setToEnd%0A%09self%20position%3A%20self%20size'),
  7156. messageSends: ["position:", "size"],
  7157. referencedClasses: []
  7158. }),
  7159. smalltalk.Stream);
  7160. smalltalk.addMethod(
  7161. '_skip_',
  7162. smalltalk.method({
  7163. selector: 'skip:',
  7164. category: 'positioning',
  7165. fn: function (anInteger){
  7166. var self=this;
  7167. smalltalk.send(self, "_position_", [smalltalk.send((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +anInteger : smalltalk.send($receiver, "__plus", [anInteger]), "_min_max_", [smalltalk.send(self, "_size", []), (0)])]);
  7168. return self;},
  7169. args: ["anInteger"],
  7170. source: unescape('skip%3A%20anInteger%0A%09self%20position%3A%20%28%28self%20position%20+%20anInteger%29%20min%3A%20self%20size%20max%3A%200%29'),
  7171. messageSends: ["position:", "min:max:", unescape("+"), "position", "size"],
  7172. referencedClasses: []
  7173. }),
  7174. smalltalk.Stream);
  7175. smalltalk.addMethod(
  7176. '_next',
  7177. smalltalk.method({
  7178. selector: 'next',
  7179. category: 'reading',
  7180. fn: function (){
  7181. var self=this;
  7182. smalltalk.send(self, "_position_", [(($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])]);
  7183. return smalltalk.send(self['@collection'], "_at_", [smalltalk.send(self, "_position", [])]);
  7184. return self;},
  7185. args: [],
  7186. source: unescape('next%0A%09self%20position%3A%20self%20position%20+%201.%20%0A%09%5Ecollection%20at%3A%20self%20position'),
  7187. messageSends: ["position:", unescape("+"), "position", "at:"],
  7188. referencedClasses: []
  7189. }),
  7190. smalltalk.Stream);
  7191. smalltalk.addMethod(
  7192. '_next_',
  7193. smalltalk.method({
  7194. selector: 'next:',
  7195. category: 'reading',
  7196. fn: function (anInteger){
  7197. var self=this;
  7198. var tempCollection=nil;
  7199. tempCollection=smalltalk.send(smalltalk.send(smalltalk.send(self, "_collection", []), "_class", []), "_new", []);
  7200. smalltalk.send(anInteger, "_timesRepeat_", [(function(){return (($receiver = smalltalk.send(self, "_atEnd", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(tempCollection, "_add_", [smalltalk.send(self, "_next", [])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(tempCollection, "_add_", [smalltalk.send(self, "_next", [])]);})]);})]);
  7201. return tempCollection;
  7202. return self;},
  7203. args: ["anInteger"],
  7204. 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'),
  7205. messageSends: ["new", "class", "collection", "timesRepeat:", "ifFalse:", "atEnd", "add:", "next"],
  7206. referencedClasses: []
  7207. }),
  7208. smalltalk.Stream);
  7209. smalltalk.addMethod(
  7210. '_nextPut_',
  7211. smalltalk.method({
  7212. selector: 'nextPut:',
  7213. category: 'writing',
  7214. fn: function (anObject){
  7215. var self=this;
  7216. smalltalk.send(self, "_position_", [(($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])]);
  7217. smalltalk.send(smalltalk.send(self, "_collection", []), "_at_put_", [smalltalk.send(self, "_position", []), anObject]);
  7218. smalltalk.send(self, "_setStreamSize_", [smalltalk.send(smalltalk.send(self, "_streamSize", []), "_max_", [smalltalk.send(self, "_position", [])])]);
  7219. return self;},
  7220. args: ["anObject"],
  7221. 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'),
  7222. messageSends: ["position:", unescape("+"), "position", "at:put:", "collection", "setStreamSize:", "max:", "streamSize"],
  7223. referencedClasses: []
  7224. }),
  7225. smalltalk.Stream);
  7226. smalltalk.addMethod(
  7227. '_nextPutAll_',
  7228. smalltalk.method({
  7229. selector: 'nextPutAll:',
  7230. category: 'writing',
  7231. fn: function (aCollection){
  7232. var self=this;
  7233. smalltalk.send(aCollection, "_do_", [(function(each){return smalltalk.send(self, "_nextPut_", [each]);})]);
  7234. return self;},
  7235. args: ["aCollection"],
  7236. source: unescape('nextPutAll%3A%20aCollection%0A%09aCollection%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20self%20nextPut%3A%20each%5D'),
  7237. messageSends: ["do:", "nextPut:"],
  7238. referencedClasses: []
  7239. }),
  7240. smalltalk.Stream);
  7241. smalltalk.addMethod(
  7242. '_peek',
  7243. smalltalk.method({
  7244. selector: 'peek',
  7245. category: 'reading',
  7246. fn: function (){
  7247. var self=this;
  7248. return (($receiver = smalltalk.send(self, "_atEnd", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(smalltalk.send(self, "_collection", []), "_at_", [(($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(smalltalk.send(self, "_collection", []), "_at_", [(($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])]);})]);
  7249. return self;},
  7250. args: [],
  7251. 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'),
  7252. messageSends: ["ifFalse:", "atEnd", "at:", "collection", unescape("+"), "position"],
  7253. referencedClasses: []
  7254. }),
  7255. smalltalk.Stream);
  7256. smalltalk.addMethod(
  7257. '_atEnd',
  7258. smalltalk.method({
  7259. selector: 'atEnd',
  7260. category: 'testing',
  7261. fn: function (){
  7262. var self=this;
  7263. return smalltalk.send(smalltalk.send(self, "_position", []), "__eq", [smalltalk.send(self, "_size", [])]);
  7264. return self;},
  7265. args: [],
  7266. source: unescape('atEnd%0A%09%5Eself%20position%20%3D%20self%20size'),
  7267. messageSends: [unescape("%3D"), "position", "size"],
  7268. referencedClasses: []
  7269. }),
  7270. smalltalk.Stream);
  7271. smalltalk.addMethod(
  7272. '_atStart',
  7273. smalltalk.method({
  7274. selector: 'atStart',
  7275. category: 'testing',
  7276. fn: function (){
  7277. var self=this;
  7278. return smalltalk.send(smalltalk.send(self, "_position", []), "__eq", [(0)]);
  7279. return self;},
  7280. args: [],
  7281. source: unescape('atStart%0A%09%5Eself%20position%20%3D%200'),
  7282. messageSends: [unescape("%3D"), "position"],
  7283. referencedClasses: []
  7284. }),
  7285. smalltalk.Stream);
  7286. smalltalk.addMethod(
  7287. '_isEmpty',
  7288. smalltalk.method({
  7289. selector: 'isEmpty',
  7290. category: 'testing',
  7291. fn: function (){
  7292. var self=this;
  7293. return smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [(0)]);
  7294. return self;},
  7295. args: [],
  7296. source: unescape('isEmpty%0A%09%5Eself%20size%20%3D%200'),
  7297. messageSends: [unescape("%3D"), "size"],
  7298. referencedClasses: []
  7299. }),
  7300. smalltalk.Stream);
  7301. smalltalk.addMethod(
  7302. '_on_',
  7303. smalltalk.method({
  7304. selector: 'on:',
  7305. category: 'instance creation',
  7306. fn: function (aCollection){
  7307. var self=this;
  7308. 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", []));
  7309. return self;},
  7310. args: ["aCollection"],
  7311. 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'),
  7312. messageSends: ["setCollection:", "setStreamSize:", "size", "yourself", "new"],
  7313. referencedClasses: []
  7314. }),
  7315. smalltalk.Stream.klass);
  7316. smalltalk.addClass('StringStream', smalltalk.Stream, [], 'Kernel');
  7317. smalltalk.addMethod(
  7318. '_next_',
  7319. smalltalk.method({
  7320. selector: 'next:',
  7321. category: 'reading',
  7322. fn: function (anInteger){
  7323. var self=this;
  7324. var tempCollection=nil;
  7325. tempCollection=smalltalk.send(smalltalk.send(smalltalk.send(self, "_collection", []), "_class", []), "_new", []);
  7326. smalltalk.send(anInteger, "_timesRepeat_", [(function(){return (($receiver = smalltalk.send(self, "_atEnd", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return tempCollection=smalltalk.send(tempCollection, "__comma", [smalltalk.send(self, "_next", [])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return tempCollection=smalltalk.send(tempCollection, "__comma", [smalltalk.send(self, "_next", [])]);})]);})]);
  7327. return tempCollection;
  7328. return self;},
  7329. args: ["anInteger"],
  7330. 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'),
  7331. messageSends: ["new", "class", "collection", "timesRepeat:", "ifFalse:", "atEnd", unescape("%2C"), "next"],
  7332. referencedClasses: []
  7333. }),
  7334. smalltalk.StringStream);
  7335. smalltalk.addMethod(
  7336. '_nextPut_',
  7337. smalltalk.method({
  7338. selector: 'nextPut:',
  7339. category: 'writing',
  7340. fn: function (aString){
  7341. var self=this;
  7342. smalltalk.send(self, "_nextPutAll_", [aString]);
  7343. return self;},
  7344. args: ["aString"],
  7345. source: unescape('nextPut%3A%20aString%0A%09self%20nextPutAll%3A%20aString'),
  7346. messageSends: ["nextPutAll:"],
  7347. referencedClasses: []
  7348. }),
  7349. smalltalk.StringStream);
  7350. smalltalk.addMethod(
  7351. '_nextPutAll_',
  7352. smalltalk.method({
  7353. selector: 'nextPutAll:',
  7354. category: 'writing',
  7355. fn: function (aString){
  7356. var self=this;
  7357. smalltalk.send(self, "_setCollection_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_collection", []), "_copyFrom_to_", [(1), smalltalk.send(self, "_position", [])]), "__comma", [aString]), "__comma", [smalltalk.send(smalltalk.send(self, "_collection", []), "_copyFrom_to_", [(($receiver = (($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])).klass === smalltalk.Number) ? $receiver +smalltalk.send(aString, "_size", []) : smalltalk.send($receiver, "__plus", [smalltalk.send(aString, "_size", [])]), smalltalk.send(smalltalk.send(self, "_collection", []), "_size", [])])])]);
  7358. smalltalk.send(self, "_position_", [(($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +smalltalk.send(aString, "_size", []) : smalltalk.send($receiver, "__plus", [smalltalk.send(aString, "_size", [])])]);
  7359. smalltalk.send(self, "_setStreamSize_", [smalltalk.send(smalltalk.send(self, "_streamSize", []), "_max_", [smalltalk.send(self, "_position", [])])]);
  7360. return self;},
  7361. args: ["aString"],
  7362. 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'),
  7363. messageSends: ["setCollection:", unescape("%2C"), "copyFrom:to:", "collection", "position", unescape("+"), "size", "position:", "setStreamSize:", "max:", "streamSize"],
  7364. referencedClasses: []
  7365. }),
  7366. smalltalk.StringStream);
  7367. smalltalk.addMethod(
  7368. '_cr',
  7369. smalltalk.method({
  7370. selector: 'cr',
  7371. category: 'writing',
  7372. fn: function (){
  7373. var self=this;
  7374. return smalltalk.send(self, "_nextPutAll_", [smalltalk.send((smalltalk.String || String), "_cr", [])]);
  7375. return self;},
  7376. args: [],
  7377. source: unescape('cr%0A%09%5Eself%20nextPutAll%3A%20String%20cr'),
  7378. messageSends: ["nextPutAll:", "cr"],
  7379. referencedClasses: [smalltalk.String]
  7380. }),
  7381. smalltalk.StringStream);
  7382. smalltalk.addMethod(
  7383. '_crlf',
  7384. smalltalk.method({
  7385. selector: 'crlf',
  7386. category: 'writing',
  7387. fn: function (){
  7388. var self=this;
  7389. return smalltalk.send(self, "_nextPutAll_", [smalltalk.send((smalltalk.String || String), "_crlf", [])]);
  7390. return self;},
  7391. args: [],
  7392. source: unescape('crlf%0A%09%5Eself%20nextPutAll%3A%20String%20crlf'),
  7393. messageSends: ["nextPutAll:", "crlf"],
  7394. referencedClasses: [smalltalk.String]
  7395. }),
  7396. smalltalk.StringStream);
  7397. smalltalk.addMethod(
  7398. '_lf',
  7399. smalltalk.method({
  7400. selector: 'lf',
  7401. category: 'writing',
  7402. fn: function (){
  7403. var self=this;
  7404. return smalltalk.send(self, "_nextPutAll_", [smalltalk.send((smalltalk.String || String), "_lf", [])]);
  7405. return self;},
  7406. args: [],
  7407. source: unescape('lf%0A%09%5Eself%20nextPutAll%3A%20String%20lf'),
  7408. messageSends: ["nextPutAll:", "lf"],
  7409. referencedClasses: [smalltalk.String]
  7410. }),
  7411. smalltalk.StringStream);
  7412. smalltalk.addMethod(
  7413. '_space',
  7414. smalltalk.method({
  7415. selector: 'space',
  7416. category: 'writing',
  7417. fn: function (){
  7418. var self=this;
  7419. smalltalk.send(self, "_nextPut_", [" "]);
  7420. return self;},
  7421. args: [],
  7422. source: unescape('space%0A%09self%20nextPut%3A%20%27%20%27'),
  7423. messageSends: ["nextPut:"],
  7424. referencedClasses: []
  7425. }),
  7426. smalltalk.StringStream);
  7427. smalltalk.addClass('ClassCommentReader', smalltalk.Object, ['class', 'chunkParser'], 'Kernel');
  7428. smalltalk.addMethod(
  7429. '_class_',
  7430. smalltalk.method({
  7431. selector: 'class:',
  7432. category: 'accessing',
  7433. fn: function (aClass){
  7434. var self=this;
  7435. self['@class']=aClass;
  7436. return self;},
  7437. args: ["aClass"],
  7438. source: unescape('class%3A%20aClass%0A%09class%20%3A%3D%20aClass'),
  7439. messageSends: [],
  7440. referencedClasses: []
  7441. }),
  7442. smalltalk.ClassCommentReader);
  7443. smalltalk.addMethod(
  7444. '_scanFrom_',
  7445. smalltalk.method({
  7446. selector: 'scanFrom:',
  7447. category: 'fileIn',
  7448. fn: function (aChunkParser){
  7449. var self=this;
  7450. var chunk=nil;
  7451. chunk=smalltalk.send(aChunkParser, "_nextChunk", []);
  7452. (($receiver = smalltalk.send(chunk, "_isEmpty", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_setComment_", [chunk]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self, "_setComment_", [chunk]);})]);
  7453. return self;},
  7454. args: ["aChunkParser"],
  7455. source: unescape('scanFrom%3A%20aChunkParser%0A%09%7C%20chunk%20%7C%0A%09chunk%20%3A%3D%20aChunkParser%20nextChunk.%0A%09chunk%20isEmpty%20ifFalse%3A%20%5B%0A%09%20%20%20%20self%20setComment%3A%20chunk%5D.'),
  7456. messageSends: ["nextChunk", "ifFalse:", "isEmpty", "setComment:"],
  7457. referencedClasses: []
  7458. }),
  7459. smalltalk.ClassCommentReader);
  7460. smalltalk.addMethod(
  7461. '_initialize',
  7462. smalltalk.method({
  7463. selector: 'initialize',
  7464. category: 'initialization',
  7465. fn: function (){
  7466. var self=this;
  7467. smalltalk.send(self, "_initialize", [], smalltalk.Object);
  7468. self['@chunkParser']=smalltalk.send((smalltalk.ChunkParser || ChunkParser), "_new", []);
  7469. return self;},
  7470. args: [],
  7471. source: unescape('initialize%0A%09super%20initialize.%0A%09chunkParser%20%3A%3D%20ChunkParser%20new.'),
  7472. messageSends: ["initialize", "new"],
  7473. referencedClasses: [smalltalk.nil]
  7474. }),
  7475. smalltalk.ClassCommentReader);
  7476. smalltalk.addMethod(
  7477. '_setComment_',
  7478. smalltalk.method({
  7479. selector: 'setComment:',
  7480. category: 'private',
  7481. fn: function (aString){
  7482. var self=this;
  7483. smalltalk.send(self['@class'], "_comment_", [aString]);
  7484. return self;},
  7485. args: ["aString"],
  7486. source: unescape('setComment%3A%20aString%0A%20%20%20%20class%20comment%3A%20aString'),
  7487. messageSends: ["comment:"],
  7488. referencedClasses: []
  7489. }),
  7490. smalltalk.ClassCommentReader);
  7491. smalltalk.addClass('Random', smalltalk.Object, [], 'Kernel');
  7492. smalltalk.addMethod(
  7493. '_next',
  7494. smalltalk.method({
  7495. selector: 'next',
  7496. category: 'accessing',
  7497. fn: function (){
  7498. var self=this;
  7499. return Math.random();
  7500. return self;},
  7501. args: [],
  7502. source: unescape('next%0A%09%3Creturn%20Math.random%28%29%3E'),
  7503. messageSends: [],
  7504. referencedClasses: []
  7505. }),
  7506. smalltalk.Random);
  7507. smalltalk.addMethod(
  7508. '_next_',
  7509. smalltalk.method({
  7510. selector: 'next:',
  7511. category: 'accessing',
  7512. fn: function (anInteger){
  7513. var self=this;
  7514. return smalltalk.send((1), "_to_collect_", [anInteger, (function(each){return smalltalk.send(self, "_next", []);})]);
  7515. return self;},
  7516. args: ["anInteger"],
  7517. source: unescape('next%3A%20anInteger%0A%20%20%20%20%5E1%20to%3A%20anInteger%20collect%3A%20%5B%3Aeach%20%7C%20self%20next%5D'),
  7518. messageSends: ["to:collect:", "next"],
  7519. referencedClasses: []
  7520. }),
  7521. smalltalk.Random);
  7522. smalltalk.addClass('Point', smalltalk.Object, ['x', 'y'], 'Kernel');
  7523. smalltalk.addMethod(
  7524. '_x',
  7525. smalltalk.method({
  7526. selector: 'x',
  7527. category: 'accessing',
  7528. fn: function (){
  7529. var self=this;
  7530. return self['@x'];
  7531. return self;},
  7532. args: [],
  7533. source: unescape('x%0A%09%5Ex'),
  7534. messageSends: [],
  7535. referencedClasses: []
  7536. }),
  7537. smalltalk.Point);
  7538. smalltalk.addMethod(
  7539. '_y',
  7540. smalltalk.method({
  7541. selector: 'y',
  7542. category: 'accessing',
  7543. fn: function (){
  7544. var self=this;
  7545. return self['@y'];
  7546. return self;},
  7547. args: [],
  7548. source: unescape('y%0A%09%5Ey'),
  7549. messageSends: [],
  7550. referencedClasses: []
  7551. }),
  7552. smalltalk.Point);
  7553. smalltalk.addMethod(
  7554. '_y_',
  7555. smalltalk.method({
  7556. selector: 'y:',
  7557. category: 'accessing',
  7558. fn: function (aNumber){
  7559. var self=this;
  7560. self['@y']=aNumber;
  7561. return self;},
  7562. args: ["aNumber"],
  7563. source: unescape('y%3A%20aNumber%0A%09y%20%3A%3D%20aNumber'),
  7564. messageSends: [],
  7565. referencedClasses: []
  7566. }),
  7567. smalltalk.Point);
  7568. smalltalk.addMethod(
  7569. '_x_',
  7570. smalltalk.method({
  7571. selector: 'x:',
  7572. category: 'accessing',
  7573. fn: function (aNumber){
  7574. var self=this;
  7575. self['@x']=aNumber;
  7576. return self;},
  7577. args: ["aNumber"],
  7578. source: unescape('x%3A%20aNumber%0A%09x%20%3A%3D%20aNumber'),
  7579. messageSends: [],
  7580. referencedClasses: []
  7581. }),
  7582. smalltalk.Point);
  7583. smalltalk.addMethod(
  7584. '__star',
  7585. smalltalk.method({
  7586. selector: '*',
  7587. category: 'arithmetic',
  7588. fn: function (aPoint){
  7589. var self=this;
  7590. return smalltalk.send((smalltalk.Point || Point), "_x_y_", [(($receiver = smalltalk.send(self, "_x", [])).klass === smalltalk.Number) ? $receiver *smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", []) : smalltalk.send($receiver, "__star", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", [])]), (($receiver = smalltalk.send(self, "_y", [])).klass === smalltalk.Number) ? $receiver *smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", []) : smalltalk.send($receiver, "__star", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", [])])]);
  7591. return self;},
  7592. args: ["aPoint"],
  7593. source: unescape('*%20aPoint%0A%09%5EPoint%20x%3A%20self%20x%20*%20aPoint%20asPoint%20x%20y%3A%20self%20y%20*%20aPoint%20asPoint%20y'),
  7594. messageSends: ["x:y:", unescape("*"), "x", "asPoint", "y"],
  7595. referencedClasses: [smalltalk.Point]
  7596. }),
  7597. smalltalk.Point);
  7598. smalltalk.addMethod(
  7599. '__plus',
  7600. smalltalk.method({
  7601. selector: '+',
  7602. category: 'arithmetic',
  7603. fn: function (aPoint){
  7604. var self=this;
  7605. return smalltalk.send((smalltalk.Point || Point), "_x_y_", [(($receiver = smalltalk.send(self, "_x", [])).klass === smalltalk.Number) ? $receiver +smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", []) : smalltalk.send($receiver, "__plus", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", [])]), (($receiver = smalltalk.send(self, "_y", [])).klass === smalltalk.Number) ? $receiver +smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", []) : smalltalk.send($receiver, "__plus", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", [])])]);
  7606. return self;},
  7607. args: ["aPoint"],
  7608. source: unescape('+%20aPoint%0A%09%5EPoint%20x%3A%20self%20x%20+%20aPoint%20asPoint%20x%20y%3A%20self%20y%20+%20aPoint%20asPoint%20y'),
  7609. messageSends: ["x:y:", unescape("+"), "x", "asPoint", "y"],
  7610. referencedClasses: [smalltalk.Point]
  7611. }),
  7612. smalltalk.Point);
  7613. smalltalk.addMethod(
  7614. '__minus',
  7615. smalltalk.method({
  7616. selector: '-',
  7617. category: 'arithmetic',
  7618. fn: function (aPoint){
  7619. var self=this;
  7620. return smalltalk.send((smalltalk.Point || Point), "_x_y_", [(($receiver = smalltalk.send(self, "_x", [])).klass === smalltalk.Number) ? $receiver -smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", []) : smalltalk.send($receiver, "__minus", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", [])]), (($receiver = smalltalk.send(self, "_y", [])).klass === smalltalk.Number) ? $receiver -smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", []) : smalltalk.send($receiver, "__minus", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", [])])]);
  7621. return self;},
  7622. args: ["aPoint"],
  7623. source: unescape('-%20aPoint%0A%09%5EPoint%20x%3A%20self%20x%20-%20aPoint%20asPoint%20x%20y%3A%20self%20y%20-%20aPoint%20asPoint%20y'),
  7624. messageSends: ["x:y:", unescape("-"), "x", "asPoint", "y"],
  7625. referencedClasses: [smalltalk.Point]
  7626. }),
  7627. smalltalk.Point);
  7628. smalltalk.addMethod(
  7629. '__slash',
  7630. smalltalk.method({
  7631. selector: '/',
  7632. category: 'arithmetic',
  7633. fn: function (aPoint){
  7634. var self=this;
  7635. return smalltalk.send((smalltalk.Point || Point), "_x_y_", [(($receiver = smalltalk.send(self, "_x", [])).klass === smalltalk.Number) ? $receiver /smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", []) : smalltalk.send($receiver, "__slash", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", [])]), (($receiver = smalltalk.send(self, "_y", [])).klass === smalltalk.Number) ? $receiver /smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", []) : smalltalk.send($receiver, "__slash", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", [])])]);
  7636. return self;},
  7637. args: ["aPoint"],
  7638. source: unescape('/%20aPoint%0A%09%5EPoint%20x%3A%20self%20x%20/%20aPoint%20asPoint%20x%20y%3A%20self%20y%20/%20aPoint%20asPoint%20y'),
  7639. messageSends: ["x:y:", unescape("/"), "x", "asPoint", "y"],
  7640. referencedClasses: [smalltalk.Point]
  7641. }),
  7642. smalltalk.Point);
  7643. smalltalk.addMethod(
  7644. '_asPoint',
  7645. smalltalk.method({
  7646. selector: 'asPoint',
  7647. category: 'converting',
  7648. fn: function (){
  7649. var self=this;
  7650. return self;
  7651. return self;},
  7652. args: [],
  7653. source: unescape('asPoint%0A%09%5Eself'),
  7654. messageSends: [],
  7655. referencedClasses: []
  7656. }),
  7657. smalltalk.Point);
  7658. smalltalk.addMethod(
  7659. '_x_y_',
  7660. smalltalk.method({
  7661. selector: 'x:y:',
  7662. category: 'instance creation',
  7663. fn: function (aNumber, anotherNumber){
  7664. var self=this;
  7665. return (function($rec){smalltalk.send($rec, "_x_", [aNumber]);smalltalk.send($rec, "_y_", [anotherNumber]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  7666. return self;},
  7667. args: ["aNumber", "anotherNumber"],
  7668. 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'),
  7669. messageSends: ["x:", "y:", "yourself", "new"],
  7670. referencedClasses: []
  7671. }),
  7672. smalltalk.Point.klass);
  7673. smalltalk.addClass('Message', smalltalk.Object, ['selector', 'arguments'], 'Kernel');
  7674. smalltalk.addMethod(
  7675. '_selector',
  7676. smalltalk.method({
  7677. selector: 'selector',
  7678. category: 'accessing',
  7679. fn: function (){
  7680. var self=this;
  7681. return self['@selector'];
  7682. return self;},
  7683. args: [],
  7684. source: unescape('selector%0A%09%5Eselector'),
  7685. messageSends: [],
  7686. referencedClasses: []
  7687. }),
  7688. smalltalk.Message);
  7689. smalltalk.addMethod(
  7690. '_selector_',
  7691. smalltalk.method({
  7692. selector: 'selector:',
  7693. category: 'accessing',
  7694. fn: function (aString){
  7695. var self=this;
  7696. self['@selector']=aString;
  7697. return self;},
  7698. args: ["aString"],
  7699. source: unescape('selector%3A%20aString%0A%09selector%20%3A%3D%20aString'),
  7700. messageSends: [],
  7701. referencedClasses: []
  7702. }),
  7703. smalltalk.Message);
  7704. smalltalk.addMethod(
  7705. '_arguments_',
  7706. smalltalk.method({
  7707. selector: 'arguments:',
  7708. category: 'accessing',
  7709. fn: function (anArray){
  7710. var self=this;
  7711. self['@arguments']=anArray;
  7712. return self;},
  7713. args: ["anArray"],
  7714. source: unescape('arguments%3A%20anArray%0A%09arguments%20%3A%3D%20anArray'),
  7715. messageSends: [],
  7716. referencedClasses: []
  7717. }),
  7718. smalltalk.Message);
  7719. smalltalk.addMethod(
  7720. '_arguments',
  7721. smalltalk.method({
  7722. selector: 'arguments',
  7723. category: 'accessing',
  7724. fn: function (){
  7725. var self=this;
  7726. return self['@arguments'];
  7727. return self;},
  7728. args: [],
  7729. source: unescape('arguments%0A%09%5Earguments'),
  7730. messageSends: [],
  7731. referencedClasses: []
  7732. }),
  7733. smalltalk.Message);
  7734. smalltalk.addMethod(
  7735. '_selector_arguments_',
  7736. smalltalk.method({
  7737. selector: 'selector:arguments:',
  7738. category: 'instance creation',
  7739. fn: function (aString, anArray){
  7740. var self=this;
  7741. return (function($rec){smalltalk.send($rec, "_selector_", [aString]);smalltalk.send($rec, "_arguments_", [anArray]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  7742. return self;},
  7743. args: ["aString", "anArray"],
  7744. 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'),
  7745. messageSends: ["selector:", "arguments:", "yourself", "new"],
  7746. referencedClasses: []
  7747. }),
  7748. smalltalk.Message.klass);
  7749. smalltalk.addClass('MessageNotUnderstood', smalltalk.Error, ['message', 'receiver'], 'Kernel');
  7750. smalltalk.addMethod(
  7751. '_message',
  7752. smalltalk.method({
  7753. selector: 'message',
  7754. category: 'accessing',
  7755. fn: function (){
  7756. var self=this;
  7757. return self['@message'];
  7758. return self;},
  7759. args: [],
  7760. source: unescape('message%0A%09%5Emessage'),
  7761. messageSends: [],
  7762. referencedClasses: []
  7763. }),
  7764. smalltalk.MessageNotUnderstood);
  7765. smalltalk.addMethod(
  7766. '_message_',
  7767. smalltalk.method({
  7768. selector: 'message:',
  7769. category: 'accessing',
  7770. fn: function (aMessage){
  7771. var self=this;
  7772. self['@message']=aMessage;
  7773. return self;},
  7774. args: ["aMessage"],
  7775. source: unescape('message%3A%20aMessage%0A%09message%20%3A%3D%20aMessage'),
  7776. messageSends: [],
  7777. referencedClasses: []
  7778. }),
  7779. smalltalk.MessageNotUnderstood);
  7780. smalltalk.addMethod(
  7781. '_receiver',
  7782. smalltalk.method({
  7783. selector: 'receiver',
  7784. category: 'accessing',
  7785. fn: function (){
  7786. var self=this;
  7787. return self['@receiver'];
  7788. return self;},
  7789. args: [],
  7790. source: unescape('receiver%0A%09%5Ereceiver'),
  7791. messageSends: [],
  7792. referencedClasses: []
  7793. }),
  7794. smalltalk.MessageNotUnderstood);
  7795. smalltalk.addMethod(
  7796. '_receiver_',
  7797. smalltalk.method({
  7798. selector: 'receiver:',
  7799. category: 'accessing',
  7800. fn: function (anObject){
  7801. var self=this;
  7802. self['@receiver']=anObject;
  7803. return self;},
  7804. args: ["anObject"],
  7805. source: unescape('receiver%3A%20anObject%0A%09receiver%20%3A%3D%20anObject'),
  7806. messageSends: [],
  7807. referencedClasses: []
  7808. }),
  7809. smalltalk.MessageNotUnderstood);
  7810. smalltalk.addMethod(
  7811. '_messageText',
  7812. smalltalk.method({
  7813. selector: 'messageText',
  7814. category: 'accessing',
  7815. fn: function (){
  7816. var self=this;
  7817. 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", [])]);
  7818. return self;},
  7819. args: [],
  7820. source: unescape('messageText%0A%09%5Eself%20receiver%20asString%2C%20%27%20does%20not%20understand%20%23%27%2C%20self%20message%20selector'),
  7821. messageSends: [unescape("%2C"), "asString", "receiver", "selector", "message"],
  7822. referencedClasses: []
  7823. }),
  7824. smalltalk.MessageNotUnderstood);
  7825. smalltalk.addClass('ErrorHandler', smalltalk.Object, [], 'Kernel');
  7826. smalltalk.addMethod(
  7827. '_handleError_',
  7828. smalltalk.method({
  7829. selector: 'handleError:',
  7830. category: 'error handling',
  7831. fn: function (anError){
  7832. var self=this;
  7833. (($receiver = smalltalk.send(anError, "_context", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_logErrorContext_", [smalltalk.send(anError, "_context", [])]);})() : nil;
  7834. smalltalk.send(self, "_logError_", [anError]);
  7835. return self;},
  7836. args: ["anError"],
  7837. source: unescape('handleError%3A%20anError%0A%09anError%20context%20ifNotNil%3A%20%5Bself%20logErrorContext%3A%20anError%20context%5D.%0A%09self%20logError%3A%20anError'),
  7838. messageSends: ["ifNotNil:", "context", "logErrorContext:", "logError:"],
  7839. referencedClasses: []
  7840. }),
  7841. smalltalk.ErrorHandler);
  7842. smalltalk.addMethod(
  7843. '_logContext_',
  7844. smalltalk.method({
  7845. selector: 'logContext:',
  7846. category: 'private',
  7847. fn: function (aContext){
  7848. var self=this;
  7849. (($receiver = smalltalk.send(aContext, "_home", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_logContext_", [smalltalk.send(aContext, "_home", [])]);})() : nil;
  7850. smalltalk.send(self, "_log_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aContext, "_receiver", []), "_asString", []), "__comma", [unescape("%3E%3E")]), "__comma", [smalltalk.send(aContext, "_selector", [])])]);
  7851. return self;},
  7852. args: ["aContext"],
  7853. 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'),
  7854. messageSends: ["ifNotNil:", "home", "logContext:", "log:", unescape("%2C"), "asString", "receiver", "selector"],
  7855. referencedClasses: []
  7856. }),
  7857. smalltalk.ErrorHandler);
  7858. smalltalk.addMethod(
  7859. '_logErrorContext_',
  7860. smalltalk.method({
  7861. selector: 'logErrorContext:',
  7862. category: 'private',
  7863. fn: function (aContext){
  7864. var self=this;
  7865. (($receiver = aContext) != nil && $receiver != undefined) ? (function(){return (($receiver = smalltalk.send(aContext, "_home", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_logContext_", [smalltalk.send(aContext, "_home", [])]);})() : nil;})() : nil;
  7866. return self;},
  7867. args: ["aContext"],
  7868. 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'),
  7869. messageSends: ["ifNotNil:", "home", "logContext:"],
  7870. referencedClasses: []
  7871. }),
  7872. smalltalk.ErrorHandler);
  7873. smalltalk.addMethod(
  7874. '_logError_',
  7875. smalltalk.method({
  7876. selector: 'logError:',
  7877. category: 'private',
  7878. fn: function (anError){
  7879. var self=this;
  7880. smalltalk.send(self, "_log_", [smalltalk.send(anError, "_messageText", [])]);
  7881. return self;},
  7882. args: ["anError"],
  7883. source: unescape('logError%3A%20anError%0A%09self%20log%3A%20anError%20messageText'),
  7884. messageSends: ["log:", "messageText"],
  7885. referencedClasses: []
  7886. }),
  7887. smalltalk.ErrorHandler);
  7888. smalltalk.addMethod(
  7889. '_log_',
  7890. smalltalk.method({
  7891. selector: 'log:',
  7892. category: 'private',
  7893. fn: function (aString){
  7894. var self=this;
  7895. smalltalk.send((typeof console == 'undefined' ? nil : console), "_log_", [aString]);
  7896. return self;},
  7897. args: ["aString"],
  7898. source: unescape('log%3A%20aString%0A%09console%20log%3A%20aString'),
  7899. messageSends: ["log:"],
  7900. referencedClasses: []
  7901. }),
  7902. smalltalk.ErrorHandler);
  7903. smalltalk.ErrorHandler.klass.iVarNames = ['current'];
  7904. smalltalk.addMethod(
  7905. '_current',
  7906. smalltalk.method({
  7907. selector: 'current',
  7908. category: 'accessing',
  7909. fn: function (){
  7910. var self=this;
  7911. return (($receiver = self['@current']) == nil || $receiver == undefined) ? (function(){return self['@current']=smalltalk.send(self, "_new", []);})() : $receiver;
  7912. return self;},
  7913. args: [],
  7914. source: unescape('current%0A%09%5Ecurrent%20ifNil%3A%20%5Bcurrent%20%3A%3D%20self%20new%5D'),
  7915. messageSends: ["ifNil:", "new"],
  7916. referencedClasses: []
  7917. }),
  7918. smalltalk.ErrorHandler.klass);
  7919. smalltalk.addMethod(
  7920. '_register',
  7921. smalltalk.method({
  7922. selector: 'register',
  7923. category: 'initialization',
  7924. fn: function (){
  7925. var self=this;
  7926. smalltalk.send((smalltalk.ErrorHandler || ErrorHandler), "_setCurrent_", [smalltalk.send(self, "_new", [])]);
  7927. return self;},
  7928. args: [],
  7929. source: unescape('register%0A%09ErrorHandler%20setCurrent%3A%20self%20new'),
  7930. messageSends: ["setCurrent:", "new"],
  7931. referencedClasses: [smalltalk.ErrorHandler]
  7932. }),
  7933. smalltalk.ErrorHandler.klass);
  7934. smalltalk.addMethod(
  7935. '_setCurrent_',
  7936. smalltalk.method({
  7937. selector: 'setCurrent:',
  7938. category: 'accessing',
  7939. fn: function (anHandler){
  7940. var self=this;
  7941. self['@current']=anHandler;
  7942. return self;},
  7943. args: ["anHandler"],
  7944. source: unescape('setCurrent%3A%20anHandler%0A%09current%20%3A%3D%20anHandler'),
  7945. messageSends: [],
  7946. referencedClasses: []
  7947. }),
  7948. smalltalk.ErrorHandler.klass);
  7949. smalltalk.addClass('JSObjectProxy', smalltalk.Object, ['jsObject'], 'Kernel');
  7950. smalltalk.addMethod(
  7951. '_jsObject_',
  7952. smalltalk.method({
  7953. selector: 'jsObject:',
  7954. category: 'accessing',
  7955. fn: function (aJSObject){
  7956. var self=this;
  7957. self['@jsObject']=aJSObject;
  7958. return self;},
  7959. args: ["aJSObject"],
  7960. source: unescape('jsObject%3A%20aJSObject%0A%09jsObject%20%3A%3D%20aJSObject'),
  7961. messageSends: [],
  7962. referencedClasses: []
  7963. }),
  7964. smalltalk.JSObjectProxy);
  7965. smalltalk.addMethod(
  7966. '_jsObject',
  7967. smalltalk.method({
  7968. selector: 'jsObject',
  7969. category: 'accessing',
  7970. fn: function (){
  7971. var self=this;
  7972. return self['@jsObject'];
  7973. return self;},
  7974. args: [],
  7975. source: unescape('jsObject%0A%09%5EjsObject'),
  7976. messageSends: [],
  7977. referencedClasses: []
  7978. }),
  7979. smalltalk.JSObjectProxy);
  7980. smalltalk.addMethod(
  7981. '_printString',
  7982. smalltalk.method({
  7983. selector: 'printString',
  7984. category: 'proxy',
  7985. fn: function (){
  7986. var self=this;
  7987. return smalltalk.send(smalltalk.send(self, "_jsObject", []), "_toString", []);
  7988. return self;},
  7989. args: [],
  7990. source: unescape('printString%0A%09%5Eself%20jsObject%20toString'),
  7991. messageSends: ["toString", "jsObject"],
  7992. referencedClasses: []
  7993. }),
  7994. smalltalk.JSObjectProxy);
  7995. smalltalk.addMethod(
  7996. '_inspectOn_',
  7997. smalltalk.method({
  7998. selector: 'inspectOn:',
  7999. category: 'proxy',
  8000. fn: function (anInspector){
  8001. var self=this;
  8002. var variables=nil;
  8003. variables=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []);
  8004. smalltalk.send(variables, "_at_put_", [unescape("%23self"), smalltalk.send(self, "_jsObject", [])]);
  8005. smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
  8006. for(var i in self['@jsObject']) {
  8007. variables._at_put_(i, self['@jsObject'][i]);
  8008. };
  8009. smalltalk.send(anInspector, "_setVariables_", [variables]);
  8010. return self;},
  8011. args: ["anInspector"],
  8012. source: unescape('inspectOn%3A%20anInspector%0A%09%7C%20variables%20%7C%0A%09variables%20%3A%3D%20Dictionary%20new.%0A%09variables%20at%3A%20%27%23self%27%20put%3A%20self%20jsObject.%0A%09anInspector%20setLabel%3A%20self%20printString.%0A%09%3Cfor%28var%20i%20in%20self%5B%27@jsObject%27%5D%29%20%7B%0A%09%09variables._at_put_%28i%2C%20self%5B%27@jsObject%27%5D%5Bi%5D%29%3B%0A%09%7D%3E.%0A%09anInspector%20setVariables%3A%20variables'),
  8013. messageSends: ["new", "at:put:", "jsObject", "setLabel:", "printString", "setVariables:"],
  8014. referencedClasses: [smalltalk.Dictionary]
  8015. }),
  8016. smalltalk.JSObjectProxy);
  8017. smalltalk.addMethod(
  8018. '_doesNotUnderstand_',
  8019. smalltalk.method({
  8020. selector: 'doesNotUnderstand:',
  8021. category: 'proxy',
  8022. fn: function (aMessage){
  8023. var self=this;
  8024. var obj=nil;
  8025. var selector=nil;
  8026. var arguments=nil;
  8027. obj=smalltalk.send(self, "_jsObject", []);
  8028. selector=smalltalk.send(aMessage, "_selector", []);
  8029. arguments=smalltalk.send(aMessage, "_arguments", []);
  8030. if(obj[selector]) {return smalltalk.send(obj, selector, arguments)};
  8031. smalltalk.send(self, "_doesNotUnderstand_", [aMessage], smalltalk.Object);
  8032. return self;},
  8033. args: ["aMessage"],
  8034. source: unescape('doesNotUnderstand%3A%20aMessage%0A%09%7C%20obj%20selector%20arguments%20%7C%0A%09obj%20%3A%3D%20self%20jsObject.%0A%09selector%20%3A%3D%20aMessage%20selector.%0A%09arguments%20%3A%3D%20aMessage%20arguments.%0A%09%3Cif%28obj%5Bselector%5D%29%20%7Breturn%20smalltalk.send%28obj%2C%20selector%2C%20arguments%29%7D%3E.%0A%09super%20doesNotUnderstand%3A%20aMessage'),
  8035. messageSends: ["jsObject", "selector", "arguments", "doesNotUnderstand:"],
  8036. referencedClasses: []
  8037. }),
  8038. smalltalk.JSObjectProxy);
  8039. smalltalk.addMethod(
  8040. '_on_',
  8041. smalltalk.method({
  8042. selector: 'on:',
  8043. category: 'instance creation',
  8044. fn: function (aJSObject){
  8045. var self=this;
  8046. return (function($rec){smalltalk.send($rec, "_jsObject_", [aJSObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  8047. return self;},
  8048. args: ["aJSObject"],
  8049. source: unescape('on%3A%20aJSObject%0A%09%5Eself%20new%0A%09%09jsObject%3A%20aJSObject%3B%0A%09%09yourself'),
  8050. messageSends: ["jsObject:", "yourself", "new"],
  8051. referencedClasses: []
  8052. }),
  8053. smalltalk.JSObjectProxy.klass);
  8054. smalltalk.addClass('Set', smalltalk.Collection, ['elements'], 'Kernel');
  8055. smalltalk.addMethod(
  8056. '_add_',
  8057. smalltalk.method({
  8058. selector: 'add:',
  8059. category: 'adding/removing',
  8060. fn: function (anObject){
  8061. var self=this;
  8062. var found;
  8063. for(var i in self['@elements']) {
  8064. if(anObject == self['@elements'][i]) {
  8065. found = true;
  8066. break;
  8067. }
  8068. }
  8069. if(!found) {self['@elements'].push(anObject)}
  8070. ;
  8071. return self;},
  8072. args: ["anObject"],
  8073. source: unescape('add%3A%20anObject%0A%09%3C%0A%09%09var%20found%3B%0A%09%09for%28var%20i%20in%20self%5B%27@elements%27%5D%29%20%7B%0A%09%09%09if%28anObject%20%3D%3D%20self%5B%27@elements%27%5D%5Bi%5D%29%20%7B%0A%09%09%09%09found%20%3D%20true%3B%0A%09%09%09%09break%3B%0A%09%09%09%7D%0A%09%09%7D%0A%09%09if%28%21found%29%20%7Bself%5B%27@elements%27%5D.push%28anObject%29%7D%0A%09%3E'),
  8074. messageSends: [],
  8075. referencedClasses: []
  8076. }),
  8077. smalltalk.Set);
  8078. smalltalk.addMethod(
  8079. '_remove_',
  8080. smalltalk.method({
  8081. selector: 'remove:',
  8082. category: 'adding/removing',
  8083. fn: function (anObject){
  8084. var self=this;
  8085. smalltalk.send(self['@elements'], "_remove_", [anObject]);
  8086. return self;},
  8087. args: ["anObject"],
  8088. source: unescape('remove%3A%20anObject%0A%09elements%20remove%3A%20anObject'),
  8089. messageSends: ["remove:"],
  8090. referencedClasses: []
  8091. }),
  8092. smalltalk.Set);
  8093. smalltalk.addMethod(
  8094. '_initialize',
  8095. smalltalk.method({
  8096. selector: 'initialize',
  8097. category: 'initialization',
  8098. fn: function (){
  8099. var self=this;
  8100. smalltalk.send(self, "_initialize", [], smalltalk.Collection);
  8101. self['@elements']=[];
  8102. return self;},
  8103. args: [],
  8104. source: unescape('initialize%0A%09super%20initialize.%0A%09elements%20%3A%3D%20%23%28%29'),
  8105. messageSends: ["initialize"],
  8106. referencedClasses: []
  8107. }),
  8108. smalltalk.Set);
  8109. smalltalk.addMethod(
  8110. '_size',
  8111. smalltalk.method({
  8112. selector: 'size',
  8113. category: 'accessing',
  8114. fn: function (){
  8115. var self=this;
  8116. return smalltalk.send(self['@elements'], "_size", []);
  8117. return self;},
  8118. args: [],
  8119. source: unescape('size%0A%09%5Eelements%20size'),
  8120. messageSends: ["size"],
  8121. referencedClasses: []
  8122. }),
  8123. smalltalk.Set);
  8124. smalltalk.addMethod(
  8125. '_asArray',
  8126. smalltalk.method({
  8127. selector: 'asArray',
  8128. category: 'converting',
  8129. fn: function (){
  8130. var self=this;
  8131. return smalltalk.send(self['@elements'], "_copy", []);
  8132. return self;},
  8133. args: [],
  8134. source: unescape('asArray%0A%09%5Eelements%20copy'),
  8135. messageSends: ["copy"],
  8136. referencedClasses: []
  8137. }),
  8138. smalltalk.Set);
  8139. smalltalk.addMethod(
  8140. '_detect_ifNone_',
  8141. smalltalk.method({
  8142. selector: 'detect:ifNone:',
  8143. category: 'enumerating',
  8144. fn: function (aBlock, anotherBlock){
  8145. var self=this;
  8146. return smalltalk.send(self['@elements'], "_detect_ifNone_", [aBlock, anotherBlock]);
  8147. return self;},
  8148. args: ["aBlock", "anotherBlock"],
  8149. source: unescape('detect%3A%20aBlock%20ifNone%3A%20anotherBlock%0A%09%5Eelements%20detect%3A%20aBlock%20ifNone%3A%20anotherBlock'),
  8150. messageSends: ["detect:ifNone:"],
  8151. referencedClasses: []
  8152. }),
  8153. smalltalk.Set);
  8154. smalltalk.addMethod(
  8155. '_do_',
  8156. smalltalk.method({
  8157. selector: 'do:',
  8158. category: 'enumerating',
  8159. fn: function (aBlock){
  8160. var self=this;
  8161. smalltalk.send(self['@elements'], "_do_", [aBlock]);
  8162. return self;},
  8163. args: ["aBlock"],
  8164. source: unescape('do%3A%20aBlock%0A%09elements%20do%3A%20aBlock'),
  8165. messageSends: ["do:"],
  8166. referencedClasses: []
  8167. }),
  8168. smalltalk.Set);
  8169. smalltalk.addMethod(
  8170. '_includes_',
  8171. smalltalk.method({
  8172. selector: 'includes:',
  8173. category: 'testing',
  8174. fn: function (anObject){
  8175. var self=this;
  8176. return smalltalk.send(self['@elements'], "_includes_", [anObject]);
  8177. return self;},
  8178. args: ["anObject"],
  8179. source: unescape('includes%3A%20anObject%0A%09%5Eelements%20includes%3A%20anObject'),
  8180. messageSends: ["includes:"],
  8181. referencedClasses: []
  8182. }),
  8183. smalltalk.Set);
  8184. smalltalk.addMethod(
  8185. '__eq',
  8186. smalltalk.method({
  8187. selector: '=',
  8188. category: 'comparing',
  8189. fn: function (aCollection){
  8190. var self=this;
  8191. return smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [smalltalk.send(aCollection, "_class", [])]), "_and_", [(function(){return smalltalk.send(self['@elements'], "__eq", [smalltalk.send(aCollection, "_asArray", [])]);})]);
  8192. return self;},
  8193. args: ["aCollection"],
  8194. source: unescape('%3D%20aCollection%0A%09%5Eself%20class%20%3D%20aCollection%20class%20and%3A%20%5B%0A%20%20%20%20%20%20%20%20%09elements%20%3D%20aCollection%20asArray%5D'),
  8195. messageSends: ["and:", unescape("%3D"), "class", "asArray"],
  8196. referencedClasses: []
  8197. }),
  8198. smalltalk.Set);
  8199. smalltalk.addClass('FileServer', smalltalk.Object, ['path', 'http', 'fs', 'url', 'port', 'basePath', 'sys'], 'FileServer');
  8200. smalltalk.addMethod(
  8201. '_basePath',
  8202. smalltalk.method({
  8203. selector: 'basePath',
  8204. category: 'accessing',
  8205. fn: function (){
  8206. var self=this;
  8207. return (($receiver = self['@basePath']) == nil || $receiver == undefined) ? (function(){return unescape("./");})() : $receiver;
  8208. return self;},
  8209. args: [],
  8210. source: unescape('basePath%0A%09%5EbasePath%20ifNil%3A%20%5B%27./%27%5D'),
  8211. messageSends: ["ifNil:"],
  8212. referencedClasses: []
  8213. }),
  8214. smalltalk.FileServer);
  8215. smalltalk.addMethod(
  8216. '_basePath_',
  8217. smalltalk.method({
  8218. selector: 'basePath:',
  8219. category: 'accessing',
  8220. fn: function (aString){
  8221. var self=this;
  8222. self['@basePath']=aString;
  8223. return self;},
  8224. args: ["aString"],
  8225. source: unescape('basePath%3A%20aString%0A%09basePath%20%3A%3D%20aString'),
  8226. messageSends: [],
  8227. referencedClasses: []
  8228. }),
  8229. smalltalk.FileServer);
  8230. smalltalk.addMethod(
  8231. '_port',
  8232. smalltalk.method({
  8233. selector: 'port',
  8234. category: 'accessing',
  8235. fn: function (){
  8236. var self=this;
  8237. return smalltalk.send(smalltalk.send(self, "_class", []), "_port", []);
  8238. return self;},
  8239. args: [],
  8240. source: unescape('port%0A%09%5Eself%20class%20port'),
  8241. messageSends: ["port", "class"],
  8242. referencedClasses: []
  8243. }),
  8244. smalltalk.FileServer);
  8245. smalltalk.addMethod(
  8246. '_initialize',
  8247. smalltalk.method({
  8248. selector: 'initialize',
  8249. category: 'initialization',
  8250. fn: function (){
  8251. var self=this;
  8252. smalltalk.send(self, "_initialize", [], smalltalk.Object);
  8253. self['@path']=smalltalk.send(self, "_require_", ["path"]);
  8254. self['@http']=smalltalk.send(self, "_require_", ["http"]);
  8255. self['@fs']=smalltalk.send(self, "_require_", ["fs"]);
  8256. self['@sys']=smalltalk.send(self, "_require_", ["sys"]);
  8257. self['@url']=smalltalk.send(self, "_require_", ["url"]);
  8258. return self;},
  8259. args: [],
  8260. source: unescape('initialize%0A%09super%20initialize.%0A%09path%20%3A%3D%20self%20require%3A%20%27path%27.%0A%09http%20%3A%3D%20self%20require%3A%20%27http%27.%0A%09fs%20%3A%3D%20self%20require%3A%20%27fs%27.%0A%09sys%20%3A%3D%20self%20require%3A%20%27sys%27.%0A%09url%20%3A%3D%20self%20require%3A%20%27url%27'),
  8261. messageSends: ["initialize", "require:"],
  8262. referencedClasses: []
  8263. }),
  8264. smalltalk.FileServer);
  8265. smalltalk.addMethod(
  8266. '_require_',
  8267. smalltalk.method({
  8268. selector: 'require:',
  8269. category: 'private',
  8270. fn: function (aModuleString){
  8271. var self=this;
  8272. return smalltalk.send((typeof require == 'undefined' ? nil : require), "_value_", [aModuleString]);
  8273. return self;},
  8274. args: ["aModuleString"],
  8275. source: unescape('require%3A%20aModuleString%0A%09%22call%20to%20the%20require%20function%22%0A%09%5Erequire%20value%3A%20aModuleString'),
  8276. messageSends: ["value:"],
  8277. referencedClasses: []
  8278. }),
  8279. smalltalk.FileServer);
  8280. smalltalk.addMethod(
  8281. '_writeData_toFileNamed_',
  8282. smalltalk.method({
  8283. selector: 'writeData:toFileNamed:',
  8284. category: 'private',
  8285. fn: function (data, aFilename){
  8286. var self=this;
  8287. smalltalk.send((typeof console == 'undefined' ? nil : console), "_log_", [aFilename]);
  8288. return self;},
  8289. args: ["data", "aFilename"],
  8290. source: unescape('writeData%3A%20data%20toFileNamed%3A%20aFilename%0A%09console%20log%3A%20aFilename'),
  8291. messageSends: ["log:"],
  8292. referencedClasses: []
  8293. }),
  8294. smalltalk.FileServer);
  8295. smalltalk.addMethod(
  8296. '_respondNotFoundTo_',
  8297. smalltalk.method({
  8298. selector: 'respondNotFoundTo:',
  8299. category: 'request handling',
  8300. fn: function (aResponse){
  8301. var self=this;
  8302. (function($rec){smalltalk.send($rec, "_writeHead_options_", [(404), smalltalk.Dictionary._fromPairs_([smalltalk.send(unescape("Content-Type"), "__minus_gt", [unescape("text/plain")])])]);smalltalk.send($rec, "_write_", ["404 Not found"]);return smalltalk.send($rec, "_end", []);})(aResponse);
  8303. return self;},
  8304. args: ["aResponse"],
  8305. source: unescape('respondNotFoundTo%3A%20aResponse%0A%09aResponse%20%0A%09%09writeHead%3A%20404%20options%3A%20%23%7B%27Content-Type%27%20-%3E%20%27text/plain%27%7D%3B%0A%09%09write%3A%20%27404%20Not%20found%27%3B%0A%09%09end'),
  8306. messageSends: ["writeHead:options:", unescape("-%3E"), "write:", "end"],
  8307. referencedClasses: []
  8308. }),
  8309. smalltalk.FileServer);
  8310. smalltalk.addMethod(
  8311. '_handleRequest_respondTo_',
  8312. smalltalk.method({
  8313. selector: 'handleRequest:respondTo:',
  8314. category: 'request handling',
  8315. fn: function (aRequest, aResponse){
  8316. var self=this;
  8317. (($receiver = smalltalk.send(smalltalk.send(aRequest, "_method", []), "__eq", ["PUT"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_handlePUTRequest_respondTo_", [aRequest, aResponse]);})() : (function(){return smalltalk.send(self, "_handleGETRequest_respondTo_", [aRequest, aResponse]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_handlePUTRequest_respondTo_", [aRequest, aResponse]);}), (function(){return smalltalk.send(self, "_handleGETRequest_respondTo_", [aRequest, aResponse]);})]);
  8318. return self;},
  8319. args: ["aRequest", "aResponse"],
  8320. source: unescape('handleRequest%3A%20aRequest%20respondTo%3A%20aResponse%0A%09aRequest%20method%20%3D%20%27PUT%27%0A%09%09ifTrue%3A%20%5Bself%20handlePUTRequest%3A%20aRequest%20respondTo%3A%20aResponse%5D%0A%09%09ifFalse%3A%20%5Bself%20handleGETRequest%3A%20aRequest%20respondTo%3A%20aResponse%5D'),
  8321. messageSends: ["ifTrue:ifFalse:", unescape("%3D"), "method", "handlePUTRequest:respondTo:", "handleGETRequest:respondTo:"],
  8322. referencedClasses: []
  8323. }),
  8324. smalltalk.FileServer);
  8325. smalltalk.addMethod(
  8326. '_handleGETRequest_respondTo_',
  8327. smalltalk.method({
  8328. selector: 'handleGETRequest:respondTo:',
  8329. category: 'request handling',
  8330. fn: function (aRequest, aResponse){
  8331. var self=this;
  8332. var uri=nil;
  8333. var filename=nil;
  8334. uri=smalltalk.send(smalltalk.send(self['@url'], "_parse_", [smalltalk.send(aRequest, "_url", [])]), "_pathname", []);
  8335. filename=smalltalk.send(self['@path'], "_join_with_", [smalltalk.send(self, "_basePath", []), uri]);
  8336. smalltalk.send(self['@path'], "_exists_do_", [filename, (function(boolean){return (($receiver = boolean).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_respondNotFoundTo_", [aResponse]);})() : (function(){return smalltalk.send(self, "_respondFileNamed_to_", [filename, aResponse]);})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){return smalltalk.send(self, "_respondNotFoundTo_", [aResponse]);}), (function(){return smalltalk.send(self, "_respondFileNamed_to_", [filename, aResponse]);})]);})]);
  8337. return self;},
  8338. args: ["aRequest", "aResponse"],
  8339. source: unescape('handleGETRequest%3A%20aRequest%20respondTo%3A%20aResponse%0A%09%7C%20uri%20filename%20%7C%0A%09uri%20%3A%3D%20%28url%20parse%3A%20aRequest%20url%29%20pathname.%0A%09filename%20%3A%3D%20path%20join%3A%20self%20basePath%20with%3A%20uri.%0A%09path%20exists%3A%20filename%20do%3A%20%5B%3Aboolean%20%7C%20%0A%09%09boolean%20%0A%09%09%09ifFalse%3A%20%5Bself%20respondNotFoundTo%3A%20aResponse%5D%0A%09%09%09ifTrue%3A%20%5Bself%20respondFileNamed%3A%20filename%20to%3A%20aResponse%5D%5D'),
  8340. messageSends: ["pathname", "parse:", "url", "join:with:", "basePath", "exists:do:", "ifFalse:ifTrue:", "respondNotFoundTo:", "respondFileNamed:to:"],
  8341. referencedClasses: []
  8342. }),
  8343. smalltalk.FileServer);
  8344. smalltalk.addMethod(
  8345. '_handlePUTRequest_respondTo_',
  8346. smalltalk.method({
  8347. selector: 'handlePUTRequest:respondTo:',
  8348. category: 'request handling',
  8349. fn: function (aRequest, aResponse){
  8350. var self=this;
  8351. var stream=nil;
  8352. stream=smalltalk.send(self['@fs'], "_createWriteStream_", [smalltalk.send(".", "__comma", [smalltalk.send(aRequest, "_url", [])])]);
  8353. smalltalk.send(aRequest, "_setEncoding_", ["utf8"]);
  8354. smalltalk.send(aRequest, "_on_do_", ["data", (function(data){return smalltalk.send(stream, "_write_", [data]);})]);
  8355. smalltalk.send(aRequest, "_on_do_", ["end", (function(){smalltalk.send(stream, "_end", []);return smalltalk.send(self, "_respondOKTo_", [aResponse]);})]);
  8356. return self;},
  8357. args: ["aRequest", "aResponse"],
  8358. source: unescape('handlePUTRequest%3A%20aRequest%20respondTo%3A%20aResponse%0A%09%7C%20stream%20%7C%0A%09stream%20%3A%3D%20fs%20createWriteStream%3A%20%27.%27%2C%20aRequest%20url.%0A%0A%09aRequest%20setEncoding%3A%20%27utf8%27.%0A%09aRequest%20on%3A%20%23data%20do%3A%20%5B%3Adata%20%7C%20stream%20write%3A%20data%5D.%0A%0A%09aRequest%20on%3A%20%23end%20do%3A%20%5B%0A%09%09stream%20end.%0A%09%09self%20respondOKTo%3A%20aResponse%5D'),
  8359. messageSends: ["createWriteStream:", unescape("%2C"), "url", "setEncoding:", "on:do:", "write:", "end", "respondOKTo:"],
  8360. referencedClasses: []
  8361. }),
  8362. smalltalk.FileServer);
  8363. smalltalk.addMethod(
  8364. '_respondFileNamed_to_',
  8365. smalltalk.method({
  8366. selector: 'respondFileNamed:to:',
  8367. category: 'request handling',
  8368. fn: function (aFilename, aResponse){
  8369. var self=this;
  8370. var type=nil;
  8371. var filename=nil;
  8372. filename=aFilename;
  8373. (($receiver = smalltalk.send(smalltalk.send(self['@fs'], "_statSync_", [aFilename]), "_isDirectory", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return filename=smalltalk.send(filename, "__comma", ["index.html"]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return filename=smalltalk.send(filename, "__comma", ["index.html"]);})]);
  8374. smalltalk.send(self['@fs'], "_readFile_do_", [filename, (function(ex, file){return (($receiver = smalltalk.send(ex, "_notNil", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_respondInternalErrorTo_", [aResponse]);})() : (function(){type=smalltalk.send(smalltalk.send(self, "_class", []), "_mimeTypeFor_", [filename]);return (function($rec){smalltalk.send($rec, "_writeHead_options_", [(200), smalltalk.Dictionary._fromPairs_([smalltalk.send(unescape("Content-Type"), "__minus_gt", [type])])]);smalltalk.send($rec, "_write_binary_", [file, "binary"]);return smalltalk.send($rec, "_end", []);})(aResponse);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_respondInternalErrorTo_", [aResponse]);}), (function(){type=smalltalk.send(smalltalk.send(self, "_class", []), "_mimeTypeFor_", [filename]);return (function($rec){smalltalk.send($rec, "_writeHead_options_", [(200), smalltalk.Dictionary._fromPairs_([smalltalk.send(unescape("Content-Type"), "__minus_gt", [type])])]);smalltalk.send($rec, "_write_binary_", [file, "binary"]);return smalltalk.send($rec, "_end", []);})(aResponse);})]);})]);
  8375. return self;},
  8376. args: ["aFilename", "aResponse"],
  8377. source: unescape('respondFileNamed%3A%20aFilename%20to%3A%20aResponse%0A%09%7C%20type%20filename%20%7C%0A%0A%09filename%20%3A%3D%20aFilename.%0A%09%28fs%20statSync%3A%20aFilename%29%20isDirectory%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%09filename%20%3A%3D%20filename%2C%20%27index.html%27%5D.%0A%0A%09fs%20readFile%3A%20filename%20do%3A%20%5B%3Aex%20%3Afile%20%7C%0A%09%09ex%20notNil%20%0A%09%09%09ifTrue%3A%20%5Bself%20respondInternalErrorTo%3A%20aResponse%5D%0A%09%09%09ifFalse%3A%20%5B%0A%20%20%20%20%20%20%20%20%09%09%09type%20%3A%3D%20self%20class%20mimeTypeFor%3A%20filename.%0A%09%09%09%09aResponse%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%09%09writeHead%3A%20200%20options%3A%20%20%23%7B%27Content-Type%27%20-%3E%20type%7D%3B%0A%09%09%09%09%09write%3A%20file%20binary%3A%20%27binary%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%09%09end%5D%5D'),
  8378. messageSends: ["ifTrue:", "isDirectory", "statSync:", unescape("%2C"), "readFile:do:", "ifTrue:ifFalse:", "notNil", "respondInternalErrorTo:", "mimeTypeFor:", "class", "writeHead:options:", unescape("-%3E"), "write:binary:", "end"],
  8379. referencedClasses: []
  8380. }),
  8381. smalltalk.FileServer);
  8382. smalltalk.addMethod(
  8383. '_respondInternalErrorTo_',
  8384. smalltalk.method({
  8385. selector: 'respondInternalErrorTo:',
  8386. category: 'request handling',
  8387. fn: function (aResponse){
  8388. var self=this;
  8389. (function($rec){smalltalk.send($rec, "_writeHead_options_", [(500), smalltalk.Dictionary._fromPairs_([smalltalk.send(unescape("Content-Type"), "__minus_gt", [unescape("text/plain")])])]);smalltalk.send($rec, "_write_", ["500 Internal server error"]);return smalltalk.send($rec, "_end", []);})(aResponse);
  8390. return self;},
  8391. args: ["aResponse"],
  8392. source: unescape('respondInternalErrorTo%3A%20aResponse%0A%09aResponse%20%0A%09%09writeHead%3A%20500%20options%3A%20%23%7B%27Content-Type%27%20-%3E%20%27text/plain%27%7D%3B%0A%09%09write%3A%20%27500%20Internal%20server%20error%27%3B%0A%09%09end'),
  8393. messageSends: ["writeHead:options:", unescape("-%3E"), "write:", "end"],
  8394. referencedClasses: []
  8395. }),
  8396. smalltalk.FileServer);
  8397. smalltalk.addMethod(
  8398. '_respondOKTo_',
  8399. smalltalk.method({
  8400. selector: 'respondOKTo:',
  8401. category: 'request handling',
  8402. fn: function (aResponse){
  8403. var self=this;
  8404. (function($rec){smalltalk.send($rec, "_writeHead_options_", [(200), smalltalk.Dictionary._fromPairs_([smalltalk.send(unescape("Content-Type"), "__minus_gt", [unescape("text/plain")])])]);return smalltalk.send($rec, "_end", []);})(aResponse);
  8405. return self;},
  8406. args: ["aResponse"],
  8407. source: unescape('respondOKTo%3A%20aResponse%0A%09aResponse%20%0A%09%09writeHead%3A%20200%20options%3A%20%23%7B%27Content-Type%27%20-%3E%20%27text/plain%27%7D%3B%0A%09%09end'),
  8408. messageSends: ["writeHead:options:", unescape("-%3E"), "end"],
  8409. referencedClasses: []
  8410. }),
  8411. smalltalk.FileServer);
  8412. smalltalk.addMethod(
  8413. '_startOn_',
  8414. smalltalk.method({
  8415. selector: 'startOn:',
  8416. category: 'starting',
  8417. fn: function (aPort){
  8418. var self=this;
  8419. self['@port']=aPort;
  8420. smalltalk.send(self, "_start", []);
  8421. return self;},
  8422. args: ["aPort"],
  8423. source: unescape('startOn%3A%20aPort%0A%09port%20%3A%3D%20aPort.%0A%09self%20start'),
  8424. messageSends: ["start"],
  8425. referencedClasses: []
  8426. }),
  8427. smalltalk.FileServer);
  8428. smalltalk.addMethod(
  8429. '_start',
  8430. smalltalk.method({
  8431. selector: 'start',
  8432. category: 'starting',
  8433. fn: function (){
  8434. var self=this;
  8435. smalltalk.send(smalltalk.send(self['@http'], "_createServer_", [(function(request, response){return smalltalk.send(self, "_handleRequest_respondTo_", [request, response]);})]), "_listen_", [smalltalk.send(self, "_port", [])]);
  8436. smalltalk.send((typeof console == 'undefined' ? nil : console), "_log_", [smalltalk.send("Starting file server on port ", "__comma", [smalltalk.send(smalltalk.send(self, "_port", []), "_asString", [])])]);
  8437. return self;},
  8438. args: [],
  8439. source: unescape('start%0A%09%28http%20createServer%3A%20%5B%3Arequest%20%3Aresponse%20%7C%0A%09%20%09self%20handleRequest%3A%20request%20respondTo%3A%20response%5D%29%20listen%3A%20self%20port.%0A%09console%20log%3A%20%27Starting%20file%20server%20on%20port%20%27%2C%20self%20port%20asString'),
  8440. messageSends: ["listen:", "createServer:", "handleRequest:respondTo:", "port", "log:", unescape("%2C"), "asString"],
  8441. referencedClasses: []
  8442. }),
  8443. smalltalk.FileServer);
  8444. smalltalk.FileServer.klass.iVarNames = ['port','mimeTypes'];
  8445. smalltalk.addMethod(
  8446. '_port',
  8447. smalltalk.method({
  8448. selector: 'port',
  8449. category: 'accessing',
  8450. fn: function (){
  8451. var self=this;
  8452. return (($receiver = self['@port']) == nil || $receiver == undefined) ? (function(){return (4000);})() : $receiver;
  8453. return self;},
  8454. args: [],
  8455. source: unescape('port%0A%09%5Eport%20ifNil%3A%20%5B4000%5D'),
  8456. messageSends: ["ifNil:"],
  8457. referencedClasses: []
  8458. }),
  8459. smalltalk.FileServer.klass);
  8460. smalltalk.addMethod(
  8461. '_port_',
  8462. smalltalk.method({
  8463. selector: 'port:',
  8464. category: 'accessing',
  8465. fn: function (aNumber){
  8466. var self=this;
  8467. self['@port']=aNumber;
  8468. return self;},
  8469. args: ["aNumber"],
  8470. source: unescape('port%3A%20aNumber%0A%09port%20%3A%3D%20aNumber'),
  8471. messageSends: [],
  8472. referencedClasses: []
  8473. }),
  8474. smalltalk.FileServer.klass);
  8475. smalltalk.addMethod(
  8476. '_defaultMimeTypes',
  8477. smalltalk.method({
  8478. selector: 'defaultMimeTypes',
  8479. category: 'accessing',
  8480. fn: function (){
  8481. var self=this;
  8482. return smalltalk.Dictionary._fromPairs_([smalltalk.send(unescape("%25"), "__minus_gt", [unescape("application/x-trash")]),smalltalk.send("323", "__minus_gt", [unescape("text/h323")]),smalltalk.send("abw", "__minus_gt", [unescape("application/x-abiword")]),smalltalk.send("ai", "__minus_gt", [unescape("application/postscript")]),smalltalk.send("aif", "__minus_gt", [unescape("audio/x-aiff")]),smalltalk.send("aifc", "__minus_gt", [unescape("audio/x-aiff")]),smalltalk.send("aiff", "__minus_gt", [unescape("audio/x-aiff")]),smalltalk.send("alc", "__minus_gt", [unescape("chemical/x-alchemy")]),smalltalk.send("art", "__minus_gt", [unescape("image/x-jg")]),smalltalk.send("asc", "__minus_gt", [unescape("text/plain")]),smalltalk.send("asf", "__minus_gt", [unescape("video/x-ms-asf")]),smalltalk.send("asn", "__minus_gt", [unescape("chemical/x-ncbi-asn1-spec")]),smalltalk.send("aso", "__minus_gt", [unescape("chemical/x-ncbi-asn1-binary")]),smalltalk.send("asx", "__minus_gt", [unescape("video/x-ms-asf")]),smalltalk.send("au", "__minus_gt", [unescape("audio/basic")]),smalltalk.send("avi", "__minus_gt", [unescape("video/x-msvideo")]),smalltalk.send("b", "__minus_gt", [unescape("chemical/x-molconn-Z")]),smalltalk.send("bak", "__minus_gt", [unescape("application/x-trash")]),smalltalk.send("bat", "__minus_gt", [unescape("application/x-msdos-program")]),smalltalk.send("bcpio", "__minus_gt", [unescape("application/x-bcpio")]),smalltalk.send("bib", "__minus_gt", [unescape("text/x-bibtex")]),smalltalk.send("bin", "__minus_gt", [unescape("application/octet-stream")]),smalltalk.send("bmp", "__minus_gt", [unescape("image/x-ms-bmp")]),smalltalk.send("book", "__minus_gt", [unescape("application/x-maker")]),smalltalk.send("bsd", "__minus_gt", [unescape("chemical/x-crossfire")]),smalltalk.send("c", "__minus_gt", [unescape("text/x-csrc")]),smalltalk.send(unescape("c++"), "__minus_gt", [unescape("text/x-c++src")]),smalltalk.send("c3d", "__minus_gt", [unescape("chemical/x-chem3d")]),smalltalk.send("cac", "__minus_gt", [unescape("chemical/x-cache")]),smalltalk.send("cache", "__minus_gt", [unescape("chemical/x-cache")]),smalltalk.send("cascii", "__minus_gt", [unescape("chemical/x-cactvs-binary")]),smalltalk.send("cat", "__minus_gt", [unescape("application/vnd.ms-pki.seccat")]),smalltalk.send("cbin", "__minus_gt", [unescape("chemical/x-cactvs-binary")]),smalltalk.send("cc", "__minus_gt", [unescape("text/x-c++src")]),smalltalk.send("cdf", "__minus_gt", [unescape("application/x-cdf")]),smalltalk.send("cdr", "__minus_gt", [unescape("image/x-coreldraw")]),smalltalk.send("cdt", "__minus_gt", [unescape("image/x-coreldrawtemplate")]),smalltalk.send("cdx", "__minus_gt", [unescape("chemical/x-cdx")]),smalltalk.send("cdy", "__minus_gt", [unescape("application/vnd.cinderella")]),smalltalk.send("cef", "__minus_gt", [unescape("chemical/x-cxf")]),smalltalk.send("cer", "__minus_gt", [unescape("chemical/x-cerius")]),smalltalk.send("chm", "__minus_gt", [unescape("chemical/x-chemdraw")]),smalltalk.send("chrt", "__minus_gt", [unescape("application/x-kchart")]),smalltalk.send("cif", "__minus_gt", [unescape("chemical/x-cif")]),smalltalk.send("class", "__minus_gt", [unescape("application/java-vm")]),smalltalk.send("cls", "__minus_gt", [unescape("text/x-tex")]),smalltalk.send("cmdf", "__minus_gt", [unescape("chemical/x-cmdf")]),smalltalk.send("cml", "__minus_gt", [unescape("chemical/x-cml")]),smalltalk.send("cod", "__minus_gt", [unescape("application/vnd.rim.cod")]),smalltalk.send("com", "__minus_gt", [unescape("application/x-msdos-program")]),smalltalk.send("cpa", "__minus_gt", [unescape("chemical/x-compass")]),smalltalk.send("cpio", "__minus_gt", [unescape("application/x-cpio")]),smalltalk.send("cpp", "__minus_gt", [unescape("text/x-c++src")]),smalltalk.send("cpt", "__minus_gt", [unescape("image/x-corelphotopaint")]),smalltalk.send("crl", "__minus_gt", [unescape("application/x-pkcs7-crl")]),smalltalk.send("crt", "__minus_gt", [unescape("application/x-x509-ca-cert")]),smalltalk.send("csf", "__minus_gt", [unescape("chemical/x-cache-csf")]),smalltalk.send("csh", "__minus_gt", [unescape("text/x-csh")]),smalltalk.send("csm", "__minus_gt", [unescape("chemical/x-csml")]),smalltalk.send("csml", "__minus_gt", [unescape("chemical/x-csml")]),smalltalk.send("css", "__minus_gt", [unescape("text/css")]),smalltalk.send("csv", "__minus_gt", [unescape("text/comma-separated-values")]),smalltalk.send("ctab", "__minus_gt", [unescape("chemical/x-cactvs-binary")]),smalltalk.send("ctx", "__minus_gt", [unescape("chemical/x-ctx")]),smalltalk.send("cu", "__minus_gt", [unescape("application/cu-seeme")]),smalltalk.send("cub", "__minus_gt", [unescape("chemical/x-gaussian-cube")]),smalltalk.send("cxf", "__minus_gt", [unescape("chemical/x-cxf")]),smalltalk.send("cxx", "__minus_gt", [unescape("text/x-c++src")]),smalltalk.send("dat", "__minus_gt", [unescape("chemical/x-mopac-input")]),smalltalk.send("dcr", "__minus_gt", [unescape("application/x-director")]),smalltalk.send("deb", "__minus_gt", [unescape("application/x-debian-package")]),smalltalk.send("dif", "__minus_gt", [unescape("video/dv")]),smalltalk.send("diff", "__minus_gt", [unescape("text/plain")]),smalltalk.send("dir", "__minus_gt", [unescape("application/x-director")]),smalltalk.send("djv", "__minus_gt", [unescape("image/vnd.djvu")]),smalltalk.send("djvu", "__minus_gt", [unescape("image/vnd.djvu")]),smalltalk.send("dl", "__minus_gt", [unescape("video/dl")]),smalltalk.send("dll", "__minus_gt", [unescape("application/x-msdos-program")]),smalltalk.send("dmg", "__minus_gt", [unescape("application/x-apple-diskimage")]),smalltalk.send("dms", "__minus_gt", [unescape("application/x-dms")]),smalltalk.send("doc", "__minus_gt", [unescape("application/msword")]),smalltalk.send("dot", "__minus_gt", [unescape("application/msword")]),smalltalk.send("dv", "__minus_gt", [unescape("video/dv")]),smalltalk.send("dvi", "__minus_gt", [unescape("application/x-dvi")]),smalltalk.send("dx", "__minus_gt", [unescape("chemical/x-jcamp-dx")]),smalltalk.send("dxr", "__minus_gt", [unescape("application/x-director")]),smalltalk.send("emb", "__minus_gt", [unescape("chemical/x-embl-dl-nucleotide")]),smalltalk.send("embl", "__minus_gt", [unescape("chemical/x-embl-dl-nucleotide")]),smalltalk.send("ent", "__minus_gt", [unescape("chemical/x-pdb")]),smalltalk.send("eps", "__minus_gt", [unescape("application/postscript")]),smalltalk.send("etx", "__minus_gt", [unescape("text/x-setext")]),smalltalk.send("exe", "__minus_gt", [unescape("application/x-msdos-program")]),smalltalk.send("ez", "__minus_gt", [unescape("application/andrew-inset")]),smalltalk.send("fb", "__minus_gt", [unescape("application/x-maker")]),smalltalk.send("fbdoc", "__minus_gt", [unescape("application/x-maker")]),smalltalk.send("fch", "__minus_gt", [unescape("chemical/x-gaussian-checkpoint")]),smalltalk.send("fchk", "__minus_gt", [unescape("chemical/x-gaussian-checkpoint")]),smalltalk.send("fig", "__minus_gt", [unescape("application/x-xfig")]),smalltalk.send("flac", "__minus_gt", [unescape("application/x-flac")]),smalltalk.send("fli", "__minus_gt", [unescape("video/fli")]),smalltalk.send("fm", "__minus_gt", [unescape("application/x-maker")]),smalltalk.send("frame", "__minus_gt", [unescape("application/x-maker")]),smalltalk.send("frm", "__minus_gt", [unescape("application/x-maker")]),smalltalk.send("gal", "__minus_gt", [unescape("chemical/x-gaussian-log")]),smalltalk.send("gam", "__minus_gt", [unescape("chemical/x-gamess-input")]),smalltalk.send("gamin", "__minus_gt", [unescape("chemical/x-gamess-input")]),smalltalk.send("gau", "__minus_gt", [unescape("chemical/x-gaussian-input")]),smalltalk.send("gcd", "__minus_gt", [unescape("text/x-pcs-gcd")]),smalltalk.send("gcf", "__minus_gt", [unescape("application/x-graphing-calculator")]),smalltalk.send("gcg", "__minus_gt", [unescape("chemical/x-gcg8-sequence")]),smalltalk.send("gen", "__minus_gt", [unescape("chemical/x-genbank")]),smalltalk.send("gf", "__minus_gt", [unescape("application/x-tex-gf")]),smalltalk.send("gif", "__minus_gt", [unescape("image/gif")]),smalltalk.send("gjc", "__minus_gt", [unescape("chemical/x-gaussian-input")]),smalltalk.send("gjf", "__minus_gt", [unescape("chemical/x-gaussian-input")]),smalltalk.send("gl", "__minus_gt", [unescape("video/gl")]),smalltalk.send("gnumeric", "__minus_gt", [unescape("application/x-gnumeric")]),smalltalk.send("gpt", "__minus_gt", [unescape("chemical/x-mopac-graph")]),smalltalk.send("gsf", "__minus_gt", [unescape("application/x-font")]),smalltalk.send("gsm", "__minus_gt", [unescape("audio/x-gsm")]),smalltalk.send("gtar", "__minus_gt", [unescape("application/x-gtar")]),smalltalk.send("h", "__minus_gt", [unescape("text/x-chdr")]),smalltalk.send(unescape("h++"), "__minus_gt", [unescape("text/x-c++hdr")]),smalltalk.send("hdf", "__minus_gt", [unescape("application/x-hdf")]),smalltalk.send("hh", "__minus_gt", [unescape("text/x-c++hdr")]),smalltalk.send("hin", "__minus_gt", [unescape("chemical/x-hin")]),smalltalk.send("hpp", "__minus_gt", [unescape("text/x-c++hdr")]),smalltalk.send("hqx", "__minus_gt", [unescape("application/mac-binhex40")]),smalltalk.send("hs", "__minus_gt", [unescape("text/x-haskell")]),smalltalk.send("hta", "__minus_gt", [unescape("application/hta")]),smalltalk.send("htc", "__minus_gt", [unescape("text/x-component")]),smalltalk.send("htm", "__minus_gt", [unescape("text/html")]),smalltalk.send("html", "__minus_gt", [unescape("text/html")]),smalltalk.send("hxx", "__minus_gt", [unescape("text/x-c++hdr")]),smalltalk.send("ica", "__minus_gt", [unescape("application/x-ica")]),smalltalk.send("ice", "__minus_gt", [unescape("x-conference/x-cooltalk")]),smalltalk.send("ico", "__minus_gt", [unescape("image/x-icon")]),smalltalk.send("ics", "__minus_gt", [unescape("text/calendar")]),smalltalk.send("icz", "__minus_gt", [unescape("text/calendar")]),smalltalk.send("ief", "__minus_gt", [unescape("image/ief")]),smalltalk.send("iges", "__minus_gt", [unescape("model/iges")]),smalltalk.send("igs", "__minus_gt", [unescape("model/iges")]),smalltalk.send("iii", "__minus_gt", [unescape("application/x-iphone")]),smalltalk.send("inp", "__minus_gt", [unescape("chemical/x-gamess-input")]),smalltalk.send("ins", "__minus_gt", [unescape("application/x-internet-signup")]),smalltalk.send("iso", "__minus_gt", [unescape("application/x-iso9660-image")]),smalltalk.send("isp", "__minus_gt", [unescape("application/x-internet-signup")]),smalltalk.send("ist", "__minus_gt", [unescape("chemical/x-isostar")]),smalltalk.send("istr", "__minus_gt", [unescape("chemical/x-isostar")]),smalltalk.send("jad", "__minus_gt", [unescape("text/vnd.sun.j2me.app-descriptor")]),smalltalk.send("jar", "__minus_gt", [unescape("application/java-archive")]),smalltalk.send("java", "__minus_gt", [unescape("text/x-java")]),smalltalk.send("jdx", "__minus_gt", [unescape("chemical/x-jcamp-dx")]),smalltalk.send("jmz", "__minus_gt", [unescape("application/x-jmol")]),smalltalk.send("jng", "__minus_gt", [unescape("image/x-jng")]),smalltalk.send("jnlp", "__minus_gt", [unescape("application/x-java-jnlp-file")]),smalltalk.send("jpe", "__minus_gt", [unescape("image/jpeg")]),smalltalk.send("jpeg", "__minus_gt", [unescape("image/jpeg")]),smalltalk.send("jpg", "__minus_gt", [unescape("image/jpeg")]),smalltalk.send("js", "__minus_gt", [unescape("application/javascript")]),smalltalk.send("kar", "__minus_gt", [unescape("audio/midi")]),smalltalk.send("key", "__minus_gt", [unescape("application/pgp-keys")]),smalltalk.send("kil", "__minus_gt", [unescape("application/x-killustrator")]),smalltalk.send("kin", "__minus_gt", [unescape("chemical/x-kinemage")]),smalltalk.send("kpr", "__minus_gt", [unescape("application/x-kpresenter")]),smalltalk.send("kpt", "__minus_gt", [unescape("application/x-kpresenter")]),smalltalk.send("ksp", "__minus_gt", [unescape("application/x-kspread")]),smalltalk.send("kwd", "__minus_gt", [unescape("application/x-kword")]),smalltalk.send("kwt", "__minus_gt", [unescape("application/x-kword")]),smalltalk.send("latex", "__minus_gt", [unescape("application/x-latex")]),smalltalk.send("lha", "__minus_gt", [unescape("application/x-lha")]),smalltalk.send("lhs", "__minus_gt", [unescape("text/x-literate-haskell")]),smalltalk.send("lsf", "__minus_gt", [unescape("video/x-la-asf")]),smalltalk.send("lsx", "__minus_gt", [unescape("video/x-la-asf")]),smalltalk.send("ltx", "__minus_gt", [unescape("text/x-tex")]),smalltalk.send("lzh", "__minus_gt", [unescape("application/x-lzh")]),smalltalk.send("lzx", "__minus_gt", [unescape("application/x-lzx")]),smalltalk.send("m3u", "__minus_gt", [unescape("audio/x-mpegurl")]),smalltalk.send("m4a", "__minus_gt", [unescape("audio/mpeg")]),smalltalk.send("maker", "__minus_gt", [unescape("application/x-maker")]),smalltalk.send("man", "__minus_gt", [unescape("application/x-troff-man")]),smalltalk.send("mcif", "__minus_gt", [unescape("chemical/x-mmcif")]),smalltalk.send("mcm", "__minus_gt", [unescape("chemical/x-macmolecule")]),smalltalk.send("mdb", "__minus_gt", [unescape("application/msaccess")]),smalltalk.send("me", "__minus_gt", [unescape("application/x-troff-me")]),smalltalk.send("mesh", "__minus_gt", [unescape("model/mesh")]),smalltalk.send("mid", "__minus_gt", [unescape("audio/midi")]),smalltalk.send("midi", "__minus_gt", [unescape("audio/midi")]),smalltalk.send("mif", "__minus_gt", [unescape("application/x-mif")]),smalltalk.send("mm", "__minus_gt", [unescape("application/x-freemind")]),smalltalk.send("mmd", "__minus_gt", [unescape("chemical/x-macromodel-input")]),smalltalk.send("mmf", "__minus_gt", [unescape("application/vnd.smaf")]),smalltalk.send("mml", "__minus_gt", [unescape("text/mathml")]),smalltalk.send("mmod", "__minus_gt", [unescape("chemical/x-macromodel-input")]),smalltalk.send("mng", "__minus_gt", [unescape("video/x-mng")]),smalltalk.send("moc", "__minus_gt", [unescape("text/x-moc")]),smalltalk.send("mol", "__minus_gt", [unescape("chemical/x-mdl-molfile")]),smalltalk.send("mol2", "__minus_gt", [unescape("chemical/x-mol2")]),smalltalk.send("moo", "__minus_gt", [unescape("chemical/x-mopac-out")]),smalltalk.send("mop", "__minus_gt", [unescape("chemical/x-mopac-input")]),smalltalk.send("mopcrt", "__minus_gt", [unescape("chemical/x-mopac-input")]),smalltalk.send("mov", "__minus_gt", [unescape("video/quicktime")]),smalltalk.send("movie", "__minus_gt", [unescape("video/x-sgi-movie")]),smalltalk.send("mp2", "__minus_gt", [unescape("audio/mpeg")]),smalltalk.send("mp3", "__minus_gt", [unescape("audio/mpeg")]),smalltalk.send("mp4", "__minus_gt", [unescape("video/mp4")]),smalltalk.send("mpc", "__minus_gt", [unescape("chemical/x-mopac-input")]),smalltalk.send("mpe", "__minus_gt", [unescape("video/mpeg")]),smalltalk.send("mpeg", "__minus_gt", [unescape("video/mpeg")]),smalltalk.send("mpega", "__minus_gt", [unescape("audio/mpeg")]),smalltalk.send("mpg", "__minus_gt", [unescape("video/mpeg")]),smalltalk.send("mpga", "__minus_gt", [unescape("audio/mpeg")]),smalltalk.send("ms", "__minus_gt", [unescape("application/x-troff-ms")]),smalltalk.send("msh", "__minus_gt", [unescape("model/mesh")]),smalltalk.send("msi", "__minus_gt", [unescape("application/x-msi")]),smalltalk.send("mvb", "__minus_gt", [unescape("chemical/x-mopac-vib")]),smalltalk.send("mxu", "__minus_gt", [unescape("video/vnd.mpegurl")]),smalltalk.send("nb", "__minus_gt", [unescape("application/mathematica")]),smalltalk.send("nc", "__minus_gt", [unescape("application/x-netcdf")]),smalltalk.send("nwc", "__minus_gt", [unescape("application/x-nwc")]),smalltalk.send("o", "__minus_gt", [unescape("application/x-object")]),smalltalk.send("oda", "__minus_gt", [unescape("application/oda")]),smalltalk.send("odb", "__minus_gt", [unescape("application/vnd.oasis.opendocument.database")]),smalltalk.send("odc", "__minus_gt", [unescape("application/vnd.oasis.opendocument.chart")]),smalltalk.send("odf", "__minus_gt", [unescape("application/vnd.oasis.opendocument.formula")]),smalltalk.send("odg", "__minus_gt", [unescape("application/vnd.oasis.opendocument.graphics")]),smalltalk.send("odi", "__minus_gt", [unescape("application/vnd.oasis.opendocument.image")]),smalltalk.send("odm", "__minus_gt", [unescape("application/vnd.oasis.opendocument.text-master")]),smalltalk.send("odp", "__minus_gt", [unescape("application/vnd.oasis.opendocument.presentation")]),smalltalk.send("ods", "__minus_gt", [unescape("application/vnd.oasis.opendocument.spreadsheet")]),smalltalk.send("odt", "__minus_gt", [unescape("application/vnd.oasis.opendocument.text")]),smalltalk.send("ogg", "__minus_gt", [unescape("application/ogg")]),smalltalk.send("old", "__minus_gt", [unescape("application/x-trash")]),smalltalk.send("oth", "__minus_gt", [unescape("application/vnd.oasis.opendocument.text-web")]),smalltalk.send("oza", "__minus_gt", [unescape("application/x-oz-application")]),smalltalk.send("p", "__minus_gt", [unescape("text/x-pascal")]),smalltalk.send("p7r", "__minus_gt", [unescape("application/x-pkcs7-certreqresp")]),smalltalk.send("pac", "__minus_gt", [unescape("application/x-ns-proxy-autoconfig")]),smalltalk.send("pas", "__minus_gt", [unescape("text/x-pascal")]),smalltalk.send("pat", "__minus_gt", [unescape("image/x-coreldrawpattern")]),smalltalk.send("pbm", "__minus_gt", [unescape("image/x-portable-bitmap")]),smalltalk.send("pcf", "__minus_gt", [unescape("application/x-font")]),smalltalk.send("pcf.Z", "__minus_gt", [unescape("application/x-font")]),smalltalk.send("pcx", "__minus_gt", [unescape("image/pcx")]),smalltalk.send("pdb", "__minus_gt", [unescape("chemical/x-pdb")]),smalltalk.send("pdf", "__minus_gt", [unescape("application/pdf")]),smalltalk.send("pfa", "__minus_gt", [unescape("application/x-font")]),smalltalk.send("pfb", "__minus_gt", [unescape("application/x-font")]),smalltalk.send("pgm", "__minus_gt", [unescape("image/x-portable-graymap")]),smalltalk.send("pgn", "__minus_gt", [unescape("application/x-chess-pgn")]),smalltalk.send("pgp", "__minus_gt", [unescape("application/pgp-signature")]),smalltalk.send("pk", "__minus_gt", [unescape("application/x-tex-pk")]),smalltalk.send("pl", "__minus_gt", [unescape("text/x-perl")]),smalltalk.send("pls", "__minus_gt", [unescape("audio/x-scpls")]),smalltalk.send("pm", "__minus_gt", [unescape("text/x-perl")]),smalltalk.send("png", "__minus_gt", [unescape("image/png")]),smalltalk.send("pnm", "__minus_gt", [unescape("image/x-portable-anymap")]),smalltalk.send("pot", "__minus_gt", [unescape("text/plain")]),smalltalk.send("ppm", "__minus_gt", [unescape("image/x-portable-pixmap")]),smalltalk.send("pps", "__minus_gt", [unescape("application/vnd.ms-powerpoint")]),smalltalk.send("ppt", "__minus_gt", [unescape("application/vnd.ms-powerpoint")]),smalltalk.send("prf", "__minus_gt", [unescape("application/pics-rules")]),smalltalk.send("prt", "__minus_gt", [unescape("chemical/x-ncbi-asn1-ascii")]),smalltalk.send("ps", "__minus_gt", [unescape("application/postscript")]),smalltalk.send("psd", "__minus_gt", [unescape("image/x-photoshop")]),smalltalk.send("psp", "__minus_gt", [unescape("text/x-psp")]),smalltalk.send("py", "__minus_gt", [unescape("text/x-python")]),smalltalk.send("pyc", "__minus_gt", [unescape("application/x-python-code")]),smalltalk.send("pyo", "__minus_gt", [unescape("application/x-python-code")]),smalltalk.send("qt", "__minus_gt", [unescape("video/quicktime")]),smalltalk.send("qtl", "__minus_gt", [unescape("application/x-quicktimeplayer")]),smalltalk.send("ra", "__minus_gt", [unescape("audio/x-realaudio")]),smalltalk.send("ram", "__minus_gt", [unescape("audio/x-pn-realaudio")]),smalltalk.send("rar", "__minus_gt", [unescape("application/rar")]),smalltalk.send("ras", "__minus_gt", [unescape("image/x-cmu-raster")]),smalltalk.send("rd", "__minus_gt", [unescape("chemical/x-mdl-rdfile")]),smalltalk.send("rdf", "__minus_gt", [unescape("application/rdf+xml")]),smalltalk.send("rgb", "__minus_gt", [unescape("image/x-rgb")]),smalltalk.send("rm", "__minus_gt", [unescape("audio/x-pn-realaudio")]),smalltalk.send("roff", "__minus_gt", [unescape("application/x-troff")]),smalltalk.send("ros", "__minus_gt", [unescape("chemical/x-rosdal")]),smalltalk.send("rpm", "__minus_gt", [unescape("application/x-redhat-package-manager")]),smalltalk.send("rss", "__minus_gt", [unescape("application/rss+xml")]),smalltalk.send("rtf", "__minus_gt", [unescape("text/rtf")]),smalltalk.send("rtx", "__minus_gt", [unescape("text/richtext")]),smalltalk.send("rxn", "__minus_gt", [unescape("chemical/x-mdl-rxnfile")]),smalltalk.send("sct", "__minus_gt", [unescape("text/scriptlet")]),smalltalk.send("sd", "__minus_gt", [unescape("chemical/x-mdl-sdfile")]),smalltalk.send("sd2", "__minus_gt", [unescape("audio/x-sd2")]),smalltalk.send("sda", "__minus_gt", [unescape("application/vnd.stardivision.draw")]),smalltalk.send("sdc", "__minus_gt", [unescape("application/vnd.stardivision.calc")]),smalltalk.send("sdd", "__minus_gt", [unescape("application/vnd.stardivision.impress")]),smalltalk.send("sdf", "__minus_gt", [unescape("chemical/x-mdl-sdfile")]),smalltalk.send("sdp", "__minus_gt", [unescape("application/vnd.stardivision.impress")]),smalltalk.send("sdw", "__minus_gt", [unescape("application/vnd.stardivision.writer")]),smalltalk.send("ser", "__minus_gt", [unescape("application/java-serialized-object")]),smalltalk.send("sgf", "__minus_gt", [unescape("application/x-go-sgf")]),smalltalk.send("sgl", "__minus_gt", [unescape("application/vnd.stardivision.writer-global")]),smalltalk.send("sh", "__minus_gt", [unescape("text/x-sh")]),smalltalk.send("shar", "__minus_gt", [unescape("application/x-shar")]),smalltalk.send("shtml", "__minus_gt", [unescape("text/html")]),smalltalk.send("sid", "__minus_gt", [unescape("audio/prs.sid")]),smalltalk.send("sik", "__minus_gt", [unescape("application/x-trash")]),smalltalk.send("silo", "__minus_gt", [unescape("model/mesh")]),smalltalk.send("sis", "__minus_gt", [unescape("application/vnd.symbian.install")]),smalltalk.send("sit", "__minus_gt", [unescape("application/x-stuffit")]),smalltalk.send("skd", "__minus_gt", [unescape("application/x-koan")]),smalltalk.send("skm", "__minus_gt", [unescape("application/x-koan")]),smalltalk.send("skp", "__minus_gt", [unescape("application/x-koan")]),smalltalk.send("skt", "__minus_gt", [unescape("application/x-koan")]),smalltalk.send("smf", "__minus_gt", [unescape("application/vnd.stardivision.math")]),smalltalk.send("smi", "__minus_gt", [unescape("application/smil")]),smalltalk.send("smil", "__minus_gt", [unescape("application/smil")]),smalltalk.send("snd", "__minus_gt", [unescape("audio/basic")]),smalltalk.send("spc", "__minus_gt", [unescape("chemical/x-galactic-spc")]),smalltalk.send("spl", "__minus_gt", [unescape("application/x-futuresplash")]),smalltalk.send("src", "__minus_gt", [unescape("application/x-wais-source")]),smalltalk.send("stc", "__minus_gt", [unescape("application/vnd.sun.xml.calc.template")]),smalltalk.send("std", "__minus_gt", [unescape("application/vnd.sun.xml.draw.template")]),smalltalk.send("sti", "__minus_gt", [unescape("application/vnd.sun.xml.impress.template")]),smalltalk.send("stl", "__minus_gt", [unescape("application/vnd.ms-pki.stl")]),smalltalk.send("stw", "__minus_gt", [unescape("application/vnd.sun.xml.writer.template")]),smalltalk.send("sty", "__minus_gt", [unescape("text/x-tex")]),smalltalk.send("sv4cpio", "__minus_gt", [unescape("application/x-sv4cpio")]),smalltalk.send("sv4crc", "__minus_gt", [unescape("application/x-sv4crc")]),smalltalk.send("svg", "__minus_gt", [unescape("image/svg+xml")]),smalltalk.send("svgz", "__minus_gt", [unescape("image/svg+xml")]),smalltalk.send("sw", "__minus_gt", [unescape("chemical/x-swissprot")]),smalltalk.send("swf", "__minus_gt", [unescape("application/x-shockwave-flash")]),smalltalk.send("swfl", "__minus_gt", [unescape("application/x-shockwave-flash")]),smalltalk.send("sxc", "__minus_gt", [unescape("application/vnd.sun.xml.calc")]),smalltalk.send("sxd", "__minus_gt", [unescape("application/vnd.sun.xml.draw")]),smalltalk.send("sxg", "__minus_gt", [unescape("application/vnd.sun.xml.writer.global")]),smalltalk.send("sxi", "__minus_gt", [unescape("application/vnd.sun.xml.impress")]),smalltalk.send("sxm", "__minus_gt", [unescape("application/vnd.sun.xml.math")]),smalltalk.send("sxw", "__minus_gt", [unescape("application/vnd.sun.xml.writer")]),smalltalk.send("t", "__minus_gt", [unescape("application/x-troff")]),smalltalk.send("tar", "__minus_gt", [unescape("application/x-tar")]),smalltalk.send("taz", "__minus_gt", [unescape("application/x-gtar")]),smalltalk.send("tcl", "__minus_gt", [unescape("text/x-tcl")]),smalltalk.send("tex", "__minus_gt", [unescape("text/x-tex")]),smalltalk.send("texi", "__minus_gt", [unescape("application/x-texinfo")]),smalltalk.send("texinfo", "__minus_gt", [unescape("application/x-texinfo")]),smalltalk.send("text", "__minus_gt", [unescape("text/plain")]),smalltalk.send("tgf", "__minus_gt", [unescape("chemical/x-mdl-tgf")]),smalltalk.send("tgz", "__minus_gt", [unescape("application/x-gtar")]),smalltalk.send("tif", "__minus_gt", [unescape("image/tiff")]),smalltalk.send("tiff", "__minus_gt", [unescape("image/tiff")]),smalltalk.send("tk", "__minus_gt", [unescape("text/x-tcl")]),smalltalk.send("tm", "__minus_gt", [unescape("text/texmacs")]),smalltalk.send("torrent", "__minus_gt", [unescape("application/x-bittorrent")]),smalltalk.send("tr", "__minus_gt", [unescape("application/x-troff")]),smalltalk.send("ts", "__minus_gt", [unescape("text/texmacs")]),smalltalk.send("tsp", "__minus_gt", [unescape("application/dsptype")]),smalltalk.send("tsv", "__minus_gt", [unescape("text/tab-separated-values")]),smalltalk.send("txt", "__minus_gt", [unescape("text/plain")]),smalltalk.send("udeb", "__minus_gt", [unescape("application/x-debian-package")]),smalltalk.send("uls", "__minus_gt", [unescape("text/iuls")]),smalltalk.send("ustar", "__minus_gt", [unescape("application/x-ustar")]),smalltalk.send("val", "__minus_gt", [unescape("chemical/x-ncbi-asn1-binary")]),smalltalk.send("vcd", "__minus_gt", [unescape("application/x-cdlink")]),smalltalk.send("vcf", "__minus_gt", [unescape("text/x-vcard")]),smalltalk.send("vcs", "__minus_gt", [unescape("text/x-vcalendar")]),smalltalk.send("vmd", "__minus_gt", [unescape("chemical/x-vmd")]),smalltalk.send("vms", "__minus_gt", [unescape("chemical/x-vamas-iso14976")]),smalltalk.send("vor", "__minus_gt", [unescape("application/vnd.stardivision.writer")]),smalltalk.send("vrm", "__minus_gt", [unescape("x-world/x-vrml")]),smalltalk.send("vrml", "__minus_gt", [unescape("x-world/x-vrml")]),smalltalk.send("vsd", "__minus_gt", [unescape("application/vnd.visio")]),smalltalk.send("wad", "__minus_gt", [unescape("application/x-doom")]),smalltalk.send("wav", "__minus_gt", [unescape("audio/x-wav")]),smalltalk.send("wax", "__minus_gt", [unescape("audio/x-ms-wax")]),smalltalk.send("wbmp", "__minus_gt", [unescape("image/vnd.wap.wbmp")]),smalltalk.send("wbxml", "__minus_gt", [unescape("application/vnd.wap.wbxml")]),smalltalk.send("wk", "__minus_gt", [unescape("application/x-123")]),smalltalk.send("wm", "__minus_gt", [unescape("video/x-ms-wm")]),smalltalk.send("wma", "__minus_gt", [unescape("audio/x-ms-wma")]),smalltalk.send("wmd", "__minus_gt", [unescape("application/x-ms-wmd")]),smalltalk.send("wml", "__minus_gt", [unescape("text/vnd.wap.wml")]),smalltalk.send("wmlc", "__minus_gt", [unescape("application/vnd.wap.wmlc")]),smalltalk.send("wmls", "__minus_gt", [unescape("text/vnd.wap.wmlscript")]),smalltalk.send("wmlsc", "__minus_gt", [unescape("application/vnd.wap.wmlscriptc")]),smalltalk.send("wmv", "__minus_gt", [unescape("video/x-ms-wmv")]),smalltalk.send("wmx", "__minus_gt", [unescape("video/x-ms-wmx")]),smalltalk.send("wmz", "__minus_gt", [unescape("application/x-ms-wmz")]),smalltalk.send("wp5", "__minus_gt", [unescape("application/wordperfect5.1")]),smalltalk.send("wpd", "__minus_gt", [unescape("application/wordperfect")]),smalltalk.send("wrl", "__minus_gt", [unescape("x-world/x-vrml")]),smalltalk.send("wsc", "__minus_gt", [unescape("text/scriptlet")]),smalltalk.send("wvx", "__minus_gt", [unescape("video/x-ms-wvx")]),smalltalk.send("wz", "__minus_gt", [unescape("application/x-wingz")]),smalltalk.send("xbm", "__minus_gt", [unescape("image/x-xbitmap")]),smalltalk.send("xcf", "__minus_gt", [unescape("application/x-xcf")]),smalltalk.send("xht", "__minus_gt", [unescape("application/xhtml+xml")]),smalltalk.send("xhtml", "__minus_gt", [unescape("application/xhtml+xml")]),smalltalk.send("xlb", "__minus_gt", [unescape("application/vnd.ms-excel")]),smalltalk.send("xls", "__minus_gt", [unescape("application/vnd.ms-excel")]),smalltalk.send("xlt", "__minus_gt", [unescape("application/vnd.ms-excel")]),smalltalk.send("xml", "__minus_gt", [unescape("application/xml")]),smalltalk.send("xpi", "__minus_gt", [unescape("application/x-xpinstall")]),smalltalk.send("xpm", "__minus_gt", [unescape("image/x-xpixmap")]),smalltalk.send("xsl", "__minus_gt", [unescape("application/xml")]),smalltalk.send("xtel", "__minus_gt", [unescape("chemical/x-xtel")]),smalltalk.send("xul", "__minus_gt", [unescape("application/vnd.mozilla.xul+xml")]),smalltalk.send("xwd", "__minus_gt", [unescape("image/x-xwindowdump")]),smalltalk.send("xyz", "__minus_gt", [unescape("chemical/x-xyz")]),smalltalk.send("zip", "__minus_gt", [unescape("application/zip")]),smalltalk.send("zmt", "__minus_gt", [unescape("chemical/x-mopac-input")]),smalltalk.send(unescape("%7E"), "__minus_gt", [unescape("application/x-trash")])]);
  8483. return self;},
  8484. args: [],
  8485. source: unescape('defaultMimeTypes%0A%09%5E%20%23%7B%0A%09%09%27%25%27%20-%3E%20%27application/x-trash%27.%0A%09%09%27323%27%20-%3E%20%27text/h323%27.%0A%09%09%27abw%27%20-%3E%20%27application/x-abiword%27.%0A%09%09%27ai%27%20-%3E%20%27application/postscript%27.%0A%09%09%27aif%27%20-%3E%20%27audio/x-aiff%27.%0A%09%09%27aifc%27%20-%3E%20%27audio/x-aiff%27.%0A%09%09%27aiff%27%20-%3E%20%27audio/x-aiff%27.%0A%09%09%27alc%27%20-%3E%20%27chemical/x-alchemy%27.%0A%09%09%27art%27%20-%3E%20%27image/x-jg%27.%0A%09%09%27asc%27%20-%3E%20%27text/plain%27.%0A%09%09%27asf%27%20-%3E%20%27video/x-ms-asf%27.%0A%09%09%27asn%27%20-%3E%20%27chemical/x-ncbi-asn1-spec%27.%0A%09%09%27aso%27%20-%3E%20%27chemical/x-ncbi-asn1-binary%27.%0A%09%09%27asx%27%20-%3E%20%27video/x-ms-asf%27.%0A%09%09%27au%27%20-%3E%20%27audio/basic%27.%0A%09%09%27avi%27%20-%3E%20%27video/x-msvideo%27.%0A%09%09%27b%27%20-%3E%20%27chemical/x-molconn-Z%27.%0A%09%09%27bak%27%20-%3E%20%27application/x-trash%27.%0A%09%09%27bat%27%20-%3E%20%27application/x-msdos-program%27.%0A%09%09%27bcpio%27%20-%3E%20%27application/x-bcpio%27.%0A%09%09%27bib%27%20-%3E%20%27text/x-bibtex%27.%0A%09%09%27bin%27%20-%3E%20%27application/octet-stream%27.%0A%09%09%27bmp%27%20-%3E%20%27image/x-ms-bmp%27.%0A%09%09%27book%27%20-%3E%20%27application/x-maker%27.%0A%09%09%27bsd%27%20-%3E%20%27chemical/x-crossfire%27.%0A%09%09%27c%27%20-%3E%20%27text/x-csrc%27.%0A%09%09%27c++%27%20-%3E%20%27text/x-c++src%27.%0A%09%09%27c3d%27%20-%3E%20%27chemical/x-chem3d%27.%0A%09%09%27cac%27%20-%3E%20%27chemical/x-cache%27.%0A%09%09%27cache%27%20-%3E%20%27chemical/x-cache%27.%0A%09%09%27cascii%27%20-%3E%20%27chemical/x-cactvs-binary%27.%0A%09%09%27cat%27%20-%3E%20%27application/vnd.ms-pki.seccat%27.%0A%09%09%27cbin%27%20-%3E%20%27chemical/x-cactvs-binary%27.%0A%09%09%27cc%27%20-%3E%20%27text/x-c++src%27.%0A%09%09%27cdf%27%20-%3E%20%27application/x-cdf%27.%0A%09%09%27cdr%27%20-%3E%20%27image/x-coreldraw%27.%0A%09%09%27cdt%27%20-%3E%20%27image/x-coreldrawtemplate%27.%0A%09%09%27cdx%27%20-%3E%20%27chemical/x-cdx%27.%0A%09%09%27cdy%27%20-%3E%20%27application/vnd.cinderella%27.%0A%09%09%27cef%27%20-%3E%20%27chemical/x-cxf%27.%0A%09%09%27cer%27%20-%3E%20%27chemical/x-cerius%27.%0A%09%09%27chm%27%20-%3E%20%27chemical/x-chemdraw%27.%0A%09%09%27chrt%27%20-%3E%20%27application/x-kchart%27.%0A%09%09%27cif%27%20-%3E%20%27chemical/x-cif%27.%0A%09%09%27class%27%20-%3E%20%27application/java-vm%27.%0A%09%09%27cls%27%20-%3E%20%27text/x-tex%27.%0A%09%09%27cmdf%27%20-%3E%20%27chemical/x-cmdf%27.%0A%09%09%27cml%27%20-%3E%20%27chemical/x-cml%27.%0A%09%09%27cod%27%20-%3E%20%27application/vnd.rim.cod%27.%0A%09%09%27com%27%20-%3E%20%27application/x-msdos-program%27.%0A%09%09%27cpa%27%20-%3E%20%27chemical/x-compass%27.%0A%09%09%27cpio%27%20-%3E%20%27application/x-cpio%27.%0A%09%09%27cpp%27%20-%3E%20%27text/x-c++src%27.%0A%09%09%27cpt%27%20-%3E%20%27image/x-corelphotopaint%27.%0A%09%09%27crl%27%20-%3E%20%27application/x-pkcs7-crl%27.%0A%09%09%27crt%27%20-%3E%20%27application/x-x509-ca-cert%27.%0A%09%09%27csf%27%20-%3E%20%27chemical/x-cache-csf%27.%0A%09%09%27csh%27%20-%3E%20%27text/x-csh%27.%0A%09%09%27csm%27%20-%3E%20%27chemical/x-csml%27.%0A%09%09%27csml%27%20-%3E%20%27chemical/x-csml%27.%0A%09%09%27css%27%20-%3E%20%27text/css%27.%0A%09%09%27csv%27%20-%3E%20%27text/comma-separated-values%27.%0A%09%09%27ctab%27%20-%3E%20%27chemical/x-cactvs-binary%27.%0A%09%09%27ctx%27%20-%3E%20%27chemical/x-ctx%27.%0A%09%09%27cu%27%20-%3E%20%27application/cu-seeme%27.%0A%09%09%27cub%27%20-%3E%20%27chemical/x-gaussian-cube%27.%0A%09%09%27cxf%27%20-%3E%20%27chemical/x-cxf%27.%0A%09%09%27cxx%27%20-%3E%20%27text/x-c++src%27.%0A%09%09%27dat%27%20-%3E%20%27chemical/x-mopac-input%27.%0A%09%09%27dcr%27%20-%3E%20%27application/x-director%27.%0A%09%09%27deb%27%20-%3E%20%27application/x-debian-package%27.%0A%09%09%27dif%27%20-%3E%20%27video/dv%27.%0A%09%09%27diff%27%20-%3E%20%27text/plain%27.%0A%09%09%27dir%27%20-%3E%20%27application/x-director%27.%0A%09%09%27djv%27%20-%3E%20%27image/vnd.djvu%27.%0A%09%09%27djvu%27%20-%3E%20%27image/vnd.djvu%27.%0A%09%09%27dl%27%20-%3E%20%27video/dl%27.%0A%09%09%27dll%27%20-%3E%20%27application/x-msdos-program%27.%0A%09%09%27dmg%27%20-%3E%20%27application/x-apple-diskimage%27.%0A%09%09%27dms%27%20-%3E%20%27application/x-dms%27.%0A%09%09%27doc%27%20-%3E%20%27application/msword%27.%0A%09%09%27dot%27%20-%3E%20%27application/msword%27.%0A%09%09%27dv%27%20-%3E%20%27video/dv%27.%0A%09%09%27dvi%27%20-%3E%20%27application/x-dvi%27.%0A%09%09%27dx%27%20-%3E%20%27chemical/x-jcamp-dx%27.%0A%09%09%27dxr%27%20-%3E%20%27application/x-director%27.%0A%09%09%27emb%27%20-%3E%20%27chemical/x-embl-dl-nucleotide%27.%0A%09%09%27embl%27%20-%3E%20%27chemical/x-embl-dl-nucleotide%27.%0A%09%09%27ent%27%20-%3E%20%27chemical/x-pdb%27.%0A%09%09%27eps%27%20-%3E%20%27application/postscript%27.%0A%09%09%27etx%27%20-%3E%20%27text/x-setext%27.%0A%09%09%27exe%27%20-%3E%20%27application/x-msdos-program%27.%0A%09%09%27ez%27%20-%3E%20%27application/andrew-inset%27.%0A%09%09%27fb%27%20-%3E%20%27application/x-maker%27.%0A%09%09%27fbdoc%27%20-%3E%20%27application/x-maker%27.%0A%09%09%27fch%27%20-%3E%20%27chemical/x-gaussian-checkpoint%27.%0A%09%09%27fchk%27%20-%3E%20%27chemical/x-gaussian-checkpoint%27.%0A%09%09%27fig%27%20-%3E%20%27application/x-xfig%27.%0A%09%09%27flac%27%20-%3E%20%27application/x-flac%27.%0A%09%09%27fli%27%20-%3E%20%27video/fli%27.%0A%09%09%27fm%27%20-%3E%20%27application/x-maker%27.%0A%09%09%27frame%27%20-%3E%20%27application/x-maker%27.%0A%09%09%27frm%27%20-%3E%20%27application/x-maker%27.%0A%09%09%27gal%27%20-%3E%20%27chemical/x-gaussian-log%27.%0A%09%09%27gam%27%20-%3E%20%27chemical/x-gamess-input%27.%0A%09%09%27gamin%27%20-%3E%20%27chemical/x-gamess-input%27.%0A%09%09%27gau%27%20-%3E%20%27chemical/x-gaussian-input%27.%0A%09%09%27gcd%27%20-%3E%20%27text/x-pcs-gcd%27.%0A%09%09%27gcf%27%20-%3E%20%27application/x-graphing-calculator%27.%0A%09%09%27gcg%27%20-%3E%20%27chemical/x-gcg8-sequence%27.%0A%09%09%27gen%27%20-%3E%20%27chemical/x-genbank%27.%0A%09%09%27gf%27%20-%3E%20%27application/x-tex-gf%27.%0A%09%09%27gif%27%20-%3E%20%27image/gif%27.%0A%09%09%27gjc%27%20-%3E%20%27chemical/x-gaussian-input%27.%0A%09%09%27gjf%27%20-%3E%20%27chemical/x-gaussian-input%27.%0A%09%09%27gl%27%20-%3E%20%27video/gl%27.%0A%09%09%27gnumeric%27%20-%3E%20%27application/x-gnumeric%27.%0A%09%09%27gpt%27%20-%3E%20%27chemical/x-mopac-graph%27.%0A%09%09%27gsf%27%20-%3E%20%27application/x-font%27.%0A%09%09%27gsm%27%20-%3E%20%27audio/x-gsm%27.%0A%09%09%27gtar%27%20-%3E%20%27application/x-gtar%27.%0A%09%09%27h%27%20-%3E%20%27text/x-chdr%27.%0A%09%09%27h++%27%20-%3E%20%27text/x-c++hdr%27.%0A%09%09%27hdf%27%20-%3E%20%27application/x-hdf%27.%0A%09%09%27hh%27%20-%3E%20%27text/x-c++hdr%27.%0A%09%09%27hin%27%20-%3E%20%27chemical/x-hin%27.%0A%09%09%27hpp%27%20-%3E%20%27text/x-c++hdr%27.%0A%09%09%27hqx%27%20-%3E%20%27application/mac-binhex40%27.%0A%09%09%27hs%27%20-%3E%20%27text/x-haskell%27.%0A%09%09%27hta%27%20-%3E%20%27application/hta%27.%0A%09%09%27htc%27%20-%3E%20%27text/x-component%27.%0A%09%09%27htm%27%20-%3E%20%27text/html%27.%0A%09%09%27html%27%20-%3E%20%27text/html%27.%0A%09%09%27hxx%27%20-%3E%20%27text/x-c++hdr%27.%0A%09%09%27ica%27%20-%3E%20%27application/x-ica%27.%0A%09%09%27ice%27%20-%3E%20%27x-conference/x-cooltalk%27.%0A%09%09%27ico%27%20-%3E%20%27image/x-icon%27.%0A%09%09%27ics%27%20-%3E%20%27text/calendar%27.%0A%09%09%27icz%27%20-%3E%20%27text/calendar%27.%0A%09%09%27ief%27%20-%3E%20%27image/ief%27.%0A%09%09%27iges%27%20-%3E%20%27model/iges%27.%0A%09%09%27igs%27%20-%3E%20%27model/iges%27.%0A%09%09%27iii%27%20-%3E%20%27application/x-iphone%27.%0A%09%09%27inp%27%20-%3E%20%27chemical/x-gamess-input%27.%0A%09%09%27ins%27%20-%3E%20%27application/x-internet-signup%27.%0A%09%09%27iso%27%20-%3E%20%27application/x-iso9660-image%27.%0A%09%09%27isp%27%20-%3E%20%27application/x-internet-signup%27.%0A%09%09%27ist%27%20-%3E%20%27chemical/x-isostar%27.%0A%09%09%27istr%27%20-%3E%20%27chemical/x-isostar%27.%0A%09%09%27jad%27%20-%3E%20%27text/vnd.sun.j2me.app-descriptor%27.%0A%09%09%27jar%27%20-%3E%20%27application/java-archive%27.%0A%09%09%27java%27%20-%3E%20%27text/x-java%27.%0A%09%09%27jdx%27%20-%3E%20%27chemical/x-jcamp-dx%27.%0A%09%09%27jmz%27%20-%3E%20%27application/x-jmol%27.%0A%09%09%27jng%27%20-%3E%20%27image/x-jng%27.%0A%09%09%27jnlp%27%20-%3E%20%27application/x-java-jnlp-file%27.%0A%09%09%27jpe%27%20-%3E%20%27image/jpeg%27.%0A%09%09%27jpeg%27%20-%3E%20%27image/jpeg%27.%0A%09%09%27jpg%27%20-%3E%20%27image/jpeg%27.%0A%09%09%27js%27%20-%3E%20%27application/javascript%27.%0A%09%09%27kar%27%20-%3E%20%27audio/midi%27.%0A%09%09%27key%27%20-%3E%20%27application/pgp-keys%27.%0A%09%09%27kil%27%20-%3E%20%27application/x-killustrator%27.%0A%09%09%27kin%27%20-%3E%20%27chemical/x-kinemage%27.%0A%09%09%27kpr%27%20-%3E%20%27application/x-kpresenter%27.%0A%09%09%27kpt%27%20-%3E%20%27application/x-kpresenter%27.%0A%09%09%27ksp%27%20-%3E%20%27application/x-kspread%27.%0A%09%09%27kwd%27%20-%3E%20%27application/x-kword%27.%0A%09%09%27kwt%27%20-%3E%20%27application/x-kword%27.%0A%09%09%27latex%27%20-%3E%20%27application/x-latex%27.%0A%09%09%27lha%27%20-%3E%20%27application/x-lha%27.%0A%09%09%27lhs%27%20-%3E%20%27text/x-literate-haskell%27.%0A%09%09%27lsf%27%20-%3E%20%27video/x-la-asf%27.%0A%09%09%27lsx%27%20-%3E%20%27video/x-la-asf%27.%0A%09%09%27ltx%27%20-%3E%20%27text/x-tex%27.%0A%09%09%27lzh%27%20-%3E%20%27application/x-lzh%27.%0A%09%09%27lzx%27%20-%3E%20%27application/x-lzx%27.%0A%09%09%27m3u%27%20-%3E%20%27audio/x-mpegurl%27.%0A%09%09%27m4a%27%20-%3E%20%27audio/mpeg%27.%0A%09%09%27maker%27%20-%3E%20%27application/x-maker%27.%0A%09%09%27man%27%20-%3E%20%27application/x-troff-man%27.%0A%09%09%27mcif%27%20-%3E%20%27chemical/x-mmcif%27.%0A%09%09%27mcm%27%20-%3E%20%27chemical/x-macmolecule%27.%0A%09%09%27mdb%27%20-%3E%20%27application/msaccess%27.%0A%09%09%27me%27%20-%3E%20%27application/x-troff-me%27.%0A%09%09%27mesh%27%20-%3E%20%27model/mesh%27.%0A%09%09%27mid%27%20-%3E%20%27audio/midi%27.%0A%09%09%27midi%27%20-%3E%20%27audio/midi%27.%0A%09%09%27mif%27%20-%3E%20%27application/x-mif%27.%0A%09%09%27mm%27%20-%3E%20%27application/x-freemind%27.%0A%09%09%27mmd%27%20-%3E%20%27chemical/x-macromodel-input%27.%0A%09%09%27mmf%27%20-%3E%20%27application/vnd.smaf%27.%0A%09%09%27mml%27%20-%3E%20%27text/mathml%27.%0A%09%09%27mmod%27%20-%3E%20%27chemical/x-macromodel-input%27.%0A%09%09%27mng%27%20-%3E%20%27video/x-mng%27.%0A%09%09%27moc%27%20-%3E%20%27text/x-moc%27.%0A%09%09%27mol%27%20-%3E%20%27chemical/x-mdl-molfile%27.%0A%09%09%27mol2%27%20-%3E%20%27chemical/x-mol2%27.%0A%09%09%27moo%27%20-%3E%20%27chemical/x-mopac-out%27.%0A%09%09%27mop%27%20-%3E%20%27chemical/x-mopac-input%27.%0A%09%09%27mopcrt%27%20-%3E%20%27chemical/x-mopac-input%27.%0A%09%09%27mov%27%20-%3E%20%27video/quicktime%27.%0A%09%09%27movie%27%20-%3E%20%27video/x-sgi-movie%27.%0A%09%09%27mp2%27%20-%3E%20%27audio/mpeg%27.%0A%09%09%27mp3%27%20-%3E%20%27audio/mpeg%27.%0A%09%09%27mp4%27%20-%3E%20%27video/mp4%27.%0A%09%09%27mpc%27%20-%3E%20%27chemical/x-mopac-input%27.%0A%09%09%27mpe%27%20-%3E%20%27video/mpeg%27.%0A%09%09%27mpeg%27%20-%3E%20%27video/mpeg%27.%0A%09%09%27mpega%27%20-%3E%20%27audio/mpeg%27.%0A%09%09%27mpg%27%20-%3E%20%27video/mpeg%27.%0A%09%09%27mpga%27%20-%3E%20%27audio/mpeg%27.%0A%09%09%27ms%27%20-%3E%20%27application/x-troff-ms%27.%0A%09%09%27msh%27%20-%3E%20%27model/mesh%27.%0A%09%09%27msi%27%20-%3E%20%27application/x-msi%27.%0A%09%09%27mvb%27%20-%3E%20%27chemical/x-mopac-vib%27.%0A%09%09%27mxu%27%20-%3E%20%27video/vnd.mpegurl%27.%0A%09%09%27nb%27%20-%3E%20%27application/mathematica%27.%0A%09%09%27nc%27%20-%3E%20%27application/x-netcdf%27.%0A%09%09%27nwc%27%20-%3E%20%27application/x-nwc%27.%0A%09%09%27o%27%20-%3E%20%27application/x-object%27.%0A%09%09%27oda%27%20-%3E%20%27application/oda%27.%0A%09%09%27odb%27%20-%3E%20%27application/vnd.oasis.opendocument.database%27.%0A%09%09%27odc%27%20-%3E%20%27application/vnd.oasis.opendocument.chart%27.%0A%09%09%27odf%27%20-%3E%20%27application/vnd.oasis.opendocument.formula%27.%0A%09%09%27odg%27%20-%3E%20%27application/vnd.oasis.opendocument.graphics%27.%0A%09%09%27odi%27%20-%3E%20%27application/vnd.oasis.opendocument.image%27.%0A%09%09%27odm%27%20-%3E%20%27application/vnd.oasis.opendocument.text-master%27.%0A%09%09%27odp%27%20-%3E%20%27application/vnd.oasis.opendocument.presentation%27.%0A%09%09%27ods%27%20-%3E%20%27application/vnd.oasis.opendocument.spreadsheet%27.%0A%09%09%27odt%27%20-%3E%20%27application/vnd.oasis.opendocument.text%27.%0A%09%09%27ogg%27%20-%3E%20%27application/ogg%27.%0A%09%09%27old%27%20-%3E%20%27application/x-trash%27.%0A%09%09%27oth%27%20-%3E%20%27application/vnd.oasis.opendocument.text-web%27.%0A%09%09%27oza%27%20-%3E%20%27application/x-oz-application%27.%0A%09%09%27p%27%20-%3E%20%27text/x-pascal%27.%0A%09%09%27p7r%27%20-%3E%20%27application/x-pkcs7-certreqresp%27.%0A%09%09%27pac%27%20-%3E%20%27application/x-ns-proxy-autoconfig%27.%0A%09%09%27pas%27%20-%3E%20%27text/x-pascal%27.%0A%09%09%27pat%27%20-%3E%20%27image/x-coreldrawpattern%27.%0A%09%09%27pbm%27%20-%3E%20%27image/x-portable-bitmap%27.%0A%09%09%27pcf%27%20-%3E%20%27application/x-font%27.%0A%09%09%27pcf.Z%27%20-%3E%20%27application/x-font%27.%0A%09%09%27pcx%27%20-%3E%20%27image/pcx%27.%0A%09%09%27pdb%27%20-%3E%20%27chemical/x-pdb%27.%0A%09%09%27pdf%27%20-%3E%20%27application/pdf%27.%0A%09%09%27pfa%27%20-%3E%20%27application/x-font%27.%0A%09%09%27pfb%27%20-%3E%20%27application/x-font%27.%0A%09%09%27pgm%27%20-%3E%20%27image/x-portable-graymap%27.%0A%09%09%27pgn%27%20-%3E%20%27application/x-chess-pgn%27.%0A%09%09%27pgp%27%20-%3E%20%27application/pgp-signature%27.%0A%09%09%27pk%27%20-%3E%20%27application/x-tex-pk%27.%0A%09%09%27pl%27%20-%3E%20%27text/x-perl%27.%0A%09%09%27pls%27%20-%3E%20%27audio/x-scpls%27.%0A%09%09%27pm%27%20-%3E%20%27text/x-perl%27.%0A%09%09%27png%27%20-%3E%20%27image/png%27.%0A%09%09%27pnm%27%20-%3E%20%27image/x-portable-anymap%27.%0A%09%09%27pot%27%20-%3E%20%27text/plain%27.%0A%09%09%27ppm%27%20-%3E%20%27image/x-portable-pixmap%27.%0A%09%09%27pps%27%20-%3E%20%27application/vnd.ms-powerpoint%27.%0A%09%09%27ppt%27%20-%3E%20%27application/vnd.ms-powerpoint%27.%0A%09%09%27prf%27%20-%3E%20%27application/pics-rules%27.%0A%09%09%27prt%27%20-%3E%20%27chemical/x-ncbi-asn1-ascii%27.%0A%09%09%27ps%27%20-%3E%20%27application/postscript%27.%0A%09%09%27psd%27%20-%3E%20%27image/x-photoshop%27.%0A%09%09%27psp%27%20-%3E%20%27text/x-psp%27.%0A%09%09%27py%27%20-%3E%20%27text/x-python%27.%0A%09%09%27pyc%27%20-%3E%20%27application/x-python-code%27.%0A%09%09%27pyo%27%20-%3E%20%27application/x-python-code%27.%0A%09%09%27qt%27%20-%3E%20%27video/quicktime%27.%0A%09%09%27qtl%27%20-%3E%20%27application/x-quicktimeplayer%27.%0A%09%09%27ra%27%20-%3E%20%27audio/x-realaudio%27.%0A%09%09%27ram%27%20-%3E%20%27audio/x-pn-realaudio%27.%0A%09%09%27rar%27%20-%3E%20%27application/rar%27.%0A%09%09%27ras%27%20-%3E%20%27image/x-cmu-raster%27.%0A%09%09%27rd%27%20-%3E%20%27chemical/x-mdl-rdfile%27.%0A%09%09%27rdf%27%20-%3E%20%27application/rdf+xml%27.%0A%09%09%27rgb%27%20-%3E%20%27image/x-rgb%27.%0A%09%09%27rm%27%20-%3E%20%27audio/x-pn-realaudio%27.%0A%09%09%27roff%27%20-%3E%20%27application/x-troff%27.%0A%09%09%27ros%27%20-%3E%20%27chemical/x-rosdal%27.%0A%09%09%27rpm%27%20-%3E%20%27application/x-redhat-package-manager%27.%0A%09%09%27rss%27%20-%3E%20%27application/rss+xml%27.%0A%09%09%27rtf%27%20-%3E%20%27text/rtf%27.%0A%09%09%27rtx%27%20-%3E%20%27text/richtext%27.%0A%09%09%27rxn%27%20-%3E%20%27chemical/x-mdl-rxnfile%27.%0A%09%09%27sct%27%20-%3E%20%27text/scriptlet%27.%0A%09%09%27sd%27%20-%3E%20%27chemical/x-mdl-sdfile%27.%0A%09%09%27sd2%27%20-%3E%20%27audio/x-sd2%27.%0A%09%09%27sda%27%20-%3E%20%27application/vnd.stardivision.draw%27.%0A%09%09%27sdc%27%20-%3E%20%27application/vnd.stardivision.calc%27.%0A%09%09%27sdd%27%20-%3E%20%27application/vnd.stardivision.impress%27.%0A%09%09%27sdf%27%20-%3E%20%27chemical/x-mdl-sdfile%27.%0A%09%09%27sdp%27%20-%3E%20%27application/vnd.stardivision.impress%27.%0A%09%09%27sdw%27%20-%3E%20%27application/vnd.stardivision.writer%27.%0A%09%09%27ser%27%20-%3E%20%27application/java-serialized-object%27.%0A%09%09%27sgf%27%20-%3E%20%27application/x-go-sgf%27.%0A%09%09%27sgl%27%20-%3E%20%27application/vnd.stardivision.writer-global%27.%0A%09%09%27sh%27%20-%3E%20%27text/x-sh%27.%0A%09%09%27shar%27%20-%3E%20%27application/x-shar%27.%0A%09%09%27shtml%27%20-%3E%20%27text/html%27.%0A%09%09%27sid%27%20-%3E%20%27audio/prs.sid%27.%0A%09%09%27sik%27%20-%3E%20%27application/x-trash%27.%0A%09%09%27silo%27%20-%3E%20%27model/mesh%27.%0A%09%09%27sis%27%20-%3E%20%27application/vnd.symbian.install%27.%0A%09%09%27sit%27%20-%3E%20%27application/x-stuffit%27.%0A%09%09%27skd%27%20-%3E%20%27application/x-koan%27.%0A%09%09%27skm%27%20-%3E%20%27application/x-koan%27.%0A%09%09%27skp%27%20-%3E%20%27application/x-koan%27.%0A%09%09%27skt%27%20-%3E%20%27application/x-koan%27.%0A%09%09%27smf%27%20-%3E%20%27application/vnd.stardivision.math%27.%0A%09%09%27smi%27%20-%3E%20%27application/smil%27.%0A%09%09%27smil%27%20-%3E%20%27application/smil%27.%0A%09%09%27snd%27%20-%3E%20%27audio/basic%27.%0A%09%09%27spc%27%20-%3E%20%27chemical/x-galactic-spc%27.%0A%09%09%27spl%27%20-%3E%20%27application/x-futuresplash%27.%0A%09%09%27src%27%20-%3E%20%27application/x-wais-source%27.%0A%09%09%27stc%27%20-%3E%20%27application/vnd.sun.xml.calc.template%27.%0A%09%09%27std%27%20-%3E%20%27application/vnd.sun.xml.draw.template%27.%0A%09%09%27sti%27%20-%3E%20%27application/vnd.sun.xml.impress.template%27.%0A%09%09%27stl%27%20-%3E%20%27application/vnd.ms-pki.stl%27.%0A%09%09%27stw%27%20-%3E%20%27application/vnd.sun.xml.writer.template%27.%0A%09%09%27sty%27%20-%3E%20%27text/x-tex%27.%0A%09%09%27sv4cpio%27%20-%3E%20%27application/x-sv4cpio%27.%0A%09%09%27sv4crc%27%20-%3E%20%27application/x-sv4crc%27.%0A%09%09%27svg%27%20-%3E%20%27image/svg+xml%27.%0A%09%09%27svgz%27%20-%3E%20%27image/svg+xml%27.%0A%09%09%27sw%27%20-%3E%20%27chemical/x-swissprot%27.%0A%09%09%27swf%27%20-%3E%20%27application/x-shockwave-flash%27.%0A%09%09%27swfl%27%20-%3E%20%27application/x-shockwave-flash%27.%0A%09%09%27sxc%27%20-%3E%20%27application/vnd.sun.xml.calc%27.%0A%09%09%27sxd%27%20-%3E%20%27application/vnd.sun.xml.draw%27.%0A%09%09%27sxg%27%20-%3E%20%27application/vnd.sun.xml.writer.global%27.%0A%09%09%27sxi%27%20-%3E%20%27application/vnd.sun.xml.impress%27.%0A%09%09%27sxm%27%20-%3E%20%27application/vnd.sun.xml.math%27.%0A%09%09%27sxw%27%20-%3E%20%27application/vnd.sun.xml.writer%27.%0A%09%09%27t%27%20-%3E%20%27application/x-troff%27.%0A%09%09%27tar%27%20-%3E%20%27application/x-tar%27.%0A%09%09%27taz%27%20-%3E%20%27application/x-gtar%27.%0A%09%09%27tcl%27%20-%3E%20%27text/x-tcl%27.%0A%09%09%27tex%27%20-%3E%20%27text/x-tex%27.%0A%09%09%27texi%27%20-%3E%20%27application/x-texinfo%27.%0A%09%09%27texinfo%27%20-%3E%20%27application/x-texinfo%27.%0A%09%09%27text%27%20-%3E%20%27text/plain%27.%0A%09%09%27tgf%27%20-%3E%20%27chemical/x-mdl-tgf%27.%0A%09%09%27tgz%27%20-%3E%20%27application/x-gtar%27.%0A%09%09%27tif%27%20-%3E%20%27image/tiff%27.%0A%09%09%27tiff%27%20-%3E%20%27image/tiff%27.%0A%09%09%27tk%27%20-%3E%20%27text/x-tcl%27.%0A%09%09%27tm%27%20-%3E%20%27text/texmacs%27.%0A%09%09%27torrent%27%20-%3E%20%27application/x-bittorrent%27.%0A%09%09%27tr%27%20-%3E%20%27application/x-troff%27.%0A%09%09%27ts%27%20-%3E%20%27text/texmacs%27.%0A%09%09%27tsp%27%20-%3E%20%27application/dsptype%27.%0A%09%09%27tsv%27%20-%3E%20%27text/tab-separated-values%27.%0A%09%09%27txt%27%20-%3E%20%27text/plain%27.%0A%09%09%27udeb%27%20-%3E%20%27application/x-debian-package%27.%0A%09%09%27uls%27%20-%3E%20%27text/iuls%27.%0A%09%09%27ustar%27%20-%3E%20%27application/x-ustar%27.%0A%09%09%27val%27%20-%3E%20%27chemical/x-ncbi-asn1-binary%27.%0A%09%09%27vcd%27%20-%3E%20%27application/x-cdlink%27.%0A%09%09%27vcf%27%20-%3E%20%27text/x-vcard%27.%0A%09%09%27vcs%27%20-%3E%20%27text/x-vcalendar%27.%0A%09%09%27vmd%27%20-%3E%20%27chemical/x-vmd%27.%0A%09%09%27vms%27%20-%3E%20%27chemical/x-vamas-iso14976%27.%0A%09%09%27vor%27%20-%3E%20%27application/vnd.stardivision.writer%27.%0A%09%09%27vrm%27%20-%3E%20%27x-world/x-vrml%27.%0A%09%09%27vrml%27%20-%3E%20%27x-world/x-vrml%27.%0A%09%09%27vsd%27%20-%3E%20%27application/vnd.visio%27.%0A%09%09%27wad%27%20-%3E%20%27application/x-doom%27.%0A%09%09%27wav%27%20-%3E%20%27audio/x-wav%27.%0A%09%09%27wax%27%20-%3E%20%27audio/x-ms-wax%27.%0A%09%09%27wbmp%27%20-%3E%20%27image/vnd.wap.wbmp%27.%0A%09%09%27wbxml%27%20-%3E%20%27application/vnd.wap.wbxml%27.%0A%09%09%27wk%27%20-%3E%20%27application/x-123%27.%0A%09%09%27wm%27%20-%3E%20%27video/x-ms-wm%27.%0A%09%09%27wma%27%20-%3E%20%27audio/x-ms-wma%27.%0A%09%09%27wmd%27%20-%3E%20%27application/x-ms-wmd%27.%0A%09%09%27wml%27%20-%3E%20%27text/vnd.wap.wml%27.%0A%09%09%27wmlc%27%20-%3E%20%27application/vnd.wap.wmlc%27.%0A%09%09%27wmls%27%20-%3E%20%27text/vnd.wap.wmlscript%27.%0A%09%09%27wmlsc%27%20-%3E%20%27application/vnd.wap.wmlscriptc%27.%0A%09%09%27wmv%27%20-%3E%20%27video/x-ms-wmv%27.%0A%09%09%27wmx%27%20-%3E%20%27video/x-ms-wmx%27.%0A%09%09%27wmz%27%20-%3E%20%27application/x-ms-wmz%27.%0A%09%09%27wp5%27%20-%3E%20%27application/wordperfect5.1%27.%0A%09%09%27wpd%27%20-%3E%20%27application/wordperfect%27.%0A%09%09%27wrl%27%20-%3E%20%27x-world/x-vrml%27.%0A%09%09%27wsc%27%20-%3E%20%27text/scriptlet%27.%0A%09%09%27wvx%27%20-%3E%20%27video/x-ms-wvx%27.%0A%09%09%27wz%27%20-%3E%20%27application/x-wingz%27.%0A%09%09%27xbm%27%20-%3E%20%27image/x-xbitmap%27.%0A%09%09%27xcf%27%20-%3E%20%27application/x-xcf%27.%0A%09%09%27xht%27%20-%3E%20%27application/xhtml+xml%27.%0A%09%09%27xhtml%27%20-%3E%20%27application/xhtml+xml%27.%0A%09%09%27xlb%27%20-%3E%20%27application/vnd.ms-excel%27.%0A%09%09%27xls%27%20-%3E%20%27application/vnd.ms-excel%27.%0A%09%09%27xlt%27%20-%3E%20%27application/vnd.ms-excel%27.%0A%09%09%27xml%27%20-%3E%20%27application/xml%27.%0A%09%09%27xpi%27%20-%3E%20%27application/x-xpinstall%27.%0A%09%09%27xpm%27%20-%3E%20%27image/x-xpixmap%27.%0A%09%09%27xsl%27%20-%3E%20%27application/xml%27.%0A%09%09%27xtel%27%20-%3E%20%27chemical/x-xtel%27.%0A%09%09%27xul%27%20-%3E%20%27application/vnd.mozilla.xul+xml%27.%0A%09%09%27xwd%27%20-%3E%20%27image/x-xwindowdump%27.%0A%09%09%27xyz%27%20-%3E%20%27chemical/x-xyz%27.%0A%09%09%27zip%27%20-%3E%20%27application/zip%27.%0A%09%09%27zmt%27%20-%3E%20%27chemical/x-mopac-input%27.%0A%09%09%27%7E%27%20-%3E%20%27application/x-trash%27%0A%09%7D'),
  8486. messageSends: [unescape("-%3E")],
  8487. referencedClasses: []
  8488. }),
  8489. smalltalk.FileServer.klass);
  8490. smalltalk.addMethod(
  8491. '_mimeTypes',
  8492. smalltalk.method({
  8493. selector: 'mimeTypes',
  8494. category: 'accessing',
  8495. fn: function (){
  8496. var self=this;
  8497. return (($receiver = self['@mimeTypes']) == nil || $receiver == undefined) ? (function(){return self['@mimeTypes']=smalltalk.send(self, "_defaultMimeTypes", []);})() : $receiver;
  8498. return self;},
  8499. args: [],
  8500. source: unescape('mimeTypes%0A%09%5EmimeTypes%20ifNil%3A%20%5BmimeTypes%20%3A%3D%20self%20defaultMimeTypes%5D'),
  8501. messageSends: ["ifNil:", "defaultMimeTypes"],
  8502. referencedClasses: []
  8503. }),
  8504. smalltalk.FileServer.klass);
  8505. smalltalk.addMethod(
  8506. '_mimeTypeFor_',
  8507. smalltalk.method({
  8508. selector: 'mimeTypeFor:',
  8509. category: 'accessing',
  8510. fn: function (aString){
  8511. var self=this;
  8512. return smalltalk.send(smalltalk.send(self, "_mimeTypes", []), "_at_ifAbsent_", [smalltalk.send(aString, "_replace_with_", [unescape(".*%5B%5C.%5D"), ""]), (function(){return unescape("text/plain");})]);
  8513. return self;},
  8514. args: ["aString"],
  8515. source: unescape('mimeTypeFor%3A%20aString%0A%09%5Eself%20mimeTypes%20at%3A%20%28aString%20replace%3A%20%27.*%5B%5C.%5D%27%20with%3A%20%27%27%29%20ifAbsent%3A%20%5B%27text/plain%27%5D'),
  8516. messageSends: ["at:ifAbsent:", "mimeTypes", "replace:with:"],
  8517. referencedClasses: []
  8518. }),
  8519. smalltalk.FileServer.klass);
  8520. smalltalk.addMethod(
  8521. '_main',
  8522. smalltalk.method({
  8523. selector: 'main',
  8524. category: 'initialization',
  8525. fn: function (){
  8526. var self=this;
  8527. return smalltalk.send(smalltalk.send(self, "_new", []), "_startOn_", [smalltalk.send(self, "_port", [])]);
  8528. return self;},
  8529. args: [],
  8530. source: unescape('main%0A%09%5Eself%20new%20startOn%3A%20self%20port'),
  8531. messageSends: ["startOn:", "new", "port"],
  8532. referencedClasses: []
  8533. }),
  8534. smalltalk.FileServer.klass);
  8535. smalltalk.init(smalltalk.Object);
  8536. smalltalk.classes()._do_(function(each) {each._initialize()});
  8537. /* Similar to jQuery(document).ready() */
  8538. if(this.smalltalkReady) {
  8539. this.smalltalkReady();
  8540. }
  8541. smalltalk.FileServer._main()