Kernel.js 208 KB

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