1
0

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