Kernel.js 177 KB

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