Kernel.js 217 KB

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