Kernel.js 180 KB

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