Kernel.js 194 KB

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