Kernel.js 194 KB

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