1
0

Kernel.js 184 KB

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