amber.js 725 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085
  1. /* ====================================================================
  2. |
  3. | Amber Smalltalk
  4. | http://amber-lang.net
  5. |
  6. ======================================================================
  7. ======================================================================
  8. |
  9. | Copyright (c) 2010-2011
  10. | Nicolas Petton <petton.nicolas@gmail.com>
  11. |
  12. | Amber is released under the MIT license
  13. |
  14. | Permission is hereby granted, free of charge, to any person obtaining
  15. | a copy of this software and associated documentation files (the
  16. | 'Software'), to deal in the Software without restriction, including
  17. | without limitation the rights to use, copy, modify, merge, publish,
  18. | distribute, sublicense, and/or sell copies of the Software, and to
  19. | permit persons to whom the Software is furnished to do so, subject to
  20. | the following conditions:
  21. |
  22. | The above copyright notice and this permission notice shall be
  23. | included in all copies or substantial portions of the Software.
  24. |
  25. | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
  26. | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  27. | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  28. | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  29. | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  30. | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  31. | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  32. |
  33. ==================================================================== */
  34. /* Make that console is defined */
  35. if (typeof console === "undefined") {
  36. this.console = {
  37. log: function() {},
  38. warn: function() {},
  39. info: function() {},
  40. debug: function() {},
  41. error: function() {}
  42. };
  43. }
  44. /* Smalltalk constructors definition */
  45. function SmalltalkObject(){};
  46. function SmalltalkBehavior(){};
  47. function SmalltalkClass(){};
  48. function SmalltalkPackage(){};
  49. function SmalltalkMetaclass(){
  50. this.meta = true;
  51. };
  52. function SmalltalkMethod(){};
  53. function SmalltalkNil(){};
  54. function SmalltalkSymbol(string){
  55. this.value = string;
  56. };
  57. function Smalltalk(){
  58. var st = this;
  59. /* This is the current call context object. While it is publicly available,
  60. Use smalltalk.getThisContext() instead which will answer a safe copy of
  61. the current context */
  62. st.thisContext = undefined;
  63. /* List of all reserved words in JavaScript. They may not be used as variables
  64. in Smalltalk. */
  65. st.reservedWords = ['break', 'case', 'catch', 'char', 'class', 'continue', 'debugger',
  66. 'default', 'delete', 'do', 'else', 'finally', 'for', 'function',
  67. 'if', 'in', 'instanceof', 'new', 'private', 'protected',
  68. 'public', 'return', 'static', 'switch', 'this', 'throw',
  69. 'try', 'typeof', 'var', 'void', 'while', 'with', 'yield'];
  70. /* The symbol table ensures symbol unicity */
  71. symbolTable = {};
  72. st.symbolFor = function(string) {
  73. if(symbolTable[string] === undefined) {
  74. symbolTable[string] = new SmalltalkSymbol(string);
  75. };
  76. return symbolTable[string];
  77. };
  78. /* Unique ID number generator */
  79. oid = 0;
  80. st.nextId = function() {
  81. oid += 1;
  82. return oid;
  83. };
  84. /* We hold all Packages in a separate Object */
  85. st.packages = {};
  86. /* Smalltalk package creation. To add a Package, use smalltalk.addPackage() */
  87. function pkg(spec) {
  88. var that = new SmalltalkPackage();
  89. that.pkgName = spec.pkgName;
  90. that.properties = spec.properties || {};
  91. return that;
  92. };
  93. /* Smalltalk class creation. A class is an instance of an automatically
  94. created metaclass object. Newly created classes (not their metaclass)
  95. should be added to the smalltalk object, see smalltalk.addClass().
  96. Superclass linking is *not* handled here, see smalltalk.init() */
  97. function klass(spec) {
  98. var spec = spec || {};
  99. var that;
  100. if(spec.meta) {
  101. that = new SmalltalkMetaclass();
  102. } else {
  103. that = new (klass({meta: true})).fn;
  104. that.klass.instanceClass = that;
  105. that.className = spec.className;
  106. that.klass.className = that.className + ' class';
  107. }
  108. that.fn = spec.fn || function(){};
  109. that.superclass = spec.superclass;
  110. that.iVarNames = spec.iVarNames || [];
  111. if(that.superclass) {
  112. that.klass.superclass = that.superclass.klass;
  113. }
  114. that.pkg = spec.pkg;
  115. that.fn.prototype.methods = {};
  116. that.fn.prototype.inheritedMethods = {};
  117. that.fn.prototype.klass = that;
  118. return that;
  119. };
  120. /* Smalltalk method object. To add a method to a class,
  121. use smalltalk.addMethod() */
  122. st.method = function(spec) {
  123. var that = new SmalltalkMethod();
  124. that.selector = spec.selector;
  125. that.jsSelector = spec.jsSelector;
  126. that.args = spec.args || {};
  127. that.category = spec.category;
  128. that.source = spec.source;
  129. that.messageSends = spec.messageSends || [];
  130. that.referencedClasses = spec.referencedClasses || [];
  131. that.fn = spec.fn;
  132. return that
  133. };
  134. /* Initialize a class in its class hierarchy. Handle both class and
  135. metaclasses. */
  136. st.init = function(klass) {
  137. var subclasses = st.subclasses(klass);
  138. var methods;
  139. if(klass.superclass && klass.superclass !== nil) {
  140. methods = st.methods(klass.superclass);
  141. //Methods linking
  142. for(var i in methods) {
  143. if(!klass.fn.prototype.methods[i]) {
  144. klass.fn.prototype.inheritedMethods[i] = methods[i];
  145. klass.fn.prototype[methods[i].jsSelector] = methods[i].fn;
  146. }
  147. }
  148. }
  149. for(var i=0;i<subclasses.length;i++) {
  150. st.init(subclasses[i]);
  151. }
  152. if(klass.klass && !klass.meta) {
  153. st.init(klass.klass);
  154. }
  155. };
  156. /* Answer all registered Packages as Array */
  157. st.packages.all = function() {
  158. var packages = [];
  159. for(var i in st.packages) {
  160. if (!st.packages.hasOwnProperty(i) || typeof(st.packages[i]) === "function") continue;
  161. packages.push(st.packages[i]);
  162. }
  163. return packages
  164. };
  165. /* Answer all registered Smalltalk classes */
  166. st.classes = function() {
  167. var classes = [];
  168. for(var i in st) {
  169. if(i.search(/^[A-Z]/g) != -1) {
  170. classes.push(st[i]);
  171. }
  172. }
  173. return classes
  174. };
  175. /* Answer all methods (included inherited ones) of klass. */
  176. st.methods = function(klass) {
  177. var methods = {};
  178. for(var i in klass.fn.prototype.methods) {
  179. methods[i] = klass.fn.prototype.methods[i]
  180. }
  181. for(var i in klass.fn.prototype.inheritedMethods) {
  182. methods[i] = klass.fn.prototype.inheritedMethods[i]
  183. }
  184. return methods;
  185. }
  186. /* Answer the direct subclasses of klass. */
  187. st.subclasses = function(klass) {
  188. var subclasses = [];
  189. var classes = st.classes();
  190. for(var i in classes) {
  191. if(classes[i].fn) {
  192. //Metaclasses
  193. if(classes[i].klass && classes[i].klass.superclass === klass) {
  194. subclasses.push(classes[i].klass);
  195. }
  196. //Classes
  197. if(classes[i].superclass === klass) {
  198. subclasses.push(classes[i]);
  199. }
  200. }
  201. }
  202. return subclasses;
  203. };
  204. /* Create a new class wrapping a JavaScript constructor, and add it to the
  205. global smalltalk object. Package is lazily created if it does not exist with given name. */
  206. st.mapClassName = function(className, pkgName, fn, superclass) {
  207. var pkg = st.addPackage(pkgName);
  208. st[className] = klass({
  209. className: className,
  210. superclass: superclass,
  211. pkg: pkg,
  212. fn: fn
  213. });
  214. };
  215. /* Add a package to the smalltalk.packages object, creating a new one if needed.
  216. If pkgName is null or empty we return nil, which is an allowed package for a class.
  217. If package already exists we still update the properties of it. */
  218. st.addPackage = function(pkgName, properties) {
  219. if(!pkgName) {return nil;}
  220. if(!(st.packages[pkgName])) {
  221. st.packages[pkgName] = pkg({
  222. pkgName: pkgName,
  223. properties: properties
  224. });
  225. } else {
  226. if(properties) {
  227. st.packages[pkgName].properties = properties;
  228. }
  229. }
  230. return st.packages[pkgName];
  231. };
  232. /* Add a class to the smalltalk object, creating a new one if needed.
  233. Package is lazily created if it does not exist with given name.*/
  234. st.addClass = function(className, superclass, iVarNames, pkgName) {
  235. var pkg = st.addPackage(pkgName);
  236. if(st[className]) {
  237. st[className].superclass = superclass;
  238. st[className].iVarNames = iVarNames;
  239. st[className].pkg = pkg || st[className].pkg;
  240. } else {
  241. st[className] = klass({
  242. className: className,
  243. superclass: superclass,
  244. pkg: pkg,
  245. iVarNames: iVarNames
  246. });
  247. }
  248. };
  249. /* Add a method to a class */
  250. st.addMethod = function(jsSelector, method, klass) {
  251. klass.fn.prototype[jsSelector] = method.fn;
  252. klass.fn.prototype.methods[method.selector] = method;
  253. method.methodClass = klass;
  254. method.jsSelector = jsSelector;
  255. };
  256. /* Handles Smalltalk message send. Automatically converts undefined to the nil object.
  257. If the receiver does not understand the selector, call its #doesNotUnderstand: method */
  258. sendWithoutContext = function(receiver, selector, args, klass) {
  259. if(receiver === undefined || receiver === null) {
  260. receiver = nil;
  261. }
  262. if(!klass && receiver.klass && receiver[selector]) {
  263. return receiver[selector].apply(receiver, args);
  264. } else if(klass && klass.fn.prototype[selector]) {
  265. return klass.fn.prototype[selector].apply(receiver, args)
  266. }
  267. return messageNotUnderstood(receiver, selector, args);
  268. };
  269. /* Handles unhandled errors during message sends */
  270. sendWithContext = function(receiver, selector, args, klass) {
  271. if(st.thisContext) {
  272. return withContextSend(receiver, selector, args, klass);
  273. } else {
  274. try {return withContextSend(receiver, selector, args, klass)}
  275. catch(error) {
  276. // Reset the context stack in any case
  277. st.thisContext = undefined;
  278. if(error.smalltalkError) {
  279. handleError(error);
  280. } else {
  281. throw(error);
  282. }
  283. }
  284. }
  285. };
  286. /* Same as sendWithoutContext but creates a methodContext. */
  287. withContextSend = function(receiver, selector, args, klass) {
  288. var call, context;
  289. if(receiver === undefined || receiver === null) {
  290. receiver = nil;
  291. }
  292. if(!klass && receiver.klass && receiver[selector]) {
  293. context = pushContext(receiver, selector, args);
  294. call = receiver[selector].apply(receiver, args);
  295. popContext(context);
  296. return call;
  297. } else if(klass && klass.fn.prototype[selector]) {
  298. context = pushContext(receiver, selector, args);
  299. call = klass.fn.prototype[selector].apply(receiver, args);
  300. popContext(context);
  301. return call;
  302. }
  303. return messageNotUnderstood(receiver, selector, args);
  304. };
  305. /* Handles Smalltalk errors. Triggers the registered ErrorHandler
  306. (See the Smalltalk class ErrorHandler and its subclasses */
  307. function handleError(error) {
  308. st.thisContext = undefined;
  309. smalltalk.ErrorHandler._current()._handleError_(error);
  310. }
  311. /* Handles #dnu: *and* JavaScript method calls.
  312. if the receiver has no klass, we consider it a JS object (outside of the
  313. Amber system). Else assume that the receiver understands #doesNotUnderstand: */
  314. function messageNotUnderstood(receiver, selector, args) {
  315. /* Handles JS method calls. */
  316. if(receiver.klass === undefined || receiver.allowJavaScriptCalls) {
  317. return callJavaScriptMethod(receiver, selector, args);
  318. }
  319. /* Handles not understood messages. Also see the Amber counter-part
  320. Object>>doesNotUnderstand: */
  321. return receiver._doesNotUnderstand_(
  322. st.Message._new()
  323. ._selector_(st.convertSelector(selector))
  324. ._arguments_(args)
  325. );
  326. };
  327. /* Call a method of a JS object, or answer a property if it exists.
  328. Else try wrapping a JSObjectProxy around the receiver.
  329. Converts keyword-based selectors by using the first
  330. keyword only, but keeping all message arguments.
  331. Example:
  332. "self do: aBlock with: anObject" -> "self.do(aBlock, anObject)" */
  333. function callJavaScriptMethod(receiver, selector, args) {
  334. var jsSelector = selector._asJavaScriptSelector();
  335. var jsProperty = receiver[jsSelector];
  336. if(typeof jsProperty === "function") {
  337. return jsProperty.apply(receiver, args);
  338. } else if(jsProperty !== undefined) {
  339. if(args[0]) {
  340. receiver[jsSelector] = args[0];
  341. return nil;
  342. } else {
  343. return jsProperty
  344. }
  345. }
  346. return st.send(st.JSObjectProxy._on_(receiver), selector, args);
  347. };
  348. /* Reuse old contexts stored in oldContexts */
  349. st.oldContexts = [];
  350. /* Handle thisContext pseudo variable */
  351. st.getThisContext = function() {
  352. if(st.thisContext) {
  353. return st.thisContext.copy();
  354. } else {
  355. return undefined;
  356. }
  357. }
  358. pushContext = function(receiver, selector, temps) {
  359. if(st.thisContext) {
  360. return st.thisContext = st.thisContext.newContext(receiver, selector, temps);
  361. } else {
  362. return st.thisContext = new SmalltalkMethodContext(receiver, selector, temps);
  363. }
  364. };
  365. popContext = function(context) {
  366. if(context) {
  367. context.removeYourself();
  368. }
  369. };
  370. /* Convert a string to a valid smalltalk selector.
  371. if you modify the following functions, also change String>>asSelector
  372. accordingly */
  373. st.convertSelector = function(selector) {
  374. if(selector.match(/__/)) {
  375. return convertBinarySelector(selector);
  376. } else {
  377. return convertKeywordSelector(selector);
  378. }
  379. };
  380. function convertKeywordSelector(selector) {
  381. return selector.replace(/^_/, '').replace(/_/g, ':');
  382. };
  383. function convertBinarySelector(selector) {
  384. return selector
  385. .replace(/^_/, '')
  386. .replace(/_plus/, '+')
  387. .replace(/_minus/, '-')
  388. .replace(/_star/, '*')
  389. .replace(/_slash/, '/')
  390. .replace(/_gt/, '>')
  391. .replace(/_lt/, '<')
  392. .replace(/_eq/, '=')
  393. .replace(/_comma/, ',')
  394. .replace(/_at/, '@')
  395. };
  396. /* Converts a JavaScript object to valid Smalltalk Object */
  397. st.readJSObject = function(js) {
  398. var object = js;
  399. var readObject = (js.constructor === Object);
  400. var readArray = (js.constructor === Array);
  401. if(readObject) {
  402. object = smalltalk.Dictionary._new();
  403. }
  404. for(var i in js) {
  405. if(readObject) {
  406. object._at_put_(i, st.readJSObject(js[i]));
  407. }
  408. if(readArray) {
  409. object[i] = st.readJSObject(js[i]);
  410. }
  411. }
  412. return object;
  413. };
  414. /* Toggle deployment mode (no context will be handled during message send */
  415. st.setDeploymentMode = function() {
  416. st.send = sendWithoutContext;
  417. };
  418. st.setDevelopmentMode = function() {
  419. st.send = sendWithContext;
  420. }
  421. /* Set development mode by default */
  422. st.setDevelopmentMode();
  423. }
  424. function SmalltalkMethodContext(receiver, selector, temps, home) {
  425. var that = this;
  426. that.receiver = receiver;
  427. that.selector = selector;
  428. that.temps = temps || {};
  429. that.homeContext = home;
  430. that.copy = function() {
  431. var home = that.homeContext;
  432. if(home) {home = home.copy()}
  433. return new SmalltalkMethodContext(
  434. that.receiver,
  435. that.selector,
  436. that.temps,
  437. home
  438. );
  439. }
  440. that.newContext = function(receiver, selector, temps) {
  441. var c = smalltalk.oldContexts.pop();
  442. if(c) {
  443. c.homeContext = that;
  444. c.receiver = receiver;
  445. c.selector = selector;
  446. c.temps = temps || {};
  447. } else {
  448. c = new SmalltalkMethodContext(receiver, selector, temps, that);
  449. }
  450. return c;
  451. }
  452. that.removeYourself = function() {
  453. smalltalk.thisContext = that.homeContext;
  454. that.homeContext = undefined;
  455. smalltalk.oldContexts.push(that);
  456. }
  457. }
  458. /* Global Smalltalk objects. */
  459. var nil = new SmalltalkNil();
  460. var smalltalk = new Smalltalk();
  461. if(this.jQuery) {
  462. this.jQuery.allowJavaScriptCalls = true;
  463. }
  464. /****************************************************************************************/
  465. /* Base classes mapping. If you edit this part, do not forget to set the superclass of the
  466. object metaclass to Class after the definition of Object */
  467. smalltalk.mapClassName("Object", "Kernel", SmalltalkObject);
  468. smalltalk.mapClassName("Smalltalk", "Kernel", Smalltalk, smalltalk.Object);
  469. smalltalk.mapClassName("Package", "Kernel", SmalltalkPackage, smalltalk.Object);
  470. smalltalk.mapClassName("Behavior", "Kernel", SmalltalkBehavior, smalltalk.Object);
  471. smalltalk.mapClassName("Class", "Kernel", SmalltalkClass, smalltalk.Behavior);
  472. smalltalk.mapClassName("Metaclass", "Kernel", SmalltalkMetaclass, smalltalk.Behavior);
  473. smalltalk.mapClassName("CompiledMethod", "Kernel", SmalltalkMethod, smalltalk.Object);
  474. smalltalk.Object.klass.superclass = smalltalk.Class;
  475. smalltalk.mapClassName("Number", "Kernel", Number, smalltalk.Object);
  476. smalltalk.mapClassName("BlockClosure", "Kernel", Function, smalltalk.Object);
  477. smalltalk.mapClassName("Boolean", "Kernel", Boolean, smalltalk.Object);
  478. smalltalk.mapClassName("Date", "Kernel", Date, smalltalk.Object);
  479. smalltalk.mapClassName("UndefinedObject", "Kernel", SmalltalkNil, smalltalk.Object);
  480. smalltalk.mapClassName("Collection", "Kernel", null, smalltalk.Object);
  481. smalltalk.mapClassName("SequenceableCollection", "Kernel", null, smalltalk.Collection);
  482. smalltalk.mapClassName("CharacterArray", "Kernel", null, smalltalk.SequenceableCollection);
  483. smalltalk.mapClassName("String", "Kernel", String, smalltalk.CharacterArray);
  484. smalltalk.mapClassName("Symbol", "Kernel", SmalltalkSymbol, smalltalk.CharacterArray);
  485. smalltalk.mapClassName("Array", "Kernel", Array, smalltalk.SequenceableCollection);
  486. smalltalk.mapClassName("RegularExpression", "Kernel", RegExp, smalltalk.String);
  487. smalltalk.mapClassName("Error", "Kernel", Error, smalltalk.Object);
  488. smalltalk.mapClassName("MethodContext", "Kernel", SmalltalkMethodContext, smalltalk.Object);
  489. smalltalk.addPackage('Kernel-Objects', {});
  490. smalltalk.addClass('Object', smalltalk.nil, [], 'Kernel-Objects');
  491. smalltalk.Object.comment=unescape('*Object%20is%20the%20root%20of%20the%20Smalltalk%20class%20system*.%20All%20classes%20in%20the%20system%20are%20subclasses%20of%20Object.%0A%0AObject%20provides%20default%20behavior%20common%20to%20all%20normal%20objects%2C%20such%20as%3A%20%0A%0A-%20access%0A-%20copying%0A-%20comparison%0A-%20error%20handling%0A-%20message%20sending%0A-%20reflection%0A%0AAlso%20utility%20messages%20that%20all%20objects%20should%20respond%20to%20are%20defined%20here.%0A%0AObject%20has%20no%20instance%20variable.%0A%0A%23%23Access%0A%0AInstance%20variables%20can%20be%20accessed%20with%20%60%23instVarAt%3A%60%20and%20%60%23instVarAt%3Aput%3A%60.%20%60Object%20%3E%3E%20instanceVariableNames%60%20answers%20a%20collection%20of%20all%20instance%20variable%20names.%0AAccessing%20JavaScript%20properties%20of%20an%20object%20is%20done%20through%20%60%23basicAt%3A%60%2C%20%60%23basicAt%3Aput%3A%60%20and%20%60basicDelete%3A%60.%0A%0A%23%23Copying%0A%0ACopying%20an%20object%20is%20handled%20by%20%60%23copy%60%20and%20%60%23deepCopy%60.%20The%20first%20one%20performs%20a%20shallow%20copy%20of%20the%20receiver%2C%20while%20the%20second%20one%20performs%20a%20deep%20copy.%0AThe%20hook%20method%20%60%23postCopy%60%20can%20be%20overriden%20in%20subclasses%20to%20copy%20fields%20as%20necessary%20to%20complete%20the%20full%20copy.%20It%20will%20be%20sent%20by%20the%20copy%20of%20the%20receiver.%0A%0A%23%23Comparison%0A%0AObjects%20understand%20equality%20%20%60%23%3D%60%20and%20identity%20%60%23%3D%3D%60%20comparison.%0A%0A%23%23Error%20handling%0A%0A-%20%60%23halt%60%20is%20the%20typical%20message%20to%20use%20for%20inserting%20breakpoints%20during%20debugging.%0A-%20%60%23error%3A%60%20throws%20a%20generic%20error%20exception%0A-%20%60%23doesNotUnderstand%3A%60%20handles%20the%20fact%20that%20there%20was%20an%20attempt%20to%20send%20the%20given%20message%20to%20the%20receiver%20but%20the%20receiver%20does%20not%20understand%20this%20message.%0A%20%20Overriding%20this%20message%20can%20be%20useful%20to%20implement%20proxies%20for%20example.')
  492. smalltalk.addMethod(
  493. unescape('__eq'),
  494. smalltalk.method({
  495. selector: unescape('%3D'),
  496. category: 'comparing',
  497. fn: function (anObject){
  498. var self=this;
  499. return smalltalk.send(self, "__eq_eq", [anObject]);
  500. return self;},
  501. args: ["anObject"],
  502. source: unescape('%3D%20anObject%0A%09%5Eself%20%3D%3D%20anObject'),
  503. messageSends: [unescape("%3D%3D")],
  504. referencedClasses: []
  505. }),
  506. smalltalk.Object);
  507. smalltalk.addMethod(
  508. unescape('_%7E_eq'),
  509. smalltalk.method({
  510. selector: unescape('%7E%3D'),
  511. category: 'comparing',
  512. fn: function (anObject){
  513. var self=this;
  514. return smalltalk.send(smalltalk.send(self, "__eq", [anObject]), "__eq", [false]);
  515. return self;},
  516. args: ["anObject"],
  517. source: unescape('%7E%3D%20anObject%0A%09%5E%28self%20%3D%20anObject%29%20%3D%20false'),
  518. messageSends: [unescape("%3D")],
  519. referencedClasses: []
  520. }),
  521. smalltalk.Object);
  522. smalltalk.addMethod(
  523. unescape('_initialize'),
  524. smalltalk.method({
  525. selector: unescape('initialize'),
  526. category: 'initialization',
  527. fn: function (){
  528. var self=this;
  529. return self;},
  530. args: [],
  531. source: unescape('initialize'),
  532. messageSends: [],
  533. referencedClasses: []
  534. }),
  535. smalltalk.Object);
  536. smalltalk.addMethod(
  537. unescape('_yourself'),
  538. smalltalk.method({
  539. selector: unescape('yourself'),
  540. category: 'accessing',
  541. fn: function (){
  542. var self=this;
  543. return self;
  544. return self;},
  545. args: [],
  546. source: unescape('yourself%0A%09%5Eself'),
  547. messageSends: [],
  548. referencedClasses: []
  549. }),
  550. smalltalk.Object);
  551. smalltalk.addMethod(
  552. unescape('_class'),
  553. smalltalk.method({
  554. selector: unescape('class'),
  555. category: 'accessing',
  556. fn: function (){
  557. var self=this;
  558. return self.klass;
  559. return self;},
  560. args: [],
  561. source: unescape('class%0A%09%3Creturn%20self.klass%3E'),
  562. messageSends: [],
  563. referencedClasses: []
  564. }),
  565. smalltalk.Object);
  566. smalltalk.addMethod(
  567. unescape('_size'),
  568. smalltalk.method({
  569. selector: unescape('size'),
  570. category: 'accessing',
  571. fn: function (){
  572. var self=this;
  573. smalltalk.send(self, "_error_", ["Object not indexable"]);
  574. return self;},
  575. args: [],
  576. source: unescape('size%0A%09self%20error%3A%20%27Object%20not%20indexable%27'),
  577. messageSends: ["error:"],
  578. referencedClasses: []
  579. }),
  580. smalltalk.Object);
  581. smalltalk.addMethod(
  582. unescape('_copy'),
  583. smalltalk.method({
  584. selector: unescape('copy'),
  585. category: 'copying',
  586. fn: function (){
  587. var self=this;
  588. return smalltalk.send(smalltalk.send(self, "_shallowCopy", []), "_postCopy", []);
  589. return self;},
  590. args: [],
  591. source: unescape('copy%0A%09%5Eself%20shallowCopy%20postCopy'),
  592. messageSends: ["postCopy", "shallowCopy"],
  593. referencedClasses: []
  594. }),
  595. smalltalk.Object);
  596. smalltalk.addMethod(
  597. unescape('_shallowCopy'),
  598. smalltalk.method({
  599. selector: unescape('shallowCopy'),
  600. category: 'copying',
  601. fn: function (){
  602. var self=this;
  603. var copy = self.klass._new();
  604. for(var i in self) {
  605. if(/^@.+/.test(i)) {
  606. copy[i] = self[i];
  607. }
  608. }
  609. return copy;
  610. ;
  611. return self;},
  612. args: [],
  613. 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'),
  614. messageSends: [],
  615. referencedClasses: []
  616. }),
  617. smalltalk.Object);
  618. smalltalk.addMethod(
  619. unescape('_deepCopy'),
  620. smalltalk.method({
  621. selector: unescape('deepCopy'),
  622. category: 'copying',
  623. fn: function (){
  624. var self=this;
  625. var copy = self.klass._new();
  626. for(var i in self) {
  627. if(/^@.+/.test(i)) {
  628. copy[i] = self[i]._deepCopy();
  629. }
  630. }
  631. return copy;
  632. ;
  633. return self;},
  634. args: [],
  635. 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'),
  636. messageSends: [],
  637. referencedClasses: []
  638. }),
  639. smalltalk.Object);
  640. smalltalk.addMethod(
  641. unescape('_postCopy'),
  642. smalltalk.method({
  643. selector: unescape('postCopy'),
  644. category: 'copying',
  645. fn: function (){
  646. var self=this;
  647. return self;},
  648. args: [],
  649. source: unescape('postCopy'),
  650. messageSends: [],
  651. referencedClasses: []
  652. }),
  653. smalltalk.Object);
  654. smalltalk.addMethod(
  655. unescape('__minus_gt'),
  656. smalltalk.method({
  657. selector: unescape('-%3E'),
  658. category: 'converting',
  659. fn: function (anObject){
  660. var self=this;
  661. return smalltalk.send((smalltalk.Association || Association), "_key_value_", [self, anObject]);
  662. return self;},
  663. args: ["anObject"],
  664. source: unescape('-%3E%20anObject%0A%09%5EAssociation%20key%3A%20self%20value%3A%20anObject'),
  665. messageSends: ["key:value:"],
  666. referencedClasses: ["Association"]
  667. }),
  668. smalltalk.Object);
  669. smalltalk.addMethod(
  670. unescape('_asString'),
  671. smalltalk.method({
  672. selector: unescape('asString'),
  673. category: 'converting',
  674. fn: function (){
  675. var self=this;
  676. return smalltalk.send(self, "_printString", []);
  677. return self;},
  678. args: [],
  679. source: unescape('asString%0A%09%5Eself%20printString'),
  680. messageSends: ["printString"],
  681. referencedClasses: []
  682. }),
  683. smalltalk.Object);
  684. smalltalk.addMethod(
  685. unescape('_asJavascript'),
  686. smalltalk.method({
  687. selector: unescape('asJavascript'),
  688. category: 'converting',
  689. fn: function (){
  690. var self=this;
  691. return smalltalk.send(self, "_asString", []);
  692. return self;},
  693. args: [],
  694. source: unescape('asJavascript%0A%09%5Eself%20asString'),
  695. messageSends: ["asString"],
  696. referencedClasses: []
  697. }),
  698. smalltalk.Object);
  699. smalltalk.addMethod(
  700. unescape('_perform_'),
  701. smalltalk.method({
  702. selector: unescape('perform%3A'),
  703. category: 'message handling',
  704. fn: function (aSymbol){
  705. var self=this;
  706. return smalltalk.send(self, "_perform_withArguments_", [aSymbol, []]);
  707. return self;},
  708. args: ["aSymbol"],
  709. source: unescape('perform%3A%20aSymbol%0A%09%5Eself%20perform%3A%20aSymbol%20withArguments%3A%20%23%28%29'),
  710. messageSends: ["perform:withArguments:"],
  711. referencedClasses: []
  712. }),
  713. smalltalk.Object);
  714. smalltalk.addMethod(
  715. unescape('_perform_withArguments_'),
  716. smalltalk.method({
  717. selector: unescape('perform%3AwithArguments%3A'),
  718. category: 'message handling',
  719. fn: function (aSymbol, aCollection){
  720. var self=this;
  721. return smalltalk.send(self, "_basicPerform_withArguments_", [smalltalk.send(aSymbol, "_asSelector", []), aCollection]);
  722. return self;},
  723. args: ["aSymbol", "aCollection"],
  724. source: unescape('perform%3A%20aSymbol%20withArguments%3A%20aCollection%0A%09%5Eself%20basicPerform%3A%20aSymbol%20asSelector%20withArguments%3A%20aCollection'),
  725. messageSends: ["basicPerform:withArguments:", "asSelector"],
  726. referencedClasses: []
  727. }),
  728. smalltalk.Object);
  729. smalltalk.addMethod(
  730. unescape('_instVarAt_'),
  731. smalltalk.method({
  732. selector: unescape('instVarAt%3A'),
  733. category: 'accessing',
  734. fn: function (aSymbol){
  735. var self=this;
  736. var varname=nil;
  737. (varname=smalltalk.send(aSymbol, "_asString", []));
  738. return self['@'+varname];
  739. return self;},
  740. args: ["aSymbol"],
  741. source: unescape('instVarAt%3A%20aSymbol%0A%09%7C%20varname%20%7C%0A%09varname%20%3A%3D%20aSymbol%20asString.%0A%09%3Creturn%20self%5B%27@%27+varname%5D%3E'),
  742. messageSends: ["asString"],
  743. referencedClasses: []
  744. }),
  745. smalltalk.Object);
  746. smalltalk.addMethod(
  747. unescape('_instVarAt_put_'),
  748. smalltalk.method({
  749. selector: unescape('instVarAt%3Aput%3A'),
  750. category: 'accessing',
  751. fn: function (aSymbol, anObject){
  752. var self=this;
  753. var varname=nil;
  754. (varname=smalltalk.send(aSymbol, "_asString", []));
  755. self['@' + varname] = anObject;
  756. return self;},
  757. args: ["aSymbol", "anObject"],
  758. source: unescape('instVarAt%3A%20aSymbol%20put%3A%20anObject%0A%09%7C%20varname%20%7C%0A%09varname%20%3A%3D%20aSymbol%20asString.%0A%09%3Cself%5B%27@%27%20+%20varname%5D%20%3D%20anObject%3E'),
  759. messageSends: ["asString"],
  760. referencedClasses: []
  761. }),
  762. smalltalk.Object);
  763. smalltalk.addMethod(
  764. unescape('_basicAt_'),
  765. smalltalk.method({
  766. selector: unescape('basicAt%3A'),
  767. category: 'accessing',
  768. fn: function (aString){
  769. var self=this;
  770. return self[aString];
  771. return self;},
  772. args: ["aString"],
  773. source: unescape('basicAt%3A%20aString%0A%09%3Creturn%20self%5BaString%5D%3E'),
  774. messageSends: [],
  775. referencedClasses: []
  776. }),
  777. smalltalk.Object);
  778. smalltalk.addMethod(
  779. unescape('_basicAt_put_'),
  780. smalltalk.method({
  781. selector: unescape('basicAt%3Aput%3A'),
  782. category: 'accessing',
  783. fn: function (aString, anObject){
  784. var self=this;
  785. return self[aString] = anObject;
  786. return self;},
  787. args: ["aString", "anObject"],
  788. source: unescape('basicAt%3A%20aString%20put%3A%20anObject%0A%09%3Creturn%20self%5BaString%5D%20%3D%20anObject%3E'),
  789. messageSends: [],
  790. referencedClasses: []
  791. }),
  792. smalltalk.Object);
  793. smalltalk.addMethod(
  794. unescape('_error_'),
  795. smalltalk.method({
  796. selector: unescape('error%3A'),
  797. category: 'error handling',
  798. fn: function (aString){
  799. var self=this;
  800. smalltalk.send((smalltalk.Error || Error), "_signal_", [aString]);
  801. return self;},
  802. args: ["aString"],
  803. source: unescape('error%3A%20aString%0A%09Error%20signal%3A%20aString'),
  804. messageSends: ["signal:"],
  805. referencedClasses: ["Error"]
  806. }),
  807. smalltalk.Object);
  808. smalltalk.addMethod(
  809. unescape('_subclassResponsibility'),
  810. smalltalk.method({
  811. selector: unescape('subclassResponsibility'),
  812. category: 'error handling',
  813. fn: function (){
  814. var self=this;
  815. smalltalk.send(self, "_error_", ["This method is a responsibility of a subclass"]);
  816. return self;},
  817. args: [],
  818. source: unescape('subclassResponsibility%0A%09self%20error%3A%20%27This%20method%20is%20a%20responsibility%20of%20a%20subclass%27'),
  819. messageSends: ["error:"],
  820. referencedClasses: []
  821. }),
  822. smalltalk.Object);
  823. smalltalk.addMethod(
  824. unescape('_shouldNotImplement'),
  825. smalltalk.method({
  826. selector: unescape('shouldNotImplement'),
  827. category: 'error handling',
  828. fn: function (){
  829. var self=this;
  830. smalltalk.send(self, "_error_", [smalltalk.send("This method should not be implemented in ", "__comma", [smalltalk.send(smalltalk.send(self, "_class", []), "_name", [])])]);
  831. return self;},
  832. args: [],
  833. source: unescape('shouldNotImplement%0A%09self%20error%3A%20%27This%20method%20should%20not%20be%20implemented%20in%20%27%2C%20self%20class%20name'),
  834. messageSends: ["error:", unescape("%2C"), "name", "class"],
  835. referencedClasses: []
  836. }),
  837. smalltalk.Object);
  838. smalltalk.addMethod(
  839. unescape('_try_catch_'),
  840. smalltalk.method({
  841. selector: unescape('try%3Acatch%3A'),
  842. category: 'error handling',
  843. fn: function (aBlock, anotherBlock){
  844. var self=this;
  845. try{result = aBlock()} catch(e) {result = anotherBlock(e)};
  846. return result;;
  847. return self;},
  848. args: ["aBlock", "anotherBlock"],
  849. source: unescape('try%3A%20aBlock%20catch%3A%20anotherBlock%0A%09%3Ctry%7Bresult%20%3D%20aBlock%28%29%7D%20catch%28e%29%20%7Bresult%20%3D%20anotherBlock%28e%29%7D%3B%0A%09return%20result%3B%3E'),
  850. messageSends: [],
  851. referencedClasses: []
  852. }),
  853. smalltalk.Object);
  854. smalltalk.addMethod(
  855. unescape('_printString'),
  856. smalltalk.method({
  857. selector: unescape('printString'),
  858. category: 'printing',
  859. fn: function (){
  860. var self=this;
  861. return smalltalk.send("a ", "__comma", [smalltalk.send(smalltalk.send(self, "_class", []), "_name", [])]);
  862. return self;},
  863. args: [],
  864. source: unescape('printString%0A%09%5E%27a%20%27%2C%20self%20class%20name'),
  865. messageSends: [unescape("%2C"), "name", "class"],
  866. referencedClasses: []
  867. }),
  868. smalltalk.Object);
  869. smalltalk.addMethod(
  870. unescape('_printNl'),
  871. smalltalk.method({
  872. selector: unescape('printNl'),
  873. category: 'printing',
  874. fn: function (){
  875. var self=this;
  876. console.log(self);
  877. return self;},
  878. args: [],
  879. source: unescape('printNl%0A%09%3Cconsole.log%28self%29%3E'),
  880. messageSends: [],
  881. referencedClasses: []
  882. }),
  883. smalltalk.Object);
  884. smalltalk.addMethod(
  885. unescape('_isKindOf_'),
  886. smalltalk.method({
  887. selector: unescape('isKindOf%3A'),
  888. category: 'testing',
  889. fn: function (aClass){
  890. var self=this;
  891. 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]);})]));
  892. return self;},
  893. args: ["aClass"],
  894. 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'),
  895. messageSends: ["ifTrue:ifFalse:", "isMemberOf:", "inheritsFrom:", "class"],
  896. referencedClasses: []
  897. }),
  898. smalltalk.Object);
  899. smalltalk.addMethod(
  900. unescape('_isMemberOf_'),
  901. smalltalk.method({
  902. selector: unescape('isMemberOf%3A'),
  903. category: 'testing',
  904. fn: function (aClass){
  905. var self=this;
  906. return smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [aClass]);
  907. return self;},
  908. args: ["aClass"],
  909. source: unescape('isMemberOf%3A%20aClass%0A%09%5Eself%20class%20%3D%20aClass'),
  910. messageSends: [unescape("%3D"), "class"],
  911. referencedClasses: []
  912. }),
  913. smalltalk.Object);
  914. smalltalk.addMethod(
  915. unescape('_ifNil_'),
  916. smalltalk.method({
  917. selector: unescape('ifNil%3A'),
  918. category: 'testing',
  919. fn: function (aBlock){
  920. var self=this;
  921. return self;
  922. return self;},
  923. args: ["aBlock"],
  924. source: unescape('ifNil%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself'),
  925. messageSends: [],
  926. referencedClasses: []
  927. }),
  928. smalltalk.Object);
  929. smalltalk.addMethod(
  930. unescape('_ifNil_ifNotNil_'),
  931. smalltalk.method({
  932. selector: unescape('ifNil%3AifNotNil%3A'),
  933. category: 'testing',
  934. fn: function (aBlock, anotherBlock){
  935. var self=this;
  936. return smalltalk.send(anotherBlock, "_value", []);
  937. return self;},
  938. args: ["aBlock", "anotherBlock"],
  939. source: unescape('ifNil%3A%20aBlock%20ifNotNil%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EanotherBlock%20value'),
  940. messageSends: ["value"],
  941. referencedClasses: []
  942. }),
  943. smalltalk.Object);
  944. smalltalk.addMethod(
  945. unescape('_ifNotNil_'),
  946. smalltalk.method({
  947. selector: unescape('ifNotNil%3A'),
  948. category: 'testing',
  949. fn: function (aBlock){
  950. var self=this;
  951. return smalltalk.send(aBlock, "_value", []);
  952. return self;},
  953. args: ["aBlock"],
  954. source: unescape('ifNotNil%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EaBlock%20value'),
  955. messageSends: ["value"],
  956. referencedClasses: []
  957. }),
  958. smalltalk.Object);
  959. smalltalk.addMethod(
  960. unescape('_ifNotNil_ifNil_'),
  961. smalltalk.method({
  962. selector: unescape('ifNotNil%3AifNil%3A'),
  963. category: 'testing',
  964. fn: function (aBlock, anotherBlock){
  965. var self=this;
  966. return smalltalk.send(aBlock, "_value", []);
  967. return self;},
  968. args: ["aBlock", "anotherBlock"],
  969. source: unescape('ifNotNil%3A%20aBlock%20ifNil%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EaBlock%20value'),
  970. messageSends: ["value"],
  971. referencedClasses: []
  972. }),
  973. smalltalk.Object);
  974. smalltalk.addMethod(
  975. unescape('_isNil'),
  976. smalltalk.method({
  977. selector: unescape('isNil'),
  978. category: 'testing',
  979. fn: function (){
  980. var self=this;
  981. return false;
  982. return self;},
  983. args: [],
  984. source: unescape('isNil%0A%09%5Efalse'),
  985. messageSends: [],
  986. referencedClasses: []
  987. }),
  988. smalltalk.Object);
  989. smalltalk.addMethod(
  990. unescape('_notNil'),
  991. smalltalk.method({
  992. selector: unescape('notNil'),
  993. category: 'testing',
  994. fn: function (){
  995. var self=this;
  996. return smalltalk.send(smalltalk.send(self, "_isNil", []), "_not", []);
  997. return self;},
  998. args: [],
  999. source: unescape('notNil%0A%09%5Eself%20isNil%20not'),
  1000. messageSends: ["not", "isNil"],
  1001. referencedClasses: []
  1002. }),
  1003. smalltalk.Object);
  1004. smalltalk.addMethod(
  1005. unescape('_isClass'),
  1006. smalltalk.method({
  1007. selector: unescape('isClass'),
  1008. category: 'testing',
  1009. fn: function (){
  1010. var self=this;
  1011. return false;
  1012. return self;},
  1013. args: [],
  1014. source: unescape('isClass%0A%09%5Efalse'),
  1015. messageSends: [],
  1016. referencedClasses: []
  1017. }),
  1018. smalltalk.Object);
  1019. smalltalk.addMethod(
  1020. unescape('_isMetaclass'),
  1021. smalltalk.method({
  1022. selector: unescape('isMetaclass'),
  1023. category: 'testing',
  1024. fn: function (){
  1025. var self=this;
  1026. return false;
  1027. return self;},
  1028. args: [],
  1029. source: unescape('isMetaclass%0A%09%5Efalse'),
  1030. messageSends: [],
  1031. referencedClasses: []
  1032. }),
  1033. smalltalk.Object);
  1034. smalltalk.addMethod(
  1035. unescape('_isNumber'),
  1036. smalltalk.method({
  1037. selector: unescape('isNumber'),
  1038. category: 'testing',
  1039. fn: function (){
  1040. var self=this;
  1041. return false;
  1042. return self;},
  1043. args: [],
  1044. source: unescape('isNumber%0A%09%5Efalse'),
  1045. messageSends: [],
  1046. referencedClasses: []
  1047. }),
  1048. smalltalk.Object);
  1049. smalltalk.addMethod(
  1050. unescape('_isString'),
  1051. smalltalk.method({
  1052. selector: unescape('isString'),
  1053. category: 'testing',
  1054. fn: function (){
  1055. var self=this;
  1056. return false;
  1057. return self;},
  1058. args: [],
  1059. source: unescape('isString%0A%09%5Efalse'),
  1060. messageSends: [],
  1061. referencedClasses: []
  1062. }),
  1063. smalltalk.Object);
  1064. smalltalk.addMethod(
  1065. unescape('_isParseFailure'),
  1066. smalltalk.method({
  1067. selector: unescape('isParseFailure'),
  1068. category: 'testing',
  1069. fn: function (){
  1070. var self=this;
  1071. return false;
  1072. return self;},
  1073. args: [],
  1074. source: unescape('isParseFailure%0A%09%5Efalse'),
  1075. messageSends: [],
  1076. referencedClasses: []
  1077. }),
  1078. smalltalk.Object);
  1079. smalltalk.addMethod(
  1080. unescape('_basicPerform_'),
  1081. smalltalk.method({
  1082. selector: unescape('basicPerform%3A'),
  1083. category: 'message handling',
  1084. fn: function (aSymbol){
  1085. var self=this;
  1086. return smalltalk.send(self, "_basicPerform_withArguments_", [aSymbol, []]);
  1087. return self;},
  1088. args: ["aSymbol"],
  1089. source: unescape('basicPerform%3A%20aSymbol%20%0A%09%5Eself%20basicPerform%3A%20aSymbol%20withArguments%3A%20%23%28%29'),
  1090. messageSends: ["basicPerform:withArguments:"],
  1091. referencedClasses: []
  1092. }),
  1093. smalltalk.Object);
  1094. smalltalk.addMethod(
  1095. unescape('_basicPerform_withArguments_'),
  1096. smalltalk.method({
  1097. selector: unescape('basicPerform%3AwithArguments%3A'),
  1098. category: 'message handling',
  1099. fn: function (aSymbol, aCollection){
  1100. var self=this;
  1101. return self[aSymbol].apply(self, aCollection);;
  1102. return self;},
  1103. args: ["aSymbol", "aCollection"],
  1104. source: unescape('basicPerform%3A%20aSymbol%20withArguments%3A%20aCollection%0A%09%3Creturn%20self%5BaSymbol%5D.apply%28self%2C%20aCollection%29%3B%3E'),
  1105. messageSends: [],
  1106. referencedClasses: []
  1107. }),
  1108. smalltalk.Object);
  1109. smalltalk.addMethod(
  1110. unescape('_basicDelete_'),
  1111. smalltalk.method({
  1112. selector: unescape('basicDelete%3A'),
  1113. category: 'accessing',
  1114. fn: function (aString){
  1115. var self=this;
  1116. delete self[aString]; return aString;
  1117. return self;},
  1118. args: ["aString"],
  1119. source: unescape('basicDelete%3A%20aString%0A%20%20%20%20%3Cdelete%20self%5BaString%5D%3B%20return%20aString%3E'),
  1120. messageSends: [],
  1121. referencedClasses: []
  1122. }),
  1123. smalltalk.Object);
  1124. smalltalk.addMethod(
  1125. unescape('_doesNotUnderstand_'),
  1126. smalltalk.method({
  1127. selector: unescape('doesNotUnderstand%3A'),
  1128. category: 'error handling',
  1129. fn: function (aMessage){
  1130. var self=this;
  1131. (function($rec){smalltalk.send($rec, "_receiver_", [self]);smalltalk.send($rec, "_message_", [aMessage]);return smalltalk.send($rec, "_signal", []);})(smalltalk.send((smalltalk.MessageNotUnderstood || MessageNotUnderstood), "_new", []));
  1132. return self;},
  1133. args: ["aMessage"],
  1134. source: unescape('doesNotUnderstand%3A%20aMessage%0A%09MessageNotUnderstood%20new%0A%09%09receiver%3A%20self%3B%0A%09%09message%3A%20aMessage%3B%0A%09%09signal'),
  1135. messageSends: ["receiver:", "message:", "signal", "new"],
  1136. referencedClasses: ["MessageNotUnderstood"]
  1137. }),
  1138. smalltalk.Object);
  1139. smalltalk.addMethod(
  1140. unescape('_asJSON'),
  1141. smalltalk.method({
  1142. selector: unescape('asJSON'),
  1143. category: 'converting',
  1144. fn: function (){
  1145. var self=this;
  1146. return smalltalk.send((smalltalk.JSON || JSON), "_parse_", [smalltalk.send(self, "_asJSONString", [])]);
  1147. return self;},
  1148. args: [],
  1149. source: unescape('asJSON%0A%09%5EJSON%20parse%3A%20self%20asJSONString'),
  1150. messageSends: ["parse:", "asJSONString"],
  1151. referencedClasses: ["JSON"]
  1152. }),
  1153. smalltalk.Object);
  1154. smalltalk.addMethod(
  1155. unescape('_halt'),
  1156. smalltalk.method({
  1157. selector: unescape('halt'),
  1158. category: 'error handling',
  1159. fn: function (){
  1160. var self=this;
  1161. smalltalk.send(self, "_error_", ["Halt encountered"]);
  1162. return self;},
  1163. args: [],
  1164. source: unescape('halt%0A%09self%20error%3A%20%27Halt%20encountered%27'),
  1165. messageSends: ["error:"],
  1166. referencedClasses: []
  1167. }),
  1168. smalltalk.Object);
  1169. smalltalk.addMethod(
  1170. unescape('_log_block_'),
  1171. smalltalk.method({
  1172. selector: unescape('log%3Ablock%3A'),
  1173. category: 'printing',
  1174. fn: function (aString, aBlock){
  1175. var self=this;
  1176. var result=nil;
  1177. smalltalk.send((typeof console == 'undefined' ? nil : console), "_log_", [smalltalk.send(smalltalk.send(aString, "__comma", [" time: "]), "__comma", [smalltalk.send(smalltalk.send((smalltalk.Date || Date), "_millisecondsToRun_", [(function(){return (result=smalltalk.send(aBlock, "_value", []));})]), "_printString", [])])]);
  1178. return result;
  1179. return self;},
  1180. args: ["aString", "aBlock"],
  1181. source: unescape('log%3A%20aString%20block%3A%20aBlock%0A%0A%09%7C%20result%20%7C%0A%09console%20log%3A%20%20aString%2C%20%20%27%20time%3A%20%27%2C%20%28Date%20millisecondsToRun%3A%20%5Bresult%20%3A%3D%20aBlock%20value%5D%29%20printString.%0A%09%5Eresult'),
  1182. messageSends: ["log:", unescape("%2C"), "printString", "millisecondsToRun:", "value"],
  1183. referencedClasses: ["Date"]
  1184. }),
  1185. smalltalk.Object);
  1186. smalltalk.addMethod(
  1187. unescape('__eq_eq'),
  1188. smalltalk.method({
  1189. selector: unescape('%3D%3D'),
  1190. category: 'comparing',
  1191. fn: function (anObject){
  1192. var self=this;
  1193. return smalltalk.send(smalltalk.send(self, "_identityHash", []), "__eq", [smalltalk.send(anObject, "_identityHash", [])]);
  1194. return self;},
  1195. args: ["anObject"],
  1196. source: unescape('%3D%3D%20anObject%0A%09%5Eself%20identityHash%20%3D%20anObject%20identityHash'),
  1197. messageSends: [unescape("%3D"), "identityHash"],
  1198. referencedClasses: []
  1199. }),
  1200. smalltalk.Object);
  1201. smalltalk.addMethod(
  1202. unescape('_%7E%7E'),
  1203. smalltalk.method({
  1204. selector: unescape('%7E%7E'),
  1205. category: 'comparing',
  1206. fn: function (anObject){
  1207. var self=this;
  1208. return smalltalk.send(smalltalk.send(self, "__eq_eq", [anObject]), "__eq", [false]);
  1209. return self;},
  1210. args: ["anObject"],
  1211. source: unescape('%7E%7E%20anObject%0A%09%5E%28self%20%3D%3D%20anObject%29%20%3D%20false'),
  1212. messageSends: [unescape("%3D"), unescape("%3D%3D")],
  1213. referencedClasses: []
  1214. }),
  1215. smalltalk.Object);
  1216. smalltalk.addMethod(
  1217. unescape('_deprecatedAPI'),
  1218. smalltalk.method({
  1219. selector: unescape('deprecatedAPI'),
  1220. category: 'error handling',
  1221. fn: function (){
  1222. var self=this;
  1223. smalltalk.send((typeof console == 'undefined' ? nil : console), "_warn_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.getThisContext()), "_home", []), "_asString", []), "__comma", [unescape("%20is%20deprecated%21%20%28in%20")]), "__comma", [smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.getThisContext()), "_home", []), "_home", []), "_asString", [])]), "__comma", [unescape("%29")])]);
  1224. return self;},
  1225. args: [],
  1226. source: unescape('deprecatedAPI%0A%09%22Just%20a%20simple%20way%20to%20deprecate%20methods.%0A%09%23deprecatedAPI%20is%20in%20the%20%27error%20handling%27%20protocol%20even%20if%20it%20doesn%27t%20throw%20an%20error%2C%0A%09but%20it%20could%20in%20the%20future.%22%0A%09console%20warn%3A%20thisContext%20home%20asString%2C%20%27%20is%20deprecated%21%20%28in%20%27%2C%20thisContext%20home%20home%20asString%2C%20%27%29%27'),
  1227. messageSends: ["warn:", unescape("%2C"), "asString", "home"],
  1228. referencedClasses: []
  1229. }),
  1230. smalltalk.Object);
  1231. smalltalk.addMethod(
  1232. unescape('_storeString'),
  1233. smalltalk.method({
  1234. selector: unescape('storeString'),
  1235. category: 'printing',
  1236. fn: function (){
  1237. var self=this;
  1238. return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(s){return smalltalk.send(self, "_storeOn_", [s]);})]);
  1239. return self;},
  1240. args: [],
  1241. source: unescape('storeString%0A%09%22Answer%20a%20String%20representation%20of%20the%20receiver%20from%20which%20the%20receiver%20%0A%09can%20be%20reconstructed.%22%0A%0A%09%5E%20String%20streamContents%3A%20%5B%3As%20%7C%20self%20storeOn%3A%20s%5D'),
  1242. messageSends: ["streamContents:", "storeOn:"],
  1243. referencedClasses: ["String"]
  1244. }),
  1245. smalltalk.Object);
  1246. smalltalk.addMethod(
  1247. unescape('_storeOn_'),
  1248. smalltalk.method({
  1249. selector: unescape('storeOn%3A'),
  1250. category: 'printing',
  1251. fn: function (aStream){
  1252. var self=this;
  1253. smalltalk.send(aStream, "_nextPutAll_", [smalltalk.send(self, "_printString", [])]);
  1254. return self;},
  1255. args: ["aStream"],
  1256. source: unescape('storeOn%3A%20aStream%0A%09aStream%20nextPutAll%3A%20self%20printString'),
  1257. messageSends: ["nextPutAll:", "printString"],
  1258. referencedClasses: []
  1259. }),
  1260. smalltalk.Object);
  1261. smalltalk.addMethod(
  1262. unescape('_asJSONString'),
  1263. smalltalk.method({
  1264. selector: unescape('asJSONString'),
  1265. category: 'converting',
  1266. fn: function (){
  1267. var self=this;
  1268. return smalltalk.send((smalltalk.JSON || JSON), "_stringify_", [self]);
  1269. return self;},
  1270. args: [],
  1271. source: unescape('asJSONString%0A%09%5EJSON%20stringify%3A%20self'),
  1272. messageSends: ["stringify:"],
  1273. referencedClasses: ["JSON"]
  1274. }),
  1275. smalltalk.Object);
  1276. smalltalk.addMethod(
  1277. unescape('_identityHash'),
  1278. smalltalk.method({
  1279. selector: unescape('identityHash'),
  1280. category: 'accessing',
  1281. fn: function (){
  1282. var self=this;
  1283. return self.identityHash || (self.identityHash = smalltalk.nextId());;
  1284. return self;},
  1285. args: [],
  1286. source: unescape('identityHash%0A%09%3Creturn%20self.identityHash%20%7C%7C%20%28self.identityHash%20%3D%20smalltalk.nextId%28%29%29%3B%3E'),
  1287. messageSends: [],
  1288. referencedClasses: []
  1289. }),
  1290. smalltalk.Object);
  1291. smalltalk.addMethod(
  1292. unescape('_isSymbol'),
  1293. smalltalk.method({
  1294. selector: unescape('isSymbol'),
  1295. category: 'testing',
  1296. fn: function (){
  1297. var self=this;
  1298. return false;
  1299. return self;},
  1300. args: [],
  1301. source: unescape('isSymbol%0A%09%5Efalse'),
  1302. messageSends: [],
  1303. referencedClasses: []
  1304. }),
  1305. smalltalk.Object);
  1306. smalltalk.addMethod(
  1307. unescape('_initialize'),
  1308. smalltalk.method({
  1309. selector: unescape('initialize'),
  1310. category: 'initialization',
  1311. fn: function (){
  1312. var self=this;
  1313. return self;},
  1314. args: [],
  1315. source: unescape('initialize%0A%09%22no%20op%22'),
  1316. messageSends: [],
  1317. referencedClasses: []
  1318. }),
  1319. smalltalk.Object.klass);
  1320. smalltalk.addClass('Smalltalk', smalltalk.Object, [], 'Kernel-Objects');
  1321. smalltalk.Smalltalk.comment=unescape('Smalltalk%20has%20only%20one%20instance%2C%20accessed%20with%20%60Smalltalk%20current%60.%20%0AIt%20represents%20the%20global%20JavaScript%20variable%20%60smalltalk%60%20declared%20in%20%60js/boot.js%60.%0A%0AThe%20%60smalltalk%60%20object%20holds%20all%20class%20and%20packages%20defined%20in%20the%20system.%0A%0A%23%23%20Classes%0A%0AClasses%20can%20be%20accessed%20using%20the%20following%20methods%3A%0A%0A-%20%60%23classes%60%20answers%20the%20full%20list%20of%20Smalltalk%20classes%20in%20the%20system%0A-%20%60%23at%3A%60%20answers%20a%20specific%20class%20of%20%60nil%60%0A%0A%23%23%20Packages%0A%0APackages%20can%20be%20accessed%20using%20the%20following%20methods%3A%0A%0A-%20%60%23packages%60%20answers%20the%20full%20list%20of%20packages%0A-%20%60%23packageAt%3A%60%20answers%20a%20specific%20class%20of%20%60nil%60%0A%0A__note%3A__%20classes%20and%20packages%20are%20accessed%20using%20strings%2C%20not%20symbols%0A%0A%23%23%20Parsing%0A%0AThe%20%60%23parse%3A%60%20method%20is%20used%20to%20parse%20Smalltalk%20source%20code.%20%0AIt%20requires%20the%20%60Compiler%60%20package%20and%20the%20%60js/parser.js%60%20parser%20file%20in%20order%20to%20work')
  1322. smalltalk.addMethod(
  1323. unescape('_classes'),
  1324. smalltalk.method({
  1325. selector: unescape('classes'),
  1326. category: 'accessing',
  1327. fn: function (){
  1328. var self=this;
  1329. return self.classes();
  1330. return self;},
  1331. args: [],
  1332. source: unescape('classes%0A%09%3Creturn%20self.classes%28%29%3E'),
  1333. messageSends: [],
  1334. referencedClasses: []
  1335. }),
  1336. smalltalk.Smalltalk);
  1337. smalltalk.addMethod(
  1338. unescape('_at_'),
  1339. smalltalk.method({
  1340. selector: unescape('at%3A'),
  1341. category: 'accessing',
  1342. fn: function (aString){
  1343. var self=this;
  1344. return self[aString];
  1345. return self;},
  1346. args: ["aString"],
  1347. source: unescape('at%3A%20aString%0A%09%3Creturn%20self%5BaString%5D%3E'),
  1348. messageSends: [],
  1349. referencedClasses: []
  1350. }),
  1351. smalltalk.Smalltalk);
  1352. smalltalk.addMethod(
  1353. unescape('_removeClass_'),
  1354. smalltalk.method({
  1355. selector: unescape('removeClass%3A'),
  1356. category: 'classes',
  1357. fn: function (aClass){
  1358. var self=this;
  1359. ((($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")])]);})]));
  1360. smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_methodDictionary", []), "_values", []), "_do_", [(function(each){return smalltalk.send(aClass, "_removeCompiledMethod_", [each]);})]);
  1361. smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_methodDictionary", []), "_values", []), "_do_", [(function(each){return smalltalk.send(smalltalk.send(aClass, "_class", []), "_removeCompiledMethod_", [each]);})]);
  1362. smalltalk.send(self, "_basicDelete_", [smalltalk.send(aClass, "_name", [])]);
  1363. return self;},
  1364. args: ["aClass"],
  1365. 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'),
  1366. messageSends: ["ifTrue:", "isMetaclass", "error:", unescape("%2C"), "asString", "do:", "values", "methodDictionary", "removeCompiledMethod:", "class", "basicDelete:", "name"],
  1367. referencedClasses: []
  1368. }),
  1369. smalltalk.Smalltalk);
  1370. smalltalk.addMethod(
  1371. unescape('_basicParse_'),
  1372. smalltalk.method({
  1373. selector: unescape('basicParse%3A'),
  1374. category: 'accessing',
  1375. fn: function (aString){
  1376. var self=this;
  1377. return smalltalk.parser.parse(aString);
  1378. return self;},
  1379. args: ["aString"],
  1380. source: unescape('basicParse%3A%20aString%0A%09%3Creturn%20smalltalk.parser.parse%28aString%29%3E'),
  1381. messageSends: [],
  1382. referencedClasses: []
  1383. }),
  1384. smalltalk.Smalltalk);
  1385. smalltalk.addMethod(
  1386. unescape('_parse_'),
  1387. smalltalk.method({
  1388. selector: unescape('parse%3A'),
  1389. category: 'accessing',
  1390. fn: function (aString){
  1391. var self=this;
  1392. var result=nil;
  1393. smalltalk.send(self, "_try_catch_", [(function(){return (result=smalltalk.send(self, "_basicParse_", [aString]));}), (function(ex){return smalltalk.send(smalltalk.send(self, "_parseError_parsing_", [ex, aString]), "_signal", []);})]);
  1394. return result;
  1395. return self;},
  1396. args: ["aString"],
  1397. source: unescape('parse%3A%20aString%0A%09%7C%20result%20%7C%20%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%20parsing%3A%20aString%29%20signal%5D.%0A%09%5Eresult'),
  1398. messageSends: ["try:catch:", "basicParse:", "signal", "parseError:parsing:"],
  1399. referencedClasses: []
  1400. }),
  1401. smalltalk.Smalltalk);
  1402. smalltalk.addMethod(
  1403. unescape('_parseError_parsing_'),
  1404. smalltalk.method({
  1405. selector: unescape('parseError%3Aparsing%3A'),
  1406. category: 'accessing',
  1407. fn: function (anException, aString){
  1408. var self=this;
  1409. var row=nil;
  1410. var col=nil;
  1411. var message=nil;
  1412. var lines=nil;
  1413. var badLine=nil;
  1414. var code=nil;
  1415. row = anException.line;
  1416. col = anException.column;
  1417. message = anException.message;;
  1418. (lines=smalltalk.send(aString, "_lines", []));
  1419. (badLine=smalltalk.send(lines, "_at_", [row]));
  1420. (badLine=smalltalk.send(smalltalk.send(smalltalk.send(badLine, "_copyFrom_to_", [(1), ((($receiver = col).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)]))]), "__comma", [unescape("%20%3D%3D%3D%3E")]), "__comma", [smalltalk.send(badLine, "_copyFrom_to_", [col, smalltalk.send(badLine, "_size", [])])]));
  1421. smalltalk.send(lines, "_at_put_", [row, badLine]);
  1422. (code=smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(s){return smalltalk.send(lines, "_withIndexDo_", [(function(l, i){return smalltalk.send(s, "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(i, "_asString", []), "__comma", [": "]), "__comma", [l]), "__comma", [smalltalk.send((smalltalk.String || String), "_lf", [])])]);})]);})]));
  1423. return smalltalk.send(smalltalk.send((smalltalk.Error || Error), "_new", []), "_messageText_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("Parse error on line ", "__comma", [row]), "__comma", [" column "]), "__comma", [col]), "__comma", [" : "]), "__comma", [message]), "__comma", [unescape("%20Below%20is%20code%20with%20line%20numbers%20and%20%3D%3D%3D%3E%20marker%20inserted%3A")]), "__comma", [smalltalk.send((smalltalk.String || String), "_lf", [])]), "__comma", [code])]);
  1424. return self;},
  1425. args: ["anException", "aString"],
  1426. source: unescape('parseError%3A%20anException%20parsing%3A%20aString%0A%09%7C%20row%20col%20message%20lines%20badLine%20code%20%7C%0A%09%3Crow%20%3D%20anException.line%3B%0A%09col%20%3D%20anException.column%3B%0A%09message%20%3D%20anException.message%3B%3E.%0A%09lines%20%3A%3D%20aString%20lines.%0A%09badLine%20%3A%3D%20lines%20at%3A%20row.%0A%09badLine%20%3A%3D%20%28badLine%20copyFrom%3A%201%20to%3A%20col%20-%201%29%2C%20%27%20%3D%3D%3D%3E%27%2C%20%28badLine%20copyFrom%3A%20%20col%20to%3A%20badLine%20size%29.%0A%09lines%20at%3A%20row%20put%3A%20badLine.%0A%09code%20%3A%3D%20String%20streamContents%3A%20%5B%3As%20%7C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20lines%20withIndexDo%3A%20%5B%3Al%20%3Ai%20%7C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20s%20nextPutAll%3A%20i%20asString%2C%20%27%3A%20%27%2C%20l%2C%20String%20lf%5D%5D.%0A%09%5E%20Error%20new%20messageText%3A%20%28%27Parse%20error%20on%20line%20%27%20%2C%20row%20%2C%20%27%20column%20%27%20%2C%20col%20%2C%20%27%20%3A%20%27%20%2C%20message%20%2C%20%27%20Below%20is%20code%20with%20line%20numbers%20and%20%3D%3D%3D%3E%20marker%20inserted%3A%27%20%2C%20String%20lf%2C%20code%29'),
  1427. messageSends: ["lines", "at:", unescape("%2C"), "copyFrom:to:", unescape("-"), "size", "at:put:", "streamContents:", "withIndexDo:", "nextPutAll:", "asString", "lf", "messageText:", "new"],
  1428. referencedClasses: ["String", "Error"]
  1429. }),
  1430. smalltalk.Smalltalk);
  1431. smalltalk.addMethod(
  1432. unescape('_packages'),
  1433. smalltalk.method({
  1434. selector: unescape('packages'),
  1435. category: 'packages',
  1436. fn: function (){
  1437. var self=this;
  1438. return self.packages.all();
  1439. return self;},
  1440. args: [],
  1441. source: unescape('packages%0A%09%22Return%20all%20Package%20instances%20in%20the%20system.%22%0A%0A%09%3Creturn%20self.packages.all%28%29%3E'),
  1442. messageSends: [],
  1443. referencedClasses: []
  1444. }),
  1445. smalltalk.Smalltalk);
  1446. smalltalk.addMethod(
  1447. unescape('_packageAt_'),
  1448. smalltalk.method({
  1449. selector: unescape('packageAt%3A'),
  1450. category: 'packages',
  1451. fn: function (packageName){
  1452. var self=this;
  1453. return self.packages[packageName];
  1454. return self;},
  1455. args: ["packageName"],
  1456. source: unescape('packageAt%3A%20packageName%0A%20%20%20%20%20%20%20%3Creturn%20self.packages%5BpackageName%5D%3E'),
  1457. messageSends: [],
  1458. referencedClasses: []
  1459. }),
  1460. smalltalk.Smalltalk);
  1461. smalltalk.addMethod(
  1462. unescape('_packageAt_ifAbsent_'),
  1463. smalltalk.method({
  1464. selector: unescape('packageAt%3AifAbsent%3A'),
  1465. category: 'packages',
  1466. fn: function (packageName, aBlock){
  1467. var self=this;
  1468. return smalltalk.send(smalltalk.send(self, "_packageAt_", [packageName]), "_ifNil_", [aBlock]);
  1469. return self;},
  1470. args: ["packageName", "aBlock"],
  1471. source: unescape('packageAt%3A%20packageName%20ifAbsent%3A%20aBlock%0A%20%20%20%20%20%20%20%5E%28self%20packageAt%3A%20packageName%29%20ifNil%3A%20aBlock'),
  1472. messageSends: ["ifNil:", "packageAt:"],
  1473. referencedClasses: []
  1474. }),
  1475. smalltalk.Smalltalk);
  1476. smalltalk.addMethod(
  1477. unescape('_createPackage_'),
  1478. smalltalk.method({
  1479. selector: unescape('createPackage%3A'),
  1480. category: 'private',
  1481. fn: function (packageName){
  1482. var self=this;
  1483. return smalltalk.addPackage(packageName, nil);
  1484. return self;},
  1485. args: ["packageName"],
  1486. source: unescape('createPackage%3A%20packageName%0A%09%22Create%20and%20bind%20a%20new%20package%20with%20given%20name%20and%20return%20it.%22%0A%0A%20%20%20%20%20%20%3Creturn%20smalltalk.addPackage%28packageName%2C%20nil%29%3E'),
  1487. messageSends: [],
  1488. referencedClasses: []
  1489. }),
  1490. smalltalk.Smalltalk);
  1491. smalltalk.addMethod(
  1492. unescape('_deletePackage_'),
  1493. smalltalk.method({
  1494. selector: unescape('deletePackage%3A'),
  1495. category: 'private',
  1496. fn: function (packageName){
  1497. var self=this;
  1498. delete smalltalk.packages[packageName];
  1499. return self;},
  1500. args: ["packageName"],
  1501. source: unescape('deletePackage%3A%20packageName%0A%09%22Deletes%20a%20package%20by%20deleting%20its%20binding%2C%20but%20does%20not%20check%20if%20it%20contains%20classes%20etc.%0A%09To%20remove%20a%20package%2C%20use%20%23removePackage%20instead.%22%0A%0A%20%20%20%20%20%20%20%3Cdelete%20smalltalk.packages%5BpackageName%5D%3E'),
  1502. messageSends: [],
  1503. referencedClasses: []
  1504. }),
  1505. smalltalk.Smalltalk);
  1506. smalltalk.addMethod(
  1507. unescape('_removePackage_'),
  1508. smalltalk.method({
  1509. selector: unescape('removePackage%3A'),
  1510. category: 'packages',
  1511. fn: function (packageName){
  1512. var self=this;
  1513. var pkg=nil;
  1514. (pkg=smalltalk.send(self, "_packageAt_ifAbsent_", [packageName, (function(){return smalltalk.send(self, "_error_", [smalltalk.send("Missing package: ", "__comma", [packageName])]);})]));
  1515. smalltalk.send(smalltalk.send(pkg, "_classes", []), "_do_", [(function(each){return smalltalk.send(self, "_removeClass_", [each]);})]);
  1516. smalltalk.send(self, "_deletePackage_", [packageName]);
  1517. return self;},
  1518. args: ["packageName"],
  1519. source: unescape('removePackage%3A%20packageName%0A%09%22Removes%20a%20package%20and%20all%20its%20classes.%22%0A%0A%09%7C%20pkg%20%7C%0A%09pkg%20%3A%3D%20self%20packageAt%3A%20packageName%20ifAbsent%3A%20%5Bself%20error%3A%20%27Missing%20package%3A%20%27%2C%20packageName%5D.%0A%09pkg%20classes%20do%3A%20%5B%3Aeach%20%7C%0A%20%20%20%20%20%20%20%20%09self%20removeClass%3A%20each%5D.%0A%09self%20deletePackage%3A%20packageName'),
  1520. messageSends: ["packageAt:ifAbsent:", "error:", unescape("%2C"), "do:", "classes", "removeClass:", "deletePackage:"],
  1521. referencedClasses: []
  1522. }),
  1523. smalltalk.Smalltalk);
  1524. smalltalk.addMethod(
  1525. unescape('_renamePackage_to_'),
  1526. smalltalk.method({
  1527. selector: unescape('renamePackage%3Ato%3A'),
  1528. category: 'packages',
  1529. fn: function (packageName, newName){
  1530. var self=this;
  1531. var pkg=nil;
  1532. (pkg=smalltalk.send(self, "_packageAt_ifAbsent_", [packageName, (function(){return smalltalk.send(self, "_error_", [smalltalk.send("Missing package: ", "__comma", [packageName])]);})]));
  1533. (($receiver = smalltalk.send(self, "_packageAt_", [newName])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_error_", [smalltalk.send("Already exists a package called: ", "__comma", [newName])]);})() : nil;
  1534. smalltalk.packages[newName] = smalltalk.packages[packageName];
  1535. smalltalk.send(pkg, "_name_", [newName]);
  1536. smalltalk.send(self, "_deletePackage_", [packageName]);
  1537. return self;},
  1538. args: ["packageName", "newName"],
  1539. source: unescape('renamePackage%3A%20packageName%20to%3A%20newName%0A%09%22Rename%20a%20package.%22%0A%0A%09%7C%20pkg%20%7C%0A%09pkg%20%3A%3D%20self%20packageAt%3A%20packageName%20ifAbsent%3A%20%5Bself%20error%3A%20%27Missing%20package%3A%20%27%2C%20packageName%5D.%0A%09%28self%20packageAt%3A%20newName%29%20ifNotNil%3A%20%5Bself%20error%3A%20%27Already%20exists%20a%20package%20called%3A%20%27%2C%20newName%5D.%0A%09%3Csmalltalk.packages%5BnewName%5D%20%3D%20smalltalk.packages%5BpackageName%5D%3E.%0A%09pkg%20name%3A%20newName.%0A%09self%20deletePackage%3A%20packageName.'),
  1540. messageSends: ["packageAt:ifAbsent:", "error:", unescape("%2C"), "ifNotNil:", "packageAt:", "name:", "deletePackage:"],
  1541. referencedClasses: []
  1542. }),
  1543. smalltalk.Smalltalk);
  1544. smalltalk.addMethod(
  1545. unescape('_reservedWords'),
  1546. smalltalk.method({
  1547. selector: unescape('reservedWords'),
  1548. category: 'accessing',
  1549. fn: function (){
  1550. var self=this;
  1551. return self.reservedWords;
  1552. return self;},
  1553. args: [],
  1554. source: unescape('reservedWords%0A%09%22JavaScript%20reserved%20words%22%0A%09%3Creturn%20self.reservedWords%3E'),
  1555. messageSends: [],
  1556. referencedClasses: []
  1557. }),
  1558. smalltalk.Smalltalk);
  1559. smalltalk.addMethod(
  1560. unescape('_createPackage_properties_'),
  1561. smalltalk.method({
  1562. selector: unescape('createPackage%3Aproperties%3A'),
  1563. category: 'private',
  1564. fn: function (packageName, aDict){
  1565. var self=this;
  1566. var object=nil;
  1567. object = {};;
  1568. smalltalk.send(aDict, "_keysAndValuesDo_", [(function(key, value){return object[key] = value;})]);
  1569. return smalltalk.addPackage(packageName, object);
  1570. return self;},
  1571. args: ["packageName", "aDict"],
  1572. source: unescape('createPackage%3A%20packageName%20properties%3A%20aDict%0A%09%22Create%20and%20bind%20a%20new%20package%20with%20given%20name%20and%20return%20it.%22%0A%0A%09%7C%20object%20%7C%0A%09%3Cobject%20%3D%20%7B%7D%3B%3E.%0A%09aDict%20keysAndValuesDo%3A%20%5B%3Akey%20%3Avalue%20%7C%0A%09%09%3Cobject%5Bkey%5D%20%3D%20value%3E.%0A%09%5D.%0A%20%20%20%20%20%20%20%3Creturn%20smalltalk.addPackage%28packageName%2C%20object%29%3E'),
  1573. messageSends: ["keysAndValuesDo:"],
  1574. referencedClasses: []
  1575. }),
  1576. smalltalk.Smalltalk);
  1577. smalltalk.addMethod(
  1578. unescape('_readJSObject_'),
  1579. smalltalk.method({
  1580. selector: unescape('readJSObject%3A'),
  1581. category: 'accessing',
  1582. fn: function (anObject){
  1583. var self=this;
  1584. return self.readJSObject(anObject);
  1585. return self;},
  1586. args: ["anObject"],
  1587. source: unescape('readJSObject%3A%20anObject%0A%09%3Creturn%20self.readJSObject%28anObject%29%3E'),
  1588. messageSends: [],
  1589. referencedClasses: []
  1590. }),
  1591. smalltalk.Smalltalk);
  1592. smalltalk.Smalltalk.klass.iVarNames = ['current'];
  1593. smalltalk.addMethod(
  1594. unescape('_current'),
  1595. smalltalk.method({
  1596. selector: unescape('current'),
  1597. category: 'accessing',
  1598. fn: function (){
  1599. var self=this;
  1600. return smalltalk;
  1601. return self;},
  1602. args: [],
  1603. source: unescape('current%0A%09%3Creturn%20smalltalk%3E'),
  1604. messageSends: [],
  1605. referencedClasses: []
  1606. }),
  1607. smalltalk.Smalltalk.klass);
  1608. smalltalk.addClass('Package', smalltalk.Object, ['commitPathJs', 'commitPathSt'], 'Kernel-Objects');
  1609. smalltalk.Package.comment=unescape('A%20Package%20is%20similar%20to%20a%20%22class%20category%22%20typically%20found%20in%20other%20Smalltalks%20like%20Pharo%20or%20Squeak.%20Amber%20does%20not%20have%20class%20categories%20anymore%2C%20it%20had%20in%20the%20beginning%20but%20now%20each%20class%20in%20the%20system%20knows%20which%20package%20it%20belongs%20to.%0A%0AA%20Package%20has%20a%20name%2C%20an%20Array%20of%20%22requires%22%2C%20a%20comment%20and%20a%20Dictionary%20with%20other%20optional%20key%20value%20attributes.%20A%20Package%20can%20also%20be%20queried%20for%20its%20classes%2C%20but%20it%20will%20then%20resort%20to%20a%20reverse%20scan%20of%20all%20classes%20to%20find%20them.%0APackages%20are%20manipulated%20through%20%22Smalltalk%20current%22%2C%20like%20for%20example%20finding%20one%20based%20on%20a%20name%3A%0A%0A%09Smalltalk%20current%20packageAt%3A%20%27Kernel%27%0A%0A...but%20you%20can%20also%20use%3A%0A%0A%09Package%20named%3A%20%27Kernel%27%0A%0AA%20Package%20differs%20slightly%20from%20a%20Monticello%20package%20which%20can%20span%20multiple%20class%20categories%20using%20a%20naming%20convention%20based%20on%20hyphenation.%20But%20just%20as%20in%20Monticello%20a%20Package%20supports%20%22class%20extensions%22%20so%20a%20Package%0Acan%20define%20behaviors%20in%20foreign%20classes%20using%20a%20naming%20convention%20for%20method%20categories%20where%20the%20category%20starts%20with%20an%20asterisk%20and%20then%20the%20name%20of%20the%20owning%20package%20follows.%20This%20can%20easily%20be%20seen%20in%20for%20example%20class%0AString%20where%20the%20method%20category%20%22*IDE%22%20defines%20%23inspectOn%3A%20which%20thus%20is%20a%20method%20belonging%20to%20the%20IDE%20package.%0A%0AYou%20can%20fetch%20a%20package%20from%20the%20server%3A%0A%0A%09Package%20fetch%3A%20%27Additional-Examples%27')
  1610. smalltalk.addMethod(
  1611. unescape('_name'),
  1612. smalltalk.method({
  1613. selector: unescape('name'),
  1614. category: 'accessing',
  1615. fn: function (){
  1616. var self=this;
  1617. return self.pkgName;
  1618. return self;},
  1619. args: [],
  1620. source: unescape('name%0A%09%3Creturn%20self.pkgName%3E'),
  1621. messageSends: [],
  1622. referencedClasses: []
  1623. }),
  1624. smalltalk.Package);
  1625. smalltalk.addMethod(
  1626. unescape('_name_'),
  1627. smalltalk.method({
  1628. selector: unescape('name%3A'),
  1629. category: 'accessing',
  1630. fn: function (aString){
  1631. var self=this;
  1632. self.pkgName = aString;
  1633. return self;},
  1634. args: ["aString"],
  1635. source: unescape('name%3A%20aString%0A%09%3Cself.pkgName%20%3D%20aString%3E'),
  1636. messageSends: [],
  1637. referencedClasses: []
  1638. }),
  1639. smalltalk.Package);
  1640. smalltalk.addMethod(
  1641. unescape('_classes'),
  1642. smalltalk.method({
  1643. selector: unescape('classes'),
  1644. category: 'classes',
  1645. fn: function (){
  1646. var self=this;
  1647. return smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_classes", []), "_select_", [(function(c){return smalltalk.send(smalltalk.send(c, "_package", []), "__eq_eq", [self]);})]);
  1648. return self;},
  1649. args: [],
  1650. source: unescape('classes%0A%09%22We%20need%20to%20do%20a%20reverse%20scan.%22%0A%09%5ESmalltalk%20current%20classes%20select%3A%20%5B%3Ac%20%7C%20c%20package%20%3D%3D%20self%5D'),
  1651. messageSends: ["select:", "classes", "current", unescape("%3D%3D"), "package"],
  1652. referencedClasses: ["Smalltalk"]
  1653. }),
  1654. smalltalk.Package);
  1655. smalltalk.addMethod(
  1656. unescape('_printString'),
  1657. smalltalk.method({
  1658. selector: unescape('printString'),
  1659. category: 'printing',
  1660. fn: function (){
  1661. var self=this;
  1662. return smalltalk.send(self, "_name", []);
  1663. return self;},
  1664. args: [],
  1665. source: unescape('printString%0A%09%5Eself%20name'),
  1666. messageSends: ["name"],
  1667. referencedClasses: []
  1668. }),
  1669. smalltalk.Package);
  1670. smalltalk.addMethod(
  1671. unescape('_dependencies'),
  1672. smalltalk.method({
  1673. selector: unescape('dependencies'),
  1674. category: 'accessing',
  1675. fn: function (){
  1676. var self=this;
  1677. return smalltalk.send(self, "_propertyAt_ifAbsent_", ["dependencies", (function(){return [];})]);
  1678. return self;},
  1679. args: [],
  1680. source: unescape('dependencies%0A%09%5Eself%20propertyAt%3A%20%27dependencies%27%20ifAbsent%3A%20%5B%23%28%29%5D'),
  1681. messageSends: ["propertyAt:ifAbsent:"],
  1682. referencedClasses: []
  1683. }),
  1684. smalltalk.Package);
  1685. smalltalk.addMethod(
  1686. unescape('_dependencies_'),
  1687. smalltalk.method({
  1688. selector: unescape('dependencies%3A'),
  1689. category: 'accessing',
  1690. fn: function (anArray){
  1691. var self=this;
  1692. return smalltalk.send(self, "_propertyAt_put_", ["dependencies", anArray]);
  1693. return self;},
  1694. args: ["anArray"],
  1695. source: unescape('dependencies%3A%20anArray%0A%09%5Eself%20propertyAt%3A%20%27dependencies%27%20put%3A%20anArray'),
  1696. messageSends: ["propertyAt:put:"],
  1697. referencedClasses: []
  1698. }),
  1699. smalltalk.Package);
  1700. smalltalk.addMethod(
  1701. unescape('_properties'),
  1702. smalltalk.method({
  1703. selector: unescape('properties'),
  1704. category: 'accessing',
  1705. fn: function (){
  1706. var self=this;
  1707. return smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_readJSObject_", [smalltalk.send(self, "_basicAt_", ["properties"])]);
  1708. return self;},
  1709. args: [],
  1710. source: unescape('properties%0A%09%5ESmalltalk%20current%20readJSObject%3A%20%28self%20basicAt%3A%20%27properties%27%29'),
  1711. messageSends: ["readJSObject:", "current", "basicAt:"],
  1712. referencedClasses: ["Smalltalk"]
  1713. }),
  1714. smalltalk.Package);
  1715. smalltalk.addMethod(
  1716. unescape('_propertiesAsJSON'),
  1717. smalltalk.method({
  1718. selector: unescape('propertiesAsJSON'),
  1719. category: 'private',
  1720. fn: function (){
  1721. var self=this;
  1722. return JSON.stringify(self.properties);
  1723. return self;},
  1724. args: [],
  1725. source: unescape('propertiesAsJSON%0A%09%3Creturn%20JSON.stringify%28self.properties%29%3E'),
  1726. messageSends: [],
  1727. referencedClasses: []
  1728. }),
  1729. smalltalk.Package);
  1730. smalltalk.addMethod(
  1731. unescape('_properties_'),
  1732. smalltalk.method({
  1733. selector: unescape('properties%3A'),
  1734. category: 'accessing',
  1735. fn: function (aDict){
  1736. var self=this;
  1737. var object=nil;
  1738. object = {};;
  1739. smalltalk.send(aDict, "_keysAndValuesDo_", [(function(key, value){return object[key] = value;})]);
  1740. return self.properties = object;
  1741. return self;},
  1742. args: ["aDict"],
  1743. source: unescape('properties%3A%20aDict%0A%09%22We%20store%20it%20as%20a%20javascript%20object.%22%0A%09%0A%09%7C%20object%20%7C%0A%09%3Cobject%20%3D%20%7B%7D%3B%3E.%0A%09aDict%20keysAndValuesDo%3A%20%5B%3Akey%20%3Avalue%20%7C%0A%09%09%3Cobject%5Bkey%5D%20%3D%20value%3E.%0A%09%5D.%0A%09%3Creturn%20self.properties%20%3D%20object%3E'),
  1744. messageSends: ["keysAndValuesDo:"],
  1745. referencedClasses: []
  1746. }),
  1747. smalltalk.Package);
  1748. smalltalk.addMethod(
  1749. unescape('_jsProperties'),
  1750. smalltalk.method({
  1751. selector: unescape('jsProperties'),
  1752. category: 'private',
  1753. fn: function (){
  1754. var self=this;
  1755. return self.properties;
  1756. return self;},
  1757. args: [],
  1758. source: unescape('jsProperties%0A%09%3Creturn%20self.properties%3E'),
  1759. messageSends: [],
  1760. referencedClasses: []
  1761. }),
  1762. smalltalk.Package);
  1763. smalltalk.addMethod(
  1764. unescape('_jsProperties_'),
  1765. smalltalk.method({
  1766. selector: unescape('jsProperties%3A'),
  1767. category: 'private',
  1768. fn: function (aJSObject){
  1769. var self=this;
  1770. return self.properties = aJSObject;
  1771. return self;},
  1772. args: ["aJSObject"],
  1773. source: unescape('jsProperties%3A%20aJSObject%0A%09%3Creturn%20self.properties%20%3D%20aJSObject%3E'),
  1774. messageSends: [],
  1775. referencedClasses: []
  1776. }),
  1777. smalltalk.Package);
  1778. smalltalk.addMethod(
  1779. unescape('_propertyAt_'),
  1780. smalltalk.method({
  1781. selector: unescape('propertyAt%3A'),
  1782. category: 'properties',
  1783. fn: function (key){
  1784. var self=this;
  1785. return self.properties[key];
  1786. return self;},
  1787. args: ["key"],
  1788. source: unescape('propertyAt%3A%20key%0A%0A%09%3Creturn%20self.properties%5Bkey%5D%3E'),
  1789. messageSends: [],
  1790. referencedClasses: []
  1791. }),
  1792. smalltalk.Package);
  1793. smalltalk.addMethod(
  1794. unescape('_propertyAt_put_'),
  1795. smalltalk.method({
  1796. selector: unescape('propertyAt%3Aput%3A'),
  1797. category: 'properties',
  1798. fn: function (key, value){
  1799. var self=this;
  1800. return self.properties[key] = value;
  1801. return self;},
  1802. args: ["key", "value"],
  1803. source: unescape('propertyAt%3A%20key%20put%3A%20value%0A%0A%09%3Creturn%20self.properties%5Bkey%5D%20%3D%20value%3E'),
  1804. messageSends: [],
  1805. referencedClasses: []
  1806. }),
  1807. smalltalk.Package);
  1808. smalltalk.addMethod(
  1809. unescape('_propertyAt_ifAbsent_'),
  1810. smalltalk.method({
  1811. selector: unescape('propertyAt%3AifAbsent%3A'),
  1812. category: 'properties',
  1813. fn: function (key, block){
  1814. var self=this;
  1815. return (($receiver = smalltalk.send(self, "_propertyAt_", [key])) == nil || $receiver == undefined) ? (function(){return smalltalk.send(block, "_value", []);})() : $receiver;
  1816. return self;},
  1817. args: ["key", "block"],
  1818. source: unescape('propertyAt%3A%20key%20ifAbsent%3A%20block%0A%0A%09%5E%28self%20propertyAt%3A%20key%29%20ifNil%3A%20%5Bblock%20value%5D'),
  1819. messageSends: ["ifNil:", "propertyAt:", "value"],
  1820. referencedClasses: []
  1821. }),
  1822. smalltalk.Package);
  1823. smalltalk.addMethod(
  1824. unescape('_commitPathJs'),
  1825. smalltalk.method({
  1826. selector: unescape('commitPathJs'),
  1827. category: 'accessing',
  1828. fn: function (){
  1829. var self=this;
  1830. return (($receiver = self['@commitPathJs']) == nil || $receiver == undefined) ? (function(){return smalltalk.send(smalltalk.send(self, "_class", []), "_defaultCommitPathJs", []);})() : $receiver;
  1831. return self;},
  1832. args: [],
  1833. source: unescape('commitPathJs%0A%09%5E%20commitPathJs%20ifNil%3A%20%5Bself%20class%20defaultCommitPathJs%5D'),
  1834. messageSends: ["ifNil:", "defaultCommitPathJs", "class"],
  1835. referencedClasses: []
  1836. }),
  1837. smalltalk.Package);
  1838. smalltalk.addMethod(
  1839. unescape('_commitPathJs_'),
  1840. smalltalk.method({
  1841. selector: unescape('commitPathJs%3A'),
  1842. category: 'accessing',
  1843. fn: function (aString){
  1844. var self=this;
  1845. (self['@commitPathJs']=aString);
  1846. return self;},
  1847. args: ["aString"],
  1848. source: unescape('commitPathJs%3A%20aString%0A%09commitPathJs%A0%3A%3D%20aString'),
  1849. messageSends: [],
  1850. referencedClasses: []
  1851. }),
  1852. smalltalk.Package);
  1853. smalltalk.addMethod(
  1854. unescape('_commitPathSt'),
  1855. smalltalk.method({
  1856. selector: unescape('commitPathSt'),
  1857. category: 'accessing',
  1858. fn: function (){
  1859. var self=this;
  1860. return (($receiver = self['@commitPathSt']) == nil || $receiver == undefined) ? (function(){return smalltalk.send(smalltalk.send(self, "_class", []), "_defaultCommitPathSt", []);})() : $receiver;
  1861. return self;},
  1862. args: [],
  1863. source: unescape('commitPathSt%0A%09%5E%20commitPathSt%20ifNil%3A%20%5Bself%20class%20defaultCommitPathSt%5D'),
  1864. messageSends: ["ifNil:", "defaultCommitPathSt", "class"],
  1865. referencedClasses: []
  1866. }),
  1867. smalltalk.Package);
  1868. smalltalk.addMethod(
  1869. unescape('_commitPathSt_'),
  1870. smalltalk.method({
  1871. selector: unescape('commitPathSt%3A'),
  1872. category: 'accessing',
  1873. fn: function (aString){
  1874. var self=this;
  1875. (self['@commitPathSt']=aString);
  1876. return self;},
  1877. args: ["aString"],
  1878. source: unescape('commitPathSt%3A%20aString%0A%09commitPathSt%A0%3A%3D%20aString'),
  1879. messageSends: [],
  1880. referencedClasses: []
  1881. }),
  1882. smalltalk.Package);
  1883. smalltalk.Package.klass.iVarNames = ['defaultCommitPathJs','defaultCommitPathSt'];
  1884. smalltalk.addMethod(
  1885. unescape('_named_'),
  1886. smalltalk.method({
  1887. selector: unescape('named%3A'),
  1888. category: 'not yet classified',
  1889. fn: function (aPackageName){
  1890. var self=this;
  1891. return smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_packageAt_", [aPackageName]);
  1892. return self;},
  1893. args: ["aPackageName"],
  1894. source: unescape('named%3A%20aPackageName%0A%0A%09%5ESmalltalk%20current%20packageAt%3A%20aPackageName'),
  1895. messageSends: ["packageAt:", "current"],
  1896. referencedClasses: ["Smalltalk"]
  1897. }),
  1898. smalltalk.Package.klass);
  1899. smalltalk.addMethod(
  1900. unescape('_named_ifAbsent_'),
  1901. smalltalk.method({
  1902. selector: unescape('named%3AifAbsent%3A'),
  1903. category: 'not yet classified',
  1904. fn: function (aPackageName, aBlock){
  1905. var self=this;
  1906. return smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_packageAt_ifAbsent_", [aPackageName, aBlock]);
  1907. return self;},
  1908. args: ["aPackageName", "aBlock"],
  1909. source: unescape('named%3A%20aPackageName%20ifAbsent%3A%20aBlock%0A%0A%09%5ESmalltalk%20current%20packageAt%3A%20aPackageName%20ifAbsent%3A%20aBlock'),
  1910. messageSends: ["packageAt:ifAbsent:", "current"],
  1911. referencedClasses: ["Smalltalk"]
  1912. }),
  1913. smalltalk.Package.klass);
  1914. smalltalk.addMethod(
  1915. unescape('_defaultCommitPathJs'),
  1916. smalltalk.method({
  1917. selector: unescape('defaultCommitPathJs'),
  1918. category: 'commit paths',
  1919. fn: function (){
  1920. var self=this;
  1921. return (($receiver = self['@defaultCommitPathJs']) == nil || $receiver == undefined) ? (function(){return (self['@defaultCommitPathJs']="js");})() : $receiver;
  1922. return self;},
  1923. args: [],
  1924. source: unescape('defaultCommitPathJs%0A%09%5E%20defaultCommitPathJs%20ifNil%3A%20%5B%20defaultCommitPathJs%20%3A%3D%20%27js%27%5D'),
  1925. messageSends: ["ifNil:"],
  1926. referencedClasses: []
  1927. }),
  1928. smalltalk.Package.klass);
  1929. smalltalk.addMethod(
  1930. unescape('_defaultCommitPathJs_'),
  1931. smalltalk.method({
  1932. selector: unescape('defaultCommitPathJs%3A'),
  1933. category: 'commit paths',
  1934. fn: function (aString){
  1935. var self=this;
  1936. (self['@defaultCommitPathJs']=aString);
  1937. return self;},
  1938. args: ["aString"],
  1939. source: unescape('defaultCommitPathJs%3A%20aString%0A%09defaultCommitPathJs%20%3A%3D%20aString'),
  1940. messageSends: [],
  1941. referencedClasses: []
  1942. }),
  1943. smalltalk.Package.klass);
  1944. smalltalk.addMethod(
  1945. unescape('_defaultCommitPathSt'),
  1946. smalltalk.method({
  1947. selector: unescape('defaultCommitPathSt'),
  1948. category: 'commit paths',
  1949. fn: function (){
  1950. var self=this;
  1951. return (($receiver = self['@defaultCommitPathSt']) == nil || $receiver == undefined) ? (function(){return (self['@defaultCommitPathSt']="st");})() : $receiver;
  1952. return self;},
  1953. args: [],
  1954. source: unescape('defaultCommitPathSt%0A%09%5E%20defaultCommitPathSt%20ifNil%3A%20%5B%20defaultCommitPathSt%20%3A%3D%20%27st%27%5D'),
  1955. messageSends: ["ifNil:"],
  1956. referencedClasses: []
  1957. }),
  1958. smalltalk.Package.klass);
  1959. smalltalk.addMethod(
  1960. unescape('_defaultCommitPathSt_'),
  1961. smalltalk.method({
  1962. selector: unescape('defaultCommitPathSt%3A'),
  1963. category: 'commit paths',
  1964. fn: function (aString){
  1965. var self=this;
  1966. (self['@defaultCommitPathSt']=aString);
  1967. return self;},
  1968. args: ["aString"],
  1969. source: unescape('defaultCommitPathSt%3A%20aString%0A%09defaultCommitPathSt%20%3A%3D%20aString'),
  1970. messageSends: [],
  1971. referencedClasses: []
  1972. }),
  1973. smalltalk.Package.klass);
  1974. smalltalk.addMethod(
  1975. unescape('_resetCommitPaths'),
  1976. smalltalk.method({
  1977. selector: unescape('resetCommitPaths'),
  1978. category: 'commit paths',
  1979. fn: function (){
  1980. var self=this;
  1981. (self['@defaultCommitPathJs']=nil);
  1982. (self['@defaultCommitPathSt']=nil);
  1983. return self;},
  1984. args: [],
  1985. source: unescape('resetCommitPaths%0A%20%20%20%20%20%20%20%20defaultCommitPathJs%20%3A%3D%20nil.%0A%20%20%20%20%20%20%20%20defaultCommitPathSt%20%3A%3D%20nil.'),
  1986. messageSends: [],
  1987. referencedClasses: []
  1988. }),
  1989. smalltalk.Package.klass);
  1990. smalltalk.addMethod(
  1991. unescape('_fetch_prefix_'),
  1992. smalltalk.method({
  1993. selector: unescape('fetch%3Aprefix%3A'),
  1994. category: 'loading-storing',
  1995. fn: function (aPackageName, aPrefix){
  1996. var self=this;
  1997. smalltalk.send((typeof jQuery == 'undefined' ? nil : jQuery), "_getScript_onSuccess_", [smalltalk.send(smalltalk.send(aPrefix, "__comma", [aPackageName]), "__comma", [".js"]), (function(){return smalltalk.send((smalltalk.Package || Package), "_init_", [aPackageName]);})]);
  1998. return self;},
  1999. args: ["aPackageName", "aPrefix"],
  2000. source: unescape('fetch%3A%20aPackageName%20prefix%3A%20aPrefix%0A%09jQuery%20getScript%3A%20%28aPrefix%20%2C%20aPackageName%20%2C%20%27.js%27%29%20onSuccess%3A%20%5B%20Package%20init%3A%20aPackageName%20%5D'),
  2001. messageSends: ["getScript:onSuccess:", unescape("%2C"), "init:"],
  2002. referencedClasses: ["Package"]
  2003. }),
  2004. smalltalk.Package.klass);
  2005. smalltalk.addMethod(
  2006. unescape('_fetch_'),
  2007. smalltalk.method({
  2008. selector: unescape('fetch%3A'),
  2009. category: 'loading-storing',
  2010. fn: function (aPackageName){
  2011. var self=this;
  2012. smalltalk.send(self, "_fetch_prefix_", [aPackageName, smalltalk.send(smalltalk.send(self, "_defaultCommitPathJs", []), "__comma", [unescape("/")])]);
  2013. return self;},
  2014. args: ["aPackageName"],
  2015. source: unescape('fetch%3A%20aPackageName%0A%09self%20fetch%3A%20aPackageName%20prefix%3A%20self%20defaultCommitPathJs%2C%20%27/%27'),
  2016. messageSends: ["fetch:prefix:", unescape("%2C"), "defaultCommitPathJs"],
  2017. referencedClasses: []
  2018. }),
  2019. smalltalk.Package.klass);
  2020. smalltalk.addMethod(
  2021. unescape('_commitToLocalStorage_'),
  2022. smalltalk.method({
  2023. selector: unescape('commitToLocalStorage%3A'),
  2024. category: 'loading-storing',
  2025. fn: function (aPackageName){
  2026. var self=this;
  2027. var key=nil;
  2028. var sourceCode=nil;
  2029. (key=smalltalk.send("smalltalk.packages.", "__comma", [aPackageName]));
  2030. (sourceCode=smalltalk.send(smalltalk.send((smalltalk.Exporter || Exporter), "_new", []), "_exportPackage_", [aPackageName]));
  2031. localStorage[key] = escape(sourceCode);
  2032. return self;},
  2033. args: ["aPackageName"],
  2034. source: unescape('commitToLocalStorage%3A%20aPackageName%0A%09%7C%20key%20sourceCode%20%7C%0A%09key%20%3A%3D%20%27smalltalk.packages.%27%20%2C%20aPackageName.%0A%09sourceCode%20%3A%3D%20Exporter%20new%20exportPackage%3A%20aPackageName.%0A%09%3ClocalStorage%5Bkey%5D%20%3D%20escape%28sourceCode%29%3E'),
  2035. messageSends: [unescape("%2C"), "exportPackage:", "new"],
  2036. referencedClasses: ["Exporter"]
  2037. }),
  2038. smalltalk.Package.klass);
  2039. smalltalk.addMethod(
  2040. unescape('_init_'),
  2041. smalltalk.method({
  2042. selector: unescape('init%3A'),
  2043. category: 'loading-storing',
  2044. fn: function (aPackageName){
  2045. var self=this;
  2046. (function($rec){smalltalk.send($rec, "_do_", [(function(each){return smalltalk.init(each);})]);return smalltalk.send($rec, "_do_", [(function(each){return smalltalk.send(each, "_initialize", []);})]);})(smalltalk.send(smalltalk.send((typeof smalltalk == 'undefined' ? nil : smalltalk), "_classes", []), "_select_", [(function(each){return each.pkg.pkgName == aPackageName;})]));
  2047. return self;},
  2048. args: ["aPackageName"],
  2049. source: unescape('init%3A%20aPackageName%0A%09%28smalltalk%20classes%20select%3A%20%5B%20%3Aeach%20%7C%20%3Ceach.pkg.pkgName%20%3D%3D%20aPackageName%3E%20%5D%29%0A%09%09do%3A%20%5B%20%3Aeach%20%7C%20%3Csmalltalk.init%28each%29%3E%20%5D%3B%0A%09%09do%3A%20%5B%20%3Aeach%20%7C%20each%20initialize%20%5D'),
  2050. messageSends: ["do:", "initialize", "select:", "classes"],
  2051. referencedClasses: []
  2052. }),
  2053. smalltalk.Package.klass);
  2054. smalltalk.addClass('Number', smalltalk.Object, [], 'Kernel-Objects');
  2055. smalltalk.Number.comment=unescape('Number%20holds%20the%20most%20general%20methods%20for%20dealing%20with%20numbers.%20%20%0ANumber%20is%20directly%20mapped%20to%20JavaScript%20Number.%0A%0AMost%20arithmetic%20methods%20like%20%60%23+%60%20%60%23/%60%20%60%23-%60%20%60%23max%3A%60%20are%20directly%20inlined%20into%20javascript.%20%0A%0A%23%23Enumerating%0AA%20Number%20can%20be%20used%20to%20evaluate%20a%20Block%20a%20fixed%20number%20of%20times%3A%0A%0A%095%20timesRepeat%3A%20%5BTranscript%20show%3A%20%27This%20will%20be%20printed%205%20times%27%3B%20cr%5D.%0A%09%0A%091%20to%3A%205%20do%3A%20%5B%3AaNumber%7C%20Transcript%20show%3A%20aNumber%20asString%3B%20cr%5D.%0A%09%0A%091%20to%3A%2010%20by%3A%202%20do%3A%20%5B%3AaNumber%7C%20Transcript%20show%3A%20aNumber%20asString%3B%20cr%5D.')
  2056. smalltalk.addMethod(
  2057. unescape('__eq'),
  2058. smalltalk.method({
  2059. selector: unescape('%3D'),
  2060. category: 'comparing',
  2061. fn: function (aNumber){
  2062. var self=this;
  2063. try{((($receiver = smalltalk.send(aNumber, "_isNumber", [])).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}})})();})]));
  2064. return Number(self) == aNumber;
  2065. return self;
  2066. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
  2067. args: ["aNumber"],
  2068. source: unescape('%3D%20aNumber%0A%09aNumber%20isNumber%20ifFalse%3A%20%5B%5Efalse%5D.%20%0A%09%3Creturn%20Number%28self%29%20%3D%3D%20aNumber%3E'),
  2069. messageSends: ["ifFalse:", "isNumber"],
  2070. referencedClasses: []
  2071. }),
  2072. smalltalk.Number);
  2073. smalltalk.addMethod(
  2074. unescape('__gt'),
  2075. smalltalk.method({
  2076. selector: unescape('%3E'),
  2077. category: 'comparing',
  2078. fn: function (aNumber){
  2079. var self=this;
  2080. return self > aNumber;
  2081. return self;},
  2082. args: ["aNumber"],
  2083. source: unescape('%3E%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20%3E%3E%20aNumber%3E'),
  2084. messageSends: [],
  2085. referencedClasses: []
  2086. }),
  2087. smalltalk.Number);
  2088. smalltalk.addMethod(
  2089. unescape('__lt'),
  2090. smalltalk.method({
  2091. selector: unescape('%3C'),
  2092. category: 'comparing',
  2093. fn: function (aNumber){
  2094. var self=this;
  2095. return self < aNumber;
  2096. return self;},
  2097. args: ["aNumber"],
  2098. source: unescape('%3C%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20%3C%20aNumber%3E'),
  2099. messageSends: [],
  2100. referencedClasses: []
  2101. }),
  2102. smalltalk.Number);
  2103. smalltalk.addMethod(
  2104. unescape('__gt_eq'),
  2105. smalltalk.method({
  2106. selector: unescape('%3E%3D'),
  2107. category: 'comparing',
  2108. fn: function (aNumber){
  2109. var self=this;
  2110. return self >= aNumber;
  2111. return self;},
  2112. args: ["aNumber"],
  2113. source: unescape('%3E%3D%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20%3E%3E%3D%20aNumber%3E'),
  2114. messageSends: [],
  2115. referencedClasses: []
  2116. }),
  2117. smalltalk.Number);
  2118. smalltalk.addMethod(
  2119. unescape('__lt_eq'),
  2120. smalltalk.method({
  2121. selector: unescape('%3C%3D'),
  2122. category: 'comparing',
  2123. fn: function (aNumber){
  2124. var self=this;
  2125. return self <= aNumber;
  2126. return self;},
  2127. args: ["aNumber"],
  2128. source: unescape('%3C%3D%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20%3C%3D%20aNumber%3E'),
  2129. messageSends: [],
  2130. referencedClasses: []
  2131. }),
  2132. smalltalk.Number);
  2133. smalltalk.addMethod(
  2134. unescape('__plus'),
  2135. smalltalk.method({
  2136. selector: unescape('+'),
  2137. category: 'arithmetic',
  2138. fn: function (aNumber){
  2139. var self=this;
  2140. return self + aNumber;
  2141. return self;},
  2142. args: ["aNumber"],
  2143. source: unescape('+%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20+%20aNumber%3E'),
  2144. messageSends: [],
  2145. referencedClasses: []
  2146. }),
  2147. smalltalk.Number);
  2148. smalltalk.addMethod(
  2149. unescape('__minus'),
  2150. smalltalk.method({
  2151. selector: unescape('-'),
  2152. category: 'arithmetic',
  2153. fn: function (aNumber){
  2154. var self=this;
  2155. return self - aNumber;
  2156. return self;},
  2157. args: ["aNumber"],
  2158. source: unescape('-%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20-%20aNumber%3E'),
  2159. messageSends: [],
  2160. referencedClasses: []
  2161. }),
  2162. smalltalk.Number);
  2163. smalltalk.addMethod(
  2164. unescape('__star'),
  2165. smalltalk.method({
  2166. selector: unescape('*'),
  2167. category: 'arithmetic',
  2168. fn: function (aNumber){
  2169. var self=this;
  2170. return self * aNumber;
  2171. return self;},
  2172. args: ["aNumber"],
  2173. source: unescape('*%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20*%20aNumber%3E'),
  2174. messageSends: [],
  2175. referencedClasses: []
  2176. }),
  2177. smalltalk.Number);
  2178. smalltalk.addMethod(
  2179. unescape('__slash'),
  2180. smalltalk.method({
  2181. selector: unescape('/'),
  2182. category: 'arithmetic',
  2183. fn: function (aNumber){
  2184. var self=this;
  2185. return self / aNumber;
  2186. return self;},
  2187. args: ["aNumber"],
  2188. source: unescape('/%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20/%20aNumber%3E'),
  2189. messageSends: [],
  2190. referencedClasses: []
  2191. }),
  2192. smalltalk.Number);
  2193. smalltalk.addMethod(
  2194. unescape('_max_'),
  2195. smalltalk.method({
  2196. selector: unescape('max%3A'),
  2197. category: 'arithmetic',
  2198. fn: function (aNumber){
  2199. var self=this;
  2200. return Math.max(self, aNumber);;
  2201. return self;},
  2202. args: ["aNumber"],
  2203. source: unescape('max%3A%20aNumber%0A%09%3Creturn%20Math.max%28self%2C%20aNumber%29%3B%3E'),
  2204. messageSends: [],
  2205. referencedClasses: []
  2206. }),
  2207. smalltalk.Number);
  2208. smalltalk.addMethod(
  2209. unescape('_min_'),
  2210. smalltalk.method({
  2211. selector: unescape('min%3A'),
  2212. category: 'arithmetic',
  2213. fn: function (aNumber){
  2214. var self=this;
  2215. return Math.min(self, aNumber);;
  2216. return self;},
  2217. args: ["aNumber"],
  2218. source: unescape('min%3A%20aNumber%0A%09%3Creturn%20Math.min%28self%2C%20aNumber%29%3B%3E'),
  2219. messageSends: [],
  2220. referencedClasses: []
  2221. }),
  2222. smalltalk.Number);
  2223. smalltalk.addMethod(
  2224. unescape('_rounded'),
  2225. smalltalk.method({
  2226. selector: unescape('rounded'),
  2227. category: 'converting',
  2228. fn: function (){
  2229. var self=this;
  2230. return Math.round(self);;
  2231. return self;},
  2232. args: [],
  2233. source: unescape('rounded%0A%09%3Creturn%20Math.round%28self%29%3B%3E'),
  2234. messageSends: [],
  2235. referencedClasses: []
  2236. }),
  2237. smalltalk.Number);
  2238. smalltalk.addMethod(
  2239. unescape('_truncated'),
  2240. smalltalk.method({
  2241. selector: unescape('truncated'),
  2242. category: 'converting',
  2243. fn: function (){
  2244. var self=this;
  2245. var result=nil;
  2246. ((($receiver = self >= (0)).klass === smalltalk.Boolean) ? ($receiver ? (function(){return result = Math.floor(self);;})() : (function(){return result = (Math.floor(self * (-1)) * (-1));;})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return result = Math.floor(self);;}), (function(){return result = (Math.floor(self * (-1)) * (-1));;})]));
  2247. return result;
  2248. return self;},
  2249. args: [],
  2250. source: unescape('truncated%0A%7Cresult%7C%0A%0A%20%20%20%20self%20%3E%3D%200%20%0A%20%20%20%20%20%20%20%20ifTrue%3A%20%5B%3Cresult%20%3D%20Math.floor%28self%29%3B%3E%5D%0A%20%20%20%20%20%20%20%20ifFalse%3A%20%5B%3Cresult%20%3D%20%28Math.floor%28self%20*%20%28-1%29%29%20*%20%28-1%29%29%3B%3E%5D.%0A%0A%20%20%20%20%5E%20result'),
  2251. messageSends: ["ifTrue:ifFalse:", unescape("%3E%3D")],
  2252. referencedClasses: []
  2253. }),
  2254. smalltalk.Number);
  2255. smalltalk.addMethod(
  2256. unescape('_to_'),
  2257. smalltalk.method({
  2258. selector: unescape('to%3A'),
  2259. category: 'converting',
  2260. fn: function (aNumber){
  2261. var self=this;
  2262. var array=nil;
  2263. var first=nil;
  2264. var last=nil;
  2265. var count=nil;
  2266. (first=smalltalk.send(self, "_truncated", []));
  2267. (last=((($receiver = smalltalk.send(aNumber, "_truncated", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));
  2268. (count=(1));
  2269. (array=smalltalk.send((smalltalk.Array || Array), "_new", []));
  2270. 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)])));})]);
  2271. return array;
  2272. return self;},
  2273. args: ["aNumber"],
  2274. 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%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'),
  2275. messageSends: ["truncated", unescape("+"), "new", "timesRepeat:", unescape("-"), "at:put:"],
  2276. referencedClasses: ["Array"]
  2277. }),
  2278. smalltalk.Number);
  2279. smalltalk.addMethod(
  2280. unescape('_timesRepeat_'),
  2281. smalltalk.method({
  2282. selector: unescape('timesRepeat%3A'),
  2283. category: 'enumerating',
  2284. fn: function (aBlock){
  2285. var self=this;
  2286. var integer=nil;
  2287. var count=nil;
  2288. (integer=smalltalk.send(self, "_truncated", []));
  2289. (count=(1));
  2290. (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)])));})()}})();
  2291. return self;},
  2292. args: ["aBlock"],
  2293. 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'),
  2294. messageSends: ["truncated", "whileFalse:", unescape("%3E"), "value", unescape("+")],
  2295. referencedClasses: []
  2296. }),
  2297. smalltalk.Number);
  2298. smalltalk.addMethod(
  2299. unescape('_to_do_'),
  2300. smalltalk.method({
  2301. selector: unescape('to%3Ado%3A'),
  2302. category: 'enumerating',
  2303. fn: function (stop, aBlock){
  2304. var self=this;
  2305. var nextValue=nil;
  2306. (nextValue=self);
  2307. (function(){while((function(){return ((($receiver = nextValue).klass === smalltalk.Number) ? $receiver <=stop : smalltalk.send($receiver, "__lt_eq", [stop]));})()) {(function(){smalltalk.send(aBlock, "_value_", [nextValue]);return (nextValue=((($receiver = nextValue).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));})()}})();
  2308. return self;},
  2309. args: ["stop", "aBlock"],
  2310. source: unescape('to%3A%20stop%20do%3A%20aBlock%0A%09%22Evaluate%20aBlock%20for%20each%20number%20from%20self%20to%20aNumber.%22%0A%09%7C%20nextValue%20%7C%0A%09nextValue%20%3A%3D%20self.%0A%09%5BnextValue%20%3C%3D%20stop%5D%0A%09%09whileTrue%3A%20%0A%09%09%09%5BaBlock%20value%3A%20nextValue.%0A%09%09%09nextValue%20%3A%3D%20nextValue%20+%201%5D'),
  2311. messageSends: ["whileTrue:", unescape("%3C%3D"), "value:", unescape("+")],
  2312. referencedClasses: []
  2313. }),
  2314. smalltalk.Number);
  2315. smalltalk.addMethod(
  2316. unescape('_asString'),
  2317. smalltalk.method({
  2318. selector: unescape('asString'),
  2319. category: 'converting',
  2320. fn: function (){
  2321. var self=this;
  2322. return smalltalk.send(self, "_printString", []);
  2323. return self;},
  2324. args: [],
  2325. source: unescape('asString%0A%09%5Eself%20printString'),
  2326. messageSends: ["printString"],
  2327. referencedClasses: []
  2328. }),
  2329. smalltalk.Number);
  2330. smalltalk.addMethod(
  2331. unescape('_asJavascript'),
  2332. smalltalk.method({
  2333. selector: unescape('asJavascript'),
  2334. category: 'converting',
  2335. fn: function (){
  2336. var self=this;
  2337. return smalltalk.send(smalltalk.send(unescape("%28"), "__comma", [smalltalk.send(self, "_printString", [])]), "__comma", [unescape("%29")]);
  2338. return self;},
  2339. args: [],
  2340. source: unescape('asJavascript%0A%09%5E%27%28%27%2C%20self%20printString%2C%20%27%29%27'),
  2341. messageSends: [unescape("%2C"), "printString"],
  2342. referencedClasses: []
  2343. }),
  2344. smalltalk.Number);
  2345. smalltalk.addMethod(
  2346. unescape('_printString'),
  2347. smalltalk.method({
  2348. selector: unescape('printString'),
  2349. category: 'printing',
  2350. fn: function (){
  2351. var self=this;
  2352. return String(self);
  2353. return self;},
  2354. args: [],
  2355. source: unescape('printString%0A%09%3Creturn%20String%28self%29%3E'),
  2356. messageSends: [],
  2357. referencedClasses: []
  2358. }),
  2359. smalltalk.Number);
  2360. smalltalk.addMethod(
  2361. unescape('_isNumber'),
  2362. smalltalk.method({
  2363. selector: unescape('isNumber'),
  2364. category: 'testing',
  2365. fn: function (){
  2366. var self=this;
  2367. return true;
  2368. return self;},
  2369. args: [],
  2370. source: unescape('isNumber%0A%09%5Etrue'),
  2371. messageSends: [],
  2372. referencedClasses: []
  2373. }),
  2374. smalltalk.Number);
  2375. smalltalk.addMethod(
  2376. unescape('_atRandom'),
  2377. smalltalk.method({
  2378. selector: unescape('atRandom'),
  2379. category: 'converting',
  2380. fn: function (){
  2381. var self=this;
  2382. 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)]));
  2383. return self;},
  2384. args: [],
  2385. source: unescape('atRandom%0A%20%20%20%20%5E%28Random%20new%20next%20*%20self%29%20truncated%20+%201'),
  2386. messageSends: [unescape("+"), "truncated", unescape("*"), "next", "new"],
  2387. referencedClasses: ["Random"]
  2388. }),
  2389. smalltalk.Number);
  2390. smalltalk.addMethod(
  2391. unescape('__at'),
  2392. smalltalk.method({
  2393. selector: unescape('@'),
  2394. category: 'converting',
  2395. fn: function (aNumber){
  2396. var self=this;
  2397. return smalltalk.send((smalltalk.Point || Point), "_x_y_", [self, aNumber]);
  2398. return self;},
  2399. args: ["aNumber"],
  2400. source: unescape('@%20aNumber%0A%09%5EPoint%20x%3A%20self%20y%3A%20aNumber'),
  2401. messageSends: ["x:y:"],
  2402. referencedClasses: ["Point"]
  2403. }),
  2404. smalltalk.Number);
  2405. smalltalk.addMethod(
  2406. unescape('_asPoint'),
  2407. smalltalk.method({
  2408. selector: unescape('asPoint'),
  2409. category: 'converting',
  2410. fn: function (){
  2411. var self=this;
  2412. return smalltalk.send((smalltalk.Point || Point), "_x_y_", [self, self]);
  2413. return self;},
  2414. args: [],
  2415. source: unescape('asPoint%0A%09%5EPoint%20x%3A%20self%20y%3A%20self'),
  2416. messageSends: ["x:y:"],
  2417. referencedClasses: ["Point"]
  2418. }),
  2419. smalltalk.Number);
  2420. smalltalk.addMethod(
  2421. unescape('_clearInterval'),
  2422. smalltalk.method({
  2423. selector: unescape('clearInterval'),
  2424. category: 'timeouts/intervals',
  2425. fn: function (){
  2426. var self=this;
  2427. clearInterval(Number(self));
  2428. return self;},
  2429. args: [],
  2430. source: unescape('clearInterval%0A%09%3CclearInterval%28Number%28self%29%29%3E'),
  2431. messageSends: [],
  2432. referencedClasses: []
  2433. }),
  2434. smalltalk.Number);
  2435. smalltalk.addMethod(
  2436. unescape('_clearTimeout'),
  2437. smalltalk.method({
  2438. selector: unescape('clearTimeout'),
  2439. category: 'timeouts/intervals',
  2440. fn: function (){
  2441. var self=this;
  2442. clearTimeout(Number(self));
  2443. return self;},
  2444. args: [],
  2445. source: unescape('clearTimeout%0A%09%3CclearTimeout%28Number%28self%29%29%3E'),
  2446. messageSends: [],
  2447. referencedClasses: []
  2448. }),
  2449. smalltalk.Number);
  2450. smalltalk.addMethod(
  2451. unescape('_even'),
  2452. smalltalk.method({
  2453. selector: unescape('even'),
  2454. category: 'testing',
  2455. fn: function (){
  2456. var self=this;
  2457. return smalltalk.send((0), "__eq", [smalltalk.send(self, "_\\\\", [(2)])]);
  2458. return self;},
  2459. args: [],
  2460. source: unescape('even%0A%09%5E%200%20%3D%20%28self%20%5C%5C%202%29'),
  2461. messageSends: [unescape("%3D"), unescape("%5C%5C%5C%5C")],
  2462. referencedClasses: []
  2463. }),
  2464. smalltalk.Number);
  2465. smalltalk.addMethod(
  2466. unescape('_odd'),
  2467. smalltalk.method({
  2468. selector: unescape('odd'),
  2469. category: 'testing',
  2470. fn: function (){
  2471. var self=this;
  2472. return smalltalk.send(smalltalk.send(self, "_even", []), "_not", []);
  2473. return self;},
  2474. args: [],
  2475. source: unescape('odd%0A%09%5E%20self%20even%20not'),
  2476. messageSends: ["not", "even"],
  2477. referencedClasses: []
  2478. }),
  2479. smalltalk.Number);
  2480. smalltalk.addMethod(
  2481. unescape('_negated'),
  2482. smalltalk.method({
  2483. selector: unescape('negated'),
  2484. category: 'arithmetic',
  2485. fn: function (){
  2486. var self=this;
  2487. return (0) - self;
  2488. return self;},
  2489. args: [],
  2490. source: unescape('negated%0A%09%5E0%20-%20self'),
  2491. messageSends: [unescape("-")],
  2492. referencedClasses: []
  2493. }),
  2494. smalltalk.Number);
  2495. smalltalk.addMethod(
  2496. unescape('_printShowingDecimalPlaces_'),
  2497. smalltalk.method({
  2498. selector: unescape('printShowingDecimalPlaces%3A'),
  2499. category: 'printing',
  2500. fn: function (placesDesired){
  2501. var self=this;
  2502. return self.toFixed(placesDesired);
  2503. return self;},
  2504. args: ["placesDesired"],
  2505. source: unescape('printShowingDecimalPlaces%3A%20placesDesired%0A%09%3Creturn%20self.toFixed%28placesDesired%29%3E'),
  2506. messageSends: [],
  2507. referencedClasses: []
  2508. }),
  2509. smalltalk.Number);
  2510. smalltalk.addMethod(
  2511. unescape('_%5C'),
  2512. smalltalk.method({
  2513. selector: unescape('%5C'),
  2514. category: '',
  2515. fn: function (aNumber){
  2516. var self=this;
  2517. return self % aNumber;
  2518. return self;},
  2519. args: ["aNumber"],
  2520. source: unescape(''),
  2521. messageSends: [],
  2522. referencedClasses: []
  2523. }),
  2524. smalltalk.Number);
  2525. smalltalk.addMethod(
  2526. unescape('_to_by_'),
  2527. smalltalk.method({
  2528. selector: unescape('to%3Aby%3A'),
  2529. category: 'converting',
  2530. fn: function (stop, step){
  2531. var self=this;
  2532. var array=nil;
  2533. var value=nil;
  2534. var pos=nil;
  2535. (value=self);
  2536. (array=smalltalk.send((smalltalk.Array || Array), "_new", []));
  2537. (pos=(1));
  2538. ((($receiver = smalltalk.send(step, "__eq", [(0)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_error_", [unescape("step%20must%20be%20non-zero")]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self, "_error_", [unescape("step%20must%20be%20non-zero")]);})]));
  2539. ((($receiver = ((($receiver = step).klass === smalltalk.Number) ? $receiver <(0) : smalltalk.send($receiver, "__lt", [(0)]))).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver >=stop : smalltalk.send($receiver, "__gt_eq", [stop]));})()) {(function(){smalltalk.send(array, "_at_put_", [pos, value]);(pos=((($receiver = pos).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));return (value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step])));})()}})();})() : (function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver <=stop : smalltalk.send($receiver, "__lt_eq", [stop]));})()) {(function(){smalltalk.send(array, "_at_put_", [pos, value]);(pos=((($receiver = pos).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));return (value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step])));})()}})();})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver >=stop : smalltalk.send($receiver, "__gt_eq", [stop]));})()) {(function(){smalltalk.send(array, "_at_put_", [pos, value]);(pos=((($receiver = pos).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));return (value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step])));})()}})();}), (function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver <=stop : smalltalk.send($receiver, "__lt_eq", [stop]));})()) {(function(){smalltalk.send(array, "_at_put_", [pos, value]);(pos=((($receiver = pos).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));return (value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step])));})()}})();})]));
  2540. return array;
  2541. return self;},
  2542. args: ["stop", "step"],
  2543. source: unescape('to%3A%20stop%20by%3A%20step%0A%09%7C%20array%20value%20pos%20%7C%0A%09value%20%3A%3D%20self.%0A%09array%20%3A%3D%20Array%20new.%0A%09pos%20%3A%3D%201.%0A%09step%20%3D%200%20ifTrue%3A%20%5Bself%20error%3A%20%27step%20must%20be%20non-zero%27%5D.%0A%09step%20%3C%200%0A%09%09ifTrue%3A%20%5B%5B%20value%20%3E%3D%20stop%20%5D%20whileTrue%3A%20%5B%0A%09%20%20%20%20%09%09%09array%20at%3A%20pos%20put%3A%20value.%0A%09%20%20%20%20%09%09%09pos%20%3A%3D%20pos%20+%201.%0A%09%20%20%20%20%09%09%09value%20%3A%3D%20value%20+%20step%5D%5D%0A%09%09ifFalse%3A%20%5B%5B%20value%20%3C%3D%20stop%20%5D%20whileTrue%3A%20%5B%0A%09%20%20%20%20%09%09%09array%20at%3A%20pos%20put%3A%20value.%0A%09%20%20%09%09%09pos%20%3A%3D%20pos%20+%201.%0A%09%20%20%20%20%09%09%09value%20%3A%3D%20value%20+%20step%5D%5D.%0A%09%5Earray'),
  2544. messageSends: ["new", "ifTrue:", unescape("%3D"), "error:", "ifTrue:ifFalse:", unescape("%3C"), "whileTrue:", unescape("%3E%3D"), "at:put:", unescape("+"), unescape("%3C%3D")],
  2545. referencedClasses: ["Array"]
  2546. }),
  2547. smalltalk.Number);
  2548. smalltalk.addMethod(
  2549. unescape('_to_by_do_'),
  2550. smalltalk.method({
  2551. selector: unescape('to%3Aby%3Ado%3A'),
  2552. category: 'enumerating',
  2553. fn: function (stop, step, aBlock){
  2554. var self=this;
  2555. var value=nil;
  2556. (value=self);
  2557. ((($receiver = smalltalk.send(step, "__eq", [(0)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_error_", [unescape("step%20must%20be%20non-zero")]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self, "_error_", [unescape("step%20must%20be%20non-zero")]);})]));
  2558. ((($receiver = ((($receiver = step).klass === smalltalk.Number) ? $receiver <(0) : smalltalk.send($receiver, "__lt", [(0)]))).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver >=stop : smalltalk.send($receiver, "__gt_eq", [stop]));})()) {(function(){smalltalk.send(aBlock, "_value_", [value]);return (value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step])));})()}})();})() : (function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver <=stop : smalltalk.send($receiver, "__lt_eq", [stop]));})()) {(function(){smalltalk.send(aBlock, "_value_", [value]);return (value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step])));})()}})();})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver >=stop : smalltalk.send($receiver, "__gt_eq", [stop]));})()) {(function(){smalltalk.send(aBlock, "_value_", [value]);return (value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step])));})()}})();}), (function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver <=stop : smalltalk.send($receiver, "__lt_eq", [stop]));})()) {(function(){smalltalk.send(aBlock, "_value_", [value]);return (value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step])));})()}})();})]));
  2559. return self;},
  2560. args: ["stop", "step", "aBlock"],
  2561. source: unescape('to%3A%20stop%20by%3A%20step%20do%3A%20aBlock%0A%09%7C%20value%20%7C%0A%09value%20%3A%3D%20self.%0A%09step%20%3D%200%20ifTrue%3A%20%5Bself%20error%3A%20%27step%20must%20be%20non-zero%27%5D.%0A%09step%20%3C%200%0A%09%09ifTrue%3A%20%5B%5B%20value%20%3E%3D%20stop%20%5D%20whileTrue%3A%20%5B%0A%09%20%20%20%20%09%09%09aBlock%20value%3A%20value.%0A%09%20%20%20%20%09%09%09value%20%3A%3D%20value%20+%20step%5D%5D%0A%09%09ifFalse%3A%20%5B%5B%20value%20%3C%3D%20stop%20%5D%20whileTrue%3A%20%5B%0A%09%20%20%20%20%09%09%09aBlock%20value%3A%20value.%0A%09%20%20%20%20%09%09%09value%20%3A%3D%20value%20+%20step%5D%5D'),
  2562. messageSends: ["ifTrue:", unescape("%3D"), "error:", "ifTrue:ifFalse:", unescape("%3C"), "whileTrue:", unescape("%3E%3D"), "value:", unescape("+"), unescape("%3C%3D")],
  2563. referencedClasses: []
  2564. }),
  2565. smalltalk.Number);
  2566. smalltalk.addMethod(
  2567. unescape('_deepCopy'),
  2568. smalltalk.method({
  2569. selector: unescape('deepCopy'),
  2570. category: 'copying',
  2571. fn: function (){
  2572. var self=this;
  2573. return smalltalk.send(self, "_copy", []);
  2574. return self;},
  2575. args: [],
  2576. source: unescape('deepCopy%0A%09%5Eself%20copy'),
  2577. messageSends: ["copy"],
  2578. referencedClasses: []
  2579. }),
  2580. smalltalk.Number);
  2581. smalltalk.addMethod(
  2582. unescape('_copy'),
  2583. smalltalk.method({
  2584. selector: unescape('copy'),
  2585. category: 'copying',
  2586. fn: function (){
  2587. var self=this;
  2588. return self;
  2589. return self;},
  2590. args: [],
  2591. source: unescape('copy%0A%09%5Eself'),
  2592. messageSends: [],
  2593. referencedClasses: []
  2594. }),
  2595. smalltalk.Number);
  2596. smalltalk.addMethod(
  2597. unescape('_%5C%5C'),
  2598. smalltalk.method({
  2599. selector: unescape('%5C%5C'),
  2600. category: 'arithmetic',
  2601. fn: function (aNumber){
  2602. var self=this;
  2603. return self % aNumber;
  2604. return self;},
  2605. args: ["aNumber"],
  2606. source: unescape('%5C%5C%20aNumber%0A%09%3Creturn%20self%20%25%20aNumber%3E'),
  2607. messageSends: [],
  2608. referencedClasses: []
  2609. }),
  2610. smalltalk.Number);
  2611. smalltalk.addMethod(
  2612. unescape('_sqrt'),
  2613. smalltalk.method({
  2614. selector: unescape('sqrt'),
  2615. category: 'arithmetic',
  2616. fn: function (){
  2617. var self=this;
  2618. return Math.sqrt(self);
  2619. return self;},
  2620. args: [],
  2621. source: unescape('sqrt%0A%09%3Creturn%20Math.sqrt%28self%29%3E'),
  2622. messageSends: [],
  2623. referencedClasses: []
  2624. }),
  2625. smalltalk.Number);
  2626. smalltalk.addMethod(
  2627. unescape('_squared'),
  2628. smalltalk.method({
  2629. selector: unescape('squared'),
  2630. category: 'arithmetic',
  2631. fn: function (){
  2632. var self=this;
  2633. return self * self;
  2634. return self;},
  2635. args: [],
  2636. source: unescape('squared%0A%09%5Eself%20*%20self'),
  2637. messageSends: [unescape("*")],
  2638. referencedClasses: []
  2639. }),
  2640. smalltalk.Number);
  2641. smalltalk.addMethod(
  2642. unescape('_identityHash'),
  2643. smalltalk.method({
  2644. selector: unescape('identityHash'),
  2645. category: 'accessing',
  2646. fn: function (){
  2647. var self=this;
  2648. return smalltalk.send(smalltalk.send(self, "_asString", []), "__comma", ["n"]);
  2649. return self;},
  2650. args: [],
  2651. source: unescape('identityHash%0A%09%5Eself%20asString%2C%20%27n%27'),
  2652. messageSends: [unescape("%2C"), "asString"],
  2653. referencedClasses: []
  2654. }),
  2655. smalltalk.Number);
  2656. smalltalk.addMethod(
  2657. unescape('_negative'),
  2658. smalltalk.method({
  2659. selector: unescape('negative'),
  2660. category: 'testing',
  2661. fn: function (){
  2662. var self=this;
  2663. return self < (0);
  2664. return self;},
  2665. args: [],
  2666. source: unescape('negative%0A%09%22Answer%20whether%20the%20receiver%20is%20mathematically%20negative.%22%0A%0A%09%5E%20self%20%3C%200'),
  2667. messageSends: [unescape("%3C")],
  2668. referencedClasses: []
  2669. }),
  2670. smalltalk.Number);
  2671. smalltalk.addMethod(
  2672. unescape('_positive'),
  2673. smalltalk.method({
  2674. selector: unescape('positive'),
  2675. category: 'testing',
  2676. fn: function (){
  2677. var self=this;
  2678. return self >= (0);
  2679. return self;},
  2680. args: [],
  2681. source: unescape('positive%0A%09%22Answer%20whether%20the%20receiver%20is%20positive%20or%20equal%20to%200.%20%28ST-80%20protocol%29.%22%0A%0A%09%5E%20self%20%3E%3D%200'),
  2682. messageSends: [unescape("%3E%3D")],
  2683. referencedClasses: []
  2684. }),
  2685. smalltalk.Number);
  2686. smalltalk.addMethod(
  2687. unescape('_isZero'),
  2688. smalltalk.method({
  2689. selector: unescape('isZero'),
  2690. category: 'testing',
  2691. fn: function (){
  2692. var self=this;
  2693. return smalltalk.send(self, "__eq", [(0)]);
  2694. return self;},
  2695. args: [],
  2696. source: unescape('isZero%0A%09%5Eself%20%3D%200'),
  2697. messageSends: [unescape("%3D")],
  2698. referencedClasses: []
  2699. }),
  2700. smalltalk.Number);
  2701. smalltalk.addMethod(
  2702. unescape('_pi'),
  2703. smalltalk.method({
  2704. selector: unescape('pi'),
  2705. category: 'instance creation',
  2706. fn: function (){
  2707. var self=this;
  2708. return Math.PI;
  2709. return self;},
  2710. args: [],
  2711. source: unescape('pi%0A%09%3Creturn%20Math.PI%3E'),
  2712. messageSends: [],
  2713. referencedClasses: []
  2714. }),
  2715. smalltalk.Number.klass);
  2716. smalltalk.addClass('Boolean', smalltalk.Object, [], 'Kernel-Objects');
  2717. smalltalk.Boolean.comment=unescape('Boolean%20wraps%20the%20JavaScript%20%60Boolean%28%29%60%20constructor.%20The%20%60true%60%20and%20%60false%60%20objects%20are%20the%20JavaScript%20boolean%20objects.%0A%0ABoolean%20defines%20the%20protocol%20for%20logic%20testing%20operations%20and%20conditional%20control%20structures%20for%20the%20logical%20values.%0ABoolean%20instances%20are%20weither%20%60true%60%20or%20%60false%60.')
  2718. smalltalk.addMethod(
  2719. unescape('__eq'),
  2720. smalltalk.method({
  2721. selector: unescape('%3D'),
  2722. category: 'comparing',
  2723. fn: function (aBoolean){
  2724. var self=this;
  2725. try{((($receiver = smalltalk.send(smalltalk.send(aBoolean, "_class", []), "__eq", [smalltalk.send(self, "_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}})})();})]));
  2726. return Boolean(self == true) == aBoolean;
  2727. return self;
  2728. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
  2729. args: ["aBoolean"],
  2730. source: unescape('%3D%20aBoolean%0A%09aBoolean%20class%20%3D%20self%20class%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09%3Creturn%20Boolean%28self%20%3D%3D%20true%29%20%3D%3D%20aBoolean%3E'),
  2731. messageSends: ["ifFalse:", unescape("%3D"), "class"],
  2732. referencedClasses: []
  2733. }),
  2734. smalltalk.Boolean);
  2735. smalltalk.addMethod(
  2736. unescape('_shallowCopy'),
  2737. smalltalk.method({
  2738. selector: unescape('shallowCopy'),
  2739. category: 'copying',
  2740. fn: function (){
  2741. var self=this;
  2742. return self;
  2743. return self;},
  2744. args: [],
  2745. source: unescape('shallowCopy%0A%09%5Eself'),
  2746. messageSends: [],
  2747. referencedClasses: []
  2748. }),
  2749. smalltalk.Boolean);
  2750. smalltalk.addMethod(
  2751. unescape('_deepCopy'),
  2752. smalltalk.method({
  2753. selector: unescape('deepCopy'),
  2754. category: 'copying',
  2755. fn: function (){
  2756. var self=this;
  2757. return self;
  2758. return self;},
  2759. args: [],
  2760. source: unescape('deepCopy%0A%09%5Eself'),
  2761. messageSends: [],
  2762. referencedClasses: []
  2763. }),
  2764. smalltalk.Boolean);
  2765. smalltalk.addMethod(
  2766. unescape('_ifTrue_'),
  2767. smalltalk.method({
  2768. selector: unescape('ifTrue%3A'),
  2769. category: 'controlling',
  2770. fn: function (aBlock){
  2771. var self=this;
  2772. return smalltalk.send(self, "_ifTrue_ifFalse_", [aBlock, (function(){return nil;})]);
  2773. return self;},
  2774. args: ["aBlock"],
  2775. source: unescape('ifTrue%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself%20ifTrue%3A%20aBlock%20ifFalse%3A%20%5B%5D'),
  2776. messageSends: ["ifTrue:ifFalse:"],
  2777. referencedClasses: []
  2778. }),
  2779. smalltalk.Boolean);
  2780. smalltalk.addMethod(
  2781. unescape('_ifFalse_'),
  2782. smalltalk.method({
  2783. selector: unescape('ifFalse%3A'),
  2784. category: 'controlling',
  2785. fn: function (aBlock){
  2786. var self=this;
  2787. return smalltalk.send(self, "_ifTrue_ifFalse_", [(function(){return nil;}), aBlock]);
  2788. return self;},
  2789. args: ["aBlock"],
  2790. source: unescape('ifFalse%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself%20ifTrue%3A%20%5B%5D%20ifFalse%3A%20aBlock'),
  2791. messageSends: ["ifTrue:ifFalse:"],
  2792. referencedClasses: []
  2793. }),
  2794. smalltalk.Boolean);
  2795. smalltalk.addMethod(
  2796. unescape('_ifFalse_ifTrue_'),
  2797. smalltalk.method({
  2798. selector: unescape('ifFalse%3AifTrue%3A'),
  2799. category: 'controlling',
  2800. fn: function (aBlock, anotherBlock){
  2801. var self=this;
  2802. return smalltalk.send(self, "_ifTrue_ifFalse_", [anotherBlock, aBlock]);
  2803. return self;},
  2804. args: ["aBlock", "anotherBlock"],
  2805. source: unescape('ifFalse%3A%20aBlock%20ifTrue%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself%20ifTrue%3A%20anotherBlock%20ifFalse%3A%20aBlock'),
  2806. messageSends: ["ifTrue:ifFalse:"],
  2807. referencedClasses: []
  2808. }),
  2809. smalltalk.Boolean);
  2810. smalltalk.addMethod(
  2811. unescape('_ifTrue_ifFalse_'),
  2812. smalltalk.method({
  2813. selector: unescape('ifTrue%3AifFalse%3A'),
  2814. category: 'controlling',
  2815. fn: function (aBlock, anotherBlock){
  2816. var self=this;
  2817. if(self == true) {
  2818. return aBlock();
  2819. } else {
  2820. return anotherBlock();
  2821. }
  2822. ;
  2823. return self;},
  2824. args: ["aBlock", "anotherBlock"],
  2825. 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'),
  2826. messageSends: [],
  2827. referencedClasses: []
  2828. }),
  2829. smalltalk.Boolean);
  2830. smalltalk.addMethod(
  2831. unescape('_and_'),
  2832. smalltalk.method({
  2833. selector: unescape('and%3A'),
  2834. category: 'controlling',
  2835. fn: function (aBlock){
  2836. var self=this;
  2837. return smalltalk.send(smalltalk.send(self, "__eq", [true]), "_ifTrue_ifFalse_", [aBlock, (function(){return false;})]);
  2838. return self;},
  2839. args: ["aBlock"],
  2840. 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'),
  2841. messageSends: ["ifTrue:ifFalse:", unescape("%3D")],
  2842. referencedClasses: []
  2843. }),
  2844. smalltalk.Boolean);
  2845. smalltalk.addMethod(
  2846. unescape('_or_'),
  2847. smalltalk.method({
  2848. selector: unescape('or%3A'),
  2849. category: 'controlling',
  2850. fn: function (aBlock){
  2851. var self=this;
  2852. return smalltalk.send(smalltalk.send(self, "__eq", [true]), "_ifTrue_ifFalse_", [(function(){return true;}), aBlock]);
  2853. return self;},
  2854. args: ["aBlock"],
  2855. 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'),
  2856. messageSends: ["ifTrue:ifFalse:", unescape("%3D")],
  2857. referencedClasses: []
  2858. }),
  2859. smalltalk.Boolean);
  2860. smalltalk.addMethod(
  2861. unescape('_not'),
  2862. smalltalk.method({
  2863. selector: unescape('not'),
  2864. category: 'controlling',
  2865. fn: function (){
  2866. var self=this;
  2867. return smalltalk.send(self, "__eq", [false]);
  2868. return self;},
  2869. args: [],
  2870. source: unescape('not%0A%09%5Eself%20%3D%20false'),
  2871. messageSends: [unescape("%3D")],
  2872. referencedClasses: []
  2873. }),
  2874. smalltalk.Boolean);
  2875. smalltalk.addMethod(
  2876. unescape('_printString'),
  2877. smalltalk.method({
  2878. selector: unescape('printString'),
  2879. category: 'printing',
  2880. fn: function (){
  2881. var self=this;
  2882. return self.toString();
  2883. return self;},
  2884. args: [],
  2885. source: unescape('printString%0A%09%3Creturn%20self.toString%28%29%3E'),
  2886. messageSends: [],
  2887. referencedClasses: []
  2888. }),
  2889. smalltalk.Boolean);
  2890. smalltalk.addMethod(
  2891. unescape('_%26'),
  2892. smalltalk.method({
  2893. selector: unescape('%26'),
  2894. category: 'controlling',
  2895. fn: function (aBoolean){
  2896. var self=this;
  2897. if(self == true) {
  2898. return aBoolean;
  2899. } else {
  2900. return false;
  2901. }
  2902. ;
  2903. return self;},
  2904. args: ["aBoolean"],
  2905. 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'),
  2906. messageSends: [],
  2907. referencedClasses: []
  2908. }),
  2909. smalltalk.Boolean);
  2910. smalltalk.addMethod(
  2911. unescape('_%7C'),
  2912. smalltalk.method({
  2913. selector: unescape('%7C'),
  2914. category: 'controlling',
  2915. fn: function (aBoolean){
  2916. var self=this;
  2917. if(self == true) {
  2918. return true;
  2919. } else {
  2920. return aBoolean;
  2921. }
  2922. ;
  2923. return self;},
  2924. args: ["aBoolean"],
  2925. 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'),
  2926. messageSends: [],
  2927. referencedClasses: []
  2928. }),
  2929. smalltalk.Boolean);
  2930. smalltalk.addClass('Date', smalltalk.Object, [], 'Kernel-Objects');
  2931. smalltalk.Date.comment=unescape('The%20Date%20class%20is%20used%20to%20work%20with%20dates%20and%20times.%20Therefore%20%60Date%20today%60%20and%20%60Date%20now%60%20are%20both%20valid%20in%0AAmber%20and%20answer%20the%20same%20date%20object.%0A%0ADate%20wraps%20the%20%60Date%28%29%60%20JavaScript%20constructor%2C%20and%20Smalltalk%20date%20objects%20are%20JavaScript%20date%20objects.')
  2932. smalltalk.addMethod(
  2933. unescape('_year'),
  2934. smalltalk.method({
  2935. selector: unescape('year'),
  2936. category: 'accessing',
  2937. fn: function (){
  2938. var self=this;
  2939. return self.getFullYear();
  2940. return self;},
  2941. args: [],
  2942. source: unescape('year%0A%09%3Creturn%20self.getFullYear%28%29%3E'),
  2943. messageSends: [],
  2944. referencedClasses: []
  2945. }),
  2946. smalltalk.Date);
  2947. smalltalk.addMethod(
  2948. unescape('_month'),
  2949. smalltalk.method({
  2950. selector: unescape('month'),
  2951. category: 'accessing',
  2952. fn: function (){
  2953. var self=this;
  2954. return self.getMonth() + 1;
  2955. return self;},
  2956. args: [],
  2957. source: unescape('month%0A%09%3Creturn%20self.getMonth%28%29%20+%201%3E'),
  2958. messageSends: [],
  2959. referencedClasses: []
  2960. }),
  2961. smalltalk.Date);
  2962. smalltalk.addMethod(
  2963. unescape('_month_'),
  2964. smalltalk.method({
  2965. selector: unescape('month%3A'),
  2966. category: 'accessing',
  2967. fn: function (aNumber){
  2968. var self=this;
  2969. self.setMonth(aNumber - 1);
  2970. return self;},
  2971. args: ["aNumber"],
  2972. source: unescape('month%3A%20aNumber%0A%09%3Cself.setMonth%28aNumber%20-%201%29%3E'),
  2973. messageSends: [],
  2974. referencedClasses: []
  2975. }),
  2976. smalltalk.Date);
  2977. smalltalk.addMethod(
  2978. unescape('_day'),
  2979. smalltalk.method({
  2980. selector: unescape('day'),
  2981. category: 'accessing',
  2982. fn: function (){
  2983. var self=this;
  2984. return smalltalk.send(self, "_dayOfWeek", []);
  2985. return self;},
  2986. args: [],
  2987. source: unescape('day%0A%09%5Eself%20dayOfWeek'),
  2988. messageSends: ["dayOfWeek"],
  2989. referencedClasses: []
  2990. }),
  2991. smalltalk.Date);
  2992. smalltalk.addMethod(
  2993. unescape('_dayOfWeek'),
  2994. smalltalk.method({
  2995. selector: unescape('dayOfWeek'),
  2996. category: 'accessing',
  2997. fn: function (){
  2998. var self=this;
  2999. return self.getDay() + 1;
  3000. return self;},
  3001. args: [],
  3002. source: unescape('dayOfWeek%0A%09%3Creturn%20self.getDay%28%29%20+%201%3E'),
  3003. messageSends: [],
  3004. referencedClasses: []
  3005. }),
  3006. smalltalk.Date);
  3007. smalltalk.addMethod(
  3008. unescape('_dayOfWeek_'),
  3009. smalltalk.method({
  3010. selector: unescape('dayOfWeek%3A'),
  3011. category: 'accessing',
  3012. fn: function (aNumber){
  3013. var self=this;
  3014. return self.setDay(aNumber - 1);
  3015. return self;},
  3016. args: ["aNumber"],
  3017. source: unescape('dayOfWeek%3A%20aNumber%0A%09%3Creturn%20self.setDay%28aNumber%20-%201%29%3E'),
  3018. messageSends: [],
  3019. referencedClasses: []
  3020. }),
  3021. smalltalk.Date);
  3022. smalltalk.addMethod(
  3023. unescape('_day_'),
  3024. smalltalk.method({
  3025. selector: unescape('day%3A'),
  3026. category: 'accessing',
  3027. fn: function (aNumber){
  3028. var self=this;
  3029. smalltalk.send(self, "_day_", [aNumber]);
  3030. return self;},
  3031. args: ["aNumber"],
  3032. source: unescape('day%3A%20aNumber%0A%09self%20day%3A%20aNumber'),
  3033. messageSends: ["day:"],
  3034. referencedClasses: []
  3035. }),
  3036. smalltalk.Date);
  3037. smalltalk.addMethod(
  3038. unescape('_year_'),
  3039. smalltalk.method({
  3040. selector: unescape('year%3A'),
  3041. category: 'accessing',
  3042. fn: function (aNumber){
  3043. var self=this;
  3044. self.setFullYear(aNumber);
  3045. return self;},
  3046. args: ["aNumber"],
  3047. source: unescape('year%3A%20aNumber%0A%09%3Cself.setFullYear%28aNumber%29%3E'),
  3048. messageSends: [],
  3049. referencedClasses: []
  3050. }),
  3051. smalltalk.Date);
  3052. smalltalk.addMethod(
  3053. unescape('_dayOfMonth'),
  3054. smalltalk.method({
  3055. selector: unescape('dayOfMonth'),
  3056. category: 'accessing',
  3057. fn: function (){
  3058. var self=this;
  3059. return self.getDate();
  3060. return self;},
  3061. args: [],
  3062. source: unescape('dayOfMonth%0A%09%3Creturn%20self.getDate%28%29%3E'),
  3063. messageSends: [],
  3064. referencedClasses: []
  3065. }),
  3066. smalltalk.Date);
  3067. smalltalk.addMethod(
  3068. unescape('_dayOfMonth_'),
  3069. smalltalk.method({
  3070. selector: unescape('dayOfMonth%3A'),
  3071. category: 'accessing',
  3072. fn: function (aNumber){
  3073. var self=this;
  3074. self.setDate(aNumber);
  3075. return self;},
  3076. args: ["aNumber"],
  3077. source: unescape('dayOfMonth%3A%20aNumber%0A%09%3Cself.setDate%28aNumber%29%3E'),
  3078. messageSends: [],
  3079. referencedClasses: []
  3080. }),
  3081. smalltalk.Date);
  3082. smalltalk.addMethod(
  3083. unescape('_asString'),
  3084. smalltalk.method({
  3085. selector: unescape('asString'),
  3086. category: 'converting',
  3087. fn: function (){
  3088. var self=this;
  3089. return self.toString();
  3090. return self;},
  3091. args: [],
  3092. source: unescape('asString%0A%09%3Creturn%20self.toString%28%29%3E'),
  3093. messageSends: [],
  3094. referencedClasses: []
  3095. }),
  3096. smalltalk.Date);
  3097. smalltalk.addMethod(
  3098. unescape('_printString'),
  3099. smalltalk.method({
  3100. selector: unescape('printString'),
  3101. category: 'printing',
  3102. fn: function (){
  3103. var self=this;
  3104. return smalltalk.send(self, "_asString", []);
  3105. return self;},
  3106. args: [],
  3107. source: unescape('printString%0A%09%5Eself%20asString'),
  3108. messageSends: ["asString"],
  3109. referencedClasses: []
  3110. }),
  3111. smalltalk.Date);
  3112. smalltalk.addMethod(
  3113. unescape('_asMilliseconds'),
  3114. smalltalk.method({
  3115. selector: unescape('asMilliseconds'),
  3116. category: 'converting',
  3117. fn: function (){
  3118. var self=this;
  3119. return smalltalk.send(self, "_time", []);
  3120. return self;},
  3121. args: [],
  3122. source: unescape('asMilliseconds%0A%09%5Eself%20time'),
  3123. messageSends: ["time"],
  3124. referencedClasses: []
  3125. }),
  3126. smalltalk.Date);
  3127. smalltalk.addMethod(
  3128. unescape('_time'),
  3129. smalltalk.method({
  3130. selector: unescape('time'),
  3131. category: 'accessing',
  3132. fn: function (){
  3133. var self=this;
  3134. return self.getTime();
  3135. return self;},
  3136. args: [],
  3137. source: unescape('time%0A%09%3Creturn%20self.getTime%28%29%3E'),
  3138. messageSends: [],
  3139. referencedClasses: []
  3140. }),
  3141. smalltalk.Date);
  3142. smalltalk.addMethod(
  3143. unescape('_time_'),
  3144. smalltalk.method({
  3145. selector: unescape('time%3A'),
  3146. category: 'accessing',
  3147. fn: function (aNumber){
  3148. var self=this;
  3149. self.setTime(aNumber);
  3150. return self;},
  3151. args: ["aNumber"],
  3152. source: unescape('time%3A%20aNumber%0A%09%3Cself.setTime%28aNumber%29%3E'),
  3153. messageSends: [],
  3154. referencedClasses: []
  3155. }),
  3156. smalltalk.Date);
  3157. smalltalk.addMethod(
  3158. unescape('_asDateString'),
  3159. smalltalk.method({
  3160. selector: unescape('asDateString'),
  3161. category: 'converting',
  3162. fn: function (){
  3163. var self=this;
  3164. return self.toDateString();
  3165. return self;},
  3166. args: [],
  3167. source: unescape('asDateString%0A%09%3Creturn%20self.toDateString%28%29%3E'),
  3168. messageSends: [],
  3169. referencedClasses: []
  3170. }),
  3171. smalltalk.Date);
  3172. smalltalk.addMethod(
  3173. unescape('_asTimeString'),
  3174. smalltalk.method({
  3175. selector: unescape('asTimeString'),
  3176. category: 'converting',
  3177. fn: function (){
  3178. var self=this;
  3179. return self.toTimeString();
  3180. return self;},
  3181. args: [],
  3182. source: unescape('asTimeString%0A%09%3Creturn%20self.toTimeString%28%29%3E'),
  3183. messageSends: [],
  3184. referencedClasses: []
  3185. }),
  3186. smalltalk.Date);
  3187. smalltalk.addMethod(
  3188. unescape('_asLocaleString'),
  3189. smalltalk.method({
  3190. selector: unescape('asLocaleString'),
  3191. category: 'converting',
  3192. fn: function (){
  3193. var self=this;
  3194. return self.toLocaleString();
  3195. return self;},
  3196. args: [],
  3197. source: unescape('asLocaleString%0A%09%3Creturn%20self.toLocaleString%28%29%3E'),
  3198. messageSends: [],
  3199. referencedClasses: []
  3200. }),
  3201. smalltalk.Date);
  3202. smalltalk.addMethod(
  3203. unescape('_asNumber'),
  3204. smalltalk.method({
  3205. selector: unescape('asNumber'),
  3206. category: 'converting',
  3207. fn: function (){
  3208. var self=this;
  3209. return smalltalk.send(self, "_asMilliseconds", []);
  3210. return self;},
  3211. args: [],
  3212. source: unescape('asNumber%0A%09%5Eself%20asMilliseconds'),
  3213. messageSends: ["asMilliseconds"],
  3214. referencedClasses: []
  3215. }),
  3216. smalltalk.Date);
  3217. smalltalk.addMethod(
  3218. unescape('_hours_'),
  3219. smalltalk.method({
  3220. selector: unescape('hours%3A'),
  3221. category: 'accessing',
  3222. fn: function (aNumber){
  3223. var self=this;
  3224. self.setHours(aNumber);
  3225. return self;},
  3226. args: ["aNumber"],
  3227. source: unescape('hours%3A%20aNumber%0A%09%3Cself.setHours%28aNumber%29%3E'),
  3228. messageSends: [],
  3229. referencedClasses: []
  3230. }),
  3231. smalltalk.Date);
  3232. smalltalk.addMethod(
  3233. unescape('_minutes_'),
  3234. smalltalk.method({
  3235. selector: unescape('minutes%3A'),
  3236. category: 'accessing',
  3237. fn: function (aNumber){
  3238. var self=this;
  3239. self.setMinutes(aNumber);
  3240. return self;},
  3241. args: ["aNumber"],
  3242. source: unescape('minutes%3A%20aNumber%0A%09%3Cself.setMinutes%28aNumber%29%3E'),
  3243. messageSends: [],
  3244. referencedClasses: []
  3245. }),
  3246. smalltalk.Date);
  3247. smalltalk.addMethod(
  3248. unescape('_seconds_'),
  3249. smalltalk.method({
  3250. selector: unescape('seconds%3A'),
  3251. category: 'accessing',
  3252. fn: function (aNumber){
  3253. var self=this;
  3254. self.setSeconds(aNumber);
  3255. return self;},
  3256. args: ["aNumber"],
  3257. source: unescape('seconds%3A%20aNumber%0A%09%3Cself.setSeconds%28aNumber%29%3E'),
  3258. messageSends: [],
  3259. referencedClasses: []
  3260. }),
  3261. smalltalk.Date);
  3262. smalltalk.addMethod(
  3263. unescape('_milliseconds_'),
  3264. smalltalk.method({
  3265. selector: unescape('milliseconds%3A'),
  3266. category: 'accessing',
  3267. fn: function (aNumber){
  3268. var self=this;
  3269. self.setMilliseconds(aNumber);
  3270. return self;},
  3271. args: ["aNumber"],
  3272. source: unescape('milliseconds%3A%20aNumber%0A%09%3Cself.setMilliseconds%28aNumber%29%3E'),
  3273. messageSends: [],
  3274. referencedClasses: []
  3275. }),
  3276. smalltalk.Date);
  3277. smalltalk.addMethod(
  3278. unescape('_hours'),
  3279. smalltalk.method({
  3280. selector: unescape('hours'),
  3281. category: 'accessing',
  3282. fn: function (){
  3283. var self=this;
  3284. return self.getHours();
  3285. return self;},
  3286. args: [],
  3287. source: unescape('hours%0A%09%3Creturn%20self.getHours%28%29%3E'),
  3288. messageSends: [],
  3289. referencedClasses: []
  3290. }),
  3291. smalltalk.Date);
  3292. smalltalk.addMethod(
  3293. unescape('_minutes'),
  3294. smalltalk.method({
  3295. selector: unescape('minutes'),
  3296. category: 'accessing',
  3297. fn: function (){
  3298. var self=this;
  3299. return self.getMinutes();
  3300. return self;},
  3301. args: [],
  3302. source: unescape('minutes%0A%09%3Creturn%20self.getMinutes%28%29%3E'),
  3303. messageSends: [],
  3304. referencedClasses: []
  3305. }),
  3306. smalltalk.Date);
  3307. smalltalk.addMethod(
  3308. unescape('_seconds'),
  3309. smalltalk.method({
  3310. selector: unescape('seconds'),
  3311. category: 'accessing',
  3312. fn: function (){
  3313. var self=this;
  3314. return self.getSeconds();
  3315. return self;},
  3316. args: [],
  3317. source: unescape('seconds%0A%09%3Creturn%20self.getSeconds%28%29%3E'),
  3318. messageSends: [],
  3319. referencedClasses: []
  3320. }),
  3321. smalltalk.Date);
  3322. smalltalk.addMethod(
  3323. unescape('_milliseconds'),
  3324. smalltalk.method({
  3325. selector: unescape('milliseconds'),
  3326. category: 'accessing',
  3327. fn: function (){
  3328. var self=this;
  3329. return self.getMilliseconds();
  3330. return self;},
  3331. args: [],
  3332. source: unescape('milliseconds%0A%09%3Creturn%20self.getMilliseconds%28%29%3E'),
  3333. messageSends: [],
  3334. referencedClasses: []
  3335. }),
  3336. smalltalk.Date);
  3337. smalltalk.addMethod(
  3338. unescape('__lt'),
  3339. smalltalk.method({
  3340. selector: unescape('%3C'),
  3341. category: 'comparing',
  3342. fn: function (aDate){
  3343. var self=this;
  3344. return self < aDate;
  3345. return self;},
  3346. args: ["aDate"],
  3347. source: unescape('%3C%20aDate%0A%09%3Creturn%20self%20%3C%20aDate%3E'),
  3348. messageSends: [],
  3349. referencedClasses: []
  3350. }),
  3351. smalltalk.Date);
  3352. smalltalk.addMethod(
  3353. unescape('__gt'),
  3354. smalltalk.method({
  3355. selector: unescape('%3E'),
  3356. category: 'comparing',
  3357. fn: function (aDate){
  3358. var self=this;
  3359. return self > aDate;
  3360. return self;},
  3361. args: ["aDate"],
  3362. source: unescape('%3E%20aDate%0A%09%3Creturn%20self%20%3E%3E%20aDate%3E'),
  3363. messageSends: [],
  3364. referencedClasses: []
  3365. }),
  3366. smalltalk.Date);
  3367. smalltalk.addMethod(
  3368. unescape('__lt_eq'),
  3369. smalltalk.method({
  3370. selector: unescape('%3C%3D'),
  3371. category: 'comparing',
  3372. fn: function (aDate){
  3373. var self=this;
  3374. return self <= aDate;
  3375. return self;},
  3376. args: ["aDate"],
  3377. source: unescape('%3C%3D%20aDate%0A%09%3Creturn%20self%20%3C%3D%20aDate%3E'),
  3378. messageSends: [],
  3379. referencedClasses: []
  3380. }),
  3381. smalltalk.Date);
  3382. smalltalk.addMethod(
  3383. unescape('__gt_eq'),
  3384. smalltalk.method({
  3385. selector: unescape('%3E%3D'),
  3386. category: 'comparing',
  3387. fn: function (aDate){
  3388. var self=this;
  3389. return self >= aDate;
  3390. return self;},
  3391. args: ["aDate"],
  3392. source: unescape('%3E%3D%20aDate%0A%09%3Creturn%20self%20%3E%3E%3D%20aDate%3E'),
  3393. messageSends: [],
  3394. referencedClasses: []
  3395. }),
  3396. smalltalk.Date);
  3397. smalltalk.addMethod(
  3398. unescape('__minus'),
  3399. smalltalk.method({
  3400. selector: unescape('-'),
  3401. category: 'arithmetic',
  3402. fn: function (aDate){
  3403. var self=this;
  3404. return self - aDate;
  3405. return self;},
  3406. args: ["aDate"],
  3407. source: unescape('-%20aDate%0A%09%3Creturn%20self%20-%20aDate%3E'),
  3408. messageSends: [],
  3409. referencedClasses: []
  3410. }),
  3411. smalltalk.Date);
  3412. smalltalk.addMethod(
  3413. unescape('__plus'),
  3414. smalltalk.method({
  3415. selector: unescape('+'),
  3416. category: 'arithmetic',
  3417. fn: function (aDate){
  3418. var self=this;
  3419. return self + aDate;
  3420. return self;},
  3421. args: ["aDate"],
  3422. source: unescape('+%20aDate%0A%09%3Creturn%20self%20+%20aDate%3E'),
  3423. messageSends: [],
  3424. referencedClasses: []
  3425. }),
  3426. smalltalk.Date);
  3427. smalltalk.addMethod(
  3428. unescape('_new_'),
  3429. smalltalk.method({
  3430. selector: unescape('new%3A'),
  3431. category: 'instance creation',
  3432. fn: function (anObject){
  3433. var self=this;
  3434. return new Date(anObject);
  3435. return self;},
  3436. args: ["anObject"],
  3437. source: unescape('new%3A%20anObject%0A%09%3Creturn%20new%20Date%28anObject%29%3E'),
  3438. messageSends: [],
  3439. referencedClasses: []
  3440. }),
  3441. smalltalk.Date.klass);
  3442. smalltalk.addMethod(
  3443. unescape('_fromString_'),
  3444. smalltalk.method({
  3445. selector: unescape('fromString%3A'),
  3446. category: 'instance creation',
  3447. fn: function (aString){
  3448. var self=this;
  3449. return smalltalk.send(self, "_new_", [aString]);
  3450. return self;},
  3451. args: ["aString"],
  3452. 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'),
  3453. messageSends: ["new:"],
  3454. referencedClasses: []
  3455. }),
  3456. smalltalk.Date.klass);
  3457. smalltalk.addMethod(
  3458. unescape('_fromSeconds_'),
  3459. smalltalk.method({
  3460. selector: unescape('fromSeconds%3A'),
  3461. category: 'instance creation',
  3462. fn: function (aNumber){
  3463. var self=this;
  3464. return smalltalk.send(self, "_fromMilliseconds_", [((($receiver = aNumber).klass === smalltalk.Number) ? $receiver *(1000) : smalltalk.send($receiver, "__star", [(1000)]))]);
  3465. return self;},
  3466. args: ["aNumber"],
  3467. source: unescape('fromSeconds%3A%20aNumber%0A%09%5Eself%20fromMilliseconds%3A%20aNumber%20*%201000'),
  3468. messageSends: ["fromMilliseconds:", unescape("*")],
  3469. referencedClasses: []
  3470. }),
  3471. smalltalk.Date.klass);
  3472. smalltalk.addMethod(
  3473. unescape('_fromMilliseconds_'),
  3474. smalltalk.method({
  3475. selector: unescape('fromMilliseconds%3A'),
  3476. category: 'instance creation',
  3477. fn: function (aNumber){
  3478. var self=this;
  3479. return smalltalk.send(self, "_new_", [aNumber]);
  3480. return self;},
  3481. args: ["aNumber"],
  3482. source: unescape('fromMilliseconds%3A%20aNumber%0A%09%5Eself%20new%3A%20aNumber'),
  3483. messageSends: ["new:"],
  3484. referencedClasses: []
  3485. }),
  3486. smalltalk.Date.klass);
  3487. smalltalk.addMethod(
  3488. unescape('_today'),
  3489. smalltalk.method({
  3490. selector: unescape('today'),
  3491. category: 'instance creation',
  3492. fn: function (){
  3493. var self=this;
  3494. return smalltalk.send(self, "_new", []);
  3495. return self;},
  3496. args: [],
  3497. source: unescape('today%0A%09%5Eself%20new'),
  3498. messageSends: ["new"],
  3499. referencedClasses: []
  3500. }),
  3501. smalltalk.Date.klass);
  3502. smalltalk.addMethod(
  3503. unescape('_now'),
  3504. smalltalk.method({
  3505. selector: unescape('now'),
  3506. category: 'instance creation',
  3507. fn: function (){
  3508. var self=this;
  3509. return smalltalk.send(self, "_today", []);
  3510. return self;},
  3511. args: [],
  3512. source: unescape('now%0A%09%5Eself%20today'),
  3513. messageSends: ["today"],
  3514. referencedClasses: []
  3515. }),
  3516. smalltalk.Date.klass);
  3517. smalltalk.addMethod(
  3518. unescape('_millisecondsToRun_'),
  3519. smalltalk.method({
  3520. selector: unescape('millisecondsToRun%3A'),
  3521. category: 'instance creation',
  3522. fn: function (aBlock){
  3523. var self=this;
  3524. var t=nil;
  3525. (t=smalltalk.send((smalltalk.Date || Date), "_now", []));
  3526. smalltalk.send(aBlock, "_value", []);
  3527. return ((($receiver = smalltalk.send((smalltalk.Date || Date), "_now", [])).klass === smalltalk.Number) ? $receiver -t : smalltalk.send($receiver, "__minus", [t]));
  3528. return self;},
  3529. args: ["aBlock"],
  3530. 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'),
  3531. messageSends: ["now", "value", unescape("-")],
  3532. referencedClasses: ["Date"]
  3533. }),
  3534. smalltalk.Date.klass);
  3535. smalltalk.addClass('UndefinedObject', smalltalk.Object, [], 'Kernel-Objects');
  3536. smalltalk.UndefinedObject.comment=unescape('UndefinedObject%20describes%20the%20behavior%20of%20its%20sole%20instance%2C%20%60nil%60.%20%60nil%60%20represents%20a%20prior%20value%20for%20variables%20that%20have%20not%20been%20initialized%2C%20or%20for%20results%20which%20are%20meaningless.%0A%0A%60nil%60%20is%20the%20Smalltalk%20representation%20of%20the%20%60undefined%60%20JavaScript%20object.')
  3537. smalltalk.addMethod(
  3538. unescape('_subclass_instanceVariableNames_'),
  3539. smalltalk.method({
  3540. selector: unescape('subclass%3AinstanceVariableNames%3A'),
  3541. category: 'class creation',
  3542. fn: function (aString, anotherString){
  3543. var self=this;
  3544. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, anotherString, nil]);
  3545. return self;},
  3546. args: ["aString", "anotherString"],
  3547. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20anotherString%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20anotherString%20package%3A%20nil'),
  3548. messageSends: ["subclass:instanceVariableNames:package:"],
  3549. referencedClasses: []
  3550. }),
  3551. smalltalk.UndefinedObject);
  3552. smalltalk.addMethod(
  3553. unescape('_subclass_instanceVariableNames_category_'),
  3554. smalltalk.method({
  3555. selector: unescape('subclass%3AinstanceVariableNames%3Acategory%3A'),
  3556. category: 'class creation',
  3557. fn: function (aString, aString2, aString3){
  3558. var self=this;
  3559. smalltalk.send(self, "_deprecatedAPI", []);
  3560. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
  3561. return self;},
  3562. args: ["aString", "aString2", "aString3"],
  3563. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20category%3A%20aString3%0A%09%22Kept%20for%20compatibility.%22%0A%09self%20deprecatedAPI.%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3'),
  3564. messageSends: ["deprecatedAPI", "subclass:instanceVariableNames:package:"],
  3565. referencedClasses: []
  3566. }),
  3567. smalltalk.UndefinedObject);
  3568. smalltalk.addMethod(
  3569. unescape('_shallowCopy'),
  3570. smalltalk.method({
  3571. selector: unescape('shallowCopy'),
  3572. category: 'copying',
  3573. fn: function (){
  3574. var self=this;
  3575. return self;
  3576. return self;},
  3577. args: [],
  3578. source: unescape('shallowCopy%0A%09%5Eself'),
  3579. messageSends: [],
  3580. referencedClasses: []
  3581. }),
  3582. smalltalk.UndefinedObject);
  3583. smalltalk.addMethod(
  3584. unescape('_deepCopy'),
  3585. smalltalk.method({
  3586. selector: unescape('deepCopy'),
  3587. category: 'copying',
  3588. fn: function (){
  3589. var self=this;
  3590. return self;
  3591. return self;},
  3592. args: [],
  3593. source: unescape('deepCopy%0A%09%5Eself'),
  3594. messageSends: [],
  3595. referencedClasses: []
  3596. }),
  3597. smalltalk.UndefinedObject);
  3598. smalltalk.addMethod(
  3599. unescape('_ifNil_'),
  3600. smalltalk.method({
  3601. selector: unescape('ifNil%3A'),
  3602. category: 'testing',
  3603. fn: function (aBlock){
  3604. var self=this;
  3605. return smalltalk.send(self, "_ifNil_ifNotNil_", [aBlock, (function(){return nil;})]);
  3606. return self;},
  3607. args: ["aBlock"],
  3608. source: unescape('ifNil%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself%20ifNil%3A%20aBlock%20ifNotNil%3A%20%5B%5D'),
  3609. messageSends: ["ifNil:ifNotNil:"],
  3610. referencedClasses: []
  3611. }),
  3612. smalltalk.UndefinedObject);
  3613. smalltalk.addMethod(
  3614. unescape('_ifNotNil_'),
  3615. smalltalk.method({
  3616. selector: unescape('ifNotNil%3A'),
  3617. category: 'testing',
  3618. fn: function (aBlock){
  3619. var self=this;
  3620. return self;
  3621. return self;},
  3622. args: ["aBlock"],
  3623. source: unescape('ifNotNil%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself'),
  3624. messageSends: [],
  3625. referencedClasses: []
  3626. }),
  3627. smalltalk.UndefinedObject);
  3628. smalltalk.addMethod(
  3629. unescape('_ifNil_ifNotNil_'),
  3630. smalltalk.method({
  3631. selector: unescape('ifNil%3AifNotNil%3A'),
  3632. category: 'testing',
  3633. fn: function (aBlock, anotherBlock){
  3634. var self=this;
  3635. return smalltalk.send(aBlock, "_value", []);
  3636. return self;},
  3637. args: ["aBlock", "anotherBlock"],
  3638. source: unescape('ifNil%3A%20aBlock%20ifNotNil%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EaBlock%20value'),
  3639. messageSends: ["value"],
  3640. referencedClasses: []
  3641. }),
  3642. smalltalk.UndefinedObject);
  3643. smalltalk.addMethod(
  3644. unescape('_ifNotNil_ifNil_'),
  3645. smalltalk.method({
  3646. selector: unescape('ifNotNil%3AifNil%3A'),
  3647. category: 'testing',
  3648. fn: function (aBlock, anotherBlock){
  3649. var self=this;
  3650. return smalltalk.send(anotherBlock, "_value", []);
  3651. return self;},
  3652. args: ["aBlock", "anotherBlock"],
  3653. source: unescape('ifNotNil%3A%20aBlock%20ifNil%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EanotherBlock%20value'),
  3654. messageSends: ["value"],
  3655. referencedClasses: []
  3656. }),
  3657. smalltalk.UndefinedObject);
  3658. smalltalk.addMethod(
  3659. unescape('_isNil'),
  3660. smalltalk.method({
  3661. selector: unescape('isNil'),
  3662. category: 'testing',
  3663. fn: function (){
  3664. var self=this;
  3665. return true;
  3666. return self;},
  3667. args: [],
  3668. source: unescape('isNil%0A%09%5Etrue'),
  3669. messageSends: [],
  3670. referencedClasses: []
  3671. }),
  3672. smalltalk.UndefinedObject);
  3673. smalltalk.addMethod(
  3674. unescape('_notNil'),
  3675. smalltalk.method({
  3676. selector: unescape('notNil'),
  3677. category: 'testing',
  3678. fn: function (){
  3679. var self=this;
  3680. return false;
  3681. return self;},
  3682. args: [],
  3683. source: unescape('notNil%0A%09%5Efalse'),
  3684. messageSends: [],
  3685. referencedClasses: []
  3686. }),
  3687. smalltalk.UndefinedObject);
  3688. smalltalk.addMethod(
  3689. unescape('_printString'),
  3690. smalltalk.method({
  3691. selector: unescape('printString'),
  3692. category: 'printing',
  3693. fn: function (){
  3694. var self=this;
  3695. return "nil";
  3696. return self;},
  3697. args: [],
  3698. source: unescape('printString%0A%20%20%20%20%5E%27nil%27'),
  3699. messageSends: [],
  3700. referencedClasses: []
  3701. }),
  3702. smalltalk.UndefinedObject);
  3703. smalltalk.addMethod(
  3704. unescape('_subclass_instanceVariableNames_package_'),
  3705. smalltalk.method({
  3706. selector: unescape('subclass%3AinstanceVariableNames%3Apackage%3A'),
  3707. category: 'class creation',
  3708. fn: function (aString, aString2, aString3){
  3709. var self=this;
  3710. return smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_superclass_subclass_instanceVariableNames_package_", [self, aString, aString2, aString3]);
  3711. return self;},
  3712. args: ["aString", "aString2", "aString3"],
  3713. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3%0A%09%5EClassBuilder%20new%0A%09%20%20%20%20superclass%3A%20self%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3'),
  3714. messageSends: ["superclass:subclass:instanceVariableNames:package:", "new"],
  3715. referencedClasses: ["ClassBuilder"]
  3716. }),
  3717. smalltalk.UndefinedObject);
  3718. smalltalk.addMethod(
  3719. unescape('_new'),
  3720. smalltalk.method({
  3721. selector: unescape('new'),
  3722. category: 'instance creation',
  3723. fn: function (){
  3724. var self=this;
  3725. smalltalk.send(self, "_error_", ["You cannot create new instances of UndefinedObject. Use nil"]);
  3726. return self;},
  3727. args: [],
  3728. source: unescape('new%0A%09%20%20%20%20self%20error%3A%20%27You%20cannot%20create%20new%20instances%20of%20UndefinedObject.%20Use%20nil%27'),
  3729. messageSends: ["error:"],
  3730. referencedClasses: []
  3731. }),
  3732. smalltalk.UndefinedObject.klass);
  3733. smalltalk.addClass('Random', smalltalk.Object, [], 'Kernel-Objects');
  3734. smalltalk.Random.comment=unescape('%60Random%60%20is%20a%20random%20number%20generator%20and%20is%20implemented%20as%20a%20trivial%20wrapper%20around%20javascript%20%60Math.random%28%29%60%20and%20is%20used%20like%20this%3A%0A%0A%09Random%20new%20next%0A%0AThis%20will%20return%20a%20float%20x%20where%20x%20%3C%201%20and%20x%20%3E%200.%20If%20you%20want%20a%20random%20integer%20from%201%20to%2010%20you%20can%20use%20%60%23atRandom%60%0A%0A%0910%20atRandom%0A%0A...and%20if%20you%20want%20a%20random%20number%20in%20a%20specific%20interval%20this%20also%20works%3A%0A%0A%09%283%20to%3A%207%29%20atRandom%0A%0A...but%20be%20aware%20that%20%60%23to%3A%60%20does%20not%20create%20an%20Interval%20as%20in%20other%20Smalltalk%20implementations%20but%20in%20fact%20an%20%60Array%60%20of%20numbers%2C%20so%20it%27s%20better%20to%20use%3A%0A%0A%095%20atRandom%20+%202%0A%0ASince%20%60%23atRandom%60%20is%20implemented%20in%20%60SequencableCollection%60%20you%20can%20easy%20pick%20an%20element%20at%20random%3A%0A%0A%09%23%28%27a%27%20%27b%27%20%27c%27%29%20atRandom%0A%0A...or%20perhaps%20a%20letter%20from%20a%20%60String%60%3A%0A%0A%09%27abc%27%20atRandom%0A%0ASince%20Amber%20does%20not%20have%20Characters%20this%20will%20return%20a%20%60String%60%20of%20length%201%20like%20for%20example%20%60%27b%27%60.')
  3735. smalltalk.addMethod(
  3736. unescape('_next'),
  3737. smalltalk.method({
  3738. selector: unescape('next'),
  3739. category: 'accessing',
  3740. fn: function (){
  3741. var self=this;
  3742. return Math.random();
  3743. return self;},
  3744. args: [],
  3745. source: unescape('next%0A%09%3Creturn%20Math.random%28%29%3E'),
  3746. messageSends: [],
  3747. referencedClasses: []
  3748. }),
  3749. smalltalk.Random);
  3750. smalltalk.addMethod(
  3751. unescape('_next_'),
  3752. smalltalk.method({
  3753. selector: unescape('next%3A'),
  3754. category: 'accessing',
  3755. fn: function (anInteger){
  3756. var self=this;
  3757. return smalltalk.send(smalltalk.send((1), "_to_", [anInteger]), "_collect_", [(function(each){return smalltalk.send(self, "_next", []);})]);
  3758. return self;},
  3759. args: ["anInteger"],
  3760. source: unescape('next%3A%20anInteger%0A%20%20%20%20%5E%281%20to%3A%20anInteger%29%20collect%3A%20%5B%3Aeach%20%7C%20self%20next%5D'),
  3761. messageSends: ["collect:", "to:", "next"],
  3762. referencedClasses: []
  3763. }),
  3764. smalltalk.Random);
  3765. smalltalk.addClass('Point', smalltalk.Object, ['x', 'y'], 'Kernel-Objects');
  3766. smalltalk.Point.comment=unescape('A%20%60Point%60%20represents%20an%20x-y%20pair%20of%20numbers%20usually%20designating%20a%20geometric%20coordinate.%0APoints%20are%20traditionally%20created%20using%20the%20binary%20%60%23@%60%20message%20to%20a%20number%3A%0A%0A%09100@120%0A%0APoints%20can%20then%20be%20arithmetically%20manipulated%3A%0A%0A%09100@100%20+%20%2810@10%29%0A%0A...or%20for%20example%3A%0A%0A%09%28100@100%29%20*%202%0A%0A**NOTE%3A**%20Creating%20a%20Point%20with%20a%20negative%20y-value%20will%20need%20a%20space%20after%20%60@%60%20in%20order%20to%20avoid%20a%20parsing%20error%3A%0A%0A%09100@%20-100%20%22but%20100@-100%20would%20not%20parse%22%0A%0AAmber%20does%20not%20have%20much%20behavior%20in%20this%20class%20out-of-the-box.')
  3767. smalltalk.addMethod(
  3768. unescape('_x'),
  3769. smalltalk.method({
  3770. selector: unescape('x'),
  3771. category: 'accessing',
  3772. fn: function (){
  3773. var self=this;
  3774. return self['@x'];
  3775. return self;},
  3776. args: [],
  3777. source: unescape('x%0A%09%5Ex'),
  3778. messageSends: [],
  3779. referencedClasses: []
  3780. }),
  3781. smalltalk.Point);
  3782. smalltalk.addMethod(
  3783. unescape('_y'),
  3784. smalltalk.method({
  3785. selector: unescape('y'),
  3786. category: 'accessing',
  3787. fn: function (){
  3788. var self=this;
  3789. return self['@y'];
  3790. return self;},
  3791. args: [],
  3792. source: unescape('y%0A%09%5Ey'),
  3793. messageSends: [],
  3794. referencedClasses: []
  3795. }),
  3796. smalltalk.Point);
  3797. smalltalk.addMethod(
  3798. unescape('_y_'),
  3799. smalltalk.method({
  3800. selector: unescape('y%3A'),
  3801. category: 'accessing',
  3802. fn: function (aNumber){
  3803. var self=this;
  3804. (self['@y']=aNumber);
  3805. return self;},
  3806. args: ["aNumber"],
  3807. source: unescape('y%3A%20aNumber%0A%09y%20%3A%3D%20aNumber'),
  3808. messageSends: [],
  3809. referencedClasses: []
  3810. }),
  3811. smalltalk.Point);
  3812. smalltalk.addMethod(
  3813. unescape('_x_'),
  3814. smalltalk.method({
  3815. selector: unescape('x%3A'),
  3816. category: 'accessing',
  3817. fn: function (aNumber){
  3818. var self=this;
  3819. (self['@x']=aNumber);
  3820. return self;},
  3821. args: ["aNumber"],
  3822. source: unescape('x%3A%20aNumber%0A%09x%20%3A%3D%20aNumber'),
  3823. messageSends: [],
  3824. referencedClasses: []
  3825. }),
  3826. smalltalk.Point);
  3827. smalltalk.addMethod(
  3828. unescape('__star'),
  3829. smalltalk.method({
  3830. selector: unescape('*'),
  3831. category: 'arithmetic',
  3832. fn: function (aPoint){
  3833. var self=this;
  3834. 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", [])]))]);
  3835. return self;},
  3836. args: ["aPoint"],
  3837. source: unescape('*%20aPoint%0A%09%5EPoint%20x%3A%20self%20x%20*%20aPoint%20asPoint%20x%20y%3A%20self%20y%20*%20aPoint%20asPoint%20y'),
  3838. messageSends: ["x:y:", unescape("*"), "x", "asPoint", "y"],
  3839. referencedClasses: ["Point"]
  3840. }),
  3841. smalltalk.Point);
  3842. smalltalk.addMethod(
  3843. unescape('__plus'),
  3844. smalltalk.method({
  3845. selector: unescape('+'),
  3846. category: 'arithmetic',
  3847. fn: function (aPoint){
  3848. var self=this;
  3849. 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", [])]))]);
  3850. return self;},
  3851. args: ["aPoint"],
  3852. source: unescape('+%20aPoint%0A%09%5EPoint%20x%3A%20self%20x%20+%20aPoint%20asPoint%20x%20y%3A%20self%20y%20+%20aPoint%20asPoint%20y'),
  3853. messageSends: ["x:y:", unescape("+"), "x", "asPoint", "y"],
  3854. referencedClasses: ["Point"]
  3855. }),
  3856. smalltalk.Point);
  3857. smalltalk.addMethod(
  3858. unescape('__minus'),
  3859. smalltalk.method({
  3860. selector: unescape('-'),
  3861. category: 'arithmetic',
  3862. fn: function (aPoint){
  3863. var self=this;
  3864. 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", [])]))]);
  3865. return self;},
  3866. args: ["aPoint"],
  3867. source: unescape('-%20aPoint%0A%09%5EPoint%20x%3A%20self%20x%20-%20aPoint%20asPoint%20x%20y%3A%20self%20y%20-%20aPoint%20asPoint%20y'),
  3868. messageSends: ["x:y:", unescape("-"), "x", "asPoint", "y"],
  3869. referencedClasses: ["Point"]
  3870. }),
  3871. smalltalk.Point);
  3872. smalltalk.addMethod(
  3873. unescape('__slash'),
  3874. smalltalk.method({
  3875. selector: unescape('/'),
  3876. category: 'arithmetic',
  3877. fn: function (aPoint){
  3878. var self=this;
  3879. 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", [])]))]);
  3880. return self;},
  3881. args: ["aPoint"],
  3882. source: unescape('/%20aPoint%0A%09%5EPoint%20x%3A%20self%20x%20/%20aPoint%20asPoint%20x%20y%3A%20self%20y%20/%20aPoint%20asPoint%20y'),
  3883. messageSends: ["x:y:", unescape("/"), "x", "asPoint", "y"],
  3884. referencedClasses: ["Point"]
  3885. }),
  3886. smalltalk.Point);
  3887. smalltalk.addMethod(
  3888. unescape('_asPoint'),
  3889. smalltalk.method({
  3890. selector: unescape('asPoint'),
  3891. category: 'converting',
  3892. fn: function (){
  3893. var self=this;
  3894. return self;
  3895. return self;},
  3896. args: [],
  3897. source: unescape('asPoint%0A%09%5Eself'),
  3898. messageSends: [],
  3899. referencedClasses: []
  3900. }),
  3901. smalltalk.Point);
  3902. smalltalk.addMethod(
  3903. unescape('__eq'),
  3904. smalltalk.method({
  3905. selector: unescape('%3D'),
  3906. category: 'arithmetic',
  3907. fn: function (aPoint){
  3908. var self=this;
  3909. return smalltalk.send(smalltalk.send(smalltalk.send(aPoint, "_class", []), "__eq", [smalltalk.send(self, "_class", [])]), "_and_", [(function(){return smalltalk.send(smalltalk.send(smalltalk.send(aPoint, "_x", []), "__eq", [smalltalk.send(self, "_x", [])]), "_&", [smalltalk.send(smalltalk.send(aPoint, "_y", []), "__eq", [smalltalk.send(self, "_y", [])])]);})]);
  3910. return self;},
  3911. args: ["aPoint"],
  3912. source: unescape('%3D%20aPoint%0A%09%5EaPoint%20class%20%3D%20self%20class%20and%3A%20%5B%0A%09%09%28aPoint%20x%20%3D%20self%20x%29%20%26%20%28aPoint%20y%20%3D%20self%20y%29%5D'),
  3913. messageSends: ["and:", unescape("%3D"), "class", unescape("%26"), "x", "y"],
  3914. referencedClasses: []
  3915. }),
  3916. smalltalk.Point);
  3917. smalltalk.addMethod(
  3918. unescape('_printString'),
  3919. smalltalk.method({
  3920. selector: unescape('printString'),
  3921. category: 'printing',
  3922. fn: function (){
  3923. var self=this;
  3924. return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(stream){smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(smalltalk.send(self['@x'], "_printString", []), "__comma", [unescape("@")])]);((($receiver = smalltalk.send(smalltalk.send(self['@y'], "_notNil", []), "_and_", [(function(){return smalltalk.send(self['@y'], "_negative", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(stream, "_space", []);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(stream, "_space", []);})]));return smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(self['@y'], "_printString", [])]);})]);
  3925. return self;},
  3926. args: [],
  3927. source: unescape('printString%0A%09%22Print%20receiver%20in%20classic%20x@y%20notation.%22%0A%0A%09%5EString%20streamContents%3A%20%5B%3Astream%20%7C%0A%09%09stream%20nextPutAll%3A%20x%20printString%2C%20%27@%27.%0A%09%09%28y%20notNil%20and%3A%20%5By%20negative%5D%29%0A%09%09%09ifTrue%3A%20%5B%0A%09%09%09%09%22Avoid%20ambiguous%20@-%20construct%22%0A%09%09%09%09stream%20space%5D.%0A%09%09stream%20nextPutAll%3A%20y%20printString%5D'),
  3928. messageSends: ["streamContents:", "nextPutAll:", unescape("%2C"), "printString", "ifTrue:", "and:", "notNil", "negative", "space"],
  3929. referencedClasses: ["String"]
  3930. }),
  3931. smalltalk.Point);
  3932. smalltalk.addMethod(
  3933. unescape('_x_y_'),
  3934. smalltalk.method({
  3935. selector: unescape('x%3Ay%3A'),
  3936. category: 'instance creation',
  3937. fn: function (aNumber, anotherNumber){
  3938. var self=this;
  3939. return (function($rec){smalltalk.send($rec, "_x_", [aNumber]);smalltalk.send($rec, "_y_", [anotherNumber]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  3940. return self;},
  3941. args: ["aNumber", "anotherNumber"],
  3942. 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'),
  3943. messageSends: ["x:", "y:", "yourself", "new"],
  3944. referencedClasses: []
  3945. }),
  3946. smalltalk.Point.klass);
  3947. smalltalk.addClass('JSObjectProxy', smalltalk.Object, ['jsObject'], 'Kernel-Objects');
  3948. smalltalk.JSObjectProxy.comment=unescape('JSObjectProxy%20handles%20sending%20messages%20to%20JavaScript%20object%2C%20therefore%20accessing%20JavaScript%20objects%20from%20Amber%20is%20transparent.%0AJSOjbectProxy%20makes%20intensive%20use%20of%20%60%23doesNotUnderstand%3A%60.%0A%0A%23%23%20Examples%0A%0AJSObjectProxy%20objects%20are%20instanciated%20by%20Amber%20when%20a%20Smalltalk%20message%20is%20sent%20to%20a%20JavaScript%20object.%0A%0A%20%20%20%20window%20alert%3A%20%27hello%20world%27.%0A%20%20%20%20window%20inspect.%0A%20%20%20%20%28window%20jQuery%3A%20%27body%27%29%20append%3A%20%27hello%20world%27%0A%0ASmalltalk%20messages%20sends%20are%20converted%20to%20JavaScript%20function%20calls%20or%20object%20property%20access%20_%28in%20this%20order%29_.%20If%20n%20one%20of%20them%20match%2C%20a%20%60MessageNotUnderstood%60%20error%20will%20be%20thrown.%20%0A%0A%23%23%20Message%20conversion%20rules%0A%0A-%20%60someUser%20name%60%20becomes%20%20%60someUser.name%60%0A-%20%60someUser%20name%3A%20%27John%27%60%20becomes%20%60someUser%20name%20%3D%20%22John%22%60%0A-%20%60console%20log%3A%20%27hello%20world%27%60%20becomes%20%60console.log%28%27hello%20world%27%29%60%0A-%20%60%28window%20jQuery%3A%20%27foo%27%29%20css%3A%20%27background%27%20color%3A%20%27red%27%60%20becomes%20%60window.jQuery%28%27foo%27%29.css%28%27background%27%2C%20%27red%27%29%60%0A%0A__Note%3A__%20For%20keyword-based%20messages%2C%20only%20the%20first%20keyword%20is%20kept%3A%20%60window%20foo%3A%201%20bar%3A%202%60%20is%20equivalent%20to%20%60window%20foo%3A%201%20baz%3A%202%60.')
  3949. smalltalk.addMethod(
  3950. unescape('_jsObject_'),
  3951. smalltalk.method({
  3952. selector: unescape('jsObject%3A'),
  3953. category: 'accessing',
  3954. fn: function (aJSObject){
  3955. var self=this;
  3956. (self['@jsObject']=aJSObject);
  3957. return self;},
  3958. args: ["aJSObject"],
  3959. source: unescape('jsObject%3A%20aJSObject%0A%09jsObject%20%3A%3D%20aJSObject'),
  3960. messageSends: [],
  3961. referencedClasses: []
  3962. }),
  3963. smalltalk.JSObjectProxy);
  3964. smalltalk.addMethod(
  3965. unescape('_jsObject'),
  3966. smalltalk.method({
  3967. selector: unescape('jsObject'),
  3968. category: 'accessing',
  3969. fn: function (){
  3970. var self=this;
  3971. return self['@jsObject'];
  3972. return self;},
  3973. args: [],
  3974. source: unescape('jsObject%0A%09%5EjsObject'),
  3975. messageSends: [],
  3976. referencedClasses: []
  3977. }),
  3978. smalltalk.JSObjectProxy);
  3979. smalltalk.addMethod(
  3980. unescape('_printString'),
  3981. smalltalk.method({
  3982. selector: unescape('printString'),
  3983. category: 'proxy',
  3984. fn: function (){
  3985. var self=this;
  3986. return smalltalk.send(smalltalk.send(self, "_jsObject", []), "_toString", []);
  3987. return self;},
  3988. args: [],
  3989. source: unescape('printString%0A%09%5Eself%20jsObject%20toString'),
  3990. messageSends: ["toString", "jsObject"],
  3991. referencedClasses: []
  3992. }),
  3993. smalltalk.JSObjectProxy);
  3994. smalltalk.addMethod(
  3995. unescape('_inspectOn_'),
  3996. smalltalk.method({
  3997. selector: unescape('inspectOn%3A'),
  3998. category: 'proxy',
  3999. fn: function (anInspector){
  4000. var self=this;
  4001. var variables=nil;
  4002. (variables=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []));
  4003. smalltalk.send(variables, "_at_put_", [unescape("%23self"), smalltalk.send(self, "_jsObject", [])]);
  4004. smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
  4005. for(var i in self['@jsObject']) {
  4006. variables._at_put_(i, self['@jsObject'][i]);
  4007. };
  4008. smalltalk.send(anInspector, "_setVariables_", [variables]);
  4009. return self;},
  4010. args: ["anInspector"],
  4011. source: unescape('inspectOn%3A%20anInspector%0A%09%7C%20variables%20%7C%0A%09variables%20%3A%3D%20Dictionary%20new.%0A%09variables%20at%3A%20%27%23self%27%20put%3A%20self%20jsObject.%0A%09anInspector%20setLabel%3A%20self%20printString.%0A%09%3Cfor%28var%20i%20in%20self%5B%27@jsObject%27%5D%29%20%7B%0A%09%09variables._at_put_%28i%2C%20self%5B%27@jsObject%27%5D%5Bi%5D%29%3B%0A%09%7D%3E.%0A%09anInspector%20setVariables%3A%20variables'),
  4012. messageSends: ["new", "at:put:", "jsObject", "setLabel:", "printString", "setVariables:"],
  4013. referencedClasses: ["Dictionary"]
  4014. }),
  4015. smalltalk.JSObjectProxy);
  4016. smalltalk.addMethod(
  4017. unescape('_doesNotUnderstand_'),
  4018. smalltalk.method({
  4019. selector: unescape('doesNotUnderstand%3A'),
  4020. category: 'proxy',
  4021. fn: function (aMessage){
  4022. var self=this;
  4023. var obj=nil;
  4024. var selector=nil;
  4025. var jsSelector=nil;
  4026. var arguments=nil;
  4027. (obj=smalltalk.send(self, "_jsObject", []));
  4028. (selector=smalltalk.send(aMessage, "_selector", []));
  4029. (jsSelector=smalltalk.send(selector, "_asJavaScriptSelector", []));
  4030. (arguments=smalltalk.send(aMessage, "_arguments", []));
  4031. if(obj[jsSelector] != undefined) {return smalltalk.send(obj, jsSelector, arguments)};
  4032. smalltalk.send(self, "_doesNotUnderstand_", [aMessage], smalltalk.Object);
  4033. return self;},
  4034. args: ["aMessage"],
  4035. source: unescape('doesNotUnderstand%3A%20aMessage%0A%09%7C%20obj%20selector%20jsSelector%20arguments%20%7C%0A%09obj%20%3A%3D%20self%20jsObject.%0A%09selector%20%3A%3D%20aMessage%20selector.%0A%09jsSelector%20%3A%3D%20selector%20asJavaScriptSelector.%0A%09arguments%20%3A%3D%20aMessage%20arguments.%0A%09%3Cif%28obj%5BjsSelector%5D%20%21%3D%20undefined%29%20%7Breturn%20smalltalk.send%28obj%2C%20jsSelector%2C%20arguments%29%7D%3E.%0A%09super%20doesNotUnderstand%3A%20aMessage'),
  4036. messageSends: ["jsObject", "selector", "asJavaScriptSelector", "arguments", "doesNotUnderstand:"],
  4037. referencedClasses: []
  4038. }),
  4039. smalltalk.JSObjectProxy);
  4040. smalltalk.addMethod(
  4041. unescape('_at_'),
  4042. smalltalk.method({
  4043. selector: unescape('at%3A'),
  4044. category: 'accessing',
  4045. fn: function (aSymbol){
  4046. var self=this;
  4047. var attr=nil;
  4048. (attr=smalltalk.send(aSymbol, "_asString", []));
  4049. return self['@jsObject'][attr];
  4050. return self;},
  4051. args: ["aSymbol"],
  4052. source: unescape('at%3A%20aSymbol%0A%09%7C%20attr%20%7C%0A%09attr%20%3A%3D%20aSymbol%20asString.%0A%09%3Creturn%20self%5B%27@jsObject%27%5D%5Battr%5D%3E'),
  4053. messageSends: ["asString"],
  4054. referencedClasses: []
  4055. }),
  4056. smalltalk.JSObjectProxy);
  4057. smalltalk.addMethod(
  4058. unescape('_at_put_'),
  4059. smalltalk.method({
  4060. selector: unescape('at%3Aput%3A'),
  4061. category: 'accessing',
  4062. fn: function (aSymbol, anObject){
  4063. var self=this;
  4064. var attr=nil;
  4065. (attr=smalltalk.send(aSymbol, "_asString", []));
  4066. self['@jsObject'][attr] = anObject;
  4067. return self;},
  4068. args: ["aSymbol", "anObject"],
  4069. source: unescape('at%3A%20aSymbol%20put%3A%20anObject%0A%09%7C%20attr%20%7C%0A%09attr%20%3A%3D%20aSymbol%20asString.%0A%09%3Cself%5B%27@jsObject%27%5D%5Battr%5D%20%3D%20anObject%3E'),
  4070. messageSends: ["asString"],
  4071. referencedClasses: []
  4072. }),
  4073. smalltalk.JSObjectProxy);
  4074. smalltalk.addMethod(
  4075. unescape('_on_'),
  4076. smalltalk.method({
  4077. selector: unescape('on%3A'),
  4078. category: 'instance creation',
  4079. fn: function (aJSObject){
  4080. var self=this;
  4081. return (function($rec){smalltalk.send($rec, "_jsObject_", [aJSObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  4082. return self;},
  4083. args: ["aJSObject"],
  4084. source: unescape('on%3A%20aJSObject%0A%09%5Eself%20new%0A%09%09jsObject%3A%20aJSObject%3B%0A%09%09yourself'),
  4085. messageSends: ["jsObject:", "yourself", "new"],
  4086. referencedClasses: []
  4087. }),
  4088. smalltalk.JSObjectProxy.klass);
  4089. smalltalk.addPackage('Kernel-Classes', {});
  4090. smalltalk.addClass('Behavior', smalltalk.Object, [], 'Kernel-Classes');
  4091. smalltalk.Behavior.comment=unescape('Behavior%20is%20the%20superclass%20of%20all%20class%20objects.%20%0A%0AIt%20defines%20the%20protocol%20for%20creating%20instances%20of%20a%20class%20with%20%60%23basicNew%60%20and%20%60%23new%60%20%28see%20%60boot.js%60%20for%20class%20constructors%20details%29.%0AInstances%20know%20about%20the%20subclass/superclass%20relationships%20between%20classes%2C%20contain%20the%20description%20that%20instances%20are%20created%20from%2C%20%0Aand%20hold%20the%20method%20dictionary%20that%27s%20associated%20with%20each%20class.%0A%0ABehavior%20also%20%20provides%20methods%20for%20compiling%20methods%2C%20examining%20the%20method%20dictionary%2C%20and%20iterating%20over%20the%20class%20hierarchy.')
  4092. smalltalk.addMethod(
  4093. unescape('_new'),
  4094. smalltalk.method({
  4095. selector: unescape('new'),
  4096. category: 'instance creation',
  4097. fn: function (){
  4098. var self=this;
  4099. return smalltalk.send(smalltalk.send(self, "_basicNew", []), "_initialize", []);
  4100. return self;},
  4101. args: [],
  4102. source: unescape('new%0A%09%5Eself%20basicNew%20initialize'),
  4103. messageSends: ["initialize", "basicNew"],
  4104. referencedClasses: []
  4105. }),
  4106. smalltalk.Behavior);
  4107. smalltalk.addMethod(
  4108. unescape('_basicNew'),
  4109. smalltalk.method({
  4110. selector: unescape('basicNew'),
  4111. category: 'instance creation',
  4112. fn: function (){
  4113. var self=this;
  4114. return new self.fn();
  4115. return self;},
  4116. args: [],
  4117. source: unescape('basicNew%0A%09%3Creturn%20new%20self.fn%28%29%3E'),
  4118. messageSends: [],
  4119. referencedClasses: []
  4120. }),
  4121. smalltalk.Behavior);
  4122. smalltalk.addMethod(
  4123. unescape('_name'),
  4124. smalltalk.method({
  4125. selector: unescape('name'),
  4126. category: 'accessing',
  4127. fn: function (){
  4128. var self=this;
  4129. return self.className || nil;
  4130. return self;},
  4131. args: [],
  4132. source: unescape('name%0A%09%3Creturn%20self.className%20%7C%7C%20nil%3E'),
  4133. messageSends: [],
  4134. referencedClasses: []
  4135. }),
  4136. smalltalk.Behavior);
  4137. smalltalk.addMethod(
  4138. unescape('_superclass'),
  4139. smalltalk.method({
  4140. selector: unescape('superclass'),
  4141. category: 'accessing',
  4142. fn: function (){
  4143. var self=this;
  4144. return self.superclass || nil;
  4145. return self;},
  4146. args: [],
  4147. source: unescape('superclass%0A%09%3Creturn%20self.superclass%20%7C%7C%20nil%3E'),
  4148. messageSends: [],
  4149. referencedClasses: []
  4150. }),
  4151. smalltalk.Behavior);
  4152. smalltalk.addMethod(
  4153. unescape('_subclasses'),
  4154. smalltalk.method({
  4155. selector: unescape('subclasses'),
  4156. category: 'accessing',
  4157. fn: function (){
  4158. var self=this;
  4159. return smalltalk.subclasses(self);
  4160. return self;},
  4161. args: [],
  4162. source: unescape('subclasses%0A%09%3Creturn%20smalltalk.subclasses%28self%29%3E'),
  4163. messageSends: [],
  4164. referencedClasses: []
  4165. }),
  4166. smalltalk.Behavior);
  4167. smalltalk.addMethod(
  4168. unescape('_allSubclasses'),
  4169. smalltalk.method({
  4170. selector: unescape('allSubclasses'),
  4171. category: 'accessing',
  4172. fn: function (){
  4173. var self=this;
  4174. var result=nil;
  4175. (result=smalltalk.send(self, "_subclasses", []));
  4176. smalltalk.send(smalltalk.send(self, "_subclasses", []), "_do_", [(function(each){return smalltalk.send(result, "_addAll_", [smalltalk.send(each, "_allSubclasses", [])]);})]);
  4177. return result;
  4178. return self;},
  4179. args: [],
  4180. 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'),
  4181. messageSends: ["subclasses", "do:", "addAll:", "allSubclasses"],
  4182. referencedClasses: []
  4183. }),
  4184. smalltalk.Behavior);
  4185. smalltalk.addMethod(
  4186. unescape('_withAllSubclasses'),
  4187. smalltalk.method({
  4188. selector: unescape('withAllSubclasses'),
  4189. category: 'accessing',
  4190. fn: function (){
  4191. var self=this;
  4192. return (function($rec){smalltalk.send($rec, "_addAll_", [smalltalk.send(self, "_allSubclasses", [])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.Array || Array), "_with_", [self]));
  4193. return self;},
  4194. args: [],
  4195. source: unescape('withAllSubclasses%0A%09%5E%28Array%20with%3A%20self%29%20addAll%3A%20self%20allSubclasses%3B%20yourself'),
  4196. messageSends: ["addAll:", "allSubclasses", "yourself", "with:"],
  4197. referencedClasses: ["Array"]
  4198. }),
  4199. smalltalk.Behavior);
  4200. smalltalk.addMethod(
  4201. unescape('_prototype'),
  4202. smalltalk.method({
  4203. selector: unescape('prototype'),
  4204. category: 'accessing',
  4205. fn: function (){
  4206. var self=this;
  4207. return self.fn.prototype;
  4208. return self;},
  4209. args: [],
  4210. source: unescape('prototype%0A%09%3Creturn%20self.fn.prototype%3E'),
  4211. messageSends: [],
  4212. referencedClasses: []
  4213. }),
  4214. smalltalk.Behavior);
  4215. smalltalk.addMethod(
  4216. unescape('_methodDictionary'),
  4217. smalltalk.method({
  4218. selector: unescape('methodDictionary'),
  4219. category: 'accessing',
  4220. fn: function (){
  4221. var self=this;
  4222. var dict = smalltalk.HashedCollection._new();
  4223. var methods = self.fn.prototype.methods;
  4224. for(var i in methods) {
  4225. if(methods[i].selector) {
  4226. dict._at_put_(methods[i].selector, methods[i]);
  4227. }
  4228. };
  4229. return dict;
  4230. return self;},
  4231. args: [],
  4232. source: unescape('methodDictionary%0A%09%3Cvar%20dict%20%3D%20smalltalk.HashedCollection._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'),
  4233. messageSends: [],
  4234. referencedClasses: []
  4235. }),
  4236. smalltalk.Behavior);
  4237. smalltalk.addMethod(
  4238. unescape('_methodsFor_'),
  4239. smalltalk.method({
  4240. selector: unescape('methodsFor%3A'),
  4241. category: 'accessing',
  4242. fn: function (aString){
  4243. var self=this;
  4244. return (function($rec){smalltalk.send($rec, "_class_category_", [self, aString]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.ClassCategoryReader || ClassCategoryReader), "_new", []));
  4245. return self;},
  4246. args: ["aString"],
  4247. 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'),
  4248. messageSends: ["class:category:", "yourself", "new"],
  4249. referencedClasses: ["ClassCategoryReader"]
  4250. }),
  4251. smalltalk.Behavior);
  4252. smalltalk.addMethod(
  4253. unescape('_addCompiledMethod_'),
  4254. smalltalk.method({
  4255. selector: unescape('addCompiledMethod%3A'),
  4256. category: 'compiling',
  4257. fn: function (aMethod){
  4258. var self=this;
  4259. smalltalk.addMethod(aMethod.selector._asSelector(), aMethod, self);
  4260. return self;},
  4261. args: ["aMethod"],
  4262. source: unescape('addCompiledMethod%3A%20aMethod%0A%09%3Csmalltalk.addMethod%28aMethod.selector._asSelector%28%29%2C%20aMethod%2C%20self%29%3E'),
  4263. messageSends: [],
  4264. referencedClasses: []
  4265. }),
  4266. smalltalk.Behavior);
  4267. smalltalk.addMethod(
  4268. unescape('_instanceVariableNames'),
  4269. smalltalk.method({
  4270. selector: unescape('instanceVariableNames'),
  4271. category: 'accessing',
  4272. fn: function (){
  4273. var self=this;
  4274. return self.iVarNames;
  4275. return self;},
  4276. args: [],
  4277. source: unescape('instanceVariableNames%0A%09%3Creturn%20self.iVarNames%3E'),
  4278. messageSends: [],
  4279. referencedClasses: []
  4280. }),
  4281. smalltalk.Behavior);
  4282. smalltalk.addMethod(
  4283. unescape('_comment'),
  4284. smalltalk.method({
  4285. selector: unescape('comment'),
  4286. category: 'accessing',
  4287. fn: function (){
  4288. var self=this;
  4289. return (($receiver = smalltalk.send(self, "_basicAt_", ["comment"])) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
  4290. return self;},
  4291. args: [],
  4292. source: unescape('comment%0A%20%20%20%20%5E%28self%20basicAt%3A%20%27comment%27%29%20ifNil%3A%20%5B%27%27%5D'),
  4293. messageSends: ["ifNil:", "basicAt:"],
  4294. referencedClasses: []
  4295. }),
  4296. smalltalk.Behavior);
  4297. smalltalk.addMethod(
  4298. unescape('_comment_'),
  4299. smalltalk.method({
  4300. selector: unescape('comment%3A'),
  4301. category: 'accessing',
  4302. fn: function (aString){
  4303. var self=this;
  4304. smalltalk.send(self, "_basicAt_put_", ["comment", aString]);
  4305. return self;},
  4306. args: ["aString"],
  4307. source: unescape('comment%3A%20aString%0A%20%20%20%20self%20basicAt%3A%20%27comment%27%20put%3A%20aString'),
  4308. messageSends: ["basicAt:put:"],
  4309. referencedClasses: []
  4310. }),
  4311. smalltalk.Behavior);
  4312. smalltalk.addMethod(
  4313. unescape('_commentStamp'),
  4314. smalltalk.method({
  4315. selector: unescape('commentStamp'),
  4316. category: 'accessing',
  4317. fn: function (){
  4318. var self=this;
  4319. return (function($rec){smalltalk.send($rec, "_class_", [self]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.ClassCommentReader || ClassCommentReader), "_new", []));
  4320. return self;},
  4321. args: [],
  4322. source: unescape('commentStamp%0A%20%20%20%20%5EClassCommentReader%20new%0A%09class%3A%20self%3B%0A%09yourself'),
  4323. messageSends: ["class:", "yourself", "new"],
  4324. referencedClasses: ["ClassCommentReader"]
  4325. }),
  4326. smalltalk.Behavior);
  4327. smalltalk.addMethod(
  4328. unescape('_removeCompiledMethod_'),
  4329. smalltalk.method({
  4330. selector: unescape('removeCompiledMethod%3A'),
  4331. category: 'compiling',
  4332. fn: function (aMethod){
  4333. var self=this;
  4334. delete self.fn.prototype[aMethod.selector._asSelector()];
  4335. delete self.fn.prototype.methods[aMethod.selector];
  4336. smalltalk.init(self);;
  4337. return self;},
  4338. args: ["aMethod"],
  4339. 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'),
  4340. messageSends: [],
  4341. referencedClasses: []
  4342. }),
  4343. smalltalk.Behavior);
  4344. smalltalk.addMethod(
  4345. unescape('_inheritsFrom_'),
  4346. smalltalk.method({
  4347. selector: unescape('inheritsFrom%3A'),
  4348. category: 'testing',
  4349. fn: function (aClass){
  4350. var self=this;
  4351. return smalltalk.send(smalltalk.send(aClass, "_allSubclasses", []), "_includes_", [self]);
  4352. return self;},
  4353. args: ["aClass"],
  4354. source: unescape('inheritsFrom%3A%20aClass%0A%09%5EaClass%20allSubclasses%20includes%3A%20self'),
  4355. messageSends: ["includes:", "allSubclasses"],
  4356. referencedClasses: []
  4357. }),
  4358. smalltalk.Behavior);
  4359. smalltalk.addMethod(
  4360. unescape('_protocols'),
  4361. smalltalk.method({
  4362. selector: unescape('protocols'),
  4363. category: 'accessing',
  4364. fn: function (){
  4365. var self=this;
  4366. var protocols=nil;
  4367. (protocols=smalltalk.send((smalltalk.Array || Array), "_new", []));
  4368. 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", [])]);})]));})]);
  4369. return smalltalk.send(protocols, "_sort", []);
  4370. return self;},
  4371. args: [],
  4372. 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'),
  4373. messageSends: ["new", "do:", "methodDictionary", "ifFalse:", "includes:", "category", "add:", "sort"],
  4374. referencedClasses: ["Array"]
  4375. }),
  4376. smalltalk.Behavior);
  4377. smalltalk.addMethod(
  4378. unescape('_protocolsDo_'),
  4379. smalltalk.method({
  4380. selector: unescape('protocolsDo%3A'),
  4381. category: 'accessing',
  4382. fn: function (aBlock){
  4383. var self=this;
  4384. var methodsByCategory=nil;
  4385. (methodsByCategory=smalltalk.send((smalltalk.HashedCollection || HashedCollection), "_new", []));
  4386. 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]);})]);
  4387. smalltalk.send(smalltalk.send(self, "_protocols", []), "_do_", [(function(category){return smalltalk.send(aBlock, "_value_value_", [category, smalltalk.send(methodsByCategory, "_at_", [category])]);})]);
  4388. return self;},
  4389. args: ["aBlock"],
  4390. 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%20HashedCollection%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'),
  4391. messageSends: ["new", "do:", "values", "methodDictionary", "add:", "at:ifAbsentPut:", "category", "protocols", "value:value:", "at:"],
  4392. referencedClasses: ["HashedCollection", "Array"]
  4393. }),
  4394. smalltalk.Behavior);
  4395. smalltalk.addMethod(
  4396. unescape('_allInstanceVariableNames'),
  4397. smalltalk.method({
  4398. selector: unescape('allInstanceVariableNames'),
  4399. category: 'accessing',
  4400. fn: function (){
  4401. var self=this;
  4402. var result=nil;
  4403. (result=smalltalk.send(smalltalk.send(self, "_instanceVariableNames", []), "_copy", []));
  4404. (($receiver = smalltalk.send(self, "_superclass", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(result, "_addAll_", [smalltalk.send(smalltalk.send(self, "_superclass", []), "_allInstanceVariableNames", [])]);})() : nil;
  4405. return result;
  4406. return self;},
  4407. args: [],
  4408. 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'),
  4409. messageSends: ["copy", "instanceVariableNames", "ifNotNil:", "superclass", "addAll:", "allInstanceVariableNames"],
  4410. referencedClasses: []
  4411. }),
  4412. smalltalk.Behavior);
  4413. smalltalk.addMethod(
  4414. unescape('_methodAt_'),
  4415. smalltalk.method({
  4416. selector: unescape('methodAt%3A'),
  4417. category: 'accessing',
  4418. fn: function (aString){
  4419. var self=this;
  4420. return smalltalk.methods(self)[aString];
  4421. return self;},
  4422. args: ["aString"],
  4423. source: unescape('methodAt%3A%20aString%0A%09%3Creturn%20smalltalk.methods%28self%29%5BaString%5D%3E'),
  4424. messageSends: [],
  4425. referencedClasses: []
  4426. }),
  4427. smalltalk.Behavior);
  4428. smalltalk.addMethod(
  4429. unescape('_methodsFor_stamp_'),
  4430. smalltalk.method({
  4431. selector: unescape('methodsFor%3Astamp%3A'),
  4432. category: 'accessing',
  4433. fn: function (aString, aStamp){
  4434. var self=this;
  4435. return smalltalk.send(self, "_methodsFor_", [aString]);
  4436. return self;},
  4437. args: ["aString", "aStamp"],
  4438. 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'),
  4439. messageSends: ["methodsFor:"],
  4440. referencedClasses: []
  4441. }),
  4442. smalltalk.Behavior);
  4443. smalltalk.addMethod(
  4444. unescape('_commentStamp_prior_'),
  4445. smalltalk.method({
  4446. selector: unescape('commentStamp%3Aprior%3A'),
  4447. category: 'accessing',
  4448. fn: function (aStamp, prior){
  4449. var self=this;
  4450. return smalltalk.send(self, "_commentStamp", []);
  4451. return self;},
  4452. args: ["aStamp", "prior"],
  4453. source: unescape('commentStamp%3A%20aStamp%20prior%3A%20prior%0A%20%20%20%20%20%20%20%20%5Eself%20commentStamp'),
  4454. messageSends: ["commentStamp"],
  4455. referencedClasses: []
  4456. }),
  4457. smalltalk.Behavior);
  4458. smalltalk.addMethod(
  4459. unescape('_compile_'),
  4460. smalltalk.method({
  4461. selector: unescape('compile%3A'),
  4462. category: 'compiling',
  4463. fn: function (aString){
  4464. var self=this;
  4465. smalltalk.send(self, "_compile_category_", [aString, ""]);
  4466. return self;},
  4467. args: ["aString"],
  4468. source: unescape('compile%3A%20aString%0A%09self%20compile%3A%20aString%20category%3A%20%27%27'),
  4469. messageSends: ["compile:category:"],
  4470. referencedClasses: []
  4471. }),
  4472. smalltalk.Behavior);
  4473. smalltalk.addMethod(
  4474. unescape('_compile_category_'),
  4475. smalltalk.method({
  4476. selector: unescape('compile%3Acategory%3A'),
  4477. category: 'compiling',
  4478. fn: function (aString, anotherString){
  4479. var self=this;
  4480. var method=nil;
  4481. (method=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_load_forClass_", [aString, self]));
  4482. smalltalk.send(method, "_category_", [anotherString]);
  4483. smalltalk.send(self, "_addCompiledMethod_", [method]);
  4484. return self;},
  4485. args: ["aString", "anotherString"],
  4486. source: unescape('compile%3A%20aString%20category%3A%20anotherString%0A%09%7C%20method%20%7C%0A%09method%20%3A%3D%20Compiler%20new%20load%3A%20aString%20forClass%3A%20self.%0A%09method%20category%3A%20anotherString.%0A%09self%20addCompiledMethod%3A%20method'),
  4487. messageSends: ["load:forClass:", "new", "category:", "addCompiledMethod:"],
  4488. referencedClasses: ["Compiler"]
  4489. }),
  4490. smalltalk.Behavior);
  4491. smalltalk.addClass('Class', smalltalk.Behavior, [], 'Kernel-Classes');
  4492. smalltalk.Class.comment=unescape('Class%20is%20__the__%20class%20object.%20%0A%0AInstances%20are%20the%20classes%20of%20the%20system.%0AClass%20creation%20is%20done%20throught%20a%20%60ClassBuilder%60')
  4493. smalltalk.addMethod(
  4494. unescape('_category'),
  4495. smalltalk.method({
  4496. selector: unescape('category'),
  4497. category: 'accessing',
  4498. fn: function (){
  4499. var self=this;
  4500. return (($receiver = smalltalk.send(self, "_package", [])) == nil || $receiver == undefined) ? (function(){return "Unclassified";})() : (function(){return smalltalk.send(smalltalk.send(self, "_package", []), "_name", []);})();
  4501. return self;},
  4502. args: [],
  4503. source: unescape('category%0A%09%5Eself%20package%20ifNil%3A%20%5B%27Unclassified%27%5D%20ifNotNil%3A%20%5Bself%20package%20name%5D'),
  4504. messageSends: ["ifNil:ifNotNil:", "package", "name"],
  4505. referencedClasses: []
  4506. }),
  4507. smalltalk.Class);
  4508. smalltalk.addMethod(
  4509. unescape('_subclass_instanceVariableNames_'),
  4510. smalltalk.method({
  4511. selector: unescape('subclass%3AinstanceVariableNames%3A'),
  4512. category: 'class creation',
  4513. fn: function (aString, anotherString){
  4514. var self=this;
  4515. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, anotherString, nil]);
  4516. return self;},
  4517. args: ["aString", "anotherString"],
  4518. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20anotherString%0A%09%22Kept%20for%20compatibility.%22%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20anotherString%20package%3A%20nil'),
  4519. messageSends: ["subclass:instanceVariableNames:package:"],
  4520. referencedClasses: []
  4521. }),
  4522. smalltalk.Class);
  4523. smalltalk.addMethod(
  4524. unescape('_subclass_instanceVariableNames_category_'),
  4525. smalltalk.method({
  4526. selector: unescape('subclass%3AinstanceVariableNames%3Acategory%3A'),
  4527. category: 'class creation',
  4528. fn: function (aString, aString2, aString3){
  4529. var self=this;
  4530. smalltalk.send(self, "_deprecatedAPI", []);
  4531. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
  4532. return self;},
  4533. args: ["aString", "aString2", "aString3"],
  4534. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20category%3A%20aString3%0A%09%22Kept%20for%20compatibility.%22%0A%09self%20deprecatedAPI.%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3'),
  4535. messageSends: ["deprecatedAPI", "subclass:instanceVariableNames:package:"],
  4536. referencedClasses: []
  4537. }),
  4538. smalltalk.Class);
  4539. smalltalk.addMethod(
  4540. unescape('_isClass'),
  4541. smalltalk.method({
  4542. selector: unescape('isClass'),
  4543. category: 'testing',
  4544. fn: function (){
  4545. var self=this;
  4546. return true;
  4547. return self;},
  4548. args: [],
  4549. source: unescape('isClass%0A%09%5Etrue'),
  4550. messageSends: [],
  4551. referencedClasses: []
  4552. }),
  4553. smalltalk.Class);
  4554. smalltalk.addMethod(
  4555. unescape('_printString'),
  4556. smalltalk.method({
  4557. selector: unescape('printString'),
  4558. category: 'printing',
  4559. fn: function (){
  4560. var self=this;
  4561. return smalltalk.send(self, "_name", []);
  4562. return self;},
  4563. args: [],
  4564. source: unescape('printString%0A%09%5Eself%20name'),
  4565. messageSends: ["name"],
  4566. referencedClasses: []
  4567. }),
  4568. smalltalk.Class);
  4569. smalltalk.addMethod(
  4570. unescape('_rename_'),
  4571. smalltalk.method({
  4572. selector: unescape('rename%3A'),
  4573. category: 'accessing',
  4574. fn: function (aString){
  4575. var self=this;
  4576. smalltalk[aString] = self;
  4577. delete smalltalk[self.className];
  4578. self.className = aString;
  4579. ;
  4580. return self;},
  4581. args: ["aString"],
  4582. 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'),
  4583. messageSends: [],
  4584. referencedClasses: []
  4585. }),
  4586. smalltalk.Class);
  4587. smalltalk.addMethod(
  4588. unescape('_subclass_instanceVariableNames_classVariableNames_poolDictionaries_category_'),
  4589. smalltalk.method({
  4590. selector: unescape('subclass%3AinstanceVariableNames%3AclassVariableNames%3ApoolDictionaries%3Acategory%3A'),
  4591. category: 'class creation',
  4592. fn: function (aString, aString2, classVars, pools, aString3){
  4593. var self=this;
  4594. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
  4595. return self;},
  4596. args: ["aString", "aString2", "classVars", "pools", "aString3"],
  4597. 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%20package%3A%20aString3'),
  4598. messageSends: ["subclass:instanceVariableNames:package:"],
  4599. referencedClasses: []
  4600. }),
  4601. smalltalk.Class);
  4602. smalltalk.addMethod(
  4603. unescape('_package'),
  4604. smalltalk.method({
  4605. selector: unescape('package'),
  4606. category: 'accessing',
  4607. fn: function (){
  4608. var self=this;
  4609. return self.pkg;
  4610. return self;},
  4611. args: [],
  4612. source: unescape('package%0A%09%3Creturn%20self.pkg%3E'),
  4613. messageSends: [],
  4614. referencedClasses: []
  4615. }),
  4616. smalltalk.Class);
  4617. smalltalk.addMethod(
  4618. unescape('_package_'),
  4619. smalltalk.method({
  4620. selector: unescape('package%3A'),
  4621. category: 'accessing',
  4622. fn: function (aPackage){
  4623. var self=this;
  4624. self.pkg = aPackage;
  4625. return self;},
  4626. args: ["aPackage"],
  4627. source: unescape('package%3A%20aPackage%0A%09%3Cself.pkg%20%3D%20aPackage%3E'),
  4628. messageSends: [],
  4629. referencedClasses: []
  4630. }),
  4631. smalltalk.Class);
  4632. smalltalk.addMethod(
  4633. unescape('_subclass_instanceVariableNames_package_'),
  4634. smalltalk.method({
  4635. selector: unescape('subclass%3AinstanceVariableNames%3Apackage%3A'),
  4636. category: 'class creation',
  4637. fn: function (aString, aString2, aString3){
  4638. var self=this;
  4639. return smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_superclass_subclass_instanceVariableNames_package_", [self, smalltalk.send(aString, "_asString", []), aString2, aString3]);
  4640. return self;},
  4641. args: ["aString", "aString2", "aString3"],
  4642. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3%0A%09%5EClassBuilder%20new%0A%09%20%20%20%20superclass%3A%20self%20subclass%3A%20aString%20asString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3'),
  4643. messageSends: ["superclass:subclass:instanceVariableNames:package:", "new", "asString"],
  4644. referencedClasses: ["ClassBuilder"]
  4645. }),
  4646. smalltalk.Class);
  4647. smalltalk.addClass('Metaclass', smalltalk.Behavior, [], 'Kernel-Classes');
  4648. smalltalk.Metaclass.comment=unescape('Metaclass%20is%20the%20root%20of%20the%20class%20hierarchy.%0A%0AMetaclass%20instances%20are%20metaclasses%2C%20one%20for%20each%20real%20class.%20%0AMetaclass%20instances%20have%20a%20single%20instance%2C%20which%20they%20hold%20onto%2C%20which%20is%20the%20class%20that%20they%20are%20the%20metaclass%20of.')
  4649. smalltalk.addMethod(
  4650. unescape('_instanceClass'),
  4651. smalltalk.method({
  4652. selector: unescape('instanceClass'),
  4653. category: 'accessing',
  4654. fn: function (){
  4655. var self=this;
  4656. return self.instanceClass;
  4657. return self;},
  4658. args: [],
  4659. source: unescape('instanceClass%0A%09%3Creturn%20self.instanceClass%3E'),
  4660. messageSends: [],
  4661. referencedClasses: []
  4662. }),
  4663. smalltalk.Metaclass);
  4664. smalltalk.addMethod(
  4665. unescape('_instanceVariableNames_'),
  4666. smalltalk.method({
  4667. selector: unescape('instanceVariableNames%3A'),
  4668. category: 'accessing',
  4669. fn: function (aCollection){
  4670. var self=this;
  4671. smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_class_instanceVariableNames_", [self, aCollection]);
  4672. return self;},
  4673. args: ["aCollection"],
  4674. source: unescape('instanceVariableNames%3A%20aCollection%0A%09ClassBuilder%20new%0A%09%20%20%20%20class%3A%20self%20instanceVariableNames%3A%20aCollection'),
  4675. messageSends: ["class:instanceVariableNames:", "new"],
  4676. referencedClasses: ["ClassBuilder"]
  4677. }),
  4678. smalltalk.Metaclass);
  4679. smalltalk.addMethod(
  4680. unescape('_isMetaclass'),
  4681. smalltalk.method({
  4682. selector: unescape('isMetaclass'),
  4683. category: 'testing',
  4684. fn: function (){
  4685. var self=this;
  4686. return true;
  4687. return self;},
  4688. args: [],
  4689. source: unescape('isMetaclass%0A%09%5Etrue'),
  4690. messageSends: [],
  4691. referencedClasses: []
  4692. }),
  4693. smalltalk.Metaclass);
  4694. smalltalk.addMethod(
  4695. unescape('_printString'),
  4696. smalltalk.method({
  4697. selector: unescape('printString'),
  4698. category: 'printing',
  4699. fn: function (){
  4700. var self=this;
  4701. return smalltalk.send(smalltalk.send(smalltalk.send(self, "_instanceClass", []), "_name", []), "__comma", [" class"]);
  4702. return self;},
  4703. args: [],
  4704. source: unescape('printString%0A%09%5Eself%20instanceClass%20name%2C%20%27%20class%27'),
  4705. messageSends: [unescape("%2C"), "name", "instanceClass"],
  4706. referencedClasses: []
  4707. }),
  4708. smalltalk.Metaclass);
  4709. smalltalk.addClass('ClassBuilder', smalltalk.Object, [], 'Kernel-Classes');
  4710. smalltalk.ClassBuilder.comment=unescape('ClassBuilder%20is%20responsible%20for%20compiling%20new%20classes%20or%20modifying%20existing%20classes%20in%20the%20system.%0A%0ARather%20than%20using%20ClassBuilder%20directly%20to%20compile%20a%20class%2C%20use%20%60Class%20%3E%3E%20subclass%3AinstanceVariableNames%3Apackage%3A%60.')
  4711. smalltalk.addMethod(
  4712. unescape('_superclass_subclass_'),
  4713. smalltalk.method({
  4714. selector: unescape('superclass%3Asubclass%3A'),
  4715. category: 'class creation',
  4716. fn: function (aClass, aString){
  4717. var self=this;
  4718. return smalltalk.send(self, "_superclass_subclass_instanceVariableNames_package_", [aClass, aString, "", nil]);
  4719. return self;},
  4720. args: ["aClass", "aString"],
  4721. source: unescape('superclass%3A%20aClass%20subclass%3A%20aString%0A%09%5Eself%20superclass%3A%20aClass%20subclass%3A%20aString%20instanceVariableNames%3A%20%27%27%20package%3A%20nil'),
  4722. messageSends: ["superclass:subclass:instanceVariableNames:package:"],
  4723. referencedClasses: []
  4724. }),
  4725. smalltalk.ClassBuilder);
  4726. smalltalk.addMethod(
  4727. unescape('_class_instanceVariableNames_'),
  4728. smalltalk.method({
  4729. selector: unescape('class%3AinstanceVariableNames%3A'),
  4730. category: 'class creation',
  4731. fn: function (aClass, aString){
  4732. var self=this;
  4733. ((($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"])]);})]));
  4734. smalltalk.send(aClass, "_basicAt_put_", ["iVarNames", smalltalk.send(self, "_instanceVariableNamesFor_", [aString])]);
  4735. smalltalk.send(self, "_setupClass_", [aClass]);
  4736. return self;},
  4737. args: ["aClass", "aString"],
  4738. 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'),
  4739. messageSends: ["ifFalse:", "isMetaclass", "error:", unescape("%2C"), "name", "basicAt:put:", "instanceVariableNamesFor:", "setupClass:"],
  4740. referencedClasses: []
  4741. }),
  4742. smalltalk.ClassBuilder);
  4743. smalltalk.addMethod(
  4744. unescape('_instanceVariableNamesFor_'),
  4745. smalltalk.method({
  4746. selector: unescape('instanceVariableNamesFor%3A'),
  4747. category: 'private',
  4748. fn: function (aString){
  4749. var self=this;
  4750. return smalltalk.send(smalltalk.send(aString, "_tokenize_", [" "]), "_reject_", [(function(each){return smalltalk.send(each, "_isEmpty", []);})]);
  4751. return self;},
  4752. args: ["aString"],
  4753. 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'),
  4754. messageSends: ["reject:", "tokenize:", "isEmpty"],
  4755. referencedClasses: []
  4756. }),
  4757. smalltalk.ClassBuilder);
  4758. smalltalk.addMethod(
  4759. unescape('_addSubclassOf_named_instanceVariableNames_'),
  4760. smalltalk.method({
  4761. selector: unescape('addSubclassOf%3Anamed%3AinstanceVariableNames%3A'),
  4762. category: 'private',
  4763. fn: function (aClass, aString, aCollection){
  4764. var self=this;
  4765. smalltalk.addClass(aString, aClass, aCollection);
  4766. return smalltalk[aString];
  4767. return self;},
  4768. args: ["aClass", "aString", "aCollection"],
  4769. 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'),
  4770. messageSends: [],
  4771. referencedClasses: []
  4772. }),
  4773. smalltalk.ClassBuilder);
  4774. smalltalk.addMethod(
  4775. unescape('_setupClass_'),
  4776. smalltalk.method({
  4777. selector: unescape('setupClass%3A'),
  4778. category: 'private',
  4779. fn: function (aClass){
  4780. var self=this;
  4781. smalltalk.init(aClass);;
  4782. return self;},
  4783. args: ["aClass"],
  4784. source: unescape('setupClass%3A%20aClass%0A%09%3Csmalltalk.init%28aClass%29%3B%3E'),
  4785. messageSends: [],
  4786. referencedClasses: []
  4787. }),
  4788. smalltalk.ClassBuilder);
  4789. smalltalk.addMethod(
  4790. unescape('_superclass_subclass_instanceVariableNames_package_'),
  4791. smalltalk.method({
  4792. selector: unescape('superclass%3Asubclass%3AinstanceVariableNames%3Apackage%3A'),
  4793. category: 'class creation',
  4794. fn: function (aClass, aString, aString2, aString3){
  4795. var self=this;
  4796. var newClass=nil;
  4797. (newClass=smalltalk.send(self, "_addSubclassOf_named_instanceVariableNames_package_", [aClass, aString, smalltalk.send(self, "_instanceVariableNamesFor_", [aString2]), (($receiver = aString3) == nil || $receiver == undefined) ? (function(){return "unclassified";})() : $receiver]));
  4798. smalltalk.send(self, "_setupClass_", [newClass]);
  4799. return newClass;
  4800. return self;},
  4801. args: ["aClass", "aString", "aString2", "aString3"],
  4802. source: unescape('superclass%3A%20aClass%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3%0A%09%7C%20newClass%20%7C%0A%09newClass%20%3A%3D%20self%20addSubclassOf%3A%20aClass%0A%09%09%09%09named%3A%20aString%20instanceVariableNames%3A%20%28self%20instanceVariableNamesFor%3A%20aString2%29%0A%09%09%09%09package%3A%20%28aString3%20ifNil%3A%20%5B%27unclassified%27%5D%29.%0A%09self%20setupClass%3A%20newClass.%0A%09%5EnewClass'),
  4803. messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "instanceVariableNamesFor:", "ifNil:", "setupClass:"],
  4804. referencedClasses: []
  4805. }),
  4806. smalltalk.ClassBuilder);
  4807. smalltalk.addMethod(
  4808. unescape('_addSubclassOf_named_instanceVariableNames_package_'),
  4809. smalltalk.method({
  4810. selector: unescape('addSubclassOf%3Anamed%3AinstanceVariableNames%3Apackage%3A'),
  4811. category: 'private',
  4812. fn: function (aClass, aString, aCollection, packageName){
  4813. var self=this;
  4814. smalltalk.addClass(aString, aClass, aCollection, packageName);
  4815. return smalltalk[aString];
  4816. return self;},
  4817. args: ["aClass", "aString", "aCollection", "packageName"],
  4818. source: unescape('addSubclassOf%3A%20aClass%20named%3A%20aString%20instanceVariableNames%3A%20aCollection%20package%3A%20packageName%0A%09%3Csmalltalk.addClass%28aString%2C%20aClass%2C%20aCollection%2C%20packageName%29%3B%0A%09%20%20%20%20return%20smalltalk%5BaString%5D%3E'),
  4819. messageSends: [],
  4820. referencedClasses: []
  4821. }),
  4822. smalltalk.ClassBuilder);
  4823. smalltalk.addMethod(
  4824. unescape('_copyClass_named_'),
  4825. smalltalk.method({
  4826. selector: unescape('copyClass%3Anamed%3A'),
  4827. category: 'private',
  4828. fn: function (aClass, aString){
  4829. var self=this;
  4830. var newClass=nil;
  4831. (newClass=smalltalk.send(self, "_addSubclassOf_named_instanceVariableNames_package_", [smalltalk.send(aClass, "_superclass", []), aString, smalltalk.send(aClass, "_instanceVariableNames", []), smalltalk.send(smalltalk.send(aClass, "_package", []), "_name", [])]));
  4832. smalltalk.send(self, "_setupClass_", [newClass]);
  4833. smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_methodDictionary", []), "_values", []), "_do_", [(function(each){smalltalk.send(newClass, "_addCompiledMethod_", [smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_load_forClass_", [smalltalk.send(each, "_source", []), newClass])]);return smalltalk.send(smalltalk.send(smalltalk.send(newClass, "_methodDictionary", []), "_at_", [smalltalk.send(each, "_selector", [])]), "_category_", [smalltalk.send(each, "_category", [])]);})]);
  4834. smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_methodDictionary", []), "_values", []), "_do_", [(function(each){smalltalk.send(smalltalk.send(newClass, "_class", []), "_addCompiledMethod_", [smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_load_forClass_", [smalltalk.send(each, "_source", []), smalltalk.send(newClass, "_class", [])])]);return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(newClass, "_class", []), "_methodDictionary", []), "_at_", [smalltalk.send(each, "_selector", [])]), "_category_", [smalltalk.send(each, "_category", [])]);})]);
  4835. smalltalk.send(self, "_setupClass_", [newClass]);
  4836. return newClass;
  4837. return self;},
  4838. args: ["aClass", "aString"],
  4839. source: unescape('copyClass%3A%20aClass%20named%3A%20aString%0A%09%7C%20newClass%20%7C%0A%0A%09newClass%20%3A%3D%20self%20%0A%09%09addSubclassOf%3A%20aClass%20superclass%0A%09%09named%3A%20aString%20%0A%09%09instanceVariableNames%3A%20aClass%20instanceVariableNames%20%0A%09%09package%3A%20aClass%20package%20name.%0A%0A%09self%20setupClass%3A%20newClass.%0A%0A%09aClass%20methodDictionary%20values%20do%3A%20%5B%3Aeach%20%7C%0A%09%09newClass%20addCompiledMethod%3A%20%28Compiler%20new%20load%3A%20each%20source%20forClass%3A%20newClass%29.%0A%09%09%28newClass%20methodDictionary%20at%3A%20each%20selector%29%20category%3A%20each%20category%5D.%0A%0A%09aClass%20class%20methodDictionary%20values%20do%3A%20%5B%3Aeach%20%7C%0A%09%09newClass%20class%20addCompiledMethod%3A%20%28Compiler%20new%20load%3A%20each%20source%20forClass%3A%20newClass%20class%29.%0A%09%09%28newClass%20class%20methodDictionary%20at%3A%20each%20selector%29%20category%3A%20each%20category%5D.%0A%0A%09self%20setupClass%3A%20newClass.%0A%09%5EnewClass'),
  4840. messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "superclass", "instanceVariableNames", "name", "package", "setupClass:", "do:", "values", "methodDictionary", "addCompiledMethod:", "load:forClass:", "new", "source", "category:", "at:", "selector", "category", "class"],
  4841. referencedClasses: ["Compiler"]
  4842. }),
  4843. smalltalk.ClassBuilder);
  4844. smalltalk.addClass('ClassCategoryReader', smalltalk.Object, ['class', 'category', 'chunkParser'], 'Kernel-Classes');
  4845. smalltalk.ClassCategoryReader.comment=unescape('ClassCategoryReader%20represents%20a%20mechanism%20for%20retrieving%20class%20descriptions%20stored%20on%20a%20file.')
  4846. smalltalk.addMethod(
  4847. unescape('_initialize'),
  4848. smalltalk.method({
  4849. selector: unescape('initialize'),
  4850. category: 'initialization',
  4851. fn: function (){
  4852. var self=this;
  4853. smalltalk.send(self, "_initialize", [], smalltalk.Object);
  4854. (self['@chunkParser']=smalltalk.send((smalltalk.ChunkParser || ChunkParser), "_new", []));
  4855. return self;},
  4856. args: [],
  4857. source: unescape('initialize%0A%09super%20initialize.%0A%09chunkParser%20%3A%3D%20ChunkParser%20new.'),
  4858. messageSends: ["initialize", "new"],
  4859. referencedClasses: ["ChunkParser"]
  4860. }),
  4861. smalltalk.ClassCategoryReader);
  4862. smalltalk.addMethod(
  4863. unescape('_class_category_'),
  4864. smalltalk.method({
  4865. selector: unescape('class%3Acategory%3A'),
  4866. category: 'accessing',
  4867. fn: function (aClass, aString){
  4868. var self=this;
  4869. (self['@class']=aClass);
  4870. (self['@category']=aString);
  4871. return self;},
  4872. args: ["aClass", "aString"],
  4873. source: unescape('class%3A%20aClass%20category%3A%20aString%0A%09class%20%3A%3D%20aClass.%0A%09category%20%3A%3D%20aString'),
  4874. messageSends: [],
  4875. referencedClasses: []
  4876. }),
  4877. smalltalk.ClassCategoryReader);
  4878. smalltalk.addMethod(
  4879. unescape('_scanFrom_'),
  4880. smalltalk.method({
  4881. selector: unescape('scanFrom%3A'),
  4882. category: 'fileIn',
  4883. fn: function (aChunkParser){
  4884. var self=this;
  4885. var chunk=nil;
  4886. (function(){while(!(function(){(chunk=smalltalk.send(aChunkParser, "_nextChunk", []));return smalltalk.send(chunk, "_isEmpty", []);})()) {(function(){return smalltalk.send(self, "_compileMethod_", [chunk]);})()}})();
  4887. return self;},
  4888. args: ["aChunkParser"],
  4889. source: unescape('scanFrom%3A%20aChunkParser%0A%09%7C%20chunk%20%7C%0A%09%5Bchunk%20%3A%3D%20aChunkParser%20nextChunk.%0A%09chunk%20isEmpty%5D%20whileFalse%3A%20%5B%0A%09%20%20%20%20self%20compileMethod%3A%20chunk%5D'),
  4890. messageSends: ["whileFalse:", "nextChunk", "isEmpty", "compileMethod:"],
  4891. referencedClasses: []
  4892. }),
  4893. smalltalk.ClassCategoryReader);
  4894. smalltalk.addMethod(
  4895. unescape('_compileMethod_'),
  4896. smalltalk.method({
  4897. selector: unescape('compileMethod%3A'),
  4898. category: 'private',
  4899. fn: function (aString){
  4900. var self=this;
  4901. var method=nil;
  4902. (method=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_load_forClass_", [aString, self['@class']]));
  4903. smalltalk.send(method, "_category_", [self['@category']]);
  4904. smalltalk.send(self['@class'], "_addCompiledMethod_", [method]);
  4905. return self;},
  4906. args: ["aString"],
  4907. 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'),
  4908. messageSends: ["load:forClass:", "new", "category:", "addCompiledMethod:"],
  4909. referencedClasses: ["Compiler"]
  4910. }),
  4911. smalltalk.ClassCategoryReader);
  4912. smalltalk.addClass('ClassCommentReader', smalltalk.Object, ['class', 'chunkParser'], 'Kernel-Classes');
  4913. smalltalk.ClassCommentReader.comment=unescape('ClassCommentReader%20represents%20a%20mechanism%20for%20retrieving%20class%20descriptions%20stored%20on%20a%20file.%0ASee%20%60ClassCategoryReader%60%20too.')
  4914. smalltalk.addMethod(
  4915. unescape('_class_'),
  4916. smalltalk.method({
  4917. selector: unescape('class%3A'),
  4918. category: 'accessing',
  4919. fn: function (aClass){
  4920. var self=this;
  4921. (self['@class']=aClass);
  4922. return self;},
  4923. args: ["aClass"],
  4924. source: unescape('class%3A%20aClass%0A%09class%20%3A%3D%20aClass'),
  4925. messageSends: [],
  4926. referencedClasses: []
  4927. }),
  4928. smalltalk.ClassCommentReader);
  4929. smalltalk.addMethod(
  4930. unescape('_scanFrom_'),
  4931. smalltalk.method({
  4932. selector: unescape('scanFrom%3A'),
  4933. category: 'fileIn',
  4934. fn: function (aChunkParser){
  4935. var self=this;
  4936. var chunk=nil;
  4937. (chunk=smalltalk.send(aChunkParser, "_nextChunk", []));
  4938. ((($receiver = smalltalk.send(chunk, "_isEmpty", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_setComment_", [chunk]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self, "_setComment_", [chunk]);})]));
  4939. return self;},
  4940. args: ["aChunkParser"],
  4941. source: unescape('scanFrom%3A%20aChunkParser%0A%09%7C%20chunk%20%7C%0A%09chunk%20%3A%3D%20aChunkParser%20nextChunk.%0A%09chunk%20isEmpty%20ifFalse%3A%20%5B%0A%09%20%20%20%20self%20setComment%3A%20chunk%5D.'),
  4942. messageSends: ["nextChunk", "ifFalse:", "isEmpty", "setComment:"],
  4943. referencedClasses: []
  4944. }),
  4945. smalltalk.ClassCommentReader);
  4946. smalltalk.addMethod(
  4947. unescape('_initialize'),
  4948. smalltalk.method({
  4949. selector: unescape('initialize'),
  4950. category: 'initialization',
  4951. fn: function (){
  4952. var self=this;
  4953. smalltalk.send(self, "_initialize", [], smalltalk.Object);
  4954. (self['@chunkParser']=smalltalk.send((smalltalk.ChunkParser || ChunkParser), "_new", []));
  4955. return self;},
  4956. args: [],
  4957. source: unescape('initialize%0A%09super%20initialize.%0A%09chunkParser%20%3A%3D%20ChunkParser%20new.'),
  4958. messageSends: ["initialize", "new"],
  4959. referencedClasses: ["ChunkParser"]
  4960. }),
  4961. smalltalk.ClassCommentReader);
  4962. smalltalk.addMethod(
  4963. unescape('_setComment_'),
  4964. smalltalk.method({
  4965. selector: unescape('setComment%3A'),
  4966. category: 'private',
  4967. fn: function (aString){
  4968. var self=this;
  4969. smalltalk.send(self['@class'], "_comment_", [aString]);
  4970. return self;},
  4971. args: ["aString"],
  4972. source: unescape('setComment%3A%20aString%0A%20%20%20%20class%20comment%3A%20aString'),
  4973. messageSends: ["comment:"],
  4974. referencedClasses: []
  4975. }),
  4976. smalltalk.ClassCommentReader);
  4977. smalltalk.addPackage('Kernel-Methods', {});
  4978. smalltalk.addClass('CompiledMethod', smalltalk.Object, [], 'Kernel-Methods');
  4979. smalltalk.addMethod(
  4980. unescape('_source'),
  4981. smalltalk.method({
  4982. selector: unescape('source'),
  4983. category: 'accessing',
  4984. fn: function (){
  4985. var self=this;
  4986. return (($receiver = smalltalk.send(self, "_basicAt_", ["source"])) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
  4987. return self;},
  4988. args: [],
  4989. source: unescape('source%0A%09%5E%28self%20basicAt%3A%20%27source%27%29%20ifNil%3A%20%5B%27%27%5D'),
  4990. messageSends: ["ifNil:", "basicAt:"],
  4991. referencedClasses: []
  4992. }),
  4993. smalltalk.CompiledMethod);
  4994. smalltalk.addMethod(
  4995. unescape('_source_'),
  4996. smalltalk.method({
  4997. selector: unescape('source%3A'),
  4998. category: 'accessing',
  4999. fn: function (aString){
  5000. var self=this;
  5001. smalltalk.send(self, "_basicAt_put_", ["source", aString]);
  5002. return self;},
  5003. args: ["aString"],
  5004. source: unescape('source%3A%20aString%0A%09self%20basicAt%3A%20%27source%27%20put%3A%20aString'),
  5005. messageSends: ["basicAt:put:"],
  5006. referencedClasses: []
  5007. }),
  5008. smalltalk.CompiledMethod);
  5009. smalltalk.addMethod(
  5010. unescape('_category'),
  5011. smalltalk.method({
  5012. selector: unescape('category'),
  5013. category: 'accessing',
  5014. fn: function (){
  5015. var self=this;
  5016. return (($receiver = smalltalk.send(self, "_basicAt_", ["category"])) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
  5017. return self;},
  5018. args: [],
  5019. source: unescape('category%0A%09%5E%28self%20basicAt%3A%20%27category%27%29%20ifNil%3A%20%5B%27%27%5D'),
  5020. messageSends: ["ifNil:", "basicAt:"],
  5021. referencedClasses: []
  5022. }),
  5023. smalltalk.CompiledMethod);
  5024. smalltalk.addMethod(
  5025. unescape('_category_'),
  5026. smalltalk.method({
  5027. selector: unescape('category%3A'),
  5028. category: 'accessing',
  5029. fn: function (aString){
  5030. var self=this;
  5031. smalltalk.send(self, "_basicAt_put_", ["category", aString]);
  5032. return self;},
  5033. args: ["aString"],
  5034. source: unescape('category%3A%20aString%0A%09self%20basicAt%3A%20%27category%27%20put%3A%20aString'),
  5035. messageSends: ["basicAt:put:"],
  5036. referencedClasses: []
  5037. }),
  5038. smalltalk.CompiledMethod);
  5039. smalltalk.addMethod(
  5040. unescape('_selector'),
  5041. smalltalk.method({
  5042. selector: unescape('selector'),
  5043. category: 'accessing',
  5044. fn: function (){
  5045. var self=this;
  5046. return smalltalk.send(self, "_basicAt_", ["selector"]);
  5047. return self;},
  5048. args: [],
  5049. source: unescape('selector%0A%09%5Eself%20basicAt%3A%20%27selector%27'),
  5050. messageSends: ["basicAt:"],
  5051. referencedClasses: []
  5052. }),
  5053. smalltalk.CompiledMethod);
  5054. smalltalk.addMethod(
  5055. unescape('_selector_'),
  5056. smalltalk.method({
  5057. selector: unescape('selector%3A'),
  5058. category: 'accessing',
  5059. fn: function (aString){
  5060. var self=this;
  5061. smalltalk.send(self, "_basicAt_put_", ["selector", aString]);
  5062. return self;},
  5063. args: ["aString"],
  5064. source: unescape('selector%3A%20aString%0A%09self%20basicAt%3A%20%27selector%27%20put%3A%20aString'),
  5065. messageSends: ["basicAt:put:"],
  5066. referencedClasses: []
  5067. }),
  5068. smalltalk.CompiledMethod);
  5069. smalltalk.addMethod(
  5070. unescape('_fn'),
  5071. smalltalk.method({
  5072. selector: unescape('fn'),
  5073. category: 'accessing',
  5074. fn: function (){
  5075. var self=this;
  5076. return smalltalk.send(self, "_basicAt_", ["fn"]);
  5077. return self;},
  5078. args: [],
  5079. source: unescape('fn%0A%09%5Eself%20basicAt%3A%20%27fn%27'),
  5080. messageSends: ["basicAt:"],
  5081. referencedClasses: []
  5082. }),
  5083. smalltalk.CompiledMethod);
  5084. smalltalk.addMethod(
  5085. unescape('_fn_'),
  5086. smalltalk.method({
  5087. selector: unescape('fn%3A'),
  5088. category: 'accessing',
  5089. fn: function (aBlock){
  5090. var self=this;
  5091. smalltalk.send(self, "_basicAt_put_", ["fn", aBlock]);
  5092. return self;},
  5093. args: ["aBlock"],
  5094. source: unescape('fn%3A%20aBlock%0A%09self%20basicAt%3A%20%27fn%27%20put%3A%20aBlock'),
  5095. messageSends: ["basicAt:put:"],
  5096. referencedClasses: []
  5097. }),
  5098. smalltalk.CompiledMethod);
  5099. smalltalk.addMethod(
  5100. unescape('_messageSends'),
  5101. smalltalk.method({
  5102. selector: unescape('messageSends'),
  5103. category: 'accessing',
  5104. fn: function (){
  5105. var self=this;
  5106. return smalltalk.send(self, "_basicAt_", ["messageSends"]);
  5107. return self;},
  5108. args: [],
  5109. source: unescape('messageSends%0A%09%5Eself%20basicAt%3A%20%27messageSends%27'),
  5110. messageSends: ["basicAt:"],
  5111. referencedClasses: []
  5112. }),
  5113. smalltalk.CompiledMethod);
  5114. smalltalk.addMethod(
  5115. unescape('_methodClass'),
  5116. smalltalk.method({
  5117. selector: unescape('methodClass'),
  5118. category: 'accessing',
  5119. fn: function (){
  5120. var self=this;
  5121. return smalltalk.send(self, "_basicAt_", ["methodClass"]);
  5122. return self;},
  5123. args: [],
  5124. source: unescape('methodClass%0A%09%5Eself%20basicAt%3A%20%27methodClass%27'),
  5125. messageSends: ["basicAt:"],
  5126. referencedClasses: []
  5127. }),
  5128. smalltalk.CompiledMethod);
  5129. smalltalk.addMethod(
  5130. unescape('_referencedClasses'),
  5131. smalltalk.method({
  5132. selector: unescape('referencedClasses'),
  5133. category: 'accessing',
  5134. fn: function (){
  5135. var self=this;
  5136. return smalltalk.send(self, "_basicAt_", ["referencedClasses"]);
  5137. return self;},
  5138. args: [],
  5139. source: unescape('referencedClasses%0A%09%5Eself%20basicAt%3A%20%27referencedClasses%27'),
  5140. messageSends: ["basicAt:"],
  5141. referencedClasses: []
  5142. }),
  5143. smalltalk.CompiledMethod);
  5144. smalltalk.addMethod(
  5145. unescape('_arguments'),
  5146. smalltalk.method({
  5147. selector: unescape('arguments'),
  5148. category: 'accessing',
  5149. fn: function (){
  5150. var self=this;
  5151. return self.args || [];
  5152. return self;},
  5153. args: [],
  5154. source: unescape('arguments%0A%09%3Creturn%20self.args%20%7C%7C%20%5B%5D%3E'),
  5155. messageSends: [],
  5156. referencedClasses: []
  5157. }),
  5158. smalltalk.CompiledMethod);
  5159. smalltalk.addClass('BlockClosure', smalltalk.Object, [], 'Kernel-Methods');
  5160. smalltalk.BlockClosure.comment=unescape('A%20BlockClosure%20is%20a%20lexical%20closure.%0AThe%20JavaScript%20representation%20is%20a%20function.%0A%0AA%20BlockClosure%20is%20evaluated%20with%20the%20%23value*%20methods%20in%20the%20%27evaluating%27%20protocol.')
  5161. smalltalk.addMethod(
  5162. unescape('_compiledSource'),
  5163. smalltalk.method({
  5164. selector: unescape('compiledSource'),
  5165. category: 'accessing',
  5166. fn: function (){
  5167. var self=this;
  5168. return self.toString();
  5169. return self;},
  5170. args: [],
  5171. source: unescape('compiledSource%0A%09%3Creturn%20self.toString%28%29%3E'),
  5172. messageSends: [],
  5173. referencedClasses: []
  5174. }),
  5175. smalltalk.BlockClosure);
  5176. smalltalk.addMethod(
  5177. unescape('_whileTrue_'),
  5178. smalltalk.method({
  5179. selector: unescape('whileTrue%3A'),
  5180. category: 'controlling',
  5181. fn: function (aBlock){
  5182. var self=this;
  5183. while(self()) {aBlock()};
  5184. return self;},
  5185. args: ["aBlock"],
  5186. 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'),
  5187. messageSends: [],
  5188. referencedClasses: []
  5189. }),
  5190. smalltalk.BlockClosure);
  5191. smalltalk.addMethod(
  5192. unescape('_whileFalse_'),
  5193. smalltalk.method({
  5194. selector: unescape('whileFalse%3A'),
  5195. category: 'controlling',
  5196. fn: function (aBlock){
  5197. var self=this;
  5198. while(!self()) {aBlock()};
  5199. return self;},
  5200. args: ["aBlock"],
  5201. 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'),
  5202. messageSends: [],
  5203. referencedClasses: []
  5204. }),
  5205. smalltalk.BlockClosure);
  5206. smalltalk.addMethod(
  5207. unescape('_value'),
  5208. smalltalk.method({
  5209. selector: unescape('value'),
  5210. category: 'evaluating',
  5211. fn: function (){
  5212. var self=this;
  5213. return self();;
  5214. return self;},
  5215. args: [],
  5216. source: unescape('value%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%28%29%3B%3E'),
  5217. messageSends: [],
  5218. referencedClasses: []
  5219. }),
  5220. smalltalk.BlockClosure);
  5221. smalltalk.addMethod(
  5222. unescape('_value_'),
  5223. smalltalk.method({
  5224. selector: unescape('value%3A'),
  5225. category: 'evaluating',
  5226. fn: function (anArg){
  5227. var self=this;
  5228. return self(anArg);;
  5229. return self;},
  5230. args: ["anArg"],
  5231. source: unescape('value%3A%20anArg%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%28anArg%29%3B%3E'),
  5232. messageSends: [],
  5233. referencedClasses: []
  5234. }),
  5235. smalltalk.BlockClosure);
  5236. smalltalk.addMethod(
  5237. unescape('_value_value_'),
  5238. smalltalk.method({
  5239. selector: unescape('value%3Avalue%3A'),
  5240. category: 'evaluating',
  5241. fn: function (firstArg, secondArg){
  5242. var self=this;
  5243. return self(firstArg, secondArg);;
  5244. return self;},
  5245. args: ["firstArg", "secondArg"],
  5246. 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'),
  5247. messageSends: [],
  5248. referencedClasses: []
  5249. }),
  5250. smalltalk.BlockClosure);
  5251. smalltalk.addMethod(
  5252. unescape('_value_value_value_'),
  5253. smalltalk.method({
  5254. selector: unescape('value%3Avalue%3Avalue%3A'),
  5255. category: 'evaluating',
  5256. fn: function (firstArg, secondArg, thirdArg){
  5257. var self=this;
  5258. return self(firstArg, secondArg, thirdArg);;
  5259. return self;},
  5260. args: ["firstArg", "secondArg", "thirdArg"],
  5261. 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'),
  5262. messageSends: [],
  5263. referencedClasses: []
  5264. }),
  5265. smalltalk.BlockClosure);
  5266. smalltalk.addMethod(
  5267. unescape('_valueWithPossibleArguments_'),
  5268. smalltalk.method({
  5269. selector: unescape('valueWithPossibleArguments%3A'),
  5270. category: 'evaluating',
  5271. fn: function (aCollection){
  5272. var self=this;
  5273. return self.apply(null, aCollection);;
  5274. return self;},
  5275. args: ["aCollection"],
  5276. source: unescape('valueWithPossibleArguments%3A%20aCollection%0A%09%3Creturn%20self.apply%28null%2C%20aCollection%29%3B%3E'),
  5277. messageSends: [],
  5278. referencedClasses: []
  5279. }),
  5280. smalltalk.BlockClosure);
  5281. smalltalk.addMethod(
  5282. unescape('_on_do_'),
  5283. smalltalk.method({
  5284. selector: unescape('on%3Ado%3A'),
  5285. category: 'error handling',
  5286. fn: function (anErrorClass, aBlock){
  5287. var self=this;
  5288. return 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", []);})]));})]);
  5289. return self;},
  5290. args: ["anErrorClass", "aBlock"],
  5291. source: unescape('on%3A%20anErrorClass%20do%3A%20aBlock%0A%09%5Eself%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'),
  5292. messageSends: ["try:catch:", "ifTrue:ifFalse:", "isKindOf:", "value:", "signal"],
  5293. referencedClasses: []
  5294. }),
  5295. smalltalk.BlockClosure);
  5296. smalltalk.addMethod(
  5297. unescape('_valueWithTimeout_'),
  5298. smalltalk.method({
  5299. selector: unescape('valueWithTimeout%3A'),
  5300. category: 'timeout/interval',
  5301. fn: function (aNumber){
  5302. var self=this;
  5303. return setTimeout(self, aNumber);
  5304. return self;},
  5305. args: ["aNumber"],
  5306. source: unescape('valueWithTimeout%3A%20aNumber%0A%09%3Creturn%20setTimeout%28self%2C%20aNumber%29%3E'),
  5307. messageSends: [],
  5308. referencedClasses: []
  5309. }),
  5310. smalltalk.BlockClosure);
  5311. smalltalk.addMethod(
  5312. unescape('_valueWithInterval_'),
  5313. smalltalk.method({
  5314. selector: unescape('valueWithInterval%3A'),
  5315. category: 'timeout/interval',
  5316. fn: function (aNumber){
  5317. var self=this;
  5318. return setInterval(self, aNumber);
  5319. return self;},
  5320. args: ["aNumber"],
  5321. source: unescape('valueWithInterval%3A%20aNumber%0A%09%3Creturn%20setInterval%28self%2C%20aNumber%29%3E'),
  5322. messageSends: [],
  5323. referencedClasses: []
  5324. }),
  5325. smalltalk.BlockClosure);
  5326. smalltalk.addMethod(
  5327. unescape('_whileFalse'),
  5328. smalltalk.method({
  5329. selector: unescape('whileFalse'),
  5330. category: 'controlling',
  5331. fn: function (){
  5332. var self=this;
  5333. smalltalk.send(self, "_whileFalse_", [(function(){return nil;})]);
  5334. return self;},
  5335. args: [],
  5336. source: unescape('whileFalse%0A%09%22inlined%20in%20the%20Compiler%22%0A%09self%20whileFalse%3A%20%5B%5D'),
  5337. messageSends: ["whileFalse:"],
  5338. referencedClasses: []
  5339. }),
  5340. smalltalk.BlockClosure);
  5341. smalltalk.addMethod(
  5342. unescape('_whileTrue'),
  5343. smalltalk.method({
  5344. selector: unescape('whileTrue'),
  5345. category: 'controlling',
  5346. fn: function (){
  5347. var self=this;
  5348. smalltalk.send(self, "_whileTrue_", [(function(){return nil;})]);
  5349. return self;},
  5350. args: [],
  5351. source: unescape('whileTrue%0A%09%22inlined%20in%20the%20Compiler%22%0A%09self%20whileTrue%3A%20%5B%5D'),
  5352. messageSends: ["whileTrue:"],
  5353. referencedClasses: []
  5354. }),
  5355. smalltalk.BlockClosure);
  5356. smalltalk.addMethod(
  5357. unescape('_new'),
  5358. smalltalk.method({
  5359. selector: unescape('new'),
  5360. category: 'evaluating',
  5361. fn: function (){
  5362. var self=this;
  5363. return new self();
  5364. return self;},
  5365. args: [],
  5366. 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'),
  5367. messageSends: [],
  5368. referencedClasses: []
  5369. }),
  5370. smalltalk.BlockClosure);
  5371. smalltalk.addMethod(
  5372. unescape('_applyTo_arguments_'),
  5373. smalltalk.method({
  5374. selector: unescape('applyTo%3Aarguments%3A'),
  5375. category: 'evaluating',
  5376. fn: function (anObject, aCollection){
  5377. var self=this;
  5378. return self.apply(anObject, aCollection);
  5379. return self;},
  5380. args: ["anObject", "aCollection"],
  5381. source: unescape('applyTo%3A%20anObject%20arguments%3A%20aCollection%0A%09%3Creturn%20self.apply%28anObject%2C%20aCollection%29%3E'),
  5382. messageSends: [],
  5383. referencedClasses: []
  5384. }),
  5385. smalltalk.BlockClosure);
  5386. smalltalk.addMethod(
  5387. unescape('_timeToRun'),
  5388. smalltalk.method({
  5389. selector: unescape('timeToRun'),
  5390. category: 'evaluating',
  5391. fn: function (){
  5392. var self=this;
  5393. return smalltalk.send((smalltalk.Date || Date), "_millisecondsToRun_", [self]);
  5394. return self;},
  5395. args: [],
  5396. source: unescape('timeToRun%0A%09%22Answer%20the%20number%20of%20milliseconds%20taken%20to%20execute%20this%20block.%22%0A%0A%09%5E%20Date%20millisecondsToRun%3A%20self'),
  5397. messageSends: ["millisecondsToRun:"],
  5398. referencedClasses: ["Date"]
  5399. }),
  5400. smalltalk.BlockClosure);
  5401. smalltalk.addMethod(
  5402. unescape('_numArgs'),
  5403. smalltalk.method({
  5404. selector: unescape('numArgs'),
  5405. category: 'accessing',
  5406. fn: function (){
  5407. var self=this;
  5408. return self.length;
  5409. return self;},
  5410. args: [],
  5411. source: unescape('numArgs%0A%09%3Creturn%20self.length%3E'),
  5412. messageSends: [],
  5413. referencedClasses: []
  5414. }),
  5415. smalltalk.BlockClosure);
  5416. smalltalk.addMethod(
  5417. unescape('_ensure_'),
  5418. smalltalk.method({
  5419. selector: unescape('ensure%3A'),
  5420. category: 'evaluating',
  5421. fn: function (aBlock){
  5422. var self=this;
  5423. var success=nil;
  5424. (success=false);
  5425. return smalltalk.send((function(){smalltalk.send(self, "_value", []);(success=true);return smalltalk.send(aBlock, "_value", []);}), "_on_do_", [(smalltalk.Error || Error), (function(ex){((($receiver = success).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(aBlock, "_value", []);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(aBlock, "_value", []);})]));return smalltalk.send(ex, "_signal", []);})]);
  5426. return self;},
  5427. args: ["aBlock"],
  5428. source: unescape('ensure%3A%20aBlock%0A%09%7C%20success%20%7C%0A%09success%20%3A%3D%20false.%0A%09%5E%5Bself%20value.%20success%20%3A%3D%20true.%20aBlock%20value%5D%0A%09%09on%3A%20Error%0A%09%09do%3A%20%5B%3Aex%20%7C%0A%09%09%09success%20ifFalse%3A%20%5BaBlock%20value%5D.%0A%09%09%09ex%20signal%5D'),
  5429. messageSends: ["on:do:", "value", "ifFalse:", "signal"],
  5430. referencedClasses: ["Error"]
  5431. }),
  5432. smalltalk.BlockClosure);
  5433. smalltalk.addMethod(
  5434. unescape('_newValue_'),
  5435. smalltalk.method({
  5436. selector: unescape('newValue%3A'),
  5437. category: 'evaluating',
  5438. fn: function (anObject){
  5439. var self=this;
  5440. return new self(anObject);
  5441. return self;},
  5442. args: ["anObject"],
  5443. source: unescape('newValue%3A%20anObject%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%28anObject%29%3E'),
  5444. messageSends: [],
  5445. referencedClasses: []
  5446. }),
  5447. smalltalk.BlockClosure);
  5448. smalltalk.addMethod(
  5449. unescape('_newValue_value_'),
  5450. smalltalk.method({
  5451. selector: unescape('newValue%3Avalue%3A'),
  5452. category: 'evaluating',
  5453. fn: function (anObject, anObject2){
  5454. var self=this;
  5455. return new self(anObject, anObject2);
  5456. return self;},
  5457. args: ["anObject", "anObject2"],
  5458. source: unescape('newValue%3A%20%20anObject%20value%3A%20anObject2%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%28anObject%2C%20anObject2%29%3E'),
  5459. messageSends: [],
  5460. referencedClasses: []
  5461. }),
  5462. smalltalk.BlockClosure);
  5463. smalltalk.addMethod(
  5464. unescape('_newValue_value_value_'),
  5465. smalltalk.method({
  5466. selector: unescape('newValue%3Avalue%3Avalue%3A'),
  5467. category: 'evaluating',
  5468. fn: function (anObject, anObject2, anObject3){
  5469. var self=this;
  5470. return new self(anObject, anObject2);
  5471. return self;},
  5472. args: ["anObject", "anObject2", "anObject3"],
  5473. source: unescape('newValue%3A%20%20anObject%20value%3A%20anObject2%20value%3A%20anObject3%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%28anObject%2C%20anObject2%29%3E'),
  5474. messageSends: [],
  5475. referencedClasses: []
  5476. }),
  5477. smalltalk.BlockClosure);
  5478. smalltalk.addClass('MethodContext', smalltalk.Object, [], 'Kernel-Methods');
  5479. smalltalk.addMethod(
  5480. unescape('_receiver'),
  5481. smalltalk.method({
  5482. selector: unescape('receiver'),
  5483. category: 'accessing',
  5484. fn: function (){
  5485. var self=this;
  5486. return self.receiver;
  5487. return self;},
  5488. args: [],
  5489. source: unescape('receiver%0A%09%3Creturn%20self.receiver%3E'),
  5490. messageSends: [],
  5491. referencedClasses: []
  5492. }),
  5493. smalltalk.MethodContext);
  5494. smalltalk.addMethod(
  5495. unescape('_selector'),
  5496. smalltalk.method({
  5497. selector: unescape('selector'),
  5498. category: 'accessing',
  5499. fn: function (){
  5500. var self=this;
  5501. return smalltalk.convertSelector(self.selector);
  5502. return self;},
  5503. args: [],
  5504. source: unescape('selector%0A%09%3Creturn%20smalltalk.convertSelector%28self.selector%29%3E'),
  5505. messageSends: [],
  5506. referencedClasses: []
  5507. }),
  5508. smalltalk.MethodContext);
  5509. smalltalk.addMethod(
  5510. unescape('_home'),
  5511. smalltalk.method({
  5512. selector: unescape('home'),
  5513. category: 'accessing',
  5514. fn: function (){
  5515. var self=this;
  5516. return self.homeContext;
  5517. return self;},
  5518. args: [],
  5519. source: unescape('home%0A%09%3Creturn%20self.homeContext%3E'),
  5520. messageSends: [],
  5521. referencedClasses: []
  5522. }),
  5523. smalltalk.MethodContext);
  5524. smalltalk.addMethod(
  5525. unescape('_temps'),
  5526. smalltalk.method({
  5527. selector: unescape('temps'),
  5528. category: 'accessing',
  5529. fn: function (){
  5530. var self=this;
  5531. return self.temps;
  5532. return self;},
  5533. args: [],
  5534. source: unescape('temps%0A%09%3Creturn%20self.temps%3E'),
  5535. messageSends: [],
  5536. referencedClasses: []
  5537. }),
  5538. smalltalk.MethodContext);
  5539. smalltalk.addMethod(
  5540. unescape('_printString'),
  5541. smalltalk.method({
  5542. selector: unescape('printString'),
  5543. category: 'accessing',
  5544. fn: function (){
  5545. var self=this;
  5546. return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_printString", [], smalltalk.Object), "__comma", [unescape("%28")]), "__comma", [smalltalk.send(self, "_asString", [])]), "__comma", [unescape("%29")]);
  5547. return self;},
  5548. args: [],
  5549. source: unescape('printString%0A%09%5Esuper%20printString%2C%20%27%28%27%2C%20self%20asString%2C%20%27%29%27'),
  5550. messageSends: [unescape("%2C"), "printString", "asString"],
  5551. referencedClasses: []
  5552. }),
  5553. smalltalk.MethodContext);
  5554. smalltalk.addMethod(
  5555. unescape('_asString'),
  5556. smalltalk.method({
  5557. selector: unescape('asString'),
  5558. category: 'accessing',
  5559. fn: function (){
  5560. var self=this;
  5561. 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", [])]);
  5562. return self;},
  5563. args: [],
  5564. source: unescape('asString%0A%09%5Eself%20receiver%20class%20printString%2C%20%27%20%3E%3E%20%27%2C%20self%20selector'),
  5565. messageSends: [unescape("%2C"), "printString", "class", "receiver", "selector"],
  5566. referencedClasses: []
  5567. }),
  5568. smalltalk.MethodContext);
  5569. smalltalk.addClass('Message', smalltalk.Object, ['selector', 'arguments'], 'Kernel-Methods');
  5570. smalltalk.addMethod(
  5571. unescape('_selector'),
  5572. smalltalk.method({
  5573. selector: unescape('selector'),
  5574. category: 'accessing',
  5575. fn: function (){
  5576. var self=this;
  5577. return self['@selector'];
  5578. return self;},
  5579. args: [],
  5580. source: unescape('selector%0A%09%5Eselector'),
  5581. messageSends: [],
  5582. referencedClasses: []
  5583. }),
  5584. smalltalk.Message);
  5585. smalltalk.addMethod(
  5586. unescape('_selector_'),
  5587. smalltalk.method({
  5588. selector: unescape('selector%3A'),
  5589. category: 'accessing',
  5590. fn: function (aString){
  5591. var self=this;
  5592. (self['@selector']=aString);
  5593. return self;},
  5594. args: ["aString"],
  5595. source: unescape('selector%3A%20aString%0A%09selector%20%3A%3D%20aString'),
  5596. messageSends: [],
  5597. referencedClasses: []
  5598. }),
  5599. smalltalk.Message);
  5600. smalltalk.addMethod(
  5601. unescape('_arguments_'),
  5602. smalltalk.method({
  5603. selector: unescape('arguments%3A'),
  5604. category: 'accessing',
  5605. fn: function (anArray){
  5606. var self=this;
  5607. (self['@arguments']=anArray);
  5608. return self;},
  5609. args: ["anArray"],
  5610. source: unescape('arguments%3A%20anArray%0A%09arguments%20%3A%3D%20anArray'),
  5611. messageSends: [],
  5612. referencedClasses: []
  5613. }),
  5614. smalltalk.Message);
  5615. smalltalk.addMethod(
  5616. unescape('_arguments'),
  5617. smalltalk.method({
  5618. selector: unescape('arguments'),
  5619. category: 'accessing',
  5620. fn: function (){
  5621. var self=this;
  5622. return self['@arguments'];
  5623. return self;},
  5624. args: [],
  5625. source: unescape('arguments%0A%09%5Earguments'),
  5626. messageSends: [],
  5627. referencedClasses: []
  5628. }),
  5629. smalltalk.Message);
  5630. smalltalk.addMethod(
  5631. unescape('_printString'),
  5632. smalltalk.method({
  5633. selector: unescape('printString'),
  5634. category: 'printing',
  5635. fn: function (){
  5636. var self=this;
  5637. 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_", [self['@selector']]);return smalltalk.send($rec, "_nextPutAll_", [unescape("%29")]);})(aStream);})]);
  5638. return self;},
  5639. args: [],
  5640. 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%09%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%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%09%09%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%09%09%09%09%09nextPutAll%3A%20selector%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%09%09%09nextPutAll%3A%20%27%29%27%20%09%09%09%09%5D'),
  5641. messageSends: ["streamContents:", "nextPutAll:", "printString"],
  5642. referencedClasses: ["String"]
  5643. }),
  5644. smalltalk.Message);
  5645. smalltalk.addMethod(
  5646. unescape('_selector_arguments_'),
  5647. smalltalk.method({
  5648. selector: unescape('selector%3Aarguments%3A'),
  5649. category: 'instance creation',
  5650. fn: function (aString, anArray){
  5651. var self=this;
  5652. return (function($rec){smalltalk.send($rec, "_selector_", [aString]);smalltalk.send($rec, "_arguments_", [anArray]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  5653. return self;},
  5654. args: ["aString", "anArray"],
  5655. 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'),
  5656. messageSends: ["selector:", "arguments:", "yourself", "new"],
  5657. referencedClasses: []
  5658. }),
  5659. smalltalk.Message.klass);
  5660. smalltalk.addPackage('Kernel-Collections', {});
  5661. smalltalk.addClass('Collection', smalltalk.Object, [], 'Kernel-Collections');
  5662. smalltalk.addMethod(
  5663. unescape('_size'),
  5664. smalltalk.method({
  5665. selector: unescape('size'),
  5666. category: 'accessing',
  5667. fn: function (){
  5668. var self=this;
  5669. smalltalk.send(self, "_subclassResponsibility", []);
  5670. return self;},
  5671. args: [],
  5672. source: unescape('size%0A%09self%20subclassResponsibility'),
  5673. messageSends: ["subclassResponsibility"],
  5674. referencedClasses: []
  5675. }),
  5676. smalltalk.Collection);
  5677. smalltalk.addMethod(
  5678. unescape('_readStream'),
  5679. smalltalk.method({
  5680. selector: unescape('readStream'),
  5681. category: 'accessing',
  5682. fn: function (){
  5683. var self=this;
  5684. return smalltalk.send(self, "_stream", []);
  5685. return self;},
  5686. args: [],
  5687. source: unescape('readStream%0A%09%5Eself%20stream'),
  5688. messageSends: ["stream"],
  5689. referencedClasses: []
  5690. }),
  5691. smalltalk.Collection);
  5692. smalltalk.addMethod(
  5693. unescape('_writeStream'),
  5694. smalltalk.method({
  5695. selector: unescape('writeStream'),
  5696. category: 'accessing',
  5697. fn: function (){
  5698. var self=this;
  5699. return smalltalk.send(self, "_stream", []);
  5700. return self;},
  5701. args: [],
  5702. source: unescape('writeStream%0A%09%5Eself%20stream'),
  5703. messageSends: ["stream"],
  5704. referencedClasses: []
  5705. }),
  5706. smalltalk.Collection);
  5707. smalltalk.addMethod(
  5708. unescape('_stream'),
  5709. smalltalk.method({
  5710. selector: unescape('stream'),
  5711. category: 'accessing',
  5712. fn: function (){
  5713. var self=this;
  5714. return smalltalk.send(smalltalk.send(self, "_streamClass", []), "_on_", [self]);
  5715. return self;},
  5716. args: [],
  5717. source: unescape('stream%0A%09%5Eself%20streamClass%20on%3A%20self'),
  5718. messageSends: ["on:", "streamClass"],
  5719. referencedClasses: []
  5720. }),
  5721. smalltalk.Collection);
  5722. smalltalk.addMethod(
  5723. unescape('_streamClass'),
  5724. smalltalk.method({
  5725. selector: unescape('streamClass'),
  5726. category: 'accessing',
  5727. fn: function (){
  5728. var self=this;
  5729. return smalltalk.send(smalltalk.send(self, "_class", []), "_streamClass", []);
  5730. return self;},
  5731. args: [],
  5732. source: unescape('streamClass%0A%09%5Eself%20class%20streamClass'),
  5733. messageSends: ["streamClass", "class"],
  5734. referencedClasses: []
  5735. }),
  5736. smalltalk.Collection);
  5737. smalltalk.addMethod(
  5738. unescape('_add_'),
  5739. smalltalk.method({
  5740. selector: unescape('add%3A'),
  5741. category: 'adding/removing',
  5742. fn: function (anObject){
  5743. var self=this;
  5744. smalltalk.send(self, "_subclassResponsibility", []);
  5745. return self;},
  5746. args: ["anObject"],
  5747. source: unescape('add%3A%20anObject%0A%09self%20subclassResponsibility'),
  5748. messageSends: ["subclassResponsibility"],
  5749. referencedClasses: []
  5750. }),
  5751. smalltalk.Collection);
  5752. smalltalk.addMethod(
  5753. unescape('_addAll_'),
  5754. smalltalk.method({
  5755. selector: unescape('addAll%3A'),
  5756. category: 'adding/removing',
  5757. fn: function (aCollection){
  5758. var self=this;
  5759. smalltalk.send(aCollection, "_do_", [(function(each){return smalltalk.send(self, "_add_", [each]);})]);
  5760. return aCollection;
  5761. return self;},
  5762. args: ["aCollection"],
  5763. 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'),
  5764. messageSends: ["do:", "add:"],
  5765. referencedClasses: []
  5766. }),
  5767. smalltalk.Collection);
  5768. smalltalk.addMethod(
  5769. unescape('__comma'),
  5770. smalltalk.method({
  5771. selector: unescape('%2C'),
  5772. category: 'copying',
  5773. fn: function (aCollection){
  5774. var self=this;
  5775. return (function($rec){smalltalk.send($rec, "_addAll_", [aCollection]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_copy", []));
  5776. return self;},
  5777. args: ["aCollection"],
  5778. 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'),
  5779. messageSends: ["addAll:", "yourself", "copy"],
  5780. referencedClasses: []
  5781. }),
  5782. smalltalk.Collection);
  5783. smalltalk.addMethod(
  5784. unescape('_copyWith_'),
  5785. smalltalk.method({
  5786. selector: unescape('copyWith%3A'),
  5787. category: 'copying',
  5788. fn: function (anObject){
  5789. var self=this;
  5790. return (function($rec){smalltalk.send($rec, "_add_", [anObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_copy", []));
  5791. return self;},
  5792. args: ["anObject"],
  5793. source: unescape('copyWith%3A%20anObject%0A%09%5Eself%20copy%20add%3A%20anObject%3B%20yourself'),
  5794. messageSends: ["add:", "yourself", "copy"],
  5795. referencedClasses: []
  5796. }),
  5797. smalltalk.Collection);
  5798. smalltalk.addMethod(
  5799. unescape('_copyWithAll_'),
  5800. smalltalk.method({
  5801. selector: unescape('copyWithAll%3A'),
  5802. category: 'copying',
  5803. fn: function (aCollection){
  5804. var self=this;
  5805. return (function($rec){smalltalk.send($rec, "_addAll_", [aCollection]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_copy", []));
  5806. return self;},
  5807. args: ["aCollection"],
  5808. source: unescape('copyWithAll%3A%20aCollection%0A%09%5Eself%20copy%20addAll%3A%20aCollection%3B%20yourself'),
  5809. messageSends: ["addAll:", "yourself", "copy"],
  5810. referencedClasses: []
  5811. }),
  5812. smalltalk.Collection);
  5813. smalltalk.addMethod(
  5814. unescape('_asArray'),
  5815. smalltalk.method({
  5816. selector: unescape('asArray'),
  5817. category: 'converting',
  5818. fn: function (){
  5819. var self=this;
  5820. return smalltalk.send((smalltalk.Array || Array), "_withAll_", [self]);
  5821. return self;},
  5822. args: [],
  5823. source: unescape('asArray%0A%09%5EArray%20withAll%3A%20self'),
  5824. messageSends: ["withAll:"],
  5825. referencedClasses: ["Array"]
  5826. }),
  5827. smalltalk.Collection);
  5828. smalltalk.addMethod(
  5829. unescape('_do_'),
  5830. smalltalk.method({
  5831. selector: unescape('do%3A'),
  5832. category: 'enumerating',
  5833. fn: function (aBlock){
  5834. var self=this;
  5835. for(var i=0;i<self.length;i++){aBlock(self[i]);};
  5836. return self;},
  5837. args: ["aBlock"],
  5838. source: unescape('do%3A%20aBlock%0A%09%3Cfor%28var%20i%3D0%3Bi%3Cself.length%3Bi++%29%7BaBlock%28self%5Bi%5D%29%3B%7D%3E'),
  5839. messageSends: [],
  5840. referencedClasses: []
  5841. }),
  5842. smalltalk.Collection);
  5843. smalltalk.addMethod(
  5844. unescape('_collect_'),
  5845. smalltalk.method({
  5846. selector: unescape('collect%3A'),
  5847. category: 'enumerating',
  5848. fn: function (aBlock){
  5849. var self=this;
  5850. var newCollection=nil;
  5851. (newCollection=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []));
  5852. smalltalk.send(self, "_do_", [(function(each){return smalltalk.send(newCollection, "_add_", [smalltalk.send(aBlock, "_value_", [each])]);})]);
  5853. return newCollection;
  5854. return self;},
  5855. args: ["aBlock"],
  5856. 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'),
  5857. messageSends: ["new", "class", "do:", "add:", "value:"],
  5858. referencedClasses: []
  5859. }),
  5860. smalltalk.Collection);
  5861. smalltalk.addMethod(
  5862. unescape('_detect_'),
  5863. smalltalk.method({
  5864. selector: unescape('detect%3A'),
  5865. category: 'enumerating',
  5866. fn: function (aBlock){
  5867. var self=this;
  5868. return smalltalk.send(self, "_detect_ifNone_", [aBlock, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
  5869. return self;},
  5870. args: ["aBlock"],
  5871. source: unescape('detect%3A%20aBlock%0A%09%5Eself%20detect%3A%20aBlock%20ifNone%3A%20%5Bself%20errorNotFound%5D'),
  5872. messageSends: ["detect:ifNone:", "errorNotFound"],
  5873. referencedClasses: []
  5874. }),
  5875. smalltalk.Collection);
  5876. smalltalk.addMethod(
  5877. unescape('_detect_ifNone_'),
  5878. smalltalk.method({
  5879. selector: unescape('detect%3AifNone%3A'),
  5880. category: 'enumerating',
  5881. fn: function (aBlock, anotherBlock){
  5882. var self=this;
  5883. for(var i = 0; i < self.length; i++)
  5884. if(aBlock(self[i]))
  5885. return self[i];
  5886. return anotherBlock();
  5887. ;
  5888. return self;},
  5889. args: ["aBlock", "anotherBlock"],
  5890. 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'),
  5891. messageSends: [],
  5892. referencedClasses: []
  5893. }),
  5894. smalltalk.Collection);
  5895. smalltalk.addMethod(
  5896. unescape('_do_separatedBy_'),
  5897. smalltalk.method({
  5898. selector: unescape('do%3AseparatedBy%3A'),
  5899. category: 'enumerating',
  5900. fn: function (aBlock, anotherBlock){
  5901. var self=this;
  5902. var first=nil;
  5903. (first=true);
  5904. 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]);})]);
  5905. return self;},
  5906. args: ["aBlock", "anotherBlock"],
  5907. source: unescape('do%3A%20aBlock%20separatedBy%3A%20anotherBlock%0A%09%7C%20first%20%7C%0A%09first%20%3A%3D%20true.%0A%09self%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20first%0A%09%09ifTrue%3A%20%5Bfirst%20%3A%3D%20false%5D%0A%09%09ifFalse%3A%20%5BanotherBlock%20value%5D.%0A%09%20%20%20%20aBlock%20value%3A%20each%5D'),
  5908. messageSends: ["do:", "ifTrue:ifFalse:", "value", "value:"],
  5909. referencedClasses: []
  5910. }),
  5911. smalltalk.Collection);
  5912. smalltalk.addMethod(
  5913. unescape('_inject_into_'),
  5914. smalltalk.method({
  5915. selector: unescape('inject%3Ainto%3A'),
  5916. category: 'enumerating',
  5917. fn: function (anObject, aBlock){
  5918. var self=this;
  5919. var result=nil;
  5920. (result=anObject);
  5921. smalltalk.send(self, "_do_", [(function(each){return (result=smalltalk.send(aBlock, "_value_value_", [result, each]));})]);
  5922. return result;
  5923. return self;},
  5924. args: ["anObject", "aBlock"],
  5925. 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'),
  5926. messageSends: ["do:", "value:value:"],
  5927. referencedClasses: []
  5928. }),
  5929. smalltalk.Collection);
  5930. smalltalk.addMethod(
  5931. unescape('_reject_'),
  5932. smalltalk.method({
  5933. selector: unescape('reject%3A'),
  5934. category: 'enumerating',
  5935. fn: function (aBlock){
  5936. var self=this;
  5937. return smalltalk.send(self, "_select_", [(function(each){return smalltalk.send(smalltalk.send(aBlock, "_value_", [each]), "__eq", [false]);})]);
  5938. return self;},
  5939. args: ["aBlock"],
  5940. 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'),
  5941. messageSends: ["select:", unescape("%3D"), "value:"],
  5942. referencedClasses: []
  5943. }),
  5944. smalltalk.Collection);
  5945. smalltalk.addMethod(
  5946. unescape('_select_'),
  5947. smalltalk.method({
  5948. selector: unescape('select%3A'),
  5949. category: 'enumerating',
  5950. fn: function (aBlock){
  5951. var self=this;
  5952. var stream=nil;
  5953. (stream=smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_new", []), "_writeStream", []));
  5954. 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]);})]));})]);
  5955. return smalltalk.send(stream, "_contents", []);
  5956. return self;},
  5957. args: ["aBlock"],
  5958. 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'),
  5959. messageSends: ["writeStream", "new", "class", "do:", "ifTrue:", "value:", "nextPut:", "contents"],
  5960. referencedClasses: []
  5961. }),
  5962. smalltalk.Collection);
  5963. smalltalk.addMethod(
  5964. unescape('_errorNotFound'),
  5965. smalltalk.method({
  5966. selector: unescape('errorNotFound'),
  5967. category: 'error handling',
  5968. fn: function (){
  5969. var self=this;
  5970. smalltalk.send(self, "_error_", ["Object is not in the collection"]);
  5971. return self;},
  5972. args: [],
  5973. source: unescape('errorNotFound%0A%09self%20error%3A%20%27Object%20is%20not%20in%20the%20collection%27'),
  5974. messageSends: ["error:"],
  5975. referencedClasses: []
  5976. }),
  5977. smalltalk.Collection);
  5978. smalltalk.addMethod(
  5979. unescape('_includes_'),
  5980. smalltalk.method({
  5981. selector: unescape('includes%3A'),
  5982. category: 'testing',
  5983. fn: function (anObject){
  5984. var self=this;
  5985. var i = self.length;
  5986. while (i--) {
  5987. if (smalltalk.send(self[i], "__eq", [anObject])) {return true;}
  5988. }
  5989. return false
  5990. ;
  5991. return self;},
  5992. args: ["anObject"],
  5993. 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'),
  5994. messageSends: [],
  5995. referencedClasses: []
  5996. }),
  5997. smalltalk.Collection);
  5998. smalltalk.addMethod(
  5999. unescape('_notEmpty'),
  6000. smalltalk.method({
  6001. selector: unescape('notEmpty'),
  6002. category: 'testing',
  6003. fn: function (){
  6004. var self=this;
  6005. return smalltalk.send(smalltalk.send(self, "_isEmpty", []), "_not", []);
  6006. return self;},
  6007. args: [],
  6008. source: unescape('notEmpty%0A%09%5Eself%20isEmpty%20not'),
  6009. messageSends: ["not", "isEmpty"],
  6010. referencedClasses: []
  6011. }),
  6012. smalltalk.Collection);
  6013. smalltalk.addMethod(
  6014. unescape('_isEmpty'),
  6015. smalltalk.method({
  6016. selector: unescape('isEmpty'),
  6017. category: 'testing',
  6018. fn: function (){
  6019. var self=this;
  6020. return smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [(0)]);
  6021. return self;},
  6022. args: [],
  6023. source: unescape('isEmpty%0A%09%5Eself%20size%20%3D%200'),
  6024. messageSends: [unescape("%3D"), "size"],
  6025. referencedClasses: []
  6026. }),
  6027. smalltalk.Collection);
  6028. smalltalk.addMethod(
  6029. unescape('_remove_'),
  6030. smalltalk.method({
  6031. selector: unescape('remove%3A'),
  6032. category: 'adding/removing',
  6033. fn: function (anObject){
  6034. var self=this;
  6035. return smalltalk.send(self, "_remove_ifAbsent_", [anObject, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
  6036. return self;},
  6037. args: ["anObject"],
  6038. source: unescape('remove%3A%20anObject%0A%20%20%20%20%5Eself%20remove%3A%20anObject%20ifAbsent%3A%20%5Bself%20errorNotFound%5D'),
  6039. messageSends: ["remove:ifAbsent:", "errorNotFound"],
  6040. referencedClasses: []
  6041. }),
  6042. smalltalk.Collection);
  6043. smalltalk.addMethod(
  6044. unescape('_asSet'),
  6045. smalltalk.method({
  6046. selector: unescape('asSet'),
  6047. category: 'converting',
  6048. fn: function (){
  6049. var self=this;
  6050. return smalltalk.send((smalltalk.Set || Set), "_withAll_", [self]);
  6051. return self;},
  6052. args: [],
  6053. source: unescape('asSet%0A%09%5ESet%20withAll%3A%20self'),
  6054. messageSends: ["withAll:"],
  6055. referencedClasses: ["Set"]
  6056. }),
  6057. smalltalk.Collection);
  6058. smalltalk.addMethod(
  6059. unescape('_ifNotEmpty_'),
  6060. smalltalk.method({
  6061. selector: unescape('ifNotEmpty%3A'),
  6062. category: 'testing',
  6063. fn: function (aBlock){
  6064. var self=this;
  6065. smalltalk.send(smalltalk.send(self, "_notEmpty", []), "_ifTrue_", [aBlock]);
  6066. return self;},
  6067. args: ["aBlock"],
  6068. source: unescape('ifNotEmpty%3A%20aBlock%0A%09self%20notEmpty%20ifTrue%3A%20aBlock.'),
  6069. messageSends: ["ifTrue:", "notEmpty"],
  6070. referencedClasses: []
  6071. }),
  6072. smalltalk.Collection);
  6073. smalltalk.addMethod(
  6074. unescape('_ifEmpty_'),
  6075. smalltalk.method({
  6076. selector: unescape('ifEmpty%3A'),
  6077. category: 'testing',
  6078. fn: function (aBlock){
  6079. var self=this;
  6080. smalltalk.send(smalltalk.send(self, "_isEmpty", []), "_ifTrue_", [aBlock]);
  6081. return self;},
  6082. args: ["aBlock"],
  6083. source: unescape('ifEmpty%3A%20aBlock%0A%09self%20isEmpty%20ifTrue%3A%20aBlock.'),
  6084. messageSends: ["ifTrue:", "isEmpty"],
  6085. referencedClasses: []
  6086. }),
  6087. smalltalk.Collection);
  6088. smalltalk.addMethod(
  6089. unescape('_copyWithoutAll_'),
  6090. smalltalk.method({
  6091. selector: unescape('copyWithoutAll%3A'),
  6092. category: 'copying',
  6093. fn: function (aCollection){
  6094. var self=this;
  6095. return smalltalk.send(self, "_reject_", [(function(each){return smalltalk.send(aCollection, "_includes_", [each]);})]);
  6096. return self;},
  6097. args: ["aCollection"],
  6098. source: unescape('copyWithoutAll%3A%20aCollection%0A%09%22Answer%20a%20copy%20of%20the%20receiver%20that%20does%20not%20contain%20any%20elements%20%0A%09equal%20to%20those%20in%20aCollection.%22%0A%0A%09%5E%20self%20reject%3A%20%5B%3Aeach%20%7C%20aCollection%20includes%3A%20each%5D'),
  6099. messageSends: ["reject:", "includes:"],
  6100. referencedClasses: []
  6101. }),
  6102. smalltalk.Collection);
  6103. smalltalk.addMethod(
  6104. unescape('_remove_ifAbsent_'),
  6105. smalltalk.method({
  6106. selector: unescape('remove%3AifAbsent%3A'),
  6107. category: 'adding/removing',
  6108. fn: function (anObject, aBlock){
  6109. var self=this;
  6110. smalltalk.send(self, "_subclassResponsibility", []);
  6111. return self;},
  6112. args: ["anObject", "aBlock"],
  6113. source: unescape('remove%3A%20anObject%20ifAbsent%3A%20aBlock%0A%20%20%20%20self%20subclassResponsibility'),
  6114. messageSends: ["subclassResponsibility"],
  6115. referencedClasses: []
  6116. }),
  6117. smalltalk.Collection);
  6118. smalltalk.addMethod(
  6119. unescape('_asJSONString'),
  6120. smalltalk.method({
  6121. selector: unescape('asJSONString'),
  6122. category: 'converting',
  6123. fn: function (){
  6124. var self=this;
  6125. return smalltalk.send((smalltalk.JSON || JSON), "_stringify_", [smalltalk.send(self, "_collect_", [(function(each){return smalltalk.send(each, "_asJSONString", []);})])]);
  6126. return self;},
  6127. args: [],
  6128. source: unescape('asJSONString%0A%09%5EJSON%20stringify%3A%20%28self%20collect%3A%20%5B%3Aeach%20%7C%20each%20asJSONString%5D%29'),
  6129. messageSends: ["stringify:", "collect:", "asJSONString"],
  6130. referencedClasses: ["JSON"]
  6131. }),
  6132. smalltalk.Collection);
  6133. smalltalk.addMethod(
  6134. unescape('_asOrderedCollection'),
  6135. smalltalk.method({
  6136. selector: unescape('asOrderedCollection'),
  6137. category: 'converting',
  6138. fn: function (){
  6139. var self=this;
  6140. return smalltalk.send((smalltalk.OrderedCollection || OrderedCollection), "_withAll_", [self]);
  6141. return self;},
  6142. args: [],
  6143. source: unescape('asOrderedCollection%0A%09%5EOrderedCollection%20withAll%3A%20self'),
  6144. messageSends: ["withAll:"],
  6145. referencedClasses: ["OrderedCollection"]
  6146. }),
  6147. smalltalk.Collection);
  6148. smalltalk.addMethod(
  6149. unescape('_streamClass'),
  6150. smalltalk.method({
  6151. selector: unescape('streamClass'),
  6152. category: 'accessing',
  6153. fn: function (){
  6154. var self=this;
  6155. return (smalltalk.Stream || Stream);
  6156. return self;},
  6157. args: [],
  6158. source: unescape('streamClass%0A%09%20%20%20%20%5EStream'),
  6159. messageSends: [],
  6160. referencedClasses: ["Stream"]
  6161. }),
  6162. smalltalk.Collection.klass);
  6163. smalltalk.addMethod(
  6164. unescape('_with_'),
  6165. smalltalk.method({
  6166. selector: unescape('with%3A'),
  6167. category: 'instance creation',
  6168. fn: function (anObject){
  6169. var self=this;
  6170. return (function($rec){smalltalk.send($rec, "_add_", [anObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  6171. return self;},
  6172. args: ["anObject"],
  6173. source: unescape('with%3A%20anObject%0A%09%20%20%20%20%5Eself%20new%0A%09%09add%3A%20anObject%3B%0A%09%09yourself'),
  6174. messageSends: ["add:", "yourself", "new"],
  6175. referencedClasses: []
  6176. }),
  6177. smalltalk.Collection.klass);
  6178. smalltalk.addMethod(
  6179. unescape('_with_with_'),
  6180. smalltalk.method({
  6181. selector: unescape('with%3Awith%3A'),
  6182. category: 'instance creation',
  6183. fn: function (anObject, anotherObject){
  6184. var self=this;
  6185. return (function($rec){smalltalk.send($rec, "_add_", [anObject]);smalltalk.send($rec, "_add_", [anotherObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  6186. return self;},
  6187. args: ["anObject", "anotherObject"],
  6188. 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'),
  6189. messageSends: ["add:", "yourself", "new"],
  6190. referencedClasses: []
  6191. }),
  6192. smalltalk.Collection.klass);
  6193. smalltalk.addMethod(
  6194. unescape('_with_with_with_'),
  6195. smalltalk.method({
  6196. selector: unescape('with%3Awith%3Awith%3A'),
  6197. category: 'instance creation',
  6198. fn: function (firstObject, secondObject, thirdObject){
  6199. var self=this;
  6200. 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", []));
  6201. return self;},
  6202. args: ["firstObject", "secondObject", "thirdObject"],
  6203. 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'),
  6204. messageSends: ["add:", "yourself", "new"],
  6205. referencedClasses: []
  6206. }),
  6207. smalltalk.Collection.klass);
  6208. smalltalk.addMethod(
  6209. unescape('_withAll_'),
  6210. smalltalk.method({
  6211. selector: unescape('withAll%3A'),
  6212. category: 'instance creation',
  6213. fn: function (aCollection){
  6214. var self=this;
  6215. return (function($rec){smalltalk.send($rec, "_addAll_", [aCollection]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  6216. return self;},
  6217. args: ["aCollection"],
  6218. source: unescape('withAll%3A%20aCollection%0A%09%20%20%20%20%5Eself%20new%0A%09%09addAll%3A%20aCollection%3B%0A%09%09yourself'),
  6219. messageSends: ["addAll:", "yourself", "new"],
  6220. referencedClasses: []
  6221. }),
  6222. smalltalk.Collection.klass);
  6223. smalltalk.addMethod(
  6224. unescape('_new_'),
  6225. smalltalk.method({
  6226. selector: unescape('new%3A'),
  6227. category: 'instance creation',
  6228. fn: function (anInteger){
  6229. var self=this;
  6230. return smalltalk.send(self, "_new", []);
  6231. return self;},
  6232. args: ["anInteger"],
  6233. source: unescape('new%3A%20anInteger%0A%09%5Eself%20new'),
  6234. messageSends: ["new"],
  6235. referencedClasses: []
  6236. }),
  6237. smalltalk.Collection.klass);
  6238. smalltalk.addClass('SequenceableCollection', smalltalk.Collection, [], 'Kernel-Collections');
  6239. smalltalk.addMethod(
  6240. unescape('_at_'),
  6241. smalltalk.method({
  6242. selector: unescape('at%3A'),
  6243. category: 'accessing',
  6244. fn: function (anIndex){
  6245. var self=this;
  6246. return smalltalk.send(self, "_at_ifAbsent_", [anIndex, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
  6247. return self;},
  6248. args: ["anIndex"],
  6249. source: unescape('at%3A%20anIndex%0A%09%5Eself%20at%3A%20anIndex%20ifAbsent%3A%20%5B%0A%09%20%20%20%20self%20errorNotFound%5D'),
  6250. messageSends: ["at:ifAbsent:", "errorNotFound"],
  6251. referencedClasses: []
  6252. }),
  6253. smalltalk.SequenceableCollection);
  6254. smalltalk.addMethod(
  6255. unescape('_at_ifAbsent_'),
  6256. smalltalk.method({
  6257. selector: unescape('at%3AifAbsent%3A'),
  6258. category: 'accessing',
  6259. fn: function (anIndex, aBlock){
  6260. var self=this;
  6261. smalltalk.send(self, "_subclassResponsibility", []);
  6262. return self;},
  6263. args: ["anIndex", "aBlock"],
  6264. source: unescape('at%3A%20anIndex%20ifAbsent%3A%20aBlock%0A%09self%20subclassResponsibility'),
  6265. messageSends: ["subclassResponsibility"],
  6266. referencedClasses: []
  6267. }),
  6268. smalltalk.SequenceableCollection);
  6269. smalltalk.addMethod(
  6270. unescape('_at_put_'),
  6271. smalltalk.method({
  6272. selector: unescape('at%3Aput%3A'),
  6273. category: 'accessing',
  6274. fn: function (anIndex, anObject){
  6275. var self=this;
  6276. smalltalk.send(self, "_subclassResponsibility", []);
  6277. return self;},
  6278. args: ["anIndex", "anObject"],
  6279. source: unescape('at%3A%20anIndex%20put%3A%20anObject%0A%09self%20subclassResponsibility'),
  6280. messageSends: ["subclassResponsibility"],
  6281. referencedClasses: []
  6282. }),
  6283. smalltalk.SequenceableCollection);
  6284. smalltalk.addMethod(
  6285. unescape('_copyFrom_to_'),
  6286. smalltalk.method({
  6287. selector: unescape('copyFrom%3Ato%3A'),
  6288. category: 'copying',
  6289. fn: function (anIndex, anotherIndex){
  6290. var self=this;
  6291. var range=nil;
  6292. var newCollection=nil;
  6293. (range=smalltalk.send(anIndex, "_to_", [anotherIndex]));
  6294. (newCollection=smalltalk.send(smalltalk.send(self, "_class", []), "_new_", [smalltalk.send(range, "_size", [])]));
  6295. smalltalk.send(range, "_do_", [(function(each){return smalltalk.send(newCollection, "_at_put_", [each, smalltalk.send(self, "_at_", [each])]);})]);
  6296. return newCollection;
  6297. return self;},
  6298. args: ["anIndex", "anotherIndex"],
  6299. source: unescape('copyFrom%3A%20anIndex%20to%3A%20anotherIndex%0A%09%7C%20range%20newCollection%20%7C%0A%09range%20%3A%3D%20anIndex%20to%3A%20anotherIndex.%0A%09newCollection%20%3A%3D%20self%20class%20new%3A%20range%20size.%0A%09range%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20newCollection%20at%3A%20each%20put%3A%20%28self%20at%3A%20each%29%5D.%0A%09%5EnewCollection'),
  6300. messageSends: ["to:", "new:", "class", "size", "do:", "at:put:", "at:"],
  6301. referencedClasses: []
  6302. }),
  6303. smalltalk.SequenceableCollection);
  6304. smalltalk.addMethod(
  6305. unescape('_first'),
  6306. smalltalk.method({
  6307. selector: unescape('first'),
  6308. category: 'accessing',
  6309. fn: function (){
  6310. var self=this;
  6311. return smalltalk.send(self, "_at_", [(1)]);
  6312. return self;},
  6313. args: [],
  6314. source: unescape('first%0A%09%5Eself%20at%3A%201'),
  6315. messageSends: ["at:"],
  6316. referencedClasses: []
  6317. }),
  6318. smalltalk.SequenceableCollection);
  6319. smalltalk.addMethod(
  6320. unescape('_fourth'),
  6321. smalltalk.method({
  6322. selector: unescape('fourth'),
  6323. category: 'accessing',
  6324. fn: function (){
  6325. var self=this;
  6326. return smalltalk.send(self, "_at_", [(4)]);
  6327. return self;},
  6328. args: [],
  6329. source: unescape('fourth%0A%09%5Eself%20at%3A%204'),
  6330. messageSends: ["at:"],
  6331. referencedClasses: []
  6332. }),
  6333. smalltalk.SequenceableCollection);
  6334. smalltalk.addMethod(
  6335. unescape('_last'),
  6336. smalltalk.method({
  6337. selector: unescape('last'),
  6338. category: 'accessing',
  6339. fn: function (){
  6340. var self=this;
  6341. return smalltalk.send(self, "_at_", [smalltalk.send(self, "_size", [])]);
  6342. return self;},
  6343. args: [],
  6344. source: unescape('last%0A%09%5Eself%20at%3A%20self%20size'),
  6345. messageSends: ["at:", "size"],
  6346. referencedClasses: []
  6347. }),
  6348. smalltalk.SequenceableCollection);
  6349. smalltalk.addMethod(
  6350. unescape('_second'),
  6351. smalltalk.method({
  6352. selector: unescape('second'),
  6353. category: 'accessing',
  6354. fn: function (){
  6355. var self=this;
  6356. return smalltalk.send(self, "_at_", [(2)]);
  6357. return self;},
  6358. args: [],
  6359. source: unescape('second%0A%09%5Eself%20at%3A%202'),
  6360. messageSends: ["at:"],
  6361. referencedClasses: []
  6362. }),
  6363. smalltalk.SequenceableCollection);
  6364. smalltalk.addMethod(
  6365. unescape('_third'),
  6366. smalltalk.method({
  6367. selector: unescape('third'),
  6368. category: 'accessing',
  6369. fn: function (){
  6370. var self=this;
  6371. return smalltalk.send(self, "_at_", [(3)]);
  6372. return self;},
  6373. args: [],
  6374. source: unescape('third%0A%09%5Eself%20at%3A%203'),
  6375. messageSends: ["at:"],
  6376. referencedClasses: []
  6377. }),
  6378. smalltalk.SequenceableCollection);
  6379. smalltalk.addMethod(
  6380. unescape('_removeLast'),
  6381. smalltalk.method({
  6382. selector: unescape('removeLast'),
  6383. category: 'adding',
  6384. fn: function (){
  6385. var self=this;
  6386. smalltalk.send(self, "_remove_", [smalltalk.send(self, "_last", [])]);
  6387. return self;},
  6388. args: [],
  6389. source: unescape('removeLast%0A%09self%20remove%3A%20self%20last'),
  6390. messageSends: ["remove:", "last"],
  6391. referencedClasses: []
  6392. }),
  6393. smalltalk.SequenceableCollection);
  6394. smalltalk.addMethod(
  6395. unescape('_addLast_'),
  6396. smalltalk.method({
  6397. selector: unescape('addLast%3A'),
  6398. category: 'adding',
  6399. fn: function (anObject){
  6400. var self=this;
  6401. smalltalk.send(self, "_add_", [anObject]);
  6402. return self;},
  6403. args: ["anObject"],
  6404. source: unescape('addLast%3A%20anObject%0A%09self%20add%3A%20anObject'),
  6405. messageSends: ["add:"],
  6406. referencedClasses: []
  6407. }),
  6408. smalltalk.SequenceableCollection);
  6409. smalltalk.addMethod(
  6410. unescape('_withIndexDo_'),
  6411. smalltalk.method({
  6412. selector: unescape('withIndexDo%3A'),
  6413. category: 'enumerating',
  6414. fn: function (aBlock){
  6415. var self=this;
  6416. for(var i=0;i<self.length;i++){aBlock(self[i], i+1);};
  6417. return self;},
  6418. args: ["aBlock"],
  6419. 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'),
  6420. messageSends: [],
  6421. referencedClasses: []
  6422. }),
  6423. smalltalk.SequenceableCollection);
  6424. smalltalk.addMethod(
  6425. unescape('_allButFirst'),
  6426. smalltalk.method({
  6427. selector: unescape('allButFirst'),
  6428. category: 'accessing',
  6429. fn: function (){
  6430. var self=this;
  6431. return smalltalk.send(self, "_copyFrom_to_", [(2), smalltalk.send(self, "_size", [])]);
  6432. return self;},
  6433. args: [],
  6434. source: unescape('allButFirst%0A%09%5Eself%20copyFrom%3A%202%20to%3A%20self%20size'),
  6435. messageSends: ["copyFrom:to:", "size"],
  6436. referencedClasses: []
  6437. }),
  6438. smalltalk.SequenceableCollection);
  6439. smalltalk.addMethod(
  6440. unescape('_allButLast'),
  6441. smalltalk.method({
  6442. selector: unescape('allButLast'),
  6443. category: 'accessing',
  6444. fn: function (){
  6445. var self=this;
  6446. return smalltalk.send(self, "_copyFrom_to_", [(1), ((($receiver = smalltalk.send(self, "_size", [])).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)]))]);
  6447. return self;},
  6448. args: [],
  6449. source: unescape('allButLast%0A%09%5Eself%20copyFrom%3A%201%20to%3A%20self%20size%20-%201'),
  6450. messageSends: ["copyFrom:to:", unescape("-"), "size"],
  6451. referencedClasses: []
  6452. }),
  6453. smalltalk.SequenceableCollection);
  6454. smalltalk.addMethod(
  6455. unescape('_indexOf_'),
  6456. smalltalk.method({
  6457. selector: unescape('indexOf%3A'),
  6458. category: 'accessing',
  6459. fn: function (anObject){
  6460. var self=this;
  6461. return smalltalk.send(self, "_indexOf_ifAbsent_", [anObject, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
  6462. return self;},
  6463. args: ["anObject"],
  6464. source: unescape('indexOf%3A%20anObject%0A%09%5Eself%20indexOf%3A%20anObject%20ifAbsent%3A%20%5Bself%20errorNotFound%5D'),
  6465. messageSends: ["indexOf:ifAbsent:", "errorNotFound"],
  6466. referencedClasses: []
  6467. }),
  6468. smalltalk.SequenceableCollection);
  6469. smalltalk.addMethod(
  6470. unescape('_indexOf_ifAbsent_'),
  6471. smalltalk.method({
  6472. selector: unescape('indexOf%3AifAbsent%3A'),
  6473. category: 'accessing',
  6474. fn: function (anObject, aBlock){
  6475. var self=this;
  6476. for(var i=0;i<self.length;i++){
  6477. if(self[i].__eq(anObject)) {return i+1}
  6478. }
  6479. return aBlock();
  6480. ;
  6481. return self;},
  6482. args: ["anObject", "aBlock"],
  6483. 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'),
  6484. messageSends: [],
  6485. referencedClasses: []
  6486. }),
  6487. smalltalk.SequenceableCollection);
  6488. smalltalk.addMethod(
  6489. unescape('_indexOf_startingAt_ifAbsent_'),
  6490. smalltalk.method({
  6491. selector: unescape('indexOf%3AstartingAt%3AifAbsent%3A'),
  6492. category: 'accessing',
  6493. fn: function (anObject, start, aBlock){
  6494. var self=this;
  6495. for(var i=start-1;i<self.length;i++){
  6496. if(self[i].__eq(anObject)) {return i+1}
  6497. }
  6498. return aBlock();
  6499. ;
  6500. return self;},
  6501. args: ["anObject", "start", "aBlock"],
  6502. source: unescape('indexOf%3A%20anObject%20startingAt%3A%20start%20ifAbsent%3A%20aBlock%0A%09%3C%0A%09%09for%28var%20i%3Dstart-1%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'),
  6503. messageSends: [],
  6504. referencedClasses: []
  6505. }),
  6506. smalltalk.SequenceableCollection);
  6507. smalltalk.addMethod(
  6508. unescape('_indexOf_startingAt_'),
  6509. smalltalk.method({
  6510. selector: unescape('indexOf%3AstartingAt%3A'),
  6511. category: 'accessing',
  6512. fn: function (anObject, start){
  6513. var self=this;
  6514. return smalltalk.send(self, "_indexOf_startingAt_ifAbsent_", [anObject, start, (function(){return (0);})]);
  6515. return self;},
  6516. args: ["anObject", "start"],
  6517. source: unescape('indexOf%3A%20anObject%20startingAt%3A%20start%0A%09%22Answer%20the%20index%20of%20the%20first%20occurence%20of%20anElement%20after%20start%0A%09within%20the%20receiver.%20If%20the%20receiver%20does%20not%20contain%20anElement%2C%20%0A%09answer%200.%22%0A%09%5Eself%20indexOf%3A%20anObject%20startingAt%3A%20start%20ifAbsent%3A%20%5B0%5D'),
  6518. messageSends: ["indexOf:startingAt:ifAbsent:"],
  6519. referencedClasses: []
  6520. }),
  6521. smalltalk.SequenceableCollection);
  6522. smalltalk.addMethod(
  6523. unescape('_reversed'),
  6524. smalltalk.method({
  6525. selector: unescape('reversed'),
  6526. category: 'converting',
  6527. fn: function (){
  6528. var self=this;
  6529. smalltalk.send(self, "_subclassResponsibility", []);
  6530. return self;},
  6531. args: [],
  6532. source: unescape('reversed%0A%09self%20subclassResponsibility'),
  6533. messageSends: ["subclassResponsibility"],
  6534. referencedClasses: []
  6535. }),
  6536. smalltalk.SequenceableCollection);
  6537. smalltalk.addMethod(
  6538. unescape('_atRandom'),
  6539. smalltalk.method({
  6540. selector: unescape('atRandom'),
  6541. category: 'accessing',
  6542. fn: function (){
  6543. var self=this;
  6544. return smalltalk.send(self, "_at_", [smalltalk.send(smalltalk.send(self, "_size", []), "_atRandom", [])]);
  6545. return self;},
  6546. args: [],
  6547. source: unescape('atRandom%0A%09%5E%20self%20at%3A%20self%20size%20atRandom'),
  6548. messageSends: ["at:", "atRandom", "size"],
  6549. referencedClasses: []
  6550. }),
  6551. smalltalk.SequenceableCollection);
  6552. smalltalk.addMethod(
  6553. unescape('__eq'),
  6554. smalltalk.method({
  6555. selector: unescape('%3D'),
  6556. category: 'comparing',
  6557. fn: function (aCollection){
  6558. var self=this;
  6559. try{((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [smalltalk.send(aCollection, "_class", [])]), "_and_", [(function(){return smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [smalltalk.send(aCollection, "_size", [])]);})])).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}})})();})]));
  6560. smalltalk.send(self, "_withIndexDo_", [(function(each, i){return ((($receiver = smalltalk.send(smalltalk.send(aCollection, "_at_", [i]), "__eq", [each])).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}})})();})]));})]);
  6561. (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return true}})})();
  6562. return self;
  6563. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
  6564. args: ["aCollection"],
  6565. source: unescape('%3D%20aCollection%0A%09%28self%20class%20%3D%20aCollection%20class%20and%3A%20%5B%0A%09%09self%20size%20%3D%20aCollection%20size%5D%29%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09self%20withIndexDo%3A%20%5B%3Aeach%20%3Ai%20%7C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%28aCollection%20at%3A%20i%29%20%3D%20each%20ifFalse%3A%20%5B%5Efalse%5D%5D.%0A%09%5Etrue'),
  6566. messageSends: ["ifFalse:", "and:", unescape("%3D"), "class", "size", "withIndexDo:", "at:"],
  6567. referencedClasses: []
  6568. }),
  6569. smalltalk.SequenceableCollection);
  6570. smalltalk.addMethod(
  6571. unescape('_shallowCopy'),
  6572. smalltalk.method({
  6573. selector: unescape('shallowCopy'),
  6574. category: 'copying',
  6575. fn: function (){
  6576. var self=this;
  6577. var newCollection=nil;
  6578. (newCollection=smalltalk.send(smalltalk.send(self, "_class", []), "_new_", [smalltalk.send(self, "_size", [])]));
  6579. smalltalk.send(self, "_withIndexDo_", [(function(each, index){return smalltalk.send(newCollection, "_at_put_", [index, each]);})]);
  6580. return newCollection;
  6581. return self;},
  6582. args: [],
  6583. source: unescape('shallowCopy%0A%09%7C%20newCollection%20%7C%0A%09newCollection%20%3A%3D%20self%20class%20new%3A%20self%20size.%0A%09self%20withIndexDo%3A%20%5B%20%3Aeach%20%3Aindex%20%7C%20%0A%09%09newCollection%20at%3A%20index%20put%3A%20each%5D.%0A%09%5EnewCollection'),
  6584. messageSends: ["new:", "class", "size", "withIndexDo:", "at:put:"],
  6585. referencedClasses: []
  6586. }),
  6587. smalltalk.SequenceableCollection);
  6588. smalltalk.addMethod(
  6589. unescape('_deepCopy'),
  6590. smalltalk.method({
  6591. selector: unescape('deepCopy'),
  6592. category: 'copying',
  6593. fn: function (){
  6594. var self=this;
  6595. var newCollection=nil;
  6596. (newCollection=smalltalk.send(smalltalk.send(self, "_class", []), "_new_", [smalltalk.send(self, "_size", [])]));
  6597. smalltalk.send(self, "_withIndexDo_", [(function(each, index){return smalltalk.send(newCollection, "_at_put_", [index, smalltalk.send(each, "_deepCopy", [])]);})]);
  6598. return newCollection;
  6599. return self;},
  6600. args: [],
  6601. source: unescape('deepCopy%0A%09%7C%20newCollection%20%7C%0A%09newCollection%20%3A%3D%20self%20class%20new%3A%20self%20size.%0A%09self%20withIndexDo%3A%20%5B%3Aeach%20%3Aindex%20%7C%20%0A%09%09newCollection%20at%3A%20index%20put%3A%20each%20deepCopy%5D.%0A%09%5EnewCollection'),
  6602. messageSends: ["new:", "class", "size", "withIndexDo:", "at:put:", "deepCopy"],
  6603. referencedClasses: []
  6604. }),
  6605. smalltalk.SequenceableCollection);
  6606. smalltalk.addMethod(
  6607. unescape('_printString'),
  6608. smalltalk.method({
  6609. selector: unescape('printString'),
  6610. category: 'printing',
  6611. fn: function (){
  6612. var self=this;
  6613. var str=nil;
  6614. (str=smalltalk.send("", "_writeStream", []));
  6615. smalltalk.send(str, "_nextPutAll_", [smalltalk.send(smalltalk.send(self, "_printString", [], smalltalk.Collection), "__comma", [unescape("%20%28")])]);
  6616. smalltalk.send(self, "_do_separatedBy_", [(function(each){return smalltalk.send(str, "_nextPutAll_", [smalltalk.send(each, "_printString", [])]);}), (function(){return smalltalk.send(str, "_nextPutAll_", [" "]);})]);
  6617. smalltalk.send(str, "_nextPutAll_", [unescape("%29")]);
  6618. return smalltalk.send(str, "_contents", []);
  6619. return self;},
  6620. args: [],
  6621. 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'),
  6622. messageSends: ["writeStream", "nextPutAll:", unescape("%2C"), "printString", "do:separatedBy:", "contents"],
  6623. referencedClasses: []
  6624. }),
  6625. smalltalk.SequenceableCollection);
  6626. smalltalk.addClass('CharacterArray', smalltalk.SequenceableCollection, [], 'Kernel-Collections');
  6627. smalltalk.addMethod(
  6628. unescape('_at_put_'),
  6629. smalltalk.method({
  6630. selector: unescape('at%3Aput%3A'),
  6631. category: 'accessing',
  6632. fn: function (anIndex, anObject){
  6633. var self=this;
  6634. smalltalk.send(self, "_errorReadOnly", []);
  6635. return self;},
  6636. args: ["anIndex", "anObject"],
  6637. source: unescape('at%3A%20anIndex%20put%3A%20anObject%0A%09self%20errorReadOnly'),
  6638. messageSends: ["errorReadOnly"],
  6639. referencedClasses: []
  6640. }),
  6641. smalltalk.CharacterArray);
  6642. smalltalk.addMethod(
  6643. unescape('_add_'),
  6644. smalltalk.method({
  6645. selector: unescape('add%3A'),
  6646. category: 'adding',
  6647. fn: function (anObject){
  6648. var self=this;
  6649. smalltalk.send(self, "_errorReadOnly", []);
  6650. return self;},
  6651. args: ["anObject"],
  6652. source: unescape('add%3A%20anObject%0A%09self%20errorReadOnly'),
  6653. messageSends: ["errorReadOnly"],
  6654. referencedClasses: []
  6655. }),
  6656. smalltalk.CharacterArray);
  6657. smalltalk.addMethod(
  6658. unescape('__comma'),
  6659. smalltalk.method({
  6660. selector: unescape('%2C'),
  6661. category: 'copying',
  6662. fn: function (aString){
  6663. var self=this;
  6664. return smalltalk.send(smalltalk.send(self, "_asString", []), "__comma", [smalltalk.send(aString, "_asString", [])]);
  6665. return self;},
  6666. args: ["aString"],
  6667. source: unescape('%2C%20aString%0A%09%5Eself%20asString%2C%20aString%20asString'),
  6668. messageSends: [unescape("%2C"), "asString"],
  6669. referencedClasses: []
  6670. }),
  6671. smalltalk.CharacterArray);
  6672. smalltalk.addMethod(
  6673. unescape('_asString'),
  6674. smalltalk.method({
  6675. selector: unescape('asString'),
  6676. category: 'converting',
  6677. fn: function (){
  6678. var self=this;
  6679. return smalltalk.send(self, "_subclassResponsibility", []);
  6680. return self;},
  6681. args: [],
  6682. source: unescape('asString%0A%09%5Eself%20subclassResponsibility'),
  6683. messageSends: ["subclassResponsibility"],
  6684. referencedClasses: []
  6685. }),
  6686. smalltalk.CharacterArray);
  6687. smalltalk.addMethod(
  6688. unescape('_asNumber'),
  6689. smalltalk.method({
  6690. selector: unescape('asNumber'),
  6691. category: 'converting',
  6692. fn: function (){
  6693. var self=this;
  6694. return smalltalk.send(smalltalk.send(self, "_asString", []), "_asNumber", []);
  6695. return self;},
  6696. args: [],
  6697. source: unescape('asNumber%0A%09%5Eself%20asString%20asNumber'),
  6698. messageSends: ["asNumber", "asString"],
  6699. referencedClasses: []
  6700. }),
  6701. smalltalk.CharacterArray);
  6702. smalltalk.addMethod(
  6703. unescape('_errorReadOnly'),
  6704. smalltalk.method({
  6705. selector: unescape('errorReadOnly'),
  6706. category: 'error handling',
  6707. fn: function (){
  6708. var self=this;
  6709. smalltalk.send(self, "_error_", [unescape("Object%20is%20read-only")]);
  6710. return self;},
  6711. args: [],
  6712. source: unescape('errorReadOnly%0A%09self%20error%3A%20%27Object%20is%20read-only%27'),
  6713. messageSends: ["error:"],
  6714. referencedClasses: []
  6715. }),
  6716. smalltalk.CharacterArray);
  6717. smalltalk.addMethod(
  6718. unescape('_printString'),
  6719. smalltalk.method({
  6720. selector: unescape('printString'),
  6721. category: 'printing',
  6722. fn: function (){
  6723. var self=this;
  6724. return smalltalk.send(smalltalk.send(self, "_asString", []), "_printString", []);
  6725. return self;},
  6726. args: [],
  6727. source: unescape('printString%0A%09%5Eself%20asString%20printString'),
  6728. messageSends: ["printString", "asString"],
  6729. referencedClasses: []
  6730. }),
  6731. smalltalk.CharacterArray);
  6732. smalltalk.addMethod(
  6733. unescape('_remove_'),
  6734. smalltalk.method({
  6735. selector: unescape('remove%3A'),
  6736. category: 'adding',
  6737. fn: function (anObject){
  6738. var self=this;
  6739. smalltalk.send(self, "_errorReadOnly", []);
  6740. return self;},
  6741. args: ["anObject"],
  6742. source: unescape('remove%3A%20anObject%0A%09self%20errorReadOnly'),
  6743. messageSends: ["errorReadOnly"],
  6744. referencedClasses: []
  6745. }),
  6746. smalltalk.CharacterArray);
  6747. smalltalk.addMethod(
  6748. unescape('_asUppercase'),
  6749. smalltalk.method({
  6750. selector: unescape('asUppercase'),
  6751. category: 'converting',
  6752. fn: function (){
  6753. var self=this;
  6754. return smalltalk.send(smalltalk.send(self, "_class", []), "_fromString_", [smalltalk.send(smalltalk.send(self, "_asString", []), "_asUppercase", [])]);
  6755. return self;},
  6756. args: [],
  6757. source: unescape('asUppercase%0A%09%5Eself%20class%20fromString%3A%20self%20asString%20asUppercase'),
  6758. messageSends: ["fromString:", "class", "asUppercase", "asString"],
  6759. referencedClasses: []
  6760. }),
  6761. smalltalk.CharacterArray);
  6762. smalltalk.addMethod(
  6763. unescape('_asSymbol'),
  6764. smalltalk.method({
  6765. selector: unescape('asSymbol'),
  6766. category: 'converting',
  6767. fn: function (){
  6768. var self=this;
  6769. return smalltalk.send(self, "_subclassResponsibility", []);
  6770. return self;},
  6771. args: [],
  6772. source: unescape('asSymbol%0A%09%5Eself%20subclassResponsibility'),
  6773. messageSends: ["subclassResponsibility"],
  6774. referencedClasses: []
  6775. }),
  6776. smalltalk.CharacterArray);
  6777. smalltalk.addMethod(
  6778. unescape('_asLowercase'),
  6779. smalltalk.method({
  6780. selector: unescape('asLowercase'),
  6781. category: 'converting',
  6782. fn: function (){
  6783. var self=this;
  6784. return smalltalk.send(smalltalk.send(self, "_class", []), "_fromString_", [smalltalk.send(smalltalk.send(self, "_asString", []), "_asLowercase", [])]);
  6785. return self;},
  6786. args: [],
  6787. source: unescape('asLowercase%0A%09%5Eself%20class%20fromString%3A%20self%20asString%20asLowercase'),
  6788. messageSends: ["fromString:", "class", "asLowercase", "asString"],
  6789. referencedClasses: []
  6790. }),
  6791. smalltalk.CharacterArray);
  6792. smalltalk.addMethod(
  6793. unescape('_fromString_'),
  6794. smalltalk.method({
  6795. selector: unescape('fromString%3A'),
  6796. category: 'instance creation',
  6797. fn: function (aString){
  6798. var self=this;
  6799. smalltalk.send(self, "_subclassResponsibility", []);
  6800. return self;},
  6801. args: ["aString"],
  6802. source: unescape('fromString%3A%20aString%0A%09self%20subclassResponsibility'),
  6803. messageSends: ["subclassResponsibility"],
  6804. referencedClasses: []
  6805. }),
  6806. smalltalk.CharacterArray.klass);
  6807. smalltalk.addClass('String', smalltalk.CharacterArray, [], 'Kernel-Collections');
  6808. smalltalk.addMethod(
  6809. unescape('__eq'),
  6810. smalltalk.method({
  6811. selector: unescape('%3D'),
  6812. category: 'comparing',
  6813. fn: function (aString){
  6814. var self=this;
  6815. try{((($receiver = smalltalk.send(smalltalk.send(aString, "_class", []), "__eq", [smalltalk.send(self, "_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}})})();})]));
  6816. return String(self) === String(aString);
  6817. return self;
  6818. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
  6819. args: ["aString"],
  6820. source: unescape('%3D%20aString%0A%09aString%20class%20%3D%20self%20class%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09%3Creturn%20String%28self%29%20%3D%3D%3D%20String%28aString%29%3E'),
  6821. messageSends: ["ifFalse:", unescape("%3D"), "class"],
  6822. referencedClasses: []
  6823. }),
  6824. smalltalk.String);
  6825. smalltalk.addMethod(
  6826. unescape('_size'),
  6827. smalltalk.method({
  6828. selector: unescape('size'),
  6829. category: 'accessing',
  6830. fn: function (){
  6831. var self=this;
  6832. return self.length;
  6833. return self;},
  6834. args: [],
  6835. source: unescape('size%0A%09%3Creturn%20self.length%3E'),
  6836. messageSends: [],
  6837. referencedClasses: []
  6838. }),
  6839. smalltalk.String);
  6840. smalltalk.addMethod(
  6841. unescape('_at_ifAbsent_'),
  6842. smalltalk.method({
  6843. selector: unescape('at%3AifAbsent%3A'),
  6844. category: 'accessing',
  6845. fn: function (anIndex, aBlock){
  6846. var self=this;
  6847. return self[anIndex - 1] || aBlock();
  6848. return self;},
  6849. args: ["anIndex", "aBlock"],
  6850. source: unescape('at%3A%20anIndex%20ifAbsent%3A%20aBlock%0A%09%3Creturn%20self%5BanIndex%20-%201%5D%20%7C%7C%20aBlock%28%29%3E'),
  6851. messageSends: [],
  6852. referencedClasses: []
  6853. }),
  6854. smalltalk.String);
  6855. smalltalk.addMethod(
  6856. unescape('_escaped'),
  6857. smalltalk.method({
  6858. selector: unescape('escaped'),
  6859. category: 'accessing',
  6860. fn: function (){
  6861. var self=this;
  6862. return escape(self);
  6863. return self;},
  6864. args: [],
  6865. source: unescape('escaped%0A%09%3Creturn%20escape%28self%29%3E'),
  6866. messageSends: [],
  6867. referencedClasses: []
  6868. }),
  6869. smalltalk.String);
  6870. smalltalk.addMethod(
  6871. unescape('_unescaped'),
  6872. smalltalk.method({
  6873. selector: unescape('unescaped'),
  6874. category: 'accessing',
  6875. fn: function (){
  6876. var self=this;
  6877. return unescape(self);
  6878. return self;},
  6879. args: [],
  6880. source: unescape('unescaped%0A%09%3Creturn%20unescape%28self%29%3E'),
  6881. messageSends: [],
  6882. referencedClasses: []
  6883. }),
  6884. smalltalk.String);
  6885. smalltalk.addMethod(
  6886. unescape('__comma'),
  6887. smalltalk.method({
  6888. selector: unescape('%2C'),
  6889. category: 'copying',
  6890. fn: function (aString){
  6891. var self=this;
  6892. return self + aString;
  6893. return self;},
  6894. args: ["aString"],
  6895. source: unescape('%2C%20aString%0A%09%3Creturn%20self%20+%20aString%3E'),
  6896. messageSends: [],
  6897. referencedClasses: []
  6898. }),
  6899. smalltalk.String);
  6900. smalltalk.addMethod(
  6901. unescape('_copyFrom_to_'),
  6902. smalltalk.method({
  6903. selector: unescape('copyFrom%3Ato%3A'),
  6904. category: 'copying',
  6905. fn: function (anIndex, anotherIndex){
  6906. var self=this;
  6907. return self.substring(anIndex - 1, anotherIndex);
  6908. return self;},
  6909. args: ["anIndex", "anotherIndex"],
  6910. source: unescape('copyFrom%3A%20anIndex%20to%3A%20anotherIndex%0A%09%3Creturn%20self.substring%28anIndex%20-%201%2C%20anotherIndex%29%3E'),
  6911. messageSends: [],
  6912. referencedClasses: []
  6913. }),
  6914. smalltalk.String);
  6915. smalltalk.addMethod(
  6916. unescape('_shallowCopy'),
  6917. smalltalk.method({
  6918. selector: unescape('shallowCopy'),
  6919. category: 'copying',
  6920. fn: function (){
  6921. var self=this;
  6922. return smalltalk.send(smalltalk.send(self, "_class", []), "_fromString_", [self]);
  6923. return self;},
  6924. args: [],
  6925. source: unescape('shallowCopy%0A%09%5Eself%20class%20fromString%3A%20self'),
  6926. messageSends: ["fromString:", "class"],
  6927. referencedClasses: []
  6928. }),
  6929. smalltalk.String);
  6930. smalltalk.addMethod(
  6931. unescape('_deepCopy'),
  6932. smalltalk.method({
  6933. selector: unescape('deepCopy'),
  6934. category: 'copying',
  6935. fn: function (){
  6936. var self=this;
  6937. return smalltalk.send(self, "_shallowCopy", []);
  6938. return self;},
  6939. args: [],
  6940. source: unescape('deepCopy%0A%09%5Eself%20shallowCopy'),
  6941. messageSends: ["shallowCopy"],
  6942. referencedClasses: []
  6943. }),
  6944. smalltalk.String);
  6945. smalltalk.addMethod(
  6946. unescape('_asSelector'),
  6947. smalltalk.method({
  6948. selector: unescape('asSelector'),
  6949. category: 'converting',
  6950. fn: function (){
  6951. var self=this;
  6952. var selector=nil;
  6953. (selector=smalltalk.send("_", "__comma", [self]));
  6954. (selector=smalltalk.send(selector, "_replace_with_", [":", "_"]));
  6955. (selector=smalltalk.send(selector, "_replace_with_", [unescape("%5B+%5D"), "_plus"]));
  6956. (selector=smalltalk.send(selector, "_replace_with_", [unescape("-"), "_minus"]));
  6957. (selector=smalltalk.send(selector, "_replace_with_", [unescape("%5B*%5D"), "_star"]));
  6958. (selector=smalltalk.send(selector, "_replace_with_", [unescape("%5B/%5D"), "_slash"]));
  6959. (selector=smalltalk.send(selector, "_replace_with_", [unescape("%3E"), "_gt"]));
  6960. (selector=smalltalk.send(selector, "_replace_with_", [unescape("%3C"), "_lt"]));
  6961. (selector=smalltalk.send(selector, "_replace_with_", [unescape("%3D"), "_eq"]));
  6962. (selector=smalltalk.send(selector, "_replace_with_", [unescape("%2C"), "_comma"]));
  6963. (selector=smalltalk.send(selector, "_replace_with_", [unescape("%5B@%5D"), "_at"]));
  6964. return selector;
  6965. return self;},
  6966. args: [],
  6967. 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%09selector%20%3A%3D%20selector%20replace%3A%20%27%3A%27%20with%3A%20%27_%27.%0A%09selector%20%3A%3D%20selector%20replace%3A%20%27%5B+%5D%27%20with%3A%20%27_plus%27.%0A%09selector%20%3A%3D%20selector%20replace%3A%20%27-%27%20with%3A%20%27_minus%27.%0A%09selector%20%3A%3D%20selector%20replace%3A%20%27%5B*%5D%27%20with%3A%20%27_star%27.%0A%09selector%20%3A%3D%20selector%20replace%3A%20%27%5B/%5D%27%20with%3A%20%27_slash%27.%0A%09selector%20%3A%3D%20selector%20replace%3A%20%27%3E%27%20with%3A%20%27_gt%27.%0A%09selector%20%3A%3D%20selector%20replace%3A%20%27%3C%27%20with%3A%20%27_lt%27.%0A%09selector%20%3A%3D%20selector%20replace%3A%20%27%3D%27%20with%3A%20%27_eq%27.%0A%09selector%20%3A%3D%20selector%20replace%3A%20%27%2C%27%20with%3A%20%27_comma%27.%0A%09selector%20%3A%3D%20selector%20replace%3A%20%27%5B@%5D%27%20with%3A%20%27_at%27.%0A%09%5Eselector'),
  6968. messageSends: [unescape("%2C"), "replace:with:"],
  6969. referencedClasses: []
  6970. }),
  6971. smalltalk.String);
  6972. smalltalk.addMethod(
  6973. unescape('_asJavascript'),
  6974. smalltalk.method({
  6975. selector: unescape('asJavascript'),
  6976. category: 'converting',
  6977. fn: function (){
  6978. var self=this;
  6979. if(self.search(/^[a-zA-Z0-9_:.$ ]*$/) == -1)
  6980. return "unescape(\"" + escape(self) + "\")";
  6981. else
  6982. return "\"" + self + "\"";
  6983. ;
  6984. return self;},
  6985. args: [],
  6986. 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'),
  6987. messageSends: [],
  6988. referencedClasses: []
  6989. }),
  6990. smalltalk.String);
  6991. smalltalk.addMethod(
  6992. unescape('_replace_with_'),
  6993. smalltalk.method({
  6994. selector: unescape('replace%3Awith%3A'),
  6995. category: 'regular expressions',
  6996. fn: function (aString, anotherString){
  6997. var self=this;
  6998. return smalltalk.send(self, "_replaceRegexp_with_", [smalltalk.send((smalltalk.RegularExpression || RegularExpression), "_fromString_flag_", [aString, "g"]), anotherString]);
  6999. return self;},
  7000. args: ["aString", "anotherString"],
  7001. source: unescape('replace%3A%20aString%20with%3A%20anotherString%0A%09%5Eself%20replaceRegexp%3A%20%28RegularExpression%20fromString%3A%20aString%20flag%3A%20%27g%27%29%20with%3A%20anotherString'),
  7002. messageSends: ["replaceRegexp:with:", "fromString:flag:"],
  7003. referencedClasses: ["RegularExpression"]
  7004. }),
  7005. smalltalk.String);
  7006. smalltalk.addMethod(
  7007. unescape('_replaceRegexp_with_'),
  7008. smalltalk.method({
  7009. selector: unescape('replaceRegexp%3Awith%3A'),
  7010. category: 'regular expressions',
  7011. fn: function (aRegexp, aString){
  7012. var self=this;
  7013. return self.replace(aRegexp, aString);
  7014. return self;},
  7015. args: ["aRegexp", "aString"],
  7016. source: unescape('replaceRegexp%3A%20aRegexp%20with%3A%20aString%0A%09%3Creturn%20self.replace%28aRegexp%2C%20aString%29%3E'),
  7017. messageSends: [],
  7018. referencedClasses: []
  7019. }),
  7020. smalltalk.String);
  7021. smalltalk.addMethod(
  7022. unescape('_tokenize_'),
  7023. smalltalk.method({
  7024. selector: unescape('tokenize%3A'),
  7025. category: 'converting',
  7026. fn: function (aString){
  7027. var self=this;
  7028. return self.split(aString);
  7029. return self;},
  7030. args: ["aString"],
  7031. source: unescape('tokenize%3A%20aString%0A%09%3Creturn%20self.split%28aString%29%3E'),
  7032. messageSends: [],
  7033. referencedClasses: []
  7034. }),
  7035. smalltalk.String);
  7036. smalltalk.addMethod(
  7037. unescape('_match_'),
  7038. smalltalk.method({
  7039. selector: unescape('match%3A'),
  7040. category: 'regular expressions',
  7041. fn: function (aRegexp){
  7042. var self=this;
  7043. return self.search(aRegexp) != -1;
  7044. return self;},
  7045. args: ["aRegexp"],
  7046. source: unescape('match%3A%20aRegexp%0A%09%3Creturn%20self.search%28aRegexp%29%20%21%3D%20-1%3E'),
  7047. messageSends: [],
  7048. referencedClasses: []
  7049. }),
  7050. smalltalk.String);
  7051. smalltalk.addMethod(
  7052. unescape('_asString'),
  7053. smalltalk.method({
  7054. selector: unescape('asString'),
  7055. category: 'converting',
  7056. fn: function (){
  7057. var self=this;
  7058. return self;
  7059. return self;},
  7060. args: [],
  7061. source: unescape('asString%0A%09%5Eself'),
  7062. messageSends: [],
  7063. referencedClasses: []
  7064. }),
  7065. smalltalk.String);
  7066. smalltalk.addMethod(
  7067. unescape('_asNumber'),
  7068. smalltalk.method({
  7069. selector: unescape('asNumber'),
  7070. category: 'converting',
  7071. fn: function (){
  7072. var self=this;
  7073. return Number(self);
  7074. return self;},
  7075. args: [],
  7076. source: unescape('asNumber%0A%09%3Creturn%20Number%28self%29%3E'),
  7077. messageSends: [],
  7078. referencedClasses: []
  7079. }),
  7080. smalltalk.String);
  7081. smalltalk.addMethod(
  7082. unescape('_printString'),
  7083. smalltalk.method({
  7084. selector: unescape('printString'),
  7085. category: 'printing',
  7086. fn: function (){
  7087. var self=this;
  7088. return smalltalk.send(smalltalk.send(unescape("%27"), "__comma", [self]), "__comma", [unescape("%27")]);
  7089. return self;},
  7090. args: [],
  7091. source: unescape('printString%0A%09%5E%27%27%27%27%2C%20self%2C%20%27%27%27%27'),
  7092. messageSends: [unescape("%2C")],
  7093. referencedClasses: []
  7094. }),
  7095. smalltalk.String);
  7096. smalltalk.addMethod(
  7097. unescape('_printNl'),
  7098. smalltalk.method({
  7099. selector: unescape('printNl'),
  7100. category: 'printing',
  7101. fn: function (){
  7102. var self=this;
  7103. console.log(self);
  7104. return self;},
  7105. args: [],
  7106. source: unescape('printNl%0A%09%3Cconsole.log%28self%29%3E'),
  7107. messageSends: [],
  7108. referencedClasses: []
  7109. }),
  7110. smalltalk.String);
  7111. smalltalk.addMethod(
  7112. unescape('_isString'),
  7113. smalltalk.method({
  7114. selector: unescape('isString'),
  7115. category: 'testing',
  7116. fn: function (){
  7117. var self=this;
  7118. return true;
  7119. return self;},
  7120. args: [],
  7121. source: unescape('isString%0A%09%5Etrue'),
  7122. messageSends: [],
  7123. referencedClasses: []
  7124. }),
  7125. smalltalk.String);
  7126. smalltalk.addMethod(
  7127. unescape('__gt'),
  7128. smalltalk.method({
  7129. selector: unescape('%3E'),
  7130. category: 'comparing',
  7131. fn: function (aString){
  7132. var self=this;
  7133. return String(self) > aString._asString();
  7134. return self;},
  7135. args: ["aString"],
  7136. source: unescape('%3E%20aString%0A%09%3Creturn%20String%28self%29%20%3E%3E%20aString._asString%28%29%3E'),
  7137. messageSends: [],
  7138. referencedClasses: []
  7139. }),
  7140. smalltalk.String);
  7141. smalltalk.addMethod(
  7142. unescape('__lt'),
  7143. smalltalk.method({
  7144. selector: unescape('%3C'),
  7145. category: 'comparing',
  7146. fn: function (aString){
  7147. var self=this;
  7148. return String(self) < aString._asString();
  7149. return self;},
  7150. args: ["aString"],
  7151. source: unescape('%3C%20aString%0A%09%3Creturn%20String%28self%29%20%3C%20aString._asString%28%29%3E'),
  7152. messageSends: [],
  7153. referencedClasses: []
  7154. }),
  7155. smalltalk.String);
  7156. smalltalk.addMethod(
  7157. unescape('__gt_eq'),
  7158. smalltalk.method({
  7159. selector: unescape('%3E%3D'),
  7160. category: 'comparing',
  7161. fn: function (aString){
  7162. var self=this;
  7163. return String(self) >= aString._asString();
  7164. return self;},
  7165. args: ["aString"],
  7166. source: unescape('%3E%3D%20aString%0A%09%3Creturn%20String%28self%29%20%3E%3E%3D%20aString._asString%28%29%3E'),
  7167. messageSends: [],
  7168. referencedClasses: []
  7169. }),
  7170. smalltalk.String);
  7171. smalltalk.addMethod(
  7172. unescape('__lt_eq'),
  7173. smalltalk.method({
  7174. selector: unescape('%3C%3D'),
  7175. category: 'comparing',
  7176. fn: function (aString){
  7177. var self=this;
  7178. return String(self) <= aString._asString();
  7179. return self;},
  7180. args: ["aString"],
  7181. source: unescape('%3C%3D%20aString%0A%09%3Creturn%20String%28self%29%20%3C%3D%20aString._asString%28%29%3E'),
  7182. messageSends: [],
  7183. referencedClasses: []
  7184. }),
  7185. smalltalk.String);
  7186. smalltalk.addMethod(
  7187. unescape('_trimLeft_'),
  7188. smalltalk.method({
  7189. selector: unescape('trimLeft%3A'),
  7190. category: 'regular expressions',
  7191. fn: function (separators){
  7192. var self=this;
  7193. 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"]), ""]);
  7194. return self;},
  7195. args: ["separators"],
  7196. source: unescape('trimLeft%3A%20separators%0A%0A%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'),
  7197. messageSends: ["replaceRegexp:with:", "fromString:flag:", unescape("%2C")],
  7198. referencedClasses: ["RegularExpression"]
  7199. }),
  7200. smalltalk.String);
  7201. smalltalk.addMethod(
  7202. unescape('_trimRight_'),
  7203. smalltalk.method({
  7204. selector: unescape('trimRight%3A'),
  7205. category: 'regular expressions',
  7206. fn: function (separators){
  7207. var self=this;
  7208. 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"]), ""]);
  7209. return self;},
  7210. args: ["separators"],
  7211. source: unescape('trimRight%3A%20separators%0A%0A%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'),
  7212. messageSends: ["replaceRegexp:with:", "fromString:flag:", unescape("%2C")],
  7213. referencedClasses: ["RegularExpression"]
  7214. }),
  7215. smalltalk.String);
  7216. smalltalk.addMethod(
  7217. unescape('_trimLeft'),
  7218. smalltalk.method({
  7219. selector: unescape('trimLeft'),
  7220. category: 'regular expressions',
  7221. fn: function (){
  7222. var self=this;
  7223. return smalltalk.send(self, "_trimLeft_", [unescape("%5Cs")]);
  7224. return self;},
  7225. args: [],
  7226. source: unescape('trimLeft%0A%09%5Eself%20trimLeft%3A%20%27%5Cs%27'),
  7227. messageSends: ["trimLeft:"],
  7228. referencedClasses: []
  7229. }),
  7230. smalltalk.String);
  7231. smalltalk.addMethod(
  7232. unescape('_trimRight'),
  7233. smalltalk.method({
  7234. selector: unescape('trimRight'),
  7235. category: 'regular expressions',
  7236. fn: function (){
  7237. var self=this;
  7238. return smalltalk.send(self, "_trimRight_", [unescape("%5Cs")]);
  7239. return self;},
  7240. args: [],
  7241. source: unescape('trimRight%0A%09%5Eself%20trimRight%3A%20%27%5Cs%27'),
  7242. messageSends: ["trimRight:"],
  7243. referencedClasses: []
  7244. }),
  7245. smalltalk.String);
  7246. smalltalk.addMethod(
  7247. unescape('_trimBoth'),
  7248. smalltalk.method({
  7249. selector: unescape('trimBoth'),
  7250. category: 'regular expressions',
  7251. fn: function (){
  7252. var self=this;
  7253. return smalltalk.send(self, "_trimBoth_", [unescape("%5Cs")]);
  7254. return self;},
  7255. args: [],
  7256. source: unescape('trimBoth%0A%09%5Eself%20trimBoth%3A%20%27%5Cs%27'),
  7257. messageSends: ["trimBoth:"],
  7258. referencedClasses: []
  7259. }),
  7260. smalltalk.String);
  7261. smalltalk.addMethod(
  7262. unescape('_trimBoth_'),
  7263. smalltalk.method({
  7264. selector: unescape('trimBoth%3A'),
  7265. category: 'regular expressions',
  7266. fn: function (separators){
  7267. var self=this;
  7268. return smalltalk.send(smalltalk.send(self, "_trimLeft_", [separators]), "_trimRight_", [separators]);
  7269. return self;},
  7270. args: ["separators"],
  7271. source: unescape('trimBoth%3A%20separators%0A%0A%09%5E%28self%20trimLeft%3A%20separators%29%20trimRight%3A%20separators'),
  7272. messageSends: ["trimRight:", "trimLeft:"],
  7273. referencedClasses: []
  7274. }),
  7275. smalltalk.String);
  7276. smalltalk.addMethod(
  7277. unescape('_asLowercase'),
  7278. smalltalk.method({
  7279. selector: unescape('asLowercase'),
  7280. category: 'converting',
  7281. fn: function (){
  7282. var self=this;
  7283. return self.toLowerCase();
  7284. return self;},
  7285. args: [],
  7286. source: unescape('asLowercase%0A%09%3Creturn%20self.toLowerCase%28%29%3E'),
  7287. messageSends: [],
  7288. referencedClasses: []
  7289. }),
  7290. smalltalk.String);
  7291. smalltalk.addMethod(
  7292. unescape('_asUppercase'),
  7293. smalltalk.method({
  7294. selector: unescape('asUppercase'),
  7295. category: 'converting',
  7296. fn: function (){
  7297. var self=this;
  7298. return self.toUpperCase();
  7299. return self;},
  7300. args: [],
  7301. source: unescape('asUppercase%0A%09%3Creturn%20self.toUpperCase%28%29%3E'),
  7302. messageSends: [],
  7303. referencedClasses: []
  7304. }),
  7305. smalltalk.String);
  7306. smalltalk.addMethod(
  7307. unescape('_join_'),
  7308. smalltalk.method({
  7309. selector: unescape('join%3A'),
  7310. category: 'split join',
  7311. fn: function (aCollection){
  7312. var self=this;
  7313. 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]);})]);})]);
  7314. return self;},
  7315. args: ["aCollection"],
  7316. 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'),
  7317. messageSends: ["streamContents:", "do:separatedBy:", "nextPutAll:", "asString"],
  7318. referencedClasses: ["String"]
  7319. }),
  7320. smalltalk.String);
  7321. smalltalk.addMethod(
  7322. unescape('_includesSubString_'),
  7323. smalltalk.method({
  7324. selector: unescape('includesSubString%3A'),
  7325. category: 'testing',
  7326. fn: function (subString){
  7327. var self=this;
  7328. return self.indexOf(subString) != -1 ;
  7329. return self;},
  7330. args: ["subString"],
  7331. source: unescape('includesSubString%3A%20subString%0A%09%3C%20return%20self.indexOf%28subString%29%20%21%3D%20-1%20%3E'),
  7332. messageSends: [],
  7333. referencedClasses: []
  7334. }),
  7335. smalltalk.String);
  7336. smalltalk.addMethod(
  7337. unescape('_asciiValue'),
  7338. smalltalk.method({
  7339. selector: unescape('asciiValue'),
  7340. category: 'accessing',
  7341. fn: function (){
  7342. var self=this;
  7343. return self.charCodeAt(0);;
  7344. return self;},
  7345. args: [],
  7346. source: unescape('asciiValue%0A%09%3Creturn%20self.charCodeAt%280%29%3B%3E'),
  7347. messageSends: [],
  7348. referencedClasses: []
  7349. }),
  7350. smalltalk.String);
  7351. smalltalk.addMethod(
  7352. unescape('_lineIndicesDo_'),
  7353. smalltalk.method({
  7354. selector: unescape('lineIndicesDo%3A'),
  7355. category: 'split join',
  7356. fn: function (aBlock){
  7357. var self=this;
  7358. try{var cr=nil;
  7359. var lf=nil;
  7360. var start=nil;
  7361. var sz=nil;
  7362. var nextLF=nil;
  7363. var nextCR=nil;
  7364. (start=(1));
  7365. (sz=smalltalk.send(self, "_size", []));
  7366. (cr=smalltalk.send((smalltalk.String || String), "_cr", []));
  7367. (nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, (1)]));
  7368. (lf=smalltalk.send((smalltalk.String || String), "_lf", []));
  7369. (nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, (1)]));
  7370. (function(){while((function(){return ((($receiver = start).klass === smalltalk.Number) ? $receiver <=sz : smalltalk.send($receiver, "__lt_eq", [sz]));})()) {(function(){((($receiver = smalltalk.send(smalltalk.send(nextLF, "__eq", [(0)]), "_and_", [(function(){return smalltalk.send(nextCR, "__eq", [(0)]);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(aBlock, "_value_value_value_", [start, sz, sz]);return (function(){throw({name: 'stReturn', selector: '_lineIndicesDo_', fn: function(){return self}})})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(aBlock, "_value_value_value_", [start, sz, sz]);return (function(){throw({name: 'stReturn', selector: '_lineIndicesDo_', fn: function(){return self}})})();})]));return ((($receiver = smalltalk.send(smalltalk.send(nextCR, "__eq", [(0)]), "_or_", [(function(){return smalltalk.send((0) < nextLF, "_and_", [(function(){return ((($receiver = nextLF).klass === smalltalk.Number) ? $receiver <nextCR : smalltalk.send($receiver, "__lt", [nextCR]));})]);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextLF).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);(start=(1) + nextLF);return (nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]));})() : (function(){return ((($receiver = smalltalk.send((1) + nextCR, "__eq", [nextLF])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);(start=(1) + nextLF);(nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]));return (nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]));})() : (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextCR]);(start=(1) + nextCR);return (nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);(start=(1) + nextLF);(nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]));return (nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]));}), (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextCR]);(start=(1) + nextCR);return (nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]));})]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextLF).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);(start=(1) + nextLF);return (nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]));}), (function(){return ((($receiver = smalltalk.send((1) + nextCR, "__eq", [nextLF])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);(start=(1) + nextLF);(nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]));return (nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]));})() : (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextCR]);(start=(1) + nextCR);return (nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);(start=(1) + nextLF);(nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]));return (nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]));}), (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextCR]);(start=(1) + nextCR);return (nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]));})]));})]));})()}})();
  7371. return self;
  7372. } catch(e) {if(e.name === 'stReturn' && e.selector === '_lineIndicesDo_'){return e.fn()} throw(e)}},
  7373. args: ["aBlock"],
  7374. source: unescape('lineIndicesDo%3A%20aBlock%0A%09%22execute%20aBlock%20with%203%20arguments%20for%20each%20line%3A%0A%09-%20start%20index%20of%20line%0A%09-%20end%20index%20of%20line%20without%20line%20delimiter%0A%09-%20end%20index%20of%20line%20including%20line%20delimiter%28s%29%20CR%2C%20LF%20or%20CRLF%22%0A%09%0A%09%7C%20cr%20lf%20start%20sz%20nextLF%20nextCR%20%7C%0A%09start%20%3A%3D%201.%0A%09sz%20%3A%3D%20self%20size.%0A%09cr%20%3A%3D%20String%20cr.%0A%09nextCR%20%3A%3D%20self%20indexOf%3A%20cr%20startingAt%3A%201.%0A%09lf%20%3A%3D%20String%20lf.%0A%09nextLF%20%3A%3D%20self%20indexOf%3A%20lf%20startingAt%3A%201.%0A%09%5B%20start%20%3C%3D%20sz%20%5D%20whileTrue%3A%20%5B%0A%09%09%28nextLF%20%3D%200%20and%3A%20%5B%20nextCR%20%3D%200%20%5D%29%0A%09%09%09ifTrue%3A%20%5B%20%22No%20more%20CR%2C%20nor%20LF%2C%20the%20string%20is%20over%22%0A%09%09%09%09%09aBlock%20value%3A%20start%20value%3A%20sz%20value%3A%20sz.%0A%09%09%09%09%09%5Eself%20%5D.%0A%09%09%28nextCR%20%3D%200%20or%3A%20%5B%200%20%3C%20nextLF%20and%3A%20%5B%20nextLF%20%3C%20nextCR%20%5D%20%5D%29%0A%09%09%09ifTrue%3A%20%5B%20%22Found%20a%20LF%22%0A%09%09%09%09%09aBlock%20value%3A%20start%20value%3A%20nextLF%20-%201%20value%3A%20nextLF.%0A%09%09%09%09%09start%20%3A%3D%201%20+%20nextLF.%0A%09%09%09%09%09nextLF%20%3A%3D%20self%20indexOf%3A%20lf%20startingAt%3A%20start%20%5D%0A%09%09%09ifFalse%3A%20%5B%201%20+%20nextCR%20%3D%20nextLF%0A%09%09%09%09ifTrue%3A%20%5B%20%22Found%20a%20CR-LF%20pair%22%0A%09%09%09%09%09aBlock%20value%3A%20start%20value%3A%20nextCR%20-%201%20value%3A%20nextLF.%0A%09%09%09%09%09start%20%3A%3D%201%20+%20nextLF.%0A%09%09%09%09%09nextCR%20%3A%3D%20self%20indexOf%3A%20cr%20startingAt%3A%20start.%0A%09%09%09%09%09nextLF%20%3A%3D%20self%20indexOf%3A%20lf%20startingAt%3A%20start%20%5D%0A%09%09%09%09ifFalse%3A%20%5B%20%22Found%20a%20CR%22%0A%09%09%09%09%09aBlock%20value%3A%20start%20value%3A%20nextCR%20-%201%20value%3A%20nextCR.%0A%09%09%09%09%09start%20%3A%3D%201%20+%20nextCR.%0A%09%09%09%09%09nextCR%20%3A%3D%20self%20indexOf%3A%20cr%20startingAt%3A%20start%20%5D%5D%5D'),
  7375. messageSends: ["size", "cr", "indexOf:startingAt:", "lf", "whileTrue:", unescape("%3C%3D"), "ifTrue:", "and:", unescape("%3D"), "value:value:value:", "ifTrue:ifFalse:", "or:", unescape("%3C"), unescape("-"), unescape("+")],
  7376. referencedClasses: ["String"]
  7377. }),
  7378. smalltalk.String);
  7379. smalltalk.addMethod(
  7380. unescape('_linesDo_'),
  7381. smalltalk.method({
  7382. selector: unescape('linesDo%3A'),
  7383. category: 'split join',
  7384. fn: function (aBlock){
  7385. var self=this;
  7386. smalltalk.send(self, "_lineIndicesDo_", [(function(start, endWithoutDelimiters, end){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_copyFrom_to_", [start, endWithoutDelimiters])]);})]);
  7387. return self;},
  7388. args: ["aBlock"],
  7389. source: unescape('linesDo%3A%20aBlock%0A%09%22Execute%20aBlock%20with%20each%20line%20in%20this%20string.%20The%20terminating%20line%0A%09delimiters%20CR%2C%20LF%20or%20CRLF%20pairs%20are%20not%20included%20in%20what%20is%20passed%20to%20aBlock%22%0A%0A%09self%20lineIndicesDo%3A%20%5B%3Astart%20%3AendWithoutDelimiters%20%3Aend%20%7C%0A%09%09aBlock%20value%3A%20%28self%20copyFrom%3A%20start%20to%3A%20endWithoutDelimiters%29%5D'),
  7390. messageSends: ["lineIndicesDo:", "value:", "copyFrom:to:"],
  7391. referencedClasses: []
  7392. }),
  7393. smalltalk.String);
  7394. smalltalk.addMethod(
  7395. unescape('_lines'),
  7396. smalltalk.method({
  7397. selector: unescape('lines'),
  7398. category: 'split join',
  7399. fn: function (){
  7400. var self=this;
  7401. var lines=nil;
  7402. (lines=smalltalk.send((smalltalk.Array || Array), "_new", []));
  7403. smalltalk.send(self, "_linesDo_", [(function(aLine){return smalltalk.send(lines, "_add_", [aLine]);})]);
  7404. return lines;
  7405. return self;},
  7406. args: [],
  7407. source: unescape('lines%0A%09%22Answer%20an%20array%20of%20lines%20composing%20this%20receiver%20without%20the%20line%20ending%20delimiters.%22%0A%0A%09%7C%20lines%20%7C%0A%09lines%20%3A%3D%20Array%20new.%0A%09self%20linesDo%3A%20%5B%3AaLine%20%7C%20lines%20add%3A%20aLine%5D.%0A%09%5Elines'),
  7408. messageSends: ["new", "linesDo:", "add:"],
  7409. referencedClasses: ["Array"]
  7410. }),
  7411. smalltalk.String);
  7412. smalltalk.addMethod(
  7413. unescape('_lineNumber_'),
  7414. smalltalk.method({
  7415. selector: unescape('lineNumber%3A'),
  7416. category: 'split join',
  7417. fn: function (anIndex){
  7418. var self=this;
  7419. try{var lineCount=nil;
  7420. (lineCount=(0));
  7421. smalltalk.send(self, "_lineIndicesDo_", [(function(start, endWithoutDelimiters, end){return ((($receiver = smalltalk.send((lineCount=((($receiver = lineCount).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))), "__eq", [anIndex])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '_lineNumber_', fn: function(){return smalltalk.send(self, "_copyFrom_to_", [start, endWithoutDelimiters])}})})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (function(){throw({name: 'stReturn', selector: '_lineNumber_', fn: function(){return smalltalk.send(self, "_copyFrom_to_", [start, endWithoutDelimiters])}})})();})]));})]);
  7422. (function(){throw({name: 'stReturn', selector: '_lineNumber_', fn: function(){return nil}})})();
  7423. return self;
  7424. } catch(e) {if(e.name === 'stReturn' && e.selector === '_lineNumber_'){return e.fn()} throw(e)}},
  7425. args: ["anIndex"],
  7426. source: unescape('lineNumber%3A%20anIndex%0A%09%22Answer%20a%20string%20containing%20the%20characters%20in%20the%20given%20line%20number.%22%0A%0A%09%7C%20lineCount%20%7C%0A%09lineCount%20%3A%3D%200.%0A%09self%20lineIndicesDo%3A%20%5B%3Astart%20%3AendWithoutDelimiters%20%3Aend%20%7C%0A%09%09%28lineCount%20%3A%3D%20lineCount%20+%201%29%20%3D%20anIndex%20ifTrue%3A%20%5B%5Eself%20copyFrom%3A%20start%20to%3A%20endWithoutDelimiters%5D%5D.%0A%09%5Enil'),
  7427. messageSends: ["lineIndicesDo:", "ifTrue:", unescape("%3D"), unescape("+"), "copyFrom:to:"],
  7428. referencedClasses: []
  7429. }),
  7430. smalltalk.String);
  7431. smalltalk.addMethod(
  7432. unescape('_reversed'),
  7433. smalltalk.method({
  7434. selector: unescape('reversed'),
  7435. category: 'converting',
  7436. fn: function (){
  7437. var self=this;
  7438. return self.split("").reverse().join("");
  7439. return self;},
  7440. args: [],
  7441. source: unescape('reversed%0A%09%3Creturn%20self.split%28%22%22%29.reverse%28%29.join%28%22%22%29%3E'),
  7442. messageSends: [],
  7443. referencedClasses: []
  7444. }),
  7445. smalltalk.String);
  7446. smalltalk.addMethod(
  7447. unescape('_asJavaScriptSelector'),
  7448. smalltalk.method({
  7449. selector: unescape('asJavaScriptSelector'),
  7450. category: 'converting',
  7451. fn: function (){
  7452. var self=this;
  7453. return smalltalk.send(smalltalk.send(smalltalk.send(self, "_asSelector", []), "_replace_with_", [unescape("%5E_"), ""]), "_replace_with_", [unescape("_.*"), ""]);
  7454. return self;},
  7455. args: [],
  7456. source: unescape('asJavaScriptSelector%0A%09%5E%28self%20asSelector%20replace%3A%20%27%5E_%27%20with%3A%20%27%27%29%20replace%3A%20%27_.*%27%20with%3A%20%27%27.'),
  7457. messageSends: ["replace:with:", "asSelector"],
  7458. referencedClasses: []
  7459. }),
  7460. smalltalk.String);
  7461. smalltalk.addMethod(
  7462. unescape('_asJSONString'),
  7463. smalltalk.method({
  7464. selector: unescape('asJSONString'),
  7465. category: 'converting',
  7466. fn: function (){
  7467. var self=this;
  7468. return self;
  7469. return self;},
  7470. args: [],
  7471. source: unescape('asJSONString%0A%09%5Eself'),
  7472. messageSends: [],
  7473. referencedClasses: []
  7474. }),
  7475. smalltalk.String);
  7476. smalltalk.addMethod(
  7477. unescape('_asSymbol'),
  7478. smalltalk.method({
  7479. selector: unescape('asSymbol'),
  7480. category: 'converting',
  7481. fn: function (){
  7482. var self=this;
  7483. return smalltalk.send((smalltalk.Symbol || Symbol), "_lookup_", [self]);
  7484. return self;},
  7485. args: [],
  7486. source: unescape('asSymbol%0A%09%5ESymbol%20lookup%3A%20self'),
  7487. messageSends: ["lookup:"],
  7488. referencedClasses: ["Symbol"]
  7489. }),
  7490. smalltalk.String);
  7491. smalltalk.addMethod(
  7492. unescape('_streamClass'),
  7493. smalltalk.method({
  7494. selector: unescape('streamClass'),
  7495. category: 'accessing',
  7496. fn: function (){
  7497. var self=this;
  7498. return (smalltalk.StringStream || StringStream);
  7499. return self;},
  7500. args: [],
  7501. source: unescape('streamClass%0A%09%20%20%20%20%5EStringStream'),
  7502. messageSends: [],
  7503. referencedClasses: ["StringStream"]
  7504. }),
  7505. smalltalk.String.klass);
  7506. smalltalk.addMethod(
  7507. unescape('_fromString_'),
  7508. smalltalk.method({
  7509. selector: unescape('fromString%3A'),
  7510. category: 'instance creation',
  7511. fn: function (aString){
  7512. var self=this;
  7513. return new self.fn(aString);
  7514. return self;},
  7515. args: ["aString"],
  7516. source: unescape('fromString%3A%20aString%0A%09%20%20%20%20%3Creturn%20new%20self.fn%28aString%29%3E'),
  7517. messageSends: [],
  7518. referencedClasses: []
  7519. }),
  7520. smalltalk.String.klass);
  7521. smalltalk.addMethod(
  7522. unescape('_cr'),
  7523. smalltalk.method({
  7524. selector: unescape('cr'),
  7525. category: 'accessing',
  7526. fn: function (){
  7527. var self=this;
  7528. return '\r';
  7529. return self;},
  7530. args: [],
  7531. source: unescape('cr%0A%09%3Creturn%20%27%5Cr%27%3E'),
  7532. messageSends: [],
  7533. referencedClasses: []
  7534. }),
  7535. smalltalk.String.klass);
  7536. smalltalk.addMethod(
  7537. unescape('_lf'),
  7538. smalltalk.method({
  7539. selector: unescape('lf'),
  7540. category: 'accessing',
  7541. fn: function (){
  7542. var self=this;
  7543. return '\n';
  7544. return self;},
  7545. args: [],
  7546. source: unescape('lf%0A%09%3Creturn%20%27%5Cn%27%3E'),
  7547. messageSends: [],
  7548. referencedClasses: []
  7549. }),
  7550. smalltalk.String.klass);
  7551. smalltalk.addMethod(
  7552. unescape('_space'),
  7553. smalltalk.method({
  7554. selector: unescape('space'),
  7555. category: 'accessing',
  7556. fn: function (){
  7557. var self=this;
  7558. return ' ';
  7559. return self;},
  7560. args: [],
  7561. source: unescape('space%0A%09%3Creturn%20%27%20%27%3E'),
  7562. messageSends: [],
  7563. referencedClasses: []
  7564. }),
  7565. smalltalk.String.klass);
  7566. smalltalk.addMethod(
  7567. unescape('_tab'),
  7568. smalltalk.method({
  7569. selector: unescape('tab'),
  7570. category: 'accessing',
  7571. fn: function (){
  7572. var self=this;
  7573. return '\t';
  7574. return self;},
  7575. args: [],
  7576. source: unescape('tab%0A%09%3Creturn%20%27%5Ct%27%3E'),
  7577. messageSends: [],
  7578. referencedClasses: []
  7579. }),
  7580. smalltalk.String.klass);
  7581. smalltalk.addMethod(
  7582. unescape('_crlf'),
  7583. smalltalk.method({
  7584. selector: unescape('crlf'),
  7585. category: 'accessing',
  7586. fn: function (){
  7587. var self=this;
  7588. return '\r\n';
  7589. return self;},
  7590. args: [],
  7591. source: unescape('crlf%0A%09%3Creturn%20%27%5Cr%5Cn%27%3E'),
  7592. messageSends: [],
  7593. referencedClasses: []
  7594. }),
  7595. smalltalk.String.klass);
  7596. smalltalk.addMethod(
  7597. unescape('_streamContents_'),
  7598. smalltalk.method({
  7599. selector: unescape('streamContents%3A'),
  7600. category: 'instance creation',
  7601. fn: function (blockWithArg){
  7602. var self=this;
  7603. var stream=nil;
  7604. (stream=smalltalk.send(smalltalk.send(self, "_streamClass", []), "_on_", [smalltalk.send((smalltalk.String || String), "_new", [])]));
  7605. smalltalk.send(blockWithArg, "_value_", [stream]);
  7606. return smalltalk.send(stream, "_contents", []);
  7607. return self;},
  7608. args: ["blockWithArg"],
  7609. 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'),
  7610. messageSends: ["on:", "streamClass", "new", "value:", "contents"],
  7611. referencedClasses: ["String"]
  7612. }),
  7613. smalltalk.String.klass);
  7614. smalltalk.addMethod(
  7615. unescape('_value_'),
  7616. smalltalk.method({
  7617. selector: unescape('value%3A'),
  7618. category: 'instance creation',
  7619. fn: function (aUTFCharCode){
  7620. var self=this;
  7621. return String.fromCharCode(aUTFCharCode);;
  7622. return self;},
  7623. args: ["aUTFCharCode"],
  7624. source: unescape('value%3A%20aUTFCharCode%0A%0A%09%3Creturn%20String.fromCharCode%28aUTFCharCode%29%3B%3E'),
  7625. messageSends: [],
  7626. referencedClasses: []
  7627. }),
  7628. smalltalk.String.klass);
  7629. smalltalk.addClass('Symbol', smalltalk.CharacterArray, [], 'Kernel-Collections');
  7630. smalltalk.addMethod(
  7631. unescape('_at_ifAbsent_'),
  7632. smalltalk.method({
  7633. selector: unescape('at%3AifAbsent%3A'),
  7634. category: 'accessing',
  7635. fn: function (anIndex, aBlock){
  7636. var self=this;
  7637. return smalltalk.send(smalltalk.send(self, "_asString", []), "_at_ifAbsent_", [anIndex, aBlock]);
  7638. return self;},
  7639. args: ["anIndex", "aBlock"],
  7640. source: unescape('at%3A%20anIndex%20ifAbsent%3A%20aBlock%0A%09%5Eself%20asString%20at%3A%20anIndex%20ifAbsent%3A%20aBlock'),
  7641. messageSends: ["at:ifAbsent:", "asString"],
  7642. referencedClasses: []
  7643. }),
  7644. smalltalk.Symbol);
  7645. smalltalk.addMethod(
  7646. unescape('_asString'),
  7647. smalltalk.method({
  7648. selector: unescape('asString'),
  7649. category: 'converting',
  7650. fn: function (){
  7651. var self=this;
  7652. return self.value;
  7653. return self;},
  7654. args: [],
  7655. source: unescape('asString%0A%09%3Creturn%20self.value%3E'),
  7656. messageSends: [],
  7657. referencedClasses: []
  7658. }),
  7659. smalltalk.Symbol);
  7660. smalltalk.addMethod(
  7661. unescape('_printString'),
  7662. smalltalk.method({
  7663. selector: unescape('printString'),
  7664. category: 'printing',
  7665. fn: function (){
  7666. var self=this;
  7667. return smalltalk.send(unescape("%23"), "__comma", [smalltalk.send(self, "_asString", [])]);
  7668. return self;},
  7669. args: [],
  7670. source: unescape('printString%0A%09%5E%27%23%27%2C%20self%20asString'),
  7671. messageSends: [unescape("%2C"), "asString"],
  7672. referencedClasses: []
  7673. }),
  7674. smalltalk.Symbol);
  7675. smalltalk.addMethod(
  7676. unescape('_size'),
  7677. smalltalk.method({
  7678. selector: unescape('size'),
  7679. category: 'accessing',
  7680. fn: function (){
  7681. var self=this;
  7682. return smalltalk.send(smalltalk.send(self, "_asString", []), "_size", []);
  7683. return self;},
  7684. args: [],
  7685. source: unescape('size%0A%09%5Eself%20asString%20size'),
  7686. messageSends: ["size", "asString"],
  7687. referencedClasses: []
  7688. }),
  7689. smalltalk.Symbol);
  7690. smalltalk.addMethod(
  7691. unescape('_asSymbol'),
  7692. smalltalk.method({
  7693. selector: unescape('asSymbol'),
  7694. category: 'converting',
  7695. fn: function (){
  7696. var self=this;
  7697. return self;
  7698. return self;},
  7699. args: [],
  7700. source: unescape('asSymbol%0A%09%5Eself'),
  7701. messageSends: [],
  7702. referencedClasses: []
  7703. }),
  7704. smalltalk.Symbol);
  7705. smalltalk.addMethod(
  7706. unescape('_copyFrom_to_'),
  7707. smalltalk.method({
  7708. selector: unescape('copyFrom%3Ato%3A'),
  7709. category: 'copying',
  7710. fn: function (anIndex, anotherIndex){
  7711. var self=this;
  7712. return smalltalk.send(smalltalk.send(self, "_class", []), "_fromString_", [smalltalk.send(smalltalk.send(self, "_asString", []), "_copyFrom_to_", [anIndex, anotherIndex])]);
  7713. return self;},
  7714. args: ["anIndex", "anotherIndex"],
  7715. source: unescape('copyFrom%3A%20anIndex%20to%3A%20anotherIndex%0A%09%5Eself%20class%20fromString%3A%20%28self%20asString%20copyFrom%3A%20anIndex%20to%3A%20anotherIndex%29'),
  7716. messageSends: ["fromString:", "class", "copyFrom:to:", "asString"],
  7717. referencedClasses: []
  7718. }),
  7719. smalltalk.Symbol);
  7720. smalltalk.addMethod(
  7721. unescape('_deepCopy'),
  7722. smalltalk.method({
  7723. selector: unescape('deepCopy'),
  7724. category: 'copying',
  7725. fn: function (){
  7726. var self=this;
  7727. return self;
  7728. return self;},
  7729. args: [],
  7730. source: unescape('deepCopy%0A%09%5Eself'),
  7731. messageSends: [],
  7732. referencedClasses: []
  7733. }),
  7734. smalltalk.Symbol);
  7735. smalltalk.addMethod(
  7736. unescape('__lt'),
  7737. smalltalk.method({
  7738. selector: unescape('%3C'),
  7739. category: 'comparing',
  7740. fn: function (aSymbol){
  7741. var self=this;
  7742. return ((($receiver = smalltalk.send(self, "_asString", [])).klass === smalltalk.Number) ? $receiver <smalltalk.send(aSymbol, "_asString", []) : smalltalk.send($receiver, "__lt", [smalltalk.send(aSymbol, "_asString", [])]));
  7743. return self;},
  7744. args: ["aSymbol"],
  7745. source: unescape('%3C%20aSymbol%0A%09%5Eself%20asString%20%3C%20aSymbol%20asString'),
  7746. messageSends: [unescape("%3C"), "asString"],
  7747. referencedClasses: []
  7748. }),
  7749. smalltalk.Symbol);
  7750. smalltalk.addMethod(
  7751. unescape('__lt_eq'),
  7752. smalltalk.method({
  7753. selector: unescape('%3C%3D'),
  7754. category: 'comparing',
  7755. fn: function (aSymbol){
  7756. var self=this;
  7757. return ((($receiver = smalltalk.send(self, "_asString", [])).klass === smalltalk.Number) ? $receiver <=smalltalk.send(aSymbol, "_asString", []) : smalltalk.send($receiver, "__lt_eq", [smalltalk.send(aSymbol, "_asString", [])]));
  7758. return self;},
  7759. args: ["aSymbol"],
  7760. source: unescape('%3C%3D%20aSymbol%0A%09%5Eself%20asString%20%3C%3D%20aSymbol%20asString'),
  7761. messageSends: [unescape("%3C%3D"), "asString"],
  7762. referencedClasses: []
  7763. }),
  7764. smalltalk.Symbol);
  7765. smalltalk.addMethod(
  7766. unescape('__gt_eq'),
  7767. smalltalk.method({
  7768. selector: unescape('%3E%3D'),
  7769. category: 'comparing',
  7770. fn: function (aSymbol){
  7771. var self=this;
  7772. return ((($receiver = smalltalk.send(self, "_asString", [])).klass === smalltalk.Number) ? $receiver >=smalltalk.send(aSymbol, "_asString", []) : smalltalk.send($receiver, "__gt_eq", [smalltalk.send(aSymbol, "_asString", [])]));
  7773. return self;},
  7774. args: ["aSymbol"],
  7775. source: unescape('%3E%3D%20aSymbol%0A%09%5Eself%20asString%20%3E%3D%20aSymbol%20asString'),
  7776. messageSends: [unescape("%3E%3D"), "asString"],
  7777. referencedClasses: []
  7778. }),
  7779. smalltalk.Symbol);
  7780. smalltalk.addMethod(
  7781. unescape('__eq'),
  7782. smalltalk.method({
  7783. selector: unescape('%3D'),
  7784. category: 'comparing',
  7785. fn: function (aSymbol){
  7786. var self=this;
  7787. try{((($receiver = smalltalk.send(smalltalk.send(aSymbol, "_class", []), "__eq", [smalltalk.send(self, "_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}})})();})]));
  7788. (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return smalltalk.send(smalltalk.send(self, "_asString", []), "__eq", [smalltalk.send(aSymbol, "_asString", [])])}})})();
  7789. return self;
  7790. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
  7791. args: ["aSymbol"],
  7792. source: unescape('%3D%20aSymbol%0A%09aSymbol%20class%20%3D%20self%20class%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09%5Eself%20asString%20%3D%20aSymbol%20asString'),
  7793. messageSends: ["ifFalse:", unescape("%3D"), "class", "asString"],
  7794. referencedClasses: []
  7795. }),
  7796. smalltalk.Symbol);
  7797. smalltalk.addMethod(
  7798. unescape('_isSymbol'),
  7799. smalltalk.method({
  7800. selector: unescape('isSymbol'),
  7801. category: 'printing',
  7802. fn: function (){
  7803. var self=this;
  7804. return true;
  7805. return self;},
  7806. args: [],
  7807. source: unescape('isSymbol%0A%09%5Etrue'),
  7808. messageSends: [],
  7809. referencedClasses: []
  7810. }),
  7811. smalltalk.Symbol);
  7812. smalltalk.addMethod(
  7813. unescape('_asJavascript'),
  7814. smalltalk.method({
  7815. selector: unescape('asJavascript'),
  7816. category: 'converting',
  7817. fn: function (){
  7818. var self=this;
  7819. return smalltalk.send(smalltalk.send(unescape("smalltalk.symbolFor%28%22"), "__comma", [smalltalk.send(self, "_asString", [])]), "__comma", [unescape("%22%29")]);
  7820. return self;},
  7821. args: [],
  7822. source: unescape('asJavascript%0A%09%5E%27smalltalk.symbolFor%28%22%27%2C%20self%20asString%2C%20%27%22%29%27'),
  7823. messageSends: [unescape("%2C"), "asString"],
  7824. referencedClasses: []
  7825. }),
  7826. smalltalk.Symbol);
  7827. smalltalk.addMethod(
  7828. unescape('__gt'),
  7829. smalltalk.method({
  7830. selector: unescape('%3E'),
  7831. category: 'comparing',
  7832. fn: function (aSymbol){
  7833. var self=this;
  7834. return ((($receiver = smalltalk.send(self, "_asString", [])).klass === smalltalk.Number) ? $receiver >smalltalk.send(aSymbol, "_asString", []) : smalltalk.send($receiver, "__gt", [smalltalk.send(aSymbol, "_asString", [])]));
  7835. return self;},
  7836. args: ["aSymbol"],
  7837. source: unescape('%3E%20aSymbol%0A%09%5Eself%20asString%20%3E%20aSymbol%20asString'),
  7838. messageSends: [unescape("%3E"), "asString"],
  7839. referencedClasses: []
  7840. }),
  7841. smalltalk.Symbol);
  7842. smalltalk.addMethod(
  7843. unescape('_shallowCopy'),
  7844. smalltalk.method({
  7845. selector: unescape('shallowCopy'),
  7846. category: 'copying',
  7847. fn: function (){
  7848. var self=this;
  7849. return self;
  7850. return self;},
  7851. args: [],
  7852. source: unescape('shallowCopy%0A%09%5Eself'),
  7853. messageSends: [],
  7854. referencedClasses: []
  7855. }),
  7856. smalltalk.Symbol);
  7857. smalltalk.addMethod(
  7858. unescape('_asSelector'),
  7859. smalltalk.method({
  7860. selector: unescape('asSelector'),
  7861. category: 'converting',
  7862. fn: function (){
  7863. var self=this;
  7864. return smalltalk.send(smalltalk.send(self, "_asString", []), "_asSelector", []);
  7865. return self;},
  7866. args: [],
  7867. source: unescape('asSelector%0A%09%5Eself%20asString%20asSelector'),
  7868. messageSends: ["asSelector", "asString"],
  7869. referencedClasses: []
  7870. }),
  7871. smalltalk.Symbol);
  7872. smalltalk.addMethod(
  7873. unescape('_lookup_'),
  7874. smalltalk.method({
  7875. selector: unescape('lookup%3A'),
  7876. category: 'instance creation',
  7877. fn: function (aString){
  7878. var self=this;
  7879. return smalltalk.symbolFor(aString);;
  7880. return self;},
  7881. args: ["aString"],
  7882. source: unescape('lookup%3A%20aString%0A%09%3Creturn%20smalltalk.symbolFor%28aString%29%3B%3E'),
  7883. messageSends: [],
  7884. referencedClasses: []
  7885. }),
  7886. smalltalk.Symbol.klass);
  7887. smalltalk.addMethod(
  7888. unescape('_basicNew'),
  7889. smalltalk.method({
  7890. selector: unescape('basicNew'),
  7891. category: 'instance creation',
  7892. fn: function (){
  7893. var self=this;
  7894. smalltalk.send(self, "_shouldNotImplement", []);
  7895. return self;},
  7896. args: [],
  7897. source: unescape('basicNew%0A%09self%20shouldNotImplement'),
  7898. messageSends: ["shouldNotImplement"],
  7899. referencedClasses: []
  7900. }),
  7901. smalltalk.Symbol.klass);
  7902. smalltalk.addMethod(
  7903. unescape('_fromString_'),
  7904. smalltalk.method({
  7905. selector: unescape('fromString%3A'),
  7906. category: 'instance creation',
  7907. fn: function (aString){
  7908. var self=this;
  7909. return smalltalk.send(self, "_lookup_", [aString]);
  7910. return self;},
  7911. args: ["aString"],
  7912. source: unescape('fromString%3A%20aString%0A%09%5Eself%20lookup%3A%20aString'),
  7913. messageSends: ["lookup:"],
  7914. referencedClasses: []
  7915. }),
  7916. smalltalk.Symbol.klass);
  7917. smalltalk.addClass('Array', smalltalk.SequenceableCollection, [], 'Kernel-Collections');
  7918. smalltalk.addMethod(
  7919. unescape('_size'),
  7920. smalltalk.method({
  7921. selector: unescape('size'),
  7922. category: 'accessing',
  7923. fn: function (){
  7924. var self=this;
  7925. return self.length;
  7926. return self;},
  7927. args: [],
  7928. source: unescape('size%0A%09%3Creturn%20self.length%3E'),
  7929. messageSends: [],
  7930. referencedClasses: []
  7931. }),
  7932. smalltalk.Array);
  7933. smalltalk.addMethod(
  7934. unescape('_at_put_'),
  7935. smalltalk.method({
  7936. selector: unescape('at%3Aput%3A'),
  7937. category: 'accessing',
  7938. fn: function (anIndex, anObject){
  7939. var self=this;
  7940. return self[anIndex - 1] = anObject;
  7941. return self;},
  7942. args: ["anIndex", "anObject"],
  7943. source: unescape('at%3A%20anIndex%20put%3A%20anObject%0A%09%3Creturn%20self%5BanIndex%20-%201%5D%20%3D%20anObject%3E'),
  7944. messageSends: [],
  7945. referencedClasses: []
  7946. }),
  7947. smalltalk.Array);
  7948. smalltalk.addMethod(
  7949. unescape('_at_ifAbsent_'),
  7950. smalltalk.method({
  7951. selector: unescape('at%3AifAbsent%3A'),
  7952. category: 'accessing',
  7953. fn: function (anIndex, aBlock){
  7954. var self=this;
  7955. var value = self[anIndex - 1];
  7956. if(value === undefined) {
  7957. return aBlock();
  7958. } else {
  7959. return value;
  7960. }
  7961. ;
  7962. return self;},
  7963. args: ["anIndex", "aBlock"],
  7964. 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'),
  7965. messageSends: [],
  7966. referencedClasses: []
  7967. }),
  7968. smalltalk.Array);
  7969. smalltalk.addMethod(
  7970. unescape('_add_'),
  7971. smalltalk.method({
  7972. selector: unescape('add%3A'),
  7973. category: 'adding/removing',
  7974. fn: function (anObject){
  7975. var self=this;
  7976. self.push(anObject); return anObject;;
  7977. return self;},
  7978. args: ["anObject"],
  7979. source: unescape('add%3A%20anObject%0A%09%3Cself.push%28anObject%29%3B%20return%20anObject%3B%3E'),
  7980. messageSends: [],
  7981. referencedClasses: []
  7982. }),
  7983. smalltalk.Array);
  7984. smalltalk.addMethod(
  7985. unescape('_join_'),
  7986. smalltalk.method({
  7987. selector: unescape('join%3A'),
  7988. category: 'enumerating',
  7989. fn: function (aString){
  7990. var self=this;
  7991. return self.join(aString);
  7992. return self;},
  7993. args: ["aString"],
  7994. source: unescape('join%3A%20aString%0A%09%3Creturn%20self.join%28aString%29%3E'),
  7995. messageSends: [],
  7996. referencedClasses: []
  7997. }),
  7998. smalltalk.Array);
  7999. smalltalk.addMethod(
  8000. unescape('_asJavascript'),
  8001. smalltalk.method({
  8002. selector: unescape('asJavascript'),
  8003. category: 'converting',
  8004. fn: function (){
  8005. var self=this;
  8006. 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")]);
  8007. return self;},
  8008. args: [],
  8009. 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'),
  8010. messageSends: [unescape("%2C"), "join:", "collect:", "asJavascript"],
  8011. referencedClasses: []
  8012. }),
  8013. smalltalk.Array);
  8014. smalltalk.addMethod(
  8015. unescape('_sort'),
  8016. smalltalk.method({
  8017. selector: unescape('sort'),
  8018. category: 'enumerating',
  8019. fn: function (){
  8020. var self=this;
  8021. return smalltalk.send(self, "_basicPerform_", ["sort"]);
  8022. return self;},
  8023. args: [],
  8024. source: unescape('sort%0A%20%20%20%20%5Eself%20basicPerform%3A%20%27sort%27'),
  8025. messageSends: ["basicPerform:"],
  8026. referencedClasses: []
  8027. }),
  8028. smalltalk.Array);
  8029. smalltalk.addMethod(
  8030. unescape('_sort_'),
  8031. smalltalk.method({
  8032. selector: unescape('sort%3A'),
  8033. category: 'enumerating',
  8034. fn: function (aBlock){
  8035. var self=this;
  8036. return self.sort(function(a, b) {
  8037. if(aBlock(a,b)) {return -1} else {return 1}
  8038. })
  8039. ;
  8040. return self;},
  8041. args: ["aBlock"],
  8042. 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'),
  8043. messageSends: [],
  8044. referencedClasses: []
  8045. }),
  8046. smalltalk.Array);
  8047. smalltalk.addMethod(
  8048. unescape('_remove_'),
  8049. smalltalk.method({
  8050. selector: unescape('remove%3A'),
  8051. category: 'adding/removing',
  8052. fn: function (anObject){
  8053. var self=this;
  8054. for(var i=0;i<self.length;i++) {
  8055. if(self[i] == anObject) {
  8056. self.splice(i,1);
  8057. break;
  8058. }
  8059. }
  8060. ;
  8061. return self;},
  8062. args: ["anObject"],
  8063. 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'),
  8064. messageSends: [],
  8065. referencedClasses: []
  8066. }),
  8067. smalltalk.Array);
  8068. smalltalk.addMethod(
  8069. unescape('_sorted'),
  8070. smalltalk.method({
  8071. selector: unescape('sorted'),
  8072. category: 'enumerating',
  8073. fn: function (){
  8074. var self=this;
  8075. return smalltalk.send(smalltalk.send(self, "_copy", []), "_sort", []);
  8076. return self;},
  8077. args: [],
  8078. source: unescape('sorted%0A%09%5Eself%20copy%20sort'),
  8079. messageSends: ["sort", "copy"],
  8080. referencedClasses: []
  8081. }),
  8082. smalltalk.Array);
  8083. smalltalk.addMethod(
  8084. unescape('_sorted_'),
  8085. smalltalk.method({
  8086. selector: unescape('sorted%3A'),
  8087. category: 'enumerating',
  8088. fn: function (aBlock){
  8089. var self=this;
  8090. return smalltalk.send(smalltalk.send(self, "_copy", []), "_sort_", [aBlock]);
  8091. return self;},
  8092. args: ["aBlock"],
  8093. source: unescape('sorted%3A%20aBlock%0A%09%5Eself%20copy%20sort%3A%20aBlock'),
  8094. messageSends: ["sort:", "copy"],
  8095. referencedClasses: []
  8096. }),
  8097. smalltalk.Array);
  8098. smalltalk.addMethod(
  8099. unescape('_removeFrom_to_'),
  8100. smalltalk.method({
  8101. selector: unescape('removeFrom%3Ato%3A'),
  8102. category: 'adding/removing',
  8103. fn: function (aNumber, anotherNumber){
  8104. var self=this;
  8105. self.splice(aNumber - 1,anotherNumber - 1);
  8106. return self;},
  8107. args: ["aNumber", "anotherNumber"],
  8108. source: unescape('removeFrom%3A%20aNumber%20to%3A%20anotherNumber%0A%09%3Cself.splice%28aNumber%20-%201%2CanotherNumber%20-%201%29%3E'),
  8109. messageSends: [],
  8110. referencedClasses: []
  8111. }),
  8112. smalltalk.Array);
  8113. smalltalk.addMethod(
  8114. unescape('_reversed'),
  8115. smalltalk.method({
  8116. selector: unescape('reversed'),
  8117. category: 'converting',
  8118. fn: function (){
  8119. var self=this;
  8120. return self._copy().reverse();
  8121. return self;},
  8122. args: [],
  8123. source: unescape('reversed%0A%09%3Creturn%20self._copy%28%29.reverse%28%29%3E'),
  8124. messageSends: [],
  8125. referencedClasses: []
  8126. }),
  8127. smalltalk.Array);
  8128. smalltalk.addMethod(
  8129. unescape('_new_'),
  8130. smalltalk.method({
  8131. selector: unescape('new%3A'),
  8132. category: 'instance creation',
  8133. fn: function (anInteger){
  8134. var self=this;
  8135. return new Array(anInteger);
  8136. return self;},
  8137. args: ["anInteger"],
  8138. source: unescape('new%3A%20anInteger%0A%09%3Creturn%20new%20Array%28anInteger%29%3E'),
  8139. messageSends: [],
  8140. referencedClasses: []
  8141. }),
  8142. smalltalk.Array.klass);
  8143. smalltalk.addMethod(
  8144. unescape('_with_'),
  8145. smalltalk.method({
  8146. selector: unescape('with%3A'),
  8147. category: 'instance creation',
  8148. fn: function (anObject){
  8149. var self=this;
  8150. return (function($rec){smalltalk.send($rec, "_at_put_", [(1), anObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new_", [(1)]));
  8151. return self;},
  8152. args: ["anObject"],
  8153. source: unescape('with%3A%20anObject%0A%09%20%20%20%20%5E%28self%20new%3A%201%29%0A%09%09at%3A%201%20put%3A%20anObject%3B%0A%09%09yourself'),
  8154. messageSends: ["at:put:", "yourself", "new:"],
  8155. referencedClasses: []
  8156. }),
  8157. smalltalk.Array.klass);
  8158. smalltalk.addMethod(
  8159. unescape('_with_with_'),
  8160. smalltalk.method({
  8161. selector: unescape('with%3Awith%3A'),
  8162. category: 'instance creation',
  8163. fn: function (anObject, anObject2){
  8164. var self=this;
  8165. return (function($rec){smalltalk.send($rec, "_at_put_", [(1), anObject]);smalltalk.send($rec, "_at_put_", [(2), anObject2]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new_", [(2)]));
  8166. return self;},
  8167. args: ["anObject", "anObject2"],
  8168. source: unescape('with%3A%20anObject%20with%3A%20anObject2%0A%09%20%20%20%20%5E%28self%20new%3A%202%29%0A%09%09at%3A%201%20put%3A%20anObject%3B%0A%09%09at%3A%202%20put%3A%20anObject2%3B%0A%09%09yourself'),
  8169. messageSends: ["at:put:", "yourself", "new:"],
  8170. referencedClasses: []
  8171. }),
  8172. smalltalk.Array.klass);
  8173. smalltalk.addMethod(
  8174. unescape('_with_with_with_'),
  8175. smalltalk.method({
  8176. selector: unescape('with%3Awith%3Awith%3A'),
  8177. category: 'instance creation',
  8178. fn: function (anObject, anObject2, anObject3){
  8179. var self=this;
  8180. return (function($rec){smalltalk.send($rec, "_at_put_", [(1), anObject]);smalltalk.send($rec, "_at_put_", [(2), anObject2]);smalltalk.send($rec, "_at_put_", [(3), anObject3]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new_", [(3)]));
  8181. return self;},
  8182. args: ["anObject", "anObject2", "anObject3"],
  8183. source: unescape('with%3A%20anObject%20with%3A%20anObject2%20with%3A%20anObject3%0A%09%20%20%20%20%5E%28self%20new%3A%203%29%0A%09%09at%3A%201%20put%3A%20anObject%3B%0A%09%09at%3A%202%20put%3A%20anObject2%3B%0A%09%09at%3A%203%20put%3A%20anObject3%3B%0A%09%09yourself'),
  8184. messageSends: ["at:put:", "yourself", "new:"],
  8185. referencedClasses: []
  8186. }),
  8187. smalltalk.Array.klass);
  8188. smalltalk.addMethod(
  8189. unescape('_withAll_'),
  8190. smalltalk.method({
  8191. selector: unescape('withAll%3A'),
  8192. category: 'instance creation',
  8193. fn: function (aCollection){
  8194. var self=this;
  8195. var instance=nil;
  8196. (instance=smalltalk.send(self, "_new_", [smalltalk.send(aCollection, "_size", [])]));
  8197. smalltalk.send(aCollection, "_withIndexDo_", [(function(index, each){return smalltalk.send(instance, "_at_put_", [index, each]);})]);
  8198. return instance;
  8199. return self;},
  8200. args: ["aCollection"],
  8201. source: unescape('withAll%3A%20aCollection%0A%09%7C%20instance%20%7C%0A%09instance%20%3A%3D%20self%20new%3A%20aCollection%20size.%0A%09aCollection%20withIndexDo%3A%20%5B%3Aindex%20%3Aeach%20%7C%0A%09%09instance%20at%3A%20index%20put%3A%20each%5D.%0A%09%5Einstance'),
  8202. messageSends: ["new:", "size", "withIndexDo:", "at:put:"],
  8203. referencedClasses: []
  8204. }),
  8205. smalltalk.Array.klass);
  8206. smalltalk.addClass('RegularExpression', smalltalk.Object, [], 'Kernel-Collections');
  8207. smalltalk.addMethod(
  8208. unescape('_compile_'),
  8209. smalltalk.method({
  8210. selector: unescape('compile%3A'),
  8211. category: 'evaluating',
  8212. fn: function (aString){
  8213. var self=this;
  8214. return self.compile(aString);
  8215. return self;},
  8216. args: ["aString"],
  8217. source: unescape('compile%3A%20aString%0A%09%3Creturn%20self.compile%28aString%29%3E'),
  8218. messageSends: [],
  8219. referencedClasses: []
  8220. }),
  8221. smalltalk.RegularExpression);
  8222. smalltalk.addMethod(
  8223. unescape('_exec_'),
  8224. smalltalk.method({
  8225. selector: unescape('exec%3A'),
  8226. category: 'evaluating',
  8227. fn: function (aString){
  8228. var self=this;
  8229. return self.exec(aString) || nil;
  8230. return self;},
  8231. args: ["aString"],
  8232. source: unescape('exec%3A%20aString%0A%09%3Creturn%20self.exec%28aString%29%20%7C%7C%20nil%3E'),
  8233. messageSends: [],
  8234. referencedClasses: []
  8235. }),
  8236. smalltalk.RegularExpression);
  8237. smalltalk.addMethod(
  8238. unescape('_test_'),
  8239. smalltalk.method({
  8240. selector: unescape('test%3A'),
  8241. category: 'evaluating',
  8242. fn: function (aString){
  8243. var self=this;
  8244. return self.test(aString);
  8245. return self;},
  8246. args: ["aString"],
  8247. source: unescape('test%3A%20aString%0A%09%3Creturn%20self.test%28aString%29%3E'),
  8248. messageSends: [],
  8249. referencedClasses: []
  8250. }),
  8251. smalltalk.RegularExpression);
  8252. smalltalk.addMethod(
  8253. unescape('_fromString_flag_'),
  8254. smalltalk.method({
  8255. selector: unescape('fromString%3Aflag%3A'),
  8256. category: 'instance creation',
  8257. fn: function (aString, anotherString){
  8258. var self=this;
  8259. return new RegExp(aString, anotherString);
  8260. return self;},
  8261. args: ["aString", "anotherString"],
  8262. source: unescape('fromString%3A%20aString%20flag%3A%20anotherString%0A%09%3Creturn%20new%20RegExp%28aString%2C%20anotherString%29%3E'),
  8263. messageSends: [],
  8264. referencedClasses: []
  8265. }),
  8266. smalltalk.RegularExpression.klass);
  8267. smalltalk.addMethod(
  8268. unescape('_fromString_'),
  8269. smalltalk.method({
  8270. selector: unescape('fromString%3A'),
  8271. category: 'instance creation',
  8272. fn: function (aString){
  8273. var self=this;
  8274. return smalltalk.send(self, "_fromString_flag_", [aString, ""]);
  8275. return self;},
  8276. args: ["aString"],
  8277. source: unescape('fromString%3A%20aString%0A%09%20%20%20%20%5Eself%20fromString%3A%20aString%20flag%3A%20%27%27'),
  8278. messageSends: ["fromString:flag:"],
  8279. referencedClasses: []
  8280. }),
  8281. smalltalk.RegularExpression.klass);
  8282. smalltalk.addClass('Association', smalltalk.Object, ['key', 'value'], 'Kernel-Collections');
  8283. smalltalk.addMethod(
  8284. unescape('__eq'),
  8285. smalltalk.method({
  8286. selector: unescape('%3D'),
  8287. category: 'comparing',
  8288. fn: function (anAssociation){
  8289. var self=this;
  8290. 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", [])]);})]);})]);
  8291. return self;},
  8292. args: ["anAssociation"],
  8293. 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'),
  8294. messageSends: ["and:", unescape("%3D"), "class", "key", "value"],
  8295. referencedClasses: []
  8296. }),
  8297. smalltalk.Association);
  8298. smalltalk.addMethod(
  8299. unescape('_key_'),
  8300. smalltalk.method({
  8301. selector: unescape('key%3A'),
  8302. category: 'accessing',
  8303. fn: function (aKey){
  8304. var self=this;
  8305. (self['@key']=aKey);
  8306. return self;},
  8307. args: ["aKey"],
  8308. source: unescape('key%3A%20aKey%0A%09key%20%3A%3D%20aKey'),
  8309. messageSends: [],
  8310. referencedClasses: []
  8311. }),
  8312. smalltalk.Association);
  8313. smalltalk.addMethod(
  8314. unescape('_key'),
  8315. smalltalk.method({
  8316. selector: unescape('key'),
  8317. category: 'accessing',
  8318. fn: function (){
  8319. var self=this;
  8320. return self['@key'];
  8321. return self;},
  8322. args: [],
  8323. source: unescape('key%0A%09%5Ekey'),
  8324. messageSends: [],
  8325. referencedClasses: []
  8326. }),
  8327. smalltalk.Association);
  8328. smalltalk.addMethod(
  8329. unescape('_value_'),
  8330. smalltalk.method({
  8331. selector: unescape('value%3A'),
  8332. category: 'accessing',
  8333. fn: function (aValue){
  8334. var self=this;
  8335. (self['@value']=aValue);
  8336. return self;},
  8337. args: ["aValue"],
  8338. source: unescape('value%3A%20aValue%0A%09value%20%3A%3D%20aValue'),
  8339. messageSends: [],
  8340. referencedClasses: []
  8341. }),
  8342. smalltalk.Association);
  8343. smalltalk.addMethod(
  8344. unescape('_value'),
  8345. smalltalk.method({
  8346. selector: unescape('value'),
  8347. category: 'accessing',
  8348. fn: function (){
  8349. var self=this;
  8350. return self['@value'];
  8351. return self;},
  8352. args: [],
  8353. source: unescape('value%0A%09%5Evalue'),
  8354. messageSends: [],
  8355. referencedClasses: []
  8356. }),
  8357. smalltalk.Association);
  8358. smalltalk.addMethod(
  8359. unescape('_storeOn_'),
  8360. smalltalk.method({
  8361. selector: unescape('storeOn%3A'),
  8362. category: 'comparing',
  8363. fn: function (aStream){
  8364. var self=this;
  8365. smalltalk.send(self['@key'], "_storeOn_", [aStream]);
  8366. smalltalk.send(aStream, "_nextPutAll_", [unescape("-%3E")]);
  8367. smalltalk.send(self['@value'], "_storeOn_", [aStream]);
  8368. return self;},
  8369. args: ["aStream"],
  8370. source: unescape('storeOn%3A%20aStream%0A%09%22Store%20in%20the%20format%20%28key-%3Evalue%29%22%0A%0A%09%22aStream%20nextPutAll%3A%20%27%28%27.%22%0A%09key%20storeOn%3A%20aStream.%0A%09aStream%20nextPutAll%3A%20%27-%3E%27.%0A%09value%20storeOn%3A%20aStream.%0A%09%22aStream%20nextPutAll%3A%20%27%29%27%22'),
  8371. messageSends: ["storeOn:", "nextPutAll:"],
  8372. referencedClasses: []
  8373. }),
  8374. smalltalk.Association);
  8375. smalltalk.addMethod(
  8376. unescape('_key_value_'),
  8377. smalltalk.method({
  8378. selector: unescape('key%3Avalue%3A'),
  8379. category: 'instance creation',
  8380. fn: function (aKey, aValue){
  8381. var self=this;
  8382. return (function($rec){smalltalk.send($rec, "_key_", [aKey]);smalltalk.send($rec, "_value_", [aValue]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  8383. return self;},
  8384. args: ["aKey", "aValue"],
  8385. 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'),
  8386. messageSends: ["key:", "value:", "yourself", "new"],
  8387. referencedClasses: []
  8388. }),
  8389. smalltalk.Association.klass);
  8390. smalltalk.addClass('Stream', smalltalk.Object, ['collection', 'position', 'streamSize'], 'Kernel-Collections');
  8391. smalltalk.addMethod(
  8392. unescape('_collection'),
  8393. smalltalk.method({
  8394. selector: unescape('collection'),
  8395. category: 'accessing',
  8396. fn: function (){
  8397. var self=this;
  8398. return self['@collection'];
  8399. return self;},
  8400. args: [],
  8401. source: unescape('collection%0A%09%5Ecollection'),
  8402. messageSends: [],
  8403. referencedClasses: []
  8404. }),
  8405. smalltalk.Stream);
  8406. smalltalk.addMethod(
  8407. unescape('_setCollection_'),
  8408. smalltalk.method({
  8409. selector: unescape('setCollection%3A'),
  8410. category: 'accessing',
  8411. fn: function (aCollection){
  8412. var self=this;
  8413. (self['@collection']=aCollection);
  8414. return self;},
  8415. args: ["aCollection"],
  8416. source: unescape('setCollection%3A%20aCollection%0A%09collection%20%3A%3D%20aCollection'),
  8417. messageSends: [],
  8418. referencedClasses: []
  8419. }),
  8420. smalltalk.Stream);
  8421. smalltalk.addMethod(
  8422. unescape('_position'),
  8423. smalltalk.method({
  8424. selector: unescape('position'),
  8425. category: 'accessing',
  8426. fn: function (){
  8427. var self=this;
  8428. return (($receiver = self['@position']) == nil || $receiver == undefined) ? (function(){return (self['@position']=(0));})() : $receiver;
  8429. return self;},
  8430. args: [],
  8431. source: unescape('position%0A%09%5Eposition%20ifNil%3A%20%5Bposition%20%3A%3D%200%5D'),
  8432. messageSends: ["ifNil:"],
  8433. referencedClasses: []
  8434. }),
  8435. smalltalk.Stream);
  8436. smalltalk.addMethod(
  8437. unescape('_position_'),
  8438. smalltalk.method({
  8439. selector: unescape('position%3A'),
  8440. category: 'accessing',
  8441. fn: function (anInteger){
  8442. var self=this;
  8443. (self['@position']=anInteger);
  8444. return self;},
  8445. args: ["anInteger"],
  8446. source: unescape('position%3A%20anInteger%0A%09position%20%3A%3D%20anInteger'),
  8447. messageSends: [],
  8448. referencedClasses: []
  8449. }),
  8450. smalltalk.Stream);
  8451. smalltalk.addMethod(
  8452. unescape('_streamSize'),
  8453. smalltalk.method({
  8454. selector: unescape('streamSize'),
  8455. category: 'accessing',
  8456. fn: function (){
  8457. var self=this;
  8458. return self['@streamSize'];
  8459. return self;},
  8460. args: [],
  8461. source: unescape('streamSize%0A%09%5EstreamSize'),
  8462. messageSends: [],
  8463. referencedClasses: []
  8464. }),
  8465. smalltalk.Stream);
  8466. smalltalk.addMethod(
  8467. unescape('_setStreamSize_'),
  8468. smalltalk.method({
  8469. selector: unescape('setStreamSize%3A'),
  8470. category: 'accessing',
  8471. fn: function (anInteger){
  8472. var self=this;
  8473. (self['@streamSize']=anInteger);
  8474. return self;},
  8475. args: ["anInteger"],
  8476. source: unescape('setStreamSize%3A%20anInteger%0A%09streamSize%20%3A%3D%20anInteger'),
  8477. messageSends: [],
  8478. referencedClasses: []
  8479. }),
  8480. smalltalk.Stream);
  8481. smalltalk.addMethod(
  8482. unescape('_contents'),
  8483. smalltalk.method({
  8484. selector: unescape('contents'),
  8485. category: 'accessing',
  8486. fn: function (){
  8487. var self=this;
  8488. return smalltalk.send(smalltalk.send(self, "_collection", []), "_copyFrom_to_", [(1), smalltalk.send(self, "_streamSize", [])]);
  8489. return self;},
  8490. args: [],
  8491. 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'),
  8492. messageSends: ["copyFrom:to:", "collection", "streamSize"],
  8493. referencedClasses: []
  8494. }),
  8495. smalltalk.Stream);
  8496. smalltalk.addMethod(
  8497. unescape('_size'),
  8498. smalltalk.method({
  8499. selector: unescape('size'),
  8500. category: 'accessing',
  8501. fn: function (){
  8502. var self=this;
  8503. return smalltalk.send(self, "_streamSize", []);
  8504. return self;},
  8505. args: [],
  8506. source: unescape('size%0A%09%5Eself%20streamSize'),
  8507. messageSends: ["streamSize"],
  8508. referencedClasses: []
  8509. }),
  8510. smalltalk.Stream);
  8511. smalltalk.addMethod(
  8512. unescape('_reset'),
  8513. smalltalk.method({
  8514. selector: unescape('reset'),
  8515. category: 'actions',
  8516. fn: function (){
  8517. var self=this;
  8518. smalltalk.send(self, "_position_", [(0)]);
  8519. return self;},
  8520. args: [],
  8521. source: unescape('reset%0A%09self%20position%3A%200'),
  8522. messageSends: ["position:"],
  8523. referencedClasses: []
  8524. }),
  8525. smalltalk.Stream);
  8526. smalltalk.addMethod(
  8527. unescape('_close'),
  8528. smalltalk.method({
  8529. selector: unescape('close'),
  8530. category: 'actions',
  8531. fn: function (){
  8532. var self=this;
  8533. return self;},
  8534. args: [],
  8535. source: unescape('close'),
  8536. messageSends: [],
  8537. referencedClasses: []
  8538. }),
  8539. smalltalk.Stream);
  8540. smalltalk.addMethod(
  8541. unescape('_flush'),
  8542. smalltalk.method({
  8543. selector: unescape('flush'),
  8544. category: 'actions',
  8545. fn: function (){
  8546. var self=this;
  8547. return self;},
  8548. args: [],
  8549. source: unescape('flush'),
  8550. messageSends: [],
  8551. referencedClasses: []
  8552. }),
  8553. smalltalk.Stream);
  8554. smalltalk.addMethod(
  8555. unescape('_resetContents'),
  8556. smalltalk.method({
  8557. selector: unescape('resetContents'),
  8558. category: 'actions',
  8559. fn: function (){
  8560. var self=this;
  8561. smalltalk.send(self, "_reset", []);
  8562. smalltalk.send(self, "_setStreamSize_", [(0)]);
  8563. return self;},
  8564. args: [],
  8565. source: unescape('resetContents%0A%09self%20reset.%0A%09self%20setStreamSize%3A%200'),
  8566. messageSends: ["reset", "setStreamSize:"],
  8567. referencedClasses: []
  8568. }),
  8569. smalltalk.Stream);
  8570. smalltalk.addMethod(
  8571. unescape('_do_'),
  8572. smalltalk.method({
  8573. selector: unescape('do%3A'),
  8574. category: 'enumerating',
  8575. fn: function (aBlock){
  8576. var self=this;
  8577. (function(){while(!(function(){return smalltalk.send(self, "_atEnd", []);})()) {(function(){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_next", [])]);})()}})();
  8578. return self;},
  8579. args: ["aBlock"],
  8580. source: unescape('do%3A%20aBlock%0A%09%5Bself%20atEnd%5D%20whileFalse%3A%20%5BaBlock%20value%3A%20self%20next%5D'),
  8581. messageSends: ["whileFalse:", "atEnd", "value:", "next"],
  8582. referencedClasses: []
  8583. }),
  8584. smalltalk.Stream);
  8585. smalltalk.addMethod(
  8586. unescape('_setToEnd'),
  8587. smalltalk.method({
  8588. selector: unescape('setToEnd'),
  8589. category: 'positioning',
  8590. fn: function (){
  8591. var self=this;
  8592. smalltalk.send(self, "_position_", [smalltalk.send(self, "_size", [])]);
  8593. return self;},
  8594. args: [],
  8595. source: unescape('setToEnd%0A%09self%20position%3A%20self%20size'),
  8596. messageSends: ["position:", "size"],
  8597. referencedClasses: []
  8598. }),
  8599. smalltalk.Stream);
  8600. smalltalk.addMethod(
  8601. unescape('_skip_'),
  8602. smalltalk.method({
  8603. selector: unescape('skip%3A'),
  8604. category: 'positioning',
  8605. fn: function (anInteger){
  8606. var self=this;
  8607. 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)])]);
  8608. return self;},
  8609. args: ["anInteger"],
  8610. source: unescape('skip%3A%20anInteger%0A%09self%20position%3A%20%28%28self%20position%20+%20anInteger%29%20min%3A%20self%20size%20max%3A%200%29'),
  8611. messageSends: ["position:", "min:max:", unescape("+"), "position", "size"],
  8612. referencedClasses: []
  8613. }),
  8614. smalltalk.Stream);
  8615. smalltalk.addMethod(
  8616. unescape('_next'),
  8617. smalltalk.method({
  8618. selector: unescape('next'),
  8619. category: 'reading',
  8620. fn: function (){
  8621. var self=this;
  8622. return ((($receiver = smalltalk.send(self, "_atEnd", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return nil;})() : (function(){smalltalk.send(self, "_position_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);return smalltalk.send(self['@collection'], "_at_", [smalltalk.send(self, "_position", [])]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return nil;}), (function(){smalltalk.send(self, "_position_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);return smalltalk.send(self['@collection'], "_at_", [smalltalk.send(self, "_position", [])]);})]));
  8623. return self;},
  8624. args: [],
  8625. source: unescape('next%0A%09%5Eself%20atEnd%20%0A%09%09ifTrue%3A%20%5Bnil%5D%0A%09%09ifFalse%3A%20%5B%0A%09%09%09self%20position%3A%20self%20position%20+%201.%20%0A%09%09%09collection%20at%3A%20self%20position%5D'),
  8626. messageSends: ["ifTrue:ifFalse:", "atEnd", "position:", unescape("+"), "position", "at:"],
  8627. referencedClasses: []
  8628. }),
  8629. smalltalk.Stream);
  8630. smalltalk.addMethod(
  8631. unescape('_next_'),
  8632. smalltalk.method({
  8633. selector: unescape('next%3A'),
  8634. category: 'reading',
  8635. fn: function (anInteger){
  8636. var self=this;
  8637. var tempCollection=nil;
  8638. (tempCollection=smalltalk.send(smalltalk.send(smalltalk.send(self, "_collection", []), "_class", []), "_new", []));
  8639. 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", [])]);})]));})]);
  8640. return tempCollection;
  8641. return self;},
  8642. args: ["anInteger"],
  8643. 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'),
  8644. messageSends: ["new", "class", "collection", "timesRepeat:", "ifFalse:", "atEnd", "add:", "next"],
  8645. referencedClasses: []
  8646. }),
  8647. smalltalk.Stream);
  8648. smalltalk.addMethod(
  8649. unescape('_nextPut_'),
  8650. smalltalk.method({
  8651. selector: unescape('nextPut%3A'),
  8652. category: 'writing',
  8653. fn: function (anObject){
  8654. var self=this;
  8655. smalltalk.send(self, "_position_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);
  8656. smalltalk.send(smalltalk.send(self, "_collection", []), "_at_put_", [smalltalk.send(self, "_position", []), anObject]);
  8657. smalltalk.send(self, "_setStreamSize_", [smalltalk.send(smalltalk.send(self, "_streamSize", []), "_max_", [smalltalk.send(self, "_position", [])])]);
  8658. return self;},
  8659. args: ["anObject"],
  8660. 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'),
  8661. messageSends: ["position:", unescape("+"), "position", "at:put:", "collection", "setStreamSize:", "max:", "streamSize"],
  8662. referencedClasses: []
  8663. }),
  8664. smalltalk.Stream);
  8665. smalltalk.addMethod(
  8666. unescape('_nextPutAll_'),
  8667. smalltalk.method({
  8668. selector: unescape('nextPutAll%3A'),
  8669. category: 'writing',
  8670. fn: function (aCollection){
  8671. var self=this;
  8672. smalltalk.send(aCollection, "_do_", [(function(each){return smalltalk.send(self, "_nextPut_", [each]);})]);
  8673. return self;},
  8674. args: ["aCollection"],
  8675. source: unescape('nextPutAll%3A%20aCollection%0A%09aCollection%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20self%20nextPut%3A%20each%5D'),
  8676. messageSends: ["do:", "nextPut:"],
  8677. referencedClasses: []
  8678. }),
  8679. smalltalk.Stream);
  8680. smalltalk.addMethod(
  8681. unescape('_peek'),
  8682. smalltalk.method({
  8683. selector: unescape('peek'),
  8684. category: 'reading',
  8685. fn: function (){
  8686. var self=this;
  8687. 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)]))]);})]));
  8688. return self;},
  8689. args: [],
  8690. 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'),
  8691. messageSends: ["ifFalse:", "atEnd", "at:", "collection", unescape("+"), "position"],
  8692. referencedClasses: []
  8693. }),
  8694. smalltalk.Stream);
  8695. smalltalk.addMethod(
  8696. unescape('_atEnd'),
  8697. smalltalk.method({
  8698. selector: unescape('atEnd'),
  8699. category: 'testing',
  8700. fn: function (){
  8701. var self=this;
  8702. return smalltalk.send(smalltalk.send(self, "_position", []), "__eq", [smalltalk.send(self, "_size", [])]);
  8703. return self;},
  8704. args: [],
  8705. source: unescape('atEnd%0A%09%5Eself%20position%20%3D%20self%20size'),
  8706. messageSends: [unescape("%3D"), "position", "size"],
  8707. referencedClasses: []
  8708. }),
  8709. smalltalk.Stream);
  8710. smalltalk.addMethod(
  8711. unescape('_atStart'),
  8712. smalltalk.method({
  8713. selector: unescape('atStart'),
  8714. category: 'testing',
  8715. fn: function (){
  8716. var self=this;
  8717. return smalltalk.send(smalltalk.send(self, "_position", []), "__eq", [(0)]);
  8718. return self;},
  8719. args: [],
  8720. source: unescape('atStart%0A%09%5Eself%20position%20%3D%200'),
  8721. messageSends: [unescape("%3D"), "position"],
  8722. referencedClasses: []
  8723. }),
  8724. smalltalk.Stream);
  8725. smalltalk.addMethod(
  8726. unescape('_isEmpty'),
  8727. smalltalk.method({
  8728. selector: unescape('isEmpty'),
  8729. category: 'testing',
  8730. fn: function (){
  8731. var self=this;
  8732. return smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [(0)]);
  8733. return self;},
  8734. args: [],
  8735. source: unescape('isEmpty%0A%09%5Eself%20size%20%3D%200'),
  8736. messageSends: [unescape("%3D"), "size"],
  8737. referencedClasses: []
  8738. }),
  8739. smalltalk.Stream);
  8740. smalltalk.addMethod(
  8741. unescape('_on_'),
  8742. smalltalk.method({
  8743. selector: unescape('on%3A'),
  8744. category: 'instance creation',
  8745. fn: function (aCollection){
  8746. var self=this;
  8747. 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", []));
  8748. return self;},
  8749. args: ["aCollection"],
  8750. 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'),
  8751. messageSends: ["setCollection:", "setStreamSize:", "size", "yourself", "new"],
  8752. referencedClasses: []
  8753. }),
  8754. smalltalk.Stream.klass);
  8755. smalltalk.addClass('StringStream', smalltalk.Stream, [], 'Kernel-Collections');
  8756. smalltalk.addMethod(
  8757. unescape('_next_'),
  8758. smalltalk.method({
  8759. selector: unescape('next%3A'),
  8760. category: 'reading',
  8761. fn: function (anInteger){
  8762. var self=this;
  8763. var tempCollection=nil;
  8764. (tempCollection=smalltalk.send(smalltalk.send(smalltalk.send(self, "_collection", []), "_class", []), "_new", []));
  8765. 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", [])]));})]));})]);
  8766. return tempCollection;
  8767. return self;},
  8768. args: ["anInteger"],
  8769. 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'),
  8770. messageSends: ["new", "class", "collection", "timesRepeat:", "ifFalse:", "atEnd", unescape("%2C"), "next"],
  8771. referencedClasses: []
  8772. }),
  8773. smalltalk.StringStream);
  8774. smalltalk.addMethod(
  8775. unescape('_nextPut_'),
  8776. smalltalk.method({
  8777. selector: unescape('nextPut%3A'),
  8778. category: 'writing',
  8779. fn: function (aString){
  8780. var self=this;
  8781. smalltalk.send(self, "_nextPutAll_", [aString]);
  8782. return self;},
  8783. args: ["aString"],
  8784. source: unescape('nextPut%3A%20aString%0A%09self%20nextPutAll%3A%20aString'),
  8785. messageSends: ["nextPutAll:"],
  8786. referencedClasses: []
  8787. }),
  8788. smalltalk.StringStream);
  8789. smalltalk.addMethod(
  8790. unescape('_nextPutAll_'),
  8791. smalltalk.method({
  8792. selector: unescape('nextPutAll%3A'),
  8793. category: 'writing',
  8794. fn: function (aString){
  8795. var self=this;
  8796. 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", [])])])]);
  8797. 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", [])]))]);
  8798. smalltalk.send(self, "_setStreamSize_", [smalltalk.send(smalltalk.send(self, "_streamSize", []), "_max_", [smalltalk.send(self, "_position", [])])]);
  8799. return self;},
  8800. args: ["aString"],
  8801. 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'),
  8802. messageSends: ["setCollection:", unescape("%2C"), "copyFrom:to:", "collection", "position", unescape("+"), "size", "position:", "setStreamSize:", "max:", "streamSize"],
  8803. referencedClasses: []
  8804. }),
  8805. smalltalk.StringStream);
  8806. smalltalk.addMethod(
  8807. unescape('_cr'),
  8808. smalltalk.method({
  8809. selector: unescape('cr'),
  8810. category: 'writing',
  8811. fn: function (){
  8812. var self=this;
  8813. return smalltalk.send(self, "_nextPutAll_", [smalltalk.send((smalltalk.String || String), "_cr", [])]);
  8814. return self;},
  8815. args: [],
  8816. source: unescape('cr%0A%09%5Eself%20nextPutAll%3A%20String%20cr'),
  8817. messageSends: ["nextPutAll:", "cr"],
  8818. referencedClasses: ["String"]
  8819. }),
  8820. smalltalk.StringStream);
  8821. smalltalk.addMethod(
  8822. unescape('_crlf'),
  8823. smalltalk.method({
  8824. selector: unescape('crlf'),
  8825. category: 'writing',
  8826. fn: function (){
  8827. var self=this;
  8828. return smalltalk.send(self, "_nextPutAll_", [smalltalk.send((smalltalk.String || String), "_crlf", [])]);
  8829. return self;},
  8830. args: [],
  8831. source: unescape('crlf%0A%09%5Eself%20nextPutAll%3A%20String%20crlf'),
  8832. messageSends: ["nextPutAll:", "crlf"],
  8833. referencedClasses: ["String"]
  8834. }),
  8835. smalltalk.StringStream);
  8836. smalltalk.addMethod(
  8837. unescape('_lf'),
  8838. smalltalk.method({
  8839. selector: unescape('lf'),
  8840. category: 'writing',
  8841. fn: function (){
  8842. var self=this;
  8843. return smalltalk.send(self, "_nextPutAll_", [smalltalk.send((smalltalk.String || String), "_lf", [])]);
  8844. return self;},
  8845. args: [],
  8846. source: unescape('lf%0A%09%5Eself%20nextPutAll%3A%20String%20lf'),
  8847. messageSends: ["nextPutAll:", "lf"],
  8848. referencedClasses: ["String"]
  8849. }),
  8850. smalltalk.StringStream);
  8851. smalltalk.addMethod(
  8852. unescape('_space'),
  8853. smalltalk.method({
  8854. selector: unescape('space'),
  8855. category: 'writing',
  8856. fn: function (){
  8857. var self=this;
  8858. smalltalk.send(self, "_nextPut_", [" "]);
  8859. return self;},
  8860. args: [],
  8861. source: unescape('space%0A%09self%20nextPut%3A%20%27%20%27'),
  8862. messageSends: ["nextPut:"],
  8863. referencedClasses: []
  8864. }),
  8865. smalltalk.StringStream);
  8866. smalltalk.addClass('Set', smalltalk.Collection, ['elements'], 'Kernel-Collections');
  8867. smalltalk.addMethod(
  8868. unescape('_add_'),
  8869. smalltalk.method({
  8870. selector: unescape('add%3A'),
  8871. category: 'adding/removing',
  8872. fn: function (anObject){
  8873. var self=this;
  8874. var found;
  8875. for(var i in self['@elements']) {
  8876. if(anObject == self['@elements'][i]) {
  8877. found = true;
  8878. break;
  8879. }
  8880. }
  8881. if(!found) {self['@elements'].push(anObject)}
  8882. ;
  8883. return self;},
  8884. args: ["anObject"],
  8885. source: unescape('add%3A%20anObject%0A%09%3C%0A%09%09var%20found%3B%0A%09%09for%28var%20i%20in%20self%5B%27@elements%27%5D%29%20%7B%0A%09%09%09if%28anObject%20%3D%3D%20self%5B%27@elements%27%5D%5Bi%5D%29%20%7B%0A%09%09%09%09found%20%3D%20true%3B%0A%09%09%09%09break%3B%0A%09%09%09%7D%0A%09%09%7D%0A%09%09if%28%21found%29%20%7Bself%5B%27@elements%27%5D.push%28anObject%29%7D%0A%09%3E'),
  8886. messageSends: [],
  8887. referencedClasses: []
  8888. }),
  8889. smalltalk.Set);
  8890. smalltalk.addMethod(
  8891. unescape('_remove_'),
  8892. smalltalk.method({
  8893. selector: unescape('remove%3A'),
  8894. category: 'adding/removing',
  8895. fn: function (anObject){
  8896. var self=this;
  8897. smalltalk.send(self['@elements'], "_remove_", [anObject]);
  8898. return self;},
  8899. args: ["anObject"],
  8900. source: unescape('remove%3A%20anObject%0A%09elements%20remove%3A%20anObject'),
  8901. messageSends: ["remove:"],
  8902. referencedClasses: []
  8903. }),
  8904. smalltalk.Set);
  8905. smalltalk.addMethod(
  8906. unescape('_initialize'),
  8907. smalltalk.method({
  8908. selector: unescape('initialize'),
  8909. category: 'initialization',
  8910. fn: function (){
  8911. var self=this;
  8912. smalltalk.send(self, "_initialize", [], smalltalk.Collection);
  8913. (self['@elements']=[]);
  8914. return self;},
  8915. args: [],
  8916. source: unescape('initialize%0A%09super%20initialize.%0A%09elements%20%3A%3D%20%23%28%29'),
  8917. messageSends: ["initialize"],
  8918. referencedClasses: []
  8919. }),
  8920. smalltalk.Set);
  8921. smalltalk.addMethod(
  8922. unescape('_size'),
  8923. smalltalk.method({
  8924. selector: unescape('size'),
  8925. category: 'accessing',
  8926. fn: function (){
  8927. var self=this;
  8928. return smalltalk.send(self['@elements'], "_size", []);
  8929. return self;},
  8930. args: [],
  8931. source: unescape('size%0A%09%5Eelements%20size'),
  8932. messageSends: ["size"],
  8933. referencedClasses: []
  8934. }),
  8935. smalltalk.Set);
  8936. smalltalk.addMethod(
  8937. unescape('_asArray'),
  8938. smalltalk.method({
  8939. selector: unescape('asArray'),
  8940. category: 'converting',
  8941. fn: function (){
  8942. var self=this;
  8943. return smalltalk.send(self['@elements'], "_copy", []);
  8944. return self;},
  8945. args: [],
  8946. source: unescape('asArray%0A%09%5Eelements%20copy'),
  8947. messageSends: ["copy"],
  8948. referencedClasses: []
  8949. }),
  8950. smalltalk.Set);
  8951. smalltalk.addMethod(
  8952. unescape('_detect_ifNone_'),
  8953. smalltalk.method({
  8954. selector: unescape('detect%3AifNone%3A'),
  8955. category: 'enumerating',
  8956. fn: function (aBlock, anotherBlock){
  8957. var self=this;
  8958. return smalltalk.send(self['@elements'], "_detect_ifNone_", [aBlock, anotherBlock]);
  8959. return self;},
  8960. args: ["aBlock", "anotherBlock"],
  8961. source: unescape('detect%3A%20aBlock%20ifNone%3A%20anotherBlock%0A%09%5Eelements%20detect%3A%20aBlock%20ifNone%3A%20anotherBlock'),
  8962. messageSends: ["detect:ifNone:"],
  8963. referencedClasses: []
  8964. }),
  8965. smalltalk.Set);
  8966. smalltalk.addMethod(
  8967. unescape('_do_'),
  8968. smalltalk.method({
  8969. selector: unescape('do%3A'),
  8970. category: 'enumerating',
  8971. fn: function (aBlock){
  8972. var self=this;
  8973. smalltalk.send(self['@elements'], "_do_", [aBlock]);
  8974. return self;},
  8975. args: ["aBlock"],
  8976. source: unescape('do%3A%20aBlock%0A%09elements%20do%3A%20aBlock'),
  8977. messageSends: ["do:"],
  8978. referencedClasses: []
  8979. }),
  8980. smalltalk.Set);
  8981. smalltalk.addMethod(
  8982. unescape('_includes_'),
  8983. smalltalk.method({
  8984. selector: unescape('includes%3A'),
  8985. category: 'testing',
  8986. fn: function (anObject){
  8987. var self=this;
  8988. return smalltalk.send(self['@elements'], "_includes_", [anObject]);
  8989. return self;},
  8990. args: ["anObject"],
  8991. source: unescape('includes%3A%20anObject%0A%09%5Eelements%20includes%3A%20anObject'),
  8992. messageSends: ["includes:"],
  8993. referencedClasses: []
  8994. }),
  8995. smalltalk.Set);
  8996. smalltalk.addMethod(
  8997. unescape('__eq'),
  8998. smalltalk.method({
  8999. selector: unescape('%3D'),
  9000. category: 'comparing',
  9001. fn: function (aCollection){
  9002. var self=this;
  9003. return smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [smalltalk.send(aCollection, "_class", [])]), "_and_", [(function(){return smalltalk.send(self['@elements'], "__eq", [smalltalk.send(aCollection, "_asArray", [])]);})]);
  9004. return self;},
  9005. args: ["aCollection"],
  9006. source: unescape('%3D%20aCollection%0A%09%5Eself%20class%20%3D%20aCollection%20class%20and%3A%20%5B%0A%09%09elements%20%3D%20aCollection%20asArray%5D'),
  9007. messageSends: ["and:", unescape("%3D"), "class", "asArray"],
  9008. referencedClasses: []
  9009. }),
  9010. smalltalk.Set);
  9011. smalltalk.addMethod(
  9012. unescape('_select_'),
  9013. smalltalk.method({
  9014. selector: unescape('select%3A'),
  9015. category: 'enumerating',
  9016. fn: function (aBlock){
  9017. var self=this;
  9018. var collection=nil;
  9019. (collection=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []));
  9020. smalltalk.send(self, "_do_", [(function(each){return ((($receiver = smalltalk.send(aBlock, "_value_", [each])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(collection, "_add_", [each]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(collection, "_add_", [each]);})]));})]);
  9021. return collection;
  9022. return self;},
  9023. args: ["aBlock"],
  9024. source: unescape('select%3A%20aBlock%0A%09%7C%20collection%20%7C%0A%09collection%20%3A%3D%20self%20class%20new.%20%0A%09self%20do%3A%20%5B%3Aeach%20%7C%0A%09%09%28aBlock%20value%3A%20each%29%20ifTrue%3A%20%5B%0A%09%09%09collection%20add%3A%20each%5D%5D.%0A%09%5Ecollection'),
  9025. messageSends: ["new", "class", "do:", "ifTrue:", "value:", "add:"],
  9026. referencedClasses: []
  9027. }),
  9028. smalltalk.Set);
  9029. smalltalk.addClass('HashedCollection', smalltalk.Collection, [], 'Kernel-Collections');
  9030. smalltalk.HashedCollection.comment=unescape('A%20HashedCollection%20is%20a%20traditional%20JavaScript%20object%2C%20or%20a%20Smalltalk%20Dictionary.%0A%0AUnlike%20a%20Dictionary%2C%20it%20can%20only%20have%20strings%20as%20keys.')
  9031. smalltalk.addMethod(
  9032. unescape('_size'),
  9033. smalltalk.method({
  9034. selector: unescape('size'),
  9035. category: 'accessing',
  9036. fn: function (){
  9037. var self=this;
  9038. return smalltalk.send(smalltalk.send(self, "_keys", []), "_size", []);
  9039. return self;},
  9040. args: [],
  9041. source: unescape('size%0A%09%5Eself%20keys%20size'),
  9042. messageSends: ["size", "keys"],
  9043. referencedClasses: []
  9044. }),
  9045. smalltalk.HashedCollection);
  9046. smalltalk.addMethod(
  9047. unescape('_associations'),
  9048. smalltalk.method({
  9049. selector: unescape('associations'),
  9050. category: 'accessing',
  9051. fn: function (){
  9052. var self=this;
  9053. var associations=nil;
  9054. (associations=[]);
  9055. smalltalk.send(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])])]);})]);
  9056. return associations;
  9057. return self;},
  9058. args: [],
  9059. source: unescape('associations%0A%09%7C%20associations%20%7C%0A%09associations%20%3A%3D%20%23%28%29.%0A%09self%20keys%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'),
  9060. messageSends: ["do:", "keys", "add:", "key:value:", "at:"],
  9061. referencedClasses: ["Association"]
  9062. }),
  9063. smalltalk.HashedCollection);
  9064. smalltalk.addMethod(
  9065. unescape('_keys'),
  9066. smalltalk.method({
  9067. selector: unescape('keys'),
  9068. category: 'accessing',
  9069. fn: function (){
  9070. var self=this;
  9071. var keys = [];
  9072. for(var i in self) {
  9073. if(self.hasOwnProperty(i)) {
  9074. keys.push(i);
  9075. }
  9076. };
  9077. return keys;
  9078. ;
  9079. return self;},
  9080. args: [],
  9081. source: unescape('keys%0A%09%3C%0A%09%09var%20keys%20%3D%20%5B%5D%3B%0A%09%09for%28var%20i%20in%20self%29%20%7B%0A%09%09%09if%28self.hasOwnProperty%28i%29%29%20%7B%0A%09%09%09%09keys.push%28i%29%3B%0A%09%09%09%7D%0A%09%09%7D%3B%0A%09%09return%20keys%3B%0A%09%3E'),
  9082. messageSends: [],
  9083. referencedClasses: []
  9084. }),
  9085. smalltalk.HashedCollection);
  9086. smalltalk.addMethod(
  9087. unescape('_values'),
  9088. smalltalk.method({
  9089. selector: unescape('values'),
  9090. category: 'accessing',
  9091. fn: function (){
  9092. var self=this;
  9093. return smalltalk.send(smalltalk.send(self, "_keys", []), "_collect_", [(function(each){return smalltalk.send(self, "_at_", [each]);})]);
  9094. return self;},
  9095. args: [],
  9096. source: unescape('values%0A%09%5Eself%20keys%20collect%3A%20%5B%3Aeach%20%7C%20self%20at%3A%20each%5D'),
  9097. messageSends: ["collect:", "keys", "at:"],
  9098. referencedClasses: []
  9099. }),
  9100. smalltalk.HashedCollection);
  9101. smalltalk.addMethod(
  9102. unescape('_at_put_'),
  9103. smalltalk.method({
  9104. selector: unescape('at%3Aput%3A'),
  9105. category: 'accessing',
  9106. fn: function (aKey, aValue){
  9107. var self=this;
  9108. return smalltalk.send(self, "_basicAt_put_", [aKey, aValue]);
  9109. return self;},
  9110. args: ["aKey", "aValue"],
  9111. source: unescape('at%3A%20aKey%20put%3A%20aValue%0A%09%5Eself%20basicAt%3A%20aKey%20put%3A%20aValue'),
  9112. messageSends: ["basicAt:put:"],
  9113. referencedClasses: []
  9114. }),
  9115. smalltalk.HashedCollection);
  9116. smalltalk.addMethod(
  9117. unescape('_at_ifAbsent_'),
  9118. smalltalk.method({
  9119. selector: unescape('at%3AifAbsent%3A'),
  9120. category: 'accessing',
  9121. fn: function (aKey, aBlock){
  9122. var self=this;
  9123. return smalltalk.send(smalltalk.send(self, "_includesKey_", [aKey]), "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_basicAt_", [aKey]);}), aBlock]);
  9124. return self;},
  9125. args: ["aKey", "aBlock"],
  9126. source: unescape('at%3A%20aKey%20ifAbsent%3A%20aBlock%0A%09%5E%28self%20includesKey%3A%20aKey%29%0A%09%09ifTrue%3A%20%5Bself%20basicAt%3A%20aKey%5D%0A%09%09ifFalse%3A%20aBlock'),
  9127. messageSends: ["ifTrue:ifFalse:", "includesKey:", "basicAt:"],
  9128. referencedClasses: []
  9129. }),
  9130. smalltalk.HashedCollection);
  9131. smalltalk.addMethod(
  9132. unescape('_at_ifAbsentPut_'),
  9133. smalltalk.method({
  9134. selector: unescape('at%3AifAbsentPut%3A'),
  9135. category: 'accessing',
  9136. fn: function (aKey, aBlock){
  9137. var self=this;
  9138. return smalltalk.send(self, "_at_ifAbsent_", [aKey, (function(){return smalltalk.send(self, "_at_put_", [aKey, smalltalk.send(aBlock, "_value", [])]);})]);
  9139. return self;},
  9140. args: ["aKey", "aBlock"],
  9141. source: unescape('at%3A%20aKey%20ifAbsentPut%3A%20aBlock%0A%09%5Eself%20at%3A%20aKey%20ifAbsent%3A%20%5B%0A%09%20%20%20%20self%20at%3A%20aKey%20put%3A%20aBlock%20value%5D'),
  9142. messageSends: ["at:ifAbsent:", "at:put:", "value"],
  9143. referencedClasses: []
  9144. }),
  9145. smalltalk.HashedCollection);
  9146. smalltalk.addMethod(
  9147. unescape('_at_ifPresent_'),
  9148. smalltalk.method({
  9149. selector: unescape('at%3AifPresent%3A'),
  9150. category: 'accessing',
  9151. fn: function (aKey, aBlock){
  9152. var self=this;
  9153. return (($receiver = smalltalk.send(self, "_basicAt_", [aKey])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_at_", [aKey])]);})() : nil;
  9154. return self;},
  9155. args: ["aKey", "aBlock"],
  9156. 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'),
  9157. messageSends: ["ifNotNil:", "basicAt:", "value:", "at:"],
  9158. referencedClasses: []
  9159. }),
  9160. smalltalk.HashedCollection);
  9161. smalltalk.addMethod(
  9162. unescape('_at_ifPresent_ifAbsent_'),
  9163. smalltalk.method({
  9164. selector: unescape('at%3AifPresent%3AifAbsent%3A'),
  9165. category: 'accessing',
  9166. fn: function (aKey, aBlock, anotherBlock){
  9167. var self=this;
  9168. return smalltalk.send(smalltalk.send(self, "_basicAt_", [aKey]), "_ifNil_ifNotNil_", [anotherBlock, (function(){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_at_", [aKey])]);})]);
  9169. return self;},
  9170. args: ["aKey", "aBlock", "anotherBlock"],
  9171. 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'),
  9172. messageSends: ["ifNil:ifNotNil:", "basicAt:", "value:", "at:"],
  9173. referencedClasses: []
  9174. }),
  9175. smalltalk.HashedCollection);
  9176. smalltalk.addMethod(
  9177. unescape('_at_'),
  9178. smalltalk.method({
  9179. selector: unescape('at%3A'),
  9180. category: 'accessing',
  9181. fn: function (aKey){
  9182. var self=this;
  9183. return smalltalk.send(self, "_at_ifAbsent_", [aKey, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
  9184. return self;},
  9185. args: ["aKey"],
  9186. source: unescape('at%3A%20aKey%0A%09%5Eself%20at%3A%20aKey%20ifAbsent%3A%20%5Bself%20errorNotFound%5D'),
  9187. messageSends: ["at:ifAbsent:", "errorNotFound"],
  9188. referencedClasses: []
  9189. }),
  9190. smalltalk.HashedCollection);
  9191. smalltalk.addMethod(
  9192. unescape('_add_'),
  9193. smalltalk.method({
  9194. selector: unescape('add%3A'),
  9195. category: 'adding/removing',
  9196. fn: function (anAssociation){
  9197. var self=this;
  9198. smalltalk.send(self, "_at_put_", [smalltalk.send(anAssociation, "_key", []), smalltalk.send(anAssociation, "_value", [])]);
  9199. return self;},
  9200. args: ["anAssociation"],
  9201. source: unescape('add%3A%20anAssociation%0A%09self%20at%3A%20anAssociation%20key%20put%3A%20anAssociation%20value'),
  9202. messageSends: ["at:put:", "key", "value"],
  9203. referencedClasses: []
  9204. }),
  9205. smalltalk.HashedCollection);
  9206. smalltalk.addMethod(
  9207. unescape('_addAll_'),
  9208. smalltalk.method({
  9209. selector: unescape('addAll%3A'),
  9210. category: 'adding/removing',
  9211. fn: function (aHashedCollection){
  9212. var self=this;
  9213. smalltalk.send(self, "_addAll_", [smalltalk.send(aHashedCollection, "_associations", [])], smalltalk.Collection);
  9214. return aHashedCollection;
  9215. return self;},
  9216. args: ["aHashedCollection"],
  9217. source: unescape('addAll%3A%20aHashedCollection%0A%09super%20addAll%3A%20aHashedCollection%20associations.%0A%09%5EaHashedCollection'),
  9218. messageSends: ["addAll:", "associations"],
  9219. referencedClasses: []
  9220. }),
  9221. smalltalk.HashedCollection);
  9222. smalltalk.addMethod(
  9223. unescape('_removeKey_'),
  9224. smalltalk.method({
  9225. selector: unescape('removeKey%3A'),
  9226. category: 'adding/removing',
  9227. fn: function (aKey){
  9228. var self=this;
  9229. smalltalk.send(self, "_remove_", [aKey]);
  9230. return self;},
  9231. args: ["aKey"],
  9232. source: unescape('removeKey%3A%20aKey%0A%20%20%20%20self%20remove%3A%20aKey'),
  9233. messageSends: ["remove:"],
  9234. referencedClasses: []
  9235. }),
  9236. smalltalk.HashedCollection);
  9237. smalltalk.addMethod(
  9238. unescape('_remove_ifAbsent_'),
  9239. smalltalk.method({
  9240. selector: unescape('remove%3AifAbsent%3A'),
  9241. category: 'adding/removing',
  9242. fn: function (aKey, aBlock){
  9243. var self=this;
  9244. return smalltalk.send(self, "_removeKey_ifAbsent_", [aKey, aBlock]);
  9245. return self;},
  9246. args: ["aKey", "aBlock"],
  9247. source: unescape('remove%3A%20aKey%20ifAbsent%3A%20aBlock%0A%20%20%20%20%5Eself%20removeKey%3A%20aKey%20ifAbsent%3A%20aBlock'),
  9248. messageSends: ["removeKey:ifAbsent:"],
  9249. referencedClasses: []
  9250. }),
  9251. smalltalk.HashedCollection);
  9252. smalltalk.addMethod(
  9253. unescape('_removeKey_ifAbsent_'),
  9254. smalltalk.method({
  9255. selector: unescape('removeKey%3AifAbsent%3A'),
  9256. category: 'adding/removing',
  9257. fn: function (aKey, aBlock){
  9258. var self=this;
  9259. return ((($receiver = smalltalk.send(self, "_includesKey_", [aKey])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(aBlock, "_value", []);})() : (function(){return smalltalk.send(self, "_basicDelete_", [aKey]);})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){return smalltalk.send(aBlock, "_value", []);}), (function(){return smalltalk.send(self, "_basicDelete_", [aKey]);})]));
  9260. return self;},
  9261. args: ["aKey", "aBlock"],
  9262. source: unescape('removeKey%3A%20aKey%20ifAbsent%3A%20aBlock%0A%09%5E%28self%20includesKey%3A%20aKey%29%20%0A%09%09ifFalse%3A%20%5BaBlock%20value%5D%0A%09%09ifTrue%3A%20%5Bself%20basicDelete%3A%20aKey%5D'),
  9263. messageSends: ["ifFalse:ifTrue:", "includesKey:", "value", "basicDelete:"],
  9264. referencedClasses: []
  9265. }),
  9266. smalltalk.HashedCollection);
  9267. smalltalk.addMethod(
  9268. unescape('__eq'),
  9269. smalltalk.method({
  9270. selector: unescape('%3D'),
  9271. category: 'comparing',
  9272. fn: function (aHashedCollection){
  9273. var self=this;
  9274. try{((($receiver = smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [smalltalk.send(aHashedCollection, "_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}})})();})]));
  9275. ((($receiver = smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [smalltalk.send(aHashedCollection, "_size", [])])).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}})})();})]));
  9276. (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return smalltalk.send(smalltalk.send(self, "_associations", []), "__eq", [smalltalk.send(aHashedCollection, "_associations", [])])}})})();
  9277. return self;
  9278. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
  9279. args: ["aHashedCollection"],
  9280. source: unescape('%3D%20aHashedCollection%0A%09self%20class%20%3D%20aHashedCollection%20class%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09self%20size%20%3D%20aHashedCollection%20size%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09%5Eself%20associations%20%3D%20aHashedCollection%20associations'),
  9281. messageSends: ["ifFalse:", unescape("%3D"), "class", "size", "associations"],
  9282. referencedClasses: []
  9283. }),
  9284. smalltalk.HashedCollection);
  9285. smalltalk.addMethod(
  9286. unescape('_shallowCopy'),
  9287. smalltalk.method({
  9288. selector: unescape('shallowCopy'),
  9289. category: 'copying',
  9290. fn: function (){
  9291. var self=this;
  9292. var copy=nil;
  9293. (copy=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []));
  9294. smalltalk.send(self, "_associationsDo_", [(function(each){return smalltalk.send(copy, "_at_put_", [smalltalk.send(each, "_key", []), smalltalk.send(each, "_value", [])]);})]);
  9295. return copy;
  9296. return self;},
  9297. args: [],
  9298. 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'),
  9299. messageSends: ["new", "class", "associationsDo:", "at:put:", "key", "value"],
  9300. referencedClasses: []
  9301. }),
  9302. smalltalk.HashedCollection);
  9303. smalltalk.addMethod(
  9304. unescape('__comma'),
  9305. smalltalk.method({
  9306. selector: unescape('%2C'),
  9307. category: 'copying',
  9308. fn: function (aCollection){
  9309. var self=this;
  9310. smalltalk.send(self, "_shouldNotImplement", []);
  9311. return self;},
  9312. args: ["aCollection"],
  9313. source: unescape('%2C%20aCollection%0A%09self%20shouldNotImplement'),
  9314. messageSends: ["shouldNotImplement"],
  9315. referencedClasses: []
  9316. }),
  9317. smalltalk.HashedCollection);
  9318. smalltalk.addMethod(
  9319. unescape('_copyFrom_to_'),
  9320. smalltalk.method({
  9321. selector: unescape('copyFrom%3Ato%3A'),
  9322. category: 'copying',
  9323. fn: function (anIndex, anotherIndex){
  9324. var self=this;
  9325. smalltalk.send(self, "_shouldNotImplement", []);
  9326. return self;},
  9327. args: ["anIndex", "anotherIndex"],
  9328. source: unescape('copyFrom%3A%20anIndex%20to%3A%20anotherIndex%0A%09self%20shouldNotImplement'),
  9329. messageSends: ["shouldNotImplement"],
  9330. referencedClasses: []
  9331. }),
  9332. smalltalk.HashedCollection);
  9333. smalltalk.addMethod(
  9334. unescape('_deepCopy'),
  9335. smalltalk.method({
  9336. selector: unescape('deepCopy'),
  9337. category: 'copying',
  9338. fn: function (){
  9339. var self=this;
  9340. var copy=nil;
  9341. (copy=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []));
  9342. smalltalk.send(self, "_associationsDo_", [(function(each){return smalltalk.send(copy, "_at_put_", [smalltalk.send(each, "_key", []), smalltalk.send(smalltalk.send(each, "_value", []), "_deepCopy", [])]);})]);
  9343. return copy;
  9344. return self;},
  9345. args: [],
  9346. source: unescape('deepCopy%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%20deepCopy%5D.%0A%09%5Ecopy'),
  9347. messageSends: ["new", "class", "associationsDo:", "at:put:", "key", "deepCopy", "value"],
  9348. referencedClasses: []
  9349. }),
  9350. smalltalk.HashedCollection);
  9351. smalltalk.addMethod(
  9352. unescape('_associationsDo_'),
  9353. smalltalk.method({
  9354. selector: unescape('associationsDo%3A'),
  9355. category: 'enumerating',
  9356. fn: function (aBlock){
  9357. var self=this;
  9358. smalltalk.send(smalltalk.send(self, "_associations", []), "_do_", [aBlock]);
  9359. return self;},
  9360. args: ["aBlock"],
  9361. source: unescape('associationsDo%3A%20aBlock%0A%09self%20associations%20do%3A%20aBlock'),
  9362. messageSends: ["do:", "associations"],
  9363. referencedClasses: []
  9364. }),
  9365. smalltalk.HashedCollection);
  9366. smalltalk.addMethod(
  9367. unescape('_keysAndValuesDo_'),
  9368. smalltalk.method({
  9369. selector: unescape('keysAndValuesDo%3A'),
  9370. category: 'enumerating',
  9371. fn: function (aBlock){
  9372. var self=this;
  9373. smalltalk.send(self, "_associationsDo_", [(function(each){return smalltalk.send(aBlock, "_value_value_", [smalltalk.send(each, "_key", []), smalltalk.send(each, "_value", [])]);})]);
  9374. return self;},
  9375. args: ["aBlock"],
  9376. source: unescape('keysAndValuesDo%3A%20aBlock%0A%09self%20associationsDo%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20aBlock%20value%3A%20each%20key%20value%3A%20each%20value%5D'),
  9377. messageSends: ["associationsDo:", "value:value:", "key", "value"],
  9378. referencedClasses: []
  9379. }),
  9380. smalltalk.HashedCollection);
  9381. smalltalk.addMethod(
  9382. unescape('_do_'),
  9383. smalltalk.method({
  9384. selector: unescape('do%3A'),
  9385. category: 'enumerating',
  9386. fn: function (aBlock){
  9387. var self=this;
  9388. smalltalk.send(smalltalk.send(self, "_values", []), "_do_", [aBlock]);
  9389. return self;},
  9390. args: ["aBlock"],
  9391. source: unescape('do%3A%20aBlock%0A%09self%20values%20do%3A%20aBlock'),
  9392. messageSends: ["do:", "values"],
  9393. referencedClasses: []
  9394. }),
  9395. smalltalk.HashedCollection);
  9396. smalltalk.addMethod(
  9397. unescape('_select_'),
  9398. smalltalk.method({
  9399. selector: unescape('select%3A'),
  9400. category: 'enumerating',
  9401. fn: function (aBlock){
  9402. var self=this;
  9403. var newDict=nil;
  9404. (newDict=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []));
  9405. 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]);})]));})]);
  9406. return newDict;
  9407. return self;},
  9408. args: ["aBlock"],
  9409. source: unescape('select%3A%20aBlock%0A%09%7C%20newDict%20%7C%0A%09newDict%20%3A%3D%20self%20class%20new.%0A%09self%20keysAndValuesDo%3A%20%5B%3Akey%20%3Avalue%20%7C%0A%09%20%20%20%20%28aBlock%20value%3A%20value%29%20ifTrue%3A%20%5BnewDict%20at%3A%20key%20put%3A%20value%5D%5D.%0A%09%5EnewDict'),
  9410. messageSends: ["new", "class", "keysAndValuesDo:", "ifTrue:", "value:", "at:put:"],
  9411. referencedClasses: []
  9412. }),
  9413. smalltalk.HashedCollection);
  9414. smalltalk.addMethod(
  9415. unescape('_collect_'),
  9416. smalltalk.method({
  9417. selector: unescape('collect%3A'),
  9418. category: 'enumerating',
  9419. fn: function (aBlock){
  9420. var self=this;
  9421. var newDict=nil;
  9422. (newDict=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []));
  9423. smalltalk.send(self, "_keysAndValuesDo_", [(function(key, value){return smalltalk.send(newDict, "_at_put_", [key, smalltalk.send(aBlock, "_value_", [value])]);})]);
  9424. return newDict;
  9425. return self;},
  9426. args: ["aBlock"],
  9427. source: unescape('collect%3A%20aBlock%0A%09%7C%20newDict%20%7C%0A%09newDict%20%3A%3D%20self%20class%20new.%0A%09self%20keysAndValuesDo%3A%20%5B%3Akey%20%3Avalue%20%7C%0A%09%20%20%20%20newDict%20at%3A%20key%20put%3A%20%28aBlock%20value%3A%20value%29%5D.%0A%09%5EnewDict'),
  9428. messageSends: ["new", "class", "keysAndValuesDo:", "at:put:", "value:"],
  9429. referencedClasses: []
  9430. }),
  9431. smalltalk.HashedCollection);
  9432. smalltalk.addMethod(
  9433. unescape('_detect_ifNone_'),
  9434. smalltalk.method({
  9435. selector: unescape('detect%3AifNone%3A'),
  9436. category: 'enumerating',
  9437. fn: function (aBlock, anotherBlock){
  9438. var self=this;
  9439. return smalltalk.send(smalltalk.send(self, "_values", []), "_detect_ifNone_", [aBlock, anotherBlock]);
  9440. return self;},
  9441. args: ["aBlock", "anotherBlock"],
  9442. source: unescape('detect%3A%20aBlock%20ifNone%3A%20anotherBlock%0A%09%5Eself%20values%20detect%3A%20aBlock%20ifNone%3A%20anotherBlock'),
  9443. messageSends: ["detect:ifNone:", "values"],
  9444. referencedClasses: []
  9445. }),
  9446. smalltalk.HashedCollection);
  9447. smalltalk.addMethod(
  9448. unescape('_includes_'),
  9449. smalltalk.method({
  9450. selector: unescape('includes%3A'),
  9451. category: 'enumerating',
  9452. fn: function (anObject){
  9453. var self=this;
  9454. return smalltalk.send(smalltalk.send(self, "_values", []), "_includes_", [anObject]);
  9455. return self;},
  9456. args: ["anObject"],
  9457. source: unescape('includes%3A%20anObject%0A%09%5Eself%20values%20includes%3A%20anObject'),
  9458. messageSends: ["includes:", "values"],
  9459. referencedClasses: []
  9460. }),
  9461. smalltalk.HashedCollection);
  9462. smalltalk.addMethod(
  9463. unescape('_printString'),
  9464. smalltalk.method({
  9465. selector: unescape('printString'),
  9466. category: 'printing',
  9467. fn: function (){
  9468. var self=this;
  9469. 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")]);})]);
  9470. return self;},
  9471. args: [],
  9472. source: unescape('printString%0A%09%5EString%20streamContents%3A%20%5B%3AaStream%7C%20%20%0A%09%09aStream%20%0A%09%09%09nextPutAll%3A%20super%20printString%3B%0A%09%09%09nextPutAll%3A%20%27%28%27.%0A%09%09%09%09self%20associations%20%0A%09%09%09%09%09do%3A%20%5B%3AanAssociation%7C%20%20%0A%09%09%09%09%09%09aStream%20%0A%09%09%09%09%09%09%09nextPutAll%3A%20anAssociation%20key%20printString%3B%0A%09%09%09%09%09%09%09%09nextPutAll%3A%20%27%20-%3E%20%27%3B%0A%09%09%09%09%09%09%09%09nextPutAll%3A%20anAssociation%20value%20printString%5D%0A%09%09%09%09%09%09%09separatedBy%3A%20%5BaStream%20nextPutAll%3A%20%27%20%2C%20%27%5D.%0A%09%09%09%09%09%09aStream%20nextPutAll%3A%20%27%29%27%5D'),
  9473. messageSends: ["streamContents:", "nextPutAll:", "printString", "do:separatedBy:", "associations", "key", "value"],
  9474. referencedClasses: ["String"]
  9475. }),
  9476. smalltalk.HashedCollection);
  9477. smalltalk.addMethod(
  9478. unescape('_storeOn_'),
  9479. smalltalk.method({
  9480. selector: unescape('storeOn%3A'),
  9481. category: 'printing',
  9482. fn: function (aStream){
  9483. var self=this;
  9484. smalltalk.send(aStream, "_nextPutAll_", [unescape("%23%7B")]);
  9485. smalltalk.send(smalltalk.send(self, "_associations", []), "_do_separatedBy_", [(function(each){return smalltalk.send(each, "_storeOn_", [aStream]);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [". "]);})]);
  9486. smalltalk.send(aStream, "_nextPutAll_", [unescape("%7D")]);
  9487. return self;},
  9488. args: ["aStream"],
  9489. source: unescape('storeOn%3A%20aStream%0A%09aStream%20nextPutAll%3A%20%27%23%7B%27.%0A%09self%20associations%0A%09%09do%3A%20%5B%3Aeach%20%7C%20each%20storeOn%3A%20aStream%5D%0A%09%09separatedBy%3A%20%5B%20aStream%20nextPutAll%3A%20%27.%20%27%5D.%0A%09aStream%20nextPutAll%3A%20%27%7D%27'),
  9490. messageSends: ["nextPutAll:", "do:separatedBy:", "associations", "storeOn:"],
  9491. referencedClasses: []
  9492. }),
  9493. smalltalk.HashedCollection);
  9494. smalltalk.addMethod(
  9495. unescape('_includesKey_'),
  9496. smalltalk.method({
  9497. selector: unescape('includesKey%3A'),
  9498. category: 'testing',
  9499. fn: function (aKey){
  9500. var self=this;
  9501. return self.hasOwnProperty(aKey);
  9502. return self;},
  9503. args: ["aKey"],
  9504. source: unescape('includesKey%3A%20aKey%0A%09%3Creturn%20self.hasOwnProperty%28aKey%29%3E'),
  9505. messageSends: [],
  9506. referencedClasses: []
  9507. }),
  9508. smalltalk.HashedCollection);
  9509. smalltalk.addMethod(
  9510. unescape('_asDictionary'),
  9511. smalltalk.method({
  9512. selector: unescape('asDictionary'),
  9513. category: 'converting',
  9514. fn: function (){
  9515. var self=this;
  9516. return smalltalk.send((smalltalk.Dictionary || Dictionary), "_fromPairs_", [smalltalk.send(self, "_associations", [])]);
  9517. return self;},
  9518. args: [],
  9519. source: unescape('asDictionary%0A%09%5EDictionary%20fromPairs%3A%20self%20associations'),
  9520. messageSends: ["fromPairs:", "associations"],
  9521. referencedClasses: ["Dictionary"]
  9522. }),
  9523. smalltalk.HashedCollection);
  9524. smalltalk.addMethod(
  9525. unescape('_fromPairs_'),
  9526. smalltalk.method({
  9527. selector: unescape('fromPairs%3A'),
  9528. category: 'instance creation',
  9529. fn: function (aCollection){
  9530. var self=this;
  9531. var dict=nil;
  9532. (dict=smalltalk.send(self, "_new", []));
  9533. smalltalk.send(aCollection, "_do_", [(function(each){return smalltalk.send(dict, "_add_", [each]);})]);
  9534. return dict;
  9535. return self;},
  9536. args: ["aCollection"],
  9537. source: unescape('fromPairs%3A%20aCollection%0A%09%7C%20dict%20%7C%0A%09dict%20%3A%3D%20self%20new.%0A%09aCollection%20do%3A%20%5B%3Aeach%20%7C%20dict%20add%3A%20each%5D.%0A%09%5Edict'),
  9538. messageSends: ["new", "do:", "add:"],
  9539. referencedClasses: []
  9540. }),
  9541. smalltalk.HashedCollection.klass);
  9542. smalltalk.addClass('Dictionary', smalltalk.HashedCollection, ['keys', 'values'], 'Kernel-Collections');
  9543. smalltalk.addMethod(
  9544. unescape('_at_ifAbsent_'),
  9545. smalltalk.method({
  9546. selector: unescape('at%3AifAbsent%3A'),
  9547. category: 'accessing',
  9548. fn: function (aKey, aBlock){
  9549. var self=this;
  9550. var index;
  9551. for(var i=0;i<self['@keys'].length;i++){
  9552. if(self['@keys'][i].__eq(aKey)) {index = i;}
  9553. };
  9554. if(typeof index === 'undefined') {
  9555. return aBlock();
  9556. } else {
  9557. return self['@values'][index];
  9558. }
  9559. ;
  9560. return self;},
  9561. args: ["aKey", "aBlock"],
  9562. source: unescape('at%3A%20aKey%20ifAbsent%3A%20aBlock%0A%09%3C%0A%09%09var%20index%3B%0A%09%09for%28var%20i%3D0%3Bi%3Cself%5B%27@keys%27%5D.length%3Bi++%29%7B%0A%09%09%09if%28self%5B%27@keys%27%5D%5Bi%5D.__eq%28aKey%29%29%20%7Bindex%20%3D%20i%3B%7D%0A%09%09%7D%3B%0A%09%09if%28typeof%20index%20%3D%3D%3D%20%27undefined%27%29%20%7B%0A%09%09%09return%20aBlock%28%29%3B%0A%09%09%7D%20else%20%7B%0A%09%09%09return%20self%5B%27@values%27%5D%5Bindex%5D%3B%0A%09%09%7D%0A%09%3E'),
  9563. messageSends: [],
  9564. referencedClasses: []
  9565. }),
  9566. smalltalk.Dictionary);
  9567. smalltalk.addMethod(
  9568. unescape('_keys'),
  9569. smalltalk.method({
  9570. selector: unescape('keys'),
  9571. category: 'accessing',
  9572. fn: function (){
  9573. var self=this;
  9574. return smalltalk.send(self['@keys'], "_copy", []);
  9575. return self;},
  9576. args: [],
  9577. source: unescape('keys%0A%09%5Ekeys%20copy'),
  9578. messageSends: ["copy"],
  9579. referencedClasses: []
  9580. }),
  9581. smalltalk.Dictionary);
  9582. smalltalk.addMethod(
  9583. unescape('_values'),
  9584. smalltalk.method({
  9585. selector: unescape('values'),
  9586. category: 'accessing',
  9587. fn: function (){
  9588. var self=this;
  9589. return smalltalk.send(self['@values'], "_copy", []);
  9590. return self;},
  9591. args: [],
  9592. source: unescape('values%0A%09%5Evalues%20copy'),
  9593. messageSends: ["copy"],
  9594. referencedClasses: []
  9595. }),
  9596. smalltalk.Dictionary);
  9597. smalltalk.addMethod(
  9598. unescape('_at_put_'),
  9599. smalltalk.method({
  9600. selector: unescape('at%3Aput%3A'),
  9601. category: 'accessing',
  9602. fn: function (aKey, aValue){
  9603. var self=this;
  9604. var index = self['@keys'].indexOf(aKey);
  9605. if(index === -1) {
  9606. self['@values'].push(aValue);
  9607. self['@keys'].push(aKey);
  9608. } else {
  9609. self['@values'][index] = aValue;
  9610. };
  9611. return aValue;
  9612. ;
  9613. return self;},
  9614. args: ["aKey", "aValue"],
  9615. source: unescape('at%3A%20aKey%20put%3A%20aValue%0A%09%3C%0A%09%09var%20index%20%3D%20self%5B%27@keys%27%5D.indexOf%28aKey%29%3B%0A%09%09if%28index%20%3D%3D%3D%20-1%29%20%7B%0A%09%09%09self%5B%27@values%27%5D.push%28aValue%29%3B%0A%09%09%09self%5B%27@keys%27%5D.push%28aKey%29%3B%0A%09%09%7D%20else%20%7B%0A%09%09%09self%5B%27@values%27%5D%5Bindex%5D%20%3D%20aValue%3B%0A%09%09%7D%3B%0A%0A%09%09return%20aValue%3B%0A%09%3E'),
  9616. messageSends: [],
  9617. referencedClasses: []
  9618. }),
  9619. smalltalk.Dictionary);
  9620. smalltalk.addMethod(
  9621. unescape('_removeKey_ifAbsent_'),
  9622. smalltalk.method({
  9623. selector: unescape('removeKey%3AifAbsent%3A'),
  9624. category: 'adding/removing',
  9625. fn: function (aKey, aBlock){
  9626. var self=this;
  9627. var index = self['@keys'].indexOf(aKey);
  9628. if(index === -1) {
  9629. return aBlock()
  9630. } else {
  9631. self['@keys'].splice(i, 1);
  9632. self['@values'].splice(i, 1);
  9633. return aKey
  9634. };
  9635. ;
  9636. return self;},
  9637. args: ["aKey", "aBlock"],
  9638. source: unescape('removeKey%3A%20aKey%20ifAbsent%3A%20aBlock%0A%09%3C%0A%09%09var%20index%20%3D%20self%5B%27@keys%27%5D.indexOf%28aKey%29%3B%0A%09%09if%28index%20%3D%3D%3D%20-1%29%20%7B%0A%09%09%09return%20aBlock%28%29%0A%09%09%7D%20else%20%7B%0A%09%09%09self%5B%27@keys%27%5D.splice%28i%2C%201%29%3B%0A%09%09%09self%5B%27@values%27%5D.splice%28i%2C%201%29%3B%0A%09%09%09return%20aKey%0A%09%09%7D%3B%0A%09%3E'),
  9639. messageSends: [],
  9640. referencedClasses: []
  9641. }),
  9642. smalltalk.Dictionary);
  9643. smalltalk.addMethod(
  9644. unescape('_initialize'),
  9645. smalltalk.method({
  9646. selector: unescape('initialize'),
  9647. category: 'initialization',
  9648. fn: function (){
  9649. var self=this;
  9650. smalltalk.send(self, "_initialize", [], smalltalk.HashedCollection);
  9651. (self['@keys']=[]);
  9652. (self['@values']=[]);
  9653. return self;},
  9654. args: [],
  9655. source: unescape('initialize%0A%09super%20initialize.%0A%09keys%20%3A%3D%20%23%28%29.%0A%09values%20%3A%3D%20%23%28%29'),
  9656. messageSends: ["initialize"],
  9657. referencedClasses: []
  9658. }),
  9659. smalltalk.Dictionary);
  9660. smalltalk.addMethod(
  9661. unescape('_includesKey_'),
  9662. smalltalk.method({
  9663. selector: unescape('includesKey%3A'),
  9664. category: 'testing',
  9665. fn: function (aKey){
  9666. var self=this;
  9667. return smalltalk.send(self['@keys'], "_includes_", [aKey]);
  9668. return self;},
  9669. args: ["aKey"],
  9670. source: unescape('includesKey%3A%20aKey%0A%09%5Ekeys%20includes%3A%20aKey'),
  9671. messageSends: ["includes:"],
  9672. referencedClasses: []
  9673. }),
  9674. smalltalk.Dictionary);
  9675. smalltalk.addMethod(
  9676. unescape('_asHashedCollection'),
  9677. smalltalk.method({
  9678. selector: unescape('asHashedCollection'),
  9679. category: 'converting',
  9680. fn: function (){
  9681. var self=this;
  9682. return smalltalk.send((smalltalk.HashedCollection || HashedCollection), "_fromPairs_", [smalltalk.send(self, "_associations", [])]);
  9683. return self;},
  9684. args: [],
  9685. source: unescape('asHashedCollection%0A%09%5EHashedCollection%20fromPairs%3A%20self%20associations'),
  9686. messageSends: ["fromPairs:", "associations"],
  9687. referencedClasses: ["HashedCollection"]
  9688. }),
  9689. smalltalk.Dictionary);
  9690. smalltalk.addMethod(
  9691. unescape('_asJSONString'),
  9692. smalltalk.method({
  9693. selector: unescape('asJSONString'),
  9694. category: 'converting',
  9695. fn: function (){
  9696. var self=this;
  9697. return smalltalk.send(smalltalk.send(self, "_asHashedCollection", []), "_asJSONString", []);
  9698. return self;},
  9699. args: [],
  9700. source: unescape('asJSONString%0A%09%5Eself%20asHashedCollection%20asJSONString'),
  9701. messageSends: ["asJSONString", "asHashedCollection"],
  9702. referencedClasses: []
  9703. }),
  9704. smalltalk.Dictionary);
  9705. smalltalk.addClass('OrderedCollection', smalltalk.SequenceableCollection, ['elements'], 'Kernel-Collections');
  9706. smalltalk.addMethod(
  9707. unescape('_size'),
  9708. smalltalk.method({
  9709. selector: unescape('size'),
  9710. category: 'accessing',
  9711. fn: function (){
  9712. var self=this;
  9713. return smalltalk.send(self['@elements'], "_size", []);
  9714. return self;},
  9715. args: [],
  9716. source: unescape('size%0A%09%5Eelements%20size'),
  9717. messageSends: ["size"],
  9718. referencedClasses: []
  9719. }),
  9720. smalltalk.OrderedCollection);
  9721. smalltalk.addMethod(
  9722. unescape('_at_put_'),
  9723. smalltalk.method({
  9724. selector: unescape('at%3Aput%3A'),
  9725. category: 'accessing',
  9726. fn: function (anIndex, anObject){
  9727. var self=this;
  9728. return self['@elements'][anIndex - 1] = anObject;
  9729. return self;},
  9730. args: ["anIndex", "anObject"],
  9731. source: unescape('at%3A%20anIndex%20put%3A%20anObject%0A%09%3Creturn%20self%5B%27@elements%27%5D%5BanIndex%20-%201%5D%20%3D%20anObject%3E'),
  9732. messageSends: [],
  9733. referencedClasses: []
  9734. }),
  9735. smalltalk.OrderedCollection);
  9736. smalltalk.addMethod(
  9737. unescape('_at_ifAbsent_'),
  9738. smalltalk.method({
  9739. selector: unescape('at%3AifAbsent%3A'),
  9740. category: 'accessing',
  9741. fn: function (anIndex, aBlock){
  9742. var self=this;
  9743. return smalltalk.send(self['@elements'], "_at_ifAbsent_", [anIndex, aBlock]);
  9744. return self;},
  9745. args: ["anIndex", "aBlock"],
  9746. source: unescape('at%3A%20anIndex%20ifAbsent%3A%20aBlock%0A%09%5Eelements%20at%3A%20anIndex%20ifAbsent%3A%20aBlock'),
  9747. messageSends: ["at:ifAbsent:"],
  9748. referencedClasses: []
  9749. }),
  9750. smalltalk.OrderedCollection);
  9751. smalltalk.addMethod(
  9752. unescape('_add_'),
  9753. smalltalk.method({
  9754. selector: unescape('add%3A'),
  9755. category: 'adding/removing',
  9756. fn: function (anObject){
  9757. var self=this;
  9758. self['@elements'].push(anObject); return anObject;;
  9759. return self;},
  9760. args: ["anObject"],
  9761. source: unescape('add%3A%20anObject%0A%09%3Cself%5B%27@elements%27%5D.push%28anObject%29%3B%20return%20anObject%3B%3E'),
  9762. messageSends: [],
  9763. referencedClasses: []
  9764. }),
  9765. smalltalk.OrderedCollection);
  9766. smalltalk.addMethod(
  9767. unescape('_join_'),
  9768. smalltalk.method({
  9769. selector: unescape('join%3A'),
  9770. category: 'enumerating',
  9771. fn: function (aString){
  9772. var self=this;
  9773. return smalltalk.send(self['@elements'], "_join_", [aString]);
  9774. return self;},
  9775. args: ["aString"],
  9776. source: unescape('join%3A%20aString%0A%09%5Eelements%20join%3A%20aString'),
  9777. messageSends: ["join:"],
  9778. referencedClasses: []
  9779. }),
  9780. smalltalk.OrderedCollection);
  9781. smalltalk.addMethod(
  9782. unescape('_sort'),
  9783. smalltalk.method({
  9784. selector: unescape('sort'),
  9785. category: 'enumerating',
  9786. fn: function (){
  9787. var self=this;
  9788. smalltalk.send(self['@elements'], "_sort", []);
  9789. return self;
  9790. return self;},
  9791. args: [],
  9792. source: unescape('sort%0A%20%09elements%20sort.%0A%09%5Eself'),
  9793. messageSends: ["sort"],
  9794. referencedClasses: []
  9795. }),
  9796. smalltalk.OrderedCollection);
  9797. smalltalk.addMethod(
  9798. unescape('_sort_'),
  9799. smalltalk.method({
  9800. selector: unescape('sort%3A'),
  9801. category: 'enumerating',
  9802. fn: function (aBlock){
  9803. var self=this;
  9804. smalltalk.send(self['@elements'], "_sort_", [aBlock]);
  9805. return self;
  9806. return self;},
  9807. args: ["aBlock"],
  9808. source: unescape('sort%3A%20aBlock%0A%09elements%20sort%3A%20aBlock.%0A%09%5Eself'),
  9809. messageSends: ["sort:"],
  9810. referencedClasses: []
  9811. }),
  9812. smalltalk.OrderedCollection);
  9813. smalltalk.addMethod(
  9814. unescape('_remove_'),
  9815. smalltalk.method({
  9816. selector: unescape('remove%3A'),
  9817. category: 'adding/removing',
  9818. fn: function (anObject){
  9819. var self=this;
  9820. for(var i=0;i<self['@elements'].length;i++) {
  9821. if(self['@elements'][i] == anObject) {
  9822. self['@elements'].splice(i,1);
  9823. break;
  9824. }
  9825. }
  9826. ;
  9827. return self;},
  9828. args: ["anObject"],
  9829. source: unescape('remove%3A%20anObject%0A%09%3C%0A%09%09for%28var%20i%3D0%3Bi%3Cself%5B%27@elements%27%5D.length%3Bi++%29%20%7B%0A%09%09%09if%28self%5B%27@elements%27%5D%5Bi%5D%20%3D%3D%20anObject%29%20%7B%0A%09%09%09%09self%5B%27@elements%27%5D.splice%28i%2C1%29%3B%0A%09%09%09%09break%3B%0A%09%09%09%7D%0A%09%09%7D%0A%09%3E'),
  9830. messageSends: [],
  9831. referencedClasses: []
  9832. }),
  9833. smalltalk.OrderedCollection);
  9834. smalltalk.addMethod(
  9835. unescape('_sorted'),
  9836. smalltalk.method({
  9837. selector: unescape('sorted'),
  9838. category: 'enumerating',
  9839. fn: function (){
  9840. var self=this;
  9841. return smalltalk.send(smalltalk.send(self, "_copy", []), "_sort", []);
  9842. return self;},
  9843. args: [],
  9844. source: unescape('sorted%0A%09%5Eself%20copy%20sort'),
  9845. messageSends: ["sort", "copy"],
  9846. referencedClasses: []
  9847. }),
  9848. smalltalk.OrderedCollection);
  9849. smalltalk.addMethod(
  9850. unescape('_sorted_'),
  9851. smalltalk.method({
  9852. selector: unescape('sorted%3A'),
  9853. category: 'enumerating',
  9854. fn: function (aBlock){
  9855. var self=this;
  9856. return smalltalk.send(smalltalk.send(self, "_copy", []), "_sort_", [aBlock]);
  9857. return self;},
  9858. args: ["aBlock"],
  9859. source: unescape('sorted%3A%20aBlock%0A%09%5Eself%20copy%20sort%3A%20aBlock'),
  9860. messageSends: ["sort:", "copy"],
  9861. referencedClasses: []
  9862. }),
  9863. smalltalk.OrderedCollection);
  9864. smalltalk.addMethod(
  9865. unescape('_removeFrom_to_'),
  9866. smalltalk.method({
  9867. selector: unescape('removeFrom%3Ato%3A'),
  9868. category: 'adding/removing',
  9869. fn: function (aNumber, anotherNumber){
  9870. var self=this;
  9871. self['@elements'].splice(aNumber - 1,anotherNumber - 1);
  9872. return self;},
  9873. args: ["aNumber", "anotherNumber"],
  9874. source: unescape('removeFrom%3A%20aNumber%20to%3A%20anotherNumber%0A%09%3Cself%5B%27@elements%27%5D.splice%28aNumber%20-%201%2CanotherNumber%20-%201%29%3E'),
  9875. messageSends: [],
  9876. referencedClasses: []
  9877. }),
  9878. smalltalk.OrderedCollection);
  9879. smalltalk.addMethod(
  9880. unescape('_reversed'),
  9881. smalltalk.method({
  9882. selector: unescape('reversed'),
  9883. category: 'converting',
  9884. fn: function (){
  9885. var self=this;
  9886. return smalltalk.send(smalltalk.send(smalltalk.send(self, "_asArray", []), "_reversed", []), "_asOrderedCollection", []);
  9887. return self;},
  9888. args: [],
  9889. source: unescape('reversed%0A%09%5Eself%20asArray%20reversed%20asOrderedCollection'),
  9890. messageSends: ["asOrderedCollection", "reversed", "asArray"],
  9891. referencedClasses: []
  9892. }),
  9893. smalltalk.OrderedCollection);
  9894. smalltalk.addMethod(
  9895. unescape('_initialize'),
  9896. smalltalk.method({
  9897. selector: unescape('initialize'),
  9898. category: 'initialization',
  9899. fn: function (){
  9900. var self=this;
  9901. smalltalk.send(self, "_initialize", [], smalltalk.SequenceableCollection);
  9902. (self['@elements']=[]);
  9903. return self;},
  9904. args: [],
  9905. source: unescape('initialize%0A%09super%20initialize.%0A%09elements%20%3A%3D%20%23%28%29'),
  9906. messageSends: ["initialize"],
  9907. referencedClasses: []
  9908. }),
  9909. smalltalk.OrderedCollection);
  9910. smalltalk.addMethod(
  9911. unescape('_withIndexDo_'),
  9912. smalltalk.method({
  9913. selector: unescape('withIndexDo%3A'),
  9914. category: 'enumerating',
  9915. fn: function (aBlock){
  9916. var self=this;
  9917. smalltalk.send(self['@elements'], "_withIndexDo_", [aBlock]);
  9918. return self;},
  9919. args: ["aBlock"],
  9920. source: unescape('withIndexDo%3A%20aBlock%0A%09elements%20withIndexDo%3A%20aBlock'),
  9921. messageSends: ["withIndexDo:"],
  9922. referencedClasses: []
  9923. }),
  9924. smalltalk.OrderedCollection);
  9925. smalltalk.addMethod(
  9926. unescape('_detect_ifNone_'),
  9927. smalltalk.method({
  9928. selector: unescape('detect%3AifNone%3A'),
  9929. category: 'enumerating',
  9930. fn: function (aBlock, anotherBlock){
  9931. var self=this;
  9932. return smalltalk.send(self['@elements'], "_detect_ifNone_", [aBlock, anotherBlock]);
  9933. return self;},
  9934. args: ["aBlock", "anotherBlock"],
  9935. source: unescape('detect%3A%20aBlock%20ifNone%3A%20anotherBlock%0A%09%5Eelements%20detect%3A%20aBlock%20ifNone%3A%20anotherBlock'),
  9936. messageSends: ["detect:ifNone:"],
  9937. referencedClasses: []
  9938. }),
  9939. smalltalk.OrderedCollection);
  9940. smalltalk.addMethod(
  9941. unescape('_do_'),
  9942. smalltalk.method({
  9943. selector: unescape('do%3A'),
  9944. category: 'enumerating',
  9945. fn: function (aBlock){
  9946. var self=this;
  9947. smalltalk.send(self['@elements'], "_do_", [aBlock]);
  9948. return self;},
  9949. args: ["aBlock"],
  9950. source: unescape('do%3A%20aBlock%0A%09elements%20do%3A%20aBlock'),
  9951. messageSends: ["do:"],
  9952. referencedClasses: []
  9953. }),
  9954. smalltalk.OrderedCollection);
  9955. smalltalk.addMethod(
  9956. unescape('_asOrderedCollection'),
  9957. smalltalk.method({
  9958. selector: unescape('asOrderedCollection'),
  9959. category: 'converting',
  9960. fn: function (){
  9961. var self=this;
  9962. return self;
  9963. return self;},
  9964. args: [],
  9965. source: unescape('asOrderedCollection%0A%09%5Eself'),
  9966. messageSends: [],
  9967. referencedClasses: []
  9968. }),
  9969. smalltalk.OrderedCollection);
  9970. smalltalk.addMethod(
  9971. unescape('_asArray'),
  9972. smalltalk.method({
  9973. selector: unescape('asArray'),
  9974. category: 'converting',
  9975. fn: function (){
  9976. var self=this;
  9977. return smalltalk.send(self['@elements'], "_copy", []);
  9978. return self;},
  9979. args: [],
  9980. source: unescape('asArray%0A%09%5Eelements%20copy'),
  9981. messageSends: ["copy"],
  9982. referencedClasses: []
  9983. }),
  9984. smalltalk.OrderedCollection);
  9985. smalltalk.addPackage('Kernel-Exceptions', {});
  9986. smalltalk.addClass('Error', smalltalk.Object, ['messageText'], 'Kernel-Exceptions');
  9987. smalltalk.addMethod(
  9988. unescape('_messageText'),
  9989. smalltalk.method({
  9990. selector: unescape('messageText'),
  9991. category: 'accessing',
  9992. fn: function (){
  9993. var self=this;
  9994. return self['@messageText'];
  9995. return self;},
  9996. args: [],
  9997. source: unescape('messageText%0A%09%5EmessageText'),
  9998. messageSends: [],
  9999. referencedClasses: []
  10000. }),
  10001. smalltalk.Error);
  10002. smalltalk.addMethod(
  10003. unescape('_messageText_'),
  10004. smalltalk.method({
  10005. selector: unescape('messageText%3A'),
  10006. category: 'accessing',
  10007. fn: function (aString){
  10008. var self=this;
  10009. (self['@messageText']=aString);
  10010. return self;},
  10011. args: ["aString"],
  10012. source: unescape('messageText%3A%20aString%0A%09messageText%20%3A%3D%20aString'),
  10013. messageSends: [],
  10014. referencedClasses: []
  10015. }),
  10016. smalltalk.Error);
  10017. smalltalk.addMethod(
  10018. unescape('_signal'),
  10019. smalltalk.method({
  10020. selector: unescape('signal'),
  10021. category: 'signaling',
  10022. fn: function (){
  10023. var self=this;
  10024. self.context = smalltalk.getThisContext(); self.smalltalkError = true; throw(self);
  10025. return self;},
  10026. args: [],
  10027. source: unescape('signal%0A%09%3Cself.context%20%3D%20smalltalk.getThisContext%28%29%3B%20self.smalltalkError%20%3D%20true%3B%20throw%28self%29%3E'),
  10028. messageSends: [],
  10029. referencedClasses: []
  10030. }),
  10031. smalltalk.Error);
  10032. smalltalk.addMethod(
  10033. unescape('_context'),
  10034. smalltalk.method({
  10035. selector: unescape('context'),
  10036. category: 'accessing',
  10037. fn: function (){
  10038. var self=this;
  10039. return self.context;
  10040. return self;},
  10041. args: [],
  10042. source: unescape('context%0A%09%3Creturn%20self.context%3E'),
  10043. messageSends: [],
  10044. referencedClasses: []
  10045. }),
  10046. smalltalk.Error);
  10047. smalltalk.addMethod(
  10048. unescape('_jsStack'),
  10049. smalltalk.method({
  10050. selector: unescape('jsStack'),
  10051. category: 'accessing',
  10052. fn: function (){
  10053. var self=this;
  10054. return self.stack;
  10055. return self;},
  10056. args: [],
  10057. source: unescape('jsStack%0A%09%3Creturn%20self.stack%3E'),
  10058. messageSends: [],
  10059. referencedClasses: []
  10060. }),
  10061. smalltalk.Error);
  10062. smalltalk.addMethod(
  10063. unescape('_isSmalltalkError'),
  10064. smalltalk.method({
  10065. selector: unescape('isSmalltalkError'),
  10066. category: 'testing',
  10067. fn: function (){
  10068. var self=this;
  10069. return self.smalltalkError === true;
  10070. return self;},
  10071. args: [],
  10072. source: unescape('isSmalltalkError%0A%09%3Creturn%20self.smalltalkError%20%3D%3D%3D%20true%3E'),
  10073. messageSends: [],
  10074. referencedClasses: []
  10075. }),
  10076. smalltalk.Error);
  10077. smalltalk.addMethod(
  10078. unescape('_signal_'),
  10079. smalltalk.method({
  10080. selector: unescape('signal%3A'),
  10081. category: 'instance creation',
  10082. fn: function (aString){
  10083. var self=this;
  10084. return (function($rec){smalltalk.send($rec, "_messageText_", [aString]);return smalltalk.send($rec, "_signal", []);})(smalltalk.send(self, "_new", []));
  10085. return self;},
  10086. args: ["aString"],
  10087. source: unescape('signal%3A%20aString%0A%09%20%20%20%20%5Eself%20new%0A%09%09messageText%3A%20aString%3B%0A%09%09signal'),
  10088. messageSends: ["messageText:", "signal", "new"],
  10089. referencedClasses: []
  10090. }),
  10091. smalltalk.Error.klass);
  10092. smalltalk.addClass('MessageNotUnderstood', smalltalk.Error, ['message', 'receiver'], 'Kernel-Exceptions');
  10093. smalltalk.addMethod(
  10094. unescape('_message'),
  10095. smalltalk.method({
  10096. selector: unescape('message'),
  10097. category: 'accessing',
  10098. fn: function (){
  10099. var self=this;
  10100. return self['@message'];
  10101. return self;},
  10102. args: [],
  10103. source: unescape('message%0A%09%5Emessage'),
  10104. messageSends: [],
  10105. referencedClasses: []
  10106. }),
  10107. smalltalk.MessageNotUnderstood);
  10108. smalltalk.addMethod(
  10109. unescape('_message_'),
  10110. smalltalk.method({
  10111. selector: unescape('message%3A'),
  10112. category: 'accessing',
  10113. fn: function (aMessage){
  10114. var self=this;
  10115. (self['@message']=aMessage);
  10116. return self;},
  10117. args: ["aMessage"],
  10118. source: unescape('message%3A%20aMessage%0A%09message%20%3A%3D%20aMessage'),
  10119. messageSends: [],
  10120. referencedClasses: []
  10121. }),
  10122. smalltalk.MessageNotUnderstood);
  10123. smalltalk.addMethod(
  10124. unescape('_receiver'),
  10125. smalltalk.method({
  10126. selector: unescape('receiver'),
  10127. category: 'accessing',
  10128. fn: function (){
  10129. var self=this;
  10130. return self['@receiver'];
  10131. return self;},
  10132. args: [],
  10133. source: unescape('receiver%0A%09%5Ereceiver'),
  10134. messageSends: [],
  10135. referencedClasses: []
  10136. }),
  10137. smalltalk.MessageNotUnderstood);
  10138. smalltalk.addMethod(
  10139. unescape('_receiver_'),
  10140. smalltalk.method({
  10141. selector: unescape('receiver%3A'),
  10142. category: 'accessing',
  10143. fn: function (anObject){
  10144. var self=this;
  10145. (self['@receiver']=anObject);
  10146. return self;},
  10147. args: ["anObject"],
  10148. source: unescape('receiver%3A%20anObject%0A%09receiver%20%3A%3D%20anObject'),
  10149. messageSends: [],
  10150. referencedClasses: []
  10151. }),
  10152. smalltalk.MessageNotUnderstood);
  10153. smalltalk.addMethod(
  10154. unescape('_messageText'),
  10155. smalltalk.method({
  10156. selector: unescape('messageText'),
  10157. category: 'accessing',
  10158. fn: function (){
  10159. var self=this;
  10160. 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", [])]);
  10161. return self;},
  10162. args: [],
  10163. source: unescape('messageText%0A%09%5Eself%20receiver%20asString%2C%20%27%20does%20not%20understand%20%23%27%2C%20self%20message%20selector'),
  10164. messageSends: [unescape("%2C"), "asString", "receiver", "selector", "message"],
  10165. referencedClasses: []
  10166. }),
  10167. smalltalk.MessageNotUnderstood);
  10168. smalltalk.addClass('ErrorHandler', smalltalk.Object, [], 'Kernel-Exceptions');
  10169. smalltalk.addMethod(
  10170. unescape('_handleError_'),
  10171. smalltalk.method({
  10172. selector: unescape('handleError%3A'),
  10173. category: 'error handling',
  10174. fn: function (anError){
  10175. var self=this;
  10176. (($receiver = smalltalk.send(anError, "_context", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_logErrorContext_", [smalltalk.send(anError, "_context", [])]);})() : nil;
  10177. smalltalk.send(self, "_logError_", [anError]);
  10178. return self;},
  10179. args: ["anError"],
  10180. source: unescape('handleError%3A%20anError%0A%09anError%20context%20ifNotNil%3A%20%5Bself%20logErrorContext%3A%20anError%20context%5D.%0A%09self%20logError%3A%20anError'),
  10181. messageSends: ["ifNotNil:", "context", "logErrorContext:", "logError:"],
  10182. referencedClasses: []
  10183. }),
  10184. smalltalk.ErrorHandler);
  10185. smalltalk.addMethod(
  10186. unescape('_logContext_'),
  10187. smalltalk.method({
  10188. selector: unescape('logContext%3A'),
  10189. category: 'private',
  10190. fn: function (aContext){
  10191. var self=this;
  10192. (($receiver = smalltalk.send(aContext, "_home", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_logContext_", [smalltalk.send(aContext, "_home", [])]);})() : nil;
  10193. smalltalk.send(self, "_log_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aContext, "_receiver", []), "_asString", []), "__comma", [unescape("%3E%3E")]), "__comma", [smalltalk.send(aContext, "_selector", [])])]);
  10194. return self;},
  10195. args: ["aContext"],
  10196. 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'),
  10197. messageSends: ["ifNotNil:", "home", "logContext:", "log:", unescape("%2C"), "asString", "receiver", "selector"],
  10198. referencedClasses: []
  10199. }),
  10200. smalltalk.ErrorHandler);
  10201. smalltalk.addMethod(
  10202. unescape('_logErrorContext_'),
  10203. smalltalk.method({
  10204. selector: unescape('logErrorContext%3A'),
  10205. category: 'private',
  10206. fn: function (aContext){
  10207. var self=this;
  10208. (($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;
  10209. return self;},
  10210. args: ["aContext"],
  10211. 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'),
  10212. messageSends: ["ifNotNil:", "home", "logContext:"],
  10213. referencedClasses: []
  10214. }),
  10215. smalltalk.ErrorHandler);
  10216. smalltalk.addMethod(
  10217. unescape('_logError_'),
  10218. smalltalk.method({
  10219. selector: unescape('logError%3A'),
  10220. category: 'private',
  10221. fn: function (anError){
  10222. var self=this;
  10223. smalltalk.send(self, "_log_", [smalltalk.send(anError, "_messageText", [])]);
  10224. return self;},
  10225. args: ["anError"],
  10226. source: unescape('logError%3A%20anError%0A%09self%20log%3A%20anError%20messageText'),
  10227. messageSends: ["log:", "messageText"],
  10228. referencedClasses: []
  10229. }),
  10230. smalltalk.ErrorHandler);
  10231. smalltalk.addMethod(
  10232. unescape('_log_'),
  10233. smalltalk.method({
  10234. selector: unescape('log%3A'),
  10235. category: 'private',
  10236. fn: function (aString){
  10237. var self=this;
  10238. smalltalk.send((typeof console == 'undefined' ? nil : console), "_log_", [aString]);
  10239. return self;},
  10240. args: ["aString"],
  10241. source: unescape('log%3A%20aString%0A%09console%20log%3A%20aString'),
  10242. messageSends: ["log:"],
  10243. referencedClasses: []
  10244. }),
  10245. smalltalk.ErrorHandler);
  10246. smalltalk.ErrorHandler.klass.iVarNames = ['current'];
  10247. smalltalk.addMethod(
  10248. unescape('_current'),
  10249. smalltalk.method({
  10250. selector: unescape('current'),
  10251. category: 'accessing',
  10252. fn: function (){
  10253. var self=this;
  10254. return (($receiver = self['@current']) == nil || $receiver == undefined) ? (function(){return (self['@current']=smalltalk.send(self, "_new", []));})() : $receiver;
  10255. return self;},
  10256. args: [],
  10257. source: unescape('current%0A%09%5Ecurrent%20ifNil%3A%20%5Bcurrent%20%3A%3D%20self%20new%5D'),
  10258. messageSends: ["ifNil:", "new"],
  10259. referencedClasses: []
  10260. }),
  10261. smalltalk.ErrorHandler.klass);
  10262. smalltalk.addMethod(
  10263. unescape('_initialize'),
  10264. smalltalk.method({
  10265. selector: unescape('initialize'),
  10266. category: 'initialization',
  10267. fn: function (){
  10268. var self=this;
  10269. smalltalk.send(self, "_register", []);
  10270. return self;},
  10271. args: [],
  10272. source: unescape('initialize%0A%09self%20register'),
  10273. messageSends: ["register"],
  10274. referencedClasses: []
  10275. }),
  10276. smalltalk.ErrorHandler.klass);
  10277. smalltalk.addMethod(
  10278. unescape('_register'),
  10279. smalltalk.method({
  10280. selector: unescape('register'),
  10281. category: 'initialization',
  10282. fn: function (){
  10283. var self=this;
  10284. smalltalk.send((smalltalk.ErrorHandler || ErrorHandler), "_setCurrent_", [smalltalk.send(self, "_new", [])]);
  10285. return self;},
  10286. args: [],
  10287. source: unescape('register%0A%09ErrorHandler%20setCurrent%3A%20self%20new'),
  10288. messageSends: ["setCurrent:", "new"],
  10289. referencedClasses: ["ErrorHandler"]
  10290. }),
  10291. smalltalk.ErrorHandler.klass);
  10292. smalltalk.addMethod(
  10293. unescape('_setCurrent_'),
  10294. smalltalk.method({
  10295. selector: unescape('setCurrent%3A'),
  10296. category: 'accessing',
  10297. fn: function (anHandler){
  10298. var self=this;
  10299. (self['@current']=anHandler);
  10300. return self;},
  10301. args: ["anHandler"],
  10302. source: unescape('setCurrent%3A%20anHandler%0A%09current%20%3A%3D%20anHandler'),
  10303. messageSends: [],
  10304. referencedClasses: []
  10305. }),
  10306. smalltalk.ErrorHandler.klass);
  10307. smalltalk.addPackage('Kernel-Transcript', {});
  10308. smalltalk.addClass('Transcript', smalltalk.Object, ['textarea'], 'Kernel-Transcript');
  10309. smalltalk.Transcript.klass.iVarNames = ['current'];
  10310. smalltalk.addMethod(
  10311. unescape('_open'),
  10312. smalltalk.method({
  10313. selector: unescape('open'),
  10314. category: 'instance creation',
  10315. fn: function (){
  10316. var self=this;
  10317. smalltalk.send(smalltalk.send(self, "_current", []), "_open", []);
  10318. return self;},
  10319. args: [],
  10320. source: unescape('open%0A%20%20%20%20self%20current%20open'),
  10321. messageSends: ["open", "current"],
  10322. referencedClasses: []
  10323. }),
  10324. smalltalk.Transcript.klass);
  10325. smalltalk.addMethod(
  10326. unescape('_new'),
  10327. smalltalk.method({
  10328. selector: unescape('new'),
  10329. category: 'instance creation',
  10330. fn: function (){
  10331. var self=this;
  10332. smalltalk.send(self, "_shouldNotImplement", []);
  10333. return self;},
  10334. args: [],
  10335. source: unescape('new%0A%20%20%20%20self%20shouldNotImplement'),
  10336. messageSends: ["shouldNotImplement"],
  10337. referencedClasses: []
  10338. }),
  10339. smalltalk.Transcript.klass);
  10340. smalltalk.addMethod(
  10341. unescape('_current'),
  10342. smalltalk.method({
  10343. selector: unescape('current'),
  10344. category: 'instance creation',
  10345. fn: function (){
  10346. var self=this;
  10347. return self['@current'];
  10348. return self;},
  10349. args: [],
  10350. source: unescape('current%0A%20%20%20%20%5Ecurrent'),
  10351. messageSends: [],
  10352. referencedClasses: []
  10353. }),
  10354. smalltalk.Transcript.klass);
  10355. smalltalk.addMethod(
  10356. unescape('_show_'),
  10357. smalltalk.method({
  10358. selector: unescape('show%3A'),
  10359. category: 'printing',
  10360. fn: function (anObject){
  10361. var self=this;
  10362. smalltalk.send(smalltalk.send(self, "_current", []), "_show_", [anObject]);
  10363. return self;},
  10364. args: ["anObject"],
  10365. source: unescape('show%3A%20anObject%0A%20%20%20%20self%20current%20show%3A%20anObject'),
  10366. messageSends: ["show:", "current"],
  10367. referencedClasses: []
  10368. }),
  10369. smalltalk.Transcript.klass);
  10370. smalltalk.addMethod(
  10371. unescape('_cr'),
  10372. smalltalk.method({
  10373. selector: unescape('cr'),
  10374. category: 'printing',
  10375. fn: function (){
  10376. var self=this;
  10377. smalltalk.send(smalltalk.send(self, "_current", []), "_show_", [smalltalk.send((smalltalk.String || String), "_cr", [])]);
  10378. return self;},
  10379. args: [],
  10380. source: unescape('cr%0A%20%20%20%20self%20current%20show%3A%20String%20cr'),
  10381. messageSends: ["show:", "current", "cr"],
  10382. referencedClasses: ["String"]
  10383. }),
  10384. smalltalk.Transcript.klass);
  10385. smalltalk.addMethod(
  10386. unescape('_clear'),
  10387. smalltalk.method({
  10388. selector: unescape('clear'),
  10389. category: 'printing',
  10390. fn: function (){
  10391. var self=this;
  10392. smalltalk.send(smalltalk.send(self, "_current", []), "_clear", []);
  10393. return self;},
  10394. args: [],
  10395. source: unescape('clear%0A%20%20%20%20self%20current%20clear'),
  10396. messageSends: ["clear", "current"],
  10397. referencedClasses: []
  10398. }),
  10399. smalltalk.Transcript.klass);
  10400. smalltalk.addMethod(
  10401. unescape('_register_'),
  10402. smalltalk.method({
  10403. selector: unescape('register%3A'),
  10404. category: 'instance creation',
  10405. fn: function (aTranscript){
  10406. var self=this;
  10407. (self['@current']=aTranscript);
  10408. return self;},
  10409. args: ["aTranscript"],
  10410. source: unescape('register%3A%20aTranscript%0A%09current%20%3A%3D%20aTranscript'),
  10411. messageSends: [],
  10412. referencedClasses: []
  10413. }),
  10414. smalltalk.Transcript.klass);
  10415. smalltalk.addClass('ConsoleTranscript', smalltalk.Object, ['textarea'], 'Kernel-Transcript');
  10416. smalltalk.addMethod(
  10417. unescape('_clear'),
  10418. smalltalk.method({
  10419. selector: unescape('clear'),
  10420. category: 'printing',
  10421. fn: function (){
  10422. var self=this;
  10423. return self;},
  10424. args: [],
  10425. source: unescape('clear%0A%09%22no%20op%22'),
  10426. messageSends: [],
  10427. referencedClasses: []
  10428. }),
  10429. smalltalk.ConsoleTranscript);
  10430. smalltalk.addMethod(
  10431. unescape('_cr'),
  10432. smalltalk.method({
  10433. selector: unescape('cr'),
  10434. category: 'printing',
  10435. fn: function (){
  10436. var self=this;
  10437. return self;},
  10438. args: [],
  10439. source: unescape('cr%0A%09%22no%20op%22'),
  10440. messageSends: [],
  10441. referencedClasses: []
  10442. }),
  10443. smalltalk.ConsoleTranscript);
  10444. smalltalk.addMethod(
  10445. unescape('_show_'),
  10446. smalltalk.method({
  10447. selector: unescape('show%3A'),
  10448. category: 'printing',
  10449. fn: function (anObject){
  10450. var self=this;
  10451. var string=nil;
  10452. (string=smalltalk.send(anObject, "_asString", []));
  10453. console.log(String(string));
  10454. return self;},
  10455. args: ["anObject"],
  10456. source: unescape('show%3A%20anObject%0A%09%7C%20string%20%7C%0A%09string%20%3A%3D%20anObject%20asString.%0A%09%3Cconsole.log%28String%28string%29%29%3E'),
  10457. messageSends: ["asString"],
  10458. referencedClasses: []
  10459. }),
  10460. smalltalk.ConsoleTranscript);
  10461. smalltalk.addMethod(
  10462. unescape('_open'),
  10463. smalltalk.method({
  10464. selector: unescape('open'),
  10465. category: 'actions',
  10466. fn: function (){
  10467. var self=this;
  10468. return self;},
  10469. args: [],
  10470. source: unescape('open'),
  10471. messageSends: [],
  10472. referencedClasses: []
  10473. }),
  10474. smalltalk.ConsoleTranscript);
  10475. smalltalk.addMethod(
  10476. unescape('_initialize'),
  10477. smalltalk.method({
  10478. selector: unescape('initialize'),
  10479. category: 'initialization',
  10480. fn: function (){
  10481. var self=this;
  10482. smalltalk.send((smalltalk.Transcript || Transcript), "_register_", [smalltalk.send(self, "_new", [])]);
  10483. return self;},
  10484. args: [],
  10485. source: unescape('initialize%0A%09Transcript%20register%3A%20self%20new'),
  10486. messageSends: ["register:", "new"],
  10487. referencedClasses: ["Transcript"]
  10488. }),
  10489. smalltalk.ConsoleTranscript.klass);
  10490. smalltalk.addPackage('Compiler', {});
  10491. smalltalk.addClass('ChunkParser', smalltalk.Object, ['stream'], 'Compiler');
  10492. smalltalk.addMethod(
  10493. unescape('_stream_'),
  10494. smalltalk.method({
  10495. selector: unescape('stream%3A'),
  10496. category: 'accessing',
  10497. fn: function (aStream){
  10498. var self=this;
  10499. (self['@stream']=aStream);
  10500. return self;},
  10501. args: ["aStream"],
  10502. source: unescape('stream%3A%20aStream%0A%09stream%20%3A%3D%20aStream'),
  10503. messageSends: [],
  10504. referencedClasses: []
  10505. }),
  10506. smalltalk.ChunkParser);
  10507. smalltalk.addMethod(
  10508. unescape('_nextChunk'),
  10509. smalltalk.method({
  10510. selector: unescape('nextChunk'),
  10511. category: 'reading',
  10512. fn: function (){
  10513. var self=this;
  10514. try{var char_=nil;
  10515. var result=nil;
  10516. var chunk=nil;
  10517. (result=smalltalk.send("", "_writeStream", []));
  10518. (function(){while((function(){(char_=smalltalk.send(self['@stream'], "_next", []));return smalltalk.send(char_, "_notNil", []);})()) {(function(){((($receiver = smalltalk.send(char_, "__eq", [unescape("%21")])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(self['@stream'], "_peek", []), "__eq", [unescape("%21")])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_next", []);})() : (function(){return (function(){throw({name: 'stReturn', selector: '_nextChunk', fn: function(){return smalltalk.send(smalltalk.send(result, "_contents", []), "_trimBoth", [])}})})();})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@stream'], "_next", []);}), (function(){return (function(){throw({name: 'stReturn', selector: '_nextChunk', fn: function(){return smalltalk.send(smalltalk.send(result, "_contents", []), "_trimBoth", [])}})})();})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(smalltalk.send(self['@stream'], "_peek", []), "__eq", [unescape("%21")])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_next", []);})() : (function(){return (function(){throw({name: 'stReturn', selector: '_nextChunk', fn: function(){return smalltalk.send(smalltalk.send(result, "_contents", []), "_trimBoth", [])}})})();})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@stream'], "_next", []);}), (function(){return (function(){throw({name: 'stReturn', selector: '_nextChunk', fn: function(){return smalltalk.send(smalltalk.send(result, "_contents", []), "_trimBoth", [])}})})();})]));})]));return smalltalk.send(result, "_nextPut_", [char_]);})()}})();
  10519. (function(){throw({name: 'stReturn', selector: '_nextChunk', fn: function(){return nil}})})();
  10520. return self;
  10521. } catch(e) {if(e.name === 'stReturn' && e.selector === '_nextChunk'){return e.fn()} throw(e)}},
  10522. args: [],
  10523. source: unescape('nextChunk%0A%09%22The%20chunk%20format%20%28Smalltalk%20Interchange%20Format%20or%20Fileout%20format%29%0A%09is%20a%20trivial%20format%20but%20can%20be%20a%20bit%20tricky%20to%20understand%3A%0A%09%09-%20Uses%20the%20exclamation%20mark%20as%20delimiter%20of%20chunks.%0A%09%09-%20Inside%20a%20chunk%20a%20normal%20exclamation%20mark%20must%20be%20doubled.%0A%09%09-%20A%20non%20empty%20chunk%20must%20be%20a%20valid%20Smalltalk%20expression.%0A%09%09-%20A%20chunk%20on%20top%20level%20with%20a%20preceding%20empty%20chunk%20is%20an%20instruction%20chunk%3A%0A%09%09%09-%20The%20object%20created%20by%20the%20expression%20then%20takes%20over%20reading%20chunks.%0A%0A%09This%20metod%20returns%20next%20chunk%20as%20a%20String%20%28trimmed%29%2C%20empty%20String%20%28all%20whitespace%29%20or%20nil.%22%0A%0A%09%7C%20char%20result%20chunk%20%7C%0A%09result%20%3A%3D%20%27%27%20writeStream.%0A%20%20%20%20%20%20%20%20%5Bchar%20%3A%3D%20stream%20next.%0A%20%20%20%20%20%20%20%20char%20notNil%5D%20whileTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20char%20%3D%20%27%21%27%20ifTrue%3A%20%5B%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%20stream%20peek%20%3D%20%27%21%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%20ifTrue%3A%20%5Bstream%20next%20%22skipping%20the%20escape%20double%22%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%20ifFalse%3A%20%5B%5Eresult%20contents%20trimBoth%20%20%22chunk%20end%20marker%20found%22%5D%5D.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20result%20nextPut%3A%20char%5D.%0A%09%5Enil%20%22a%20chunk%20needs%20to%20end%20with%20%21%22'),
  10524. messageSends: ["writeStream", "whileTrue:", "next", "notNil", "ifTrue:", unescape("%3D"), "ifTrue:ifFalse:", "peek", "trimBoth", "contents", "nextPut:"],
  10525. referencedClasses: []
  10526. }),
  10527. smalltalk.ChunkParser);
  10528. smalltalk.addMethod(
  10529. unescape('_on_'),
  10530. smalltalk.method({
  10531. selector: unescape('on%3A'),
  10532. category: 'not yet classified',
  10533. fn: function (aStream){
  10534. var self=this;
  10535. return smalltalk.send(smalltalk.send(self, "_new", []), "_stream_", [aStream]);
  10536. return self;},
  10537. args: ["aStream"],
  10538. source: unescape('on%3A%20aStream%0A%09%5Eself%20new%20stream%3A%20aStream'),
  10539. messageSends: ["stream:", "new"],
  10540. referencedClasses: []
  10541. }),
  10542. smalltalk.ChunkParser.klass);
  10543. smalltalk.addClass('Importer', smalltalk.Object, [], 'Compiler');
  10544. smalltalk.addMethod(
  10545. unescape('_import_'),
  10546. smalltalk.method({
  10547. selector: unescape('import%3A'),
  10548. category: 'fileIn',
  10549. fn: function (aStream){
  10550. var self=this;
  10551. var chunk=nil;
  10552. var result=nil;
  10553. var parser=nil;
  10554. var lastEmpty=nil;
  10555. (parser=smalltalk.send((smalltalk.ChunkParser || ChunkParser), "_on_", [aStream]));
  10556. (lastEmpty=false);
  10557. (function(){while(!(function(){(chunk=smalltalk.send(parser, "_nextChunk", []));return smalltalk.send(chunk, "_isNil", []);})()) {(function(){return ((($receiver = smalltalk.send(chunk, "_isEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (lastEmpty=true);})() : (function(){(result=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_loadExpression_", [chunk]));return ((($receiver = lastEmpty).klass === smalltalk.Boolean) ? ($receiver ? (function(){(lastEmpty=false);return smalltalk.send(result, "_scanFrom_", [parser]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){(lastEmpty=false);return smalltalk.send(result, "_scanFrom_", [parser]);})]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return (lastEmpty=true);}), (function(){(result=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_loadExpression_", [chunk]));return ((($receiver = lastEmpty).klass === smalltalk.Boolean) ? ($receiver ? (function(){(lastEmpty=false);return smalltalk.send(result, "_scanFrom_", [parser]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){(lastEmpty=false);return smalltalk.send(result, "_scanFrom_", [parser]);})]));})]));})()}})();
  10558. return self;},
  10559. args: ["aStream"],
  10560. source: unescape('import%3A%20aStream%0A%20%20%20%20%7C%20chunk%20result%20parser%20lastEmpty%20%7C%0A%20%20%20%20parser%20%3A%3D%20ChunkParser%20on%3A%20aStream.%0A%20%20%20%20lastEmpty%20%3A%3D%20false.%0A%20%20%20%20%5Bchunk%20%3A%3D%20parser%20nextChunk.%0A%20%20%20%20%20chunk%20isNil%5D%20whileFalse%3A%20%5B%0A%20%20%20%20%20%20%20%20chunk%20isEmpty%0A%20%20%20%20%20%20%20%09%09ifTrue%3A%20%5BlastEmpty%20%3A%3D%20true%5D%0A%20%20%20%20%20%20%20%09%09ifFalse%3A%20%5B%0A%20%20%20%20%20%20%20%20%09%09result%20%3A%3D%20Compiler%20new%20loadExpression%3A%20chunk.%0A%20%20%20%20%20%20%20%20%09%09lastEmpty%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%09%09%09ifTrue%3A%20%5B%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%09lastEmpty%20%3A%3D%20false.%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%09result%20scanFrom%3A%20parser%5D%5D%5D'),
  10561. messageSends: ["on:", "whileFalse:", "nextChunk", "isNil", "ifTrue:ifFalse:", "isEmpty", "loadExpression:", "new", "ifTrue:", "scanFrom:"],
  10562. referencedClasses: ["ChunkParser", "Compiler"]
  10563. }),
  10564. smalltalk.Importer);
  10565. smalltalk.addClass('Exporter', smalltalk.Object, [], 'Compiler');
  10566. smalltalk.addMethod(
  10567. unescape('_exportDefinitionOf_on_'),
  10568. smalltalk.method({
  10569. selector: unescape('exportDefinitionOf%3Aon%3A'),
  10570. category: 'private',
  10571. fn: function (aClass, aStream){
  10572. var self=this;
  10573. (function($rec){smalltalk.send($rec, "_nextPutAll_", [unescape("smalltalk.addClass%28")]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(unescape("%27"), "__comma", [smalltalk.send(self, "_classNameFor_", [aClass])]), "__comma", [unescape("%27%2C%20")])]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send("smalltalk.", "__comma", [smalltalk.send(self, "_classNameFor_", [smalltalk.send(aClass, "_superclass", [])])])]);return smalltalk.send($rec, "_nextPutAll_", [unescape("%2C%20%5B")]);})(aStream);
  10574. smalltalk.send(smalltalk.send(aClass, "_instanceVariableNames", []), "_do_separatedBy_", [(function(each){return smalltalk.send(aStream, "_nextPutAll_", [smalltalk.send(smalltalk.send(unescape("%27"), "__comma", [each]), "__comma", [unescape("%27")])]);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [unescape("%2C%20")]);})]);
  10575. (function($rec){smalltalk.send($rec, "_nextPutAll_", [unescape("%5D%2C%20%27")]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(aClass, "_category", []), "__comma", [unescape("%27")])]);return smalltalk.send($rec, "_nextPutAll_", [unescape("%29%3B")]);})(aStream);
  10576. ((($receiver = smalltalk.send(smalltalk.send(aClass, "_comment", []), "_notEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function($rec){smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", ["smalltalk."]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_classNameFor_", [aClass])]);smalltalk.send($rec, "_nextPutAll_", [unescape(".comment%3D")]);return smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(unescape("unescape%28%27"), "__comma", [smalltalk.send(smalltalk.send(aClass, "_comment", []), "_escaped", [])]), "__comma", [unescape("%27%29")])]);})(aStream);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (function($rec){smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", ["smalltalk."]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_classNameFor_", [aClass])]);smalltalk.send($rec, "_nextPutAll_", [unescape(".comment%3D")]);return smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(unescape("unescape%28%27"), "__comma", [smalltalk.send(smalltalk.send(aClass, "_comment", []), "_escaped", [])]), "__comma", [unescape("%27%29")])]);})(aStream);})]));
  10577. smalltalk.send(aStream, "_lf", []);
  10578. return self;},
  10579. args: ["aClass", "aStream"],
  10580. source: unescape('exportDefinitionOf%3A%20aClass%20on%3A%20aStream%0A%09aStream%20%0A%09%20%20%20%20nextPutAll%3A%20%27smalltalk.addClass%28%27%3B%0A%09%20%20%20%20nextPutAll%3A%20%27%27%27%27%2C%20%28self%20classNameFor%3A%20aClass%29%2C%20%27%27%27%2C%20%27%3B%0A%09%20%20%20%20nextPutAll%3A%20%27smalltalk.%27%2C%20%28self%20classNameFor%3A%20aClass%20superclass%29%3B%0A%09%20%20%20%20nextPutAll%3A%20%27%2C%20%5B%27.%0A%09aClass%20instanceVariableNames%20%0A%09%20%20%20%20do%3A%20%5B%3Aeach%20%7C%20aStream%20nextPutAll%3A%20%27%27%27%27%2C%20each%2C%20%27%27%27%27%5D%0A%09%20%20%20%20separatedBy%3A%20%5BaStream%20nextPutAll%3A%20%27%2C%20%27%5D.%0A%09aStream%09%0A%09%20%20%20%20nextPutAll%3A%20%27%5D%2C%20%27%27%27%3B%0A%09%20%20%20%20nextPutAll%3A%20aClass%20category%2C%20%27%27%27%27%3B%0A%09%20%20%20%20nextPutAll%3A%20%27%29%3B%27.%0A%09aClass%20comment%20notEmpty%20ifTrue%3A%20%5B%0A%09%20%20%20%20aStream%20%0A%09%20%20%20%20%09lf%3B%0A%09%09nextPutAll%3A%20%27smalltalk.%27%3B%0A%09%09nextPutAll%3A%20%28self%20classNameFor%3A%20aClass%29%3B%0A%09%09nextPutAll%3A%20%27.comment%3D%27%3B%0A%09%09nextPutAll%3A%20%27unescape%28%27%27%27%2C%20aClass%20comment%20escaped%2C%20%27%27%27%29%27%5D.%0A%09aStream%20lf'),
  10581. messageSends: ["nextPutAll:", unescape("%2C"), "classNameFor:", "superclass", "do:separatedBy:", "instanceVariableNames", "category", "ifTrue:", "notEmpty", "comment", "lf", "escaped"],
  10582. referencedClasses: []
  10583. }),
  10584. smalltalk.Exporter);
  10585. smalltalk.addMethod(
  10586. unescape('_exportMetaDefinitionOf_on_'),
  10587. smalltalk.method({
  10588. selector: unescape('exportMetaDefinitionOf%3Aon%3A'),
  10589. category: 'private',
  10590. fn: function (aClass, aStream){
  10591. var self=this;
  10592. ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_instanceVariableNames", []), "_isEmpty", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){(function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send("smalltalk.", "__comma", [smalltalk.send(self, "_classNameFor_", [smalltalk.send(aClass, "_class", [])])])]);return smalltalk.send($rec, "_nextPutAll_", [unescape(".iVarNames%20%3D%20%5B")]);})(aStream);smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_instanceVariableNames", []), "_do_separatedBy_", [(function(each){return smalltalk.send(aStream, "_nextPutAll_", [smalltalk.send(smalltalk.send(unescape("%27"), "__comma", [each]), "__comma", [unescape("%27")])]);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [unescape("%2C")]);})]);return smalltalk.send(aStream, "_nextPutAll_", [smalltalk.send(unescape("%5D%3B"), "__comma", [smalltalk.send((smalltalk.String || String), "_lf", [])])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){(function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send("smalltalk.", "__comma", [smalltalk.send(self, "_classNameFor_", [smalltalk.send(aClass, "_class", [])])])]);return smalltalk.send($rec, "_nextPutAll_", [unescape(".iVarNames%20%3D%20%5B")]);})(aStream);smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_instanceVariableNames", []), "_do_separatedBy_", [(function(each){return smalltalk.send(aStream, "_nextPutAll_", [smalltalk.send(smalltalk.send(unescape("%27"), "__comma", [each]), "__comma", [unescape("%27")])]);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [unescape("%2C")]);})]);return smalltalk.send(aStream, "_nextPutAll_", [smalltalk.send(unescape("%5D%3B"), "__comma", [smalltalk.send((smalltalk.String || String), "_lf", [])])]);})]));
  10593. return self;},
  10594. args: ["aClass", "aStream"],
  10595. source: unescape('exportMetaDefinitionOf%3A%20aClass%20on%3A%20aStream%0A%09aClass%20class%20instanceVariableNames%20isEmpty%20ifFalse%3A%20%5B%0A%09%20%20%20%20aStream%20%0A%09%09nextPutAll%3A%20%27smalltalk.%27%2C%20%28self%20classNameFor%3A%20aClass%20class%29%3B%0A%09%09nextPutAll%3A%20%27.iVarNames%20%3D%20%5B%27.%0A%09%20%20%20%20aClass%20class%20instanceVariableNames%0A%09%09do%3A%20%5B%3Aeach%20%7C%20aStream%20nextPutAll%3A%20%27%27%27%27%2C%20each%2C%20%27%27%27%27%5D%0A%09%09separatedBy%3A%20%5BaStream%20nextPutAll%3A%20%27%2C%27%5D.%0A%09%20%20%20%20aStream%20nextPutAll%3A%20%27%5D%3B%27%2C%20String%20lf%5D'),
  10596. messageSends: ["ifFalse:", "isEmpty", "instanceVariableNames", "class", "nextPutAll:", unescape("%2C"), "classNameFor:", "do:separatedBy:", "lf"],
  10597. referencedClasses: ["String"]
  10598. }),
  10599. smalltalk.Exporter);
  10600. smalltalk.addMethod(
  10601. unescape('_exportMethodsOf_on_'),
  10602. smalltalk.method({
  10603. selector: unescape('exportMethodsOf%3Aon%3A'),
  10604. category: 'private',
  10605. fn: function (aClass, aStream){
  10606. var self=this;
  10607. smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_methodDictionary", []), "_values", []), "_do_", [(function(each){return ((($receiver = smalltalk.send(smalltalk.send(each, "_category", []), "_match_", [unescape("%5E%5C*")])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_exportMethod_of_on_", [each, aClass, aStream]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self, "_exportMethod_of_on_", [each, aClass, aStream]);})]));})]);
  10608. smalltalk.send(aStream, "_lf", []);
  10609. return self;},
  10610. args: ["aClass", "aStream"],
  10611. source: unescape('exportMethodsOf%3A%20aClass%20on%3A%20aStream%0A%09aClass%20methodDictionary%20values%20do%3A%20%5B%3Aeach%20%7C%0A%09%09%28each%20category%20match%3A%20%27%5E%5C*%27%29%20ifFalse%3A%20%5B%0A%09%09%09self%20exportMethod%3A%20each%20of%3A%20aClass%20on%3A%20aStream%5D%5D.%0A%09aStream%20lf'),
  10612. messageSends: ["do:", "values", "methodDictionary", "ifFalse:", "match:", "category", "exportMethod:of:on:", "lf"],
  10613. referencedClasses: []
  10614. }),
  10615. smalltalk.Exporter);
  10616. smalltalk.addMethod(
  10617. unescape('_classNameFor_'),
  10618. smalltalk.method({
  10619. selector: unescape('classNameFor%3A'),
  10620. category: 'private',
  10621. fn: function (aClass){
  10622. var self=this;
  10623. return ((($receiver = smalltalk.send(aClass, "_isMetaclass", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_instanceClass", []), "_name", []), "__comma", [".klass"]);})() : (function(){return ((($receiver = smalltalk.send(aClass, "_isNil", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "nil";})() : (function(){return smalltalk.send(aClass, "_name", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "nil";}), (function(){return smalltalk.send(aClass, "_name", []);})]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_instanceClass", []), "_name", []), "__comma", [".klass"]);}), (function(){return ((($receiver = smalltalk.send(aClass, "_isNil", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "nil";})() : (function(){return smalltalk.send(aClass, "_name", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "nil";}), (function(){return smalltalk.send(aClass, "_name", []);})]));})]));
  10624. return self;},
  10625. args: ["aClass"],
  10626. source: unescape('classNameFor%3A%20aClass%0A%09%5EaClass%20isMetaclass%0A%09%20%20%20%20ifTrue%3A%20%5BaClass%20instanceClass%20name%2C%20%27.klass%27%5D%0A%09%20%20%20%20ifFalse%3A%20%5B%0A%09%09aClass%20isNil%0A%09%09%20%20%20%20ifTrue%3A%20%5B%27nil%27%5D%0A%09%09%20%20%20%20ifFalse%3A%20%5BaClass%20name%5D%5D'),
  10627. messageSends: ["ifTrue:ifFalse:", "isMetaclass", unescape("%2C"), "name", "instanceClass", "isNil"],
  10628. referencedClasses: []
  10629. }),
  10630. smalltalk.Exporter);
  10631. smalltalk.addMethod(
  10632. unescape('_exportMethod_of_on_'),
  10633. smalltalk.method({
  10634. selector: unescape('exportMethod%3Aof%3Aon%3A'),
  10635. category: 'private',
  10636. fn: function (aMethod, aClass, aStream){
  10637. var self=this;
  10638. (function($rec){smalltalk.send($rec, "_nextPutAll_", [unescape("smalltalk.addMethod%28")]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(unescape("unescape%28%27"), "__comma", [smalltalk.send(smalltalk.send(smalltalk.send(aMethod, "_selector", []), "_asSelector", []), "_escaped", [])]), "__comma", [unescape("%27%29%2C")])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [unescape("smalltalk.method%28%7B")]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(unescape("selector%3A%20unescape%28%27"), "__comma", [smalltalk.send(smalltalk.send(aMethod, "_selector", []), "_escaped", [])]), "__comma", [unescape("%27%29%2C")])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(unescape("category%3A%20%27"), "__comma", [smalltalk.send(aMethod, "_category", [])]), "__comma", [unescape("%27%2C")])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("fn: ", "__comma", [smalltalk.send(smalltalk.send(aMethod, "_fn", []), "_compiledSource", [])]), "__comma", [unescape("%2C")])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("args: ", "__comma", [smalltalk.send(smalltalk.send(aMethod, "_arguments", []), "_asJavascript", [])]), "__comma", [unescape("%2C")])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(unescape("source%3A%20unescape%28%27"), "__comma", [smalltalk.send(smalltalk.send(aMethod, "_source", []), "_escaped", [])]), "__comma", [unescape("%27%29%2C")])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("messageSends: ", "__comma", [smalltalk.send(smalltalk.send(aMethod, "_messageSends", []), "_asJavascript", [])]), "__comma", [unescape("%2C")])]);smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_nextPutAll_", [smalltalk.send("referencedClasses: ", "__comma", [smalltalk.send(smalltalk.send(aMethod, "_referencedClasses", []), "_asJavascript", [])])]);})(aStream);
  10639. (function($rec){smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [unescape("%7D%29%2C")]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send("smalltalk.", "__comma", [smalltalk.send(self, "_classNameFor_", [aClass])])]);smalltalk.send($rec, "_nextPutAll_", [unescape("%29%3B")]);smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_lf", []);})(aStream);
  10640. return self;},
  10641. args: ["aMethod", "aClass", "aStream"],
  10642. source: unescape('exportMethod%3A%20aMethod%20of%3A%20aClass%20on%3A%20aStream%0A%09aStream%20%0A%09%09nextPutAll%3A%20%27smalltalk.addMethod%28%27%3Blf%3B%0A%09%09nextPutAll%3A%20%27unescape%28%27%27%27%2C%20aMethod%20selector%20asSelector%20escaped%2C%20%27%27%27%29%2C%27%3Blf%3B%0A%09%09nextPutAll%3A%20%27smalltalk.method%28%7B%27%3Blf%3B%0A%09%09nextPutAll%3A%20%27selector%3A%20unescape%28%27%27%27%2C%20aMethod%20selector%20escaped%2C%20%27%27%27%29%2C%27%3Blf%3B%0A%09%09nextPutAll%3A%20%27category%3A%20%27%27%27%2C%20aMethod%20category%2C%20%27%27%27%2C%27%3Blf%3B%0A%09%09nextPutAll%3A%20%27fn%3A%20%27%2C%20aMethod%20fn%20compiledSource%2C%20%27%2C%27%3Blf%3B%0A%09%09nextPutAll%3A%20%27args%3A%20%27%2C%20aMethod%20arguments%20asJavascript%2C%20%27%2C%27%3B%20lf%3B%0A%09%09nextPutAll%3A%20%27source%3A%20unescape%28%27%27%27%2C%20aMethod%20source%20escaped%2C%20%27%27%27%29%2C%27%3Blf%3B%0A%09%09nextPutAll%3A%20%27messageSends%3A%20%27%2C%20aMethod%20messageSends%20asJavascript%2C%20%27%2C%27%3Blf%3B%0A%09%09nextPutAll%3A%20%27referencedClasses%3A%20%27%2C%20aMethod%20referencedClasses%20asJavascript.%0A%09aStream%0A%09%09lf%3B%0A%09%09nextPutAll%3A%20%27%7D%29%2C%27%3Blf%3B%0A%09%09nextPutAll%3A%20%27smalltalk.%27%2C%20%28self%20classNameFor%3A%20aClass%29%3B%0A%09%09nextPutAll%3A%20%27%29%3B%27%3Blf%3Blf'),
  10643. messageSends: ["nextPutAll:", "lf", unescape("%2C"), "escaped", "asSelector", "selector", "category", "compiledSource", "fn", "asJavascript", "arguments", "source", "messageSends", "referencedClasses", "classNameFor:"],
  10644. referencedClasses: []
  10645. }),
  10646. smalltalk.Exporter);
  10647. smalltalk.addMethod(
  10648. unescape('_exportPackage_'),
  10649. smalltalk.method({
  10650. selector: unescape('exportPackage%3A'),
  10651. category: 'fileOut',
  10652. fn: function (packageName){
  10653. var self=this;
  10654. var package=nil;
  10655. return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(stream){(package=smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_packageAt_", [packageName]));smalltalk.send(self, "_exportPackageDefinitionOf_on_", [package, stream]);smalltalk.send(smalltalk.send(package, "_classes", []), "_do_", [(function(each){return smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(self, "_exportClass_", [each])]);})]);return smalltalk.send(self, "_exportPackageExtensionsOf_on_", [package, stream]);})]);
  10656. return self;},
  10657. args: ["packageName"],
  10658. source: unescape('exportPackage%3A%20packageName%0A%09%22Export%20a%20given%20package%20by%20name.%22%0A%0A%09%7C%20package%20%7C%0A%09%5EString%20streamContents%3A%20%5B%3Astream%20%7C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20package%20%3A%3D%20Smalltalk%20current%20packageAt%3A%20packageName.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20self%20exportPackageDefinitionOf%3A%20package%20on%3A%20stream.%0A%09%20%20%20%20%09package%20classes%20do%3A%20%5B%3Aeach%20%7C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20stream%20nextPutAll%3A%20%28self%20exportClass%3A%20each%29%5D.%0A%09%09self%20exportPackageExtensionsOf%3A%20package%20on%3A%20stream%5D'),
  10659. messageSends: ["streamContents:", "packageAt:", "current", "exportPackageDefinitionOf:on:", "do:", "classes", "nextPutAll:", "exportClass:", "exportPackageExtensionsOf:on:"],
  10660. referencedClasses: ["String", "Smalltalk"]
  10661. }),
  10662. smalltalk.Exporter);
  10663. smalltalk.addMethod(
  10664. unescape('_exportAll'),
  10665. smalltalk.method({
  10666. selector: unescape('exportAll'),
  10667. category: 'fileOut',
  10668. fn: function (){
  10669. var self=this;
  10670. return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(stream){return smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_packages", []), "_do_", [(function(pkg){return smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(self, "_exportPackage_", [smalltalk.send(pkg, "_name", [])])]);})]);})]);
  10671. return self;},
  10672. args: [],
  10673. source: unescape('exportAll%0A%20%20%20%20%22Export%20all%20packages%20in%20the%20system.%22%0A%0A%20%20%20%20%5EString%20streamContents%3A%20%5B%3Astream%20%7C%0A%20%20%20%20%09Smalltalk%20current%20packages%20do%3A%20%5B%3Apkg%20%7C%0A%09%09stream%20nextPutAll%3A%20%28self%20exportPackage%3A%20pkg%20name%29%5D%5D'),
  10674. messageSends: ["streamContents:", "do:", "packages", "current", "nextPutAll:", "exportPackage:", "name"],
  10675. referencedClasses: ["String", "Smalltalk"]
  10676. }),
  10677. smalltalk.Exporter);
  10678. smalltalk.addMethod(
  10679. unescape('_exportClass_'),
  10680. smalltalk.method({
  10681. selector: unescape('exportClass%3A'),
  10682. category: 'fileOut',
  10683. fn: function (aClass){
  10684. var self=this;
  10685. return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(stream){smalltalk.send(self, "_exportDefinitionOf_on_", [aClass, stream]);smalltalk.send(self, "_exportMethodsOf_on_", [aClass, stream]);smalltalk.send(self, "_exportMetaDefinitionOf_on_", [aClass, stream]);return smalltalk.send(self, "_exportMethodsOf_on_", [smalltalk.send(aClass, "_class", []), stream]);})]);
  10686. return self;},
  10687. args: ["aClass"],
  10688. source: unescape('exportClass%3A%20aClass%0A%09%22Export%20a%20single%20class.%20Subclasses%20override%20these%20methods.%22%0A%0A%09%5EString%20streamContents%3A%20%5B%3Astream%20%7C%0A%09%09self%20exportDefinitionOf%3A%20aClass%20on%3A%20stream.%0A%09%09self%20exportMethodsOf%3A%20aClass%20on%3A%20stream.%0A%09%09self%20exportMetaDefinitionOf%3A%20aClass%20on%3A%20stream.%0A%09%09self%20exportMethodsOf%3A%20aClass%20class%20on%3A%20stream%5D'),
  10689. messageSends: ["streamContents:", "exportDefinitionOf:on:", "exportMethodsOf:on:", "exportMetaDefinitionOf:on:", "class"],
  10690. referencedClasses: ["String"]
  10691. }),
  10692. smalltalk.Exporter);
  10693. smalltalk.addMethod(
  10694. unescape('_exportPackageExtensionsOf_on_'),
  10695. smalltalk.method({
  10696. selector: unescape('exportPackageExtensionsOf%3Aon%3A'),
  10697. category: 'private',
  10698. fn: function (package, aStream){
  10699. var self=this;
  10700. var name=nil;
  10701. (name=smalltalk.send(package, "_name", []));
  10702. smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_classes", []), "__comma", [smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_classes", []), "_collect_", [(function(each){return smalltalk.send(each, "_class", []);})])]), "_do_", [(function(each){return smalltalk.send(smalltalk.send(smalltalk.send(each, "_methodDictionary", []), "_values", []), "_do_", [(function(method){return ((($receiver = smalltalk.send(smalltalk.send(method, "_category", []), "__eq", [smalltalk.send(unescape("*"), "__comma", [name])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_exportMethod_of_on_", [method, each, aStream]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self, "_exportMethod_of_on_", [method, each, aStream]);})]));})]);})]);
  10703. return self;},
  10704. args: ["package", "aStream"],
  10705. source: unescape('exportPackageExtensionsOf%3A%20package%20on%3A%20aStream%0A%09%7C%20name%20%7C%0A%09name%20%3A%3D%20package%20name.%0A%09Smalltalk%20current%20classes%2C%20%28Smalltalk%20current%20classes%20collect%3A%20%5B%3Aeach%20%7C%20each%20class%5D%29%20do%3A%20%5B%3Aeach%20%7C%0A%09%09each%20methodDictionary%20values%20do%3A%20%5B%3Amethod%20%7C%0A%09%09%09method%20category%20%3D%20%28%27*%27%2C%20name%29%20ifTrue%3A%20%5B%0A%09%09%09%09self%20exportMethod%3A%20method%20of%3A%20each%20on%3A%20aStream%5D%5D%5D'),
  10706. messageSends: ["name", "do:", unescape("%2C"), "classes", "current", "collect:", "class", "values", "methodDictionary", "ifTrue:", unescape("%3D"), "category", "exportMethod:of:on:"],
  10707. referencedClasses: ["Smalltalk"]
  10708. }),
  10709. smalltalk.Exporter);
  10710. smalltalk.addMethod(
  10711. unescape('_exportPackageDefinitionOf_on_'),
  10712. smalltalk.method({
  10713. selector: unescape('exportPackageDefinitionOf%3Aon%3A'),
  10714. category: 'private',
  10715. fn: function (package, aStream){
  10716. var self=this;
  10717. (function($rec){smalltalk.send($rec, "_nextPutAll_", [unescape("smalltalk.addPackage%28")]);return smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(unescape("%27"), "__comma", [smalltalk.send(package, "_name", [])]), "__comma", [unescape("%27%2C%20")]), "__comma", [smalltalk.send(package, "_propertiesAsJSON", [])]), "__comma", [unescape("%29%3B")])]);})(aStream);
  10718. smalltalk.send(aStream, "_lf", []);
  10719. return self;},
  10720. args: ["package", "aStream"],
  10721. source: unescape('exportPackageDefinitionOf%3A%20package%20on%3A%20aStream%0A%09aStream%20%0A%09%20%20%20%20nextPutAll%3A%20%27smalltalk.addPackage%28%27%3B%0A%09%20%20%20%20nextPutAll%3A%20%27%27%27%27%2C%20package%20name%2C%20%27%27%27%2C%20%27%2C%20package%20propertiesAsJSON%20%2C%20%27%29%3B%27.%0A%09aStream%20lf'),
  10722. messageSends: ["nextPutAll:", unescape("%2C"), "name", "propertiesAsJSON", "lf"],
  10723. referencedClasses: []
  10724. }),
  10725. smalltalk.Exporter);
  10726. smalltalk.addClass('ChunkExporter', smalltalk.Exporter, [], 'Compiler');
  10727. smalltalk.addMethod(
  10728. unescape('_exportDefinitionOf_on_'),
  10729. smalltalk.method({
  10730. selector: unescape('exportDefinitionOf%3Aon%3A'),
  10731. category: 'not yet classified',
  10732. fn: function (aClass, aStream){
  10733. var self=this;
  10734. (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_classNameFor_", [smalltalk.send(aClass, "_superclass", [])])]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(unescape("%20subclass%3A%20%23"), "__comma", [smalltalk.send(self, "_classNameFor_", [aClass])])]);smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_nextPutAll_", [unescape("%09instanceVariableNames%3A%20%27")]);})(aStream);
  10735. smalltalk.send(smalltalk.send(aClass, "_instanceVariableNames", []), "_do_separatedBy_", [(function(each){return smalltalk.send(aStream, "_nextPutAll_", [each]);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [" "]);})]);
  10736. (function($rec){smalltalk.send($rec, "_nextPutAll_", [unescape("%27")]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(unescape("%09category%3A%20%27"), "__comma", [smalltalk.send(aClass, "_category", [])]), "__comma", [unescape("%27%21")])]);return smalltalk.send($rec, "_lf", []);})(aStream);
  10737. ((($receiver = smalltalk.send(smalltalk.send(aClass, "_comment", []), "_notEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(unescape("%21"), "__comma", [smalltalk.send(self, "_classNameFor_", [aClass])]), "__comma", [unescape("%20commentStamp%21")])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(self, "_chunkEscape_", [smalltalk.send(aClass, "_comment", [])]), "__comma", [unescape("%21")])]);return smalltalk.send($rec, "_lf", []);})(aStream);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(unescape("%21"), "__comma", [smalltalk.send(self, "_classNameFor_", [aClass])]), "__comma", [unescape("%20commentStamp%21")])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(self, "_chunkEscape_", [smalltalk.send(aClass, "_comment", [])]), "__comma", [unescape("%21")])]);return smalltalk.send($rec, "_lf", []);})(aStream);})]));
  10738. smalltalk.send(aStream, "_lf", []);
  10739. return self;},
  10740. args: ["aClass", "aStream"],
  10741. source: unescape('exportDefinitionOf%3A%20aClass%20on%3A%20aStream%0A%09%22Chunk%20format.%22%0A%0A%09aStream%20%0A%09%20%20%20%20nextPutAll%3A%20%28self%20classNameFor%3A%20aClass%20superclass%29%3B%0A%09%20%20%20%20nextPutAll%3A%20%27%20subclass%3A%20%23%27%2C%20%28self%20classNameFor%3A%20aClass%29%3B%20lf%3B%0A%09%20%20%20%20nextPutAll%3A%20%27%09instanceVariableNames%3A%20%27%27%27.%0A%09aClass%20instanceVariableNames%20%0A%09%20%20%20%20do%3A%20%5B%3Aeach%20%7C%20aStream%20nextPutAll%3A%20each%5D%0A%09%20%20%20%20separatedBy%3A%20%5BaStream%20nextPutAll%3A%20%27%20%27%5D.%0A%09aStream%09%0A%09%20%20%20%20nextPutAll%3A%20%27%27%27%27%3B%20lf%3B%0A%09%20%20%20%20nextPutAll%3A%20%27%09category%3A%20%27%27%27%2C%20aClass%20category%2C%20%27%27%27%21%27%3B%20lf.%0A%20%09aClass%20comment%20notEmpty%20ifTrue%3A%20%5B%0A%09%20%20%20%20aStream%20%0A%09%09nextPutAll%3A%20%27%21%27%2C%20%28self%20classNameFor%3A%20aClass%29%2C%20%27%20commentStamp%21%27%3Blf%3B%0A%09%09nextPutAll%3A%20%28self%20chunkEscape%3A%20aClass%20comment%29%2C%20%27%21%27%3Blf%5D.%0A%09aStream%20lf'),
  10742. messageSends: ["nextPutAll:", "classNameFor:", "superclass", unescape("%2C"), "lf", "do:separatedBy:", "instanceVariableNames", "category", "ifTrue:", "notEmpty", "comment", "chunkEscape:"],
  10743. referencedClasses: []
  10744. }),
  10745. smalltalk.ChunkExporter);
  10746. smalltalk.addMethod(
  10747. unescape('_exportMethod_of_on_'),
  10748. smalltalk.method({
  10749. selector: unescape('exportMethod%3Aof%3Aon%3A'),
  10750. category: 'not yet classified',
  10751. fn: function (aMethod, aClass, aStream){
  10752. var self=this;
  10753. (function($rec){smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_chunkEscape_", [smalltalk.send(aMethod, "_source", [])])]);smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_nextPutAll_", [unescape("%21")]);})(aStream);
  10754. return self;},
  10755. args: ["aMethod", "aClass", "aStream"],
  10756. source: unescape('exportMethod%3A%20aMethod%20of%3A%20aClass%20on%3A%20aStream%0A%09aStream%20%0A%09%09lf%3B%20lf%3B%20nextPutAll%3A%20%28self%20chunkEscape%3A%20aMethod%20source%29%3B%20lf%3B%0A%09%09nextPutAll%3A%20%27%21%27'),
  10757. messageSends: ["lf", "nextPutAll:", "chunkEscape:", "source"],
  10758. referencedClasses: []
  10759. }),
  10760. smalltalk.ChunkExporter);
  10761. smalltalk.addMethod(
  10762. unescape('_exportMethodsOf_on_'),
  10763. smalltalk.method({
  10764. selector: unescape('exportMethodsOf%3Aon%3A'),
  10765. category: 'not yet classified',
  10766. fn: function (aClass, aStream){
  10767. var self=this;
  10768. smalltalk.send(aClass, "_protocolsDo_", [(function(category, methods){return ((($receiver = smalltalk.send(category, "_match_", [unescape("%5E%5C*")])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_exportMethods_category_of_on_", [methods, category, aClass, aStream]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self, "_exportMethods_category_of_on_", [methods, category, aClass, aStream]);})]));})]);
  10769. return self;},
  10770. args: ["aClass", "aStream"],
  10771. source: unescape('exportMethodsOf%3A%20aClass%20on%3A%20aStream%0A%0A%20%20%20aClass%20protocolsDo%3A%20%5B%3Acategory%20%3Amethods%20%7C%0A%09%28category%20match%3A%20%27%5E%5C*%27%29%20ifFalse%3A%20%5B%20%0A%09%09self%0A%09%09%09exportMethods%3A%20methods%0A%09%09%09category%3A%20category%0A%09%09%09of%3A%20aClass%0A%09%09%09on%3A%20aStream%5D%5D'),
  10772. messageSends: ["protocolsDo:", "ifFalse:", "match:", "exportMethods:category:of:on:"],
  10773. referencedClasses: []
  10774. }),
  10775. smalltalk.ChunkExporter);
  10776. smalltalk.addMethod(
  10777. unescape('_exportMetaDefinitionOf_on_'),
  10778. smalltalk.method({
  10779. selector: unescape('exportMetaDefinitionOf%3Aon%3A'),
  10780. category: 'not yet classified',
  10781. fn: function (aClass, aStream){
  10782. var self=this;
  10783. ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_instanceVariableNames", []), "_isEmpty", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){(function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_classNameFor_", [smalltalk.send(aClass, "_class", [])])]);return smalltalk.send($rec, "_nextPutAll_", [unescape("%20instanceVariableNames%3A%20%27")]);})(aStream);smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_instanceVariableNames", []), "_do_separatedBy_", [(function(each){return smalltalk.send(aStream, "_nextPutAll_", [each]);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [" "]);})]);return (function($rec){smalltalk.send($rec, "_nextPutAll_", [unescape("%27%21")]);smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_lf", []);})(aStream);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){(function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_classNameFor_", [smalltalk.send(aClass, "_class", [])])]);return smalltalk.send($rec, "_nextPutAll_", [unescape("%20instanceVariableNames%3A%20%27")]);})(aStream);smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_instanceVariableNames", []), "_do_separatedBy_", [(function(each){return smalltalk.send(aStream, "_nextPutAll_", [each]);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [" "]);})]);return (function($rec){smalltalk.send($rec, "_nextPutAll_", [unescape("%27%21")]);smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_lf", []);})(aStream);})]));
  10784. return self;},
  10785. args: ["aClass", "aStream"],
  10786. source: unescape('exportMetaDefinitionOf%3A%20aClass%20on%3A%20aStream%0A%0A%09aClass%20class%20instanceVariableNames%20isEmpty%20ifFalse%3A%20%5B%0A%09%09aStream%20%0A%09%09%20%20%20%20nextPutAll%3A%20%28self%20classNameFor%3A%20aClass%20class%29%3B%0A%09%09%20%20%20%20nextPutAll%3A%20%27%20instanceVariableNames%3A%20%27%27%27.%0A%09%09aClass%20class%20instanceVariableNames%20%0A%09%09%20%20%20%20do%3A%20%5B%3Aeach%20%7C%20aStream%20nextPutAll%3A%20each%5D%0A%09%09%20%20%20%20separatedBy%3A%20%5BaStream%20nextPutAll%3A%20%27%20%27%5D.%0A%09%09aStream%09%0A%09%09%20%20%20%20nextPutAll%3A%20%27%27%27%21%27%3B%20lf%3B%20lf%5D'),
  10787. messageSends: ["ifFalse:", "isEmpty", "instanceVariableNames", "class", "nextPutAll:", "classNameFor:", "do:separatedBy:", "lf"],
  10788. referencedClasses: []
  10789. }),
  10790. smalltalk.ChunkExporter);
  10791. smalltalk.addMethod(
  10792. unescape('_classNameFor_'),
  10793. smalltalk.method({
  10794. selector: unescape('classNameFor%3A'),
  10795. category: 'not yet classified',
  10796. fn: function (aClass){
  10797. var self=this;
  10798. return ((($receiver = smalltalk.send(aClass, "_isMetaclass", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_instanceClass", []), "_name", []), "__comma", [" class"]);})() : (function(){return ((($receiver = smalltalk.send(aClass, "_isNil", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "nil";})() : (function(){return smalltalk.send(aClass, "_name", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "nil";}), (function(){return smalltalk.send(aClass, "_name", []);})]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_instanceClass", []), "_name", []), "__comma", [" class"]);}), (function(){return ((($receiver = smalltalk.send(aClass, "_isNil", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "nil";})() : (function(){return smalltalk.send(aClass, "_name", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "nil";}), (function(){return smalltalk.send(aClass, "_name", []);})]));})]));
  10799. return self;},
  10800. args: ["aClass"],
  10801. source: unescape('classNameFor%3A%20aClass%0A%09%5EaClass%20isMetaclass%0A%09%20%20%20%20ifTrue%3A%20%5BaClass%20instanceClass%20name%2C%20%27%20class%27%5D%0A%09%20%20%20%20ifFalse%3A%20%5B%0A%09%09aClass%20isNil%0A%09%09%20%20%20%20ifTrue%3A%20%5B%27nil%27%5D%0A%09%09%20%20%20%20ifFalse%3A%20%5BaClass%20name%5D%5D'),
  10802. messageSends: ["ifTrue:ifFalse:", "isMetaclass", unescape("%2C"), "name", "instanceClass", "isNil"],
  10803. referencedClasses: []
  10804. }),
  10805. smalltalk.ChunkExporter);
  10806. smalltalk.addMethod(
  10807. unescape('_chunkEscape_'),
  10808. smalltalk.method({
  10809. selector: unescape('chunkEscape%3A'),
  10810. category: 'not yet classified',
  10811. fn: function (aString){
  10812. var self=this;
  10813. return smalltalk.send(smalltalk.send(aString, "_replace_with_", [unescape("%21"), unescape("%21%21")]), "_trimBoth", []);
  10814. return self;},
  10815. args: ["aString"],
  10816. source: unescape('chunkEscape%3A%20aString%0A%09%22Replace%20all%20occurrences%20of%20%21%20with%20%21%21%20and%20trim%20at%20both%20ends.%22%0A%0A%09%5E%28aString%20replace%3A%20%27%21%27%20with%3A%20%27%21%21%27%29%20trimBoth'),
  10817. messageSends: ["trimBoth", "replace:with:"],
  10818. referencedClasses: []
  10819. }),
  10820. smalltalk.ChunkExporter);
  10821. smalltalk.addMethod(
  10822. unescape('_exportMethods_category_of_on_'),
  10823. smalltalk.method({
  10824. selector: unescape('exportMethods%3Acategory%3Aof%3Aon%3A'),
  10825. category: 'not yet classified',
  10826. fn: function (methods, category, aClass, aStream){
  10827. var self=this;
  10828. (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(unescape("%21"), "__comma", [smalltalk.send(self, "_classNameFor_", [aClass])])]);return smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(unescape("%20methodsFor%3A%20%27"), "__comma", [category]), "__comma", [unescape("%27%21")])]);})(aStream);
  10829. smalltalk.send(methods, "_do_", [(function(each){return smalltalk.send(self, "_exportMethod_of_on_", [each, aClass, aStream]);})]);
  10830. (function($rec){smalltalk.send($rec, "_nextPutAll_", [unescape("%20%21")]);smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_lf", []);})(aStream);
  10831. return self;},
  10832. args: ["methods", "category", "aClass", "aStream"],
  10833. source: unescape('exportMethods%3A%20methods%20category%3A%20category%20of%3A%20aClass%20on%3A%20aStream%0A%0A%09aStream%0A%09%09nextPutAll%3A%20%27%21%27%2C%20%28self%20classNameFor%3A%20aClass%29%3B%0A%09%09nextPutAll%3A%20%27%20methodsFor%3A%20%27%27%27%2C%20category%2C%20%27%27%27%21%27.%0A%20%20%20%20%09methods%20do%3A%20%5B%3Aeach%20%7C%0A%09%09self%20exportMethod%3A%20each%20of%3A%20aClass%20on%3A%20aStream%5D.%0A%09aStream%20nextPutAll%3A%20%27%20%21%27%3B%20lf%3B%20lf'),
  10834. messageSends: ["nextPutAll:", unescape("%2C"), "classNameFor:", "do:", "exportMethod:of:on:", "lf"],
  10835. referencedClasses: []
  10836. }),
  10837. smalltalk.ChunkExporter);
  10838. smalltalk.addMethod(
  10839. unescape('_exportPackageExtensionsOf_on_'),
  10840. smalltalk.method({
  10841. selector: unescape('exportPackageExtensionsOf%3Aon%3A'),
  10842. category: 'not yet classified',
  10843. fn: function (package, aStream){
  10844. var self=this;
  10845. var name=nil;
  10846. (name=smalltalk.send(package, "_name", []));
  10847. smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_classes", []), "__comma", [smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_classes", []), "_collect_", [(function(each){return smalltalk.send(each, "_class", []);})])]), "_do_", [(function(each){return smalltalk.send(each, "_protocolsDo_", [(function(category, methods){return ((($receiver = smalltalk.send(category, "__eq", [smalltalk.send(unescape("*"), "__comma", [name])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_exportMethods_category_of_on_", [methods, category, each, aStream]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self, "_exportMethods_category_of_on_", [methods, category, each, aStream]);})]));})]);})]);
  10848. return self;},
  10849. args: ["package", "aStream"],
  10850. source: unescape('exportPackageExtensionsOf%3A%20package%20on%3A%20aStream%0A%09%22We%20need%20to%20override%20this%20one%20too%20since%20we%20need%20to%20group%0A%09all%20methods%20in%20a%20given%20protocol%20under%20a%20leading%20methodsFor%3A%20chunk%0A%09for%20that%20class.%22%0A%0A%09%7C%20name%20%7C%0A%09name%20%3A%3D%20package%20name.%0A%09Smalltalk%20current%20classes%2C%20%28Smalltalk%20current%20classes%20collect%3A%20%5B%3Aeach%20%7C%20each%20class%5D%29%20do%3A%20%5B%3Aeach%20%7C%0A%09%09each%20protocolsDo%3A%20%5B%3Acategory%20%3Amethods%20%7C%0A%09%09%09category%20%3D%20%28%27*%27%2C%20name%29%20ifTrue%3A%20%5B%0A%09%09%09%09self%20exportMethods%3A%20methods%20category%3A%20category%20of%3A%20each%20on%3A%20aStream%5D%5D%5D'),
  10851. messageSends: ["name", "do:", unescape("%2C"), "classes", "current", "collect:", "class", "protocolsDo:", "ifTrue:", unescape("%3D"), "exportMethods:category:of:on:"],
  10852. referencedClasses: ["Smalltalk"]
  10853. }),
  10854. smalltalk.ChunkExporter);
  10855. smalltalk.addMethod(
  10856. unescape('_exportPackageDefinitionOf_on_'),
  10857. smalltalk.method({
  10858. selector: unescape('exportPackageDefinitionOf%3Aon%3A'),
  10859. category: 'not yet classified',
  10860. fn: function (package, aStream){
  10861. var self=this;
  10862. (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(unescape("Smalltalk%20current%20createPackage%3A%20%27"), "__comma", [smalltalk.send(package, "_name", [])]), "__comma", [unescape("%27%20properties%3A%20")]), "__comma", [smalltalk.send(smalltalk.send(package, "_properties", []), "_storeString", [])]), "__comma", [unescape("%21")])]);return smalltalk.send($rec, "_lf", []);})(aStream);
  10863. return self;},
  10864. args: ["package", "aStream"],
  10865. source: unescape('exportPackageDefinitionOf%3A%20package%20on%3A%20aStream%0A%09%22Chunk%20format.%22%0A%0A%09aStream%20%0A%09%20%20%20%20nextPutAll%3A%20%27Smalltalk%20current%20createPackage%3A%20%27%27%27%2C%20package%20name%2C%0A%09%09%27%27%27%20properties%3A%20%27%2C%20package%20properties%20storeString%2C%20%27%21%27%3B%20lf.'),
  10866. messageSends: ["nextPutAll:", unescape("%2C"), "name", "storeString", "properties", "lf"],
  10867. referencedClasses: []
  10868. }),
  10869. smalltalk.ChunkExporter);
  10870. smalltalk.addClass('StrippedExporter', smalltalk.Exporter, [], 'Compiler');
  10871. smalltalk.addMethod(
  10872. unescape('_exportDefinitionOf_on_'),
  10873. smalltalk.method({
  10874. selector: unescape('exportDefinitionOf%3Aon%3A'),
  10875. category: 'private',
  10876. fn: function (aClass, aStream){
  10877. var self=this;
  10878. (function($rec){smalltalk.send($rec, "_nextPutAll_", [unescape("smalltalk.addClass%28")]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(unescape("%27"), "__comma", [smalltalk.send(self, "_classNameFor_", [aClass])]), "__comma", [unescape("%27%2C%20")])]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send("smalltalk.", "__comma", [smalltalk.send(self, "_classNameFor_", [smalltalk.send(aClass, "_superclass", [])])])]);return smalltalk.send($rec, "_nextPutAll_", [unescape("%2C%20%5B")]);})(aStream);
  10879. smalltalk.send(smalltalk.send(aClass, "_instanceVariableNames", []), "_do_separatedBy_", [(function(each){return smalltalk.send(aStream, "_nextPutAll_", [smalltalk.send(smalltalk.send(unescape("%27"), "__comma", [each]), "__comma", [unescape("%27")])]);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [unescape("%2C%20")]);})]);
  10880. (function($rec){smalltalk.send($rec, "_nextPutAll_", [unescape("%5D%2C%20%27")]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(aClass, "_category", []), "__comma", [unescape("%27")])]);return smalltalk.send($rec, "_nextPutAll_", [unescape("%29%3B")]);})(aStream);
  10881. smalltalk.send(aStream, "_lf", []);
  10882. return self;},
  10883. args: ["aClass", "aStream"],
  10884. source: unescape('exportDefinitionOf%3A%20aClass%20on%3A%20aStream%0A%09aStream%20%0A%09%20%20%20%20nextPutAll%3A%20%27smalltalk.addClass%28%27%3B%0A%09%20%20%20%20nextPutAll%3A%20%27%27%27%27%2C%20%28self%20classNameFor%3A%20aClass%29%2C%20%27%27%27%2C%20%27%3B%0A%09%20%20%20%20nextPutAll%3A%20%27smalltalk.%27%2C%20%28self%20classNameFor%3A%20aClass%20superclass%29%3B%0A%09%20%20%20%20nextPutAll%3A%20%27%2C%20%5B%27.%0A%09aClass%20instanceVariableNames%20%0A%09%20%20%20%20do%3A%20%5B%3Aeach%20%7C%20aStream%20nextPutAll%3A%20%27%27%27%27%2C%20each%2C%20%27%27%27%27%5D%0A%09%20%20%20%20separatedBy%3A%20%5BaStream%20nextPutAll%3A%20%27%2C%20%27%5D.%0A%09aStream%09%0A%09%20%20%20%20nextPutAll%3A%20%27%5D%2C%20%27%27%27%3B%0A%09%20%20%20%20nextPutAll%3A%20aClass%20category%2C%20%27%27%27%27%3B%0A%09%20%20%20%20nextPutAll%3A%20%27%29%3B%27.%0A%09aStream%20lf'),
  10885. messageSends: ["nextPutAll:", unescape("%2C"), "classNameFor:", "superclass", "do:separatedBy:", "instanceVariableNames", "category", "lf"],
  10886. referencedClasses: []
  10887. }),
  10888. smalltalk.StrippedExporter);
  10889. smalltalk.addMethod(
  10890. unescape('_exportMethod_of_on_'),
  10891. smalltalk.method({
  10892. selector: unescape('exportMethod%3Aof%3Aon%3A'),
  10893. category: 'private',
  10894. fn: function (aMethod, aClass, aStream){
  10895. var self=this;
  10896. (function($rec){smalltalk.send($rec, "_nextPutAll_", [unescape("smalltalk.addMethod%28")]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(unescape("unescape%28%27"), "__comma", [smalltalk.send(smalltalk.send(smalltalk.send(aMethod, "_selector", []), "_asSelector", []), "_escaped", [])]), "__comma", [unescape("%27%29%2C")])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [unescape("smalltalk.method%28%7B")]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(unescape("selector%3A%20unescape%28%27"), "__comma", [smalltalk.send(smalltalk.send(aMethod, "_selector", []), "_escaped", [])]), "__comma", [unescape("%27%29%2C")])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send("fn: ", "__comma", [smalltalk.send(smalltalk.send(aMethod, "_fn", []), "_compiledSource", [])])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [unescape("%7D%29%2C")]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send("smalltalk.", "__comma", [smalltalk.send(self, "_classNameFor_", [aClass])])]);smalltalk.send($rec, "_nextPutAll_", [unescape("%29%3B")]);smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_lf", []);})(aStream);
  10897. return self;},
  10898. args: ["aMethod", "aClass", "aStream"],
  10899. source: unescape('exportMethod%3A%20aMethod%20of%3A%20aClass%20on%3A%20aStream%0A%09aStream%20%0A%09%09nextPutAll%3A%20%27smalltalk.addMethod%28%27%3Blf%3B%0A%09%09nextPutAll%3A%20%27unescape%28%27%27%27%2C%20aMethod%20selector%20asSelector%20escaped%2C%20%27%27%27%29%2C%27%3Blf%3B%0A%09%09nextPutAll%3A%20%27smalltalk.method%28%7B%27%3Blf%3B%0A%09%09nextPutAll%3A%20%27selector%3A%20unescape%28%27%27%27%2C%20aMethod%20selector%20escaped%2C%20%27%27%27%29%2C%27%3Blf%3B%0A%09%09nextPutAll%3A%20%27fn%3A%20%27%2C%20aMethod%20fn%20compiledSource%3Blf%3B%0A%09%09nextPutAll%3A%20%27%7D%29%2C%27%3Blf%3B%0A%09%09nextPutAll%3A%20%27smalltalk.%27%2C%20%28self%20classNameFor%3A%20aClass%29%3B%0A%09%09nextPutAll%3A%20%27%29%3B%27%3Blf%3Blf'),
  10900. messageSends: ["nextPutAll:", "lf", unescape("%2C"), "escaped", "asSelector", "selector", "compiledSource", "fn", "classNameFor:"],
  10901. referencedClasses: []
  10902. }),
  10903. smalltalk.StrippedExporter);
  10904. smalltalk.addClass('Node', smalltalk.Object, ['nodes'], 'Compiler');
  10905. smalltalk.addMethod(
  10906. unescape('_nodes'),
  10907. smalltalk.method({
  10908. selector: unescape('nodes'),
  10909. category: 'accessing',
  10910. fn: function (){
  10911. var self=this;
  10912. return (($receiver = self['@nodes']) == nil || $receiver == undefined) ? (function(){return (self['@nodes']=smalltalk.send((smalltalk.Array || Array), "_new", []));})() : $receiver;
  10913. return self;},
  10914. args: [],
  10915. source: unescape('nodes%0A%09%5Enodes%20ifNil%3A%20%5Bnodes%20%3A%3D%20Array%20new%5D'),
  10916. messageSends: ["ifNil:", "new"],
  10917. referencedClasses: ["Array"]
  10918. }),
  10919. smalltalk.Node);
  10920. smalltalk.addMethod(
  10921. unescape('_nodes_'),
  10922. smalltalk.method({
  10923. selector: unescape('nodes%3A'),
  10924. category: 'building',
  10925. fn: function (aCollection){
  10926. var self=this;
  10927. (self['@nodes']=aCollection);
  10928. return self;},
  10929. args: ["aCollection"],
  10930. source: unescape('nodes%3A%20aCollection%0A%09nodes%20%3A%3D%20aCollection'),
  10931. messageSends: [],
  10932. referencedClasses: []
  10933. }),
  10934. smalltalk.Node);
  10935. smalltalk.addMethod(
  10936. unescape('_addNode_'),
  10937. smalltalk.method({
  10938. selector: unescape('addNode%3A'),
  10939. category: 'accessing',
  10940. fn: function (aNode){
  10941. var self=this;
  10942. smalltalk.send(smalltalk.send(self, "_nodes", []), "_add_", [aNode]);
  10943. return self;},
  10944. args: ["aNode"],
  10945. source: unescape('addNode%3A%20aNode%0A%09self%20nodes%20add%3A%20aNode'),
  10946. messageSends: ["add:", "nodes"],
  10947. referencedClasses: []
  10948. }),
  10949. smalltalk.Node);
  10950. smalltalk.addMethod(
  10951. unescape('_accept_'),
  10952. smalltalk.method({
  10953. selector: unescape('accept%3A'),
  10954. category: 'visiting',
  10955. fn: function (aVisitor){
  10956. var self=this;
  10957. smalltalk.send(aVisitor, "_visitNode_", [self]);
  10958. return self;},
  10959. args: ["aVisitor"],
  10960. source: unescape('accept%3A%20aVisitor%0A%09aVisitor%20visitNode%3A%20self'),
  10961. messageSends: ["visitNode:"],
  10962. referencedClasses: []
  10963. }),
  10964. smalltalk.Node);
  10965. smalltalk.addMethod(
  10966. unescape('_isValueNode'),
  10967. smalltalk.method({
  10968. selector: unescape('isValueNode'),
  10969. category: 'testing',
  10970. fn: function (){
  10971. var self=this;
  10972. return false;
  10973. return self;},
  10974. args: [],
  10975. source: unescape('isValueNode%0A%09%5Efalse'),
  10976. messageSends: [],
  10977. referencedClasses: []
  10978. }),
  10979. smalltalk.Node);
  10980. smalltalk.addMethod(
  10981. unescape('_isBlockNode'),
  10982. smalltalk.method({
  10983. selector: unescape('isBlockNode'),
  10984. category: 'testing',
  10985. fn: function (){
  10986. var self=this;
  10987. return false;
  10988. return self;},
  10989. args: [],
  10990. source: unescape('isBlockNode%0A%09%5Efalse'),
  10991. messageSends: [],
  10992. referencedClasses: []
  10993. }),
  10994. smalltalk.Node);
  10995. smalltalk.addMethod(
  10996. unescape('_isBlockSequenceNode'),
  10997. smalltalk.method({
  10998. selector: unescape('isBlockSequenceNode'),
  10999. category: 'testing',
  11000. fn: function (){
  11001. var self=this;
  11002. return false;
  11003. return self;},
  11004. args: [],
  11005. source: unescape('isBlockSequenceNode%0A%09%5Efalse'),
  11006. messageSends: [],
  11007. referencedClasses: []
  11008. }),
  11009. smalltalk.Node);
  11010. smalltalk.addClass('MethodNode', smalltalk.Node, ['selector', 'arguments', 'source'], 'Compiler');
  11011. smalltalk.addMethod(
  11012. unescape('_selector'),
  11013. smalltalk.method({
  11014. selector: unescape('selector'),
  11015. category: 'accessing',
  11016. fn: function (){
  11017. var self=this;
  11018. return self['@selector'];
  11019. return self;},
  11020. args: [],
  11021. source: unescape('selector%0A%09%5Eselector'),
  11022. messageSends: [],
  11023. referencedClasses: []
  11024. }),
  11025. smalltalk.MethodNode);
  11026. smalltalk.addMethod(
  11027. unescape('_selector_'),
  11028. smalltalk.method({
  11029. selector: unescape('selector%3A'),
  11030. category: 'accessing',
  11031. fn: function (aString){
  11032. var self=this;
  11033. (self['@selector']=aString);
  11034. return self;},
  11035. args: ["aString"],
  11036. source: unescape('selector%3A%20aString%0A%09selector%20%3A%3D%20aString'),
  11037. messageSends: [],
  11038. referencedClasses: []
  11039. }),
  11040. smalltalk.MethodNode);
  11041. smalltalk.addMethod(
  11042. unescape('_arguments'),
  11043. smalltalk.method({
  11044. selector: unescape('arguments'),
  11045. category: 'accessing',
  11046. fn: function (){
  11047. var self=this;
  11048. return (($receiver = self['@arguments']) == nil || $receiver == undefined) ? (function(){return [];})() : $receiver;
  11049. return self;},
  11050. args: [],
  11051. source: unescape('arguments%0A%09%5Earguments%20ifNil%3A%20%5B%23%28%29%5D'),
  11052. messageSends: ["ifNil:"],
  11053. referencedClasses: []
  11054. }),
  11055. smalltalk.MethodNode);
  11056. smalltalk.addMethod(
  11057. unescape('_arguments_'),
  11058. smalltalk.method({
  11059. selector: unescape('arguments%3A'),
  11060. category: 'accessing',
  11061. fn: function (aCollection){
  11062. var self=this;
  11063. (self['@arguments']=aCollection);
  11064. return self;},
  11065. args: ["aCollection"],
  11066. source: unescape('arguments%3A%20aCollection%0A%09arguments%20%3A%3D%20aCollection'),
  11067. messageSends: [],
  11068. referencedClasses: []
  11069. }),
  11070. smalltalk.MethodNode);
  11071. smalltalk.addMethod(
  11072. unescape('_source'),
  11073. smalltalk.method({
  11074. selector: unescape('source'),
  11075. category: 'accessing',
  11076. fn: function (){
  11077. var self=this;
  11078. return self['@source'];
  11079. return self;},
  11080. args: [],
  11081. source: unescape('source%0A%09%5Esource'),
  11082. messageSends: [],
  11083. referencedClasses: []
  11084. }),
  11085. smalltalk.MethodNode);
  11086. smalltalk.addMethod(
  11087. unescape('_source_'),
  11088. smalltalk.method({
  11089. selector: unescape('source%3A'),
  11090. category: 'accessing',
  11091. fn: function (aString){
  11092. var self=this;
  11093. (self['@source']=aString);
  11094. return self;},
  11095. args: ["aString"],
  11096. source: unescape('source%3A%20aString%0A%09source%20%3A%3D%20aString'),
  11097. messageSends: [],
  11098. referencedClasses: []
  11099. }),
  11100. smalltalk.MethodNode);
  11101. smalltalk.addMethod(
  11102. unescape('_accept_'),
  11103. smalltalk.method({
  11104. selector: unescape('accept%3A'),
  11105. category: 'visiting',
  11106. fn: function (aVisitor){
  11107. var self=this;
  11108. smalltalk.send(aVisitor, "_visitMethodNode_", [self]);
  11109. return self;},
  11110. args: ["aVisitor"],
  11111. source: unescape('accept%3A%20aVisitor%0A%09aVisitor%20visitMethodNode%3A%20self'),
  11112. messageSends: ["visitMethodNode:"],
  11113. referencedClasses: []
  11114. }),
  11115. smalltalk.MethodNode);
  11116. smalltalk.addClass('SendNode', smalltalk.Node, ['selector', 'arguments', 'receiver'], 'Compiler');
  11117. smalltalk.addMethod(
  11118. unescape('_selector'),
  11119. smalltalk.method({
  11120. selector: unescape('selector'),
  11121. category: 'accessing',
  11122. fn: function (){
  11123. var self=this;
  11124. return self['@selector'];
  11125. return self;},
  11126. args: [],
  11127. source: unescape('selector%0A%09%5Eselector'),
  11128. messageSends: [],
  11129. referencedClasses: []
  11130. }),
  11131. smalltalk.SendNode);
  11132. smalltalk.addMethod(
  11133. unescape('_selector_'),
  11134. smalltalk.method({
  11135. selector: unescape('selector%3A'),
  11136. category: 'accessing',
  11137. fn: function (aString){
  11138. var self=this;
  11139. (self['@selector']=aString);
  11140. return self;},
  11141. args: ["aString"],
  11142. source: unescape('selector%3A%20aString%0A%09selector%20%3A%3D%20aString'),
  11143. messageSends: [],
  11144. referencedClasses: []
  11145. }),
  11146. smalltalk.SendNode);
  11147. smalltalk.addMethod(
  11148. unescape('_arguments'),
  11149. smalltalk.method({
  11150. selector: unescape('arguments'),
  11151. category: 'accessing',
  11152. fn: function (){
  11153. var self=this;
  11154. return (($receiver = self['@arguments']) == nil || $receiver == undefined) ? (function(){return (self['@arguments']=[]);})() : $receiver;
  11155. return self;},
  11156. args: [],
  11157. source: unescape('arguments%0A%09%5Earguments%20ifNil%3A%20%5Barguments%20%3A%3D%20%23%28%29%5D'),
  11158. messageSends: ["ifNil:"],
  11159. referencedClasses: []
  11160. }),
  11161. smalltalk.SendNode);
  11162. smalltalk.addMethod(
  11163. unescape('_arguments_'),
  11164. smalltalk.method({
  11165. selector: unescape('arguments%3A'),
  11166. category: 'accessing',
  11167. fn: function (aCollection){
  11168. var self=this;
  11169. (self['@arguments']=aCollection);
  11170. return self;},
  11171. args: ["aCollection"],
  11172. source: unescape('arguments%3A%20aCollection%0A%09arguments%20%3A%3D%20aCollection'),
  11173. messageSends: [],
  11174. referencedClasses: []
  11175. }),
  11176. smalltalk.SendNode);
  11177. smalltalk.addMethod(
  11178. unescape('_receiver'),
  11179. smalltalk.method({
  11180. selector: unescape('receiver'),
  11181. category: 'accessing',
  11182. fn: function (){
  11183. var self=this;
  11184. return self['@receiver'];
  11185. return self;},
  11186. args: [],
  11187. source: unescape('receiver%0A%09%5Ereceiver'),
  11188. messageSends: [],
  11189. referencedClasses: []
  11190. }),
  11191. smalltalk.SendNode);
  11192. smalltalk.addMethod(
  11193. unescape('_receiver_'),
  11194. smalltalk.method({
  11195. selector: unescape('receiver%3A'),
  11196. category: 'accessing',
  11197. fn: function (aNode){
  11198. var self=this;
  11199. (self['@receiver']=aNode);
  11200. return self;},
  11201. args: ["aNode"],
  11202. source: unescape('receiver%3A%20aNode%0A%09receiver%20%3A%3D%20aNode'),
  11203. messageSends: [],
  11204. referencedClasses: []
  11205. }),
  11206. smalltalk.SendNode);
  11207. smalltalk.addMethod(
  11208. unescape('_valueForReceiver_'),
  11209. smalltalk.method({
  11210. selector: unescape('valueForReceiver%3A'),
  11211. category: 'accessing',
  11212. fn: function (anObject){
  11213. var self=this;
  11214. return (function($rec){smalltalk.send($rec, "_receiver_", [(($receiver = smalltalk.send(self, "_receiver", [])) == nil || $receiver == undefined) ? (function(){return anObject;})() : (function(){return smalltalk.send(smalltalk.send(self, "_receiver", []), "_valueForReceiver_", [anObject]);})()]);smalltalk.send($rec, "_selector_", [smalltalk.send(self, "_selector", [])]);smalltalk.send($rec, "_arguments_", [smalltalk.send(self, "_arguments", [])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.SendNode || SendNode), "_new", []));
  11215. return self;},
  11216. args: ["anObject"],
  11217. source: unescape('valueForReceiver%3A%20anObject%0A%09%5ESendNode%20new%0A%09%20%20%20%20receiver%3A%20%28self%20receiver%20%0A%09%09ifNil%3A%20%5BanObject%5D%0A%09%09ifNotNil%3A%20%5Bself%20receiver%20valueForReceiver%3A%20anObject%5D%29%3B%0A%09%20%20%20%20selector%3A%20self%20selector%3B%0A%09%20%20%20%20arguments%3A%20self%20arguments%3B%0A%09%20%20%20%20yourself'),
  11218. messageSends: ["receiver:", "ifNil:ifNotNil:", "receiver", "valueForReceiver:", "selector:", "selector", "arguments:", "arguments", "yourself", "new"],
  11219. referencedClasses: ["SendNode"]
  11220. }),
  11221. smalltalk.SendNode);
  11222. smalltalk.addMethod(
  11223. unescape('_cascadeNodeWithMessages_'),
  11224. smalltalk.method({
  11225. selector: unescape('cascadeNodeWithMessages%3A'),
  11226. category: 'accessing',
  11227. fn: function (aCollection){
  11228. var self=this;
  11229. var first=nil;
  11230. (first=(function($rec){smalltalk.send($rec, "_selector_", [smalltalk.send(self, "_selector", [])]);smalltalk.send($rec, "_arguments_", [smalltalk.send(self, "_arguments", [])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.SendNode || SendNode), "_new", [])));
  11231. return (function($rec){smalltalk.send($rec, "_receiver_", [smalltalk.send(self, "_receiver", [])]);smalltalk.send($rec, "_nodes_", [smalltalk.send(smalltalk.send((smalltalk.Array || Array), "_with_", [first]), "__comma", [aCollection])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.CascadeNode || CascadeNode), "_new", []));
  11232. return self;},
  11233. args: ["aCollection"],
  11234. source: unescape('cascadeNodeWithMessages%3A%20aCollection%0A%09%7C%20first%20%7C%0A%09first%20%3A%3D%20SendNode%20new%0A%09%20%20%20%20selector%3A%20self%20selector%3B%0A%09%20%20%20%20arguments%3A%20self%20arguments%3B%0A%09%20%20%20%20yourself.%0A%09%5ECascadeNode%20new%0A%09%20%20%20%20receiver%3A%20self%20receiver%3B%0A%09%20%20%20%20nodes%3A%20%28Array%20with%3A%20first%29%2C%20aCollection%3B%0A%09%20%20%20%20yourself'),
  11235. messageSends: ["selector:", "selector", "arguments:", "arguments", "yourself", "new", "receiver:", "receiver", "nodes:", unescape("%2C"), "with:"],
  11236. referencedClasses: ["SendNode", "Array", "CascadeNode"]
  11237. }),
  11238. smalltalk.SendNode);
  11239. smalltalk.addMethod(
  11240. unescape('_accept_'),
  11241. smalltalk.method({
  11242. selector: unescape('accept%3A'),
  11243. category: 'visiting',
  11244. fn: function (aVisitor){
  11245. var self=this;
  11246. smalltalk.send(aVisitor, "_visitSendNode_", [self]);
  11247. return self;},
  11248. args: ["aVisitor"],
  11249. source: unescape('accept%3A%20aVisitor%0A%09aVisitor%20visitSendNode%3A%20self'),
  11250. messageSends: ["visitSendNode:"],
  11251. referencedClasses: []
  11252. }),
  11253. smalltalk.SendNode);
  11254. smalltalk.addClass('CascadeNode', smalltalk.Node, ['receiver'], 'Compiler');
  11255. smalltalk.addMethod(
  11256. unescape('_receiver'),
  11257. smalltalk.method({
  11258. selector: unescape('receiver'),
  11259. category: 'accessing',
  11260. fn: function (){
  11261. var self=this;
  11262. return self['@receiver'];
  11263. return self;},
  11264. args: [],
  11265. source: unescape('receiver%0A%09%5Ereceiver'),
  11266. messageSends: [],
  11267. referencedClasses: []
  11268. }),
  11269. smalltalk.CascadeNode);
  11270. smalltalk.addMethod(
  11271. unescape('_receiver_'),
  11272. smalltalk.method({
  11273. selector: unescape('receiver%3A'),
  11274. category: 'accessing',
  11275. fn: function (aNode){
  11276. var self=this;
  11277. (self['@receiver']=aNode);
  11278. return self;},
  11279. args: ["aNode"],
  11280. source: unescape('receiver%3A%20aNode%0A%09receiver%20%3A%3D%20aNode'),
  11281. messageSends: [],
  11282. referencedClasses: []
  11283. }),
  11284. smalltalk.CascadeNode);
  11285. smalltalk.addMethod(
  11286. unescape('_accept_'),
  11287. smalltalk.method({
  11288. selector: unescape('accept%3A'),
  11289. category: 'visiting',
  11290. fn: function (aVisitor){
  11291. var self=this;
  11292. smalltalk.send(aVisitor, "_visitCascadeNode_", [self]);
  11293. return self;},
  11294. args: ["aVisitor"],
  11295. source: unescape('accept%3A%20aVisitor%0A%09aVisitor%20visitCascadeNode%3A%20self'),
  11296. messageSends: ["visitCascadeNode:"],
  11297. referencedClasses: []
  11298. }),
  11299. smalltalk.CascadeNode);
  11300. smalltalk.addClass('AssignmentNode', smalltalk.Node, ['left', 'right'], 'Compiler');
  11301. smalltalk.addMethod(
  11302. unescape('_left'),
  11303. smalltalk.method({
  11304. selector: unescape('left'),
  11305. category: 'accessing',
  11306. fn: function (){
  11307. var self=this;
  11308. return self['@left'];
  11309. return self;},
  11310. args: [],
  11311. source: unescape('left%0A%09%5Eleft'),
  11312. messageSends: [],
  11313. referencedClasses: []
  11314. }),
  11315. smalltalk.AssignmentNode);
  11316. smalltalk.addMethod(
  11317. unescape('_left_'),
  11318. smalltalk.method({
  11319. selector: unescape('left%3A'),
  11320. category: 'accessing',
  11321. fn: function (aNode){
  11322. var self=this;
  11323. (self['@left']=aNode);
  11324. smalltalk.send(self['@left'], "_assigned_", [true]);
  11325. return self;},
  11326. args: ["aNode"],
  11327. source: unescape('left%3A%20aNode%0A%09left%20%3A%3D%20aNode.%0A%09left%20assigned%3A%20true'),
  11328. messageSends: ["assigned:"],
  11329. referencedClasses: []
  11330. }),
  11331. smalltalk.AssignmentNode);
  11332. smalltalk.addMethod(
  11333. unescape('_right'),
  11334. smalltalk.method({
  11335. selector: unescape('right'),
  11336. category: 'accessing',
  11337. fn: function (){
  11338. var self=this;
  11339. return self['@right'];
  11340. return self;},
  11341. args: [],
  11342. source: unescape('right%0A%09%5Eright'),
  11343. messageSends: [],
  11344. referencedClasses: []
  11345. }),
  11346. smalltalk.AssignmentNode);
  11347. smalltalk.addMethod(
  11348. unescape('_right_'),
  11349. smalltalk.method({
  11350. selector: unescape('right%3A'),
  11351. category: 'accessing',
  11352. fn: function (aNode){
  11353. var self=this;
  11354. (self['@right']=aNode);
  11355. return self;},
  11356. args: ["aNode"],
  11357. source: unescape('right%3A%20aNode%0A%09right%20%3A%3D%20aNode'),
  11358. messageSends: [],
  11359. referencedClasses: []
  11360. }),
  11361. smalltalk.AssignmentNode);
  11362. smalltalk.addMethod(
  11363. unescape('_accept_'),
  11364. smalltalk.method({
  11365. selector: unescape('accept%3A'),
  11366. category: 'visiting',
  11367. fn: function (aVisitor){
  11368. var self=this;
  11369. smalltalk.send(aVisitor, "_visitAssignmentNode_", [self]);
  11370. return self;},
  11371. args: ["aVisitor"],
  11372. source: unescape('accept%3A%20aVisitor%0A%09aVisitor%20visitAssignmentNode%3A%20self'),
  11373. messageSends: ["visitAssignmentNode:"],
  11374. referencedClasses: []
  11375. }),
  11376. smalltalk.AssignmentNode);
  11377. smalltalk.addClass('BlockNode', smalltalk.Node, ['parameters', 'inlined'], 'Compiler');
  11378. smalltalk.addMethod(
  11379. unescape('_parameters'),
  11380. smalltalk.method({
  11381. selector: unescape('parameters'),
  11382. category: 'accessing',
  11383. fn: function (){
  11384. var self=this;
  11385. return (($receiver = self['@parameters']) == nil || $receiver == undefined) ? (function(){return (self['@parameters']=smalltalk.send((smalltalk.Array || Array), "_new", []));})() : $receiver;
  11386. return self;},
  11387. args: [],
  11388. source: unescape('parameters%0A%09%5Eparameters%20ifNil%3A%20%5Bparameters%20%3A%3D%20Array%20new%5D'),
  11389. messageSends: ["ifNil:", "new"],
  11390. referencedClasses: ["Array"]
  11391. }),
  11392. smalltalk.BlockNode);
  11393. smalltalk.addMethod(
  11394. unescape('_parameters_'),
  11395. smalltalk.method({
  11396. selector: unescape('parameters%3A'),
  11397. category: 'accessing',
  11398. fn: function (aCollection){
  11399. var self=this;
  11400. (self['@parameters']=aCollection);
  11401. return self;},
  11402. args: ["aCollection"],
  11403. source: unescape('parameters%3A%20aCollection%0A%09parameters%20%3A%3D%20aCollection'),
  11404. messageSends: [],
  11405. referencedClasses: []
  11406. }),
  11407. smalltalk.BlockNode);
  11408. smalltalk.addMethod(
  11409. unescape('_accept_'),
  11410. smalltalk.method({
  11411. selector: unescape('accept%3A'),
  11412. category: 'visiting',
  11413. fn: function (aVisitor){
  11414. var self=this;
  11415. smalltalk.send(aVisitor, "_visitBlockNode_", [self]);
  11416. return self;},
  11417. args: ["aVisitor"],
  11418. source: unescape('accept%3A%20aVisitor%0A%09aVisitor%20visitBlockNode%3A%20self'),
  11419. messageSends: ["visitBlockNode:"],
  11420. referencedClasses: []
  11421. }),
  11422. smalltalk.BlockNode);
  11423. smalltalk.addMethod(
  11424. unescape('_isBlockNode'),
  11425. smalltalk.method({
  11426. selector: unescape('isBlockNode'),
  11427. category: 'testing',
  11428. fn: function (){
  11429. var self=this;
  11430. return true;
  11431. return self;},
  11432. args: [],
  11433. source: unescape('isBlockNode%0A%09%5Etrue'),
  11434. messageSends: [],
  11435. referencedClasses: []
  11436. }),
  11437. smalltalk.BlockNode);
  11438. smalltalk.addMethod(
  11439. unescape('_inlined'),
  11440. smalltalk.method({
  11441. selector: unescape('inlined'),
  11442. category: 'accessing',
  11443. fn: function (){
  11444. var self=this;
  11445. return (($receiver = self['@inlined']) == nil || $receiver == undefined) ? (function(){return false;})() : $receiver;
  11446. return self;},
  11447. args: [],
  11448. source: unescape('inlined%0A%09%5Einlined%20ifNil%3A%20%5Bfalse%5D'),
  11449. messageSends: ["ifNil:"],
  11450. referencedClasses: []
  11451. }),
  11452. smalltalk.BlockNode);
  11453. smalltalk.addMethod(
  11454. unescape('_inlined_'),
  11455. smalltalk.method({
  11456. selector: unescape('inlined%3A'),
  11457. category: 'accessing',
  11458. fn: function (aBoolean){
  11459. var self=this;
  11460. (self['@inlined']=aBoolean);
  11461. return self;},
  11462. args: ["aBoolean"],
  11463. source: unescape('inlined%3A%20aBoolean%0A%09inlined%20%3A%3D%20aBoolean'),
  11464. messageSends: [],
  11465. referencedClasses: []
  11466. }),
  11467. smalltalk.BlockNode);
  11468. smalltalk.addClass('SequenceNode', smalltalk.Node, ['temps'], 'Compiler');
  11469. smalltalk.addMethod(
  11470. unescape('_temps'),
  11471. smalltalk.method({
  11472. selector: unescape('temps'),
  11473. category: 'accessing',
  11474. fn: function (){
  11475. var self=this;
  11476. return (($receiver = self['@temps']) == nil || $receiver == undefined) ? (function(){return [];})() : $receiver;
  11477. return self;},
  11478. args: [],
  11479. source: unescape('temps%0A%09%5Etemps%20ifNil%3A%20%5B%23%28%29%5D'),
  11480. messageSends: ["ifNil:"],
  11481. referencedClasses: []
  11482. }),
  11483. smalltalk.SequenceNode);
  11484. smalltalk.addMethod(
  11485. unescape('_temps_'),
  11486. smalltalk.method({
  11487. selector: unescape('temps%3A'),
  11488. category: 'accessing',
  11489. fn: function (aCollection){
  11490. var self=this;
  11491. (self['@temps']=aCollection);
  11492. return self;},
  11493. args: ["aCollection"],
  11494. source: unescape('temps%3A%20aCollection%0A%09temps%20%3A%3D%20aCollection'),
  11495. messageSends: [],
  11496. referencedClasses: []
  11497. }),
  11498. smalltalk.SequenceNode);
  11499. smalltalk.addMethod(
  11500. unescape('_asBlockSequenceNode'),
  11501. smalltalk.method({
  11502. selector: unescape('asBlockSequenceNode'),
  11503. category: 'testing',
  11504. fn: function (){
  11505. var self=this;
  11506. return (function($rec){smalltalk.send($rec, "_nodes_", [smalltalk.send(self, "_nodes", [])]);smalltalk.send($rec, "_temps_", [smalltalk.send(self, "_temps", [])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.BlockSequenceNode || BlockSequenceNode), "_new", []));
  11507. return self;},
  11508. args: [],
  11509. source: unescape('asBlockSequenceNode%0A%09%5EBlockSequenceNode%20new%0A%09%20%20%20%20nodes%3A%20self%20nodes%3B%0A%09%20%20%20%20temps%3A%20self%20temps%3B%0A%09%20%20%20%20yourself'),
  11510. messageSends: ["nodes:", "nodes", "temps:", "temps", "yourself", "new"],
  11511. referencedClasses: ["BlockSequenceNode"]
  11512. }),
  11513. smalltalk.SequenceNode);
  11514. smalltalk.addMethod(
  11515. unescape('_accept_'),
  11516. smalltalk.method({
  11517. selector: unescape('accept%3A'),
  11518. category: 'visiting',
  11519. fn: function (aVisitor){
  11520. var self=this;
  11521. smalltalk.send(aVisitor, "_visitSequenceNode_", [self]);
  11522. return self;},
  11523. args: ["aVisitor"],
  11524. source: unescape('accept%3A%20aVisitor%0A%09aVisitor%20visitSequenceNode%3A%20self'),
  11525. messageSends: ["visitSequenceNode:"],
  11526. referencedClasses: []
  11527. }),
  11528. smalltalk.SequenceNode);
  11529. smalltalk.addClass('BlockSequenceNode', smalltalk.SequenceNode, [], 'Compiler');
  11530. smalltalk.addMethod(
  11531. unescape('_accept_'),
  11532. smalltalk.method({
  11533. selector: unescape('accept%3A'),
  11534. category: 'visiting',
  11535. fn: function (aVisitor){
  11536. var self=this;
  11537. smalltalk.send(aVisitor, "_visitBlockSequenceNode_", [self]);
  11538. return self;},
  11539. args: ["aVisitor"],
  11540. source: unescape('accept%3A%20aVisitor%0A%09aVisitor%20visitBlockSequenceNode%3A%20self'),
  11541. messageSends: ["visitBlockSequenceNode:"],
  11542. referencedClasses: []
  11543. }),
  11544. smalltalk.BlockSequenceNode);
  11545. smalltalk.addMethod(
  11546. unescape('_isBlockSequenceNode'),
  11547. smalltalk.method({
  11548. selector: unescape('isBlockSequenceNode'),
  11549. category: 'testing',
  11550. fn: function (){
  11551. var self=this;
  11552. return true;
  11553. return self;},
  11554. args: [],
  11555. source: unescape('isBlockSequenceNode%0A%09%5Etrue'),
  11556. messageSends: [],
  11557. referencedClasses: []
  11558. }),
  11559. smalltalk.BlockSequenceNode);
  11560. smalltalk.addClass('ReturnNode', smalltalk.Node, [], 'Compiler');
  11561. smalltalk.addMethod(
  11562. unescape('_accept_'),
  11563. smalltalk.method({
  11564. selector: unescape('accept%3A'),
  11565. category: 'visiting',
  11566. fn: function (aVisitor){
  11567. var self=this;
  11568. smalltalk.send(aVisitor, "_visitReturnNode_", [self]);
  11569. return self;},
  11570. args: ["aVisitor"],
  11571. source: unescape('accept%3A%20aVisitor%0A%09aVisitor%20visitReturnNode%3A%20self'),
  11572. messageSends: ["visitReturnNode:"],
  11573. referencedClasses: []
  11574. }),
  11575. smalltalk.ReturnNode);
  11576. smalltalk.addClass('ValueNode', smalltalk.Node, ['value'], 'Compiler');
  11577. smalltalk.addMethod(
  11578. unescape('_value'),
  11579. smalltalk.method({
  11580. selector: unescape('value'),
  11581. category: 'accessing',
  11582. fn: function (){
  11583. var self=this;
  11584. return self['@value'];
  11585. return self;},
  11586. args: [],
  11587. source: unescape('value%0A%09%5Evalue'),
  11588. messageSends: [],
  11589. referencedClasses: []
  11590. }),
  11591. smalltalk.ValueNode);
  11592. smalltalk.addMethod(
  11593. unescape('_value_'),
  11594. smalltalk.method({
  11595. selector: unescape('value%3A'),
  11596. category: 'accessing',
  11597. fn: function (anObject){
  11598. var self=this;
  11599. (self['@value']=anObject);
  11600. return self;},
  11601. args: ["anObject"],
  11602. source: unescape('value%3A%20anObject%0A%09value%20%3A%3D%20anObject'),
  11603. messageSends: [],
  11604. referencedClasses: []
  11605. }),
  11606. smalltalk.ValueNode);
  11607. smalltalk.addMethod(
  11608. unescape('_accept_'),
  11609. smalltalk.method({
  11610. selector: unescape('accept%3A'),
  11611. category: 'visiting',
  11612. fn: function (aVisitor){
  11613. var self=this;
  11614. smalltalk.send(aVisitor, "_visitValueNode_", [self]);
  11615. return self;},
  11616. args: ["aVisitor"],
  11617. source: unescape('accept%3A%20aVisitor%0A%09aVisitor%20visitValueNode%3A%20self'),
  11618. messageSends: ["visitValueNode:"],
  11619. referencedClasses: []
  11620. }),
  11621. smalltalk.ValueNode);
  11622. smalltalk.addMethod(
  11623. unescape('_isValueNode'),
  11624. smalltalk.method({
  11625. selector: unescape('isValueNode'),
  11626. category: 'testing',
  11627. fn: function (){
  11628. var self=this;
  11629. return true;
  11630. return self;},
  11631. args: [],
  11632. source: unescape('isValueNode%0A%09%5Etrue'),
  11633. messageSends: [],
  11634. referencedClasses: []
  11635. }),
  11636. smalltalk.ValueNode);
  11637. smalltalk.addClass('VariableNode', smalltalk.ValueNode, ['assigned'], 'Compiler');
  11638. smalltalk.addMethod(
  11639. unescape('_accept_'),
  11640. smalltalk.method({
  11641. selector: unescape('accept%3A'),
  11642. category: 'visiting',
  11643. fn: function (aVisitor){
  11644. var self=this;
  11645. smalltalk.send(aVisitor, "_visitVariableNode_", [self]);
  11646. return self;},
  11647. args: ["aVisitor"],
  11648. source: unescape('accept%3A%20aVisitor%0A%09aVisitor%20visitVariableNode%3A%20self'),
  11649. messageSends: ["visitVariableNode:"],
  11650. referencedClasses: []
  11651. }),
  11652. smalltalk.VariableNode);
  11653. smalltalk.addMethod(
  11654. unescape('_assigned'),
  11655. smalltalk.method({
  11656. selector: unescape('assigned'),
  11657. category: 'accessing',
  11658. fn: function (){
  11659. var self=this;
  11660. return (($receiver = self['@assigned']) == nil || $receiver == undefined) ? (function(){return false;})() : $receiver;
  11661. return self;},
  11662. args: [],
  11663. source: unescape('assigned%0A%09%5Eassigned%20ifNil%3A%20%5Bfalse%5D'),
  11664. messageSends: ["ifNil:"],
  11665. referencedClasses: []
  11666. }),
  11667. smalltalk.VariableNode);
  11668. smalltalk.addMethod(
  11669. unescape('_assigned_'),
  11670. smalltalk.method({
  11671. selector: unescape('assigned%3A'),
  11672. category: 'accessing',
  11673. fn: function (aBoolean){
  11674. var self=this;
  11675. (self['@assigned']=aBoolean);
  11676. return self;},
  11677. args: ["aBoolean"],
  11678. source: unescape('assigned%3A%20aBoolean%0A%09assigned%20%3A%3D%20aBoolean'),
  11679. messageSends: [],
  11680. referencedClasses: []
  11681. }),
  11682. smalltalk.VariableNode);
  11683. smalltalk.addClass('ClassReferenceNode', smalltalk.VariableNode, [], 'Compiler');
  11684. smalltalk.addMethod(
  11685. unescape('_accept_'),
  11686. smalltalk.method({
  11687. selector: unescape('accept%3A'),
  11688. category: 'visiting',
  11689. fn: function (aVisitor){
  11690. var self=this;
  11691. smalltalk.send(aVisitor, "_visitClassReferenceNode_", [self]);
  11692. return self;},
  11693. args: ["aVisitor"],
  11694. source: unescape('accept%3A%20aVisitor%0A%09aVisitor%20visitClassReferenceNode%3A%20self'),
  11695. messageSends: ["visitClassReferenceNode:"],
  11696. referencedClasses: []
  11697. }),
  11698. smalltalk.ClassReferenceNode);
  11699. smalltalk.addClass('JSStatementNode', smalltalk.Node, ['source'], 'Compiler');
  11700. smalltalk.addMethod(
  11701. unescape('_source'),
  11702. smalltalk.method({
  11703. selector: unescape('source'),
  11704. category: 'accessing',
  11705. fn: function (){
  11706. var self=this;
  11707. return (($receiver = self['@source']) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
  11708. return self;},
  11709. args: [],
  11710. source: unescape('source%0A%09%5Esource%20ifNil%3A%20%5B%27%27%5D'),
  11711. messageSends: ["ifNil:"],
  11712. referencedClasses: []
  11713. }),
  11714. smalltalk.JSStatementNode);
  11715. smalltalk.addMethod(
  11716. unescape('_source_'),
  11717. smalltalk.method({
  11718. selector: unescape('source%3A'),
  11719. category: 'accessing',
  11720. fn: function (aString){
  11721. var self=this;
  11722. (self['@source']=aString);
  11723. return self;},
  11724. args: ["aString"],
  11725. source: unescape('source%3A%20aString%0A%09source%20%3A%3D%20aString'),
  11726. messageSends: [],
  11727. referencedClasses: []
  11728. }),
  11729. smalltalk.JSStatementNode);
  11730. smalltalk.addMethod(
  11731. unescape('_accept_'),
  11732. smalltalk.method({
  11733. selector: unescape('accept%3A'),
  11734. category: 'visiting',
  11735. fn: function (aVisitor){
  11736. var self=this;
  11737. smalltalk.send(aVisitor, "_visitJSStatementNode_", [self]);
  11738. return self;},
  11739. args: ["aVisitor"],
  11740. source: unescape('accept%3A%20aVisitor%0A%09aVisitor%20visitJSStatementNode%3A%20self'),
  11741. messageSends: ["visitJSStatementNode:"],
  11742. referencedClasses: []
  11743. }),
  11744. smalltalk.JSStatementNode);
  11745. smalltalk.addClass('NodeVisitor', smalltalk.Object, [], 'Compiler');
  11746. smalltalk.addMethod(
  11747. unescape('_visit_'),
  11748. smalltalk.method({
  11749. selector: unescape('visit%3A'),
  11750. category: 'visiting',
  11751. fn: function (aNode){
  11752. var self=this;
  11753. smalltalk.send(aNode, "_accept_", [self]);
  11754. return self;},
  11755. args: ["aNode"],
  11756. source: unescape('visit%3A%20aNode%0A%09aNode%20accept%3A%20self'),
  11757. messageSends: ["accept:"],
  11758. referencedClasses: []
  11759. }),
  11760. smalltalk.NodeVisitor);
  11761. smalltalk.addMethod(
  11762. unescape('_visitNode_'),
  11763. smalltalk.method({
  11764. selector: unescape('visitNode%3A'),
  11765. category: 'visiting',
  11766. fn: function (aNode){
  11767. var self=this;
  11768. return self;},
  11769. args: ["aNode"],
  11770. source: unescape('visitNode%3A%20aNode'),
  11771. messageSends: [],
  11772. referencedClasses: []
  11773. }),
  11774. smalltalk.NodeVisitor);
  11775. smalltalk.addMethod(
  11776. unescape('_visitMethodNode_'),
  11777. smalltalk.method({
  11778. selector: unescape('visitMethodNode%3A'),
  11779. category: 'visiting',
  11780. fn: function (aNode){
  11781. var self=this;
  11782. smalltalk.send(self, "_visitNode_", [aNode]);
  11783. return self;},
  11784. args: ["aNode"],
  11785. source: unescape('visitMethodNode%3A%20aNode%0A%09self%20visitNode%3A%20aNode'),
  11786. messageSends: ["visitNode:"],
  11787. referencedClasses: []
  11788. }),
  11789. smalltalk.NodeVisitor);
  11790. smalltalk.addMethod(
  11791. unescape('_visitSequenceNode_'),
  11792. smalltalk.method({
  11793. selector: unescape('visitSequenceNode%3A'),
  11794. category: 'visiting',
  11795. fn: function (aNode){
  11796. var self=this;
  11797. smalltalk.send(self, "_visitNode_", [aNode]);
  11798. return self;},
  11799. args: ["aNode"],
  11800. source: unescape('visitSequenceNode%3A%20aNode%0A%09self%20visitNode%3A%20aNode'),
  11801. messageSends: ["visitNode:"],
  11802. referencedClasses: []
  11803. }),
  11804. smalltalk.NodeVisitor);
  11805. smalltalk.addMethod(
  11806. unescape('_visitBlockSequenceNode_'),
  11807. smalltalk.method({
  11808. selector: unescape('visitBlockSequenceNode%3A'),
  11809. category: 'visiting',
  11810. fn: function (aNode){
  11811. var self=this;
  11812. smalltalk.send(self, "_visitSequenceNode_", [aNode]);
  11813. return self;},
  11814. args: ["aNode"],
  11815. source: unescape('visitBlockSequenceNode%3A%20aNode%0A%09self%20visitSequenceNode%3A%20aNode'),
  11816. messageSends: ["visitSequenceNode:"],
  11817. referencedClasses: []
  11818. }),
  11819. smalltalk.NodeVisitor);
  11820. smalltalk.addMethod(
  11821. unescape('_visitBlockNode_'),
  11822. smalltalk.method({
  11823. selector: unescape('visitBlockNode%3A'),
  11824. category: 'visiting',
  11825. fn: function (aNode){
  11826. var self=this;
  11827. smalltalk.send(self, "_visitNode_", [aNode]);
  11828. return self;},
  11829. args: ["aNode"],
  11830. source: unescape('visitBlockNode%3A%20aNode%0A%09self%20visitNode%3A%20aNode'),
  11831. messageSends: ["visitNode:"],
  11832. referencedClasses: []
  11833. }),
  11834. smalltalk.NodeVisitor);
  11835. smalltalk.addMethod(
  11836. unescape('_visitReturnNode_'),
  11837. smalltalk.method({
  11838. selector: unescape('visitReturnNode%3A'),
  11839. category: 'visiting',
  11840. fn: function (aNode){
  11841. var self=this;
  11842. smalltalk.send(self, "_visitNode_", [aNode]);
  11843. return self;},
  11844. args: ["aNode"],
  11845. source: unescape('visitReturnNode%3A%20aNode%0A%09self%20visitNode%3A%20aNode'),
  11846. messageSends: ["visitNode:"],
  11847. referencedClasses: []
  11848. }),
  11849. smalltalk.NodeVisitor);
  11850. smalltalk.addMethod(
  11851. unescape('_visitSendNode_'),
  11852. smalltalk.method({
  11853. selector: unescape('visitSendNode%3A'),
  11854. category: 'visiting',
  11855. fn: function (aNode){
  11856. var self=this;
  11857. smalltalk.send(self, "_visitNode_", [aNode]);
  11858. return self;},
  11859. args: ["aNode"],
  11860. source: unescape('visitSendNode%3A%20aNode%0A%09self%20visitNode%3A%20aNode'),
  11861. messageSends: ["visitNode:"],
  11862. referencedClasses: []
  11863. }),
  11864. smalltalk.NodeVisitor);
  11865. smalltalk.addMethod(
  11866. unescape('_visitCascadeNode_'),
  11867. smalltalk.method({
  11868. selector: unescape('visitCascadeNode%3A'),
  11869. category: 'visiting',
  11870. fn: function (aNode){
  11871. var self=this;
  11872. smalltalk.send(self, "_visitNode_", [aNode]);
  11873. return self;},
  11874. args: ["aNode"],
  11875. source: unescape('visitCascadeNode%3A%20aNode%0A%09self%20visitNode%3A%20aNode'),
  11876. messageSends: ["visitNode:"],
  11877. referencedClasses: []
  11878. }),
  11879. smalltalk.NodeVisitor);
  11880. smalltalk.addMethod(
  11881. unescape('_visitValueNode_'),
  11882. smalltalk.method({
  11883. selector: unescape('visitValueNode%3A'),
  11884. category: 'visiting',
  11885. fn: function (aNode){
  11886. var self=this;
  11887. smalltalk.send(self, "_visitNode_", [aNode]);
  11888. return self;},
  11889. args: ["aNode"],
  11890. source: unescape('visitValueNode%3A%20aNode%0A%09self%20visitNode%3A%20aNode'),
  11891. messageSends: ["visitNode:"],
  11892. referencedClasses: []
  11893. }),
  11894. smalltalk.NodeVisitor);
  11895. smalltalk.addMethod(
  11896. unescape('_visitVariableNode_'),
  11897. smalltalk.method({
  11898. selector: unescape('visitVariableNode%3A'),
  11899. category: 'visiting',
  11900. fn: function (aNode){
  11901. var self=this;
  11902. return self;},
  11903. args: ["aNode"],
  11904. source: unescape('visitVariableNode%3A%20aNode'),
  11905. messageSends: [],
  11906. referencedClasses: []
  11907. }),
  11908. smalltalk.NodeVisitor);
  11909. smalltalk.addMethod(
  11910. unescape('_visitAssignmentNode_'),
  11911. smalltalk.method({
  11912. selector: unescape('visitAssignmentNode%3A'),
  11913. category: 'visiting',
  11914. fn: function (aNode){
  11915. var self=this;
  11916. smalltalk.send(self, "_visitNode_", [aNode]);
  11917. return self;},
  11918. args: ["aNode"],
  11919. source: unescape('visitAssignmentNode%3A%20aNode%0A%09self%20visitNode%3A%20aNode'),
  11920. messageSends: ["visitNode:"],
  11921. referencedClasses: []
  11922. }),
  11923. smalltalk.NodeVisitor);
  11924. smalltalk.addMethod(
  11925. unescape('_visitClassReferenceNode_'),
  11926. smalltalk.method({
  11927. selector: unescape('visitClassReferenceNode%3A'),
  11928. category: 'visiting',
  11929. fn: function (aNode){
  11930. var self=this;
  11931. (function($rec){smalltalk.send($rec, "_nextPutAll_", ["smalltalk."]);return smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(aNode, "_value", [])]);})(self);
  11932. return self;},
  11933. args: ["aNode"],
  11934. source: unescape('visitClassReferenceNode%3A%20aNode%0A%09self%20%0A%09%20%20%20%20nextPutAll%3A%20%27smalltalk.%27%3B%0A%09%20%20%20%20nextPutAll%3A%20aNode%20value'),
  11935. messageSends: ["nextPutAll:", "value"],
  11936. referencedClasses: []
  11937. }),
  11938. smalltalk.NodeVisitor);
  11939. smalltalk.addMethod(
  11940. unescape('_visitJSStatementNode_'),
  11941. smalltalk.method({
  11942. selector: unescape('visitJSStatementNode%3A'),
  11943. category: 'visiting',
  11944. fn: function (aNode){
  11945. var self=this;
  11946. (function($rec){smalltalk.send($rec, "_nextPutAll_", [unescape("function%28%29%7B")]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(aNode, "_source", [])]);return smalltalk.send($rec, "_nextPutAll_", [unescape("%7D%29%28%29")]);})(self);
  11947. return self;},
  11948. args: ["aNode"],
  11949. source: unescape('visitJSStatementNode%3A%20aNode%0A%09self%20%0A%09%20%20%20%20nextPutAll%3A%20%27function%28%29%7B%27%3B%0A%09%20%20%20%20nextPutAll%3A%20aNode%20source%3B%0A%09%20%20%20%20nextPutAll%3A%20%27%7D%29%28%29%27'),
  11950. messageSends: ["nextPutAll:", "source"],
  11951. referencedClasses: []
  11952. }),
  11953. smalltalk.NodeVisitor);
  11954. smalltalk.addMethod(
  11955. unescape('_visitDynamicArrayNode_'),
  11956. smalltalk.method({
  11957. selector: unescape('visitDynamicArrayNode%3A'),
  11958. category: 'visiting',
  11959. fn: function (aNode){
  11960. var self=this;
  11961. smalltalk.send(self, "_visitNode_", [aNode]);
  11962. return self;},
  11963. args: ["aNode"],
  11964. source: unescape('visitDynamicArrayNode%3A%20aNode%0A%09self%20visitNode%3A%20aNode'),
  11965. messageSends: ["visitNode:"],
  11966. referencedClasses: []
  11967. }),
  11968. smalltalk.NodeVisitor);
  11969. smalltalk.addMethod(
  11970. unescape('_visitDynamicDictionaryNode_'),
  11971. smalltalk.method({
  11972. selector: unescape('visitDynamicDictionaryNode%3A'),
  11973. category: 'visiting',
  11974. fn: function (aNode){
  11975. var self=this;
  11976. smalltalk.send(self, "_visitNode_", [aNode]);
  11977. return self;},
  11978. args: ["aNode"],
  11979. source: unescape('visitDynamicDictionaryNode%3A%20aNode%0A%09self%20visitNode%3A%20aNode'),
  11980. messageSends: ["visitNode:"],
  11981. referencedClasses: []
  11982. }),
  11983. smalltalk.NodeVisitor);
  11984. smalltalk.addClass('Compiler', smalltalk.NodeVisitor, ['stream', 'nestedBlocks', 'earlyReturn', 'currentClass', 'currentSelector', 'unknownVariables', 'tempVariables', 'messageSends', 'referencedClasses', 'classReferenced', 'source', 'argVariables'], 'Compiler');
  11985. smalltalk.addMethod(
  11986. unescape('_initialize'),
  11987. smalltalk.method({
  11988. selector: unescape('initialize'),
  11989. category: 'initialization',
  11990. fn: function (){
  11991. var self=this;
  11992. smalltalk.send(self, "_initialize", [], smalltalk.NodeVisitor);
  11993. (self['@stream']=smalltalk.send("", "_writeStream", []));
  11994. (self['@unknownVariables']=[]);
  11995. (self['@tempVariables']=[]);
  11996. (self['@argVariables']=[]);
  11997. (self['@messageSends']=[]);
  11998. (self['@classReferenced']=[]);
  11999. return self;},
  12000. args: [],
  12001. source: unescape('initialize%0A%09super%20initialize.%0A%09stream%20%3A%3D%20%27%27%20writeStream.%20%0A%09unknownVariables%20%3A%3D%20%23%28%29.%0A%09tempVariables%20%3A%3D%20%23%28%29.%0A%09argVariables%20%3A%3D%20%23%28%29.%0A%09messageSends%20%3A%3D%20%23%28%29.%0A%09classReferenced%20%3A%3D%20%23%28%29'),
  12002. messageSends: ["initialize", "writeStream"],
  12003. referencedClasses: []
  12004. }),
  12005. smalltalk.Compiler);
  12006. smalltalk.addMethod(
  12007. unescape('_parser'),
  12008. smalltalk.method({
  12009. selector: unescape('parser'),
  12010. category: 'accessing',
  12011. fn: function (){
  12012. var self=this;
  12013. return smalltalk.send((smalltalk.SmalltalkParser || SmalltalkParser), "_new", []);
  12014. return self;},
  12015. args: [],
  12016. source: unescape('parser%0A%09%5ESmalltalkParser%20new'),
  12017. messageSends: ["new"],
  12018. referencedClasses: ["SmalltalkParser"]
  12019. }),
  12020. smalltalk.Compiler);
  12021. smalltalk.addMethod(
  12022. unescape('_currentClass'),
  12023. smalltalk.method({
  12024. selector: unescape('currentClass'),
  12025. category: 'accessing',
  12026. fn: function (){
  12027. var self=this;
  12028. return self['@currentClass'];
  12029. return self;},
  12030. args: [],
  12031. source: unescape('currentClass%0A%09%5EcurrentClass'),
  12032. messageSends: [],
  12033. referencedClasses: []
  12034. }),
  12035. smalltalk.Compiler);
  12036. smalltalk.addMethod(
  12037. unescape('_currentClass_'),
  12038. smalltalk.method({
  12039. selector: unescape('currentClass%3A'),
  12040. category: 'accessing',
  12041. fn: function (aClass){
  12042. var self=this;
  12043. (self['@currentClass']=aClass);
  12044. return self;},
  12045. args: ["aClass"],
  12046. source: unescape('currentClass%3A%20aClass%0A%09currentClass%20%3A%3D%20aClass'),
  12047. messageSends: [],
  12048. referencedClasses: []
  12049. }),
  12050. smalltalk.Compiler);
  12051. smalltalk.addMethod(
  12052. unescape('_loadExpression_'),
  12053. smalltalk.method({
  12054. selector: unescape('loadExpression%3A'),
  12055. category: 'compiling',
  12056. fn: function (aString){
  12057. var self=this;
  12058. var result=nil;
  12059. smalltalk.send((smalltalk.DoIt || DoIt), "_addCompiledMethod_", [smalltalk.send(self, "_eval_", [smalltalk.send(self, "_compileExpression_", [aString])])]);
  12060. (result=smalltalk.send(smalltalk.send((smalltalk.DoIt || DoIt), "_new", []), "_doIt", []));
  12061. smalltalk.send((smalltalk.DoIt || DoIt), "_removeCompiledMethod_", [smalltalk.send(smalltalk.send((smalltalk.DoIt || DoIt), "_methodDictionary", []), "_at_", ["doIt"])]);
  12062. return result;
  12063. return self;},
  12064. args: ["aString"],
  12065. source: unescape('loadExpression%3A%20aString%0A%09%7C%20result%20%7C%0A%09DoIt%20addCompiledMethod%3A%20%28self%20eval%3A%20%28self%20compileExpression%3A%20aString%29%29.%0A%09result%20%3A%3D%20DoIt%20new%20doIt.%0A%09DoIt%20removeCompiledMethod%3A%20%28DoIt%20methodDictionary%20at%3A%20%27doIt%27%29.%0A%09%5Eresult'),
  12066. messageSends: ["addCompiledMethod:", "eval:", "compileExpression:", "doIt", "new", "removeCompiledMethod:", "at:", "methodDictionary"],
  12067. referencedClasses: ["DoIt"]
  12068. }),
  12069. smalltalk.Compiler);
  12070. smalltalk.addMethod(
  12071. unescape('_load_forClass_'),
  12072. smalltalk.method({
  12073. selector: unescape('load%3AforClass%3A'),
  12074. category: 'compiling',
  12075. fn: function (aString, aClass){
  12076. var self=this;
  12077. var compiled=nil;
  12078. (compiled=smalltalk.send(self, "_eval_", [smalltalk.send(self, "_compile_forClass_", [aString, aClass])]));
  12079. smalltalk.send(self, "_setupClass_", [aClass]);
  12080. return compiled;
  12081. return self;},
  12082. args: ["aString", "aClass"],
  12083. source: unescape('load%3A%20aString%20forClass%3A%20aClass%0A%09%7C%20compiled%20%7C%0A%09compiled%20%3A%3D%20self%20eval%3A%20%28self%20compile%3A%20aString%20forClass%3A%20aClass%29.%0A%09self%20setupClass%3A%20aClass.%0A%09%5Ecompiled'),
  12084. messageSends: ["eval:", "compile:forClass:", "setupClass:"],
  12085. referencedClasses: []
  12086. }),
  12087. smalltalk.Compiler);
  12088. smalltalk.addMethod(
  12089. unescape('_compile_forClass_'),
  12090. smalltalk.method({
  12091. selector: unescape('compile%3AforClass%3A'),
  12092. category: 'compiling',
  12093. fn: function (aString, aClass){
  12094. var self=this;
  12095. smalltalk.send(self, "_currentClass_", [aClass]);
  12096. smalltalk.send(self, "_source_", [aString]);
  12097. return smalltalk.send(self, "_compile_", [aString]);
  12098. return self;},
  12099. args: ["aString", "aClass"],
  12100. source: unescape('compile%3A%20aString%20forClass%3A%20aClass%0A%09self%20currentClass%3A%20aClass.%0A%09self%20source%3A%20aString.%0A%09%5Eself%20compile%3A%20aString'),
  12101. messageSends: ["currentClass:", "source:", "compile:"],
  12102. referencedClasses: []
  12103. }),
  12104. smalltalk.Compiler);
  12105. smalltalk.addMethod(
  12106. unescape('_compileExpression_'),
  12107. smalltalk.method({
  12108. selector: unescape('compileExpression%3A'),
  12109. category: 'compiling',
  12110. fn: function (aString){
  12111. var self=this;
  12112. smalltalk.send(self, "_currentClass_", [(smalltalk.DoIt || DoIt)]);
  12113. smalltalk.send(self, "_source_", [smalltalk.send(smalltalk.send(unescape("doIt%20%5E%5B"), "__comma", [aString]), "__comma", [unescape("%5D%20value")])]);
  12114. return smalltalk.send(self, "_compileNode_", [smalltalk.send(self, "_parse_", [smalltalk.send(self, "_source", [])])]);
  12115. return self;},
  12116. args: ["aString"],
  12117. source: unescape('compileExpression%3A%20aString%0A%09self%20currentClass%3A%20DoIt.%0A%09self%20source%3A%20%27doIt%20%5E%5B%27%2C%20aString%2C%20%27%5D%20value%27.%0A%09%5Eself%20compileNode%3A%20%28self%20parse%3A%20self%20source%29'),
  12118. messageSends: ["currentClass:", "source:", unescape("%2C"), "compileNode:", "parse:", "source"],
  12119. referencedClasses: ["DoIt"]
  12120. }),
  12121. smalltalk.Compiler);
  12122. smalltalk.addMethod(
  12123. unescape('_eval_'),
  12124. smalltalk.method({
  12125. selector: unescape('eval%3A'),
  12126. category: 'compiling',
  12127. fn: function (aString){
  12128. var self=this;
  12129. return eval(aString);
  12130. return self;},
  12131. args: ["aString"],
  12132. source: unescape('eval%3A%20aString%0A%09%3Creturn%20eval%28aString%29%3E'),
  12133. messageSends: [],
  12134. referencedClasses: []
  12135. }),
  12136. smalltalk.Compiler);
  12137. smalltalk.addMethod(
  12138. unescape('_compile_'),
  12139. smalltalk.method({
  12140. selector: unescape('compile%3A'),
  12141. category: 'compiling',
  12142. fn: function (aString){
  12143. var self=this;
  12144. return smalltalk.send(self, "_compileNode_", [smalltalk.send(self, "_parse_", [aString])]);
  12145. return self;},
  12146. args: ["aString"],
  12147. source: unescape('compile%3A%20aString%0A%09%5Eself%20compileNode%3A%20%28self%20parse%3A%20aString%29'),
  12148. messageSends: ["compileNode:", "parse:"],
  12149. referencedClasses: []
  12150. }),
  12151. smalltalk.Compiler);
  12152. smalltalk.addMethod(
  12153. unescape('_compileNode_'),
  12154. smalltalk.method({
  12155. selector: unescape('compileNode%3A'),
  12156. category: 'compiling',
  12157. fn: function (aNode){
  12158. var self=this;
  12159. (self['@stream']=smalltalk.send("", "_writeStream", []));
  12160. smalltalk.send(self, "_visit_", [aNode]);
  12161. return smalltalk.send(self['@stream'], "_contents", []);
  12162. return self;},
  12163. args: ["aNode"],
  12164. source: unescape('compileNode%3A%20aNode%0A%09stream%20%3A%3D%20%27%27%20writeStream.%0A%09self%20visit%3A%20aNode.%0A%09%5Estream%20contents'),
  12165. messageSends: ["writeStream", "visit:", "contents"],
  12166. referencedClasses: []
  12167. }),
  12168. smalltalk.Compiler);
  12169. smalltalk.addMethod(
  12170. unescape('_visit_'),
  12171. smalltalk.method({
  12172. selector: unescape('visit%3A'),
  12173. category: 'visiting',
  12174. fn: function (aNode){
  12175. var self=this;
  12176. smalltalk.send(aNode, "_accept_", [self]);
  12177. return self;},
  12178. args: ["aNode"],
  12179. source: unescape('visit%3A%20aNode%0A%09aNode%20accept%3A%20self'),
  12180. messageSends: ["accept:"],
  12181. referencedClasses: []
  12182. }),
  12183. smalltalk.Compiler);
  12184. smalltalk.addMethod(
  12185. unescape('_visitMethodNode_'),
  12186. smalltalk.method({
  12187. selector: unescape('visitMethodNode%3A'),
  12188. category: 'visiting',
  12189. fn: function (aNode){
  12190. var self=this;
  12191. var str=nil;
  12192. var currentSelector=nil;
  12193. (self['@currentSelector']=smalltalk.send(smalltalk.send(aNode, "_selector", []), "_asSelector", []));
  12194. (self['@nestedBlocks']=(0));
  12195. (self['@earlyReturn']=false);
  12196. (self['@messageSends']=[]);
  12197. (self['@referencedClasses']=[]);
  12198. (self['@unknownVariables']=[]);
  12199. (self['@tempVariables']=[]);
  12200. (self['@argVariables']=[]);
  12201. (function($rec){smalltalk.send($rec, "_nextPutAll_", [unescape("smalltalk.method%28%7B")]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(unescape("selector%3A%20%22"), "__comma", [smalltalk.send(aNode, "_selector", [])]), "__comma", [unescape("%22%2C")])]);return smalltalk.send($rec, "_lf", []);})(self['@stream']);
  12202. (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(unescape("source%3A%20unescape%28%22"), "__comma", [smalltalk.send(smalltalk.send(self, "_source", []), "_escaped", [])]), "__comma", [unescape("%22%29%2C")])]);return smalltalk.send($rec, "_lf", []);})(self['@stream']);
  12203. smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("fn%3A%20function%28")]);
  12204. smalltalk.send(smalltalk.send(aNode, "_arguments", []), "_do_separatedBy_", [(function(each){smalltalk.send(self['@argVariables'], "_add_", [each]);return smalltalk.send(self['@stream'], "_nextPutAll_", [each]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%2C%20")]);})]);
  12205. (function($rec){smalltalk.send($rec, "_nextPutAll_", [unescape("%29%7B")]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [unescape("var%20self%3Dthis%3B")]);return smalltalk.send($rec, "_lf", []);})(self['@stream']);
  12206. (str=self['@stream']);
  12207. (self['@stream']=smalltalk.send("", "_writeStream", []));
  12208. smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_do_", [(function(each){return smalltalk.send(self, "_visit_", [each]);})]);
  12209. ((($receiver = self['@earlyReturn']).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(str, "_nextPutAll_", [unescape("try%7B")]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(str, "_nextPutAll_", [unescape("try%7B")]);})]));
  12210. smalltalk.send(str, "_nextPutAll_", [smalltalk.send(self['@stream'], "_contents", [])]);
  12211. (self['@stream']=str);
  12212. (function($rec){smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_nextPutAll_", [unescape("return%20self%3B")]);})(self['@stream']);
  12213. ((($receiver = self['@earlyReturn']).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function($rec){smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(unescape("%7D%20catch%28e%29%20%7Bif%28e.name%20%3D%3D%3D%20%27stReturn%27%20%26%26%20e.selector%20%3D%3D%3D%20"), "__comma", [smalltalk.send(self['@currentSelector'], "_printString", [])]), "__comma", [unescape("%29%7Breturn%20e.fn%28%29%7D%20throw%28e%29%7D")])]);})(self['@stream']);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (function($rec){smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(unescape("%7D%20catch%28e%29%20%7Bif%28e.name%20%3D%3D%3D%20%27stReturn%27%20%26%26%20e.selector%20%3D%3D%3D%20"), "__comma", [smalltalk.send(self['@currentSelector'], "_printString", [])]), "__comma", [unescape("%29%7Breturn%20e.fn%28%29%7D%20throw%28e%29%7D")])]);})(self['@stream']);})]));
  12214. smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%7D")]);
  12215. (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(unescape("%2C"), "__comma", [smalltalk.send((smalltalk.String || String), "_lf", [])]), "__comma", ["messageSends: "])]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(self['@messageSends'], "_asJavascript", []), "__comma", [unescape("%2C")])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("args: ", "__comma", [smalltalk.send(self['@argVariables'], "_asJavascript", [])]), "__comma", [unescape("%2C")])]);smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_nextPutAll_", [unescape("referencedClasses%3A%20%5B")]);})(self['@stream']);
  12216. smalltalk.send(self['@referencedClasses'], "_do_separatedBy_", [(function(each){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(each, "_printString", [])]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%2C")]);})]);
  12217. smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%5D")]);
  12218. smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%7D%29")]);
  12219. return self;},
  12220. args: ["aNode"],
  12221. source: unescape('visitMethodNode%3A%20aNode%0A%09%7C%20str%20currentSelector%20%7C%20%0A%09currentSelector%20%3A%3D%20aNode%20selector%20asSelector.%0A%09nestedBlocks%20%3A%3D%200.%0A%09earlyReturn%20%3A%3D%20false.%0A%09messageSends%20%3A%3D%20%23%28%29.%0A%09referencedClasses%20%3A%3D%20%23%28%29.%0A%09unknownVariables%20%3A%3D%20%23%28%29.%0A%09tempVariables%20%3A%3D%20%23%28%29.%0A%09argVariables%20%3A%3D%20%23%28%29.%0A%09stream%20%0A%09%20%20%20%20nextPutAll%3A%20%27smalltalk.method%28%7B%27%3B%20lf%3B%0A%09%20%20%20%20nextPutAll%3A%20%27selector%3A%20%22%27%2C%20aNode%20selector%2C%20%27%22%2C%27%3B%20lf.%0A%09stream%20nextPutAll%3A%20%27source%3A%20unescape%28%22%27%2C%20self%20source%20escaped%2C%20%27%22%29%2C%27%3Blf.%0A%09stream%20nextPutAll%3A%20%27fn%3A%20function%28%27.%0A%09aNode%20arguments%20%0A%09%20%20%20%20do%3A%20%5B%3Aeach%20%7C%20%0A%09%09argVariables%20add%3A%20each.%0A%09%09stream%20nextPutAll%3A%20each%5D%0A%09%20%20%20%20separatedBy%3A%20%5Bstream%20nextPutAll%3A%20%27%2C%20%27%5D.%0A%09stream%20%0A%09%20%20%20%20nextPutAll%3A%20%27%29%7B%27%3B%20lf%3B%0A%09%20%20%20%20nextPutAll%3A%20%27var%20self%3Dthis%3B%27%3B%20lf.%0A%09str%20%3A%3D%20stream.%0A%09stream%20%3A%3D%20%27%27%20writeStream.%0A%09aNode%20nodes%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20self%20visit%3A%20each%5D.%0A%09earlyReturn%20ifTrue%3A%20%5B%0A%09%20%20%20%20str%20nextPutAll%3A%20%27try%7B%27%5D.%0A%09str%20nextPutAll%3A%20stream%20contents.%0A%09stream%20%3A%3D%20str.%0A%09stream%20%0A%09%20%20%20%20lf%3B%20%0A%09%20%20%20%20nextPutAll%3A%20%27return%20self%3B%27.%0A%09earlyReturn%20ifTrue%3A%20%5B%0A%09%20%20%20%20stream%20lf%3B%20nextPutAll%3A%20%27%7D%20catch%28e%29%20%7Bif%28e.name%20%3D%3D%3D%20%27%27stReturn%27%27%20%26%26%20e.selector%20%3D%3D%3D%20%27%2C%20currentSelector%20printString%2C%20%27%29%7Breturn%20e.fn%28%29%7D%20throw%28e%29%7D%27%5D.%0A%09stream%20nextPutAll%3A%20%27%7D%27.%0A%09stream%20%0A%09%09nextPutAll%3A%20%27%2C%27%2C%20String%20lf%2C%20%27messageSends%3A%20%27%3B%0A%09%09nextPutAll%3A%20messageSends%20asJavascript%2C%20%27%2C%27%3B%20lf%3B%0A%20%20%20%20%20%20%20%20%20%20%09nextPutAll%3A%20%27args%3A%20%27%2C%20argVariables%20asJavascript%2C%20%27%2C%27%3B%20lf%3B%0A%09%09nextPutAll%3A%20%27referencedClasses%3A%20%5B%27.%0A%09referencedClasses%20%0A%09%09do%3A%20%5B%3Aeach%20%7C%20stream%20nextPutAll%3A%20each%20printString%5D%0A%09%09separatedBy%3A%20%5Bstream%20nextPutAll%3A%20%27%2C%27%5D.%0A%09stream%20nextPutAll%3A%20%27%5D%27.%0A%09stream%20nextPutAll%3A%20%27%7D%29%27'),
  12222. messageSends: ["asSelector", "selector", "nextPutAll:", "lf", unescape("%2C"), "escaped", "source", "do:separatedBy:", "arguments", "add:", "writeStream", "do:", "nodes", "visit:", "ifTrue:", "contents", "printString", "asJavascript"],
  12223. referencedClasses: ["String"]
  12224. }),
  12225. smalltalk.Compiler);
  12226. smalltalk.addMethod(
  12227. unescape('_visitBlockNode_'),
  12228. smalltalk.method({
  12229. selector: unescape('visitBlockNode%3A'),
  12230. category: 'visiting',
  12231. fn: function (aNode){
  12232. var self=this;
  12233. smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28function%28")]);
  12234. smalltalk.send(smalltalk.send(aNode, "_parameters", []), "_do_separatedBy_", [(function(each){smalltalk.send(self['@tempVariables'], "_add_", [each]);return smalltalk.send(self['@stream'], "_nextPutAll_", [each]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%2C%20")]);})]);
  12235. smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%29%7B")]);
  12236. smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_do_", [(function(each){return smalltalk.send(self, "_visit_", [each]);})]);
  12237. smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%7D%29")]);
  12238. return self;},
  12239. args: ["aNode"],
  12240. source: unescape('visitBlockNode%3A%20aNode%0A%09stream%20nextPutAll%3A%20%27%28function%28%27.%0A%09aNode%20parameters%20%0A%09%20%20%20%20do%3A%20%5B%3Aeach%20%7C%0A%09%09tempVariables%20add%3A%20each.%0A%09%09stream%20nextPutAll%3A%20each%5D%0A%09%20%20%20%20separatedBy%3A%20%5Bstream%20nextPutAll%3A%20%27%2C%20%27%5D.%0A%09stream%20nextPutAll%3A%20%27%29%7B%27.%0A%09aNode%20nodes%20do%3A%20%5B%3Aeach%20%7C%20self%20visit%3A%20each%5D.%0A%09stream%20nextPutAll%3A%20%27%7D%29%27'),
  12241. messageSends: ["nextPutAll:", "do:separatedBy:", "parameters", "add:", "do:", "nodes", "visit:"],
  12242. referencedClasses: []
  12243. }),
  12244. smalltalk.Compiler);
  12245. smalltalk.addMethod(
  12246. unescape('_visitSequenceNode_'),
  12247. smalltalk.method({
  12248. selector: unescape('visitSequenceNode%3A'),
  12249. category: 'visiting',
  12250. fn: function (aNode){
  12251. var self=this;
  12252. smalltalk.send(smalltalk.send(aNode, "_temps", []), "_do_", [(function(each){var temp=nil;
  12253. (temp=smalltalk.send(self, "_safeVariableNameFor_", [each]));smalltalk.send(self['@tempVariables'], "_add_", [temp]);return (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("var ", "__comma", [temp]), "__comma", [unescape("%3Dnil%3B")])]);return smalltalk.send($rec, "_lf", []);})(self['@stream']);})]);
  12254. smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_do_separatedBy_", [(function(each){smalltalk.send(self, "_visit_", [each]);return smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%3B")]);}), (function(){return smalltalk.send(self['@stream'], "_lf", []);})]);
  12255. return self;},
  12256. args: ["aNode"],
  12257. source: unescape('visitSequenceNode%3A%20aNode%0A%09aNode%20temps%20do%3A%20%5B%3Aeach%20%7C%7C%20temp%20%7C%0A%20%20%20%20%20%20%20%20%20%20%20%20temp%20%3A%3D%20self%20safeVariableNameFor%3A%20each.%0A%09%20%20%20%20tempVariables%20add%3A%20temp.%0A%09%20%20%20%20stream%20nextPutAll%3A%20%27var%20%27%2C%20temp%2C%20%27%3Dnil%3B%27%3B%20lf%5D.%0A%09aNode%20nodes%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20self%20visit%3A%20each.%0A%09%20%20%20%20stream%20nextPutAll%3A%20%27%3B%27%5D%0A%09%20%20%20%20separatedBy%3A%20%5Bstream%20lf%5D'),
  12258. messageSends: ["do:", "temps", "safeVariableNameFor:", "add:", "nextPutAll:", unescape("%2C"), "lf", "do:separatedBy:", "nodes", "visit:"],
  12259. referencedClasses: []
  12260. }),
  12261. smalltalk.Compiler);
  12262. smalltalk.addMethod(
  12263. unescape('_visitBlockSequenceNode_'),
  12264. smalltalk.method({
  12265. selector: unescape('visitBlockSequenceNode%3A'),
  12266. category: 'visiting',
  12267. fn: function (aNode){
  12268. var self=this;
  12269. var index=nil;
  12270. (self['@nestedBlocks']=((($receiver = self['@nestedBlocks']).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));
  12271. ((($receiver = smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_isEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("return%20nil%3B")]);})() : (function(){smalltalk.send(smalltalk.send(aNode, "_temps", []), "_do_", [(function(each){var temp=nil;
  12272. (temp=smalltalk.send(self, "_safeVariableNameFor_", [each]));smalltalk.send(self['@tempVariables'], "_add_", [temp]);return (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("var ", "__comma", [temp]), "__comma", [unescape("%3Dnil%3B")])]);return smalltalk.send($rec, "_lf", []);})(self['@stream']);})]);(index=(0));return smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_do_", [(function(each){(index=((($receiver = index).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));((($receiver = smalltalk.send(index, "__eq", [smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_size", [])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", ["return "]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self['@stream'], "_nextPutAll_", ["return "]);})]));smalltalk.send(self, "_visit_", [each]);return smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%3B")]);})]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("return%20nil%3B")]);}), (function(){smalltalk.send(smalltalk.send(aNode, "_temps", []), "_do_", [(function(each){var temp=nil;
  12273. (temp=smalltalk.send(self, "_safeVariableNameFor_", [each]));smalltalk.send(self['@tempVariables'], "_add_", [temp]);return (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("var ", "__comma", [temp]), "__comma", [unescape("%3Dnil%3B")])]);return smalltalk.send($rec, "_lf", []);})(self['@stream']);})]);(index=(0));return smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_do_", [(function(each){(index=((($receiver = index).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));((($receiver = smalltalk.send(index, "__eq", [smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_size", [])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", ["return "]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self['@stream'], "_nextPutAll_", ["return "]);})]));smalltalk.send(self, "_visit_", [each]);return smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%3B")]);})]);})]));
  12274. (self['@nestedBlocks']=((($receiver = self['@nestedBlocks']).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])));
  12275. return self;},
  12276. args: ["aNode"],
  12277. source: unescape('visitBlockSequenceNode%3A%20aNode%0A%09%7C%20index%20%7C%0A%09nestedBlocks%20%3A%3D%20nestedBlocks%20+%201.%0A%09aNode%20nodes%20isEmpty%0A%09%20%20%20%20ifTrue%3A%20%5B%0A%09%09stream%20nextPutAll%3A%20%27return%20nil%3B%27%5D%0A%09%20%20%20%20ifFalse%3A%20%5B%0A%09%09aNode%20temps%20do%3A%20%5B%3Aeach%20%7C%20%7C%20temp%20%7C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20temp%20%3A%3D%20self%20safeVariableNameFor%3A%20each.%0A%09%09%20%20%20%20tempVariables%20add%3A%20temp.%0A%09%09%20%20%20%20stream%20nextPutAll%3A%20%27var%20%27%2C%20temp%2C%20%27%3Dnil%3B%27%3B%20lf%5D.%0A%09%09index%20%3A%3D%200.%0A%09%09aNode%20nodes%20do%3A%20%5B%3Aeach%20%7C%0A%09%09%20%20%20%20index%20%3A%3D%20index%20+%201.%0A%09%09%20%20%20%20index%20%3D%20aNode%20nodes%20size%20ifTrue%3A%20%5B%0A%09%09%09stream%20nextPutAll%3A%20%27return%20%27%5D.%0A%09%09%20%20%20%20self%20visit%3A%20each.%0A%09%09%20%20%20%20stream%20nextPutAll%3A%20%27%3B%27%5D%5D.%0A%09nestedBlocks%20%3A%3D%20nestedBlocks%20-%201'),
  12278. messageSends: [unescape("+"), "ifTrue:ifFalse:", "isEmpty", "nodes", "nextPutAll:", "do:", "temps", "safeVariableNameFor:", "add:", unescape("%2C"), "lf", "ifTrue:", unescape("%3D"), "size", "visit:", unescape("-")],
  12279. referencedClasses: []
  12280. }),
  12281. smalltalk.Compiler);
  12282. smalltalk.addMethod(
  12283. unescape('_visitReturnNode_'),
  12284. smalltalk.method({
  12285. selector: unescape('visitReturnNode%3A'),
  12286. category: 'visiting',
  12287. fn: function (aNode){
  12288. var self=this;
  12289. ((($receiver = ((($receiver = self['@nestedBlocks']).klass === smalltalk.Number) ? $receiver >(0) : smalltalk.send($receiver, "__gt", [(0)]))).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (self['@earlyReturn']=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (self['@earlyReturn']=true);})]));
  12290. ((($receiver = self['@earlyReturn']).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function($rec){smalltalk.send($rec, "_nextPutAll_", [unescape("%28function%28%29%7Bthrow%28")]);smalltalk.send($rec, "_nextPutAll_", [unescape("%7Bname%3A%20%27stReturn%27%2C%20selector%3A%20")]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self['@currentSelector'], "_printString", [])]);return smalltalk.send($rec, "_nextPutAll_", [unescape("%2C%20fn%3A%20function%28%29%7Breturn%20")]);})(self['@stream']);})() : (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", ["return "]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return (function($rec){smalltalk.send($rec, "_nextPutAll_", [unescape("%28function%28%29%7Bthrow%28")]);smalltalk.send($rec, "_nextPutAll_", [unescape("%7Bname%3A%20%27stReturn%27%2C%20selector%3A%20")]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self['@currentSelector'], "_printString", [])]);return smalltalk.send($rec, "_nextPutAll_", [unescape("%2C%20fn%3A%20function%28%29%7Breturn%20")]);})(self['@stream']);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", ["return "]);})]));
  12291. smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_do_", [(function(each){return smalltalk.send(self, "_visit_", [each]);})]);
  12292. ((($receiver = self['@earlyReturn']).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%7D%7D%29%7D%29%28%29")]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%7D%7D%29%7D%29%28%29")]);})]));
  12293. return self;},
  12294. args: ["aNode"],
  12295. source: unescape('visitReturnNode%3A%20aNode%0A%09nestedBlocks%20%3E%200%20ifTrue%3A%20%5B%0A%09%20%20%20%20earlyReturn%20%3A%3D%20true%5D.%0A%09earlyReturn%0A%09%20%20%20%20ifTrue%3A%20%5B%0A%09%09stream%0A%09%09%20%20%20%20nextPutAll%3A%20%27%28function%28%29%7Bthrow%28%27%3B%0A%09%09%20%20%20%20nextPutAll%3A%20%27%7Bname%3A%20%27%27stReturn%27%27%2C%20selector%3A%20%27%3B%0A%09%09%20%20%20%20nextPutAll%3A%20currentSelector%20printString%3B%0A%09%09%20%20%20%20nextPutAll%3A%20%27%2C%20fn%3A%20function%28%29%7Breturn%20%27%5D%0A%09%20%20%20%20ifFalse%3A%20%5Bstream%20nextPutAll%3A%20%27return%20%27%5D.%0A%09aNode%20nodes%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20self%20visit%3A%20each%5D.%0A%09earlyReturn%20ifTrue%3A%20%5B%0A%09%20%20%20%20stream%20nextPutAll%3A%20%27%7D%7D%29%7D%29%28%29%27%5D'),
  12296. messageSends: ["ifTrue:", unescape("%3E"), "ifTrue:ifFalse:", "nextPutAll:", "printString", "do:", "nodes", "visit:"],
  12297. referencedClasses: []
  12298. }),
  12299. smalltalk.Compiler);
  12300. smalltalk.addMethod(
  12301. unescape('_visitSendNode_'),
  12302. smalltalk.method({
  12303. selector: unescape('visitSendNode%3A'),
  12304. category: 'visiting',
  12305. fn: function (aNode){
  12306. var self=this;
  12307. var str=nil;
  12308. var receiver=nil;
  12309. var superSend=nil;
  12310. var inlined=nil;
  12311. (str=self['@stream']);
  12312. ((($receiver = smalltalk.send(self['@messageSends'], "_includes_", [smalltalk.send(aNode, "_selector", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self['@messageSends'], "_add_", [smalltalk.send(aNode, "_selector", [])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self['@messageSends'], "_add_", [smalltalk.send(aNode, "_selector", [])]);})]));
  12313. (self['@stream']=smalltalk.send("", "_writeStream", []));
  12314. smalltalk.send(self, "_visit_", [smalltalk.send(aNode, "_receiver", [])]);
  12315. (superSend=smalltalk.send(smalltalk.send(self['@stream'], "_contents", []), "__eq", ["super"]));
  12316. (receiver=((($receiver = superSend).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "self";})() : (function(){return smalltalk.send(self['@stream'], "_contents", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "self";}), (function(){return smalltalk.send(self['@stream'], "_contents", []);})])));
  12317. (self['@stream']=str);
  12318. ((($receiver = smalltalk.send(self, "_performOptimizations", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(self, "_inlineLiteral_receiverNode_argumentNodes_", [smalltalk.send(aNode, "_selector", []), smalltalk.send(aNode, "_receiver", []), smalltalk.send(aNode, "_arguments", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return ((($receiver = smalltalk.send(self, "_inline_receiver_argumentNodes_", [smalltalk.send(aNode, "_selector", []), receiver, smalltalk.send(aNode, "_arguments", [])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(" : ", "__comma", [smalltalk.send(self, "_send_to_arguments_superSend_", [smalltalk.send(aNode, "_selector", []), "$receiver", smalltalk.send(aNode, "_arguments", []), superSend])]), "__comma", [unescape("%29")])]);})() : (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(self, "_send_to_arguments_superSend_", [smalltalk.send(aNode, "_selector", []), receiver, smalltalk.send(aNode, "_arguments", []), superSend])]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(" : ", "__comma", [smalltalk.send(self, "_send_to_arguments_superSend_", [smalltalk.send(aNode, "_selector", []), "$receiver", smalltalk.send(aNode, "_arguments", []), superSend])]), "__comma", [unescape("%29")])]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(self, "_send_to_arguments_superSend_", [smalltalk.send(aNode, "_selector", []), receiver, smalltalk.send(aNode, "_arguments", []), superSend])]);})]));})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return ((($receiver = smalltalk.send(self, "_inline_receiver_argumentNodes_", [smalltalk.send(aNode, "_selector", []), receiver, smalltalk.send(aNode, "_arguments", [])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(" : ", "__comma", [smalltalk.send(self, "_send_to_arguments_superSend_", [smalltalk.send(aNode, "_selector", []), "$receiver", smalltalk.send(aNode, "_arguments", []), superSend])]), "__comma", [unescape("%29")])]);})() : (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(self, "_send_to_arguments_superSend_", [smalltalk.send(aNode, "_selector", []), receiver, smalltalk.send(aNode, "_arguments", []), superSend])]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(" : ", "__comma", [smalltalk.send(self, "_send_to_arguments_superSend_", [smalltalk.send(aNode, "_selector", []), "$receiver", smalltalk.send(aNode, "_arguments", []), superSend])]), "__comma", [unescape("%29")])]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(self, "_send_to_arguments_superSend_", [smalltalk.send(aNode, "_selector", []), receiver, smalltalk.send(aNode, "_arguments", []), superSend])]);})]));})]));})() : (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(self, "_send_to_arguments_superSend_", [smalltalk.send(aNode, "_selector", []), receiver, smalltalk.send(aNode, "_arguments", []), superSend])]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return ((($receiver = smalltalk.send(self, "_inlineLiteral_receiverNode_argumentNodes_", [smalltalk.send(aNode, "_selector", []), smalltalk.send(aNode, "_receiver", []), smalltalk.send(aNode, "_arguments", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return ((($receiver = smalltalk.send(self, "_inline_receiver_argumentNodes_", [smalltalk.send(aNode, "_selector", []), receiver, smalltalk.send(aNode, "_arguments", [])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(" : ", "__comma", [smalltalk.send(self, "_send_to_arguments_superSend_", [smalltalk.send(aNode, "_selector", []), "$receiver", smalltalk.send(aNode, "_arguments", []), superSend])]), "__comma", [unescape("%29")])]);})() : (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(self, "_send_to_arguments_superSend_", [smalltalk.send(aNode, "_selector", []), receiver, smalltalk.send(aNode, "_arguments", []), superSend])]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(" : ", "__comma", [smalltalk.send(self, "_send_to_arguments_superSend_", [smalltalk.send(aNode, "_selector", []), "$receiver", smalltalk.send(aNode, "_arguments", []), superSend])]), "__comma", [unescape("%29")])]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(self, "_send_to_arguments_superSend_", [smalltalk.send(aNode, "_selector", []), receiver, smalltalk.send(aNode, "_arguments", []), superSend])]);})]));})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return ((($receiver = smalltalk.send(self, "_inline_receiver_argumentNodes_", [smalltalk.send(aNode, "_selector", []), receiver, smalltalk.send(aNode, "_arguments", [])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(" : ", "__comma", [smalltalk.send(self, "_send_to_arguments_superSend_", [smalltalk.send(aNode, "_selector", []), "$receiver", smalltalk.send(aNode, "_arguments", []), superSend])]), "__comma", [unescape("%29")])]);})() : (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(self, "_send_to_arguments_superSend_", [smalltalk.send(aNode, "_selector", []), receiver, smalltalk.send(aNode, "_arguments", []), superSend])]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(" : ", "__comma", [smalltalk.send(self, "_send_to_arguments_superSend_", [smalltalk.send(aNode, "_selector", []), "$receiver", smalltalk.send(aNode, "_arguments", []), superSend])]), "__comma", [unescape("%29")])]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(self, "_send_to_arguments_superSend_", [smalltalk.send(aNode, "_selector", []), receiver, smalltalk.send(aNode, "_arguments", []), superSend])]);})]));})]));}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(self, "_send_to_arguments_superSend_", [smalltalk.send(aNode, "_selector", []), receiver, smalltalk.send(aNode, "_arguments", []), superSend])]);})]));
  12319. return self;},
  12320. args: ["aNode"],
  12321. source: unescape('visitSendNode%3A%20aNode%0A%20%20%20%20%20%20%20%20%7C%20str%20receiver%20superSend%20inlined%20%7C%0A%20%20%20%20%20%20%20%20str%20%3A%3D%20stream.%0A%20%20%20%20%20%20%20%20%28messageSends%20includes%3A%20aNode%20selector%29%20ifFalse%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20messageSends%20add%3A%20aNode%20selector%5D.%0A%20%20%20%20%20%20%20%20stream%20%3A%3D%20%27%27%20writeStream.%0A%20%20%20%20%20%20%20%20self%20visit%3A%20aNode%20receiver.%0A%20%20%20%20%20%20%20%20superSend%20%3A%3D%20stream%20contents%20%3D%20%27super%27.%0A%20%20%20%20%20%20%20%20receiver%20%3A%3D%20superSend%20ifTrue%3A%20%5B%27self%27%5D%20ifFalse%3A%20%5Bstream%20contents%5D.%0A%20%20%20%20%20%20%20%20stream%20%3A%3D%20str.%0A%09%0A%09self%20performOptimizations%20%0A%09%09ifTrue%3A%20%5B%0A%09%09%09%28self%20inlineLiteral%3A%20aNode%20selector%20receiverNode%3A%20aNode%20receiver%20argumentNodes%3A%20aNode%20arguments%29%20ifFalse%3A%20%5B%0A%09%09%09%09%28self%20inline%3A%20aNode%20selector%20receiver%3A%20receiver%20argumentNodes%3A%20aNode%20arguments%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09%09ifTrue%3A%20%5Bstream%20nextPutAll%3A%20%27%20%3A%20%27%2C%20%28self%20send%3A%20aNode%20selector%20to%3A%20%27%24receiver%27%20arguments%3A%20aNode%20arguments%20superSend%3A%20superSend%29%2C%20%27%29%27%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09%09ifFalse%3A%20%5Bstream%20nextPutAll%3A%20%28self%20send%3A%20aNode%20selector%20to%3A%20receiver%20arguments%3A%20aNode%20arguments%20superSend%3A%20superSend%29%5D%5D%5D%0A%09%09ifFalse%3A%20%5Bstream%20nextPutAll%3A%20%28self%20send%3A%20aNode%20selector%20to%3A%20receiver%20arguments%3A%20aNode%20arguments%20superSend%3A%20superSend%29%5D'),
  12322. messageSends: ["ifFalse:", "includes:", "selector", "add:", "writeStream", "visit:", "receiver", unescape("%3D"), "contents", "ifTrue:ifFalse:", "performOptimizations", "inlineLiteral:receiverNode:argumentNodes:", "arguments", "inline:receiver:argumentNodes:", "nextPutAll:", unescape("%2C"), "send:to:arguments:superSend:"],
  12323. referencedClasses: []
  12324. }),
  12325. smalltalk.Compiler);
  12326. smalltalk.addMethod(
  12327. unescape('_visitCascadeNode_'),
  12328. smalltalk.method({
  12329. selector: unescape('visitCascadeNode%3A'),
  12330. category: 'visiting',
  12331. fn: function (aNode){
  12332. var self=this;
  12333. var index=nil;
  12334. (index=(0));
  12335. ((($receiver = smalltalk.send(self['@tempVariables'], "_includes_", ["$rec"])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self['@tempVariables'], "_add_", ["$rec"]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self['@tempVariables'], "_add_", ["$rec"]);})]));
  12336. smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28function%28%24rec%29%7B")]);
  12337. smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_do_", [(function(each){(index=((($receiver = index).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));((($receiver = smalltalk.send(index, "__eq", [smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_size", [])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", ["return "]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self['@stream'], "_nextPutAll_", ["return "]);})]));smalltalk.send(each, "_receiver_", [smalltalk.send(smalltalk.send((smalltalk.VariableNode || VariableNode), "_new", []), "_value_", ["$rec"])]);smalltalk.send(self, "_visit_", [each]);return smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%3B")]);})]);
  12338. smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%7D%29%28")]);
  12339. smalltalk.send(self, "_visit_", [smalltalk.send(aNode, "_receiver", [])]);
  12340. smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%29")]);
  12341. return self;},
  12342. args: ["aNode"],
  12343. source: unescape('visitCascadeNode%3A%20aNode%0A%09%7C%20index%20%7C%0A%09index%20%3A%3D%200.%0A%09%28tempVariables%20includes%3A%20%27%24rec%27%29%20ifFalse%3A%20%5B%0A%09%09tempVariables%20add%3A%20%27%24rec%27%5D.%0A%09stream%20nextPutAll%3A%20%27%28function%28%24rec%29%7B%27.%0A%09aNode%20nodes%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20index%20%3A%3D%20index%20+%201.%0A%09%20%20%20%20index%20%3D%20aNode%20nodes%20size%20ifTrue%3A%20%5B%0A%09%09stream%20nextPutAll%3A%20%27return%20%27%5D.%0A%09%20%20%20%20each%20receiver%3A%20%28VariableNode%20new%20value%3A%20%27%24rec%27%29.%0A%09%20%20%20%20self%20visit%3A%20each.%0A%09%20%20%20%20stream%20nextPutAll%3A%20%27%3B%27%5D.%0A%09stream%20nextPutAll%3A%20%27%7D%29%28%27.%0A%09self%20visit%3A%20aNode%20receiver.%0A%09stream%20nextPutAll%3A%20%27%29%27'),
  12344. messageSends: ["ifFalse:", "includes:", "add:", "nextPutAll:", "do:", "nodes", unescape("+"), "ifTrue:", unescape("%3D"), "size", "receiver:", "value:", "new", "visit:", "receiver"],
  12345. referencedClasses: ["VariableNode"]
  12346. }),
  12347. smalltalk.Compiler);
  12348. smalltalk.addMethod(
  12349. unescape('_visitValueNode_'),
  12350. smalltalk.method({
  12351. selector: unescape('visitValueNode%3A'),
  12352. category: 'visiting',
  12353. fn: function (aNode){
  12354. var self=this;
  12355. smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(aNode, "_value", []), "_asJavascript", [])]);
  12356. return self;},
  12357. args: ["aNode"],
  12358. source: unescape('visitValueNode%3A%20aNode%0A%09stream%20nextPutAll%3A%20aNode%20value%20asJavascript'),
  12359. messageSends: ["nextPutAll:", "asJavascript", "value"],
  12360. referencedClasses: []
  12361. }),
  12362. smalltalk.Compiler);
  12363. smalltalk.addMethod(
  12364. unescape('_visitAssignmentNode_'),
  12365. smalltalk.method({
  12366. selector: unescape('visitAssignmentNode%3A'),
  12367. category: 'visiting',
  12368. fn: function (aNode){
  12369. var self=this;
  12370. smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28")]);
  12371. smalltalk.send(self, "_visit_", [smalltalk.send(aNode, "_left", [])]);
  12372. smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%3D")]);
  12373. smalltalk.send(self, "_visit_", [smalltalk.send(aNode, "_right", [])]);
  12374. smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%29")]);
  12375. return self;},
  12376. args: ["aNode"],
  12377. source: unescape('visitAssignmentNode%3A%20aNode%0A%09stream%20nextPutAll%3A%20%27%28%27.%0A%09self%20visit%3A%20aNode%20left.%0A%09stream%20nextPutAll%3A%20%27%3D%27.%0A%09self%20visit%3A%20aNode%20right.%0A%09stream%20nextPutAll%3A%20%27%29%27'),
  12378. messageSends: ["nextPutAll:", "visit:", "left", "right"],
  12379. referencedClasses: []
  12380. }),
  12381. smalltalk.Compiler);
  12382. smalltalk.addMethod(
  12383. unescape('_visitClassReferenceNode_'),
  12384. smalltalk.method({
  12385. selector: unescape('visitClassReferenceNode%3A'),
  12386. category: 'visiting',
  12387. fn: function (aNode){
  12388. var self=this;
  12389. ((($receiver = smalltalk.send(self['@referencedClasses'], "_includes_", [smalltalk.send(aNode, "_value", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self['@referencedClasses'], "_add_", [smalltalk.send(aNode, "_value", [])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self['@referencedClasses'], "_add_", [smalltalk.send(aNode, "_value", [])]);})]));
  12390. smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(unescape("%28smalltalk."), "__comma", [smalltalk.send(aNode, "_value", [])]), "__comma", [unescape("%20%7C%7C%20")]), "__comma", [smalltalk.send(aNode, "_value", [])]), "__comma", [unescape("%29")])]);
  12391. return self;},
  12392. args: ["aNode"],
  12393. source: unescape('visitClassReferenceNode%3A%20aNode%0A%09%28referencedClasses%20includes%3A%20aNode%20value%29%20ifFalse%3A%20%5B%0A%09%09referencedClasses%20add%3A%20aNode%20value%5D.%0A%09stream%20nextPutAll%3A%20%27%28smalltalk.%27%2C%20aNode%20value%2C%20%27%20%7C%7C%20%27%2C%20aNode%20value%2C%20%27%29%27'),
  12394. messageSends: ["ifFalse:", "includes:", "value", "add:", "nextPutAll:", unescape("%2C")],
  12395. referencedClasses: []
  12396. }),
  12397. smalltalk.Compiler);
  12398. smalltalk.addMethod(
  12399. unescape('_visitVariableNode_'),
  12400. smalltalk.method({
  12401. selector: unescape('visitVariableNode%3A'),
  12402. category: 'visiting',
  12403. fn: function (aNode){
  12404. var self=this;
  12405. var varName=nil;
  12406. ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(self, "_currentClass", []), "_allInstanceVariableNames", []), "_includes_", [smalltalk.send(aNode, "_value", [])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(unescape("self%5B%27@"), "__comma", [smalltalk.send(aNode, "_value", [])]), "__comma", [unescape("%27%5D")])]);})() : (function(){(varName=smalltalk.send(self, "_safeVariableNameFor_", [smalltalk.send(aNode, "_value", [])]));return ((($receiver = smalltalk.send(smalltalk.send(self, "_knownVariables", []), "_includes_", [varName])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){smalltalk.send(self['@unknownVariables'], "_add_", [smalltalk.send(aNode, "_value", [])]);return ((($receiver = smalltalk.send(aNode, "_assigned", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [varName]);})() : (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(unescape("%28typeof%20"), "__comma", [varName]), "__comma", [unescape("%20%3D%3D%20%27undefined%27%20%3F%20nil%20%3A%20")]), "__comma", [varName]), "__comma", [unescape("%29")])]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [varName]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(unescape("%28typeof%20"), "__comma", [varName]), "__comma", [unescape("%20%3D%3D%20%27undefined%27%20%3F%20nil%20%3A%20")]), "__comma", [varName]), "__comma", [unescape("%29")])]);})]));})() : (function(){return ((($receiver = smalltalk.send(smalltalk.send(aNode, "_value", []), "__eq", ["thisContext"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28smalltalk.getThisContext%28%29%29")]);})() : (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [varName]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28smalltalk.getThisContext%28%29%29")]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [varName]);})]));})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){smalltalk.send(self['@unknownVariables'], "_add_", [smalltalk.send(aNode, "_value", [])]);return ((($receiver = smalltalk.send(aNode, "_assigned", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [varName]);})() : (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(unescape("%28typeof%20"), "__comma", [varName]), "__comma", [unescape("%20%3D%3D%20%27undefined%27%20%3F%20nil%20%3A%20")]), "__comma", [varName]), "__comma", [unescape("%29")])]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [varName]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(unescape("%28typeof%20"), "__comma", [varName]), "__comma", [unescape("%20%3D%3D%20%27undefined%27%20%3F%20nil%20%3A%20")]), "__comma", [varName]), "__comma", [unescape("%29")])]);})]));}), (function(){return ((($receiver = smalltalk.send(smalltalk.send(aNode, "_value", []), "__eq", ["thisContext"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28smalltalk.getThisContext%28%29%29")]);})() : (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [varName]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28smalltalk.getThisContext%28%29%29")]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [varName]);})]));})]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(unescape("self%5B%27@"), "__comma", [smalltalk.send(aNode, "_value", [])]), "__comma", [unescape("%27%5D")])]);}), (function(){(varName=smalltalk.send(self, "_safeVariableNameFor_", [smalltalk.send(aNode, "_value", [])]));return ((($receiver = smalltalk.send(smalltalk.send(self, "_knownVariables", []), "_includes_", [varName])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){smalltalk.send(self['@unknownVariables'], "_add_", [smalltalk.send(aNode, "_value", [])]);return ((($receiver = smalltalk.send(aNode, "_assigned", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [varName]);})() : (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(unescape("%28typeof%20"), "__comma", [varName]), "__comma", [unescape("%20%3D%3D%20%27undefined%27%20%3F%20nil%20%3A%20")]), "__comma", [varName]), "__comma", [unescape("%29")])]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [varName]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(unescape("%28typeof%20"), "__comma", [varName]), "__comma", [unescape("%20%3D%3D%20%27undefined%27%20%3F%20nil%20%3A%20")]), "__comma", [varName]), "__comma", [unescape("%29")])]);})]));})() : (function(){return ((($receiver = smalltalk.send(smalltalk.send(aNode, "_value", []), "__eq", ["thisContext"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28smalltalk.getThisContext%28%29%29")]);})() : (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [varName]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28smalltalk.getThisContext%28%29%29")]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [varName]);})]));})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){smalltalk.send(self['@unknownVariables'], "_add_", [smalltalk.send(aNode, "_value", [])]);return ((($receiver = smalltalk.send(aNode, "_assigned", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [varName]);})() : (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(unescape("%28typeof%20"), "__comma", [varName]), "__comma", [unescape("%20%3D%3D%20%27undefined%27%20%3F%20nil%20%3A%20")]), "__comma", [varName]), "__comma", [unescape("%29")])]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [varName]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(unescape("%28typeof%20"), "__comma", [varName]), "__comma", [unescape("%20%3D%3D%20%27undefined%27%20%3F%20nil%20%3A%20")]), "__comma", [varName]), "__comma", [unescape("%29")])]);})]));}), (function(){return ((($receiver = smalltalk.send(smalltalk.send(aNode, "_value", []), "__eq", ["thisContext"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28smalltalk.getThisContext%28%29%29")]);})() : (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [varName]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28smalltalk.getThisContext%28%29%29")]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [varName]);})]));})]));})]));
  12407. return self;},
  12408. args: ["aNode"],
  12409. source: unescape('visitVariableNode%3A%20aNode%0A%09%7C%20varName%20%7C%0A%09%28self%20currentClass%20allInstanceVariableNames%20includes%3A%20aNode%20value%29%20%0A%09%09ifTrue%3A%20%5Bstream%20nextPutAll%3A%20%27self%5B%27%27@%27%2C%20aNode%20value%2C%20%27%27%27%5D%27%5D%0A%09%09ifFalse%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09varName%20%3A%3D%20self%20safeVariableNameFor%3A%20aNode%20value.%0A%09%09%09%28self%20knownVariables%20includes%3A%20varName%29%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09ifFalse%3A%20%5B%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%09unknownVariables%20add%3A%20aNode%20value.%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%09aNode%20assigned%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%09ifTrue%3A%20%5Bstream%20nextPutAll%3A%20varName%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%09ifFalse%3A%20%5Bstream%20nextPutAll%3A%20%27%28typeof%20%27%2C%20varName%2C%20%27%20%3D%3D%20%27%27undefined%27%27%20%3F%20nil%20%3A%20%27%2C%20varName%2C%20%27%29%27%5D%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09ifTrue%3A%20%5B%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%09aNode%20value%20%3D%20%27thisContext%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%09ifTrue%3A%20%5Bstream%20nextPutAll%3A%20%27%28smalltalk.getThisContext%28%29%29%27%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09%09%09ifFalse%3A%20%5Bstream%20nextPutAll%3A%20varName%5D%5D%5D'),
  12410. messageSends: ["ifTrue:ifFalse:", "includes:", "allInstanceVariableNames", "currentClass", "value", "nextPutAll:", unescape("%2C"), "safeVariableNameFor:", "ifFalse:ifTrue:", "knownVariables", "add:", "assigned", unescape("%3D")],
  12411. referencedClasses: []
  12412. }),
  12413. smalltalk.Compiler);
  12414. smalltalk.addMethod(
  12415. unescape('_visitJSStatementNode_'),
  12416. smalltalk.method({
  12417. selector: unescape('visitJSStatementNode%3A'),
  12418. category: 'visiting',
  12419. fn: function (aNode){
  12420. var self=this;
  12421. smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(aNode, "_source", []), "_replace_with_", [unescape("%3E%3E"), unescape("%3E")])]);
  12422. return self;},
  12423. args: ["aNode"],
  12424. source: unescape('visitJSStatementNode%3A%20aNode%0A%09stream%20nextPutAll%3A%20%28aNode%20source%20replace%3A%20%27%3E%3E%27%20with%3A%20%27%3E%27%29'),
  12425. messageSends: ["nextPutAll:", "replace:with:", "source"],
  12426. referencedClasses: []
  12427. }),
  12428. smalltalk.Compiler);
  12429. smalltalk.addMethod(
  12430. unescape('_parse_'),
  12431. smalltalk.method({
  12432. selector: unescape('parse%3A'),
  12433. category: 'compiling',
  12434. fn: function (aString){
  12435. var self=this;
  12436. return smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_parse_", [aString]);
  12437. return self;},
  12438. args: ["aString"],
  12439. source: unescape('parse%3A%20aString%0A%20%20%20%20%5ESmalltalk%20current%20parse%3A%20aString'),
  12440. messageSends: ["parse:", "current"],
  12441. referencedClasses: ["Smalltalk"]
  12442. }),
  12443. smalltalk.Compiler);
  12444. smalltalk.addMethod(
  12445. unescape('_parseExpression_'),
  12446. smalltalk.method({
  12447. selector: unescape('parseExpression%3A'),
  12448. category: 'compiling',
  12449. fn: function (aString){
  12450. var self=this;
  12451. return smalltalk.send(self, "_parse_", [smalltalk.send(smalltalk.send(unescape("doIt%20%5E%5B"), "__comma", [aString]), "__comma", [unescape("%5D%20value")])]);
  12452. return self;},
  12453. args: ["aString"],
  12454. source: unescape('parseExpression%3A%20aString%0A%20%20%20%20%5Eself%20parse%3A%20%27doIt%20%5E%5B%27%2C%20aString%2C%20%27%5D%20value%27'),
  12455. messageSends: ["parse:", unescape("%2C")],
  12456. referencedClasses: []
  12457. }),
  12458. smalltalk.Compiler);
  12459. smalltalk.addMethod(
  12460. unescape('_unknownVariables'),
  12461. smalltalk.method({
  12462. selector: unescape('unknownVariables'),
  12463. category: 'accessing',
  12464. fn: function (){
  12465. var self=this;
  12466. return smalltalk.send(self['@unknownVariables'], "_copy", []);
  12467. return self;},
  12468. args: [],
  12469. source: unescape('unknownVariables%0A%09%5EunknownVariables%20copy'),
  12470. messageSends: ["copy"],
  12471. referencedClasses: []
  12472. }),
  12473. smalltalk.Compiler);
  12474. smalltalk.addMethod(
  12475. unescape('_pseudoVariables'),
  12476. smalltalk.method({
  12477. selector: unescape('pseudoVariables'),
  12478. category: 'accessing',
  12479. fn: function (){
  12480. var self=this;
  12481. return ["self", "super", "true", "false", "nil", "thisContext"];
  12482. return self;},
  12483. args: [],
  12484. source: unescape('pseudoVariables%0A%09%5E%23%28%27self%27%20%27super%27%20%27true%27%20%27false%27%20%27nil%27%20%27thisContext%27%29'),
  12485. messageSends: [],
  12486. referencedClasses: []
  12487. }),
  12488. smalltalk.Compiler);
  12489. smalltalk.addMethod(
  12490. unescape('_tempVariables'),
  12491. smalltalk.method({
  12492. selector: unescape('tempVariables'),
  12493. category: 'accessing',
  12494. fn: function (){
  12495. var self=this;
  12496. return smalltalk.send(self['@tempVariables'], "_copy", []);
  12497. return self;},
  12498. args: [],
  12499. source: unescape('tempVariables%0A%09%5EtempVariables%20copy'),
  12500. messageSends: ["copy"],
  12501. referencedClasses: []
  12502. }),
  12503. smalltalk.Compiler);
  12504. smalltalk.addMethod(
  12505. unescape('_knownVariables'),
  12506. smalltalk.method({
  12507. selector: unescape('knownVariables'),
  12508. category: 'accessing',
  12509. fn: function (){
  12510. var self=this;
  12511. return (function($rec){smalltalk.send($rec, "_addAll_", [smalltalk.send(self, "_tempVariables", [])]);smalltalk.send($rec, "_addAll_", [smalltalk.send(self, "_argVariables", [])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_pseudoVariables", []));
  12512. return self;},
  12513. args: [],
  12514. source: unescape('knownVariables%0A%09%5Eself%20pseudoVariables%20%0A%09%09addAll%3A%20self%20tempVariables%3B%0A%09%09addAll%3A%20self%20argVariables%3B%0A%09%09yourself'),
  12515. messageSends: ["addAll:", "tempVariables", "argVariables", "yourself", "pseudoVariables"],
  12516. referencedClasses: []
  12517. }),
  12518. smalltalk.Compiler);
  12519. smalltalk.addMethod(
  12520. unescape('_recompile_'),
  12521. smalltalk.method({
  12522. selector: unescape('recompile%3A'),
  12523. category: 'compiling',
  12524. fn: function (aClass){
  12525. var self=this;
  12526. smalltalk.send(smalltalk.send(aClass, "_methodDictionary", []), "_do_", [(function(each){var method=nil;
  12527. (method=smalltalk.send(self, "_load_forClass_", [smalltalk.send(each, "_source", []), aClass]));smalltalk.send(method, "_category_", [smalltalk.send(each, "_category", [])]);return smalltalk.send(aClass, "_addCompiledMethod_", [method]);})]);
  12528. ((($receiver = smalltalk.send(aClass, "_isMetaclass", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_recompile_", [smalltalk.send(aClass, "_class", [])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self, "_recompile_", [smalltalk.send(aClass, "_class", [])]);})]));
  12529. return self;},
  12530. args: ["aClass"],
  12531. source: unescape('recompile%3A%20aClass%0A%09aClass%20methodDictionary%20do%3A%20%5B%3Aeach%20%7C%7C%20method%20%7C%0A%09%09method%20%3A%3D%20self%20load%3A%20each%20source%20forClass%3A%20aClass.%0A%09%09method%20category%3A%20each%20category.%0A%09%09aClass%20addCompiledMethod%3A%20method%5D.%0A%09aClass%20isMetaclass%20ifFalse%3A%20%5Bself%20recompile%3A%20aClass%20class%5D'),
  12532. messageSends: ["do:", "methodDictionary", "load:forClass:", "source", "category:", "category", "addCompiledMethod:", "ifFalse:", "isMetaclass", "recompile:", "class"],
  12533. referencedClasses: []
  12534. }),
  12535. smalltalk.Compiler);
  12536. smalltalk.addMethod(
  12537. unescape('_recompileAll'),
  12538. smalltalk.method({
  12539. selector: unescape('recompileAll'),
  12540. category: 'compiling',
  12541. fn: function (){
  12542. var self=this;
  12543. smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_classes", []), "_do_", [(function(each){(function($rec){smalltalk.send($rec, "_show_", [each]);return smalltalk.send($rec, "_cr", []);})((smalltalk.Transcript || Transcript));return smalltalk.send((function(){return smalltalk.send(self, "_recompile_", [each]);}), "_valueWithTimeout_", [(100)]);})]);
  12544. return self;},
  12545. args: [],
  12546. source: unescape('recompileAll%0A%09Smalltalk%20current%20classes%20do%3A%20%5B%3Aeach%20%7C%0A%09%09Transcript%20show%3A%20each%3B%20cr.%0A%09%09%5Bself%20recompile%3A%20each%5D%20valueWithTimeout%3A%20100%5D'),
  12547. messageSends: ["do:", "classes", "current", "show:", "cr", "valueWithTimeout:", "recompile:"],
  12548. referencedClasses: ["Smalltalk", "Transcript"]
  12549. }),
  12550. smalltalk.Compiler);
  12551. smalltalk.addMethod(
  12552. unescape('_classNameFor_'),
  12553. smalltalk.method({
  12554. selector: unescape('classNameFor%3A'),
  12555. category: 'accessing',
  12556. fn: function (aClass){
  12557. var self=this;
  12558. return ((($receiver = smalltalk.send(aClass, "_isMetaclass", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_instanceClass", []), "_name", []), "__comma", [".klass"]);})() : (function(){return ((($receiver = smalltalk.send(aClass, "_isNil", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "nil";})() : (function(){return smalltalk.send(aClass, "_name", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "nil";}), (function(){return smalltalk.send(aClass, "_name", []);})]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_instanceClass", []), "_name", []), "__comma", [".klass"]);}), (function(){return ((($receiver = smalltalk.send(aClass, "_isNil", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "nil";})() : (function(){return smalltalk.send(aClass, "_name", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "nil";}), (function(){return smalltalk.send(aClass, "_name", []);})]));})]));
  12559. return self;},
  12560. args: ["aClass"],
  12561. source: unescape('classNameFor%3A%20aClass%0A%09%5EaClass%20isMetaclass%0A%09%20%20%20%20ifTrue%3A%20%5BaClass%20instanceClass%20name%2C%20%27.klass%27%5D%0A%09%20%20%20%20ifFalse%3A%20%5B%0A%09%09aClass%20isNil%0A%09%09%20%20%20%20ifTrue%3A%20%5B%27nil%27%5D%0A%09%09%20%20%20%20ifFalse%3A%20%5BaClass%20name%5D%5D'),
  12562. messageSends: ["ifTrue:ifFalse:", "isMetaclass", unescape("%2C"), "name", "instanceClass", "isNil"],
  12563. referencedClasses: []
  12564. }),
  12565. smalltalk.Compiler);
  12566. smalltalk.addMethod(
  12567. unescape('_visitFailure_'),
  12568. smalltalk.method({
  12569. selector: unescape('visitFailure%3A'),
  12570. category: 'visiting',
  12571. fn: function (aFailure){
  12572. var self=this;
  12573. smalltalk.send(self, "_error_", [smalltalk.send(aFailure, "_asString", [])]);
  12574. return self;},
  12575. args: ["aFailure"],
  12576. source: unescape('visitFailure%3A%20aFailure%0A%09self%20error%3A%20aFailure%20asString'),
  12577. messageSends: ["error:", "asString"],
  12578. referencedClasses: []
  12579. }),
  12580. smalltalk.Compiler);
  12581. smalltalk.addMethod(
  12582. unescape('_setupClass_'),
  12583. smalltalk.method({
  12584. selector: unescape('setupClass%3A'),
  12585. category: 'compiling',
  12586. fn: function (aClass){
  12587. var self=this;
  12588. smalltalk.init(aClass);
  12589. return self;},
  12590. args: ["aClass"],
  12591. source: unescape('setupClass%3A%20aClass%0A%09%3Csmalltalk.init%28aClass%29%3E'),
  12592. messageSends: [],
  12593. referencedClasses: []
  12594. }),
  12595. smalltalk.Compiler);
  12596. smalltalk.addMethod(
  12597. unescape('_send_to_arguments_superSend_'),
  12598. smalltalk.method({
  12599. selector: unescape('send%3Ato%3Aarguments%3AsuperSend%3A'),
  12600. category: 'visiting',
  12601. fn: function (aSelector, aReceiver, aCollection, aBoolean){
  12602. var self=this;
  12603. return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(str){var tmp=nil;
  12604. (tmp=self['@stream']);smalltalk.send(str, "_nextPutAll_", [unescape("smalltalk.send%28")]);smalltalk.send(str, "_nextPutAll_", [aReceiver]);smalltalk.send(str, "_nextPutAll_", [smalltalk.send(smalltalk.send(unescape("%2C%20%22"), "__comma", [smalltalk.send(aSelector, "_asSelector", [])]), "__comma", [unescape("%22%2C%20%5B")])]);(self['@stream']=str);smalltalk.send(aCollection, "_do_separatedBy_", [(function(each){return smalltalk.send(self, "_visit_", [each]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%2C%20")]);})]);(self['@stream']=tmp);smalltalk.send(str, "_nextPutAll_", [unescape("%5D")]);((($receiver = aBoolean).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(str, "_nextPutAll_", [smalltalk.send(unescape("%2C%20smalltalk."), "__comma", [smalltalk.send(self, "_classNameFor_", [smalltalk.send(smalltalk.send(self, "_currentClass", []), "_superclass", [])])])]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(str, "_nextPutAll_", [smalltalk.send(unescape("%2C%20smalltalk."), "__comma", [smalltalk.send(self, "_classNameFor_", [smalltalk.send(smalltalk.send(self, "_currentClass", []), "_superclass", [])])])]);})]));return smalltalk.send(str, "_nextPutAll_", [unescape("%29")]);})]);
  12605. return self;},
  12606. args: ["aSelector", "aReceiver", "aCollection", "aBoolean"],
  12607. source: unescape('send%3A%20aSelector%20to%3A%20aReceiver%20arguments%3A%20aCollection%20superSend%3A%20aBoolean%0A%09%5EString%20streamContents%3A%20%5B%3Astr%20%7C%7C%20tmp%20%7C%0A%20%20%20%20%20%20%20%20%09tmp%20%3A%3D%20stream.%0A%09%09str%20nextPutAll%3A%20%27smalltalk.send%28%27.%0A%09%09str%20nextPutAll%3A%20aReceiver.%0A%09%09str%20nextPutAll%3A%20%27%2C%20%22%27%2C%20aSelector%20asSelector%2C%20%27%22%2C%20%5B%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20stream%20%3A%3D%20str.%0A%09%09aCollection%0A%09%20%20%20%20%09%09do%3A%20%5B%3Aeach%20%7C%20self%20visit%3A%20each%5D%0A%09%20%20%20%20%09%09separatedBy%3A%20%5Bstream%20nextPutAll%3A%20%27%2C%20%27%5D.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20stream%20%3A%3D%20tmp.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20str%20nextPutAll%3A%20%27%5D%27.%0A%09%09aBoolean%20ifTrue%3A%20%5B%0A%09%09%09str%20nextPutAll%3A%20%27%2C%20smalltalk.%27%2C%20%28self%20classNameFor%3A%20self%20currentClass%20superclass%29%5D.%0A%09%09str%20nextPutAll%3A%20%27%29%27%5D'),
  12608. messageSends: ["streamContents:", "nextPutAll:", unescape("%2C"), "asSelector", "do:separatedBy:", "visit:", "ifTrue:", "classNameFor:", "superclass", "currentClass"],
  12609. referencedClasses: ["String"]
  12610. }),
  12611. smalltalk.Compiler);
  12612. smalltalk.addMethod(
  12613. unescape('_checkClass_for_'),
  12614. smalltalk.method({
  12615. selector: unescape('checkClass%3Afor%3A'),
  12616. category: 'optimizations',
  12617. fn: function (aClassName, receiver){
  12618. var self=this;
  12619. smalltalk.send(self['@stream'], "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(unescape("%28%28%28%24receiver%20%3D%20"), "__comma", [receiver]), "__comma", [unescape("%29.klass%20%3D%3D%3D%20smalltalk.")]), "__comma", [aClassName]), "__comma", [unescape("%29%20%3F%20")])]);
  12620. return self;},
  12621. args: ["aClassName", "receiver"],
  12622. source: unescape('checkClass%3A%20aClassName%20for%3A%20receiver%0A%20%20%20%20%20%20%20%20stream%20nextPutAll%3A%20%27%28%28%28%24receiver%20%3D%20%27%2C%20receiver%2C%20%27%29.klass%20%3D%3D%3D%20smalltalk.%27%2C%20aClassName%2C%20%27%29%20%3F%20%27'),
  12623. messageSends: ["nextPutAll:", unescape("%2C")],
  12624. referencedClasses: []
  12625. }),
  12626. smalltalk.Compiler);
  12627. smalltalk.addMethod(
  12628. unescape('_inlineLiteral_receiverNode_argumentNodes_'),
  12629. smalltalk.method({
  12630. selector: unescape('inlineLiteral%3AreceiverNode%3AargumentNodes%3A'),
  12631. category: 'optimizations',
  12632. fn: function (aSelector, anObject, aCollection){
  12633. var self=this;
  12634. var inlined=nil;
  12635. (inlined=false);
  12636. ((($receiver = smalltalk.send(aSelector, "__eq", ["whileTrue:"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(anObject, "_isBlockNode", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28function%28%29%7Bwhile%28")]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%29%20%7B")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%7D%7D%29%28%29")]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28function%28%29%7Bwhile%28")]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%29%20%7B")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%7D%7D%29%28%29")]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(smalltalk.send(anObject, "_isBlockNode", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28function%28%29%7Bwhile%28")]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%29%20%7B")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%7D%7D%29%28%29")]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28function%28%29%7Bwhile%28")]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%29%20%7B")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%7D%7D%29%28%29")]);return (inlined=true);})]));})]));
  12637. ((($receiver = smalltalk.send(aSelector, "__eq", ["whileFalse:"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(anObject, "_isBlockNode", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28function%28%29%7Bwhile%28%21")]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%29%20%7B")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%7D%7D%29%28%29")]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28function%28%29%7Bwhile%28%21")]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%29%20%7B")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%7D%7D%29%28%29")]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(smalltalk.send(anObject, "_isBlockNode", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28function%28%29%7Bwhile%28%21")]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%29%20%7B")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%7D%7D%29%28%29")]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28function%28%29%7Bwhile%28%21")]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%29%20%7B")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%7D%7D%29%28%29")]);return (inlined=true);})]));})]));
  12638. ((($receiver = smalltalk.send(aSelector, "__eq", ["whileTrue"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(anObject, "_isBlockNode", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28function%28%29%7Bwhile%28")]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%29%20%7B%7D%7D%29%28%29")]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28function%28%29%7Bwhile%28")]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%29%20%7B%7D%7D%29%28%29")]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(anObject, "_isBlockNode", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28function%28%29%7Bwhile%28")]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%29%20%7B%7D%7D%29%28%29")]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28function%28%29%7Bwhile%28")]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%29%20%7B%7D%7D%29%28%29")]);return (inlined=true);})]));})]));
  12639. ((($receiver = smalltalk.send(aSelector, "__eq", ["whileFalse"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(anObject, "_isBlockNode", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28function%28%29%7Bwhile%28%21")]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%29%20%7B%7D%7D%29%28%29")]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28function%28%29%7Bwhile%28%21")]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%29%20%7B%7D%7D%29%28%29")]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(anObject, "_isBlockNode", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28function%28%29%7Bwhile%28%21")]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%29%20%7B%7D%7D%29%28%29")]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28function%28%29%7Bwhile%28%21")]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%29%20%7B%7D%7D%29%28%29")]);return (inlined=true);})]));})]));
  12640. ((($receiver = smalltalk.send(aSelector, "__eq", [unescape("+")])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(self, "_isNode_ofClass_", [anObject, (smalltalk.Number || Number)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%20+%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%20+%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(self, "_isNode_ofClass_", [anObject, (smalltalk.Number || Number)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%20+%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%20+%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));})]));
  12641. ((($receiver = smalltalk.send(aSelector, "__eq", [unescape("-")])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(self, "_isNode_ofClass_", [anObject, (smalltalk.Number || Number)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%20-%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%20-%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(self, "_isNode_ofClass_", [anObject, (smalltalk.Number || Number)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%20-%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%20-%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));})]));
  12642. ((($receiver = smalltalk.send(aSelector, "__eq", [unescape("*")])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(self, "_isNode_ofClass_", [anObject, (smalltalk.Number || Number)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%20*%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%20*%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(self, "_isNode_ofClass_", [anObject, (smalltalk.Number || Number)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%20*%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%20*%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));})]));
  12643. ((($receiver = smalltalk.send(aSelector, "__eq", [unescape("/")])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(self, "_isNode_ofClass_", [anObject, (smalltalk.Number || Number)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%20/%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%20/%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(self, "_isNode_ofClass_", [anObject, (smalltalk.Number || Number)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%20/%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%20/%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));})]));
  12644. ((($receiver = smalltalk.send(aSelector, "__eq", [unescape("%3C")])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(self, "_isNode_ofClass_", [anObject, (smalltalk.Number || Number)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%20%3C%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%20%3C%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(self, "_isNode_ofClass_", [anObject, (smalltalk.Number || Number)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%20%3C%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%20%3C%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));})]));
  12645. ((($receiver = smalltalk.send(aSelector, "__eq", [unescape("%3C%3D")])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(self, "_isNode_ofClass_", [anObject, (smalltalk.Number || Number)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%20%3C%3D%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%20%3C%3D%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(self, "_isNode_ofClass_", [anObject, (smalltalk.Number || Number)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%20%3C%3D%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%20%3C%3D%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));})]));
  12646. ((($receiver = smalltalk.send(aSelector, "__eq", [unescape("%3E")])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(self, "_isNode_ofClass_", [anObject, (smalltalk.Number || Number)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%20%3E%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%20%3E%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(self, "_isNode_ofClass_", [anObject, (smalltalk.Number || Number)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%20%3E%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%20%3E%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));})]));
  12647. ((($receiver = smalltalk.send(aSelector, "__eq", [unescape("%3E%3D")])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(self, "_isNode_ofClass_", [anObject, (smalltalk.Number || Number)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%20%3E%3D%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%20%3E%3D%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(self, "_isNode_ofClass_", [anObject, (smalltalk.Number || Number)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%20%3E%3D%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%20%3E%3D%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));})]));
  12648. ((($receiver = smalltalk.send(aSelector, "__eq", ["ifNil:"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%28%24receiver%20%3D%20")]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%29%20%3D%3D%20nil%20%7C%7C%20%24receiver%20%3D%3D%20undefined%29%20%3F%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%20%3A%20%24receiver")]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%28%24receiver%20%3D%20")]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%29%20%3D%3D%20nil%20%7C%7C%20%24receiver%20%3D%3D%20undefined%29%20%3F%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%20%3A%20%24receiver")]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%28%24receiver%20%3D%20")]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%29%20%3D%3D%20nil%20%7C%7C%20%24receiver%20%3D%3D%20undefined%29%20%3F%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%20%3A%20%24receiver")]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%28%24receiver%20%3D%20")]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%29%20%3D%3D%20nil%20%7C%7C%20%24receiver%20%3D%3D%20undefined%29%20%3F%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%20%3A%20%24receiver")]);return (inlined=true);})]));})]));
  12649. ((($receiver = smalltalk.send(aSelector, "__eq", ["ifNotNil:"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%28%24receiver%20%3D%20")]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%29%20%21%3D%20nil%20%26%26%20%24receiver%20%21%3D%20undefined%29%20%3F%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%20%3A%20nil")]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%28%24receiver%20%3D%20")]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%29%20%21%3D%20nil%20%26%26%20%24receiver%20%21%3D%20undefined%29%20%3F%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%20%3A%20nil")]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%28%24receiver%20%3D%20")]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%29%20%21%3D%20nil%20%26%26%20%24receiver%20%21%3D%20undefined%29%20%3F%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%20%3A%20nil")]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%28%24receiver%20%3D%20")]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%29%20%21%3D%20nil%20%26%26%20%24receiver%20%21%3D%20undefined%29%20%3F%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%20%3A%20nil")]);return (inlined=true);})]));})]));
  12650. ((($receiver = smalltalk.send(aSelector, "__eq", ["ifNil:ifNotNil:"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(aCollection, "_second", []), "_isBlockNode", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%28%24receiver%20%3D%20")]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%29%20%3D%3D%20nil%20%7C%7C%20%24receiver%20%3D%3D%20undefined%29%20%3F%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%20%3A%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_second", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29")]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%28%24receiver%20%3D%20")]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%29%20%3D%3D%20nil%20%7C%7C%20%24receiver%20%3D%3D%20undefined%29%20%3F%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%20%3A%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_second", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29")]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(aCollection, "_second", []), "_isBlockNode", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%28%24receiver%20%3D%20")]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%29%20%3D%3D%20nil%20%7C%7C%20%24receiver%20%3D%3D%20undefined%29%20%3F%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%20%3A%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_second", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29")]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%28%24receiver%20%3D%20")]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%29%20%3D%3D%20nil%20%7C%7C%20%24receiver%20%3D%3D%20undefined%29%20%3F%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%20%3A%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_second", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29")]);return (inlined=true);})]));})]));
  12651. ((($receiver = smalltalk.send(aSelector, "__eq", ["ifNotNil:ifNil:"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(aCollection, "_second", []), "_isBlockNode", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%28%24receiver%20%3D%20")]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%29%20%3D%3D%20nil%20%7C%7C%20%24receiver%20%3D%3D%20undefined%29%20%3F%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_second", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%20%3A%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29")]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%28%24receiver%20%3D%20")]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%29%20%3D%3D%20nil%20%7C%7C%20%24receiver%20%3D%3D%20undefined%29%20%3F%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_second", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%20%3A%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29")]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(aCollection, "_second", []), "_isBlockNode", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%28%24receiver%20%3D%20")]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%29%20%3D%3D%20nil%20%7C%7C%20%24receiver%20%3D%3D%20undefined%29%20%3F%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_second", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%20%3A%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29")]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%28%24receiver%20%3D%20")]);smalltalk.send(self, "_visit_", [anObject]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%29%20%3D%3D%20nil%20%7C%7C%20%24receiver%20%3D%3D%20undefined%29%20%3F%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_second", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%20%3A%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29")]);return (inlined=true);})]));})]));
  12652. return inlined;
  12653. return self;},
  12654. args: ["aSelector", "anObject", "aCollection"],
  12655. source: unescape('inlineLiteral%3A%20aSelector%20receiverNode%3A%20anObject%20argumentNodes%3A%20aCollection%0A%20%20%20%20%20%20%20%20%7C%20inlined%20%7C%0A%20%20%20%20%20%20%20%20inlined%20%3A%3D%20false.%0A%20%0A%09%22--%20BlockClosures%20--%22%0A%0A%09%28aSelector%20%3D%20%27whileTrue%3A%27%29%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%09%28anObject%20isBlockNode%20and%3A%20%5BaCollection%20first%20isBlockNode%5D%29%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09stream%20nextPutAll%3A%20%27%28function%28%29%7Bwhile%28%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09self%20visit%3A%20anObject.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09stream%20nextPutAll%3A%20%27%28%29%29%20%7B%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09self%20visit%3A%20aCollection%20first.%0A%20%20%20%20%20%20%20%20%20%20%09%09stream%20nextPutAll%3A%20%27%28%29%7D%7D%29%28%29%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09inlined%20%3A%3D%20true%5D%5D.%0A%0A%09%28aSelector%20%3D%20%27whileFalse%3A%27%29%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%09%28anObject%20isBlockNode%20and%3A%20%5BaCollection%20first%20isBlockNode%5D%29%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09stream%20nextPutAll%3A%20%27%28function%28%29%7Bwhile%28%21%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09self%20visit%3A%20anObject.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09stream%20nextPutAll%3A%20%27%28%29%29%20%7B%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09self%20visit%3A%20aCollection%20first.%0A%20%20%20%20%20%20%20%20%20%20%09%09stream%20nextPutAll%3A%20%27%28%29%7D%7D%29%28%29%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09inlined%20%3A%3D%20true%5D%5D.%0A%0A%09%28aSelector%20%3D%20%27whileTrue%27%29%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%09anObject%20isBlockNode%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09stream%20nextPutAll%3A%20%27%28function%28%29%7Bwhile%28%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09self%20visit%3A%20anObject.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09stream%20nextPutAll%3A%20%27%28%29%29%20%7B%7D%7D%29%28%29%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09inlined%20%3A%3D%20true%5D%5D.%0A%0A%09%28aSelector%20%3D%20%27whileFalse%27%29%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%09anObject%20isBlockNode%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09stream%20nextPutAll%3A%20%27%28function%28%29%7Bwhile%28%21%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09self%20visit%3A%20anObject.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09stream%20nextPutAll%3A%20%27%28%29%29%20%7B%7D%7D%29%28%29%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09inlined%20%3A%3D%20true%5D%5D.%0A%0A%09%22--%20Numbers%20--%22%0A%0A%09%28aSelector%20%3D%20%27+%27%29%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%09%28self%20isNode%3A%20anObject%20ofClass%3A%20Number%29%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09self%20visit%3A%20anObject.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09stream%20nextPutAll%3A%20%27%20+%20%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09self%20visit%3A%20aCollection%20first.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09inlined%20%3A%3D%20true%5D%5D.%0A%0A%09%28aSelector%20%3D%20%27-%27%29%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%09%28self%20isNode%3A%20anObject%20ofClass%3A%20Number%29%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09self%20visit%3A%20anObject.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09stream%20nextPutAll%3A%20%27%20-%20%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09self%20visit%3A%20aCollection%20first.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09inlined%20%3A%3D%20true%5D%5D.%0A%0A%09%28aSelector%20%3D%20%27*%27%29%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%09%28self%20isNode%3A%20anObject%20ofClass%3A%20Number%29%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09self%20visit%3A%20anObject.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09stream%20nextPutAll%3A%20%27%20*%20%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09self%20visit%3A%20aCollection%20first.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09inlined%20%3A%3D%20true%5D%5D.%0A%0A%09%28aSelector%20%3D%20%27/%27%29%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%09%28self%20isNode%3A%20anObject%20ofClass%3A%20Number%29%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09self%20visit%3A%20anObject.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09stream%20nextPutAll%3A%20%27%20/%20%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09self%20visit%3A%20aCollection%20first.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09inlined%20%3A%3D%20true%5D%5D.%0A%0A%09%28aSelector%20%3D%20%27%3C%27%29%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%09%28self%20isNode%3A%20anObject%20ofClass%3A%20Number%29%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09self%20visit%3A%20anObject.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09stream%20nextPutAll%3A%20%27%20%3C%20%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09self%20visit%3A%20aCollection%20first.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09inlined%20%3A%3D%20true%5D%5D.%0A%0A%09%28aSelector%20%3D%20%27%3C%3D%27%29%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%09%28self%20isNode%3A%20anObject%20ofClass%3A%20Number%29%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09self%20visit%3A%20anObject.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09stream%20nextPutAll%3A%20%27%20%3C%3D%20%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09self%20visit%3A%20aCollection%20first.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09inlined%20%3A%3D%20true%5D%5D.%0A%0A%09%28aSelector%20%3D%20%27%3E%27%29%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%09%28self%20isNode%3A%20anObject%20ofClass%3A%20Number%29%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09self%20visit%3A%20anObject.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09stream%20nextPutAll%3A%20%27%20%3E%20%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09self%20visit%3A%20aCollection%20first.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09inlined%20%3A%3D%20true%5D%5D.%0A%0A%09%28aSelector%20%3D%20%27%3E%3D%27%29%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%09%28self%20isNode%3A%20anObject%20ofClass%3A%20Number%29%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09self%20visit%3A%20anObject.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09stream%20nextPutAll%3A%20%27%20%3E%3D%20%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09self%20visit%3A%20aCollection%20first.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09inlined%20%3A%3D%20true%5D%5D.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%20%20%20%0A%09%22--%20UndefinedObject%20--%22%0A%0A%09%28aSelector%20%3D%20%27ifNil%3A%27%29%20ifTrue%3A%20%5B%0A%09%09aCollection%20first%20isBlockNode%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%09%09stream%20nextPutAll%3A%20%27%28%28%24receiver%20%3D%20%27.%0A%20%20%20%20%20%20%20%20%20%20%09%09self%20visit%3A%20anObject.%0A%20%20%20%20%20%20%20%20%20%20%09%09stream%20nextPutAll%3A%20%27%29%20%3D%3D%20nil%20%7C%7C%20%24receiver%20%3D%3D%20undefined%29%20%3F%20%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09self%20visit%3A%20aCollection%20first.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09stream%20nextPutAll%3A%20%27%28%29%20%3A%20%24receiver%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09inlined%20%3A%3D%20true%5D%5D.%0A%0A%09%28aSelector%20%3D%20%27ifNotNil%3A%27%29%20ifTrue%3A%20%5B%0A%09%09aCollection%20first%20isBlockNode%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%09%09stream%20nextPutAll%3A%20%27%28%28%24receiver%20%3D%20%27.%0A%20%20%20%20%20%20%20%20%20%20%09%09self%20visit%3A%20anObject.%0A%20%20%20%20%20%20%20%20%20%20%09%09stream%20nextPutAll%3A%20%27%29%20%21%3D%20nil%20%26%26%20%24receiver%20%21%3D%20undefined%29%20%3F%20%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09self%20visit%3A%20aCollection%20first.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09stream%20nextPutAll%3A%20%27%28%29%20%3A%20nil%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09inlined%20%3A%3D%20true%5D%5D.%0A%0A%09%28aSelector%20%3D%20%27ifNil%3AifNotNil%3A%27%29%20ifTrue%3A%20%5B%0A%09%09%28aCollection%20first%20isBlockNode%20and%3A%20%5BaCollection%20second%20isBlockNode%5D%29%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%09%09stream%20nextPutAll%3A%20%27%28%28%24receiver%20%3D%20%27.%0A%20%20%20%20%20%20%20%20%20%20%09%09self%20visit%3A%20anObject.%0A%20%20%20%20%20%20%20%20%20%20%09%09stream%20nextPutAll%3A%20%27%29%20%3D%3D%20nil%20%7C%7C%20%24receiver%20%3D%3D%20undefined%29%20%3F%20%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09self%20visit%3A%20aCollection%20first.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09stream%20nextPutAll%3A%20%27%28%29%20%3A%20%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09self%20visit%3A%20aCollection%20second.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09stream%20nextPutAll%3A%20%27%28%29%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09inlined%20%3A%3D%20true%5D%5D.%0A%0A%09%28aSelector%20%3D%20%27ifNotNil%3AifNil%3A%27%29%20ifTrue%3A%20%5B%0A%09%09%28aCollection%20first%20isBlockNode%20and%3A%20%5BaCollection%20second%20isBlockNode%5D%29%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%09%09stream%20nextPutAll%3A%20%27%28%28%24receiver%20%3D%20%27.%0A%20%20%20%20%20%20%20%20%20%20%09%09self%20visit%3A%20anObject.%0A%20%20%20%20%20%20%20%20%20%20%09%09stream%20nextPutAll%3A%20%27%29%20%3D%3D%20nil%20%7C%7C%20%24receiver%20%3D%3D%20undefined%29%20%3F%20%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09self%20visit%3A%20aCollection%20second.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09stream%20nextPutAll%3A%20%27%28%29%20%3A%20%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09self%20visit%3A%20aCollection%20first.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09stream%20nextPutAll%3A%20%27%28%29%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09inlined%20%3A%3D%20true%5D%5D.%0A%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%5Einlined'),
  12656. messageSends: ["ifTrue:", unescape("%3D"), "and:", "isBlockNode", "first", "nextPutAll:", "visit:", "isNode:ofClass:", "second"],
  12657. referencedClasses: ["Number"]
  12658. }),
  12659. smalltalk.Compiler);
  12660. smalltalk.addMethod(
  12661. unescape('_isNode_ofClass_'),
  12662. smalltalk.method({
  12663. selector: unescape('isNode%3AofClass%3A'),
  12664. category: 'optimizations',
  12665. fn: function (aNode, aClass){
  12666. var self=this;
  12667. return smalltalk.send(smalltalk.send(aNode, "_isValueNode", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aNode, "_value", []), "_class", []), "__eq", [aClass]), "_or_", [(function(){return smalltalk.send(smalltalk.send(smalltalk.send(aNode, "_value", []), "__eq", ["self"]), "_and_", [(function(){return smalltalk.send(smalltalk.send(self, "_currentClass", []), "__eq", [aClass]);})]);})]);})]);
  12668. return self;},
  12669. args: ["aNode", "aClass"],
  12670. source: unescape('isNode%3A%20aNode%20ofClass%3A%20aClass%0A%09%5EaNode%20isValueNode%20and%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%09aNode%20value%20class%20%3D%20aClass%20or%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%09%09aNode%20value%20%3D%20%27self%27%20and%3A%20%5Bself%20currentClass%20%3D%20aClass%5D%5D%5D'),
  12671. messageSends: ["and:", "isValueNode", "or:", unescape("%3D"), "class", "value", "currentClass"],
  12672. referencedClasses: []
  12673. }),
  12674. smalltalk.Compiler);
  12675. smalltalk.addMethod(
  12676. unescape('_inline_receiver_argumentNodes_'),
  12677. smalltalk.method({
  12678. selector: unescape('inline%3Areceiver%3AargumentNodes%3A'),
  12679. category: 'optimizations',
  12680. fn: function (aSelector, receiver, aCollection){
  12681. var self=this;
  12682. var inlined=nil;
  12683. (inlined=false);
  12684. ((($receiver = smalltalk.send(aSelector, "__eq", ["ifFalse:"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_checkClass_for_", ["Boolean", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%21%20%24receiver%20%3F%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%20%3A%20nil%29")]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_checkClass_for_", ["Boolean", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%21%20%24receiver%20%3F%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%20%3A%20nil%29")]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_checkClass_for_", ["Boolean", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%21%20%24receiver%20%3F%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%20%3A%20nil%29")]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_checkClass_for_", ["Boolean", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%21%20%24receiver%20%3F%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%20%3A%20nil%29")]);return (inlined=true);})]));})]));
  12685. ((($receiver = smalltalk.send(aSelector, "__eq", ["ifTrue:"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_checkClass_for_", ["Boolean", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%24receiver%20%3F%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%20%3A%20nil%29")]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_checkClass_for_", ["Boolean", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%24receiver%20%3F%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%20%3A%20nil%29")]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_checkClass_for_", ["Boolean", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%24receiver%20%3F%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%20%3A%20nil%29")]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_checkClass_for_", ["Boolean", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%24receiver%20%3F%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%20%3A%20nil%29")]);return (inlined=true);})]));})]));
  12686. ((($receiver = smalltalk.send(aSelector, "__eq", ["ifTrue:ifFalse:"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(aCollection, "_second", []), "_isBlockNode", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_checkClass_for_", ["Boolean", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%24receiver%20%3F%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%20%3A%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_second", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%29")]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_checkClass_for_", ["Boolean", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%24receiver%20%3F%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%20%3A%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_second", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%29")]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(aCollection, "_second", []), "_isBlockNode", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_checkClass_for_", ["Boolean", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%24receiver%20%3F%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%20%3A%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_second", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%29")]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_checkClass_for_", ["Boolean", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%24receiver%20%3F%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%20%3A%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_second", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%29")]);return (inlined=true);})]));})]));
  12687. ((($receiver = smalltalk.send(aSelector, "__eq", ["ifFalse:ifTrue:"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(aCollection, "_second", []), "_isBlockNode", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_checkClass_for_", ["Boolean", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%21%20%24receiver%20%3F%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%20%3A%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_second", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%29")]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_checkClass_for_", ["Boolean", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%21%20%24receiver%20%3F%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%20%3A%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_second", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%29")]);return (inlined=true);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(aCollection, "_first", []), "_isBlockNode", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(aCollection, "_second", []), "_isBlockNode", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_checkClass_for_", ["Boolean", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%21%20%24receiver%20%3F%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%20%3A%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_second", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%29")]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_checkClass_for_", ["Boolean", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%21%20%24receiver%20%3F%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%20%3A%20")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_second", [])]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%28%29%29")]);return (inlined=true);})]));})]));
  12688. ((($receiver = smalltalk.send(aSelector, "__eq", [unescape("%3C")])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%24receiver%20%3C")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%24receiver%20%3C")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));
  12689. ((($receiver = smalltalk.send(aSelector, "__eq", [unescape("%3C%3D")])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%24receiver%20%3C%3D")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%24receiver%20%3C%3D")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));
  12690. ((($receiver = smalltalk.send(aSelector, "__eq", [unescape("%3E")])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%24receiver%20%3E")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%24receiver%20%3E")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));
  12691. ((($receiver = smalltalk.send(aSelector, "__eq", [unescape("%3E%3D")])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%24receiver%20%3E%3D")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%24receiver%20%3E%3D")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));
  12692. ((($receiver = smalltalk.send(aSelector, "__eq", [unescape("+")])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%24receiver%20+")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%24receiver%20+")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));
  12693. ((($receiver = smalltalk.send(aSelector, "__eq", [unescape("-")])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%24receiver%20-")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%24receiver%20-")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));
  12694. ((($receiver = smalltalk.send(aSelector, "__eq", [unescape("*")])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%24receiver%20*")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%24receiver%20*")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));
  12695. ((($receiver = smalltalk.send(aSelector, "__eq", [unescape("/")])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%24receiver%20/")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_checkClass_for_", ["Number", receiver]);smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%24receiver%20/")]);smalltalk.send(self, "_visit_", [smalltalk.send(aCollection, "_first", [])]);return (inlined=true);})]));
  12696. return inlined;
  12697. return self;},
  12698. args: ["aSelector", "receiver", "aCollection"],
  12699. source: unescape('inline%3A%20aSelector%20receiver%3A%20receiver%20argumentNodes%3A%20aCollection%0A%20%20%20%20%20%20%20%20%7C%20inlined%20%7C%0A%20%20%20%20%20%20%20%20inlined%20%3A%3D%20false.%0A%0A%09%22--%20Booleans%20--%22%0A%0A%09%28aSelector%20%3D%20%27ifFalse%3A%27%29%20ifTrue%3A%20%5B%0A%09%09aCollection%20first%20isBlockNode%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09self%20checkClass%3A%20%27Boolean%27%20for%3A%20receiver.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09stream%20nextPutAll%3A%20%27%28%21%20%24receiver%20%3F%20%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09self%20visit%3A%20aCollection%20first.%0A%20%20%20%20%20%20%20%20%20%20%09%09stream%20nextPutAll%3A%20%27%28%29%20%3A%20nil%29%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09inlined%20%3A%3D%20true%5D%5D.%0A%0A%09%28aSelector%20%3D%20%27ifTrue%3A%27%29%20ifTrue%3A%20%5B%0A%09%09aCollection%20first%20isBlockNode%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09self%20checkClass%3A%20%27Boolean%27%20for%3A%20receiver.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09stream%20nextPutAll%3A%20%27%28%24receiver%20%3F%20%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09self%20visit%3A%20aCollection%20first.%0A%20%20%20%20%20%20%20%20%20%20%09%09stream%20nextPutAll%3A%20%27%28%29%20%3A%20nil%29%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09inlined%20%3A%3D%20true%5D%5D.%0A%0A%09%28aSelector%20%3D%20%27ifTrue%3AifFalse%3A%27%29%20ifTrue%3A%20%5B%0A%09%09%28aCollection%20first%20isBlockNode%20and%3A%20%5BaCollection%20second%20isBlockNode%5D%29%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09self%20checkClass%3A%20%27Boolean%27%20for%3A%20receiver.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09stream%20nextPutAll%3A%20%27%28%24receiver%20%3F%20%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09self%20visit%3A%20aCollection%20first.%0A%20%20%20%20%20%20%20%20%20%20%09%09stream%20nextPutAll%3A%20%27%28%29%20%3A%20%27.%0A%20%20%20%20%20%20%20%20%20%20%09%09self%20visit%3A%20aCollection%20second.%0A%20%20%20%20%20%20%20%20%20%20%09%09stream%20nextPutAll%3A%20%27%28%29%29%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09inlined%20%3A%3D%20true%5D%5D.%0A%0A%09%28aSelector%20%3D%20%27ifFalse%3AifTrue%3A%27%29%20ifTrue%3A%20%5B%0A%09%09%28aCollection%20first%20isBlockNode%20and%3A%20%5BaCollection%20second%20isBlockNode%5D%29%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09self%20checkClass%3A%20%27Boolean%27%20for%3A%20receiver.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09stream%20nextPutAll%3A%20%27%28%21%20%24receiver%20%3F%20%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09self%20visit%3A%20aCollection%20first.%0A%20%20%20%20%20%20%20%20%20%20%09%09stream%20nextPutAll%3A%20%27%28%29%20%3A%20%27.%0A%20%20%20%20%20%20%20%20%20%20%09%09self%20visit%3A%20aCollection%20second.%0A%20%20%20%20%20%20%20%20%20%20%09%09stream%20nextPutAll%3A%20%27%28%29%29%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09inlined%20%3A%3D%20true%5D%5D.%0A%0A%09%22--%20Numbers%20--%22%0A%0A%09%28aSelector%20%3D%20%27%3C%27%29%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20self%20checkClass%3A%20%27Number%27%20for%3A%20receiver.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20stream%20nextPutAll%3A%20%27%24receiver%20%3C%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20self%20visit%3A%20aCollection%20first.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20inlined%20%3A%3D%20true%5D.%0A%0A%09%28aSelector%20%3D%20%27%3C%3D%27%29%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20self%20checkClass%3A%20%27Number%27%20for%3A%20receiver.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20stream%20nextPutAll%3A%20%27%24receiver%20%3C%3D%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20self%20visit%3A%20aCollection%20first.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20inlined%20%3A%3D%20true%5D.%0A%0A%09%28aSelector%20%3D%20%27%3E%27%29%20ifTrue%3A%20%5B%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20self%20checkClass%3A%20%27Number%27%20for%3A%20receiver.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20stream%20nextPutAll%3A%20%27%24receiver%20%3E%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20self%20visit%3A%20aCollection%20first.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20inlined%20%3A%3D%20true%5D.%0A%0A%09%28aSelector%20%3D%20%27%3E%3D%27%29%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20self%20checkClass%3A%20%27Number%27%20for%3A%20receiver.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20stream%20nextPutAll%3A%20%27%24receiver%20%3E%3D%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20self%20visit%3A%20aCollection%20first.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20inlined%20%3A%3D%20true%5D.%0A%0A%20%20%20%20%20%20%20%20%28aSelector%20%3D%20%27+%27%29%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20self%20checkClass%3A%20%27Number%27%20for%3A%20receiver.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20stream%20nextPutAll%3A%20%27%24receiver%20+%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20self%20visit%3A%20aCollection%20first.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20inlined%20%3A%3D%20true%5D.%0A%0A%20%20%20%20%20%20%20%20%28aSelector%20%3D%20%27-%27%29%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20self%20checkClass%3A%20%27Number%27%20for%3A%20receiver.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20stream%20nextPutAll%3A%20%27%24receiver%20-%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20self%20visit%3A%20aCollection%20first.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20inlined%20%3A%3D%20true%5D.%0A%0A%20%20%20%20%20%20%20%20%28aSelector%20%3D%20%27*%27%29%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20self%20checkClass%3A%20%27Number%27%20for%3A%20receiver.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20stream%20nextPutAll%3A%20%27%24receiver%20*%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20self%20visit%3A%20aCollection%20first.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20inlined%20%3A%3D%20true%5D.%0A%0A%20%20%20%20%20%20%20%20%28aSelector%20%3D%20%27/%27%29%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20self%20checkClass%3A%20%27Number%27%20for%3A%20receiver.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20stream%20nextPutAll%3A%20%27%24receiver%20/%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20self%20visit%3A%20aCollection%20first.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20inlined%20%3A%3D%20true%5D.%0A%0A%20%20%20%20%20%20%20%20%5Einlined'),
  12700. messageSends: ["ifTrue:", unescape("%3D"), "isBlockNode", "first", "checkClass:for:", "nextPutAll:", "visit:", "and:", "second"],
  12701. referencedClasses: []
  12702. }),
  12703. smalltalk.Compiler);
  12704. smalltalk.addMethod(
  12705. unescape('_performOptimizations'),
  12706. smalltalk.method({
  12707. selector: unescape('performOptimizations'),
  12708. category: 'testing',
  12709. fn: function (){
  12710. var self=this;
  12711. return smalltalk.send(smalltalk.send(self, "_class", []), "_performOptimizations", []);
  12712. return self;},
  12713. args: [],
  12714. source: unescape('performOptimizations%0A%09%5Eself%20class%20performOptimizations'),
  12715. messageSends: ["performOptimizations", "class"],
  12716. referencedClasses: []
  12717. }),
  12718. smalltalk.Compiler);
  12719. smalltalk.addMethod(
  12720. unescape('_source'),
  12721. smalltalk.method({
  12722. selector: unescape('source'),
  12723. category: 'accessing',
  12724. fn: function (){
  12725. var self=this;
  12726. return (($receiver = self['@source']) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
  12727. return self;},
  12728. args: [],
  12729. source: unescape('source%0A%09%5Esource%20ifNil%3A%20%5B%27%27%5D'),
  12730. messageSends: ["ifNil:"],
  12731. referencedClasses: []
  12732. }),
  12733. smalltalk.Compiler);
  12734. smalltalk.addMethod(
  12735. unescape('_source_'),
  12736. smalltalk.method({
  12737. selector: unescape('source%3A'),
  12738. category: 'accessing',
  12739. fn: function (aString){
  12740. var self=this;
  12741. (self['@source']=aString);
  12742. return self;},
  12743. args: ["aString"],
  12744. source: unescape('source%3A%20aString%0A%09source%20%3A%3D%20aString'),
  12745. messageSends: [],
  12746. referencedClasses: []
  12747. }),
  12748. smalltalk.Compiler);
  12749. smalltalk.addMethod(
  12750. unescape('_visitDynamicArrayNode_'),
  12751. smalltalk.method({
  12752. selector: unescape('visitDynamicArrayNode%3A'),
  12753. category: 'visiting',
  12754. fn: function (aNode){
  12755. var self=this;
  12756. smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%5B")]);
  12757. smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_do_separatedBy_", [(function(each){return smalltalk.send(self, "_visit_", [each]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%2C")]);})]);
  12758. smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%5D")]);
  12759. return self;},
  12760. args: ["aNode"],
  12761. source: unescape('visitDynamicArrayNode%3A%20aNode%0A%09stream%20nextPutAll%3A%20%27%5B%27.%0A%09aNode%20nodes%20%0A%09%09do%3A%20%5B%3Aeach%20%7C%20self%20visit%3A%20each%5D%0A%09%09separatedBy%3A%20%5Bstream%20nextPutAll%3A%20%27%2C%27%5D.%0A%09stream%20nextPutAll%3A%20%27%5D%27'),
  12762. messageSends: ["nextPutAll:", "do:separatedBy:", "nodes", "visit:"],
  12763. referencedClasses: []
  12764. }),
  12765. smalltalk.Compiler);
  12766. smalltalk.addMethod(
  12767. unescape('_visitDynamicDictionaryNode_'),
  12768. smalltalk.method({
  12769. selector: unescape('visitDynamicDictionaryNode%3A'),
  12770. category: 'visiting',
  12771. fn: function (aNode){
  12772. var self=this;
  12773. smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("smalltalk.HashedCollection._fromPairs_%28%5B")]);
  12774. smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_do_separatedBy_", [(function(each){return smalltalk.send(self, "_visit_", [each]);}), (function(){return smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%2C")]);})]);
  12775. smalltalk.send(self['@stream'], "_nextPutAll_", [unescape("%5D%29")]);
  12776. return self;},
  12777. args: ["aNode"],
  12778. source: unescape('visitDynamicDictionaryNode%3A%20aNode%0A%09stream%20nextPutAll%3A%20%27smalltalk.HashedCollection._fromPairs_%28%5B%27.%0A%09%09aNode%20nodes%20%0A%09%09%09do%3A%20%5B%3Aeach%20%7C%20self%20visit%3A%20each%5D%0A%09%09%09separatedBy%3A%20%5Bstream%20nextPutAll%3A%20%27%2C%27%5D.%0A%09%09stream%20nextPutAll%3A%20%27%5D%29%27'),
  12779. messageSends: ["nextPutAll:", "do:separatedBy:", "nodes", "visit:"],
  12780. referencedClasses: []
  12781. }),
  12782. smalltalk.Compiler);
  12783. smalltalk.addMethod(
  12784. unescape('_argVariables'),
  12785. smalltalk.method({
  12786. selector: unescape('argVariables'),
  12787. category: 'accessing',
  12788. fn: function (){
  12789. var self=this;
  12790. return smalltalk.send(self['@argVariables'], "_copy", []);
  12791. return self;},
  12792. args: [],
  12793. source: unescape('argVariables%0A%09%5EargVariables%20copy'),
  12794. messageSends: ["copy"],
  12795. referencedClasses: []
  12796. }),
  12797. smalltalk.Compiler);
  12798. smalltalk.addMethod(
  12799. unescape('_safeVariableNameFor_'),
  12800. smalltalk.method({
  12801. selector: unescape('safeVariableNameFor%3A'),
  12802. category: 'accessing',
  12803. fn: function (aString){
  12804. var self=this;
  12805. return ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_reservedWords", []), "_includes_", [aString])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(aString, "__comma", ["_"]);})() : (function(){return aString;})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(aString, "__comma", ["_"]);}), (function(){return aString;})]));
  12806. return self;},
  12807. args: ["aString"],
  12808. source: unescape('safeVariableNameFor%3A%20aString%0A%09%5E%28Smalltalk%20current%20reservedWords%20includes%3A%20aString%29%0A%09%09ifTrue%3A%20%5BaString%2C%20%27_%27%5D%0A%09%09ifFalse%3A%20%5BaString%5D'),
  12809. messageSends: ["ifTrue:ifFalse:", "includes:", "reservedWords", "current", unescape("%2C")],
  12810. referencedClasses: ["Smalltalk"]
  12811. }),
  12812. smalltalk.Compiler);
  12813. smalltalk.Compiler.klass.iVarNames = ['performOptimizations'];
  12814. smalltalk.addMethod(
  12815. unescape('_recompile_'),
  12816. smalltalk.method({
  12817. selector: unescape('recompile%3A'),
  12818. category: 'compiling',
  12819. fn: function (aClass){
  12820. var self=this;
  12821. smalltalk.send(smalltalk.send(aClass, "_methodDictionary", []), "_do_", [(function(each){var method=nil;
  12822. (method=smalltalk.send(smalltalk.send(self, "_new", []), "_load_forClass_", [smalltalk.send(each, "_source", []), aClass]));smalltalk.send(method, "_category_", [smalltalk.send(each, "_category", [])]);return smalltalk.send(aClass, "_addCompiledMethod_", [method]);})]);
  12823. ((($receiver = smalltalk.send(aClass, "_isMetaclass", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_recompile_", [smalltalk.send(aClass, "_class", [])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self, "_recompile_", [smalltalk.send(aClass, "_class", [])]);})]));
  12824. return self;},
  12825. args: ["aClass"],
  12826. source: unescape('recompile%3A%20aClass%0A%09aClass%20methodDictionary%20do%3A%20%5B%3Aeach%20%7C%7C%20method%20%7C%0A%09%09method%20%3A%3D%20self%20new%20load%3A%20each%20source%20forClass%3A%20aClass.%0A%09%09method%20category%3A%20each%20category.%0A%09%09aClass%20addCompiledMethod%3A%20method%5D.%0A%09aClass%20isMetaclass%20ifFalse%3A%20%5Bself%20recompile%3A%20aClass%20class%5D'),
  12827. messageSends: ["do:", "methodDictionary", "load:forClass:", "new", "source", "category:", "category", "addCompiledMethod:", "ifFalse:", "isMetaclass", "recompile:", "class"],
  12828. referencedClasses: []
  12829. }),
  12830. smalltalk.Compiler.klass);
  12831. smalltalk.addMethod(
  12832. unescape('_recompileAll'),
  12833. smalltalk.method({
  12834. selector: unescape('recompileAll'),
  12835. category: 'compiling',
  12836. fn: function (){
  12837. var self=this;
  12838. smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_classes", []), "_do_", [(function(each){return smalltalk.send(self, "_recompile_", [each]);})]);
  12839. return self;},
  12840. args: [],
  12841. source: unescape('recompileAll%0A%09Smalltalk%20current%20classes%20do%3A%20%5B%3Aeach%20%7C%0A%09%09self%20recompile%3A%20each%5D'),
  12842. messageSends: ["do:", "classes", "current", "recompile:"],
  12843. referencedClasses: ["Smalltalk"]
  12844. }),
  12845. smalltalk.Compiler.klass);
  12846. smalltalk.addMethod(
  12847. unescape('_performOptimizations'),
  12848. smalltalk.method({
  12849. selector: unescape('performOptimizations'),
  12850. category: 'accessing',
  12851. fn: function (){
  12852. var self=this;
  12853. return (($receiver = self['@performOptimizations']) == nil || $receiver == undefined) ? (function(){return true;})() : $receiver;
  12854. return self;},
  12855. args: [],
  12856. source: unescape('performOptimizations%0A%09%5EperformOptimizations%20ifNil%3A%20%5Btrue%5D'),
  12857. messageSends: ["ifNil:"],
  12858. referencedClasses: []
  12859. }),
  12860. smalltalk.Compiler.klass);
  12861. smalltalk.addMethod(
  12862. unescape('_performOptimizations_'),
  12863. smalltalk.method({
  12864. selector: unescape('performOptimizations%3A'),
  12865. category: 'accessing',
  12866. fn: function (aBoolean){
  12867. var self=this;
  12868. (self['@performOptimizations']=aBoolean);
  12869. return self;},
  12870. args: ["aBoolean"],
  12871. source: unescape('performOptimizations%3A%20aBoolean%0A%09performOptimizations%20%3A%3D%20aBoolean'),
  12872. messageSends: [],
  12873. referencedClasses: []
  12874. }),
  12875. smalltalk.Compiler.klass);
  12876. smalltalk.addClass('DoIt', smalltalk.Object, [], 'Compiler');
  12877. smalltalk.addClass('DynamicArrayNode', smalltalk.Node, [], 'Compiler');
  12878. smalltalk.addMethod(
  12879. unescape('_accept_'),
  12880. smalltalk.method({
  12881. selector: unescape('accept%3A'),
  12882. category: 'visiting',
  12883. fn: function (aVisitor){
  12884. var self=this;
  12885. smalltalk.send(aVisitor, "_visitDynamicArrayNode_", [self]);
  12886. return self;},
  12887. args: ["aVisitor"],
  12888. source: unescape('accept%3A%20aVisitor%0A%09aVisitor%20visitDynamicArrayNode%3A%20self'),
  12889. messageSends: ["visitDynamicArrayNode:"],
  12890. referencedClasses: []
  12891. }),
  12892. smalltalk.DynamicArrayNode);
  12893. smalltalk.addClass('DynamicDictionaryNode', smalltalk.Node, [], 'Compiler');
  12894. smalltalk.addMethod(
  12895. unescape('_accept_'),
  12896. smalltalk.method({
  12897. selector: unescape('accept%3A'),
  12898. category: 'visiting',
  12899. fn: function (aVisitor){
  12900. var self=this;
  12901. smalltalk.send(aVisitor, "_visitDynamicDictionaryNode_", [self]);
  12902. return self;},
  12903. args: ["aVisitor"],
  12904. source: unescape('accept%3A%20aVisitor%0A%09aVisitor%20visitDynamicDictionaryNode%3A%20self'),
  12905. messageSends: ["visitDynamicDictionaryNode:"],
  12906. referencedClasses: []
  12907. }),
  12908. smalltalk.DynamicDictionaryNode);
  12909. smalltalk.parser = (function(){
  12910. /* Generated by PEG.js 0.6.2 (http://pegjs.majda.cz/). */
  12911. var result = {
  12912. /*
  12913. * Parses the input with a generated parser. If the parsing is successfull,
  12914. * returns a value explicitly or implicitly specified by the grammar from
  12915. * which the parser was generated (see |PEG.buildParser|). If the parsing is
  12916. * unsuccessful, throws |PEG.parser.SyntaxError| describing the error.
  12917. */
  12918. parse: function(input, startRule) {
  12919. var parseFunctions = {
  12920. "assignment": parse_assignment,
  12921. "binaryMessage": parse_binaryMessage,
  12922. "binaryPattern": parse_binaryPattern,
  12923. "binarySelector": parse_binarySelector,
  12924. "binarySend": parse_binarySend,
  12925. "binaryTail": parse_binaryTail,
  12926. "block": parse_block,
  12927. "blockParamList": parse_blockParamList,
  12928. "cascade": parse_cascade,
  12929. "className": parse_className,
  12930. "classReference": parse_classReference,
  12931. "comments": parse_comments,
  12932. "dynamicArray": parse_dynamicArray,
  12933. "dynamicDictionary": parse_dynamicDictionary,
  12934. "expression": parse_expression,
  12935. "expressionList": parse_expressionList,
  12936. "expressions": parse_expressions,
  12937. "float": parse_float,
  12938. "identifier": parse_identifier,
  12939. "integer": parse_integer,
  12940. "jsStatement": parse_jsStatement,
  12941. "keyword": parse_keyword,
  12942. "keywordMessage": parse_keywordMessage,
  12943. "keywordPair": parse_keywordPair,
  12944. "keywordPattern": parse_keywordPattern,
  12945. "keywordSend": parse_keywordSend,
  12946. "literal": parse_literal,
  12947. "literalArray": parse_literalArray,
  12948. "message": parse_message,
  12949. "method": parse_method,
  12950. "number": parse_number,
  12951. "operand": parse_operand,
  12952. "pseudoVariable": parse_pseudoVariable,
  12953. "reference": parse_reference,
  12954. "ret": parse_ret,
  12955. "separator": parse_separator,
  12956. "sequence": parse_sequence,
  12957. "statements": parse_statements,
  12958. "string": parse_string,
  12959. "subexpression": parse_subexpression,
  12960. "symbol": parse_symbol,
  12961. "temps": parse_temps,
  12962. "unaryMessage": parse_unaryMessage,
  12963. "unaryPattern": parse_unaryPattern,
  12964. "unarySend": parse_unarySend,
  12965. "unaryTail": parse_unaryTail,
  12966. "variable": parse_variable,
  12967. "ws": parse_ws
  12968. };
  12969. if (startRule !== undefined) {
  12970. if (parseFunctions[startRule] === undefined) {
  12971. throw new Error("Invalid rule name: " + quote(startRule) + ".");
  12972. }
  12973. } else {
  12974. startRule = "method";
  12975. }
  12976. var pos = 0;
  12977. var reportMatchFailures = true;
  12978. var rightmostMatchFailuresPos = 0;
  12979. var rightmostMatchFailuresExpected = [];
  12980. var cache = {};
  12981. function padLeft(input, padding, length) {
  12982. var result = input;
  12983. var padLength = length - input.length;
  12984. for (var i = 0; i < padLength; i++) {
  12985. result = padding + result;
  12986. }
  12987. return result;
  12988. }
  12989. function escape(ch) {
  12990. var charCode = ch.charCodeAt(0);
  12991. if (charCode <= 0xFF) {
  12992. var escapeChar = 'x';
  12993. var length = 2;
  12994. } else {
  12995. var escapeChar = 'u';
  12996. var length = 4;
  12997. }
  12998. return '\\' + escapeChar + padLeft(charCode.toString(16).toUpperCase(), '0', length);
  12999. }
  13000. function quote(s) {
  13001. /*
  13002. * ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a
  13003. * string literal except for the closing quote character, backslash,
  13004. * carriage return, line separator, paragraph separator, and line feed.
  13005. * Any character may appear in the form of an escape sequence.
  13006. */
  13007. return '"' + s
  13008. .replace(/\\/g, '\\\\') // backslash
  13009. .replace(/"/g, '\\"') // closing quote character
  13010. .replace(/\r/g, '\\r') // carriage return
  13011. .replace(/\n/g, '\\n') // line feed
  13012. .replace(/[\x80-\uFFFF]/g, escape) // non-ASCII characters
  13013. + '"';
  13014. }
  13015. function matchFailed(failure) {
  13016. if (pos < rightmostMatchFailuresPos) {
  13017. return;
  13018. }
  13019. if (pos > rightmostMatchFailuresPos) {
  13020. rightmostMatchFailuresPos = pos;
  13021. rightmostMatchFailuresExpected = [];
  13022. }
  13023. rightmostMatchFailuresExpected.push(failure);
  13024. }
  13025. function parse_separator() {
  13026. var cacheKey = 'separator@' + pos;
  13027. var cachedResult = cache[cacheKey];
  13028. if (cachedResult) {
  13029. pos = cachedResult.nextPos;
  13030. return cachedResult.result;
  13031. }
  13032. if (input.substr(pos).match(/^[ \xA0\uFEFF\n\r\u2028\u2029]/) !== null) {
  13033. var result1 = input.charAt(pos);
  13034. pos++;
  13035. } else {
  13036. var result1 = null;
  13037. if (reportMatchFailures) {
  13038. matchFailed("[ \\xA0\\uFEFF\\n\\r\\u2028\\u2029]");
  13039. }
  13040. }
  13041. if (result1 !== null) {
  13042. var result0 = [];
  13043. while (result1 !== null) {
  13044. result0.push(result1);
  13045. if (input.substr(pos).match(/^[ \xA0\uFEFF\n\r\u2028\u2029]/) !== null) {
  13046. var result1 = input.charAt(pos);
  13047. pos++;
  13048. } else {
  13049. var result1 = null;
  13050. if (reportMatchFailures) {
  13051. matchFailed("[ \\xA0\\uFEFF\\n\\r\\u2028\\u2029]");
  13052. }
  13053. }
  13054. }
  13055. } else {
  13056. var result0 = null;
  13057. }
  13058. cache[cacheKey] = {
  13059. nextPos: pos,
  13060. result: result0
  13061. };
  13062. return result0;
  13063. }
  13064. function parse_comments() {
  13065. var cacheKey = 'comments@' + pos;
  13066. var cachedResult = cache[cacheKey];
  13067. if (cachedResult) {
  13068. pos = cachedResult.nextPos;
  13069. return cachedResult.result;
  13070. }
  13071. var savedPos0 = pos;
  13072. if (input.substr(pos).match(/^["]/) !== null) {
  13073. var result2 = input.charAt(pos);
  13074. pos++;
  13075. } else {
  13076. var result2 = null;
  13077. if (reportMatchFailures) {
  13078. matchFailed("[\"]");
  13079. }
  13080. }
  13081. if (result2 !== null) {
  13082. var result3 = [];
  13083. if (input.substr(pos).match(/^[^"]/) !== null) {
  13084. var result5 = input.charAt(pos);
  13085. pos++;
  13086. } else {
  13087. var result5 = null;
  13088. if (reportMatchFailures) {
  13089. matchFailed("[^\"]");
  13090. }
  13091. }
  13092. while (result5 !== null) {
  13093. result3.push(result5);
  13094. if (input.substr(pos).match(/^[^"]/) !== null) {
  13095. var result5 = input.charAt(pos);
  13096. pos++;
  13097. } else {
  13098. var result5 = null;
  13099. if (reportMatchFailures) {
  13100. matchFailed("[^\"]");
  13101. }
  13102. }
  13103. }
  13104. if (result3 !== null) {
  13105. if (input.substr(pos).match(/^["]/) !== null) {
  13106. var result4 = input.charAt(pos);
  13107. pos++;
  13108. } else {
  13109. var result4 = null;
  13110. if (reportMatchFailures) {
  13111. matchFailed("[\"]");
  13112. }
  13113. }
  13114. if (result4 !== null) {
  13115. var result1 = [result2, result3, result4];
  13116. } else {
  13117. var result1 = null;
  13118. pos = savedPos0;
  13119. }
  13120. } else {
  13121. var result1 = null;
  13122. pos = savedPos0;
  13123. }
  13124. } else {
  13125. var result1 = null;
  13126. pos = savedPos0;
  13127. }
  13128. if (result1 !== null) {
  13129. var result0 = [];
  13130. while (result1 !== null) {
  13131. result0.push(result1);
  13132. var savedPos0 = pos;
  13133. if (input.substr(pos).match(/^["]/) !== null) {
  13134. var result2 = input.charAt(pos);
  13135. pos++;
  13136. } else {
  13137. var result2 = null;
  13138. if (reportMatchFailures) {
  13139. matchFailed("[\"]");
  13140. }
  13141. }
  13142. if (result2 !== null) {
  13143. var result3 = [];
  13144. if (input.substr(pos).match(/^[^"]/) !== null) {
  13145. var result5 = input.charAt(pos);
  13146. pos++;
  13147. } else {
  13148. var result5 = null;
  13149. if (reportMatchFailures) {
  13150. matchFailed("[^\"]");
  13151. }
  13152. }
  13153. while (result5 !== null) {
  13154. result3.push(result5);
  13155. if (input.substr(pos).match(/^[^"]/) !== null) {
  13156. var result5 = input.charAt(pos);
  13157. pos++;
  13158. } else {
  13159. var result5 = null;
  13160. if (reportMatchFailures) {
  13161. matchFailed("[^\"]");
  13162. }
  13163. }
  13164. }
  13165. if (result3 !== null) {
  13166. if (input.substr(pos).match(/^["]/) !== null) {
  13167. var result4 = input.charAt(pos);
  13168. pos++;
  13169. } else {
  13170. var result4 = null;
  13171. if (reportMatchFailures) {
  13172. matchFailed("[\"]");
  13173. }
  13174. }
  13175. if (result4 !== null) {
  13176. var result1 = [result2, result3, result4];
  13177. } else {
  13178. var result1 = null;
  13179. pos = savedPos0;
  13180. }
  13181. } else {
  13182. var result1 = null;
  13183. pos = savedPos0;
  13184. }
  13185. } else {
  13186. var result1 = null;
  13187. pos = savedPos0;
  13188. }
  13189. }
  13190. } else {
  13191. var result0 = null;
  13192. }
  13193. cache[cacheKey] = {
  13194. nextPos: pos,
  13195. result: result0
  13196. };
  13197. return result0;
  13198. }
  13199. function parse_ws() {
  13200. var cacheKey = 'ws@' + pos;
  13201. var cachedResult = cache[cacheKey];
  13202. if (cachedResult) {
  13203. pos = cachedResult.nextPos;
  13204. return cachedResult.result;
  13205. }
  13206. var result0 = [];
  13207. var result3 = parse_separator();
  13208. if (result3 !== null) {
  13209. var result1 = result3;
  13210. } else {
  13211. var result2 = parse_comments();
  13212. if (result2 !== null) {
  13213. var result1 = result2;
  13214. } else {
  13215. var result1 = null;;
  13216. };
  13217. }
  13218. while (result1 !== null) {
  13219. result0.push(result1);
  13220. var result3 = parse_separator();
  13221. if (result3 !== null) {
  13222. var result1 = result3;
  13223. } else {
  13224. var result2 = parse_comments();
  13225. if (result2 !== null) {
  13226. var result1 = result2;
  13227. } else {
  13228. var result1 = null;;
  13229. };
  13230. }
  13231. }
  13232. cache[cacheKey] = {
  13233. nextPos: pos,
  13234. result: result0
  13235. };
  13236. return result0;
  13237. }
  13238. function parse_identifier() {
  13239. var cacheKey = 'identifier@' + pos;
  13240. var cachedResult = cache[cacheKey];
  13241. if (cachedResult) {
  13242. pos = cachedResult.nextPos;
  13243. return cachedResult.result;
  13244. }
  13245. var savedPos0 = pos;
  13246. var savedPos1 = pos;
  13247. if (input.substr(pos).match(/^[a-z]/) !== null) {
  13248. var result3 = input.charAt(pos);
  13249. pos++;
  13250. } else {
  13251. var result3 = null;
  13252. if (reportMatchFailures) {
  13253. matchFailed("[a-z]");
  13254. }
  13255. }
  13256. if (result3 !== null) {
  13257. var result4 = [];
  13258. if (input.substr(pos).match(/^[a-zA-Z0-9]/) !== null) {
  13259. var result5 = input.charAt(pos);
  13260. pos++;
  13261. } else {
  13262. var result5 = null;
  13263. if (reportMatchFailures) {
  13264. matchFailed("[a-zA-Z0-9]");
  13265. }
  13266. }
  13267. while (result5 !== null) {
  13268. result4.push(result5);
  13269. if (input.substr(pos).match(/^[a-zA-Z0-9]/) !== null) {
  13270. var result5 = input.charAt(pos);
  13271. pos++;
  13272. } else {
  13273. var result5 = null;
  13274. if (reportMatchFailures) {
  13275. matchFailed("[a-zA-Z0-9]");
  13276. }
  13277. }
  13278. }
  13279. if (result4 !== null) {
  13280. var result1 = [result3, result4];
  13281. } else {
  13282. var result1 = null;
  13283. pos = savedPos1;
  13284. }
  13285. } else {
  13286. var result1 = null;
  13287. pos = savedPos1;
  13288. }
  13289. var result2 = result1 !== null
  13290. ? (function(first, others) {return first + others.join("")})(result1[0], result1[1])
  13291. : null;
  13292. if (result2 !== null) {
  13293. var result0 = result2;
  13294. } else {
  13295. var result0 = null;
  13296. pos = savedPos0;
  13297. }
  13298. cache[cacheKey] = {
  13299. nextPos: pos,
  13300. result: result0
  13301. };
  13302. return result0;
  13303. }
  13304. function parse_keyword() {
  13305. var cacheKey = 'keyword@' + pos;
  13306. var cachedResult = cache[cacheKey];
  13307. if (cachedResult) {
  13308. pos = cachedResult.nextPos;
  13309. return cachedResult.result;
  13310. }
  13311. var savedPos0 = pos;
  13312. var savedPos1 = pos;
  13313. var result3 = parse_identifier();
  13314. if (result3 !== null) {
  13315. if (input.substr(pos).match(/^[:]/) !== null) {
  13316. var result4 = input.charAt(pos);
  13317. pos++;
  13318. } else {
  13319. var result4 = null;
  13320. if (reportMatchFailures) {
  13321. matchFailed("[:]");
  13322. }
  13323. }
  13324. if (result4 !== null) {
  13325. var result1 = [result3, result4];
  13326. } else {
  13327. var result1 = null;
  13328. pos = savedPos1;
  13329. }
  13330. } else {
  13331. var result1 = null;
  13332. pos = savedPos1;
  13333. }
  13334. var result2 = result1 !== null
  13335. ? (function(first, last) {return first + last})(result1[0], result1[1])
  13336. : null;
  13337. if (result2 !== null) {
  13338. var result0 = result2;
  13339. } else {
  13340. var result0 = null;
  13341. pos = savedPos0;
  13342. }
  13343. cache[cacheKey] = {
  13344. nextPos: pos,
  13345. result: result0
  13346. };
  13347. return result0;
  13348. }
  13349. function parse_className() {
  13350. var cacheKey = 'className@' + pos;
  13351. var cachedResult = cache[cacheKey];
  13352. if (cachedResult) {
  13353. pos = cachedResult.nextPos;
  13354. return cachedResult.result;
  13355. }
  13356. var savedPos0 = pos;
  13357. var savedPos1 = pos;
  13358. if (input.substr(pos).match(/^[A-Z]/) !== null) {
  13359. var result3 = input.charAt(pos);
  13360. pos++;
  13361. } else {
  13362. var result3 = null;
  13363. if (reportMatchFailures) {
  13364. matchFailed("[A-Z]");
  13365. }
  13366. }
  13367. if (result3 !== null) {
  13368. var result4 = [];
  13369. if (input.substr(pos).match(/^[a-zA-Z0-9]/) !== null) {
  13370. var result5 = input.charAt(pos);
  13371. pos++;
  13372. } else {
  13373. var result5 = null;
  13374. if (reportMatchFailures) {
  13375. matchFailed("[a-zA-Z0-9]");
  13376. }
  13377. }
  13378. while (result5 !== null) {
  13379. result4.push(result5);
  13380. if (input.substr(pos).match(/^[a-zA-Z0-9]/) !== null) {
  13381. var result5 = input.charAt(pos);
  13382. pos++;
  13383. } else {
  13384. var result5 = null;
  13385. if (reportMatchFailures) {
  13386. matchFailed("[a-zA-Z0-9]");
  13387. }
  13388. }
  13389. }
  13390. if (result4 !== null) {
  13391. var result1 = [result3, result4];
  13392. } else {
  13393. var result1 = null;
  13394. pos = savedPos1;
  13395. }
  13396. } else {
  13397. var result1 = null;
  13398. pos = savedPos1;
  13399. }
  13400. var result2 = result1 !== null
  13401. ? (function(first, others) {return first + others.join("")})(result1[0], result1[1])
  13402. : null;
  13403. if (result2 !== null) {
  13404. var result0 = result2;
  13405. } else {
  13406. var result0 = null;
  13407. pos = savedPos0;
  13408. }
  13409. cache[cacheKey] = {
  13410. nextPos: pos,
  13411. result: result0
  13412. };
  13413. return result0;
  13414. }
  13415. function parse_string() {
  13416. var cacheKey = 'string@' + pos;
  13417. var cachedResult = cache[cacheKey];
  13418. if (cachedResult) {
  13419. pos = cachedResult.nextPos;
  13420. return cachedResult.result;
  13421. }
  13422. var savedPos0 = pos;
  13423. var savedPos1 = pos;
  13424. if (input.substr(pos).match(/^[']/) !== null) {
  13425. var result3 = input.charAt(pos);
  13426. pos++;
  13427. } else {
  13428. var result3 = null;
  13429. if (reportMatchFailures) {
  13430. matchFailed("[']");
  13431. }
  13432. }
  13433. if (result3 !== null) {
  13434. var result4 = [];
  13435. var savedPos2 = pos;
  13436. if (input.substr(pos, 2) === "''") {
  13437. var result9 = "''";
  13438. pos += 2;
  13439. } else {
  13440. var result9 = null;
  13441. if (reportMatchFailures) {
  13442. matchFailed("\"''\"");
  13443. }
  13444. }
  13445. var result10 = result9 !== null
  13446. ? (function() {return "'"})()
  13447. : null;
  13448. if (result10 !== null) {
  13449. var result8 = result10;
  13450. } else {
  13451. var result8 = null;
  13452. pos = savedPos2;
  13453. }
  13454. if (result8 !== null) {
  13455. var result6 = result8;
  13456. } else {
  13457. if (input.substr(pos).match(/^[^']/) !== null) {
  13458. var result7 = input.charAt(pos);
  13459. pos++;
  13460. } else {
  13461. var result7 = null;
  13462. if (reportMatchFailures) {
  13463. matchFailed("[^']");
  13464. }
  13465. }
  13466. if (result7 !== null) {
  13467. var result6 = result7;
  13468. } else {
  13469. var result6 = null;;
  13470. };
  13471. }
  13472. while (result6 !== null) {
  13473. result4.push(result6);
  13474. var savedPos2 = pos;
  13475. if (input.substr(pos, 2) === "''") {
  13476. var result9 = "''";
  13477. pos += 2;
  13478. } else {
  13479. var result9 = null;
  13480. if (reportMatchFailures) {
  13481. matchFailed("\"''\"");
  13482. }
  13483. }
  13484. var result10 = result9 !== null
  13485. ? (function() {return "'"})()
  13486. : null;
  13487. if (result10 !== null) {
  13488. var result8 = result10;
  13489. } else {
  13490. var result8 = null;
  13491. pos = savedPos2;
  13492. }
  13493. if (result8 !== null) {
  13494. var result6 = result8;
  13495. } else {
  13496. if (input.substr(pos).match(/^[^']/) !== null) {
  13497. var result7 = input.charAt(pos);
  13498. pos++;
  13499. } else {
  13500. var result7 = null;
  13501. if (reportMatchFailures) {
  13502. matchFailed("[^']");
  13503. }
  13504. }
  13505. if (result7 !== null) {
  13506. var result6 = result7;
  13507. } else {
  13508. var result6 = null;;
  13509. };
  13510. }
  13511. }
  13512. if (result4 !== null) {
  13513. if (input.substr(pos).match(/^[']/) !== null) {
  13514. var result5 = input.charAt(pos);
  13515. pos++;
  13516. } else {
  13517. var result5 = null;
  13518. if (reportMatchFailures) {
  13519. matchFailed("[']");
  13520. }
  13521. }
  13522. if (result5 !== null) {
  13523. var result1 = [result3, result4, result5];
  13524. } else {
  13525. var result1 = null;
  13526. pos = savedPos1;
  13527. }
  13528. } else {
  13529. var result1 = null;
  13530. pos = savedPos1;
  13531. }
  13532. } else {
  13533. var result1 = null;
  13534. pos = savedPos1;
  13535. }
  13536. var result2 = result1 !== null
  13537. ? (function(val) {
  13538. return smalltalk.ValueNode._new()
  13539. ._value_(val.join("").replace(/\"/ig, '"'))
  13540. })(result1[1])
  13541. : null;
  13542. if (result2 !== null) {
  13543. var result0 = result2;
  13544. } else {
  13545. var result0 = null;
  13546. pos = savedPos0;
  13547. }
  13548. cache[cacheKey] = {
  13549. nextPos: pos,
  13550. result: result0
  13551. };
  13552. return result0;
  13553. }
  13554. function parse_symbol() {
  13555. var cacheKey = 'symbol@' + pos;
  13556. var cachedResult = cache[cacheKey];
  13557. if (cachedResult) {
  13558. pos = cachedResult.nextPos;
  13559. return cachedResult.result;
  13560. }
  13561. var savedPos0 = pos;
  13562. var savedPos1 = pos;
  13563. if (input.substr(pos, 1) === "#") {
  13564. var result3 = "#";
  13565. pos += 1;
  13566. } else {
  13567. var result3 = null;
  13568. if (reportMatchFailures) {
  13569. matchFailed("\"#\"");
  13570. }
  13571. }
  13572. if (result3 !== null) {
  13573. var result4 = [];
  13574. if (input.substr(pos).match(/^[a-zA-Z0-9]/) !== null) {
  13575. var result5 = input.charAt(pos);
  13576. pos++;
  13577. } else {
  13578. var result5 = null;
  13579. if (reportMatchFailures) {
  13580. matchFailed("[a-zA-Z0-9]");
  13581. }
  13582. }
  13583. while (result5 !== null) {
  13584. result4.push(result5);
  13585. if (input.substr(pos).match(/^[a-zA-Z0-9]/) !== null) {
  13586. var result5 = input.charAt(pos);
  13587. pos++;
  13588. } else {
  13589. var result5 = null;
  13590. if (reportMatchFailures) {
  13591. matchFailed("[a-zA-Z0-9]");
  13592. }
  13593. }
  13594. }
  13595. if (result4 !== null) {
  13596. var result1 = [result3, result4];
  13597. } else {
  13598. var result1 = null;
  13599. pos = savedPos1;
  13600. }
  13601. } else {
  13602. var result1 = null;
  13603. pos = savedPos1;
  13604. }
  13605. var result2 = result1 !== null
  13606. ? (function(val) {
  13607. return smalltalk.ValueNode._new()
  13608. ._value_(smalltalk.symbolFor(val.join("").replace(/\"/ig, '"')))
  13609. })(result1[1])
  13610. : null;
  13611. if (result2 !== null) {
  13612. var result0 = result2;
  13613. } else {
  13614. var result0 = null;
  13615. pos = savedPos0;
  13616. }
  13617. cache[cacheKey] = {
  13618. nextPos: pos,
  13619. result: result0
  13620. };
  13621. return result0;
  13622. }
  13623. function parse_number() {
  13624. var cacheKey = 'number@' + pos;
  13625. var cachedResult = cache[cacheKey];
  13626. if (cachedResult) {
  13627. pos = cachedResult.nextPos;
  13628. return cachedResult.result;
  13629. }
  13630. var savedPos0 = pos;
  13631. var result4 = parse_float();
  13632. if (result4 !== null) {
  13633. var result1 = result4;
  13634. } else {
  13635. var result3 = parse_integer();
  13636. if (result3 !== null) {
  13637. var result1 = result3;
  13638. } else {
  13639. var result1 = null;;
  13640. };
  13641. }
  13642. var result2 = result1 !== null
  13643. ? (function(n) {
  13644. return smalltalk.ValueNode._new()
  13645. ._value_(n)
  13646. })(result1)
  13647. : null;
  13648. if (result2 !== null) {
  13649. var result0 = result2;
  13650. } else {
  13651. var result0 = null;
  13652. pos = savedPos0;
  13653. }
  13654. cache[cacheKey] = {
  13655. nextPos: pos,
  13656. result: result0
  13657. };
  13658. return result0;
  13659. }
  13660. function parse_float() {
  13661. var cacheKey = 'float@' + pos;
  13662. var cachedResult = cache[cacheKey];
  13663. if (cachedResult) {
  13664. pos = cachedResult.nextPos;
  13665. return cachedResult.result;
  13666. }
  13667. var savedPos0 = pos;
  13668. var savedPos1 = pos;
  13669. if (input.substr(pos).match(/^[\-]/) !== null) {
  13670. var result7 = input.charAt(pos);
  13671. pos++;
  13672. } else {
  13673. var result7 = null;
  13674. if (reportMatchFailures) {
  13675. matchFailed("[\\-]");
  13676. }
  13677. }
  13678. var result3 = result7 !== null ? result7 : '';
  13679. if (result3 !== null) {
  13680. var result4 = parse_integer();
  13681. if (result4 !== null) {
  13682. if (input.substr(pos, 1) === ".") {
  13683. var result5 = ".";
  13684. pos += 1;
  13685. } else {
  13686. var result5 = null;
  13687. if (reportMatchFailures) {
  13688. matchFailed("\".\"");
  13689. }
  13690. }
  13691. if (result5 !== null) {
  13692. var result6 = parse_integer();
  13693. if (result6 !== null) {
  13694. var result1 = [result3, result4, result5, result6];
  13695. } else {
  13696. var result1 = null;
  13697. pos = savedPos1;
  13698. }
  13699. } else {
  13700. var result1 = null;
  13701. pos = savedPos1;
  13702. }
  13703. } else {
  13704. var result1 = null;
  13705. pos = savedPos1;
  13706. }
  13707. } else {
  13708. var result1 = null;
  13709. pos = savedPos1;
  13710. }
  13711. var result2 = result1 !== null
  13712. ? (function(neg, int, dec) {return parseFloat((neg+int+"."+dec), 10)})(result1[0], result1[1], result1[3])
  13713. : null;
  13714. if (result2 !== null) {
  13715. var result0 = result2;
  13716. } else {
  13717. var result0 = null;
  13718. pos = savedPos0;
  13719. }
  13720. cache[cacheKey] = {
  13721. nextPos: pos,
  13722. result: result0
  13723. };
  13724. return result0;
  13725. }
  13726. function parse_integer() {
  13727. var cacheKey = 'integer@' + pos;
  13728. var cachedResult = cache[cacheKey];
  13729. if (cachedResult) {
  13730. pos = cachedResult.nextPos;
  13731. return cachedResult.result;
  13732. }
  13733. var savedPos0 = pos;
  13734. var savedPos1 = pos;
  13735. if (input.substr(pos).match(/^[\-]/) !== null) {
  13736. var result6 = input.charAt(pos);
  13737. pos++;
  13738. } else {
  13739. var result6 = null;
  13740. if (reportMatchFailures) {
  13741. matchFailed("[\\-]");
  13742. }
  13743. }
  13744. var result3 = result6 !== null ? result6 : '';
  13745. if (result3 !== null) {
  13746. if (input.substr(pos).match(/^[0-9]/) !== null) {
  13747. var result5 = input.charAt(pos);
  13748. pos++;
  13749. } else {
  13750. var result5 = null;
  13751. if (reportMatchFailures) {
  13752. matchFailed("[0-9]");
  13753. }
  13754. }
  13755. if (result5 !== null) {
  13756. var result4 = [];
  13757. while (result5 !== null) {
  13758. result4.push(result5);
  13759. if (input.substr(pos).match(/^[0-9]/) !== null) {
  13760. var result5 = input.charAt(pos);
  13761. pos++;
  13762. } else {
  13763. var result5 = null;
  13764. if (reportMatchFailures) {
  13765. matchFailed("[0-9]");
  13766. }
  13767. }
  13768. }
  13769. } else {
  13770. var result4 = null;
  13771. }
  13772. if (result4 !== null) {
  13773. var result1 = [result3, result4];
  13774. } else {
  13775. var result1 = null;
  13776. pos = savedPos1;
  13777. }
  13778. } else {
  13779. var result1 = null;
  13780. pos = savedPos1;
  13781. }
  13782. var result2 = result1 !== null
  13783. ? (function(neg, digits) {return (parseInt(neg+digits.join(""), 10))})(result1[0], result1[1])
  13784. : null;
  13785. if (result2 !== null) {
  13786. var result0 = result2;
  13787. } else {
  13788. var result0 = null;
  13789. pos = savedPos0;
  13790. }
  13791. cache[cacheKey] = {
  13792. nextPos: pos,
  13793. result: result0
  13794. };
  13795. return result0;
  13796. }
  13797. function parse_literalArray() {
  13798. var cacheKey = 'literalArray@' + pos;
  13799. var cachedResult = cache[cacheKey];
  13800. if (cachedResult) {
  13801. pos = cachedResult.nextPos;
  13802. return cachedResult.result;
  13803. }
  13804. var savedPos0 = pos;
  13805. var savedPos1 = pos;
  13806. if (input.substr(pos, 2) === "#(") {
  13807. var result3 = "#(";
  13808. pos += 2;
  13809. } else {
  13810. var result3 = null;
  13811. if (reportMatchFailures) {
  13812. matchFailed("\"#(\"");
  13813. }
  13814. }
  13815. if (result3 !== null) {
  13816. var result4 = parse_ws();
  13817. if (result4 !== null) {
  13818. var result5 = [];
  13819. var savedPos2 = pos;
  13820. var savedPos3 = pos;
  13821. var result11 = parse_literal();
  13822. if (result11 !== null) {
  13823. var result12 = parse_ws();
  13824. if (result12 !== null) {
  13825. var result9 = [result11, result12];
  13826. } else {
  13827. var result9 = null;
  13828. pos = savedPos3;
  13829. }
  13830. } else {
  13831. var result9 = null;
  13832. pos = savedPos3;
  13833. }
  13834. var result10 = result9 !== null
  13835. ? (function(lit) {return lit._value()})(result9[0])
  13836. : null;
  13837. if (result10 !== null) {
  13838. var result8 = result10;
  13839. } else {
  13840. var result8 = null;
  13841. pos = savedPos2;
  13842. }
  13843. while (result8 !== null) {
  13844. result5.push(result8);
  13845. var savedPos2 = pos;
  13846. var savedPos3 = pos;
  13847. var result11 = parse_literal();
  13848. if (result11 !== null) {
  13849. var result12 = parse_ws();
  13850. if (result12 !== null) {
  13851. var result9 = [result11, result12];
  13852. } else {
  13853. var result9 = null;
  13854. pos = savedPos3;
  13855. }
  13856. } else {
  13857. var result9 = null;
  13858. pos = savedPos3;
  13859. }
  13860. var result10 = result9 !== null
  13861. ? (function(lit) {return lit._value()})(result9[0])
  13862. : null;
  13863. if (result10 !== null) {
  13864. var result8 = result10;
  13865. } else {
  13866. var result8 = null;
  13867. pos = savedPos2;
  13868. }
  13869. }
  13870. if (result5 !== null) {
  13871. var result6 = parse_ws();
  13872. if (result6 !== null) {
  13873. if (input.substr(pos, 1) === ")") {
  13874. var result7 = ")";
  13875. pos += 1;
  13876. } else {
  13877. var result7 = null;
  13878. if (reportMatchFailures) {
  13879. matchFailed("\")\"");
  13880. }
  13881. }
  13882. if (result7 !== null) {
  13883. var result1 = [result3, result4, result5, result6, result7];
  13884. } else {
  13885. var result1 = null;
  13886. pos = savedPos1;
  13887. }
  13888. } else {
  13889. var result1 = null;
  13890. pos = savedPos1;
  13891. }
  13892. } else {
  13893. var result1 = null;
  13894. pos = savedPos1;
  13895. }
  13896. } else {
  13897. var result1 = null;
  13898. pos = savedPos1;
  13899. }
  13900. } else {
  13901. var result1 = null;
  13902. pos = savedPos1;
  13903. }
  13904. var result2 = result1 !== null
  13905. ? (function(lits) {
  13906. return smalltalk.ValueNode._new()
  13907. ._value_(lits)
  13908. })(result1[2])
  13909. : null;
  13910. if (result2 !== null) {
  13911. var result0 = result2;
  13912. } else {
  13913. var result0 = null;
  13914. pos = savedPos0;
  13915. }
  13916. cache[cacheKey] = {
  13917. nextPos: pos,
  13918. result: result0
  13919. };
  13920. return result0;
  13921. }
  13922. function parse_dynamicArray() {
  13923. var cacheKey = 'dynamicArray@' + pos;
  13924. var cachedResult = cache[cacheKey];
  13925. if (cachedResult) {
  13926. pos = cachedResult.nextPos;
  13927. return cachedResult.result;
  13928. }
  13929. var savedPos0 = pos;
  13930. var savedPos1 = pos;
  13931. if (input.substr(pos, 1) === "{") {
  13932. var result3 = "{";
  13933. pos += 1;
  13934. } else {
  13935. var result3 = null;
  13936. if (reportMatchFailures) {
  13937. matchFailed("\"{\"");
  13938. }
  13939. }
  13940. if (result3 !== null) {
  13941. var result4 = parse_ws();
  13942. if (result4 !== null) {
  13943. var result8 = parse_expressions();
  13944. var result5 = result8 !== null ? result8 : '';
  13945. if (result5 !== null) {
  13946. var result6 = parse_ws();
  13947. if (result6 !== null) {
  13948. if (input.substr(pos, 1) === "}") {
  13949. var result7 = "}";
  13950. pos += 1;
  13951. } else {
  13952. var result7 = null;
  13953. if (reportMatchFailures) {
  13954. matchFailed("\"}\"");
  13955. }
  13956. }
  13957. if (result7 !== null) {
  13958. var result1 = [result3, result4, result5, result6, result7];
  13959. } else {
  13960. var result1 = null;
  13961. pos = savedPos1;
  13962. }
  13963. } else {
  13964. var result1 = null;
  13965. pos = savedPos1;
  13966. }
  13967. } else {
  13968. var result1 = null;
  13969. pos = savedPos1;
  13970. }
  13971. } else {
  13972. var result1 = null;
  13973. pos = savedPos1;
  13974. }
  13975. } else {
  13976. var result1 = null;
  13977. pos = savedPos1;
  13978. }
  13979. var result2 = result1 !== null
  13980. ? (function(expressions) {
  13981. return smalltalk.DynamicArrayNode._new()
  13982. ._nodes_(expressions)
  13983. })(result1[2])
  13984. : null;
  13985. if (result2 !== null) {
  13986. var result0 = result2;
  13987. } else {
  13988. var result0 = null;
  13989. pos = savedPos0;
  13990. }
  13991. cache[cacheKey] = {
  13992. nextPos: pos,
  13993. result: result0
  13994. };
  13995. return result0;
  13996. }
  13997. function parse_dynamicDictionary() {
  13998. var cacheKey = 'dynamicDictionary@' + pos;
  13999. var cachedResult = cache[cacheKey];
  14000. if (cachedResult) {
  14001. pos = cachedResult.nextPos;
  14002. return cachedResult.result;
  14003. }
  14004. var savedPos0 = pos;
  14005. var savedPos1 = pos;
  14006. if (input.substr(pos, 2) === "#{") {
  14007. var result3 = "#{";
  14008. pos += 2;
  14009. } else {
  14010. var result3 = null;
  14011. if (reportMatchFailures) {
  14012. matchFailed("\"#{\"");
  14013. }
  14014. }
  14015. if (result3 !== null) {
  14016. var result4 = parse_ws();
  14017. if (result4 !== null) {
  14018. var result8 = parse_expressions();
  14019. var result5 = result8 !== null ? result8 : '';
  14020. if (result5 !== null) {
  14021. var result6 = parse_ws();
  14022. if (result6 !== null) {
  14023. if (input.substr(pos, 1) === "}") {
  14024. var result7 = "}";
  14025. pos += 1;
  14026. } else {
  14027. var result7 = null;
  14028. if (reportMatchFailures) {
  14029. matchFailed("\"}\"");
  14030. }
  14031. }
  14032. if (result7 !== null) {
  14033. var result1 = [result3, result4, result5, result6, result7];
  14034. } else {
  14035. var result1 = null;
  14036. pos = savedPos1;
  14037. }
  14038. } else {
  14039. var result1 = null;
  14040. pos = savedPos1;
  14041. }
  14042. } else {
  14043. var result1 = null;
  14044. pos = savedPos1;
  14045. }
  14046. } else {
  14047. var result1 = null;
  14048. pos = savedPos1;
  14049. }
  14050. } else {
  14051. var result1 = null;
  14052. pos = savedPos1;
  14053. }
  14054. var result2 = result1 !== null
  14055. ? (function(expressions) {
  14056. return smalltalk.DynamicDictionaryNode._new()
  14057. ._nodes_(expressions)
  14058. })(result1[2])
  14059. : null;
  14060. if (result2 !== null) {
  14061. var result0 = result2;
  14062. } else {
  14063. var result0 = null;
  14064. pos = savedPos0;
  14065. }
  14066. cache[cacheKey] = {
  14067. nextPos: pos,
  14068. result: result0
  14069. };
  14070. return result0;
  14071. }
  14072. function parse_pseudoVariable() {
  14073. var cacheKey = 'pseudoVariable@' + pos;
  14074. var cachedResult = cache[cacheKey];
  14075. if (cachedResult) {
  14076. pos = cachedResult.nextPos;
  14077. return cachedResult.result;
  14078. }
  14079. var savedPos0 = pos;
  14080. var savedPos3 = pos;
  14081. if (input.substr(pos, 4) === "true") {
  14082. var result10 = "true";
  14083. pos += 4;
  14084. } else {
  14085. var result10 = null;
  14086. if (reportMatchFailures) {
  14087. matchFailed("\"true\"");
  14088. }
  14089. }
  14090. var result11 = result10 !== null
  14091. ? (function() {return true})()
  14092. : null;
  14093. if (result11 !== null) {
  14094. var result9 = result11;
  14095. } else {
  14096. var result9 = null;
  14097. pos = savedPos3;
  14098. }
  14099. if (result9 !== null) {
  14100. var result1 = result9;
  14101. } else {
  14102. var savedPos2 = pos;
  14103. if (input.substr(pos, 5) === "false") {
  14104. var result7 = "false";
  14105. pos += 5;
  14106. } else {
  14107. var result7 = null;
  14108. if (reportMatchFailures) {
  14109. matchFailed("\"false\"");
  14110. }
  14111. }
  14112. var result8 = result7 !== null
  14113. ? (function() {return false})()
  14114. : null;
  14115. if (result8 !== null) {
  14116. var result6 = result8;
  14117. } else {
  14118. var result6 = null;
  14119. pos = savedPos2;
  14120. }
  14121. if (result6 !== null) {
  14122. var result1 = result6;
  14123. } else {
  14124. var savedPos1 = pos;
  14125. if (input.substr(pos, 3) === "nil") {
  14126. var result4 = "nil";
  14127. pos += 3;
  14128. } else {
  14129. var result4 = null;
  14130. if (reportMatchFailures) {
  14131. matchFailed("\"nil\"");
  14132. }
  14133. }
  14134. var result5 = result4 !== null
  14135. ? (function() {return nil})()
  14136. : null;
  14137. if (result5 !== null) {
  14138. var result3 = result5;
  14139. } else {
  14140. var result3 = null;
  14141. pos = savedPos1;
  14142. }
  14143. if (result3 !== null) {
  14144. var result1 = result3;
  14145. } else {
  14146. var result1 = null;;
  14147. };
  14148. };
  14149. }
  14150. var result2 = result1 !== null
  14151. ? (function(val) {
  14152. return smalltalk.ValueNode._new()._value_(val)
  14153. })(result1)
  14154. : null;
  14155. if (result2 !== null) {
  14156. var result0 = result2;
  14157. } else {
  14158. var result0 = null;
  14159. pos = savedPos0;
  14160. }
  14161. cache[cacheKey] = {
  14162. nextPos: pos,
  14163. result: result0
  14164. };
  14165. return result0;
  14166. }
  14167. function parse_literal() {
  14168. var cacheKey = 'literal@' + pos;
  14169. var cachedResult = cache[cacheKey];
  14170. if (cachedResult) {
  14171. pos = cachedResult.nextPos;
  14172. return cachedResult.result;
  14173. }
  14174. var result8 = parse_pseudoVariable();
  14175. if (result8 !== null) {
  14176. var result0 = result8;
  14177. } else {
  14178. var result7 = parse_number();
  14179. if (result7 !== null) {
  14180. var result0 = result7;
  14181. } else {
  14182. var result6 = parse_literalArray();
  14183. if (result6 !== null) {
  14184. var result0 = result6;
  14185. } else {
  14186. var result5 = parse_dynamicDictionary();
  14187. if (result5 !== null) {
  14188. var result0 = result5;
  14189. } else {
  14190. var result4 = parse_dynamicArray();
  14191. if (result4 !== null) {
  14192. var result0 = result4;
  14193. } else {
  14194. var result3 = parse_string();
  14195. if (result3 !== null) {
  14196. var result0 = result3;
  14197. } else {
  14198. var result2 = parse_symbol();
  14199. if (result2 !== null) {
  14200. var result0 = result2;
  14201. } else {
  14202. var result1 = parse_block();
  14203. if (result1 !== null) {
  14204. var result0 = result1;
  14205. } else {
  14206. var result0 = null;;
  14207. };
  14208. };
  14209. };
  14210. };
  14211. };
  14212. };
  14213. };
  14214. }
  14215. cache[cacheKey] = {
  14216. nextPos: pos,
  14217. result: result0
  14218. };
  14219. return result0;
  14220. }
  14221. function parse_variable() {
  14222. var cacheKey = 'variable@' + pos;
  14223. var cachedResult = cache[cacheKey];
  14224. if (cachedResult) {
  14225. pos = cachedResult.nextPos;
  14226. return cachedResult.result;
  14227. }
  14228. var savedPos0 = pos;
  14229. var result1 = parse_identifier();
  14230. var result2 = result1 !== null
  14231. ? (function(identifier) {
  14232. return smalltalk.VariableNode._new()
  14233. ._value_(identifier)
  14234. })(result1)
  14235. : null;
  14236. if (result2 !== null) {
  14237. var result0 = result2;
  14238. } else {
  14239. var result0 = null;
  14240. pos = savedPos0;
  14241. }
  14242. cache[cacheKey] = {
  14243. nextPos: pos,
  14244. result: result0
  14245. };
  14246. return result0;
  14247. }
  14248. function parse_classReference() {
  14249. var cacheKey = 'classReference@' + pos;
  14250. var cachedResult = cache[cacheKey];
  14251. if (cachedResult) {
  14252. pos = cachedResult.nextPos;
  14253. return cachedResult.result;
  14254. }
  14255. var savedPos0 = pos;
  14256. var result1 = parse_className();
  14257. var result2 = result1 !== null
  14258. ? (function(className) {
  14259. return smalltalk.ClassReferenceNode._new()
  14260. ._value_(className)
  14261. })(result1)
  14262. : null;
  14263. if (result2 !== null) {
  14264. var result0 = result2;
  14265. } else {
  14266. var result0 = null;
  14267. pos = savedPos0;
  14268. }
  14269. cache[cacheKey] = {
  14270. nextPos: pos,
  14271. result: result0
  14272. };
  14273. return result0;
  14274. }
  14275. function parse_reference() {
  14276. var cacheKey = 'reference@' + pos;
  14277. var cachedResult = cache[cacheKey];
  14278. if (cachedResult) {
  14279. pos = cachedResult.nextPos;
  14280. return cachedResult.result;
  14281. }
  14282. var result2 = parse_variable();
  14283. if (result2 !== null) {
  14284. var result0 = result2;
  14285. } else {
  14286. var result1 = parse_classReference();
  14287. if (result1 !== null) {
  14288. var result0 = result1;
  14289. } else {
  14290. var result0 = null;;
  14291. };
  14292. }
  14293. cache[cacheKey] = {
  14294. nextPos: pos,
  14295. result: result0
  14296. };
  14297. return result0;
  14298. }
  14299. function parse_keywordPair() {
  14300. var cacheKey = 'keywordPair@' + pos;
  14301. var cachedResult = cache[cacheKey];
  14302. if (cachedResult) {
  14303. pos = cachedResult.nextPos;
  14304. return cachedResult.result;
  14305. }
  14306. var savedPos0 = pos;
  14307. var savedPos1 = pos;
  14308. var result3 = parse_keyword();
  14309. if (result3 !== null) {
  14310. var result4 = parse_ws();
  14311. if (result4 !== null) {
  14312. var result5 = parse_binarySend();
  14313. if (result5 !== null) {
  14314. var result6 = parse_ws();
  14315. if (result6 !== null) {
  14316. var result1 = [result3, result4, result5, result6];
  14317. } else {
  14318. var result1 = null;
  14319. pos = savedPos1;
  14320. }
  14321. } else {
  14322. var result1 = null;
  14323. pos = savedPos1;
  14324. }
  14325. } else {
  14326. var result1 = null;
  14327. pos = savedPos1;
  14328. }
  14329. } else {
  14330. var result1 = null;
  14331. pos = savedPos1;
  14332. }
  14333. var result2 = result1 !== null
  14334. ? (function(key, arg) {return {key:key, arg: arg}})(result1[0], result1[2])
  14335. : null;
  14336. if (result2 !== null) {
  14337. var result0 = result2;
  14338. } else {
  14339. var result0 = null;
  14340. pos = savedPos0;
  14341. }
  14342. cache[cacheKey] = {
  14343. nextPos: pos,
  14344. result: result0
  14345. };
  14346. return result0;
  14347. }
  14348. function parse_binarySelector() {
  14349. var cacheKey = 'binarySelector@' + pos;
  14350. var cachedResult = cache[cacheKey];
  14351. if (cachedResult) {
  14352. pos = cachedResult.nextPos;
  14353. return cachedResult.result;
  14354. }
  14355. var savedPos0 = pos;
  14356. if (input.substr(pos).match(/^[\\+*\/=><,@%~|&\-]/) !== null) {
  14357. var result3 = input.charAt(pos);
  14358. pos++;
  14359. } else {
  14360. var result3 = null;
  14361. if (reportMatchFailures) {
  14362. matchFailed("[\\\\+*\\/=><,@%~|&\\-]");
  14363. }
  14364. }
  14365. if (result3 !== null) {
  14366. var result1 = [];
  14367. while (result3 !== null) {
  14368. result1.push(result3);
  14369. if (input.substr(pos).match(/^[\\+*\/=><,@%~|&\-]/) !== null) {
  14370. var result3 = input.charAt(pos);
  14371. pos++;
  14372. } else {
  14373. var result3 = null;
  14374. if (reportMatchFailures) {
  14375. matchFailed("[\\\\+*\\/=><,@%~|&\\-]");
  14376. }
  14377. }
  14378. }
  14379. } else {
  14380. var result1 = null;
  14381. }
  14382. var result2 = result1 !== null
  14383. ? (function(bin) {return bin.join("").replace(/\\/g, '\\\\')})(result1)
  14384. : null;
  14385. if (result2 !== null) {
  14386. var result0 = result2;
  14387. } else {
  14388. var result0 = null;
  14389. pos = savedPos0;
  14390. }
  14391. cache[cacheKey] = {
  14392. nextPos: pos,
  14393. result: result0
  14394. };
  14395. return result0;
  14396. }
  14397. function parse_keywordPattern() {
  14398. var cacheKey = 'keywordPattern@' + pos;
  14399. var cachedResult = cache[cacheKey];
  14400. if (cachedResult) {
  14401. pos = cachedResult.nextPos;
  14402. return cachedResult.result;
  14403. }
  14404. var savedPos0 = pos;
  14405. var savedPos1 = pos;
  14406. var savedPos2 = pos;
  14407. var result6 = parse_ws();
  14408. if (result6 !== null) {
  14409. var result7 = parse_keyword();
  14410. if (result7 !== null) {
  14411. var result8 = parse_ws();
  14412. if (result8 !== null) {
  14413. var result9 = parse_identifier();
  14414. if (result9 !== null) {
  14415. var result4 = [result6, result7, result8, result9];
  14416. } else {
  14417. var result4 = null;
  14418. pos = savedPos2;
  14419. }
  14420. } else {
  14421. var result4 = null;
  14422. pos = savedPos2;
  14423. }
  14424. } else {
  14425. var result4 = null;
  14426. pos = savedPos2;
  14427. }
  14428. } else {
  14429. var result4 = null;
  14430. pos = savedPos2;
  14431. }
  14432. var result5 = result4 !== null
  14433. ? (function(key, arg) {return {key:key, arg: arg}})(result4[1], result4[3])
  14434. : null;
  14435. if (result5 !== null) {
  14436. var result3 = result5;
  14437. } else {
  14438. var result3 = null;
  14439. pos = savedPos1;
  14440. }
  14441. if (result3 !== null) {
  14442. var result1 = [];
  14443. while (result3 !== null) {
  14444. result1.push(result3);
  14445. var savedPos1 = pos;
  14446. var savedPos2 = pos;
  14447. var result6 = parse_ws();
  14448. if (result6 !== null) {
  14449. var result7 = parse_keyword();
  14450. if (result7 !== null) {
  14451. var result8 = parse_ws();
  14452. if (result8 !== null) {
  14453. var result9 = parse_identifier();
  14454. if (result9 !== null) {
  14455. var result4 = [result6, result7, result8, result9];
  14456. } else {
  14457. var result4 = null;
  14458. pos = savedPos2;
  14459. }
  14460. } else {
  14461. var result4 = null;
  14462. pos = savedPos2;
  14463. }
  14464. } else {
  14465. var result4 = null;
  14466. pos = savedPos2;
  14467. }
  14468. } else {
  14469. var result4 = null;
  14470. pos = savedPos2;
  14471. }
  14472. var result5 = result4 !== null
  14473. ? (function(key, arg) {return {key:key, arg: arg}})(result4[1], result4[3])
  14474. : null;
  14475. if (result5 !== null) {
  14476. var result3 = result5;
  14477. } else {
  14478. var result3 = null;
  14479. pos = savedPos1;
  14480. }
  14481. }
  14482. } else {
  14483. var result1 = null;
  14484. }
  14485. var result2 = result1 !== null
  14486. ? (function(pairs) {
  14487. var keywords = [];
  14488. var params = [];
  14489. for(var i=0;i<pairs.length;i++){
  14490. keywords.push(pairs[i].key);
  14491. }
  14492. for(var i=0;i<pairs.length;i++){
  14493. params.push(pairs[i].arg);
  14494. }
  14495. return [keywords.join(""), params]
  14496. })(result1)
  14497. : null;
  14498. if (result2 !== null) {
  14499. var result0 = result2;
  14500. } else {
  14501. var result0 = null;
  14502. pos = savedPos0;
  14503. }
  14504. cache[cacheKey] = {
  14505. nextPos: pos,
  14506. result: result0
  14507. };
  14508. return result0;
  14509. }
  14510. function parse_binaryPattern() {
  14511. var cacheKey = 'binaryPattern@' + pos;
  14512. var cachedResult = cache[cacheKey];
  14513. if (cachedResult) {
  14514. pos = cachedResult.nextPos;
  14515. return cachedResult.result;
  14516. }
  14517. var savedPos0 = pos;
  14518. var savedPos1 = pos;
  14519. var result3 = parse_ws();
  14520. if (result3 !== null) {
  14521. var result4 = parse_binarySelector();
  14522. if (result4 !== null) {
  14523. var result5 = parse_ws();
  14524. if (result5 !== null) {
  14525. var result6 = parse_identifier();
  14526. if (result6 !== null) {
  14527. var result1 = [result3, result4, result5, result6];
  14528. } else {
  14529. var result1 = null;
  14530. pos = savedPos1;
  14531. }
  14532. } else {
  14533. var result1 = null;
  14534. pos = savedPos1;
  14535. }
  14536. } else {
  14537. var result1 = null;
  14538. pos = savedPos1;
  14539. }
  14540. } else {
  14541. var result1 = null;
  14542. pos = savedPos1;
  14543. }
  14544. var result2 = result1 !== null
  14545. ? (function(selector, arg) {return [selector, [arg]]})(result1[1], result1[3])
  14546. : null;
  14547. if (result2 !== null) {
  14548. var result0 = result2;
  14549. } else {
  14550. var result0 = null;
  14551. pos = savedPos0;
  14552. }
  14553. cache[cacheKey] = {
  14554. nextPos: pos,
  14555. result: result0
  14556. };
  14557. return result0;
  14558. }
  14559. function parse_unaryPattern() {
  14560. var cacheKey = 'unaryPattern@' + pos;
  14561. var cachedResult = cache[cacheKey];
  14562. if (cachedResult) {
  14563. pos = cachedResult.nextPos;
  14564. return cachedResult.result;
  14565. }
  14566. var savedPos0 = pos;
  14567. var savedPos1 = pos;
  14568. var result3 = parse_ws();
  14569. if (result3 !== null) {
  14570. var result4 = parse_identifier();
  14571. if (result4 !== null) {
  14572. var result1 = [result3, result4];
  14573. } else {
  14574. var result1 = null;
  14575. pos = savedPos1;
  14576. }
  14577. } else {
  14578. var result1 = null;
  14579. pos = savedPos1;
  14580. }
  14581. var result2 = result1 !== null
  14582. ? (function(selector) {return [selector, []]})(result1[1])
  14583. : null;
  14584. if (result2 !== null) {
  14585. var result0 = result2;
  14586. } else {
  14587. var result0 = null;
  14588. pos = savedPos0;
  14589. }
  14590. cache[cacheKey] = {
  14591. nextPos: pos,
  14592. result: result0
  14593. };
  14594. return result0;
  14595. }
  14596. function parse_expression() {
  14597. var cacheKey = 'expression@' + pos;
  14598. var cachedResult = cache[cacheKey];
  14599. if (cachedResult) {
  14600. pos = cachedResult.nextPos;
  14601. return cachedResult.result;
  14602. }
  14603. var result5 = parse_assignment();
  14604. if (result5 !== null) {
  14605. var result0 = result5;
  14606. } else {
  14607. var result4 = parse_cascade();
  14608. if (result4 !== null) {
  14609. var result0 = result4;
  14610. } else {
  14611. var result3 = parse_keywordSend();
  14612. if (result3 !== null) {
  14613. var result0 = result3;
  14614. } else {
  14615. var result2 = parse_binarySend();
  14616. if (result2 !== null) {
  14617. var result0 = result2;
  14618. } else {
  14619. var result1 = parse_jsStatement();
  14620. if (result1 !== null) {
  14621. var result0 = result1;
  14622. } else {
  14623. var result0 = null;;
  14624. };
  14625. };
  14626. };
  14627. };
  14628. }
  14629. cache[cacheKey] = {
  14630. nextPos: pos,
  14631. result: result0
  14632. };
  14633. return result0;
  14634. }
  14635. function parse_expressionList() {
  14636. var cacheKey = 'expressionList@' + pos;
  14637. var cachedResult = cache[cacheKey];
  14638. if (cachedResult) {
  14639. pos = cachedResult.nextPos;
  14640. return cachedResult.result;
  14641. }
  14642. var savedPos0 = pos;
  14643. var savedPos1 = pos;
  14644. var result3 = parse_ws();
  14645. if (result3 !== null) {
  14646. if (input.substr(pos, 1) === ".") {
  14647. var result4 = ".";
  14648. pos += 1;
  14649. } else {
  14650. var result4 = null;
  14651. if (reportMatchFailures) {
  14652. matchFailed("\".\"");
  14653. }
  14654. }
  14655. if (result4 !== null) {
  14656. var result5 = parse_ws();
  14657. if (result5 !== null) {
  14658. var result6 = parse_expression();
  14659. if (result6 !== null) {
  14660. var result1 = [result3, result4, result5, result6];
  14661. } else {
  14662. var result1 = null;
  14663. pos = savedPos1;
  14664. }
  14665. } else {
  14666. var result1 = null;
  14667. pos = savedPos1;
  14668. }
  14669. } else {
  14670. var result1 = null;
  14671. pos = savedPos1;
  14672. }
  14673. } else {
  14674. var result1 = null;
  14675. pos = savedPos1;
  14676. }
  14677. var result2 = result1 !== null
  14678. ? (function(expression) {return expression})(result1[3])
  14679. : null;
  14680. if (result2 !== null) {
  14681. var result0 = result2;
  14682. } else {
  14683. var result0 = null;
  14684. pos = savedPos0;
  14685. }
  14686. cache[cacheKey] = {
  14687. nextPos: pos,
  14688. result: result0
  14689. };
  14690. return result0;
  14691. }
  14692. function parse_expressions() {
  14693. var cacheKey = 'expressions@' + pos;
  14694. var cachedResult = cache[cacheKey];
  14695. if (cachedResult) {
  14696. pos = cachedResult.nextPos;
  14697. return cachedResult.result;
  14698. }
  14699. var savedPos0 = pos;
  14700. var savedPos1 = pos;
  14701. var result3 = parse_expression();
  14702. if (result3 !== null) {
  14703. var result4 = [];
  14704. var result5 = parse_expressionList();
  14705. while (result5 !== null) {
  14706. result4.push(result5);
  14707. var result5 = parse_expressionList();
  14708. }
  14709. if (result4 !== null) {
  14710. var result1 = [result3, result4];
  14711. } else {
  14712. var result1 = null;
  14713. pos = savedPos1;
  14714. }
  14715. } else {
  14716. var result1 = null;
  14717. pos = savedPos1;
  14718. }
  14719. var result2 = result1 !== null
  14720. ? (function(first, others) {
  14721. var result = [first];
  14722. for(var i=0;i<others.length;i++) {
  14723. result.push(others[i]);
  14724. }
  14725. return result;
  14726. })(result1[0], result1[1])
  14727. : null;
  14728. if (result2 !== null) {
  14729. var result0 = result2;
  14730. } else {
  14731. var result0 = null;
  14732. pos = savedPos0;
  14733. }
  14734. cache[cacheKey] = {
  14735. nextPos: pos,
  14736. result: result0
  14737. };
  14738. return result0;
  14739. }
  14740. function parse_assignment() {
  14741. var cacheKey = 'assignment@' + pos;
  14742. var cachedResult = cache[cacheKey];
  14743. if (cachedResult) {
  14744. pos = cachedResult.nextPos;
  14745. return cachedResult.result;
  14746. }
  14747. var savedPos0 = pos;
  14748. var savedPos1 = pos;
  14749. var result3 = parse_variable();
  14750. if (result3 !== null) {
  14751. var result4 = parse_ws();
  14752. if (result4 !== null) {
  14753. if (input.substr(pos, 2) === ":=") {
  14754. var result5 = ":=";
  14755. pos += 2;
  14756. } else {
  14757. var result5 = null;
  14758. if (reportMatchFailures) {
  14759. matchFailed("\":=\"");
  14760. }
  14761. }
  14762. if (result5 !== null) {
  14763. var result6 = parse_ws();
  14764. if (result6 !== null) {
  14765. var result7 = parse_expression();
  14766. if (result7 !== null) {
  14767. var result1 = [result3, result4, result5, result6, result7];
  14768. } else {
  14769. var result1 = null;
  14770. pos = savedPos1;
  14771. }
  14772. } else {
  14773. var result1 = null;
  14774. pos = savedPos1;
  14775. }
  14776. } else {
  14777. var result1 = null;
  14778. pos = savedPos1;
  14779. }
  14780. } else {
  14781. var result1 = null;
  14782. pos = savedPos1;
  14783. }
  14784. } else {
  14785. var result1 = null;
  14786. pos = savedPos1;
  14787. }
  14788. var result2 = result1 !== null
  14789. ? (function(variable, expression) {
  14790. return smalltalk.AssignmentNode._new()
  14791. ._left_(variable)
  14792. ._right_(expression)
  14793. })(result1[0], result1[4])
  14794. : null;
  14795. if (result2 !== null) {
  14796. var result0 = result2;
  14797. } else {
  14798. var result0 = null;
  14799. pos = savedPos0;
  14800. }
  14801. cache[cacheKey] = {
  14802. nextPos: pos,
  14803. result: result0
  14804. };
  14805. return result0;
  14806. }
  14807. function parse_ret() {
  14808. var cacheKey = 'ret@' + pos;
  14809. var cachedResult = cache[cacheKey];
  14810. if (cachedResult) {
  14811. pos = cachedResult.nextPos;
  14812. return cachedResult.result;
  14813. }
  14814. var savedPos0 = pos;
  14815. var savedPos1 = pos;
  14816. if (input.substr(pos, 1) === "^") {
  14817. var result3 = "^";
  14818. pos += 1;
  14819. } else {
  14820. var result3 = null;
  14821. if (reportMatchFailures) {
  14822. matchFailed("\"^\"");
  14823. }
  14824. }
  14825. if (result3 !== null) {
  14826. var result4 = parse_ws();
  14827. if (result4 !== null) {
  14828. var result5 = parse_expression();
  14829. if (result5 !== null) {
  14830. var result6 = parse_ws();
  14831. if (result6 !== null) {
  14832. if (input.substr(pos, 1) === ".") {
  14833. var result8 = ".";
  14834. pos += 1;
  14835. } else {
  14836. var result8 = null;
  14837. if (reportMatchFailures) {
  14838. matchFailed("\".\"");
  14839. }
  14840. }
  14841. var result7 = result8 !== null ? result8 : '';
  14842. if (result7 !== null) {
  14843. var result1 = [result3, result4, result5, result6, result7];
  14844. } else {
  14845. var result1 = null;
  14846. pos = savedPos1;
  14847. }
  14848. } else {
  14849. var result1 = null;
  14850. pos = savedPos1;
  14851. }
  14852. } else {
  14853. var result1 = null;
  14854. pos = savedPos1;
  14855. }
  14856. } else {
  14857. var result1 = null;
  14858. pos = savedPos1;
  14859. }
  14860. } else {
  14861. var result1 = null;
  14862. pos = savedPos1;
  14863. }
  14864. var result2 = result1 !== null
  14865. ? (function(expression) {
  14866. return smalltalk.ReturnNode._new()
  14867. ._nodes_([expression])
  14868. })(result1[2])
  14869. : null;
  14870. if (result2 !== null) {
  14871. var result0 = result2;
  14872. } else {
  14873. var result0 = null;
  14874. pos = savedPos0;
  14875. }
  14876. cache[cacheKey] = {
  14877. nextPos: pos,
  14878. result: result0
  14879. };
  14880. return result0;
  14881. }
  14882. function parse_temps() {
  14883. var cacheKey = 'temps@' + pos;
  14884. var cachedResult = cache[cacheKey];
  14885. if (cachedResult) {
  14886. pos = cachedResult.nextPos;
  14887. return cachedResult.result;
  14888. }
  14889. var savedPos0 = pos;
  14890. var savedPos1 = pos;
  14891. if (input.substr(pos, 1) === "|") {
  14892. var result3 = "|";
  14893. pos += 1;
  14894. } else {
  14895. var result3 = null;
  14896. if (reportMatchFailures) {
  14897. matchFailed("\"|\"");
  14898. }
  14899. }
  14900. if (result3 !== null) {
  14901. var result4 = [];
  14902. var savedPos2 = pos;
  14903. var savedPos3 = pos;
  14904. var result9 = parse_ws();
  14905. if (result9 !== null) {
  14906. var result10 = parse_identifier();
  14907. if (result10 !== null) {
  14908. var result11 = parse_ws();
  14909. if (result11 !== null) {
  14910. var result7 = [result9, result10, result11];
  14911. } else {
  14912. var result7 = null;
  14913. pos = savedPos3;
  14914. }
  14915. } else {
  14916. var result7 = null;
  14917. pos = savedPos3;
  14918. }
  14919. } else {
  14920. var result7 = null;
  14921. pos = savedPos3;
  14922. }
  14923. var result8 = result7 !== null
  14924. ? (function(variable) {return variable})(result7[1])
  14925. : null;
  14926. if (result8 !== null) {
  14927. var result6 = result8;
  14928. } else {
  14929. var result6 = null;
  14930. pos = savedPos2;
  14931. }
  14932. while (result6 !== null) {
  14933. result4.push(result6);
  14934. var savedPos2 = pos;
  14935. var savedPos3 = pos;
  14936. var result9 = parse_ws();
  14937. if (result9 !== null) {
  14938. var result10 = parse_identifier();
  14939. if (result10 !== null) {
  14940. var result11 = parse_ws();
  14941. if (result11 !== null) {
  14942. var result7 = [result9, result10, result11];
  14943. } else {
  14944. var result7 = null;
  14945. pos = savedPos3;
  14946. }
  14947. } else {
  14948. var result7 = null;
  14949. pos = savedPos3;
  14950. }
  14951. } else {
  14952. var result7 = null;
  14953. pos = savedPos3;
  14954. }
  14955. var result8 = result7 !== null
  14956. ? (function(variable) {return variable})(result7[1])
  14957. : null;
  14958. if (result8 !== null) {
  14959. var result6 = result8;
  14960. } else {
  14961. var result6 = null;
  14962. pos = savedPos2;
  14963. }
  14964. }
  14965. if (result4 !== null) {
  14966. if (input.substr(pos, 1) === "|") {
  14967. var result5 = "|";
  14968. pos += 1;
  14969. } else {
  14970. var result5 = null;
  14971. if (reportMatchFailures) {
  14972. matchFailed("\"|\"");
  14973. }
  14974. }
  14975. if (result5 !== null) {
  14976. var result1 = [result3, result4, result5];
  14977. } else {
  14978. var result1 = null;
  14979. pos = savedPos1;
  14980. }
  14981. } else {
  14982. var result1 = null;
  14983. pos = savedPos1;
  14984. }
  14985. } else {
  14986. var result1 = null;
  14987. pos = savedPos1;
  14988. }
  14989. var result2 = result1 !== null
  14990. ? (function(vars) {return vars})(result1[1])
  14991. : null;
  14992. if (result2 !== null) {
  14993. var result0 = result2;
  14994. } else {
  14995. var result0 = null;
  14996. pos = savedPos0;
  14997. }
  14998. cache[cacheKey] = {
  14999. nextPos: pos,
  15000. result: result0
  15001. };
  15002. return result0;
  15003. }
  15004. function parse_blockParamList() {
  15005. var cacheKey = 'blockParamList@' + pos;
  15006. var cachedResult = cache[cacheKey];
  15007. if (cachedResult) {
  15008. pos = cachedResult.nextPos;
  15009. return cachedResult.result;
  15010. }
  15011. var savedPos0 = pos;
  15012. var savedPos1 = pos;
  15013. var savedPos2 = pos;
  15014. var savedPos3 = pos;
  15015. var result9 = parse_ws();
  15016. if (result9 !== null) {
  15017. if (input.substr(pos, 1) === ":") {
  15018. var result10 = ":";
  15019. pos += 1;
  15020. } else {
  15021. var result10 = null;
  15022. if (reportMatchFailures) {
  15023. matchFailed("\":\"");
  15024. }
  15025. }
  15026. if (result10 !== null) {
  15027. var result11 = parse_ws();
  15028. if (result11 !== null) {
  15029. var result12 = parse_identifier();
  15030. if (result12 !== null) {
  15031. var result7 = [result9, result10, result11, result12];
  15032. } else {
  15033. var result7 = null;
  15034. pos = savedPos3;
  15035. }
  15036. } else {
  15037. var result7 = null;
  15038. pos = savedPos3;
  15039. }
  15040. } else {
  15041. var result7 = null;
  15042. pos = savedPos3;
  15043. }
  15044. } else {
  15045. var result7 = null;
  15046. pos = savedPos3;
  15047. }
  15048. var result8 = result7 !== null
  15049. ? (function(param) {return param})(result7[3])
  15050. : null;
  15051. if (result8 !== null) {
  15052. var result6 = result8;
  15053. } else {
  15054. var result6 = null;
  15055. pos = savedPos2;
  15056. }
  15057. if (result6 !== null) {
  15058. var result3 = [];
  15059. while (result6 !== null) {
  15060. result3.push(result6);
  15061. var savedPos2 = pos;
  15062. var savedPos3 = pos;
  15063. var result9 = parse_ws();
  15064. if (result9 !== null) {
  15065. if (input.substr(pos, 1) === ":") {
  15066. var result10 = ":";
  15067. pos += 1;
  15068. } else {
  15069. var result10 = null;
  15070. if (reportMatchFailures) {
  15071. matchFailed("\":\"");
  15072. }
  15073. }
  15074. if (result10 !== null) {
  15075. var result11 = parse_ws();
  15076. if (result11 !== null) {
  15077. var result12 = parse_identifier();
  15078. if (result12 !== null) {
  15079. var result7 = [result9, result10, result11, result12];
  15080. } else {
  15081. var result7 = null;
  15082. pos = savedPos3;
  15083. }
  15084. } else {
  15085. var result7 = null;
  15086. pos = savedPos3;
  15087. }
  15088. } else {
  15089. var result7 = null;
  15090. pos = savedPos3;
  15091. }
  15092. } else {
  15093. var result7 = null;
  15094. pos = savedPos3;
  15095. }
  15096. var result8 = result7 !== null
  15097. ? (function(param) {return param})(result7[3])
  15098. : null;
  15099. if (result8 !== null) {
  15100. var result6 = result8;
  15101. } else {
  15102. var result6 = null;
  15103. pos = savedPos2;
  15104. }
  15105. }
  15106. } else {
  15107. var result3 = null;
  15108. }
  15109. if (result3 !== null) {
  15110. var result4 = parse_ws();
  15111. if (result4 !== null) {
  15112. if (input.substr(pos, 1) === "|") {
  15113. var result5 = "|";
  15114. pos += 1;
  15115. } else {
  15116. var result5 = null;
  15117. if (reportMatchFailures) {
  15118. matchFailed("\"|\"");
  15119. }
  15120. }
  15121. if (result5 !== null) {
  15122. var result1 = [result3, result4, result5];
  15123. } else {
  15124. var result1 = null;
  15125. pos = savedPos1;
  15126. }
  15127. } else {
  15128. var result1 = null;
  15129. pos = savedPos1;
  15130. }
  15131. } else {
  15132. var result1 = null;
  15133. pos = savedPos1;
  15134. }
  15135. var result2 = result1 !== null
  15136. ? (function(params) {return params})(result1[0])
  15137. : null;
  15138. if (result2 !== null) {
  15139. var result0 = result2;
  15140. } else {
  15141. var result0 = null;
  15142. pos = savedPos0;
  15143. }
  15144. cache[cacheKey] = {
  15145. nextPos: pos,
  15146. result: result0
  15147. };
  15148. return result0;
  15149. }
  15150. function parse_subexpression() {
  15151. var cacheKey = 'subexpression@' + pos;
  15152. var cachedResult = cache[cacheKey];
  15153. if (cachedResult) {
  15154. pos = cachedResult.nextPos;
  15155. return cachedResult.result;
  15156. }
  15157. var savedPos0 = pos;
  15158. var savedPos1 = pos;
  15159. if (input.substr(pos, 1) === "(") {
  15160. var result3 = "(";
  15161. pos += 1;
  15162. } else {
  15163. var result3 = null;
  15164. if (reportMatchFailures) {
  15165. matchFailed("\"(\"");
  15166. }
  15167. }
  15168. if (result3 !== null) {
  15169. var result4 = parse_ws();
  15170. if (result4 !== null) {
  15171. var result5 = parse_expression();
  15172. if (result5 !== null) {
  15173. var result6 = parse_ws();
  15174. if (result6 !== null) {
  15175. if (input.substr(pos, 1) === ")") {
  15176. var result7 = ")";
  15177. pos += 1;
  15178. } else {
  15179. var result7 = null;
  15180. if (reportMatchFailures) {
  15181. matchFailed("\")\"");
  15182. }
  15183. }
  15184. if (result7 !== null) {
  15185. var result1 = [result3, result4, result5, result6, result7];
  15186. } else {
  15187. var result1 = null;
  15188. pos = savedPos1;
  15189. }
  15190. } else {
  15191. var result1 = null;
  15192. pos = savedPos1;
  15193. }
  15194. } else {
  15195. var result1 = null;
  15196. pos = savedPos1;
  15197. }
  15198. } else {
  15199. var result1 = null;
  15200. pos = savedPos1;
  15201. }
  15202. } else {
  15203. var result1 = null;
  15204. pos = savedPos1;
  15205. }
  15206. var result2 = result1 !== null
  15207. ? (function(expression) {return expression})(result1[2])
  15208. : null;
  15209. if (result2 !== null) {
  15210. var result0 = result2;
  15211. } else {
  15212. var result0 = null;
  15213. pos = savedPos0;
  15214. }
  15215. cache[cacheKey] = {
  15216. nextPos: pos,
  15217. result: result0
  15218. };
  15219. return result0;
  15220. }
  15221. function parse_statements() {
  15222. var cacheKey = 'statements@' + pos;
  15223. var cachedResult = cache[cacheKey];
  15224. if (cachedResult) {
  15225. pos = cachedResult.nextPos;
  15226. return cachedResult.result;
  15227. }
  15228. var savedPos4 = pos;
  15229. var savedPos5 = pos;
  15230. var result22 = parse_ret();
  15231. if (result22 !== null) {
  15232. var result23 = [];
  15233. if (input.substr(pos).match(/^[.]/) !== null) {
  15234. var result24 = input.charAt(pos);
  15235. pos++;
  15236. } else {
  15237. var result24 = null;
  15238. if (reportMatchFailures) {
  15239. matchFailed("[.]");
  15240. }
  15241. }
  15242. while (result24 !== null) {
  15243. result23.push(result24);
  15244. if (input.substr(pos).match(/^[.]/) !== null) {
  15245. var result24 = input.charAt(pos);
  15246. pos++;
  15247. } else {
  15248. var result24 = null;
  15249. if (reportMatchFailures) {
  15250. matchFailed("[.]");
  15251. }
  15252. }
  15253. }
  15254. if (result23 !== null) {
  15255. var result20 = [result22, result23];
  15256. } else {
  15257. var result20 = null;
  15258. pos = savedPos5;
  15259. }
  15260. } else {
  15261. var result20 = null;
  15262. pos = savedPos5;
  15263. }
  15264. var result21 = result20 !== null
  15265. ? (function(ret) {return [ret]})(result20[0])
  15266. : null;
  15267. if (result21 !== null) {
  15268. var result19 = result21;
  15269. } else {
  15270. var result19 = null;
  15271. pos = savedPos4;
  15272. }
  15273. if (result19 !== null) {
  15274. var result0 = result19;
  15275. } else {
  15276. var savedPos2 = pos;
  15277. var savedPos3 = pos;
  15278. var result11 = parse_expressions();
  15279. if (result11 !== null) {
  15280. var result12 = parse_ws();
  15281. if (result12 !== null) {
  15282. if (input.substr(pos).match(/^[.]/) !== null) {
  15283. var result18 = input.charAt(pos);
  15284. pos++;
  15285. } else {
  15286. var result18 = null;
  15287. if (reportMatchFailures) {
  15288. matchFailed("[.]");
  15289. }
  15290. }
  15291. if (result18 !== null) {
  15292. var result13 = [];
  15293. while (result18 !== null) {
  15294. result13.push(result18);
  15295. if (input.substr(pos).match(/^[.]/) !== null) {
  15296. var result18 = input.charAt(pos);
  15297. pos++;
  15298. } else {
  15299. var result18 = null;
  15300. if (reportMatchFailures) {
  15301. matchFailed("[.]");
  15302. }
  15303. }
  15304. }
  15305. } else {
  15306. var result13 = null;
  15307. }
  15308. if (result13 !== null) {
  15309. var result14 = parse_ws();
  15310. if (result14 !== null) {
  15311. var result15 = parse_ret();
  15312. if (result15 !== null) {
  15313. var result16 = [];
  15314. if (input.substr(pos).match(/^[.]/) !== null) {
  15315. var result17 = input.charAt(pos);
  15316. pos++;
  15317. } else {
  15318. var result17 = null;
  15319. if (reportMatchFailures) {
  15320. matchFailed("[.]");
  15321. }
  15322. }
  15323. while (result17 !== null) {
  15324. result16.push(result17);
  15325. if (input.substr(pos).match(/^[.]/) !== null) {
  15326. var result17 = input.charAt(pos);
  15327. pos++;
  15328. } else {
  15329. var result17 = null;
  15330. if (reportMatchFailures) {
  15331. matchFailed("[.]");
  15332. }
  15333. }
  15334. }
  15335. if (result16 !== null) {
  15336. var result9 = [result11, result12, result13, result14, result15, result16];
  15337. } else {
  15338. var result9 = null;
  15339. pos = savedPos3;
  15340. }
  15341. } else {
  15342. var result9 = null;
  15343. pos = savedPos3;
  15344. }
  15345. } else {
  15346. var result9 = null;
  15347. pos = savedPos3;
  15348. }
  15349. } else {
  15350. var result9 = null;
  15351. pos = savedPos3;
  15352. }
  15353. } else {
  15354. var result9 = null;
  15355. pos = savedPos3;
  15356. }
  15357. } else {
  15358. var result9 = null;
  15359. pos = savedPos3;
  15360. }
  15361. var result10 = result9 !== null
  15362. ? (function(exps, ret) {
  15363. var expressions = exps;
  15364. expressions.push(ret);
  15365. return expressions
  15366. })(result9[0], result9[4])
  15367. : null;
  15368. if (result10 !== null) {
  15369. var result8 = result10;
  15370. } else {
  15371. var result8 = null;
  15372. pos = savedPos2;
  15373. }
  15374. if (result8 !== null) {
  15375. var result0 = result8;
  15376. } else {
  15377. var savedPos0 = pos;
  15378. var savedPos1 = pos;
  15379. var result7 = parse_expressions();
  15380. var result4 = result7 !== null ? result7 : '';
  15381. if (result4 !== null) {
  15382. var result5 = [];
  15383. if (input.substr(pos).match(/^[.]/) !== null) {
  15384. var result6 = input.charAt(pos);
  15385. pos++;
  15386. } else {
  15387. var result6 = null;
  15388. if (reportMatchFailures) {
  15389. matchFailed("[.]");
  15390. }
  15391. }
  15392. while (result6 !== null) {
  15393. result5.push(result6);
  15394. if (input.substr(pos).match(/^[.]/) !== null) {
  15395. var result6 = input.charAt(pos);
  15396. pos++;
  15397. } else {
  15398. var result6 = null;
  15399. if (reportMatchFailures) {
  15400. matchFailed("[.]");
  15401. }
  15402. }
  15403. }
  15404. if (result5 !== null) {
  15405. var result2 = [result4, result5];
  15406. } else {
  15407. var result2 = null;
  15408. pos = savedPos1;
  15409. }
  15410. } else {
  15411. var result2 = null;
  15412. pos = savedPos1;
  15413. }
  15414. var result3 = result2 !== null
  15415. ? (function(expressions) {
  15416. return expressions || []
  15417. })(result2[0])
  15418. : null;
  15419. if (result3 !== null) {
  15420. var result1 = result3;
  15421. } else {
  15422. var result1 = null;
  15423. pos = savedPos0;
  15424. }
  15425. if (result1 !== null) {
  15426. var result0 = result1;
  15427. } else {
  15428. var result0 = null;;
  15429. };
  15430. };
  15431. }
  15432. cache[cacheKey] = {
  15433. nextPos: pos,
  15434. result: result0
  15435. };
  15436. return result0;
  15437. }
  15438. function parse_sequence() {
  15439. var cacheKey = 'sequence@' + pos;
  15440. var cachedResult = cache[cacheKey];
  15441. if (cachedResult) {
  15442. pos = cachedResult.nextPos;
  15443. return cachedResult.result;
  15444. }
  15445. var savedPos0 = pos;
  15446. var savedPos1 = pos;
  15447. var result8 = parse_temps();
  15448. var result3 = result8 !== null ? result8 : '';
  15449. if (result3 !== null) {
  15450. var result4 = parse_ws();
  15451. if (result4 !== null) {
  15452. var result7 = parse_statements();
  15453. var result5 = result7 !== null ? result7 : '';
  15454. if (result5 !== null) {
  15455. var result6 = parse_ws();
  15456. if (result6 !== null) {
  15457. var result1 = [result3, result4, result5, result6];
  15458. } else {
  15459. var result1 = null;
  15460. pos = savedPos1;
  15461. }
  15462. } else {
  15463. var result1 = null;
  15464. pos = savedPos1;
  15465. }
  15466. } else {
  15467. var result1 = null;
  15468. pos = savedPos1;
  15469. }
  15470. } else {
  15471. var result1 = null;
  15472. pos = savedPos1;
  15473. }
  15474. var result2 = result1 !== null
  15475. ? (function(temps, statements) {
  15476. return smalltalk.SequenceNode._new()
  15477. ._temps_(temps || [])
  15478. ._nodes_(statements || [])
  15479. })(result1[0], result1[2])
  15480. : null;
  15481. if (result2 !== null) {
  15482. var result0 = result2;
  15483. } else {
  15484. var result0 = null;
  15485. pos = savedPos0;
  15486. }
  15487. cache[cacheKey] = {
  15488. nextPos: pos,
  15489. result: result0
  15490. };
  15491. return result0;
  15492. }
  15493. function parse_block() {
  15494. var cacheKey = 'block@' + pos;
  15495. var cachedResult = cache[cacheKey];
  15496. if (cachedResult) {
  15497. pos = cachedResult.nextPos;
  15498. return cachedResult.result;
  15499. }
  15500. var savedPos0 = pos;
  15501. var savedPos1 = pos;
  15502. if (input.substr(pos, 1) === "[") {
  15503. var result3 = "[";
  15504. pos += 1;
  15505. } else {
  15506. var result3 = null;
  15507. if (reportMatchFailures) {
  15508. matchFailed("\"[\"");
  15509. }
  15510. }
  15511. if (result3 !== null) {
  15512. var result4 = parse_ws();
  15513. if (result4 !== null) {
  15514. var result11 = parse_blockParamList();
  15515. var result5 = result11 !== null ? result11 : '';
  15516. if (result5 !== null) {
  15517. var result6 = parse_ws();
  15518. if (result6 !== null) {
  15519. var result10 = parse_sequence();
  15520. var result7 = result10 !== null ? result10 : '';
  15521. if (result7 !== null) {
  15522. var result8 = parse_ws();
  15523. if (result8 !== null) {
  15524. if (input.substr(pos, 1) === "]") {
  15525. var result9 = "]";
  15526. pos += 1;
  15527. } else {
  15528. var result9 = null;
  15529. if (reportMatchFailures) {
  15530. matchFailed("\"]\"");
  15531. }
  15532. }
  15533. if (result9 !== null) {
  15534. var result1 = [result3, result4, result5, result6, result7, result8, result9];
  15535. } else {
  15536. var result1 = null;
  15537. pos = savedPos1;
  15538. }
  15539. } else {
  15540. var result1 = null;
  15541. pos = savedPos1;
  15542. }
  15543. } else {
  15544. var result1 = null;
  15545. pos = savedPos1;
  15546. }
  15547. } else {
  15548. var result1 = null;
  15549. pos = savedPos1;
  15550. }
  15551. } else {
  15552. var result1 = null;
  15553. pos = savedPos1;
  15554. }
  15555. } else {
  15556. var result1 = null;
  15557. pos = savedPos1;
  15558. }
  15559. } else {
  15560. var result1 = null;
  15561. pos = savedPos1;
  15562. }
  15563. var result2 = result1 !== null
  15564. ? (function(params, sequence) {
  15565. return smalltalk.BlockNode._new()
  15566. ._parameters_(params || [])
  15567. ._nodes_([sequence._asBlockSequenceNode()])
  15568. })(result1[2], result1[4])
  15569. : null;
  15570. if (result2 !== null) {
  15571. var result0 = result2;
  15572. } else {
  15573. var result0 = null;
  15574. pos = savedPos0;
  15575. }
  15576. cache[cacheKey] = {
  15577. nextPos: pos,
  15578. result: result0
  15579. };
  15580. return result0;
  15581. }
  15582. function parse_operand() {
  15583. var cacheKey = 'operand@' + pos;
  15584. var cachedResult = cache[cacheKey];
  15585. if (cachedResult) {
  15586. pos = cachedResult.nextPos;
  15587. return cachedResult.result;
  15588. }
  15589. var result3 = parse_literal();
  15590. if (result3 !== null) {
  15591. var result0 = result3;
  15592. } else {
  15593. var result2 = parse_reference();
  15594. if (result2 !== null) {
  15595. var result0 = result2;
  15596. } else {
  15597. var result1 = parse_subexpression();
  15598. if (result1 !== null) {
  15599. var result0 = result1;
  15600. } else {
  15601. var result0 = null;;
  15602. };
  15603. };
  15604. }
  15605. cache[cacheKey] = {
  15606. nextPos: pos,
  15607. result: result0
  15608. };
  15609. return result0;
  15610. }
  15611. function parse_unaryMessage() {
  15612. var cacheKey = 'unaryMessage@' + pos;
  15613. var cachedResult = cache[cacheKey];
  15614. if (cachedResult) {
  15615. pos = cachedResult.nextPos;
  15616. return cachedResult.result;
  15617. }
  15618. var savedPos0 = pos;
  15619. var savedPos1 = pos;
  15620. var result3 = parse_ws();
  15621. if (result3 !== null) {
  15622. var result4 = parse_identifier();
  15623. if (result4 !== null) {
  15624. var savedPos2 = pos;
  15625. var savedReportMatchFailuresVar0 = reportMatchFailures;
  15626. reportMatchFailures = false;
  15627. if (input.substr(pos).match(/^[:]/) !== null) {
  15628. var result6 = input.charAt(pos);
  15629. pos++;
  15630. } else {
  15631. var result6 = null;
  15632. if (reportMatchFailures) {
  15633. matchFailed("[:]");
  15634. }
  15635. }
  15636. reportMatchFailures = savedReportMatchFailuresVar0;
  15637. if (result6 === null) {
  15638. var result5 = '';
  15639. } else {
  15640. var result5 = null;
  15641. pos = savedPos2;
  15642. }
  15643. if (result5 !== null) {
  15644. var result1 = [result3, result4, result5];
  15645. } else {
  15646. var result1 = null;
  15647. pos = savedPos1;
  15648. }
  15649. } else {
  15650. var result1 = null;
  15651. pos = savedPos1;
  15652. }
  15653. } else {
  15654. var result1 = null;
  15655. pos = savedPos1;
  15656. }
  15657. var result2 = result1 !== null
  15658. ? (function(selector) {
  15659. return smalltalk.SendNode._new()
  15660. ._selector_(selector)
  15661. })(result1[1])
  15662. : null;
  15663. if (result2 !== null) {
  15664. var result0 = result2;
  15665. } else {
  15666. var result0 = null;
  15667. pos = savedPos0;
  15668. }
  15669. cache[cacheKey] = {
  15670. nextPos: pos,
  15671. result: result0
  15672. };
  15673. return result0;
  15674. }
  15675. function parse_unaryTail() {
  15676. var cacheKey = 'unaryTail@' + pos;
  15677. var cachedResult = cache[cacheKey];
  15678. if (cachedResult) {
  15679. pos = cachedResult.nextPos;
  15680. return cachedResult.result;
  15681. }
  15682. var savedPos0 = pos;
  15683. var savedPos1 = pos;
  15684. var result3 = parse_unaryMessage();
  15685. if (result3 !== null) {
  15686. var result4 = parse_ws();
  15687. if (result4 !== null) {
  15688. var result7 = parse_unaryTail();
  15689. var result5 = result7 !== null ? result7 : '';
  15690. if (result5 !== null) {
  15691. var result6 = parse_ws();
  15692. if (result6 !== null) {
  15693. var result1 = [result3, result4, result5, result6];
  15694. } else {
  15695. var result1 = null;
  15696. pos = savedPos1;
  15697. }
  15698. } else {
  15699. var result1 = null;
  15700. pos = savedPos1;
  15701. }
  15702. } else {
  15703. var result1 = null;
  15704. pos = savedPos1;
  15705. }
  15706. } else {
  15707. var result1 = null;
  15708. pos = savedPos1;
  15709. }
  15710. var result2 = result1 !== null
  15711. ? (function(message, tail) {
  15712. if(tail) {
  15713. return tail._valueForReceiver_(message);
  15714. }
  15715. else {
  15716. return message;
  15717. }
  15718. })(result1[0], result1[2])
  15719. : null;
  15720. if (result2 !== null) {
  15721. var result0 = result2;
  15722. } else {
  15723. var result0 = null;
  15724. pos = savedPos0;
  15725. }
  15726. cache[cacheKey] = {
  15727. nextPos: pos,
  15728. result: result0
  15729. };
  15730. return result0;
  15731. }
  15732. function parse_unarySend() {
  15733. var cacheKey = 'unarySend@' + pos;
  15734. var cachedResult = cache[cacheKey];
  15735. if (cachedResult) {
  15736. pos = cachedResult.nextPos;
  15737. return cachedResult.result;
  15738. }
  15739. var savedPos0 = pos;
  15740. var savedPos1 = pos;
  15741. var result3 = parse_operand();
  15742. if (result3 !== null) {
  15743. var result4 = parse_ws();
  15744. if (result4 !== null) {
  15745. var result6 = parse_unaryTail();
  15746. var result5 = result6 !== null ? result6 : '';
  15747. if (result5 !== null) {
  15748. var result1 = [result3, result4, result5];
  15749. } else {
  15750. var result1 = null;
  15751. pos = savedPos1;
  15752. }
  15753. } else {
  15754. var result1 = null;
  15755. pos = savedPos1;
  15756. }
  15757. } else {
  15758. var result1 = null;
  15759. pos = savedPos1;
  15760. }
  15761. var result2 = result1 !== null
  15762. ? (function(receiver, tail) {
  15763. if(tail) {
  15764. return tail._valueForReceiver_(receiver);
  15765. }
  15766. else {
  15767. return receiver;
  15768. }
  15769. })(result1[0], result1[2])
  15770. : null;
  15771. if (result2 !== null) {
  15772. var result0 = result2;
  15773. } else {
  15774. var result0 = null;
  15775. pos = savedPos0;
  15776. }
  15777. cache[cacheKey] = {
  15778. nextPos: pos,
  15779. result: result0
  15780. };
  15781. return result0;
  15782. }
  15783. function parse_binaryMessage() {
  15784. var cacheKey = 'binaryMessage@' + pos;
  15785. var cachedResult = cache[cacheKey];
  15786. if (cachedResult) {
  15787. pos = cachedResult.nextPos;
  15788. return cachedResult.result;
  15789. }
  15790. var savedPos0 = pos;
  15791. var savedPos1 = pos;
  15792. var result3 = parse_ws();
  15793. if (result3 !== null) {
  15794. var result4 = parse_binarySelector();
  15795. if (result4 !== null) {
  15796. var result5 = parse_ws();
  15797. if (result5 !== null) {
  15798. var result8 = parse_unarySend();
  15799. if (result8 !== null) {
  15800. var result6 = result8;
  15801. } else {
  15802. var result7 = parse_operand();
  15803. if (result7 !== null) {
  15804. var result6 = result7;
  15805. } else {
  15806. var result6 = null;;
  15807. };
  15808. }
  15809. if (result6 !== null) {
  15810. var result1 = [result3, result4, result5, result6];
  15811. } else {
  15812. var result1 = null;
  15813. pos = savedPos1;
  15814. }
  15815. } else {
  15816. var result1 = null;
  15817. pos = savedPos1;
  15818. }
  15819. } else {
  15820. var result1 = null;
  15821. pos = savedPos1;
  15822. }
  15823. } else {
  15824. var result1 = null;
  15825. pos = savedPos1;
  15826. }
  15827. var result2 = result1 !== null
  15828. ? (function(selector, arg) {
  15829. return smalltalk.SendNode._new()
  15830. ._selector_(selector)
  15831. ._arguments_([arg])
  15832. })(result1[1], result1[3])
  15833. : null;
  15834. if (result2 !== null) {
  15835. var result0 = result2;
  15836. } else {
  15837. var result0 = null;
  15838. pos = savedPos0;
  15839. }
  15840. cache[cacheKey] = {
  15841. nextPos: pos,
  15842. result: result0
  15843. };
  15844. return result0;
  15845. }
  15846. function parse_binaryTail() {
  15847. var cacheKey = 'binaryTail@' + pos;
  15848. var cachedResult = cache[cacheKey];
  15849. if (cachedResult) {
  15850. pos = cachedResult.nextPos;
  15851. return cachedResult.result;
  15852. }
  15853. var savedPos0 = pos;
  15854. var savedPos1 = pos;
  15855. var result3 = parse_binaryMessage();
  15856. if (result3 !== null) {
  15857. var result5 = parse_binaryTail();
  15858. var result4 = result5 !== null ? result5 : '';
  15859. if (result4 !== null) {
  15860. var result1 = [result3, result4];
  15861. } else {
  15862. var result1 = null;
  15863. pos = savedPos1;
  15864. }
  15865. } else {
  15866. var result1 = null;
  15867. pos = savedPos1;
  15868. }
  15869. var result2 = result1 !== null
  15870. ? (function(message, tail) {
  15871. if(tail) {
  15872. return tail._valueForReceiver_(message);
  15873. }
  15874. else {
  15875. return message;
  15876. }
  15877. })(result1[0], result1[1])
  15878. : null;
  15879. if (result2 !== null) {
  15880. var result0 = result2;
  15881. } else {
  15882. var result0 = null;
  15883. pos = savedPos0;
  15884. }
  15885. cache[cacheKey] = {
  15886. nextPos: pos,
  15887. result: result0
  15888. };
  15889. return result0;
  15890. }
  15891. function parse_binarySend() {
  15892. var cacheKey = 'binarySend@' + pos;
  15893. var cachedResult = cache[cacheKey];
  15894. if (cachedResult) {
  15895. pos = cachedResult.nextPos;
  15896. return cachedResult.result;
  15897. }
  15898. var savedPos0 = pos;
  15899. var savedPos1 = pos;
  15900. var result3 = parse_unarySend();
  15901. if (result3 !== null) {
  15902. var result5 = parse_binaryTail();
  15903. var result4 = result5 !== null ? result5 : '';
  15904. if (result4 !== null) {
  15905. var result1 = [result3, result4];
  15906. } else {
  15907. var result1 = null;
  15908. pos = savedPos1;
  15909. }
  15910. } else {
  15911. var result1 = null;
  15912. pos = savedPos1;
  15913. }
  15914. var result2 = result1 !== null
  15915. ? (function(receiver, tail) {
  15916. if(tail) {
  15917. return tail._valueForReceiver_(receiver);
  15918. }
  15919. else {
  15920. return receiver;
  15921. }
  15922. })(result1[0], result1[1])
  15923. : null;
  15924. if (result2 !== null) {
  15925. var result0 = result2;
  15926. } else {
  15927. var result0 = null;
  15928. pos = savedPos0;
  15929. }
  15930. cache[cacheKey] = {
  15931. nextPos: pos,
  15932. result: result0
  15933. };
  15934. return result0;
  15935. }
  15936. function parse_keywordMessage() {
  15937. var cacheKey = 'keywordMessage@' + pos;
  15938. var cachedResult = cache[cacheKey];
  15939. if (cachedResult) {
  15940. pos = cachedResult.nextPos;
  15941. return cachedResult.result;
  15942. }
  15943. var savedPos0 = pos;
  15944. var savedPos1 = pos;
  15945. var result3 = parse_ws();
  15946. if (result3 !== null) {
  15947. var savedPos2 = pos;
  15948. var savedPos3 = pos;
  15949. var result8 = parse_keywordPair();
  15950. if (result8 !== null) {
  15951. var result9 = parse_ws();
  15952. if (result9 !== null) {
  15953. var result6 = [result8, result9];
  15954. } else {
  15955. var result6 = null;
  15956. pos = savedPos3;
  15957. }
  15958. } else {
  15959. var result6 = null;
  15960. pos = savedPos3;
  15961. }
  15962. var result7 = result6 !== null
  15963. ? (function(pair) {return pair})(result6[0])
  15964. : null;
  15965. if (result7 !== null) {
  15966. var result5 = result7;
  15967. } else {
  15968. var result5 = null;
  15969. pos = savedPos2;
  15970. }
  15971. if (result5 !== null) {
  15972. var result4 = [];
  15973. while (result5 !== null) {
  15974. result4.push(result5);
  15975. var savedPos2 = pos;
  15976. var savedPos3 = pos;
  15977. var result8 = parse_keywordPair();
  15978. if (result8 !== null) {
  15979. var result9 = parse_ws();
  15980. if (result9 !== null) {
  15981. var result6 = [result8, result9];
  15982. } else {
  15983. var result6 = null;
  15984. pos = savedPos3;
  15985. }
  15986. } else {
  15987. var result6 = null;
  15988. pos = savedPos3;
  15989. }
  15990. var result7 = result6 !== null
  15991. ? (function(pair) {return pair})(result6[0])
  15992. : null;
  15993. if (result7 !== null) {
  15994. var result5 = result7;
  15995. } else {
  15996. var result5 = null;
  15997. pos = savedPos2;
  15998. }
  15999. }
  16000. } else {
  16001. var result4 = null;
  16002. }
  16003. if (result4 !== null) {
  16004. var result1 = [result3, result4];
  16005. } else {
  16006. var result1 = null;
  16007. pos = savedPos1;
  16008. }
  16009. } else {
  16010. var result1 = null;
  16011. pos = savedPos1;
  16012. }
  16013. var result2 = result1 !== null
  16014. ? (function(pairs) {
  16015. var selector = [];
  16016. var args = [];
  16017. for(var i=0;i<pairs.length;i++) {
  16018. selector.push(pairs[i].key);
  16019. args.push(pairs[i].arg);
  16020. }
  16021. return smalltalk.SendNode._new()
  16022. ._selector_(selector.join(""))
  16023. ._arguments_(args)
  16024. })(result1[1])
  16025. : null;
  16026. if (result2 !== null) {
  16027. var result0 = result2;
  16028. } else {
  16029. var result0 = null;
  16030. pos = savedPos0;
  16031. }
  16032. cache[cacheKey] = {
  16033. nextPos: pos,
  16034. result: result0
  16035. };
  16036. return result0;
  16037. }
  16038. function parse_keywordSend() {
  16039. var cacheKey = 'keywordSend@' + pos;
  16040. var cachedResult = cache[cacheKey];
  16041. if (cachedResult) {
  16042. pos = cachedResult.nextPos;
  16043. return cachedResult.result;
  16044. }
  16045. var savedPos0 = pos;
  16046. var savedPos1 = pos;
  16047. var result3 = parse_binarySend();
  16048. if (result3 !== null) {
  16049. var result4 = parse_keywordMessage();
  16050. if (result4 !== null) {
  16051. var result1 = [result3, result4];
  16052. } else {
  16053. var result1 = null;
  16054. pos = savedPos1;
  16055. }
  16056. } else {
  16057. var result1 = null;
  16058. pos = savedPos1;
  16059. }
  16060. var result2 = result1 !== null
  16061. ? (function(receiver, tail) {
  16062. return tail._valueForReceiver_(receiver);
  16063. })(result1[0], result1[1])
  16064. : null;
  16065. if (result2 !== null) {
  16066. var result0 = result2;
  16067. } else {
  16068. var result0 = null;
  16069. pos = savedPos0;
  16070. }
  16071. cache[cacheKey] = {
  16072. nextPos: pos,
  16073. result: result0
  16074. };
  16075. return result0;
  16076. }
  16077. function parse_message() {
  16078. var cacheKey = 'message@' + pos;
  16079. var cachedResult = cache[cacheKey];
  16080. if (cachedResult) {
  16081. pos = cachedResult.nextPos;
  16082. return cachedResult.result;
  16083. }
  16084. var result3 = parse_binaryMessage();
  16085. if (result3 !== null) {
  16086. var result0 = result3;
  16087. } else {
  16088. var result2 = parse_unaryMessage();
  16089. if (result2 !== null) {
  16090. var result0 = result2;
  16091. } else {
  16092. var result1 = parse_keywordMessage();
  16093. if (result1 !== null) {
  16094. var result0 = result1;
  16095. } else {
  16096. var result0 = null;;
  16097. };
  16098. };
  16099. }
  16100. cache[cacheKey] = {
  16101. nextPos: pos,
  16102. result: result0
  16103. };
  16104. return result0;
  16105. }
  16106. function parse_cascade() {
  16107. var cacheKey = 'cascade@' + pos;
  16108. var cachedResult = cache[cacheKey];
  16109. if (cachedResult) {
  16110. pos = cachedResult.nextPos;
  16111. return cachedResult.result;
  16112. }
  16113. var savedPos0 = pos;
  16114. var savedPos1 = pos;
  16115. var result3 = parse_ws();
  16116. if (result3 !== null) {
  16117. var result15 = parse_keywordSend();
  16118. if (result15 !== null) {
  16119. var result4 = result15;
  16120. } else {
  16121. var result14 = parse_binarySend();
  16122. if (result14 !== null) {
  16123. var result4 = result14;
  16124. } else {
  16125. var result4 = null;;
  16126. };
  16127. }
  16128. if (result4 !== null) {
  16129. var savedPos2 = pos;
  16130. var savedPos3 = pos;
  16131. var result9 = parse_ws();
  16132. if (result9 !== null) {
  16133. if (input.substr(pos, 1) === ";") {
  16134. var result10 = ";";
  16135. pos += 1;
  16136. } else {
  16137. var result10 = null;
  16138. if (reportMatchFailures) {
  16139. matchFailed("\";\"");
  16140. }
  16141. }
  16142. if (result10 !== null) {
  16143. var result11 = parse_ws();
  16144. if (result11 !== null) {
  16145. var result12 = parse_message();
  16146. if (result12 !== null) {
  16147. var result13 = parse_ws();
  16148. if (result13 !== null) {
  16149. var result7 = [result9, result10, result11, result12, result13];
  16150. } else {
  16151. var result7 = null;
  16152. pos = savedPos3;
  16153. }
  16154. } else {
  16155. var result7 = null;
  16156. pos = savedPos3;
  16157. }
  16158. } else {
  16159. var result7 = null;
  16160. pos = savedPos3;
  16161. }
  16162. } else {
  16163. var result7 = null;
  16164. pos = savedPos3;
  16165. }
  16166. } else {
  16167. var result7 = null;
  16168. pos = savedPos3;
  16169. }
  16170. var result8 = result7 !== null
  16171. ? (function(mess) {return mess})(result7[3])
  16172. : null;
  16173. if (result8 !== null) {
  16174. var result6 = result8;
  16175. } else {
  16176. var result6 = null;
  16177. pos = savedPos2;
  16178. }
  16179. if (result6 !== null) {
  16180. var result5 = [];
  16181. while (result6 !== null) {
  16182. result5.push(result6);
  16183. var savedPos2 = pos;
  16184. var savedPos3 = pos;
  16185. var result9 = parse_ws();
  16186. if (result9 !== null) {
  16187. if (input.substr(pos, 1) === ";") {
  16188. var result10 = ";";
  16189. pos += 1;
  16190. } else {
  16191. var result10 = null;
  16192. if (reportMatchFailures) {
  16193. matchFailed("\";\"");
  16194. }
  16195. }
  16196. if (result10 !== null) {
  16197. var result11 = parse_ws();
  16198. if (result11 !== null) {
  16199. var result12 = parse_message();
  16200. if (result12 !== null) {
  16201. var result13 = parse_ws();
  16202. if (result13 !== null) {
  16203. var result7 = [result9, result10, result11, result12, result13];
  16204. } else {
  16205. var result7 = null;
  16206. pos = savedPos3;
  16207. }
  16208. } else {
  16209. var result7 = null;
  16210. pos = savedPos3;
  16211. }
  16212. } else {
  16213. var result7 = null;
  16214. pos = savedPos3;
  16215. }
  16216. } else {
  16217. var result7 = null;
  16218. pos = savedPos3;
  16219. }
  16220. } else {
  16221. var result7 = null;
  16222. pos = savedPos3;
  16223. }
  16224. var result8 = result7 !== null
  16225. ? (function(mess) {return mess})(result7[3])
  16226. : null;
  16227. if (result8 !== null) {
  16228. var result6 = result8;
  16229. } else {
  16230. var result6 = null;
  16231. pos = savedPos2;
  16232. }
  16233. }
  16234. } else {
  16235. var result5 = null;
  16236. }
  16237. if (result5 !== null) {
  16238. var result1 = [result3, result4, result5];
  16239. } else {
  16240. var result1 = null;
  16241. pos = savedPos1;
  16242. }
  16243. } else {
  16244. var result1 = null;
  16245. pos = savedPos1;
  16246. }
  16247. } else {
  16248. var result1 = null;
  16249. pos = savedPos1;
  16250. }
  16251. var result2 = result1 !== null
  16252. ? (function(send, messages) {
  16253. var cascade = [];
  16254. cascade.push(send);
  16255. for(var i=0;i<messages.length;i++) {
  16256. cascade.push(messages[i]);
  16257. }
  16258. return smalltalk.CascadeNode._new()
  16259. ._receiver_(send._receiver())
  16260. ._nodes_(cascade)
  16261. })(result1[1], result1[2])
  16262. : null;
  16263. if (result2 !== null) {
  16264. var result0 = result2;
  16265. } else {
  16266. var result0 = null;
  16267. pos = savedPos0;
  16268. }
  16269. cache[cacheKey] = {
  16270. nextPos: pos,
  16271. result: result0
  16272. };
  16273. return result0;
  16274. }
  16275. function parse_jsStatement() {
  16276. var cacheKey = 'jsStatement@' + pos;
  16277. var cachedResult = cache[cacheKey];
  16278. if (cachedResult) {
  16279. pos = cachedResult.nextPos;
  16280. return cachedResult.result;
  16281. }
  16282. var savedPos0 = pos;
  16283. var savedPos1 = pos;
  16284. if (input.substr(pos, 1) === "<") {
  16285. var result3 = "<";
  16286. pos += 1;
  16287. } else {
  16288. var result3 = null;
  16289. if (reportMatchFailures) {
  16290. matchFailed("\"<\"");
  16291. }
  16292. }
  16293. if (result3 !== null) {
  16294. var result4 = [];
  16295. var savedPos2 = pos;
  16296. if (input.substr(pos, 2) === ">>") {
  16297. var result9 = ">>";
  16298. pos += 2;
  16299. } else {
  16300. var result9 = null;
  16301. if (reportMatchFailures) {
  16302. matchFailed("\">>\"");
  16303. }
  16304. }
  16305. var result10 = result9 !== null
  16306. ? (function() {return ">"})()
  16307. : null;
  16308. if (result10 !== null) {
  16309. var result8 = result10;
  16310. } else {
  16311. var result8 = null;
  16312. pos = savedPos2;
  16313. }
  16314. if (result8 !== null) {
  16315. var result6 = result8;
  16316. } else {
  16317. if (input.substr(pos).match(/^[^>]/) !== null) {
  16318. var result7 = input.charAt(pos);
  16319. pos++;
  16320. } else {
  16321. var result7 = null;
  16322. if (reportMatchFailures) {
  16323. matchFailed("[^>]");
  16324. }
  16325. }
  16326. if (result7 !== null) {
  16327. var result6 = result7;
  16328. } else {
  16329. var result6 = null;;
  16330. };
  16331. }
  16332. while (result6 !== null) {
  16333. result4.push(result6);
  16334. var savedPos2 = pos;
  16335. if (input.substr(pos, 2) === ">>") {
  16336. var result9 = ">>";
  16337. pos += 2;
  16338. } else {
  16339. var result9 = null;
  16340. if (reportMatchFailures) {
  16341. matchFailed("\">>\"");
  16342. }
  16343. }
  16344. var result10 = result9 !== null
  16345. ? (function() {return ">"})()
  16346. : null;
  16347. if (result10 !== null) {
  16348. var result8 = result10;
  16349. } else {
  16350. var result8 = null;
  16351. pos = savedPos2;
  16352. }
  16353. if (result8 !== null) {
  16354. var result6 = result8;
  16355. } else {
  16356. if (input.substr(pos).match(/^[^>]/) !== null) {
  16357. var result7 = input.charAt(pos);
  16358. pos++;
  16359. } else {
  16360. var result7 = null;
  16361. if (reportMatchFailures) {
  16362. matchFailed("[^>]");
  16363. }
  16364. }
  16365. if (result7 !== null) {
  16366. var result6 = result7;
  16367. } else {
  16368. var result6 = null;;
  16369. };
  16370. }
  16371. }
  16372. if (result4 !== null) {
  16373. if (input.substr(pos, 1) === ">") {
  16374. var result5 = ">";
  16375. pos += 1;
  16376. } else {
  16377. var result5 = null;
  16378. if (reportMatchFailures) {
  16379. matchFailed("\">\"");
  16380. }
  16381. }
  16382. if (result5 !== null) {
  16383. var result1 = [result3, result4, result5];
  16384. } else {
  16385. var result1 = null;
  16386. pos = savedPos1;
  16387. }
  16388. } else {
  16389. var result1 = null;
  16390. pos = savedPos1;
  16391. }
  16392. } else {
  16393. var result1 = null;
  16394. pos = savedPos1;
  16395. }
  16396. var result2 = result1 !== null
  16397. ? (function(val) {
  16398. return smalltalk.JSStatementNode._new()
  16399. ._source_(val.join(""))
  16400. })(result1[1])
  16401. : null;
  16402. if (result2 !== null) {
  16403. var result0 = result2;
  16404. } else {
  16405. var result0 = null;
  16406. pos = savedPos0;
  16407. }
  16408. cache[cacheKey] = {
  16409. nextPos: pos,
  16410. result: result0
  16411. };
  16412. return result0;
  16413. }
  16414. function parse_method() {
  16415. var cacheKey = 'method@' + pos;
  16416. var cachedResult = cache[cacheKey];
  16417. if (cachedResult) {
  16418. pos = cachedResult.nextPos;
  16419. return cachedResult.result;
  16420. }
  16421. var savedPos0 = pos;
  16422. var savedPos1 = pos;
  16423. var result3 = parse_ws();
  16424. if (result3 !== null) {
  16425. var result11 = parse_keywordPattern();
  16426. if (result11 !== null) {
  16427. var result4 = result11;
  16428. } else {
  16429. var result10 = parse_binaryPattern();
  16430. if (result10 !== null) {
  16431. var result4 = result10;
  16432. } else {
  16433. var result9 = parse_unaryPattern();
  16434. if (result9 !== null) {
  16435. var result4 = result9;
  16436. } else {
  16437. var result4 = null;;
  16438. };
  16439. };
  16440. }
  16441. if (result4 !== null) {
  16442. var result5 = parse_ws();
  16443. if (result5 !== null) {
  16444. var result8 = parse_sequence();
  16445. var result6 = result8 !== null ? result8 : '';
  16446. if (result6 !== null) {
  16447. var result7 = parse_ws();
  16448. if (result7 !== null) {
  16449. var result1 = [result3, result4, result5, result6, result7];
  16450. } else {
  16451. var result1 = null;
  16452. pos = savedPos1;
  16453. }
  16454. } else {
  16455. var result1 = null;
  16456. pos = savedPos1;
  16457. }
  16458. } else {
  16459. var result1 = null;
  16460. pos = savedPos1;
  16461. }
  16462. } else {
  16463. var result1 = null;
  16464. pos = savedPos1;
  16465. }
  16466. } else {
  16467. var result1 = null;
  16468. pos = savedPos1;
  16469. }
  16470. var result2 = result1 !== null
  16471. ? (function(pattern, sequence) {
  16472. return smalltalk.MethodNode._new()
  16473. ._selector_(pattern[0])
  16474. ._arguments_(pattern[1])
  16475. ._nodes_([sequence])
  16476. })(result1[1], result1[3])
  16477. : null;
  16478. if (result2 !== null) {
  16479. var result0 = result2;
  16480. } else {
  16481. var result0 = null;
  16482. pos = savedPos0;
  16483. }
  16484. cache[cacheKey] = {
  16485. nextPos: pos,
  16486. result: result0
  16487. };
  16488. return result0;
  16489. }
  16490. function buildErrorMessage() {
  16491. function buildExpected(failuresExpected) {
  16492. failuresExpected.sort();
  16493. var lastFailure = null;
  16494. var failuresExpectedUnique = [];
  16495. for (var i = 0; i < failuresExpected.length; i++) {
  16496. if (failuresExpected[i] !== lastFailure) {
  16497. failuresExpectedUnique.push(failuresExpected[i]);
  16498. lastFailure = failuresExpected[i];
  16499. }
  16500. }
  16501. switch (failuresExpectedUnique.length) {
  16502. case 0:
  16503. return 'end of input';
  16504. case 1:
  16505. return failuresExpectedUnique[0];
  16506. default:
  16507. return failuresExpectedUnique.slice(0, failuresExpectedUnique.length - 1).join(', ')
  16508. + ' or '
  16509. + failuresExpectedUnique[failuresExpectedUnique.length - 1];
  16510. }
  16511. }
  16512. var expected = buildExpected(rightmostMatchFailuresExpected);
  16513. var actualPos = Math.max(pos, rightmostMatchFailuresPos);
  16514. var actual = actualPos < input.length
  16515. ? quote(input.charAt(actualPos))
  16516. : 'end of input';
  16517. return 'Expected ' + expected + ' but ' + actual + ' found.';
  16518. }
  16519. function computeErrorPosition() {
  16520. /*
  16521. * The first idea was to use |String.split| to break the input up to the
  16522. * error position along newlines and derive the line and column from
  16523. * there. However IE's |split| implementation is so broken that it was
  16524. * enough to prevent it.
  16525. */
  16526. var line = 1;
  16527. var column = 1;
  16528. var seenCR = false;
  16529. for (var i = 0; i < rightmostMatchFailuresPos; i++) {
  16530. var ch = input.charAt(i);
  16531. if (ch === '\n') {
  16532. if (!seenCR) { line++; }
  16533. column = 1;
  16534. seenCR = false;
  16535. } else if (ch === '\r' | ch === '\u2028' || ch === '\u2029') {
  16536. line++;
  16537. column = 1;
  16538. seenCR = true;
  16539. } else {
  16540. column++;
  16541. seenCR = false;
  16542. }
  16543. }
  16544. return { line: line, column: column };
  16545. }
  16546. var result = parseFunctions[startRule]();
  16547. /*
  16548. * The parser is now in one of the following three states:
  16549. *
  16550. * 1. The parser successfully parsed the whole input.
  16551. *
  16552. * - |result !== null|
  16553. * - |pos === input.length|
  16554. * - |rightmostMatchFailuresExpected| may or may not contain something
  16555. *
  16556. * 2. The parser successfully parsed only a part of the input.
  16557. *
  16558. * - |result !== null|
  16559. * - |pos < input.length|
  16560. * - |rightmostMatchFailuresExpected| may or may not contain something
  16561. *
  16562. * 3. The parser did not successfully parse any part of the input.
  16563. *
  16564. * - |result === null|
  16565. * - |pos === 0|
  16566. * - |rightmostMatchFailuresExpected| contains at least one failure
  16567. *
  16568. * All code following this comment (including called functions) must
  16569. * handle these states.
  16570. */
  16571. if (result === null || pos !== input.length) {
  16572. var errorPosition = computeErrorPosition();
  16573. throw new this.SyntaxError(
  16574. buildErrorMessage(),
  16575. errorPosition.line,
  16576. errorPosition.column
  16577. );
  16578. }
  16579. return result;
  16580. },
  16581. /* Returns the parser source code. */
  16582. toSource: function() { return this._source; }
  16583. };
  16584. /* Thrown when a parser encounters a syntax error. */
  16585. result.SyntaxError = function(message, line, column) {
  16586. this.name = 'SyntaxError';
  16587. this.message = message;
  16588. this.line = line;
  16589. this.column = column;
  16590. };
  16591. result.SyntaxError.prototype = Error.prototype;
  16592. return result;
  16593. })();
  16594. smalltalk.addPackage('REPL', {});
  16595. smalltalk.addClass('Repl', smalltalk.Object, ['readline', 'interface', 'util'], 'REPL');
  16596. smalltalk.addMethod(
  16597. unescape('_prompt'),
  16598. smalltalk.method({
  16599. selector: unescape('prompt'),
  16600. category: 'accessing',
  16601. fn: function (){
  16602. var self=this;
  16603. return unescape("amber%20%3E%3E%20");
  16604. return self;},
  16605. args: [],
  16606. source: unescape('prompt%0A%09%5E%27amber%20%3E%3E%20%27'),
  16607. messageSends: [],
  16608. referencedClasses: []
  16609. }),
  16610. smalltalk.Repl);
  16611. smalltalk.addMethod(
  16612. unescape('_createInterface'),
  16613. smalltalk.method({
  16614. selector: unescape('createInterface'),
  16615. category: 'actions',
  16616. fn: function (){
  16617. var self=this;
  16618. (self['@interface']=smalltalk.send(self['@readline'], "_createInterface_stdout_", [smalltalk.send((typeof process == 'undefined' ? nil : process), "_stdin", []), smalltalk.send((typeof process == 'undefined' ? nil : process), "_stdout", [])]));
  16619. smalltalk.send(self['@interface'], "_on_do_", ["line", (function(buffer){return smalltalk.send(self, "_eval_", [buffer]);})]);
  16620. smalltalk.send(self['@interface'], "_on_do_", ["close", (function(){return smalltalk.send(self, "_close", []);})]);
  16621. smalltalk.send(self, "_setPrompt", []);
  16622. smalltalk.send(self['@interface'], "_prompt", []);
  16623. return self;},
  16624. args: [],
  16625. source: unescape('createInterface%0A%09%22No%20completion%20for%20now%22%0A%09interface%20%3A%3D%20readline%20createInterface%3A%20process%20stdin%20stdout%3A%20process%20stdout.%0A%09interface%20on%3A%20%27line%27%20do%3A%20%5B%3Abuffer%20%20%7C%20self%20eval%3A%20buffer%5D.%0A%09interface%20on%3A%20%27close%27%20do%3A%20%5Bself%20close%5D.%0A%09self%20setPrompt.%0A%09interface%20prompt'),
  16626. messageSends: ["createInterface:stdout:", "stdin", "stdout", "on:do:", "eval:", "close", "setPrompt", "prompt"],
  16627. referencedClasses: []
  16628. }),
  16629. smalltalk.Repl);
  16630. smalltalk.addMethod(
  16631. unescape('_setPrompt'),
  16632. smalltalk.method({
  16633. selector: unescape('setPrompt'),
  16634. category: 'actions',
  16635. fn: function (){
  16636. var self=this;
  16637. smalltalk.send(self['@interface'], "_setPrompt_", [smalltalk.send(self, "_prompt", [])]);
  16638. return self;},
  16639. args: [],
  16640. source: unescape('setPrompt%0A%09interface%20setPrompt%3A%20self%20prompt'),
  16641. messageSends: ["setPrompt:", "prompt"],
  16642. referencedClasses: []
  16643. }),
  16644. smalltalk.Repl);
  16645. smalltalk.addMethod(
  16646. unescape('_close'),
  16647. smalltalk.method({
  16648. selector: unescape('close'),
  16649. category: 'actions',
  16650. fn: function (){
  16651. var self=this;
  16652. smalltalk.send(smalltalk.send((typeof process == 'undefined' ? nil : process), "_stdin", []), "_destroy", []);
  16653. return self;},
  16654. args: [],
  16655. source: unescape('close%0A%09process%20stdin%20destroy'),
  16656. messageSends: ["destroy", "stdin"],
  16657. referencedClasses: []
  16658. }),
  16659. smalltalk.Repl);
  16660. smalltalk.addMethod(
  16661. unescape('_eval_'),
  16662. smalltalk.method({
  16663. selector: unescape('eval%3A'),
  16664. category: 'actions',
  16665. fn: function (buffer){
  16666. var self=this;
  16667. var result=nil;
  16668. ((($receiver = smalltalk.send(buffer, "_isEmpty", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_try_catch_", [(function(){(result=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_loadExpression_", [buffer]));return smalltalk.send((smalltalk.Transcript || Transcript), "_show_", [result]);}), (function(e){return ((($receiver = smalltalk.send(e, "_isSmalltalkError", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(smalltalk.send((smalltalk.ErrorHandler || ErrorHandler), "_new", []), "_handleError_", [e]);})() : (function(){return smalltalk.send(smalltalk.send((typeof process == 'undefined' ? nil : process), "_stdout", []), "_write_", [smalltalk.send(e, "_jsStack", [])]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(smalltalk.send((smalltalk.ErrorHandler || ErrorHandler), "_new", []), "_handleError_", [e]);}), (function(){return smalltalk.send(smalltalk.send((typeof process == 'undefined' ? nil : process), "_stdout", []), "_write_", [smalltalk.send(e, "_jsStack", [])]);})]));})]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self, "_try_catch_", [(function(){(result=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_loadExpression_", [buffer]));return smalltalk.send((smalltalk.Transcript || Transcript), "_show_", [result]);}), (function(e){return ((($receiver = smalltalk.send(e, "_isSmalltalkError", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(smalltalk.send((smalltalk.ErrorHandler || ErrorHandler), "_new", []), "_handleError_", [e]);})() : (function(){return smalltalk.send(smalltalk.send((typeof process == 'undefined' ? nil : process), "_stdout", []), "_write_", [smalltalk.send(e, "_jsStack", [])]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(smalltalk.send((smalltalk.ErrorHandler || ErrorHandler), "_new", []), "_handleError_", [e]);}), (function(){return smalltalk.send(smalltalk.send((typeof process == 'undefined' ? nil : process), "_stdout", []), "_write_", [smalltalk.send(e, "_jsStack", [])]);})]));})]);})]));
  16669. smalltalk.send(self['@interface'], "_prompt", []);
  16670. return self;},
  16671. args: ["buffer"],
  16672. source: unescape('eval%3A%20buffer%0A%09%7C%20result%20%7C%0A%09buffer%20isEmpty%20ifFalse%3A%20%5B%0A%09%09self%20try%3A%20%5B%0A%09%09%09result%20%3A%3D%20Compiler%20new%20loadExpression%3A%20buffer.%0A%09%09%09Transcript%20show%3A%20result%5D%0A%09%09catch%3A%20%5B%3Ae%20%7C%0A%09%09%09e%20isSmalltalkError%0A%09%09%09%20%20%20%20ifTrue%3A%20%5BErrorHandler%20new%20handleError%3A%20e%5D%0A%09%09%09%20%20%20%20ifFalse%3A%20%5Bprocess%20stdout%20write%3A%20e%20jsStack%5D%5D%5D.%0A%09interface%20prompt'),
  16673. messageSends: ["ifFalse:", "isEmpty", "try:catch:", "loadExpression:", "new", "show:", "ifTrue:ifFalse:", "isSmalltalkError", "handleError:", "write:", "stdout", "jsStack", "prompt"],
  16674. referencedClasses: ["Compiler", "Transcript", "ErrorHandler"]
  16675. }),
  16676. smalltalk.Repl);
  16677. smalltalk.addMethod(
  16678. unescape('_initialize'),
  16679. smalltalk.method({
  16680. selector: unescape('initialize'),
  16681. category: 'initialization',
  16682. fn: function (){
  16683. var self=this;
  16684. smalltalk.send(self, "_initialize", [], smalltalk.Object);
  16685. (self['@readline']=smalltalk.send((typeof require == 'undefined' ? nil : require), "_value_", ["readline"]));
  16686. (self['@util']=smalltalk.send((typeof require == 'undefined' ? nil : require), "_value_", ["util"]));
  16687. return self;},
  16688. args: [],
  16689. source: unescape('initialize%0A%09super%20initialize.%0A%09readline%20%3A%3D%20require%20value%3A%20%27readline%27.%0A%09util%20%3A%3D%20require%20value%3A%20%27util%27'),
  16690. messageSends: ["initialize", "value:"],
  16691. referencedClasses: []
  16692. }),
  16693. smalltalk.Repl);
  16694. smalltalk.addMethod(
  16695. unescape('_main'),
  16696. smalltalk.method({
  16697. selector: unescape('main'),
  16698. category: 'not yet classified',
  16699. fn: function (){
  16700. var self=this;
  16701. smalltalk.send(smalltalk.send(self, "_new", []), "_createInterface", []);
  16702. return self;},
  16703. args: [],
  16704. source: unescape('main%0A%09self%20new%20createInterface'),
  16705. messageSends: ["createInterface", "new"],
  16706. referencedClasses: []
  16707. }),
  16708. smalltalk.Repl.klass);
  16709. smalltalk.init(smalltalk.Object);
  16710. smalltalk.classes()._do_(function(each) {each._initialize()});
  16711. /* Similar to jQuery(document).ready() */
  16712. if(this.smalltalkReady) {
  16713. this.smalltalkReady();
  16714. }smalltalk.Repl._main()