1
0

server.js 344 KB

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