1
0

Kernel.js 311 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277
  1. smalltalk.addPackage('Kernel', {});
  2. smalltalk.addClass('Object', smalltalk.nil, [], 'Kernel');
  3. smalltalk.addMethod(
  4. unescape('__eq'),
  5. smalltalk.method({
  6. selector: unescape('%3D'),
  7. category: 'comparing',
  8. fn: function (anObject){
  9. var self=this;
  10. return smalltalk.send(self, "__eq_eq", [anObject]);
  11. return self;},
  12. args: ["anObject"],
  13. source: unescape('%3D%20anObject%0A%09%5Eself%20%3D%3D%20anObject'),
  14. messageSends: [unescape("%3D%3D")],
  15. referencedClasses: []
  16. }),
  17. smalltalk.Object);
  18. smalltalk.addMethod(
  19. unescape('_%7E_eq'),
  20. smalltalk.method({
  21. selector: unescape('%7E%3D'),
  22. category: 'comparing',
  23. fn: function (anObject){
  24. var self=this;
  25. return smalltalk.send(smalltalk.send(self, "__eq", [anObject]), "__eq", [false]);
  26. return self;},
  27. args: ["anObject"],
  28. source: unescape('%7E%3D%20anObject%0A%09%5E%28self%20%3D%20anObject%29%20%3D%20false'),
  29. messageSends: [unescape("%3D")],
  30. referencedClasses: []
  31. }),
  32. smalltalk.Object);
  33. smalltalk.addMethod(
  34. unescape('_initialize'),
  35. smalltalk.method({
  36. selector: unescape('initialize'),
  37. category: 'initialization',
  38. fn: function (){
  39. var self=this;
  40. return self;},
  41. args: [],
  42. source: unescape('initialize'),
  43. messageSends: [],
  44. referencedClasses: []
  45. }),
  46. smalltalk.Object);
  47. smalltalk.addMethod(
  48. unescape('_yourself'),
  49. smalltalk.method({
  50. selector: unescape('yourself'),
  51. category: 'accessing',
  52. fn: function (){
  53. var self=this;
  54. return self;
  55. return self;},
  56. args: [],
  57. source: unescape('yourself%0A%09%5Eself'),
  58. messageSends: [],
  59. referencedClasses: []
  60. }),
  61. smalltalk.Object);
  62. smalltalk.addMethod(
  63. unescape('_class'),
  64. smalltalk.method({
  65. selector: unescape('class'),
  66. category: 'accessing',
  67. fn: function (){
  68. var self=this;
  69. return self.klass;
  70. return self;},
  71. args: [],
  72. source: unescape('class%0A%09%3Creturn%20self.klass%3E'),
  73. messageSends: [],
  74. referencedClasses: []
  75. }),
  76. smalltalk.Object);
  77. smalltalk.addMethod(
  78. unescape('_size'),
  79. smalltalk.method({
  80. selector: unescape('size'),
  81. category: 'accessing',
  82. fn: function (){
  83. var self=this;
  84. smalltalk.send(self, "_error_", ["Object not indexable"]);
  85. return self;},
  86. args: [],
  87. source: unescape('size%0A%09self%20error%3A%20%27Object%20not%20indexable%27'),
  88. messageSends: ["error:"],
  89. referencedClasses: []
  90. }),
  91. smalltalk.Object);
  92. smalltalk.addMethod(
  93. unescape('_copy'),
  94. smalltalk.method({
  95. selector: unescape('copy'),
  96. category: 'copying',
  97. fn: function (){
  98. var self=this;
  99. return smalltalk.send(smalltalk.send(self, "_shallowCopy", []), "_postCopy", []);
  100. return self;},
  101. args: [],
  102. source: unescape('copy%0A%09%5Eself%20shallowCopy%20postCopy'),
  103. messageSends: ["postCopy", "shallowCopy"],
  104. referencedClasses: []
  105. }),
  106. smalltalk.Object);
  107. smalltalk.addMethod(
  108. unescape('_shallowCopy'),
  109. smalltalk.method({
  110. selector: unescape('shallowCopy'),
  111. category: 'copying',
  112. fn: function (){
  113. var self=this;
  114. var copy = self.klass._new();
  115. for(var i in self) {
  116. if(/^@.+/.test(i)) {
  117. copy[i] = self[i];
  118. }
  119. }
  120. return copy;
  121. ;
  122. return self;},
  123. args: [],
  124. 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'),
  125. messageSends: [],
  126. referencedClasses: []
  127. }),
  128. smalltalk.Object);
  129. smalltalk.addMethod(
  130. unescape('_deepCopy'),
  131. smalltalk.method({
  132. selector: unescape('deepCopy'),
  133. category: 'copying',
  134. fn: function (){
  135. var self=this;
  136. var copy = self.klass._new();
  137. for(var i in self) {
  138. if(/^@.+/.test(i)) {
  139. copy[i] = self[i]._deepCopy();
  140. }
  141. }
  142. return copy;
  143. ;
  144. return self;},
  145. args: [],
  146. 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'),
  147. messageSends: [],
  148. referencedClasses: []
  149. }),
  150. smalltalk.Object);
  151. smalltalk.addMethod(
  152. unescape('_postCopy'),
  153. smalltalk.method({
  154. selector: unescape('postCopy'),
  155. category: 'copying',
  156. fn: function (){
  157. var self=this;
  158. return self;},
  159. args: [],
  160. source: unescape('postCopy'),
  161. messageSends: [],
  162. referencedClasses: []
  163. }),
  164. smalltalk.Object);
  165. smalltalk.addMethod(
  166. unescape('__minus_gt'),
  167. smalltalk.method({
  168. selector: unescape('-%3E'),
  169. category: 'converting',
  170. fn: function (anObject){
  171. var self=this;
  172. return smalltalk.send((smalltalk.Association || Association), "_key_value_", [self, anObject]);
  173. return self;},
  174. args: ["anObject"],
  175. source: unescape('-%3E%20anObject%0A%09%5EAssociation%20key%3A%20self%20value%3A%20anObject'),
  176. messageSends: ["key:value:"],
  177. referencedClasses: ["Association"]
  178. }),
  179. smalltalk.Object);
  180. smalltalk.addMethod(
  181. unescape('_asString'),
  182. smalltalk.method({
  183. selector: unescape('asString'),
  184. category: 'converting',
  185. fn: function (){
  186. var self=this;
  187. return smalltalk.send(self, "_printString", []);
  188. return self;},
  189. args: [],
  190. source: unescape('asString%0A%09%5Eself%20printString'),
  191. messageSends: ["printString"],
  192. referencedClasses: []
  193. }),
  194. smalltalk.Object);
  195. smalltalk.addMethod(
  196. unescape('_asJavascript'),
  197. smalltalk.method({
  198. selector: unescape('asJavascript'),
  199. category: 'converting',
  200. fn: function (){
  201. var self=this;
  202. return smalltalk.send(self, "_asString", []);
  203. return self;},
  204. args: [],
  205. source: unescape('asJavascript%0A%09%5Eself%20asString'),
  206. messageSends: ["asString"],
  207. referencedClasses: []
  208. }),
  209. smalltalk.Object);
  210. smalltalk.addMethod(
  211. unescape('_perform_'),
  212. smalltalk.method({
  213. selector: unescape('perform%3A'),
  214. category: 'message handling',
  215. fn: function (aSymbol){
  216. var self=this;
  217. return smalltalk.send(self, "_perform_withArguments_", [aSymbol, []]);
  218. return self;},
  219. args: ["aSymbol"],
  220. source: unescape('perform%3A%20aSymbol%0A%09%5Eself%20perform%3A%20aSymbol%20withArguments%3A%20%23%28%29'),
  221. messageSends: ["perform:withArguments:"],
  222. referencedClasses: []
  223. }),
  224. smalltalk.Object);
  225. smalltalk.addMethod(
  226. unescape('_perform_withArguments_'),
  227. smalltalk.method({
  228. selector: unescape('perform%3AwithArguments%3A'),
  229. category: 'message handling',
  230. fn: function (aSymbol, aCollection){
  231. var self=this;
  232. return smalltalk.send(self, "_basicPerform_withArguments_", [smalltalk.send(aSymbol, "_asSelector", []), aCollection]);
  233. return self;},
  234. args: ["aSymbol", "aCollection"],
  235. source: unescape('perform%3A%20aSymbol%20withArguments%3A%20aCollection%0A%09%5Eself%20basicPerform%3A%20aSymbol%20asSelector%20withArguments%3A%20aCollection'),
  236. messageSends: ["basicPerform:withArguments:", "asSelector"],
  237. referencedClasses: []
  238. }),
  239. smalltalk.Object);
  240. smalltalk.addMethod(
  241. unescape('_instVarAt_'),
  242. smalltalk.method({
  243. selector: unescape('instVarAt%3A'),
  244. category: 'accessing',
  245. fn: function (aString){
  246. var self=this;
  247. return self['@'+aString];
  248. return self;},
  249. args: ["aString"],
  250. source: unescape('instVarAt%3A%20aString%0A%09%3Creturn%20self%5B%27@%27+aString%5D%3E'),
  251. messageSends: [],
  252. referencedClasses: []
  253. }),
  254. smalltalk.Object);
  255. smalltalk.addMethod(
  256. unescape('_instVarAt_put_'),
  257. smalltalk.method({
  258. selector: unescape('instVarAt%3Aput%3A'),
  259. category: 'accessing',
  260. fn: function (aString, anObject){
  261. var self=this;
  262. self['@' + aString] = anObject;
  263. return self;},
  264. args: ["aString", "anObject"],
  265. source: unescape('instVarAt%3A%20aString%20put%3A%20anObject%0A%09%3Cself%5B%27@%27%20+%20aString%5D%20%3D%20anObject%3E'),
  266. messageSends: [],
  267. referencedClasses: []
  268. }),
  269. smalltalk.Object);
  270. smalltalk.addMethod(
  271. unescape('_basicAt_'),
  272. smalltalk.method({
  273. selector: unescape('basicAt%3A'),
  274. category: 'accessing',
  275. fn: function (aString){
  276. var self=this;
  277. return self[aString];
  278. return self;},
  279. args: ["aString"],
  280. source: unescape('basicAt%3A%20aString%0A%09%3Creturn%20self%5BaString%5D%3E'),
  281. messageSends: [],
  282. referencedClasses: []
  283. }),
  284. smalltalk.Object);
  285. smalltalk.addMethod(
  286. unescape('_basicAt_put_'),
  287. smalltalk.method({
  288. selector: unescape('basicAt%3Aput%3A'),
  289. category: 'accessing',
  290. fn: function (aString, anObject){
  291. var self=this;
  292. return self[aString] = anObject;
  293. return self;},
  294. args: ["aString", "anObject"],
  295. source: unescape('basicAt%3A%20aString%20put%3A%20anObject%0A%09%3Creturn%20self%5BaString%5D%20%3D%20anObject%3E'),
  296. messageSends: [],
  297. referencedClasses: []
  298. }),
  299. smalltalk.Object);
  300. smalltalk.addMethod(
  301. unescape('_error_'),
  302. smalltalk.method({
  303. selector: unescape('error%3A'),
  304. category: 'error handling',
  305. fn: function (aString){
  306. var self=this;
  307. smalltalk.send((smalltalk.Error || Error), "_signal_", [aString]);
  308. return self;},
  309. args: ["aString"],
  310. source: unescape('error%3A%20aString%0A%09Error%20signal%3A%20aString'),
  311. messageSends: ["signal:"],
  312. referencedClasses: ["Error"]
  313. }),
  314. smalltalk.Object);
  315. smalltalk.addMethod(
  316. unescape('_subclassResponsibility'),
  317. smalltalk.method({
  318. selector: unescape('subclassResponsibility'),
  319. category: 'error handling',
  320. fn: function (){
  321. var self=this;
  322. smalltalk.send(self, "_error_", ["This method is a responsibility of a subclass"]);
  323. return self;},
  324. args: [],
  325. source: unescape('subclassResponsibility%0A%09self%20error%3A%20%27This%20method%20is%20a%20responsibility%20of%20a%20subclass%27'),
  326. messageSends: ["error:"],
  327. referencedClasses: []
  328. }),
  329. smalltalk.Object);
  330. smalltalk.addMethod(
  331. unescape('_shouldNotImplement'),
  332. smalltalk.method({
  333. selector: unescape('shouldNotImplement'),
  334. category: 'error handling',
  335. fn: function (){
  336. var self=this;
  337. smalltalk.send(self, "_error_", [smalltalk.send("This method should not be implemented in ", "__comma", [smalltalk.send(smalltalk.send(self, "_class", []), "_name", [])])]);
  338. return self;},
  339. args: [],
  340. source: unescape('shouldNotImplement%0A%09self%20error%3A%20%27This%20method%20should%20not%20be%20implemented%20in%20%27%2C%20self%20class%20name'),
  341. messageSends: ["error:", unescape("%2C"), "name", "class"],
  342. referencedClasses: []
  343. }),
  344. smalltalk.Object);
  345. smalltalk.addMethod(
  346. unescape('_try_catch_'),
  347. smalltalk.method({
  348. selector: unescape('try%3Acatch%3A'),
  349. category: 'error handling',
  350. fn: function (aBlock, anotherBlock){
  351. var self=this;
  352. try{aBlock()} catch(e) {anotherBlock(e)};
  353. return self;},
  354. args: ["aBlock", "anotherBlock"],
  355. source: unescape('try%3A%20aBlock%20catch%3A%20anotherBlock%0A%09%3Ctry%7BaBlock%28%29%7D%20catch%28e%29%20%7BanotherBlock%28e%29%7D%3E'),
  356. messageSends: [],
  357. referencedClasses: []
  358. }),
  359. smalltalk.Object);
  360. smalltalk.addMethod(
  361. unescape('_printString'),
  362. smalltalk.method({
  363. selector: unescape('printString'),
  364. category: 'printing',
  365. fn: function (){
  366. var self=this;
  367. return smalltalk.send("a ", "__comma", [smalltalk.send(smalltalk.send(self, "_class", []), "_name", [])]);
  368. return self;},
  369. args: [],
  370. source: unescape('printString%0A%09%5E%27a%20%27%2C%20self%20class%20name'),
  371. messageSends: [unescape("%2C"), "name", "class"],
  372. referencedClasses: []
  373. }),
  374. smalltalk.Object);
  375. smalltalk.addMethod(
  376. unescape('_printNl'),
  377. smalltalk.method({
  378. selector: unescape('printNl'),
  379. category: 'printing',
  380. fn: function (){
  381. var self=this;
  382. console.log(self);
  383. return self;},
  384. args: [],
  385. source: unescape('printNl%0A%09%3Cconsole.log%28self%29%3E'),
  386. messageSends: [],
  387. referencedClasses: []
  388. }),
  389. smalltalk.Object);
  390. smalltalk.addMethod(
  391. unescape('_isKindOf_'),
  392. smalltalk.method({
  393. selector: unescape('isKindOf%3A'),
  394. category: 'testing',
  395. fn: function (aClass){
  396. var self=this;
  397. 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]);})]));
  398. return self;},
  399. args: ["aClass"],
  400. 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'),
  401. messageSends: ["ifTrue:ifFalse:", "isMemberOf:", "inheritsFrom:", "class"],
  402. referencedClasses: []
  403. }),
  404. smalltalk.Object);
  405. smalltalk.addMethod(
  406. unescape('_isMemberOf_'),
  407. smalltalk.method({
  408. selector: unescape('isMemberOf%3A'),
  409. category: 'testing',
  410. fn: function (aClass){
  411. var self=this;
  412. return smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [aClass]);
  413. return self;},
  414. args: ["aClass"],
  415. source: unescape('isMemberOf%3A%20aClass%0A%09%5Eself%20class%20%3D%20aClass'),
  416. messageSends: [unescape("%3D"), "class"],
  417. referencedClasses: []
  418. }),
  419. smalltalk.Object);
  420. smalltalk.addMethod(
  421. unescape('_ifNil_'),
  422. smalltalk.method({
  423. selector: unescape('ifNil%3A'),
  424. category: 'testing',
  425. fn: function (aBlock){
  426. var self=this;
  427. return self;
  428. return self;},
  429. args: ["aBlock"],
  430. source: unescape('ifNil%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself'),
  431. messageSends: [],
  432. referencedClasses: []
  433. }),
  434. smalltalk.Object);
  435. smalltalk.addMethod(
  436. unescape('_ifNil_ifNotNil_'),
  437. smalltalk.method({
  438. selector: unescape('ifNil%3AifNotNil%3A'),
  439. category: 'testing',
  440. fn: function (aBlock, anotherBlock){
  441. var self=this;
  442. return smalltalk.send(anotherBlock, "_value", []);
  443. return self;},
  444. args: ["aBlock", "anotherBlock"],
  445. source: unescape('ifNil%3A%20aBlock%20ifNotNil%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EanotherBlock%20value'),
  446. messageSends: ["value"],
  447. referencedClasses: []
  448. }),
  449. smalltalk.Object);
  450. smalltalk.addMethod(
  451. unescape('_ifNotNil_'),
  452. smalltalk.method({
  453. selector: unescape('ifNotNil%3A'),
  454. category: 'testing',
  455. fn: function (aBlock){
  456. var self=this;
  457. return smalltalk.send(aBlock, "_value", []);
  458. return self;},
  459. args: ["aBlock"],
  460. source: unescape('ifNotNil%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EaBlock%20value'),
  461. messageSends: ["value"],
  462. referencedClasses: []
  463. }),
  464. smalltalk.Object);
  465. smalltalk.addMethod(
  466. unescape('_ifNotNil_ifNil_'),
  467. smalltalk.method({
  468. selector: unescape('ifNotNil%3AifNil%3A'),
  469. category: 'testing',
  470. fn: function (aBlock, anotherBlock){
  471. var self=this;
  472. return smalltalk.send(aBlock, "_value", []);
  473. return self;},
  474. args: ["aBlock", "anotherBlock"],
  475. source: unescape('ifNotNil%3A%20aBlock%20ifNil%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EaBlock%20value'),
  476. messageSends: ["value"],
  477. referencedClasses: []
  478. }),
  479. smalltalk.Object);
  480. smalltalk.addMethod(
  481. unescape('_isNil'),
  482. smalltalk.method({
  483. selector: unescape('isNil'),
  484. category: 'testing',
  485. fn: function (){
  486. var self=this;
  487. return false;
  488. return self;},
  489. args: [],
  490. source: unescape('isNil%0A%09%5Efalse'),
  491. messageSends: [],
  492. referencedClasses: []
  493. }),
  494. smalltalk.Object);
  495. smalltalk.addMethod(
  496. unescape('_notNil'),
  497. smalltalk.method({
  498. selector: unescape('notNil'),
  499. category: 'testing',
  500. fn: function (){
  501. var self=this;
  502. return smalltalk.send(smalltalk.send(self, "_isNil", []), "_not", []);
  503. return self;},
  504. args: [],
  505. source: unescape('notNil%0A%09%5Eself%20isNil%20not'),
  506. messageSends: ["not", "isNil"],
  507. referencedClasses: []
  508. }),
  509. smalltalk.Object);
  510. smalltalk.addMethod(
  511. unescape('_isClass'),
  512. smalltalk.method({
  513. selector: unescape('isClass'),
  514. category: 'testing',
  515. fn: function (){
  516. var self=this;
  517. return false;
  518. return self;},
  519. args: [],
  520. source: unescape('isClass%0A%09%5Efalse'),
  521. messageSends: [],
  522. referencedClasses: []
  523. }),
  524. smalltalk.Object);
  525. smalltalk.addMethod(
  526. unescape('_isMetaclass'),
  527. smalltalk.method({
  528. selector: unescape('isMetaclass'),
  529. category: 'testing',
  530. fn: function (){
  531. var self=this;
  532. return false;
  533. return self;},
  534. args: [],
  535. source: unescape('isMetaclass%0A%09%5Efalse'),
  536. messageSends: [],
  537. referencedClasses: []
  538. }),
  539. smalltalk.Object);
  540. smalltalk.addMethod(
  541. unescape('_isNumber'),
  542. smalltalk.method({
  543. selector: unescape('isNumber'),
  544. category: 'testing',
  545. fn: function (){
  546. var self=this;
  547. return false;
  548. return self;},
  549. args: [],
  550. source: unescape('isNumber%0A%09%5Efalse'),
  551. messageSends: [],
  552. referencedClasses: []
  553. }),
  554. smalltalk.Object);
  555. smalltalk.addMethod(
  556. unescape('_isString'),
  557. smalltalk.method({
  558. selector: unescape('isString'),
  559. category: 'testing',
  560. fn: function (){
  561. var self=this;
  562. return false;
  563. return self;},
  564. args: [],
  565. source: unescape('isString%0A%09%5Efalse'),
  566. messageSends: [],
  567. referencedClasses: []
  568. }),
  569. smalltalk.Object);
  570. smalltalk.addMethod(
  571. unescape('_isParseFailure'),
  572. smalltalk.method({
  573. selector: unescape('isParseFailure'),
  574. category: 'testing',
  575. fn: function (){
  576. var self=this;
  577. return false;
  578. return self;},
  579. args: [],
  580. source: unescape('isParseFailure%0A%09%5Efalse'),
  581. messageSends: [],
  582. referencedClasses: []
  583. }),
  584. smalltalk.Object);
  585. smalltalk.addMethod(
  586. unescape('_basicPerform_'),
  587. smalltalk.method({
  588. selector: unescape('basicPerform%3A'),
  589. category: 'message handling',
  590. fn: function (aSymbol){
  591. var self=this;
  592. return smalltalk.send(self, "_basicPerform_withArguments_", [aSymbol, []]);
  593. return self;},
  594. args: ["aSymbol"],
  595. source: unescape('basicPerform%3A%20aSymbol%20%0A%09%5Eself%20basicPerform%3A%20aSymbol%20withArguments%3A%20%23%28%29'),
  596. messageSends: ["basicPerform:withArguments:"],
  597. referencedClasses: []
  598. }),
  599. smalltalk.Object);
  600. smalltalk.addMethod(
  601. unescape('_basicPerform_withArguments_'),
  602. smalltalk.method({
  603. selector: unescape('basicPerform%3AwithArguments%3A'),
  604. category: 'message handling',
  605. fn: function (aSymbol, aCollection){
  606. var self=this;
  607. return self[aSymbol].apply(self, aCollection);;
  608. return self;},
  609. args: ["aSymbol", "aCollection"],
  610. source: unescape('basicPerform%3A%20aSymbol%20withArguments%3A%20aCollection%0A%09%3Creturn%20self%5BaSymbol%5D.apply%28self%2C%20aCollection%29%3B%3E'),
  611. messageSends: [],
  612. referencedClasses: []
  613. }),
  614. smalltalk.Object);
  615. smalltalk.addMethod(
  616. unescape('_basicDelete_'),
  617. smalltalk.method({
  618. selector: unescape('basicDelete%3A'),
  619. category: 'accessing',
  620. fn: function (aString){
  621. var self=this;
  622. delete self[aString]; return aString;
  623. return self;},
  624. args: ["aString"],
  625. source: unescape('basicDelete%3A%20aString%0A%20%20%20%20%3Cdelete%20self%5BaString%5D%3B%20return%20aString%3E'),
  626. messageSends: [],
  627. referencedClasses: []
  628. }),
  629. smalltalk.Object);
  630. smalltalk.addMethod(
  631. unescape('_doesNotUnderstand_'),
  632. smalltalk.method({
  633. selector: unescape('doesNotUnderstand%3A'),
  634. category: 'error handling',
  635. fn: function (aMessage){
  636. var self=this;
  637. (function($rec){smalltalk.send($rec, "_receiver_", [self]);smalltalk.send($rec, "_message_", [aMessage]);return smalltalk.send($rec, "_signal", []);})(smalltalk.send((smalltalk.MessageNotUnderstood || MessageNotUnderstood), "_new", []));
  638. return self;},
  639. args: ["aMessage"],
  640. source: unescape('doesNotUnderstand%3A%20aMessage%0A%09MessageNotUnderstood%20new%0A%09%09receiver%3A%20self%3B%0A%09%09message%3A%20aMessage%3B%0A%09%09signal'),
  641. messageSends: ["receiver:", "message:", "signal", "new"],
  642. referencedClasses: ["MessageNotUnderstood"]
  643. }),
  644. smalltalk.Object);
  645. smalltalk.addMethod(
  646. unescape('_asJSON'),
  647. smalltalk.method({
  648. selector: unescape('asJSON'),
  649. category: 'converting',
  650. fn: function (){
  651. var self=this;
  652. return JSON.stringify(self);
  653. return self;},
  654. args: [],
  655. source: unescape('asJSON%0A%09%3Creturn%20JSON.stringify%28self%29%3E'),
  656. messageSends: [],
  657. referencedClasses: []
  658. }),
  659. smalltalk.Object);
  660. smalltalk.addMethod(
  661. unescape('_halt'),
  662. smalltalk.method({
  663. selector: unescape('halt'),
  664. category: 'error handling',
  665. fn: function (){
  666. var self=this;
  667. smalltalk.send(self, "_error_", ["Halt encountered"]);
  668. return self;},
  669. args: [],
  670. source: unescape('halt%0A%09self%20error%3A%20%27Halt%20encountered%27'),
  671. messageSends: ["error:"],
  672. referencedClasses: []
  673. }),
  674. smalltalk.Object);
  675. smalltalk.addMethod(
  676. unescape('_log_block_'),
  677. smalltalk.method({
  678. selector: unescape('log%3Ablock%3A'),
  679. category: 'printing',
  680. fn: function (aString, aBlock){
  681. var self=this;
  682. var result=nil;
  683. 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", [])])]);
  684. return result;
  685. return self;},
  686. args: ["aString", "aBlock"],
  687. 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'),
  688. messageSends: ["log:", unescape("%2C"), "printString", "millisecondsToRun:", "value"],
  689. referencedClasses: ["Date"]
  690. }),
  691. smalltalk.Object);
  692. smalltalk.addMethod(
  693. unescape('__eq_eq'),
  694. smalltalk.method({
  695. selector: unescape('%3D%3D'),
  696. category: 'comparing',
  697. fn: function (anObject){
  698. var self=this;
  699. return self === anObject;
  700. return self;},
  701. args: ["anObject"],
  702. source: unescape('%3D%3D%20anObject%0A%09%3Creturn%20self%20%3D%3D%3D%20anObject%3E'),
  703. messageSends: [],
  704. referencedClasses: []
  705. }),
  706. smalltalk.Object);
  707. smalltalk.addMethod(
  708. unescape('_%7E%7E'),
  709. smalltalk.method({
  710. selector: unescape('%7E%7E'),
  711. category: 'comparing',
  712. fn: function (anObject){
  713. var self=this;
  714. return smalltalk.send(smalltalk.send(self, "__eq_eq", [anObject]), "__eq", [false]);
  715. return self;},
  716. args: ["anObject"],
  717. source: unescape('%7E%7E%20anObject%0A%09%5E%28self%20%3D%3D%20anObject%29%20%3D%20false'),
  718. messageSends: [unescape("%3D"), unescape("%3D%3D")],
  719. referencedClasses: []
  720. }),
  721. smalltalk.Object);
  722. smalltalk.addMethod(
  723. unescape('_deprecatedAPI'),
  724. smalltalk.method({
  725. selector: unescape('deprecatedAPI'),
  726. category: 'error handling',
  727. fn: function (){
  728. var self=this;
  729. smalltalk.send((typeof console == 'undefined' ? nil : console), "_warn_", [smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.getThisContext()), "_home", []), "_asString", []), "__comma", [unescape("%20is%20deprecated%21")])]);
  730. return self;},
  731. args: [],
  732. 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%27'),
  733. messageSends: ["warn:", unescape("%2C"), "asString", "home"],
  734. referencedClasses: []
  735. }),
  736. smalltalk.Object);
  737. smalltalk.addMethod(
  738. unescape('_storeString'),
  739. smalltalk.method({
  740. selector: unescape('storeString'),
  741. category: 'printing',
  742. fn: function (){
  743. var self=this;
  744. return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(s){return smalltalk.send(self, "_storeOn_", [s]);})]);
  745. return self;},
  746. args: [],
  747. 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'),
  748. messageSends: ["streamContents:", "storeOn:"],
  749. referencedClasses: ["String"]
  750. }),
  751. smalltalk.Object);
  752. smalltalk.addMethod(
  753. unescape('_storeOn_'),
  754. smalltalk.method({
  755. selector: unescape('storeOn%3A'),
  756. category: 'printing',
  757. fn: function (aStream){
  758. var self=this;
  759. smalltalk.send(aStream, "_nextPutAll_", [smalltalk.send(self, "_printString", [])]);
  760. return self;},
  761. args: ["aStream"],
  762. source: unescape('storeOn%3A%20aStream%0A%09aStream%20nextPutAll%3A%20self%20printString'),
  763. messageSends: ["nextPutAll:", "printString"],
  764. referencedClasses: []
  765. }),
  766. smalltalk.Object);
  767. smalltalk.addMethod(
  768. unescape('_initialize'),
  769. smalltalk.method({
  770. selector: unescape('initialize'),
  771. category: 'initialization',
  772. fn: function (){
  773. var self=this;
  774. return self;},
  775. args: [],
  776. source: unescape('initialize%0A%09%22no%20op%22'),
  777. messageSends: [],
  778. referencedClasses: []
  779. }),
  780. smalltalk.Object.klass);
  781. smalltalk.addClass('Smalltalk', smalltalk.Object, [], 'Kernel');
  782. smalltalk.addMethod(
  783. unescape('_classes'),
  784. smalltalk.method({
  785. selector: unescape('classes'),
  786. category: 'accessing',
  787. fn: function (){
  788. var self=this;
  789. return self.classes();
  790. return self;},
  791. args: [],
  792. source: unescape('classes%0A%09%3Creturn%20self.classes%28%29%3E'),
  793. messageSends: [],
  794. referencedClasses: []
  795. }),
  796. smalltalk.Smalltalk);
  797. smalltalk.addMethod(
  798. unescape('_at_'),
  799. smalltalk.method({
  800. selector: unescape('at%3A'),
  801. category: 'accessing',
  802. fn: function (aString){
  803. var self=this;
  804. return self[aString];
  805. return self;},
  806. args: ["aString"],
  807. source: unescape('at%3A%20aString%0A%09%3Creturn%20self%5BaString%5D%3E'),
  808. messageSends: [],
  809. referencedClasses: []
  810. }),
  811. smalltalk.Smalltalk);
  812. smalltalk.addMethod(
  813. unescape('_removeClass_'),
  814. smalltalk.method({
  815. selector: unescape('removeClass%3A'),
  816. category: 'classes',
  817. fn: function (aClass){
  818. var self=this;
  819. ((($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")])]);})]));
  820. smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_methodDictionary", []), "_values", []), "_do_", [(function(each){return smalltalk.send(aClass, "_removeCompiledMethod_", [each]);})]);
  821. smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_methodDictionary", []), "_values", []), "_do_", [(function(each){return smalltalk.send(smalltalk.send(aClass, "_class", []), "_removeCompiledMethod_", [each]);})]);
  822. smalltalk.send(self, "_basicDelete_", [smalltalk.send(aClass, "_name", [])]);
  823. return self;},
  824. args: ["aClass"],
  825. 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'),
  826. messageSends: ["ifTrue:", "isMetaclass", "error:", unescape("%2C"), "asString", "do:", "values", "methodDictionary", "removeCompiledMethod:", "class", "basicDelete:", "name"],
  827. referencedClasses: []
  828. }),
  829. smalltalk.Smalltalk);
  830. smalltalk.addMethod(
  831. unescape('_basicParse_'),
  832. smalltalk.method({
  833. selector: unescape('basicParse%3A'),
  834. category: 'accessing',
  835. fn: function (aString){
  836. var self=this;
  837. return smalltalk.parser.parse(aString);
  838. return self;},
  839. args: ["aString"],
  840. source: unescape('basicParse%3A%20aString%0A%09%3Creturn%20smalltalk.parser.parse%28aString%29%3E'),
  841. messageSends: [],
  842. referencedClasses: []
  843. }),
  844. smalltalk.Smalltalk);
  845. smalltalk.addMethod(
  846. unescape('_parse_'),
  847. smalltalk.method({
  848. selector: unescape('parse%3A'),
  849. category: 'accessing',
  850. fn: function (aString){
  851. var self=this;
  852. var result=nil;
  853. 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", []);})]);
  854. return result;
  855. return self;},
  856. args: ["aString"],
  857. 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'),
  858. messageSends: ["try:catch:", "basicParse:", "signal", "parseError:parsing:"],
  859. referencedClasses: []
  860. }),
  861. smalltalk.Smalltalk);
  862. smalltalk.addMethod(
  863. unescape('_parseError_parsing_'),
  864. smalltalk.method({
  865. selector: unescape('parseError%3Aparsing%3A'),
  866. category: 'accessing',
  867. fn: function (anException, aString){
  868. var self=this;
  869. var row=nil;
  870. var col=nil;
  871. var message=nil;
  872. var lines=nil;
  873. var badLine=nil;
  874. var code=nil;
  875. row = anException.line;
  876. col = anException.column;
  877. message = anException.message;;
  878. lines=smalltalk.send(aString, "_lines", []);
  879. badLine=smalltalk.send(lines, "_at_", [row]);
  880. 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", [])])]);
  881. smalltalk.send(lines, "_at_put_", [row, badLine]);
  882. 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", [])])]);})]);})]);
  883. 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])]);
  884. return self;},
  885. args: ["anException", "aString"],
  886. 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'),
  887. messageSends: ["lines", "at:", unescape("%2C"), "copyFrom:to:", unescape("-"), "size", "at:put:", "streamContents:", "withIndexDo:", "nextPutAll:", "asString", "lf", "messageText:", "new"],
  888. referencedClasses: ["String", "Error"]
  889. }),
  890. smalltalk.Smalltalk);
  891. smalltalk.addMethod(
  892. unescape('_packages'),
  893. smalltalk.method({
  894. selector: unescape('packages'),
  895. category: 'packages',
  896. fn: function (){
  897. var self=this;
  898. return self.packages.all();
  899. return self;},
  900. args: [],
  901. source: unescape('packages%0A%09%22Return%20all%20Package%20instances%20in%20the%20system.%22%0A%0A%09%3Creturn%20self.packages.all%28%29%3E'),
  902. messageSends: [],
  903. referencedClasses: []
  904. }),
  905. smalltalk.Smalltalk);
  906. smalltalk.addMethod(
  907. unescape('_packageAt_'),
  908. smalltalk.method({
  909. selector: unescape('packageAt%3A'),
  910. category: 'packages',
  911. fn: function (packageName){
  912. var self=this;
  913. return self.packages[packageName];
  914. return self;},
  915. args: ["packageName"],
  916. source: unescape('packageAt%3A%20packageName%0A%20%20%20%20%20%20%20%3Creturn%20self.packages%5BpackageName%5D%3E'),
  917. messageSends: [],
  918. referencedClasses: []
  919. }),
  920. smalltalk.Smalltalk);
  921. smalltalk.addMethod(
  922. unescape('_packageAt_ifAbsent_'),
  923. smalltalk.method({
  924. selector: unescape('packageAt%3AifAbsent%3A'),
  925. category: 'packages',
  926. fn: function (packageName, aBlock){
  927. var self=this;
  928. return smalltalk.send(smalltalk.send(self, "_packageAt_", [packageName]), "_ifNil_", [aBlock]);
  929. return self;},
  930. args: ["packageName", "aBlock"],
  931. 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'),
  932. messageSends: ["ifNil:", "packageAt:"],
  933. referencedClasses: []
  934. }),
  935. smalltalk.Smalltalk);
  936. smalltalk.addMethod(
  937. unescape('_createPackage_'),
  938. smalltalk.method({
  939. selector: unescape('createPackage%3A'),
  940. category: 'private',
  941. fn: function (packageName){
  942. var self=this;
  943. return smalltalk.addPackage(packageName, nil);
  944. return self;},
  945. args: ["packageName"],
  946. 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'),
  947. messageSends: [],
  948. referencedClasses: []
  949. }),
  950. smalltalk.Smalltalk);
  951. smalltalk.addMethod(
  952. unescape('_deletePackage_'),
  953. smalltalk.method({
  954. selector: unescape('deletePackage%3A'),
  955. category: 'private',
  956. fn: function (packageName){
  957. var self=this;
  958. delete smalltalk.packages[packageName];
  959. return self;},
  960. args: ["packageName"],
  961. 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'),
  962. messageSends: [],
  963. referencedClasses: []
  964. }),
  965. smalltalk.Smalltalk);
  966. smalltalk.addMethod(
  967. unescape('_removePackage_'),
  968. smalltalk.method({
  969. selector: unescape('removePackage%3A'),
  970. category: 'packages',
  971. fn: function (packageName){
  972. var self=this;
  973. var pkg=nil;
  974. pkg=smalltalk.send(self, "_packageAt_ifAbsent_", [packageName, (function(){return smalltalk.send(self, "_error_", [smalltalk.send("Missing package: ", "__comma", [packageName])]);})]);
  975. smalltalk.send(smalltalk.send(pkg, "_classes", []), "_do_", [(function(each){return smalltalk.send(self, "_removeClass_", [each]);})]);
  976. smalltalk.send(self, "_deletePackage_", [packageName]);
  977. return self;},
  978. args: ["packageName"],
  979. 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'),
  980. messageSends: ["packageAt:ifAbsent:", "error:", unescape("%2C"), "do:", "classes", "removeClass:", "deletePackage:"],
  981. referencedClasses: []
  982. }),
  983. smalltalk.Smalltalk);
  984. smalltalk.addMethod(
  985. unescape('_renamePackage_to_'),
  986. smalltalk.method({
  987. selector: unescape('renamePackage%3Ato%3A'),
  988. category: 'packages',
  989. fn: function (packageName, newName){
  990. var self=this;
  991. var pkg=nil;
  992. pkg=smalltalk.send(self, "_packageAt_ifAbsent_", [packageName, (function(){return smalltalk.send(self, "_error_", [smalltalk.send("Missing package: ", "__comma", [packageName])]);})]);
  993. (($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;
  994. smalltalk.packages[newName] = smalltalk.packages[packageName];
  995. smalltalk.send(pkg, "_name_", [newName]);
  996. smalltalk.send(self, "_deletePackage_", [packageName]);
  997. return self;},
  998. args: ["packageName", "newName"],
  999. 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.'),
  1000. messageSends: ["packageAt:ifAbsent:", "error:", unescape("%2C"), "ifNotNil:", "packageAt:", "name:", "deletePackage:"],
  1001. referencedClasses: []
  1002. }),
  1003. smalltalk.Smalltalk);
  1004. smalltalk.addMethod(
  1005. unescape('_reservedWords'),
  1006. smalltalk.method({
  1007. selector: unescape('reservedWords'),
  1008. category: 'accessing',
  1009. fn: function (){
  1010. var self=this;
  1011. return self.reservedWords;
  1012. return self;},
  1013. args: [],
  1014. source: unescape('reservedWords%0A%09%22JavaScript%20reserved%20words%22%0A%09%3Creturn%20self.reservedWords%3E'),
  1015. messageSends: [],
  1016. referencedClasses: []
  1017. }),
  1018. smalltalk.Smalltalk);
  1019. smalltalk.addMethod(
  1020. unescape('_createPackage_properties_'),
  1021. smalltalk.method({
  1022. selector: unescape('createPackage%3Aproperties%3A'),
  1023. category: 'private',
  1024. fn: function (packageName, aDict){
  1025. var self=this;
  1026. var object=nil;
  1027. object = {};;
  1028. smalltalk.send(aDict, "_keysAndValuesDo_", [(function(key, value){return object[key] = value;})]);
  1029. return smalltalk.addPackage(packageName, object);
  1030. return self;},
  1031. args: ["packageName", "aDict"],
  1032. 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'),
  1033. messageSends: ["keysAndValuesDo:"],
  1034. referencedClasses: []
  1035. }),
  1036. smalltalk.Smalltalk);
  1037. smalltalk.addMethod(
  1038. unescape('_readJSObject_'),
  1039. smalltalk.method({
  1040. selector: unescape('readJSObject%3A'),
  1041. category: 'accessing',
  1042. fn: function (anObject){
  1043. var self=this;
  1044. return self.readJSObject(anObject);
  1045. return self;},
  1046. args: ["anObject"],
  1047. source: unescape('readJSObject%3A%20anObject%0A%09%3Creturn%20self.readJSObject%28anObject%29%3E'),
  1048. messageSends: [],
  1049. referencedClasses: []
  1050. }),
  1051. smalltalk.Smalltalk);
  1052. smalltalk.Smalltalk.klass.iVarNames = ['current'];
  1053. smalltalk.addMethod(
  1054. unescape('_current'),
  1055. smalltalk.method({
  1056. selector: unescape('current'),
  1057. category: 'accessing',
  1058. fn: function (){
  1059. var self=this;
  1060. return smalltalk;
  1061. return self;},
  1062. args: [],
  1063. source: unescape('current%0A%09%3Creturn%20smalltalk%3E'),
  1064. messageSends: [],
  1065. referencedClasses: []
  1066. }),
  1067. smalltalk.Smalltalk.klass);
  1068. smalltalk.addClass('Package', smalltalk.Object, [], 'Kernel');
  1069. 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.')
  1070. smalltalk.addMethod(
  1071. unescape('_name'),
  1072. smalltalk.method({
  1073. selector: unescape('name'),
  1074. category: 'accessing',
  1075. fn: function (){
  1076. var self=this;
  1077. return self.pkgName;
  1078. return self;},
  1079. args: [],
  1080. source: unescape('name%0A%09%3Creturn%20self.pkgName%3E'),
  1081. messageSends: [],
  1082. referencedClasses: []
  1083. }),
  1084. smalltalk.Package);
  1085. smalltalk.addMethod(
  1086. unescape('_name_'),
  1087. smalltalk.method({
  1088. selector: unescape('name%3A'),
  1089. category: 'accessing',
  1090. fn: function (aString){
  1091. var self=this;
  1092. return self.pkgName = aString;
  1093. return self;},
  1094. args: ["aString"],
  1095. source: unescape('name%3A%20aString%0A%09%3Creturn%20self.pkgName%20%3D%20aString%3E'),
  1096. messageSends: [],
  1097. referencedClasses: []
  1098. }),
  1099. smalltalk.Package);
  1100. smalltalk.addMethod(
  1101. unescape('_classes'),
  1102. smalltalk.method({
  1103. selector: unescape('classes'),
  1104. category: 'classes',
  1105. fn: function (){
  1106. var self=this;
  1107. 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]);})]);
  1108. return self;},
  1109. args: [],
  1110. 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'),
  1111. messageSends: ["select:", "classes", "current", unescape("%3D%3D"), "package"],
  1112. referencedClasses: ["Smalltalk"]
  1113. }),
  1114. smalltalk.Package);
  1115. smalltalk.addMethod(
  1116. unescape('_printString'),
  1117. smalltalk.method({
  1118. selector: unescape('printString'),
  1119. category: 'printing',
  1120. fn: function (){
  1121. var self=this;
  1122. return smalltalk.send(self, "_name", []);
  1123. return self;},
  1124. args: [],
  1125. source: unescape('printString%0A%09%5Eself%20name'),
  1126. messageSends: ["name"],
  1127. referencedClasses: []
  1128. }),
  1129. smalltalk.Package);
  1130. smalltalk.addMethod(
  1131. unescape('_dependencies'),
  1132. smalltalk.method({
  1133. selector: unescape('dependencies'),
  1134. category: 'accessing',
  1135. fn: function (){
  1136. var self=this;
  1137. return smalltalk.send(self, "_propertyAt_ifAbsent_", ["dependencies", (function(){return [];})]);
  1138. return self;},
  1139. args: [],
  1140. source: unescape('dependencies%0A%09%5Eself%20propertyAt%3A%20%27dependencies%27%20ifAbsent%3A%20%5B%23%28%29%5D'),
  1141. messageSends: ["propertyAt:ifAbsent:"],
  1142. referencedClasses: []
  1143. }),
  1144. smalltalk.Package);
  1145. smalltalk.addMethod(
  1146. unescape('_dependencies_'),
  1147. smalltalk.method({
  1148. selector: unescape('dependencies%3A'),
  1149. category: 'accessing',
  1150. fn: function (anArray){
  1151. var self=this;
  1152. return smalltalk.send(self, "_propertyAt_put_", ["dependencies", anArray]);
  1153. return self;},
  1154. args: ["anArray"],
  1155. source: unescape('dependencies%3A%20anArray%0A%09%5Eself%20propertyAt%3A%20%27dependencies%27%20put%3A%20anArray'),
  1156. messageSends: ["propertyAt:put:"],
  1157. referencedClasses: []
  1158. }),
  1159. smalltalk.Package);
  1160. smalltalk.addMethod(
  1161. unescape('_properties'),
  1162. smalltalk.method({
  1163. selector: unescape('properties'),
  1164. category: 'accessing',
  1165. fn: function (){
  1166. var self=this;
  1167. return smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_readJSObject_", [smalltalk.send(self, "_basicAt_", ["properties"])]);
  1168. return self;},
  1169. args: [],
  1170. source: unescape('properties%0A%09%5ESmalltalk%20current%20readJSObject%3A%20%28self%20basicAt%3A%20%27properties%27%29'),
  1171. messageSends: ["readJSObject:", "current", "basicAt:"],
  1172. referencedClasses: ["Smalltalk"]
  1173. }),
  1174. smalltalk.Package);
  1175. smalltalk.addMethod(
  1176. unescape('_propertiesAsJSON'),
  1177. smalltalk.method({
  1178. selector: unescape('propertiesAsJSON'),
  1179. category: 'private',
  1180. fn: function (){
  1181. var self=this;
  1182. return JSON.stringify(self.properties);
  1183. return self;},
  1184. args: [],
  1185. source: unescape('propertiesAsJSON%0A%09%3Creturn%20JSON.stringify%28self.properties%29%3E'),
  1186. messageSends: [],
  1187. referencedClasses: []
  1188. }),
  1189. smalltalk.Package);
  1190. smalltalk.addMethod(
  1191. unescape('_properties_'),
  1192. smalltalk.method({
  1193. selector: unescape('properties%3A'),
  1194. category: 'accessing',
  1195. fn: function (aDict){
  1196. var self=this;
  1197. var object=nil;
  1198. object = {};;
  1199. smalltalk.send(aDict, "_keysAndValuesDo_", [(function(key, value){return object[key] = value;})]);
  1200. return self.properties = object;
  1201. return self;},
  1202. args: ["aDict"],
  1203. 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'),
  1204. messageSends: ["keysAndValuesDo:"],
  1205. referencedClasses: []
  1206. }),
  1207. smalltalk.Package);
  1208. smalltalk.addMethod(
  1209. unescape('_jsProperties'),
  1210. smalltalk.method({
  1211. selector: unescape('jsProperties'),
  1212. category: 'private',
  1213. fn: function (){
  1214. var self=this;
  1215. return self.properties;
  1216. return self;},
  1217. args: [],
  1218. source: unescape('jsProperties%0A%09%3Creturn%20self.properties%3E'),
  1219. messageSends: [],
  1220. referencedClasses: []
  1221. }),
  1222. smalltalk.Package);
  1223. smalltalk.addMethod(
  1224. unescape('_jsProperties_'),
  1225. smalltalk.method({
  1226. selector: unescape('jsProperties%3A'),
  1227. category: 'private',
  1228. fn: function (aJSObject){
  1229. var self=this;
  1230. return self.properties = aJSObject;
  1231. return self;},
  1232. args: ["aJSObject"],
  1233. source: unescape('jsProperties%3A%20aJSObject%0A%09%3Creturn%20self.properties%20%3D%20aJSObject%3E'),
  1234. messageSends: [],
  1235. referencedClasses: []
  1236. }),
  1237. smalltalk.Package);
  1238. smalltalk.addMethod(
  1239. unescape('_propertyAt_'),
  1240. smalltalk.method({
  1241. selector: unescape('propertyAt%3A'),
  1242. category: 'properties',
  1243. fn: function (key){
  1244. var self=this;
  1245. return self.properties[key];
  1246. return self;},
  1247. args: ["key"],
  1248. source: unescape('propertyAt%3A%20key%0A%0A%09%3Creturn%20self.properties%5Bkey%5D%3E'),
  1249. messageSends: [],
  1250. referencedClasses: []
  1251. }),
  1252. smalltalk.Package);
  1253. smalltalk.addMethod(
  1254. unescape('_propertyAt_put_'),
  1255. smalltalk.method({
  1256. selector: unescape('propertyAt%3Aput%3A'),
  1257. category: 'properties',
  1258. fn: function (key, value){
  1259. var self=this;
  1260. return self.properties[key] = value;
  1261. return self;},
  1262. args: ["key", "value"],
  1263. source: unescape('propertyAt%3A%20key%20put%3A%20value%0A%0A%09%3Creturn%20self.properties%5Bkey%5D%20%3D%20value%3E'),
  1264. messageSends: [],
  1265. referencedClasses: []
  1266. }),
  1267. smalltalk.Package);
  1268. smalltalk.addMethod(
  1269. unescape('_propertyAt_ifAbsent_'),
  1270. smalltalk.method({
  1271. selector: unescape('propertyAt%3AifAbsent%3A'),
  1272. category: 'properties',
  1273. fn: function (key, block){
  1274. var self=this;
  1275. return (($receiver = smalltalk.send(self, "_propertyAt_", [key])) == nil || $receiver == undefined) ? (function(){return smalltalk.send(block, "_value", []);})() : $receiver;
  1276. return self;},
  1277. args: ["key", "block"],
  1278. source: unescape('propertyAt%3A%20key%20ifAbsent%3A%20block%0A%0A%09%5E%28self%20propertyAt%3A%20key%29%20ifNil%3A%20%5Bblock%20value%5D'),
  1279. messageSends: ["ifNil:", "propertyAt:", "value"],
  1280. referencedClasses: []
  1281. }),
  1282. smalltalk.Package);
  1283. smalltalk.addMethod(
  1284. unescape('_named_'),
  1285. smalltalk.method({
  1286. selector: unescape('named%3A'),
  1287. category: 'not yet classified',
  1288. fn: function (aPackageName){
  1289. var self=this;
  1290. return smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_packageAt_", [aPackageName]);
  1291. return self;},
  1292. args: ["aPackageName"],
  1293. source: unescape('named%3A%20aPackageName%0A%0A%09%5ESmalltalk%20current%20packageAt%3A%20aPackageName'),
  1294. messageSends: ["packageAt:", "current"],
  1295. referencedClasses: ["Smalltalk"]
  1296. }),
  1297. smalltalk.Package.klass);
  1298. smalltalk.addMethod(
  1299. unescape('_named_ifAbsent_'),
  1300. smalltalk.method({
  1301. selector: unescape('named%3AifAbsent%3A'),
  1302. category: 'not yet classified',
  1303. fn: function (aPackageName, aBlock){
  1304. var self=this;
  1305. return smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_packageAt_ifAbsent_", [aPackageName, aBlock]);
  1306. return self;},
  1307. args: ["aPackageName", "aBlock"],
  1308. source: unescape('named%3A%20aPackageName%20ifAbsent%3A%20aBlock%0A%0A%09%5ESmalltalk%20current%20packageAt%3A%20aPackageName%20ifAbsent%3A%20aBlock'),
  1309. messageSends: ["packageAt:ifAbsent:", "current"],
  1310. referencedClasses: ["Smalltalk"]
  1311. }),
  1312. smalltalk.Package.klass);
  1313. smalltalk.addClass('Behavior', smalltalk.Object, [], 'Kernel');
  1314. smalltalk.addMethod(
  1315. unescape('_new'),
  1316. smalltalk.method({
  1317. selector: unescape('new'),
  1318. category: 'instance creation',
  1319. fn: function (){
  1320. var self=this;
  1321. return smalltalk.send(smalltalk.send(self, "_basicNew", []), "_initialize", []);
  1322. return self;},
  1323. args: [],
  1324. source: unescape('new%0A%09%5Eself%20basicNew%20initialize'),
  1325. messageSends: ["initialize", "basicNew"],
  1326. referencedClasses: []
  1327. }),
  1328. smalltalk.Behavior);
  1329. smalltalk.addMethod(
  1330. unescape('_basicNew'),
  1331. smalltalk.method({
  1332. selector: unescape('basicNew'),
  1333. category: 'instance creation',
  1334. fn: function (){
  1335. var self=this;
  1336. return new self.fn();
  1337. return self;},
  1338. args: [],
  1339. source: unescape('basicNew%0A%09%3Creturn%20new%20self.fn%28%29%3E'),
  1340. messageSends: [],
  1341. referencedClasses: []
  1342. }),
  1343. smalltalk.Behavior);
  1344. smalltalk.addMethod(
  1345. unescape('_name'),
  1346. smalltalk.method({
  1347. selector: unescape('name'),
  1348. category: 'accessing',
  1349. fn: function (){
  1350. var self=this;
  1351. return self.className || nil;
  1352. return self;},
  1353. args: [],
  1354. source: unescape('name%0A%09%3Creturn%20self.className%20%7C%7C%20nil%3E'),
  1355. messageSends: [],
  1356. referencedClasses: []
  1357. }),
  1358. smalltalk.Behavior);
  1359. smalltalk.addMethod(
  1360. unescape('_superclass'),
  1361. smalltalk.method({
  1362. selector: unescape('superclass'),
  1363. category: 'accessing',
  1364. fn: function (){
  1365. var self=this;
  1366. return self.superclass || nil;
  1367. return self;},
  1368. args: [],
  1369. source: unescape('superclass%0A%09%3Creturn%20self.superclass%20%7C%7C%20nil%3E'),
  1370. messageSends: [],
  1371. referencedClasses: []
  1372. }),
  1373. smalltalk.Behavior);
  1374. smalltalk.addMethod(
  1375. unescape('_subclasses'),
  1376. smalltalk.method({
  1377. selector: unescape('subclasses'),
  1378. category: 'accessing',
  1379. fn: function (){
  1380. var self=this;
  1381. return smalltalk.subclasses(self);
  1382. return self;},
  1383. args: [],
  1384. source: unescape('subclasses%0A%09%3Creturn%20smalltalk.subclasses%28self%29%3E'),
  1385. messageSends: [],
  1386. referencedClasses: []
  1387. }),
  1388. smalltalk.Behavior);
  1389. smalltalk.addMethod(
  1390. unescape('_allSubclasses'),
  1391. smalltalk.method({
  1392. selector: unescape('allSubclasses'),
  1393. category: 'accessing',
  1394. fn: function (){
  1395. var self=this;
  1396. var result=nil;
  1397. result=smalltalk.send(self, "_subclasses", []);
  1398. smalltalk.send(smalltalk.send(self, "_subclasses", []), "_do_", [(function(each){return smalltalk.send(result, "_addAll_", [smalltalk.send(each, "_allSubclasses", [])]);})]);
  1399. return result;
  1400. return self;},
  1401. args: [],
  1402. 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'),
  1403. messageSends: ["subclasses", "do:", "addAll:", "allSubclasses"],
  1404. referencedClasses: []
  1405. }),
  1406. smalltalk.Behavior);
  1407. smalltalk.addMethod(
  1408. unescape('_withAllSubclasses'),
  1409. smalltalk.method({
  1410. selector: unescape('withAllSubclasses'),
  1411. category: 'accessing',
  1412. fn: function (){
  1413. var self=this;
  1414. return (function($rec){smalltalk.send($rec, "_addAll_", [smalltalk.send(self, "_allSubclasses", [])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.Array || Array), "_with_", [self]));
  1415. return self;},
  1416. args: [],
  1417. source: unescape('withAllSubclasses%0A%09%5E%28Array%20with%3A%20self%29%20addAll%3A%20self%20allSubclasses%3B%20yourself'),
  1418. messageSends: ["addAll:", "allSubclasses", "yourself", "with:"],
  1419. referencedClasses: ["Array"]
  1420. }),
  1421. smalltalk.Behavior);
  1422. smalltalk.addMethod(
  1423. unescape('_prototype'),
  1424. smalltalk.method({
  1425. selector: unescape('prototype'),
  1426. category: 'accessing',
  1427. fn: function (){
  1428. var self=this;
  1429. return self.fn.prototype;
  1430. return self;},
  1431. args: [],
  1432. source: unescape('prototype%0A%09%3Creturn%20self.fn.prototype%3E'),
  1433. messageSends: [],
  1434. referencedClasses: []
  1435. }),
  1436. smalltalk.Behavior);
  1437. smalltalk.addMethod(
  1438. unescape('_methodDictionary'),
  1439. smalltalk.method({
  1440. selector: unescape('methodDictionary'),
  1441. category: 'accessing',
  1442. fn: function (){
  1443. var self=this;
  1444. var dict = smalltalk.Dictionary._new();
  1445. var methods = self.fn.prototype.methods;
  1446. for(var i in methods) {
  1447. if(methods[i].selector) {
  1448. dict._at_put_(methods[i].selector, methods[i]);
  1449. }
  1450. };
  1451. return dict;
  1452. return self;},
  1453. args: [],
  1454. source: unescape('methodDictionary%0A%09%3Cvar%20dict%20%3D%20smalltalk.Dictionary._new%28%29%3B%0A%09var%20methods%20%3D%20self.fn.prototype.methods%3B%0A%09for%28var%20i%20in%20methods%29%20%7B%0A%09%09if%28methods%5Bi%5D.selector%29%20%7B%0A%09%09%09dict._at_put_%28methods%5Bi%5D.selector%2C%20methods%5Bi%5D%29%3B%0A%09%09%7D%0A%09%7D%3B%0A%09return%20dict%3E'),
  1455. messageSends: [],
  1456. referencedClasses: []
  1457. }),
  1458. smalltalk.Behavior);
  1459. smalltalk.addMethod(
  1460. unescape('_methodsFor_'),
  1461. smalltalk.method({
  1462. selector: unescape('methodsFor%3A'),
  1463. category: 'accessing',
  1464. fn: function (aString){
  1465. var self=this;
  1466. return (function($rec){smalltalk.send($rec, "_class_category_", [self, aString]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.ClassCategoryReader || ClassCategoryReader), "_new", []));
  1467. return self;},
  1468. args: ["aString"],
  1469. 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'),
  1470. messageSends: ["class:category:", "yourself", "new"],
  1471. referencedClasses: ["ClassCategoryReader"]
  1472. }),
  1473. smalltalk.Behavior);
  1474. smalltalk.addMethod(
  1475. unescape('_addCompiledMethod_'),
  1476. smalltalk.method({
  1477. selector: unescape('addCompiledMethod%3A'),
  1478. category: 'accessing',
  1479. fn: function (aMethod){
  1480. var self=this;
  1481. smalltalk.addMethod(aMethod.selector._asSelector(), aMethod, self);
  1482. return self;},
  1483. args: ["aMethod"],
  1484. source: unescape('addCompiledMethod%3A%20aMethod%0A%09%3Csmalltalk.addMethod%28aMethod.selector._asSelector%28%29%2C%20aMethod%2C%20self%29%3E'),
  1485. messageSends: [],
  1486. referencedClasses: []
  1487. }),
  1488. smalltalk.Behavior);
  1489. smalltalk.addMethod(
  1490. unescape('_instanceVariableNames'),
  1491. smalltalk.method({
  1492. selector: unescape('instanceVariableNames'),
  1493. category: 'accessing',
  1494. fn: function (){
  1495. var self=this;
  1496. return self.iVarNames;
  1497. return self;},
  1498. args: [],
  1499. source: unescape('instanceVariableNames%0A%09%3Creturn%20self.iVarNames%3E'),
  1500. messageSends: [],
  1501. referencedClasses: []
  1502. }),
  1503. smalltalk.Behavior);
  1504. smalltalk.addMethod(
  1505. unescape('_comment'),
  1506. smalltalk.method({
  1507. selector: unescape('comment'),
  1508. category: 'accessing',
  1509. fn: function (){
  1510. var self=this;
  1511. return (($receiver = smalltalk.send(self, "_basicAt_", ["comment"])) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
  1512. return self;},
  1513. args: [],
  1514. source: unescape('comment%0A%20%20%20%20%5E%28self%20basicAt%3A%20%27comment%27%29%20ifNil%3A%20%5B%27%27%5D'),
  1515. messageSends: ["ifNil:", "basicAt:"],
  1516. referencedClasses: []
  1517. }),
  1518. smalltalk.Behavior);
  1519. smalltalk.addMethod(
  1520. unescape('_comment_'),
  1521. smalltalk.method({
  1522. selector: unescape('comment%3A'),
  1523. category: 'accessing',
  1524. fn: function (aString){
  1525. var self=this;
  1526. smalltalk.send(self, "_basicAt_put_", ["comment", aString]);
  1527. return self;},
  1528. args: ["aString"],
  1529. source: unescape('comment%3A%20aString%0A%20%20%20%20self%20basicAt%3A%20%27comment%27%20put%3A%20aString'),
  1530. messageSends: ["basicAt:put:"],
  1531. referencedClasses: []
  1532. }),
  1533. smalltalk.Behavior);
  1534. smalltalk.addMethod(
  1535. unescape('_commentStamp'),
  1536. smalltalk.method({
  1537. selector: unescape('commentStamp'),
  1538. category: 'accessing',
  1539. fn: function (){
  1540. var self=this;
  1541. return (function($rec){smalltalk.send($rec, "_class_", [self]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.ClassCommentReader || ClassCommentReader), "_new", []));
  1542. return self;},
  1543. args: [],
  1544. source: unescape('commentStamp%0A%20%20%20%20%5EClassCommentReader%20new%0A%09class%3A%20self%3B%0A%09yourself'),
  1545. messageSends: ["class:", "yourself", "new"],
  1546. referencedClasses: ["ClassCommentReader"]
  1547. }),
  1548. smalltalk.Behavior);
  1549. smalltalk.addMethod(
  1550. unescape('_removeCompiledMethod_'),
  1551. smalltalk.method({
  1552. selector: unescape('removeCompiledMethod%3A'),
  1553. category: 'accessing',
  1554. fn: function (aMethod){
  1555. var self=this;
  1556. delete self.fn.prototype[aMethod.selector._asSelector()];
  1557. delete self.fn.prototype.methods[aMethod.selector];
  1558. smalltalk.init(self);;
  1559. return self;},
  1560. args: ["aMethod"],
  1561. 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'),
  1562. messageSends: [],
  1563. referencedClasses: []
  1564. }),
  1565. smalltalk.Behavior);
  1566. smalltalk.addMethod(
  1567. unescape('_inheritsFrom_'),
  1568. smalltalk.method({
  1569. selector: unescape('inheritsFrom%3A'),
  1570. category: 'instance creation',
  1571. fn: function (aClass){
  1572. var self=this;
  1573. return smalltalk.send(smalltalk.send(aClass, "_allSubclasses", []), "_includes_", [self]);
  1574. return self;},
  1575. args: ["aClass"],
  1576. source: unescape('inheritsFrom%3A%20aClass%0A%09%5EaClass%20allSubclasses%20includes%3A%20self'),
  1577. messageSends: ["includes:", "allSubclasses"],
  1578. referencedClasses: []
  1579. }),
  1580. smalltalk.Behavior);
  1581. smalltalk.addMethod(
  1582. unescape('_protocols'),
  1583. smalltalk.method({
  1584. selector: unescape('protocols'),
  1585. category: 'accessing',
  1586. fn: function (){
  1587. var self=this;
  1588. var protocols=nil;
  1589. protocols=smalltalk.send((smalltalk.Array || Array), "_new", []);
  1590. 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", [])]);})]));})]);
  1591. return smalltalk.send(protocols, "_sort", []);
  1592. return self;},
  1593. args: [],
  1594. 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'),
  1595. messageSends: ["new", "do:", "methodDictionary", "ifFalse:", "includes:", "category", "add:", "sort"],
  1596. referencedClasses: ["Array"]
  1597. }),
  1598. smalltalk.Behavior);
  1599. smalltalk.addMethod(
  1600. unescape('_protocolsDo_'),
  1601. smalltalk.method({
  1602. selector: unescape('protocolsDo%3A'),
  1603. category: 'accessing',
  1604. fn: function (aBlock){
  1605. var self=this;
  1606. var methodsByCategory=nil;
  1607. methodsByCategory=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []);
  1608. 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]);})]);
  1609. smalltalk.send(smalltalk.send(self, "_protocols", []), "_do_", [(function(category){return smalltalk.send(aBlock, "_value_value_", [category, smalltalk.send(methodsByCategory, "_at_", [category])]);})]);
  1610. return self;},
  1611. args: ["aBlock"],
  1612. source: unescape('protocolsDo%3A%20aBlock%0A%09%22Execute%20aBlock%20for%20each%20method%20category%20with%0A%09its%20collection%20of%20methods%20in%20the%20sort%20order%20of%20category%20name.%22%0A%0A%09%7C%20methodsByCategory%20%7C%0A%09methodsByCategory%20%3A%3D%20Dictionary%20new.%0A%09self%20methodDictionary%20values%20do%3A%20%5B%3Am%20%7C%0A%09%09%28methodsByCategory%20at%3A%20m%20category%20ifAbsentPut%3A%20%5BArray%20new%5D%29%0A%20%09%09%09add%3A%20m%5D.%20%0A%09self%20protocols%20do%3A%20%5B%3Acategory%20%7C%0A%09%09aBlock%20value%3A%20category%20value%3A%20%28methodsByCategory%20at%3A%20category%29%5D'),
  1613. messageSends: ["new", "do:", "values", "methodDictionary", "add:", "at:ifAbsentPut:", "category", "protocols", "value:value:", "at:"],
  1614. referencedClasses: ["Dictionary", "Array"]
  1615. }),
  1616. smalltalk.Behavior);
  1617. smalltalk.addMethod(
  1618. unescape('_allInstanceVariableNames'),
  1619. smalltalk.method({
  1620. selector: unescape('allInstanceVariableNames'),
  1621. category: 'accessing',
  1622. fn: function (){
  1623. var self=this;
  1624. var result=nil;
  1625. result=smalltalk.send(smalltalk.send(self, "_instanceVariableNames", []), "_copy", []);
  1626. (($receiver = smalltalk.send(self, "_superclass", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(result, "_addAll_", [smalltalk.send(smalltalk.send(self, "_superclass", []), "_allInstanceVariableNames", [])]);})() : nil;
  1627. return result;
  1628. return self;},
  1629. args: [],
  1630. 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'),
  1631. messageSends: ["copy", "instanceVariableNames", "ifNotNil:", "superclass", "addAll:", "allInstanceVariableNames"],
  1632. referencedClasses: []
  1633. }),
  1634. smalltalk.Behavior);
  1635. smalltalk.addMethod(
  1636. unescape('_methodAt_'),
  1637. smalltalk.method({
  1638. selector: unescape('methodAt%3A'),
  1639. category: 'accessing',
  1640. fn: function (aString){
  1641. var self=this;
  1642. return smalltalk.methods(self)[aString];
  1643. return self;},
  1644. args: ["aString"],
  1645. source: unescape('methodAt%3A%20aString%0A%09%3Creturn%20smalltalk.methods%28self%29%5BaString%5D%3E'),
  1646. messageSends: [],
  1647. referencedClasses: []
  1648. }),
  1649. smalltalk.Behavior);
  1650. smalltalk.addMethod(
  1651. unescape('_methodsFor_stamp_'),
  1652. smalltalk.method({
  1653. selector: unescape('methodsFor%3Astamp%3A'),
  1654. category: 'accessing',
  1655. fn: function (aString, aStamp){
  1656. var self=this;
  1657. return smalltalk.send(self, "_methodsFor_", [aString]);
  1658. return self;},
  1659. args: ["aString", "aStamp"],
  1660. 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'),
  1661. messageSends: ["methodsFor:"],
  1662. referencedClasses: []
  1663. }),
  1664. smalltalk.Behavior);
  1665. smalltalk.addMethod(
  1666. unescape('_commentStamp_prior_'),
  1667. smalltalk.method({
  1668. selector: unescape('commentStamp%3Aprior%3A'),
  1669. category: 'accessing',
  1670. fn: function (aStamp, prior){
  1671. var self=this;
  1672. return smalltalk.send(self, "_commentStamp", []);
  1673. return self;},
  1674. args: ["aStamp", "prior"],
  1675. source: unescape('commentStamp%3A%20aStamp%20prior%3A%20prior%0A%20%20%20%20%20%20%20%20%5Eself%20commentStamp'),
  1676. messageSends: ["commentStamp"],
  1677. referencedClasses: []
  1678. }),
  1679. smalltalk.Behavior);
  1680. smalltalk.addMethod(
  1681. unescape('_compile_'),
  1682. smalltalk.method({
  1683. selector: unescape('compile%3A'),
  1684. category: 'compiling',
  1685. fn: function (aString){
  1686. var self=this;
  1687. smalltalk.send(self, "_compile_category_", [aString, ""]);
  1688. return self;},
  1689. args: ["aString"],
  1690. source: unescape('compile%3A%20aString%0A%09self%20compile%3A%20aString%20category%3A%20%27%27'),
  1691. messageSends: ["compile:category:"],
  1692. referencedClasses: []
  1693. }),
  1694. smalltalk.Behavior);
  1695. smalltalk.addMethod(
  1696. unescape('_compile_category_'),
  1697. smalltalk.method({
  1698. selector: unescape('compile%3Acategory%3A'),
  1699. category: 'compiling',
  1700. fn: function (aString, anotherString){
  1701. var self=this;
  1702. var method=nil;
  1703. method=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_load_forClass_", [aString, self]);
  1704. smalltalk.send(method, "_category_", [anotherString]);
  1705. smalltalk.send(self, "_addCompiledMethod_", [method]);
  1706. return self;},
  1707. args: ["aString", "anotherString"],
  1708. 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'),
  1709. messageSends: ["load:forClass:", "new", "category:", "addCompiledMethod:"],
  1710. referencedClasses: ["Compiler"]
  1711. }),
  1712. smalltalk.Behavior);
  1713. smalltalk.addClass('Class', smalltalk.Behavior, [], 'Kernel');
  1714. smalltalk.addMethod(
  1715. unescape('_category'),
  1716. smalltalk.method({
  1717. selector: unescape('category'),
  1718. category: 'accessing',
  1719. fn: function (){
  1720. var self=this;
  1721. return (($receiver = smalltalk.send(self, "_package", [])) == nil || $receiver == undefined) ? (function(){return "Unclassified";})() : (function(){return smalltalk.send(smalltalk.send(self, "_package", []), "_name", []);})();
  1722. return self;},
  1723. args: [],
  1724. source: unescape('category%0A%09%5Eself%20package%20ifNil%3A%20%5B%27Unclassified%27%5D%20ifNotNil%3A%20%5Bself%20package%20name%5D'),
  1725. messageSends: ["ifNil:ifNotNil:", "package", "name"],
  1726. referencedClasses: []
  1727. }),
  1728. smalltalk.Class);
  1729. smalltalk.addMethod(
  1730. unescape('_subclass_instanceVariableNames_'),
  1731. smalltalk.method({
  1732. selector: unescape('subclass%3AinstanceVariableNames%3A'),
  1733. category: 'class creation',
  1734. fn: function (aString, anotherString){
  1735. var self=this;
  1736. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, anotherString, nil]);
  1737. return self;},
  1738. args: ["aString", "anotherString"],
  1739. 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'),
  1740. messageSends: ["subclass:instanceVariableNames:package:"],
  1741. referencedClasses: []
  1742. }),
  1743. smalltalk.Class);
  1744. smalltalk.addMethod(
  1745. unescape('_subclass_instanceVariableNames_category_'),
  1746. smalltalk.method({
  1747. selector: unescape('subclass%3AinstanceVariableNames%3Acategory%3A'),
  1748. category: 'class creation',
  1749. fn: function (aString, aString2, aString3){
  1750. var self=this;
  1751. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
  1752. return self;},
  1753. args: ["aString", "aString2", "aString3"],
  1754. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20category%3A%20aString3%0A%09%22Kept%20for%20compatibility.%22%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3'),
  1755. messageSends: ["subclass:instanceVariableNames:package:"],
  1756. referencedClasses: []
  1757. }),
  1758. smalltalk.Class);
  1759. smalltalk.addMethod(
  1760. unescape('_isClass'),
  1761. smalltalk.method({
  1762. selector: unescape('isClass'),
  1763. category: 'testing',
  1764. fn: function (){
  1765. var self=this;
  1766. return true;
  1767. return self;},
  1768. args: [],
  1769. source: unescape('isClass%0A%09%5Etrue'),
  1770. messageSends: [],
  1771. referencedClasses: []
  1772. }),
  1773. smalltalk.Class);
  1774. smalltalk.addMethod(
  1775. unescape('_printString'),
  1776. smalltalk.method({
  1777. selector: unescape('printString'),
  1778. category: 'printing',
  1779. fn: function (){
  1780. var self=this;
  1781. return smalltalk.send(self, "_name", []);
  1782. return self;},
  1783. args: [],
  1784. source: unescape('printString%0A%09%5Eself%20name'),
  1785. messageSends: ["name"],
  1786. referencedClasses: []
  1787. }),
  1788. smalltalk.Class);
  1789. smalltalk.addMethod(
  1790. unescape('_rename_'),
  1791. smalltalk.method({
  1792. selector: unescape('rename%3A'),
  1793. category: 'accessing',
  1794. fn: function (aString){
  1795. var self=this;
  1796. smalltalk[aString] = self;
  1797. delete smalltalk[self.className];
  1798. self.className = aString;
  1799. ;
  1800. return self;},
  1801. args: ["aString"],
  1802. 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'),
  1803. messageSends: [],
  1804. referencedClasses: []
  1805. }),
  1806. smalltalk.Class);
  1807. smalltalk.addMethod(
  1808. unescape('_subclass_instanceVariableNames_classVariableNames_poolDictionaries_category_'),
  1809. smalltalk.method({
  1810. selector: unescape('subclass%3AinstanceVariableNames%3AclassVariableNames%3ApoolDictionaries%3Acategory%3A'),
  1811. category: 'class creation',
  1812. fn: function (aString, aString2, classVars, pools, aString3){
  1813. var self=this;
  1814. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
  1815. return self;},
  1816. args: ["aString", "aString2", "classVars", "pools", "aString3"],
  1817. 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'),
  1818. messageSends: ["subclass:instanceVariableNames:package:"],
  1819. referencedClasses: []
  1820. }),
  1821. smalltalk.Class);
  1822. smalltalk.addMethod(
  1823. unescape('_package'),
  1824. smalltalk.method({
  1825. selector: unescape('package'),
  1826. category: 'accessing',
  1827. fn: function (){
  1828. var self=this;
  1829. return self.pkg;
  1830. return self;},
  1831. args: [],
  1832. source: unescape('package%0A%09%3Creturn%20self.pkg%3E'),
  1833. messageSends: [],
  1834. referencedClasses: []
  1835. }),
  1836. smalltalk.Class);
  1837. smalltalk.addMethod(
  1838. unescape('_package_'),
  1839. smalltalk.method({
  1840. selector: unescape('package%3A'),
  1841. category: 'accessing',
  1842. fn: function (aPackage){
  1843. var self=this;
  1844. self.pkg = aPackage;
  1845. return self;},
  1846. args: ["aPackage"],
  1847. source: unescape('package%3A%20aPackage%0A%09%3Cself.pkg%20%3D%20aPackage%3E'),
  1848. messageSends: [],
  1849. referencedClasses: []
  1850. }),
  1851. smalltalk.Class);
  1852. smalltalk.addMethod(
  1853. unescape('_subclass_instanceVariableNames_package_'),
  1854. smalltalk.method({
  1855. selector: unescape('subclass%3AinstanceVariableNames%3Apackage%3A'),
  1856. category: 'class creation',
  1857. fn: function (aString, aString2, aString3){
  1858. var self=this;
  1859. return smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_superclass_subclass_instanceVariableNames_package_", [self, aString, aString2, aString3]);
  1860. return self;},
  1861. args: ["aString", "aString2", "aString3"],
  1862. 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'),
  1863. messageSends: ["superclass:subclass:instanceVariableNames:package:", "new"],
  1864. referencedClasses: ["ClassBuilder"]
  1865. }),
  1866. smalltalk.Class);
  1867. smalltalk.addClass('Metaclass', smalltalk.Behavior, [], 'Kernel');
  1868. smalltalk.addMethod(
  1869. unescape('_instanceClass'),
  1870. smalltalk.method({
  1871. selector: unescape('instanceClass'),
  1872. category: 'accessing',
  1873. fn: function (){
  1874. var self=this;
  1875. return self.instanceClass;
  1876. return self;},
  1877. args: [],
  1878. source: unescape('instanceClass%0A%09%3Creturn%20self.instanceClass%3E'),
  1879. messageSends: [],
  1880. referencedClasses: []
  1881. }),
  1882. smalltalk.Metaclass);
  1883. smalltalk.addMethod(
  1884. unescape('_instanceVariableNames_'),
  1885. smalltalk.method({
  1886. selector: unescape('instanceVariableNames%3A'),
  1887. category: 'accessing',
  1888. fn: function (aCollection){
  1889. var self=this;
  1890. smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_class_instanceVariableNames_", [self, aCollection]);
  1891. return self;},
  1892. args: ["aCollection"],
  1893. source: unescape('instanceVariableNames%3A%20aCollection%0A%09ClassBuilder%20new%0A%09%20%20%20%20class%3A%20self%20instanceVariableNames%3A%20aCollection'),
  1894. messageSends: ["class:instanceVariableNames:", "new"],
  1895. referencedClasses: ["ClassBuilder"]
  1896. }),
  1897. smalltalk.Metaclass);
  1898. smalltalk.addMethod(
  1899. unescape('_isMetaclass'),
  1900. smalltalk.method({
  1901. selector: unescape('isMetaclass'),
  1902. category: 'testing',
  1903. fn: function (){
  1904. var self=this;
  1905. return true;
  1906. return self;},
  1907. args: [],
  1908. source: unescape('isMetaclass%0A%09%5Etrue'),
  1909. messageSends: [],
  1910. referencedClasses: []
  1911. }),
  1912. smalltalk.Metaclass);
  1913. smalltalk.addMethod(
  1914. unescape('_printString'),
  1915. smalltalk.method({
  1916. selector: unescape('printString'),
  1917. category: 'printing',
  1918. fn: function (){
  1919. var self=this;
  1920. return smalltalk.send(smalltalk.send(smalltalk.send(self, "_instanceClass", []), "_name", []), "__comma", [" class"]);
  1921. return self;},
  1922. args: [],
  1923. source: unescape('printString%0A%09%5Eself%20instanceClass%20name%2C%20%27%20class%27'),
  1924. messageSends: [unescape("%2C"), "name", "instanceClass"],
  1925. referencedClasses: []
  1926. }),
  1927. smalltalk.Metaclass);
  1928. smalltalk.addClass('CompiledMethod', smalltalk.Object, [], 'Kernel');
  1929. smalltalk.addMethod(
  1930. unescape('_source'),
  1931. smalltalk.method({
  1932. selector: unescape('source'),
  1933. category: 'accessing',
  1934. fn: function (){
  1935. var self=this;
  1936. return (($receiver = smalltalk.send(self, "_basicAt_", ["source"])) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
  1937. return self;},
  1938. args: [],
  1939. source: unescape('source%0A%09%5E%28self%20basicAt%3A%20%27source%27%29%20ifNil%3A%20%5B%27%27%5D'),
  1940. messageSends: ["ifNil:", "basicAt:"],
  1941. referencedClasses: []
  1942. }),
  1943. smalltalk.CompiledMethod);
  1944. smalltalk.addMethod(
  1945. unescape('_source_'),
  1946. smalltalk.method({
  1947. selector: unescape('source%3A'),
  1948. category: 'accessing',
  1949. fn: function (aString){
  1950. var self=this;
  1951. smalltalk.send(self, "_basicAt_put_", ["source", aString]);
  1952. return self;},
  1953. args: ["aString"],
  1954. source: unescape('source%3A%20aString%0A%09self%20basicAt%3A%20%27source%27%20put%3A%20aString'),
  1955. messageSends: ["basicAt:put:"],
  1956. referencedClasses: []
  1957. }),
  1958. smalltalk.CompiledMethod);
  1959. smalltalk.addMethod(
  1960. unescape('_category'),
  1961. smalltalk.method({
  1962. selector: unescape('category'),
  1963. category: 'accessing',
  1964. fn: function (){
  1965. var self=this;
  1966. return (($receiver = smalltalk.send(self, "_basicAt_", ["category"])) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
  1967. return self;},
  1968. args: [],
  1969. source: unescape('category%0A%09%5E%28self%20basicAt%3A%20%27category%27%29%20ifNil%3A%20%5B%27%27%5D'),
  1970. messageSends: ["ifNil:", "basicAt:"],
  1971. referencedClasses: []
  1972. }),
  1973. smalltalk.CompiledMethod);
  1974. smalltalk.addMethod(
  1975. unescape('_category_'),
  1976. smalltalk.method({
  1977. selector: unescape('category%3A'),
  1978. category: 'accessing',
  1979. fn: function (aString){
  1980. var self=this;
  1981. smalltalk.send(self, "_basicAt_put_", ["category", aString]);
  1982. return self;},
  1983. args: ["aString"],
  1984. source: unescape('category%3A%20aString%0A%09self%20basicAt%3A%20%27category%27%20put%3A%20aString'),
  1985. messageSends: ["basicAt:put:"],
  1986. referencedClasses: []
  1987. }),
  1988. smalltalk.CompiledMethod);
  1989. smalltalk.addMethod(
  1990. unescape('_selector'),
  1991. smalltalk.method({
  1992. selector: unescape('selector'),
  1993. category: 'accessing',
  1994. fn: function (){
  1995. var self=this;
  1996. return smalltalk.send(self, "_basicAt_", ["selector"]);
  1997. return self;},
  1998. args: [],
  1999. source: unescape('selector%0A%09%5Eself%20basicAt%3A%20%27selector%27'),
  2000. messageSends: ["basicAt:"],
  2001. referencedClasses: []
  2002. }),
  2003. smalltalk.CompiledMethod);
  2004. smalltalk.addMethod(
  2005. unescape('_selector_'),
  2006. smalltalk.method({
  2007. selector: unescape('selector%3A'),
  2008. category: 'accessing',
  2009. fn: function (aString){
  2010. var self=this;
  2011. smalltalk.send(self, "_basicAt_put_", ["selector", aString]);
  2012. return self;},
  2013. args: ["aString"],
  2014. source: unescape('selector%3A%20aString%0A%09self%20basicAt%3A%20%27selector%27%20put%3A%20aString'),
  2015. messageSends: ["basicAt:put:"],
  2016. referencedClasses: []
  2017. }),
  2018. smalltalk.CompiledMethod);
  2019. smalltalk.addMethod(
  2020. unescape('_fn'),
  2021. smalltalk.method({
  2022. selector: unescape('fn'),
  2023. category: 'accessing',
  2024. fn: function (){
  2025. var self=this;
  2026. return smalltalk.send(self, "_basicAt_", ["fn"]);
  2027. return self;},
  2028. args: [],
  2029. source: unescape('fn%0A%09%5Eself%20basicAt%3A%20%27fn%27'),
  2030. messageSends: ["basicAt:"],
  2031. referencedClasses: []
  2032. }),
  2033. smalltalk.CompiledMethod);
  2034. smalltalk.addMethod(
  2035. unescape('_fn_'),
  2036. smalltalk.method({
  2037. selector: unescape('fn%3A'),
  2038. category: 'accessing',
  2039. fn: function (aBlock){
  2040. var self=this;
  2041. smalltalk.send(self, "_basicAt_put_", ["fn", aBlock]);
  2042. return self;},
  2043. args: ["aBlock"],
  2044. source: unescape('fn%3A%20aBlock%0A%09self%20basicAt%3A%20%27fn%27%20put%3A%20aBlock'),
  2045. messageSends: ["basicAt:put:"],
  2046. referencedClasses: []
  2047. }),
  2048. smalltalk.CompiledMethod);
  2049. smalltalk.addMethod(
  2050. unescape('_messageSends'),
  2051. smalltalk.method({
  2052. selector: unescape('messageSends'),
  2053. category: 'accessing',
  2054. fn: function (){
  2055. var self=this;
  2056. return smalltalk.send(self, "_basicAt_", ["messageSends"]);
  2057. return self;},
  2058. args: [],
  2059. source: unescape('messageSends%0A%09%5Eself%20basicAt%3A%20%27messageSends%27'),
  2060. messageSends: ["basicAt:"],
  2061. referencedClasses: []
  2062. }),
  2063. smalltalk.CompiledMethod);
  2064. smalltalk.addMethod(
  2065. unescape('_methodClass'),
  2066. smalltalk.method({
  2067. selector: unescape('methodClass'),
  2068. category: 'accessing',
  2069. fn: function (){
  2070. var self=this;
  2071. return smalltalk.send(self, "_basicAt_", ["methodClass"]);
  2072. return self;},
  2073. args: [],
  2074. source: unescape('methodClass%0A%09%5Eself%20basicAt%3A%20%27methodClass%27'),
  2075. messageSends: ["basicAt:"],
  2076. referencedClasses: []
  2077. }),
  2078. smalltalk.CompiledMethod);
  2079. smalltalk.addMethod(
  2080. unescape('_referencedClasses'),
  2081. smalltalk.method({
  2082. selector: unescape('referencedClasses'),
  2083. category: 'accessing',
  2084. fn: function (){
  2085. var self=this;
  2086. return smalltalk.send(self, "_basicAt_", ["referencedClasses"]);
  2087. return self;},
  2088. args: [],
  2089. source: unescape('referencedClasses%0A%09%5Eself%20basicAt%3A%20%27referencedClasses%27'),
  2090. messageSends: ["basicAt:"],
  2091. referencedClasses: []
  2092. }),
  2093. smalltalk.CompiledMethod);
  2094. smalltalk.addMethod(
  2095. unescape('_arguments'),
  2096. smalltalk.method({
  2097. selector: unescape('arguments'),
  2098. category: 'accessing',
  2099. fn: function (){
  2100. var self=this;
  2101. return self.args || [];
  2102. return self;},
  2103. args: [],
  2104. source: unescape('arguments%0A%09%3Creturn%20self.args%20%7C%7C%20%5B%5D%3E'),
  2105. messageSends: [],
  2106. referencedClasses: []
  2107. }),
  2108. smalltalk.CompiledMethod);
  2109. smalltalk.addClass('Number', smalltalk.Object, [], 'Kernel');
  2110. smalltalk.addMethod(
  2111. unescape('__eq'),
  2112. smalltalk.method({
  2113. selector: unescape('%3D'),
  2114. category: 'comparing',
  2115. fn: function (aNumber){
  2116. var self=this;
  2117. try{((($receiver = smalltalk.send(smalltalk.send(aNumber, "_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}})})();})]));
  2118. return Number(self) == aNumber;
  2119. return self;
  2120. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
  2121. args: ["aNumber"],
  2122. source: unescape('%3D%20aNumber%0A%09aNumber%20class%20%3D%20self%20class%20ifFalse%3A%20%5B%5Efalse%5D.%20%0A%09%3Creturn%20Number%28self%29%20%3D%3D%20aNumber%3E'),
  2123. messageSends: ["ifFalse:", unescape("%3D"), "class"],
  2124. referencedClasses: []
  2125. }),
  2126. smalltalk.Number);
  2127. smalltalk.addMethod(
  2128. unescape('__gt'),
  2129. smalltalk.method({
  2130. selector: unescape('%3E'),
  2131. category: 'comparing',
  2132. fn: function (aNumber){
  2133. var self=this;
  2134. return self > aNumber;
  2135. return self;},
  2136. args: ["aNumber"],
  2137. source: unescape('%3E%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20%3E%3E%20aNumber%3E'),
  2138. messageSends: [],
  2139. referencedClasses: []
  2140. }),
  2141. smalltalk.Number);
  2142. smalltalk.addMethod(
  2143. unescape('__lt'),
  2144. smalltalk.method({
  2145. selector: unescape('%3C'),
  2146. category: 'comparing',
  2147. fn: function (aNumber){
  2148. var self=this;
  2149. return self < aNumber;
  2150. return self;},
  2151. args: ["aNumber"],
  2152. source: unescape('%3C%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20%3C%20aNumber%3E'),
  2153. messageSends: [],
  2154. referencedClasses: []
  2155. }),
  2156. smalltalk.Number);
  2157. smalltalk.addMethod(
  2158. unescape('__gt_eq'),
  2159. smalltalk.method({
  2160. selector: unescape('%3E%3D'),
  2161. category: 'comparing',
  2162. fn: function (aNumber){
  2163. var self=this;
  2164. return self >= aNumber;
  2165. return self;},
  2166. args: ["aNumber"],
  2167. source: unescape('%3E%3D%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20%3E%3E%3D%20aNumber%3E'),
  2168. messageSends: [],
  2169. referencedClasses: []
  2170. }),
  2171. smalltalk.Number);
  2172. smalltalk.addMethod(
  2173. unescape('__lt_eq'),
  2174. smalltalk.method({
  2175. selector: unescape('%3C%3D'),
  2176. category: 'comparing',
  2177. fn: function (aNumber){
  2178. var self=this;
  2179. return self <= aNumber;
  2180. return self;},
  2181. args: ["aNumber"],
  2182. source: unescape('%3C%3D%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20%3C%3D%20aNumber%3E'),
  2183. messageSends: [],
  2184. referencedClasses: []
  2185. }),
  2186. smalltalk.Number);
  2187. smalltalk.addMethod(
  2188. unescape('__plus'),
  2189. smalltalk.method({
  2190. selector: unescape('+'),
  2191. category: 'arithmetic',
  2192. fn: function (aNumber){
  2193. var self=this;
  2194. return self + aNumber;
  2195. return self;},
  2196. args: ["aNumber"],
  2197. source: unescape('+%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20+%20aNumber%3E'),
  2198. messageSends: [],
  2199. referencedClasses: []
  2200. }),
  2201. smalltalk.Number);
  2202. smalltalk.addMethod(
  2203. unescape('__minus'),
  2204. smalltalk.method({
  2205. selector: unescape('-'),
  2206. category: 'arithmetic',
  2207. fn: function (aNumber){
  2208. var self=this;
  2209. return self - aNumber;
  2210. return self;},
  2211. args: ["aNumber"],
  2212. source: unescape('-%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20-%20aNumber%3E'),
  2213. messageSends: [],
  2214. referencedClasses: []
  2215. }),
  2216. smalltalk.Number);
  2217. smalltalk.addMethod(
  2218. unescape('__star'),
  2219. smalltalk.method({
  2220. selector: unescape('*'),
  2221. category: 'arithmetic',
  2222. fn: function (aNumber){
  2223. var self=this;
  2224. return self * aNumber;
  2225. return self;},
  2226. args: ["aNumber"],
  2227. source: unescape('*%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20*%20aNumber%3E'),
  2228. messageSends: [],
  2229. referencedClasses: []
  2230. }),
  2231. smalltalk.Number);
  2232. smalltalk.addMethod(
  2233. unescape('__slash'),
  2234. smalltalk.method({
  2235. selector: unescape('/'),
  2236. category: 'arithmetic',
  2237. fn: function (aNumber){
  2238. var self=this;
  2239. return self / aNumber;
  2240. return self;},
  2241. args: ["aNumber"],
  2242. source: unescape('/%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20/%20aNumber%3E'),
  2243. messageSends: [],
  2244. referencedClasses: []
  2245. }),
  2246. smalltalk.Number);
  2247. smalltalk.addMethod(
  2248. unescape('_max_'),
  2249. smalltalk.method({
  2250. selector: unescape('max%3A'),
  2251. category: 'arithmetic',
  2252. fn: function (aNumber){
  2253. var self=this;
  2254. return Math.max(self, aNumber);;
  2255. return self;},
  2256. args: ["aNumber"],
  2257. source: unescape('max%3A%20aNumber%0A%09%3Creturn%20Math.max%28self%2C%20aNumber%29%3B%3E'),
  2258. messageSends: [],
  2259. referencedClasses: []
  2260. }),
  2261. smalltalk.Number);
  2262. smalltalk.addMethod(
  2263. unescape('_min_'),
  2264. smalltalk.method({
  2265. selector: unescape('min%3A'),
  2266. category: 'arithmetic',
  2267. fn: function (aNumber){
  2268. var self=this;
  2269. return Math.min(self, aNumber);;
  2270. return self;},
  2271. args: ["aNumber"],
  2272. source: unescape('min%3A%20aNumber%0A%09%3Creturn%20Math.min%28self%2C%20aNumber%29%3B%3E'),
  2273. messageSends: [],
  2274. referencedClasses: []
  2275. }),
  2276. smalltalk.Number);
  2277. smalltalk.addMethod(
  2278. unescape('_rounded'),
  2279. smalltalk.method({
  2280. selector: unescape('rounded'),
  2281. category: 'converting',
  2282. fn: function (){
  2283. var self=this;
  2284. return Math.round(self);;
  2285. return self;},
  2286. args: [],
  2287. source: unescape('rounded%0A%09%3Creturn%20Math.round%28self%29%3B%3E'),
  2288. messageSends: [],
  2289. referencedClasses: []
  2290. }),
  2291. smalltalk.Number);
  2292. smalltalk.addMethod(
  2293. unescape('_truncated'),
  2294. smalltalk.method({
  2295. selector: unescape('truncated'),
  2296. category: 'converting',
  2297. fn: function (){
  2298. var self=this;
  2299. var result=nil;
  2300. ((($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));;})]));
  2301. return result;
  2302. return self;},
  2303. args: [],
  2304. 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'),
  2305. messageSends: ["ifTrue:ifFalse:", unescape("%3E%3D")],
  2306. referencedClasses: []
  2307. }),
  2308. smalltalk.Number);
  2309. smalltalk.addMethod(
  2310. unescape('_to_'),
  2311. smalltalk.method({
  2312. selector: unescape('to%3A'),
  2313. category: 'converting',
  2314. fn: function (aNumber){
  2315. var self=this;
  2316. var array=nil;
  2317. var first=nil;
  2318. var last=nil;
  2319. var count=nil;
  2320. first=smalltalk.send(self, "_truncated", []);
  2321. last=((($receiver = smalltalk.send(aNumber, "_truncated", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));
  2322. count=(1);
  2323. array=smalltalk.send((smalltalk.Array || Array), "_new", []);
  2324. 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)]));})]);
  2325. return array;
  2326. return self;},
  2327. args: ["aNumber"],
  2328. 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'),
  2329. messageSends: ["truncated", unescape("+"), "new", "timesRepeat:", unescape("-"), "at:put:"],
  2330. referencedClasses: ["Array"]
  2331. }),
  2332. smalltalk.Number);
  2333. smalltalk.addMethod(
  2334. unescape('_timesRepeat_'),
  2335. smalltalk.method({
  2336. selector: unescape('timesRepeat%3A'),
  2337. category: 'enumerating',
  2338. fn: function (aBlock){
  2339. var self=this;
  2340. var integer=nil;
  2341. var count=nil;
  2342. integer=smalltalk.send(self, "_truncated", []);
  2343. count=(1);
  2344. (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)]));})()}})();
  2345. return self;},
  2346. args: ["aBlock"],
  2347. 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'),
  2348. messageSends: ["truncated", "whileFalse:", unescape("%3E"), "value", unescape("+")],
  2349. referencedClasses: []
  2350. }),
  2351. smalltalk.Number);
  2352. smalltalk.addMethod(
  2353. unescape('_to_do_'),
  2354. smalltalk.method({
  2355. selector: unescape('to%3Ado%3A'),
  2356. category: 'enumerating',
  2357. fn: function (stop, aBlock){
  2358. var self=this;
  2359. var nextValue=nil;
  2360. nextValue=self;
  2361. (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)]));})()}})();
  2362. return self;},
  2363. args: ["stop", "aBlock"],
  2364. 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'),
  2365. messageSends: ["whileTrue:", unescape("%3C%3D"), "value:", unescape("+")],
  2366. referencedClasses: []
  2367. }),
  2368. smalltalk.Number);
  2369. smalltalk.addMethod(
  2370. unescape('_asString'),
  2371. smalltalk.method({
  2372. selector: unescape('asString'),
  2373. category: 'converting',
  2374. fn: function (){
  2375. var self=this;
  2376. return smalltalk.send(self, "_printString", []);
  2377. return self;},
  2378. args: [],
  2379. source: unescape('asString%0A%09%5Eself%20printString'),
  2380. messageSends: ["printString"],
  2381. referencedClasses: []
  2382. }),
  2383. smalltalk.Number);
  2384. smalltalk.addMethod(
  2385. unescape('_asJavascript'),
  2386. smalltalk.method({
  2387. selector: unescape('asJavascript'),
  2388. category: 'converting',
  2389. fn: function (){
  2390. var self=this;
  2391. return smalltalk.send(smalltalk.send(unescape("%28"), "__comma", [smalltalk.send(self, "_printString", [])]), "__comma", [unescape("%29")]);
  2392. return self;},
  2393. args: [],
  2394. source: unescape('asJavascript%0A%09%5E%27%28%27%2C%20self%20printString%2C%20%27%29%27'),
  2395. messageSends: [unescape("%2C"), "printString"],
  2396. referencedClasses: []
  2397. }),
  2398. smalltalk.Number);
  2399. smalltalk.addMethod(
  2400. unescape('_printString'),
  2401. smalltalk.method({
  2402. selector: unescape('printString'),
  2403. category: 'printing',
  2404. fn: function (){
  2405. var self=this;
  2406. return String(self);
  2407. return self;},
  2408. args: [],
  2409. source: unescape('printString%0A%09%3Creturn%20String%28self%29%3E'),
  2410. messageSends: [],
  2411. referencedClasses: []
  2412. }),
  2413. smalltalk.Number);
  2414. smalltalk.addMethod(
  2415. unescape('_isNumber'),
  2416. smalltalk.method({
  2417. selector: unescape('isNumber'),
  2418. category: 'testing',
  2419. fn: function (){
  2420. var self=this;
  2421. return true;
  2422. return self;},
  2423. args: [],
  2424. source: unescape('isNumber%0A%09%5Etrue'),
  2425. messageSends: [],
  2426. referencedClasses: []
  2427. }),
  2428. smalltalk.Number);
  2429. smalltalk.addMethod(
  2430. unescape('_atRandom'),
  2431. smalltalk.method({
  2432. selector: unescape('atRandom'),
  2433. category: 'converting',
  2434. fn: function (){
  2435. var self=this;
  2436. 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)]));
  2437. return self;},
  2438. args: [],
  2439. source: unescape('atRandom%0A%20%20%20%20%5E%28Random%20new%20next%20*%20self%29%20truncated%20+%201'),
  2440. messageSends: [unescape("+"), "truncated", unescape("*"), "next", "new"],
  2441. referencedClasses: ["Random"]
  2442. }),
  2443. smalltalk.Number);
  2444. smalltalk.addMethod(
  2445. unescape('__at'),
  2446. smalltalk.method({
  2447. selector: unescape('@'),
  2448. category: 'converting',
  2449. fn: function (aNumber){
  2450. var self=this;
  2451. return smalltalk.send((smalltalk.Point || Point), "_x_y_", [self, aNumber]);
  2452. return self;},
  2453. args: ["aNumber"],
  2454. source: unescape('@%20aNumber%0A%09%5EPoint%20x%3A%20self%20y%3A%20aNumber'),
  2455. messageSends: ["x:y:"],
  2456. referencedClasses: ["Point"]
  2457. }),
  2458. smalltalk.Number);
  2459. smalltalk.addMethod(
  2460. unescape('_asPoint'),
  2461. smalltalk.method({
  2462. selector: unescape('asPoint'),
  2463. category: 'converting',
  2464. fn: function (){
  2465. var self=this;
  2466. return smalltalk.send((smalltalk.Point || Point), "_x_y_", [self, self]);
  2467. return self;},
  2468. args: [],
  2469. source: unescape('asPoint%0A%09%5EPoint%20x%3A%20self%20y%3A%20self'),
  2470. messageSends: ["x:y:"],
  2471. referencedClasses: ["Point"]
  2472. }),
  2473. smalltalk.Number);
  2474. smalltalk.addMethod(
  2475. unescape('_clearInterval'),
  2476. smalltalk.method({
  2477. selector: unescape('clearInterval'),
  2478. category: 'timeouts/intervals',
  2479. fn: function (){
  2480. var self=this;
  2481. clearInterval(Number(self));
  2482. return self;},
  2483. args: [],
  2484. source: unescape('clearInterval%0A%09%3CclearInterval%28Number%28self%29%29%3E'),
  2485. messageSends: [],
  2486. referencedClasses: []
  2487. }),
  2488. smalltalk.Number);
  2489. smalltalk.addMethod(
  2490. unescape('_clearTimeout'),
  2491. smalltalk.method({
  2492. selector: unescape('clearTimeout'),
  2493. category: 'timeouts/intervals',
  2494. fn: function (){
  2495. var self=this;
  2496. clearTimeout(Number(self));
  2497. return self;},
  2498. args: [],
  2499. source: unescape('clearTimeout%0A%09%3CclearTimeout%28Number%28self%29%29%3E'),
  2500. messageSends: [],
  2501. referencedClasses: []
  2502. }),
  2503. smalltalk.Number);
  2504. smalltalk.addMethod(
  2505. unescape('_even'),
  2506. smalltalk.method({
  2507. selector: unescape('even'),
  2508. category: 'testing',
  2509. fn: function (){
  2510. var self=this;
  2511. return smalltalk.send((0), "__eq", [smalltalk.send(self, "_\\\\", [(2)])]);
  2512. return self;},
  2513. args: [],
  2514. source: unescape('even%0A%09%5E%200%20%3D%20%28self%20%5C%5C%202%29'),
  2515. messageSends: [unescape("%3D"), unescape("%5C%5C%5C%5C")],
  2516. referencedClasses: []
  2517. }),
  2518. smalltalk.Number);
  2519. smalltalk.addMethod(
  2520. unescape('_odd'),
  2521. smalltalk.method({
  2522. selector: unescape('odd'),
  2523. category: 'testing',
  2524. fn: function (){
  2525. var self=this;
  2526. return smalltalk.send(smalltalk.send(self, "_even", []), "_not", []);
  2527. return self;},
  2528. args: [],
  2529. source: unescape('odd%0A%09%5E%20self%20even%20not'),
  2530. messageSends: ["not", "even"],
  2531. referencedClasses: []
  2532. }),
  2533. smalltalk.Number);
  2534. smalltalk.addMethod(
  2535. unescape('_negated'),
  2536. smalltalk.method({
  2537. selector: unescape('negated'),
  2538. category: 'arithmetic',
  2539. fn: function (){
  2540. var self=this;
  2541. return (0) - self;
  2542. return self;},
  2543. args: [],
  2544. source: unescape('negated%0A%09%5E0%20-%20self'),
  2545. messageSends: [unescape("-")],
  2546. referencedClasses: []
  2547. }),
  2548. smalltalk.Number);
  2549. smalltalk.addMethod(
  2550. unescape('__eq_eq'),
  2551. smalltalk.method({
  2552. selector: unescape('%3D%3D'),
  2553. category: 'comparing',
  2554. fn: function (aNumber){
  2555. var self=this;
  2556. try{((($receiver = smalltalk.send(smalltalk.send(aNumber, "_class", []), "__eq", [smalltalk.send(self, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq_eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq_eq', fn: function(){return false}})})();})]));
  2557. return Number(self) === Number(aNumber);
  2558. return self;
  2559. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq_eq'){return e.fn()} throw(e)}},
  2560. args: ["aNumber"],
  2561. source: unescape('%3D%3D%20aNumber%0A%09aNumber%20class%20%3D%20self%20class%20ifFalse%3A%20%5B%5Efalse%5D.%20%0A%09%3Creturn%20Number%28self%29%20%3D%3D%3D%20Number%28aNumber%29%3E'),
  2562. messageSends: ["ifFalse:", unescape("%3D"), "class"],
  2563. referencedClasses: []
  2564. }),
  2565. smalltalk.Number);
  2566. smalltalk.addMethod(
  2567. unescape('_printShowingDecimalPlaces_'),
  2568. smalltalk.method({
  2569. selector: unescape('printShowingDecimalPlaces%3A'),
  2570. category: 'printing',
  2571. fn: function (placesDesired){
  2572. var self=this;
  2573. return self.toFixed(placesDesired);
  2574. return self;},
  2575. args: ["placesDesired"],
  2576. source: unescape('printShowingDecimalPlaces%3A%20placesDesired%0A%09%3Creturn%20self.toFixed%28placesDesired%29%3E'),
  2577. messageSends: [],
  2578. referencedClasses: []
  2579. }),
  2580. smalltalk.Number);
  2581. smalltalk.addMethod(
  2582. unescape('_%5C'),
  2583. smalltalk.method({
  2584. selector: unescape('%5C'),
  2585. category: '',
  2586. fn: function (aNumber){
  2587. var self=this;
  2588. return self % aNumber;
  2589. return self;},
  2590. args: ["aNumber"],
  2591. source: unescape(''),
  2592. messageSends: [],
  2593. referencedClasses: []
  2594. }),
  2595. smalltalk.Number);
  2596. smalltalk.addMethod(
  2597. unescape('_to_by_'),
  2598. smalltalk.method({
  2599. selector: unescape('to%3Aby%3A'),
  2600. category: 'converting',
  2601. fn: function (stop, step){
  2602. var self=this;
  2603. var array=nil;
  2604. var value=nil;
  2605. var pos=nil;
  2606. value=self;
  2607. array=smalltalk.send((smalltalk.Array || Array), "_new", []);
  2608. pos=(1);
  2609. ((($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")]);})]));
  2610. ((($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]));})()}})();})]));
  2611. return array;
  2612. return self;},
  2613. args: ["stop", "step"],
  2614. 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'),
  2615. messageSends: ["new", "ifTrue:", unescape("%3D"), "error:", "ifTrue:ifFalse:", unescape("%3C"), "whileTrue:", unescape("%3E%3D"), "at:put:", unescape("+"), unescape("%3C%3D")],
  2616. referencedClasses: ["Array"]
  2617. }),
  2618. smalltalk.Number);
  2619. smalltalk.addMethod(
  2620. unescape('_to_by_do_'),
  2621. smalltalk.method({
  2622. selector: unescape('to%3Aby%3Ado%3A'),
  2623. category: 'enumerating',
  2624. fn: function (stop, step, aBlock){
  2625. var self=this;
  2626. var value=nil;
  2627. value=self;
  2628. ((($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")]);})]));
  2629. ((($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]));})()}})();})]));
  2630. return self;},
  2631. args: ["stop", "step", "aBlock"],
  2632. 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'),
  2633. messageSends: ["ifTrue:", unescape("%3D"), "error:", "ifTrue:ifFalse:", unescape("%3C"), "whileTrue:", unescape("%3E%3D"), "value:", unescape("+"), unescape("%3C%3D")],
  2634. referencedClasses: []
  2635. }),
  2636. smalltalk.Number);
  2637. smalltalk.addMethod(
  2638. unescape('_deepCopy'),
  2639. smalltalk.method({
  2640. selector: unescape('deepCopy'),
  2641. category: 'copying',
  2642. fn: function (){
  2643. var self=this;
  2644. return smalltalk.send(self, "_copy", []);
  2645. return self;},
  2646. args: [],
  2647. source: unescape('deepCopy%0A%09%5Eself%20copy'),
  2648. messageSends: ["copy"],
  2649. referencedClasses: []
  2650. }),
  2651. smalltalk.Number);
  2652. smalltalk.addMethod(
  2653. unescape('_copy'),
  2654. smalltalk.method({
  2655. selector: unescape('copy'),
  2656. category: 'copying',
  2657. fn: function (){
  2658. var self=this;
  2659. return self;
  2660. return self;},
  2661. args: [],
  2662. source: unescape('copy%0A%09%5Eself'),
  2663. messageSends: [],
  2664. referencedClasses: []
  2665. }),
  2666. smalltalk.Number);
  2667. smalltalk.addMethod(
  2668. unescape('_%5C%5C'),
  2669. smalltalk.method({
  2670. selector: unescape('%5C%5C'),
  2671. category: 'arithmetic',
  2672. fn: function (aNumber){
  2673. var self=this;
  2674. return self % aNumber;
  2675. return self;},
  2676. args: ["aNumber"],
  2677. source: unescape('%5C%5C%20aNumber%0A%09%3Creturn%20self%20%25%20aNumber%3E'),
  2678. messageSends: [],
  2679. referencedClasses: []
  2680. }),
  2681. smalltalk.Number);
  2682. smalltalk.addMethod(
  2683. unescape('_sqrt'),
  2684. smalltalk.method({
  2685. selector: unescape('sqrt'),
  2686. category: 'arithmetic',
  2687. fn: function (){
  2688. var self=this;
  2689. return Math.sqrt(self);
  2690. return self;},
  2691. args: [],
  2692. source: unescape('sqrt%0A%09%3Creturn%20Math.sqrt%28self%29%3E'),
  2693. messageSends: [],
  2694. referencedClasses: []
  2695. }),
  2696. smalltalk.Number);
  2697. smalltalk.addMethod(
  2698. unescape('_squared'),
  2699. smalltalk.method({
  2700. selector: unescape('squared'),
  2701. category: 'arithmetic',
  2702. fn: function (){
  2703. var self=this;
  2704. return self * self;
  2705. return self;},
  2706. args: [],
  2707. source: unescape('squared%0A%09%5Eself%20*%20self'),
  2708. messageSends: [unescape("*")],
  2709. referencedClasses: []
  2710. }),
  2711. smalltalk.Number);
  2712. smalltalk.addMethod(
  2713. unescape('_pi'),
  2714. smalltalk.method({
  2715. selector: unescape('pi'),
  2716. category: 'instance creation',
  2717. fn: function (){
  2718. var self=this;
  2719. return Math.PI;
  2720. return self;},
  2721. args: [],
  2722. source: unescape('pi%0A%09%3Creturn%20Math.PI%3E'),
  2723. messageSends: [],
  2724. referencedClasses: []
  2725. }),
  2726. smalltalk.Number.klass);
  2727. smalltalk.addClass('BlockClosure', smalltalk.Object, [], 'Kernel');
  2728. smalltalk.addMethod(
  2729. unescape('_compiledSource'),
  2730. smalltalk.method({
  2731. selector: unescape('compiledSource'),
  2732. category: 'accessing',
  2733. fn: function (){
  2734. var self=this;
  2735. return self.toString();
  2736. return self;},
  2737. args: [],
  2738. source: unescape('compiledSource%0A%09%3Creturn%20self.toString%28%29%3E'),
  2739. messageSends: [],
  2740. referencedClasses: []
  2741. }),
  2742. smalltalk.BlockClosure);
  2743. smalltalk.addMethod(
  2744. unescape('_whileTrue_'),
  2745. smalltalk.method({
  2746. selector: unescape('whileTrue%3A'),
  2747. category: 'controlling',
  2748. fn: function (aBlock){
  2749. var self=this;
  2750. while(self()) {aBlock()};
  2751. return self;},
  2752. args: ["aBlock"],
  2753. 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'),
  2754. messageSends: [],
  2755. referencedClasses: []
  2756. }),
  2757. smalltalk.BlockClosure);
  2758. smalltalk.addMethod(
  2759. unescape('_whileFalse_'),
  2760. smalltalk.method({
  2761. selector: unescape('whileFalse%3A'),
  2762. category: 'controlling',
  2763. fn: function (aBlock){
  2764. var self=this;
  2765. while(!self()) {aBlock()};
  2766. return self;},
  2767. args: ["aBlock"],
  2768. 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'),
  2769. messageSends: [],
  2770. referencedClasses: []
  2771. }),
  2772. smalltalk.BlockClosure);
  2773. smalltalk.addMethod(
  2774. unescape('_value'),
  2775. smalltalk.method({
  2776. selector: unescape('value'),
  2777. category: 'evaluating',
  2778. fn: function (){
  2779. var self=this;
  2780. return self();;
  2781. return self;},
  2782. args: [],
  2783. source: unescape('value%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%28%29%3B%3E'),
  2784. messageSends: [],
  2785. referencedClasses: []
  2786. }),
  2787. smalltalk.BlockClosure);
  2788. smalltalk.addMethod(
  2789. unescape('_value_'),
  2790. smalltalk.method({
  2791. selector: unescape('value%3A'),
  2792. category: 'evaluating',
  2793. fn: function (anArg){
  2794. var self=this;
  2795. return self(anArg);;
  2796. return self;},
  2797. args: ["anArg"],
  2798. source: unescape('value%3A%20anArg%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%28anArg%29%3B%3E'),
  2799. messageSends: [],
  2800. referencedClasses: []
  2801. }),
  2802. smalltalk.BlockClosure);
  2803. smalltalk.addMethod(
  2804. unescape('_value_value_'),
  2805. smalltalk.method({
  2806. selector: unescape('value%3Avalue%3A'),
  2807. category: 'evaluating',
  2808. fn: function (firstArg, secondArg){
  2809. var self=this;
  2810. return self(firstArg, secondArg);;
  2811. return self;},
  2812. args: ["firstArg", "secondArg"],
  2813. 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'),
  2814. messageSends: [],
  2815. referencedClasses: []
  2816. }),
  2817. smalltalk.BlockClosure);
  2818. smalltalk.addMethod(
  2819. unescape('_value_value_value_'),
  2820. smalltalk.method({
  2821. selector: unescape('value%3Avalue%3Avalue%3A'),
  2822. category: 'evaluating',
  2823. fn: function (firstArg, secondArg, thirdArg){
  2824. var self=this;
  2825. return self(firstArg, secondArg, thirdArg);;
  2826. return self;},
  2827. args: ["firstArg", "secondArg", "thirdArg"],
  2828. 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'),
  2829. messageSends: [],
  2830. referencedClasses: []
  2831. }),
  2832. smalltalk.BlockClosure);
  2833. smalltalk.addMethod(
  2834. unescape('_valueWithPossibleArguments_'),
  2835. smalltalk.method({
  2836. selector: unescape('valueWithPossibleArguments%3A'),
  2837. category: 'evaluating',
  2838. fn: function (aCollection){
  2839. var self=this;
  2840. return self.apply(null, aCollection);;
  2841. return self;},
  2842. args: ["aCollection"],
  2843. source: unescape('valueWithPossibleArguments%3A%20aCollection%0A%09%3Creturn%20self.apply%28null%2C%20aCollection%29%3B%3E'),
  2844. messageSends: [],
  2845. referencedClasses: []
  2846. }),
  2847. smalltalk.BlockClosure);
  2848. smalltalk.addMethod(
  2849. unescape('_on_do_'),
  2850. smalltalk.method({
  2851. selector: unescape('on%3Ado%3A'),
  2852. category: 'error handling',
  2853. fn: function (anErrorClass, aBlock){
  2854. var self=this;
  2855. 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", []);})]));})]);
  2856. return self;},
  2857. args: ["anErrorClass", "aBlock"],
  2858. source: unescape('on%3A%20anErrorClass%20do%3A%20aBlock%0A%09self%20try%3A%20self%20catch%3A%20%5B%3Aerror%20%7C%0A%09%20%20%20%20%28error%20isKindOf%3A%20anErrorClass%29%20%0A%09%20%20%20%20%20ifTrue%3A%20%5BaBlock%20value%3A%20error%5D%0A%09%20%20%20%20%20ifFalse%3A%20%5Berror%20signal%5D%5D'),
  2859. messageSends: ["try:catch:", "ifTrue:ifFalse:", "isKindOf:", "value:", "signal"],
  2860. referencedClasses: []
  2861. }),
  2862. smalltalk.BlockClosure);
  2863. smalltalk.addMethod(
  2864. unescape('_valueWithTimeout_'),
  2865. smalltalk.method({
  2866. selector: unescape('valueWithTimeout%3A'),
  2867. category: 'timeout/interval',
  2868. fn: function (aNumber){
  2869. var self=this;
  2870. return setTimeout(self, aNumber);
  2871. return self;},
  2872. args: ["aNumber"],
  2873. source: unescape('valueWithTimeout%3A%20aNumber%0A%09%3Creturn%20setTimeout%28self%2C%20aNumber%29%3E'),
  2874. messageSends: [],
  2875. referencedClasses: []
  2876. }),
  2877. smalltalk.BlockClosure);
  2878. smalltalk.addMethod(
  2879. unescape('_valueWithInterval_'),
  2880. smalltalk.method({
  2881. selector: unescape('valueWithInterval%3A'),
  2882. category: 'timeout/interval',
  2883. fn: function (aNumber){
  2884. var self=this;
  2885. return setInterval(self, aNumber);
  2886. return self;},
  2887. args: ["aNumber"],
  2888. source: unescape('valueWithInterval%3A%20aNumber%0A%09%3Creturn%20setInterval%28self%2C%20aNumber%29%3E'),
  2889. messageSends: [],
  2890. referencedClasses: []
  2891. }),
  2892. smalltalk.BlockClosure);
  2893. smalltalk.addMethod(
  2894. unescape('_whileFalse'),
  2895. smalltalk.method({
  2896. selector: unescape('whileFalse'),
  2897. category: 'controlling',
  2898. fn: function (){
  2899. var self=this;
  2900. smalltalk.send(self, "_whileFalse_", [(function(){return nil;})]);
  2901. return self;},
  2902. args: [],
  2903. source: unescape('whileFalse%0A%09%22inlined%20in%20the%20Compiler%22%0A%09self%20whileFalse%3A%20%5B%5D'),
  2904. messageSends: ["whileFalse:"],
  2905. referencedClasses: []
  2906. }),
  2907. smalltalk.BlockClosure);
  2908. smalltalk.addMethod(
  2909. unescape('_whileTrue'),
  2910. smalltalk.method({
  2911. selector: unescape('whileTrue'),
  2912. category: 'controlling',
  2913. fn: function (){
  2914. var self=this;
  2915. smalltalk.send(self, "_whileTrue_", [(function(){return nil;})]);
  2916. return self;},
  2917. args: [],
  2918. source: unescape('whileTrue%0A%09%22inlined%20in%20the%20Compiler%22%0A%09self%20whileTrue%3A%20%5B%5D'),
  2919. messageSends: ["whileTrue:"],
  2920. referencedClasses: []
  2921. }),
  2922. smalltalk.BlockClosure);
  2923. smalltalk.addMethod(
  2924. unescape('_new'),
  2925. smalltalk.method({
  2926. selector: unescape('new'),
  2927. category: 'evaluating',
  2928. fn: function (){
  2929. var self=this;
  2930. return new self();
  2931. return self;},
  2932. args: [],
  2933. 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'),
  2934. messageSends: [],
  2935. referencedClasses: []
  2936. }),
  2937. smalltalk.BlockClosure);
  2938. smalltalk.addMethod(
  2939. unescape('_applyTo_arguments_'),
  2940. smalltalk.method({
  2941. selector: unescape('applyTo%3Aarguments%3A'),
  2942. category: 'evaluating',
  2943. fn: function (anObject, aCollection){
  2944. var self=this;
  2945. return self.apply(anObject, aCollection);
  2946. return self;},
  2947. args: ["anObject", "aCollection"],
  2948. source: unescape('applyTo%3A%20anObject%20arguments%3A%20aCollection%0A%09%3Creturn%20self.apply%28anObject%2C%20aCollection%29%3E'),
  2949. messageSends: [],
  2950. referencedClasses: []
  2951. }),
  2952. smalltalk.BlockClosure);
  2953. smalltalk.addMethod(
  2954. unescape('_timeToRun'),
  2955. smalltalk.method({
  2956. selector: unescape('timeToRun'),
  2957. category: 'evaluating',
  2958. fn: function (){
  2959. var self=this;
  2960. return smalltalk.send((smalltalk.Date || Date), "_millisecondsToRun_", [self]);
  2961. return self;},
  2962. args: [],
  2963. source: unescape('timeToRun%0A%09%22Answer%20the%20number%20of%20milliseconds%20taken%20to%20execute%20this%20block.%22%0A%0A%09%5E%20Date%20millisecondsToRun%3A%20self'),
  2964. messageSends: ["millisecondsToRun:"],
  2965. referencedClasses: ["Date"]
  2966. }),
  2967. smalltalk.BlockClosure);
  2968. smalltalk.addMethod(
  2969. unescape('_numArgs'),
  2970. smalltalk.method({
  2971. selector: unescape('numArgs'),
  2972. category: 'accessing',
  2973. fn: function (){
  2974. var self=this;
  2975. return self.length;
  2976. return self;},
  2977. args: [],
  2978. source: unescape('numArgs%0A%09%3Creturn%20self.length%3E'),
  2979. messageSends: [],
  2980. referencedClasses: []
  2981. }),
  2982. smalltalk.BlockClosure);
  2983. smalltalk.addMethod(
  2984. unescape('_ensure_'),
  2985. smalltalk.method({
  2986. selector: unescape('ensure%3A'),
  2987. category: 'evaluating',
  2988. fn: function (aBlock){
  2989. var self=this;
  2990. var success=nil;
  2991. success=false;
  2992. 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", []);})]);
  2993. return self;},
  2994. args: ["aBlock"],
  2995. source: unescape('ensure%3A%20aBlock%0A%09%7C%20success%20%7C%0A%09success%20%3A%3D%20false.%0A%09%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'),
  2996. messageSends: ["on:do:", "value", "ifFalse:", "signal"],
  2997. referencedClasses: ["Error"]
  2998. }),
  2999. smalltalk.BlockClosure);
  3000. smalltalk.addClass('Boolean', smalltalk.Object, [], 'Kernel');
  3001. smalltalk.addMethod(
  3002. unescape('__eq'),
  3003. smalltalk.method({
  3004. selector: unescape('%3D'),
  3005. category: 'comparing',
  3006. fn: function (aBoolean){
  3007. var self=this;
  3008. 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}})})();})]));
  3009. return Boolean(self == true) == aBoolean;
  3010. return self;
  3011. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
  3012. args: ["aBoolean"],
  3013. 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'),
  3014. messageSends: ["ifFalse:", unescape("%3D"), "class"],
  3015. referencedClasses: []
  3016. }),
  3017. smalltalk.Boolean);
  3018. smalltalk.addMethod(
  3019. unescape('_shallowCopy'),
  3020. smalltalk.method({
  3021. selector: unescape('shallowCopy'),
  3022. category: 'copying',
  3023. fn: function (){
  3024. var self=this;
  3025. return self;
  3026. return self;},
  3027. args: [],
  3028. source: unescape('shallowCopy%0A%09%5Eself'),
  3029. messageSends: [],
  3030. referencedClasses: []
  3031. }),
  3032. smalltalk.Boolean);
  3033. smalltalk.addMethod(
  3034. unescape('_deepCopy'),
  3035. smalltalk.method({
  3036. selector: unescape('deepCopy'),
  3037. category: 'copying',
  3038. fn: function (){
  3039. var self=this;
  3040. return self;
  3041. return self;},
  3042. args: [],
  3043. source: unescape('deepCopy%0A%09%5Eself'),
  3044. messageSends: [],
  3045. referencedClasses: []
  3046. }),
  3047. smalltalk.Boolean);
  3048. smalltalk.addMethod(
  3049. unescape('_ifTrue_'),
  3050. smalltalk.method({
  3051. selector: unescape('ifTrue%3A'),
  3052. category: 'controlling',
  3053. fn: function (aBlock){
  3054. var self=this;
  3055. return smalltalk.send(self, "_ifTrue_ifFalse_", [aBlock, (function(){return nil;})]);
  3056. return self;},
  3057. args: ["aBlock"],
  3058. source: unescape('ifTrue%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself%20ifTrue%3A%20aBlock%20ifFalse%3A%20%5B%5D'),
  3059. messageSends: ["ifTrue:ifFalse:"],
  3060. referencedClasses: []
  3061. }),
  3062. smalltalk.Boolean);
  3063. smalltalk.addMethod(
  3064. unescape('_ifFalse_'),
  3065. smalltalk.method({
  3066. selector: unescape('ifFalse%3A'),
  3067. category: 'controlling',
  3068. fn: function (aBlock){
  3069. var self=this;
  3070. return smalltalk.send(self, "_ifTrue_ifFalse_", [(function(){return nil;}), aBlock]);
  3071. return self;},
  3072. args: ["aBlock"],
  3073. source: unescape('ifFalse%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself%20ifTrue%3A%20%5B%5D%20ifFalse%3A%20aBlock'),
  3074. messageSends: ["ifTrue:ifFalse:"],
  3075. referencedClasses: []
  3076. }),
  3077. smalltalk.Boolean);
  3078. smalltalk.addMethod(
  3079. unescape('_ifFalse_ifTrue_'),
  3080. smalltalk.method({
  3081. selector: unescape('ifFalse%3AifTrue%3A'),
  3082. category: 'controlling',
  3083. fn: function (aBlock, anotherBlock){
  3084. var self=this;
  3085. return smalltalk.send(self, "_ifTrue_ifFalse_", [anotherBlock, aBlock]);
  3086. return self;},
  3087. args: ["aBlock", "anotherBlock"],
  3088. source: unescape('ifFalse%3A%20aBlock%20ifTrue%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself%20ifTrue%3A%20anotherBlock%20ifFalse%3A%20aBlock'),
  3089. messageSends: ["ifTrue:ifFalse:"],
  3090. referencedClasses: []
  3091. }),
  3092. smalltalk.Boolean);
  3093. smalltalk.addMethod(
  3094. unescape('_ifTrue_ifFalse_'),
  3095. smalltalk.method({
  3096. selector: unescape('ifTrue%3AifFalse%3A'),
  3097. category: 'controlling',
  3098. fn: function (aBlock, anotherBlock){
  3099. var self=this;
  3100. if(self == true) {
  3101. return aBlock();
  3102. } else {
  3103. return anotherBlock();
  3104. }
  3105. ;
  3106. return self;},
  3107. args: ["aBlock", "anotherBlock"],
  3108. 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'),
  3109. messageSends: [],
  3110. referencedClasses: []
  3111. }),
  3112. smalltalk.Boolean);
  3113. smalltalk.addMethod(
  3114. unescape('_and_'),
  3115. smalltalk.method({
  3116. selector: unescape('and%3A'),
  3117. category: 'controlling',
  3118. fn: function (aBlock){
  3119. var self=this;
  3120. return smalltalk.send(smalltalk.send(self, "__eq", [true]), "_ifTrue_ifFalse_", [aBlock, (function(){return false;})]);
  3121. return self;},
  3122. args: ["aBlock"],
  3123. 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'),
  3124. messageSends: ["ifTrue:ifFalse:", unescape("%3D")],
  3125. referencedClasses: []
  3126. }),
  3127. smalltalk.Boolean);
  3128. smalltalk.addMethod(
  3129. unescape('_or_'),
  3130. smalltalk.method({
  3131. selector: unescape('or%3A'),
  3132. category: 'controlling',
  3133. fn: function (aBlock){
  3134. var self=this;
  3135. return smalltalk.send(smalltalk.send(self, "__eq", [true]), "_ifTrue_ifFalse_", [(function(){return true;}), aBlock]);
  3136. return self;},
  3137. args: ["aBlock"],
  3138. 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'),
  3139. messageSends: ["ifTrue:ifFalse:", unescape("%3D")],
  3140. referencedClasses: []
  3141. }),
  3142. smalltalk.Boolean);
  3143. smalltalk.addMethod(
  3144. unescape('_not'),
  3145. smalltalk.method({
  3146. selector: unescape('not'),
  3147. category: 'controlling',
  3148. fn: function (){
  3149. var self=this;
  3150. return smalltalk.send(self, "__eq", [false]);
  3151. return self;},
  3152. args: [],
  3153. source: unescape('not%0A%09%5Eself%20%3D%20false'),
  3154. messageSends: [unescape("%3D")],
  3155. referencedClasses: []
  3156. }),
  3157. smalltalk.Boolean);
  3158. smalltalk.addMethod(
  3159. unescape('_printString'),
  3160. smalltalk.method({
  3161. selector: unescape('printString'),
  3162. category: 'printing',
  3163. fn: function (){
  3164. var self=this;
  3165. return self.toString();
  3166. return self;},
  3167. args: [],
  3168. source: unescape('printString%0A%09%3Creturn%20self.toString%28%29%3E'),
  3169. messageSends: [],
  3170. referencedClasses: []
  3171. }),
  3172. smalltalk.Boolean);
  3173. smalltalk.addMethod(
  3174. unescape('_%26'),
  3175. smalltalk.method({
  3176. selector: unescape('%26'),
  3177. category: 'controlling',
  3178. fn: function (aBoolean){
  3179. var self=this;
  3180. if(self == true) {
  3181. return aBoolean;
  3182. } else {
  3183. return false;
  3184. }
  3185. ;
  3186. return self;},
  3187. args: ["aBoolean"],
  3188. 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'),
  3189. messageSends: [],
  3190. referencedClasses: []
  3191. }),
  3192. smalltalk.Boolean);
  3193. smalltalk.addMethod(
  3194. unescape('_%7C'),
  3195. smalltalk.method({
  3196. selector: unescape('%7C'),
  3197. category: 'controlling',
  3198. fn: function (aBoolean){
  3199. var self=this;
  3200. if(self == true) {
  3201. return true;
  3202. } else {
  3203. return aBoolean;
  3204. }
  3205. ;
  3206. return self;},
  3207. args: ["aBoolean"],
  3208. 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'),
  3209. messageSends: [],
  3210. referencedClasses: []
  3211. }),
  3212. smalltalk.Boolean);
  3213. smalltalk.addMethod(
  3214. unescape('__eq_eq'),
  3215. smalltalk.method({
  3216. selector: unescape('%3D%3D'),
  3217. category: 'comparing',
  3218. fn: function (aBoolean){
  3219. var self=this;
  3220. 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_eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq_eq', fn: function(){return false}})})();})]));
  3221. return Boolean(self == true) === Boolean(aBoolean == true);
  3222. return self;
  3223. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq_eq'){return e.fn()} throw(e)}},
  3224. args: ["aBoolean"],
  3225. source: unescape('%3D%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%3D%20Boolean%28aBoolean%20%3D%3D%20true%29%3E'),
  3226. messageSends: ["ifFalse:", unescape("%3D"), "class"],
  3227. referencedClasses: []
  3228. }),
  3229. smalltalk.Boolean);
  3230. smalltalk.addClass('Date', smalltalk.Object, [], 'Kernel');
  3231. smalltalk.Date.comment=unescape('The%20Date%20class%20is%20used%20to%20work%20with%20dates%20and%20times.')
  3232. smalltalk.addMethod(
  3233. unescape('_year'),
  3234. smalltalk.method({
  3235. selector: unescape('year'),
  3236. category: 'accessing',
  3237. fn: function (){
  3238. var self=this;
  3239. return self.getFullYear();
  3240. return self;},
  3241. args: [],
  3242. source: unescape('year%0A%09%3Creturn%20self.getFullYear%28%29%3E'),
  3243. messageSends: [],
  3244. referencedClasses: []
  3245. }),
  3246. smalltalk.Date);
  3247. smalltalk.addMethod(
  3248. unescape('_month'),
  3249. smalltalk.method({
  3250. selector: unescape('month'),
  3251. category: 'accessing',
  3252. fn: function (){
  3253. var self=this;
  3254. return self.getMonth() + 1;
  3255. return self;},
  3256. args: [],
  3257. source: unescape('month%0A%09%3Creturn%20self.getMonth%28%29%20+%201%3E'),
  3258. messageSends: [],
  3259. referencedClasses: []
  3260. }),
  3261. smalltalk.Date);
  3262. smalltalk.addMethod(
  3263. unescape('_month_'),
  3264. smalltalk.method({
  3265. selector: unescape('month%3A'),
  3266. category: 'accessing',
  3267. fn: function (aNumber){
  3268. var self=this;
  3269. self.setMonth(aNumber - 1);
  3270. return self;},
  3271. args: ["aNumber"],
  3272. source: unescape('month%3A%20aNumber%0A%09%3Cself.setMonth%28aNumber%20-%201%29%3E'),
  3273. messageSends: [],
  3274. referencedClasses: []
  3275. }),
  3276. smalltalk.Date);
  3277. smalltalk.addMethod(
  3278. unescape('_day'),
  3279. smalltalk.method({
  3280. selector: unescape('day'),
  3281. category: 'accessing',
  3282. fn: function (){
  3283. var self=this;
  3284. return smalltalk.send(self, "_dayOfWeek", []);
  3285. return self;},
  3286. args: [],
  3287. source: unescape('day%0A%09%5Eself%20dayOfWeek'),
  3288. messageSends: ["dayOfWeek"],
  3289. referencedClasses: []
  3290. }),
  3291. smalltalk.Date);
  3292. smalltalk.addMethod(
  3293. unescape('_dayOfWeek'),
  3294. smalltalk.method({
  3295. selector: unescape('dayOfWeek'),
  3296. category: 'accessing',
  3297. fn: function (){
  3298. var self=this;
  3299. return self.getDay() + 1;
  3300. return self;},
  3301. args: [],
  3302. source: unescape('dayOfWeek%0A%09%3Creturn%20self.getDay%28%29%20+%201%3E'),
  3303. messageSends: [],
  3304. referencedClasses: []
  3305. }),
  3306. smalltalk.Date);
  3307. smalltalk.addMethod(
  3308. unescape('_dayOfWeek_'),
  3309. smalltalk.method({
  3310. selector: unescape('dayOfWeek%3A'),
  3311. category: 'accessing',
  3312. fn: function (aNumber){
  3313. var self=this;
  3314. return self.setDay(aNumber - 1);
  3315. return self;},
  3316. args: ["aNumber"],
  3317. source: unescape('dayOfWeek%3A%20aNumber%0A%09%3Creturn%20self.setDay%28aNumber%20-%201%29%3E'),
  3318. messageSends: [],
  3319. referencedClasses: []
  3320. }),
  3321. smalltalk.Date);
  3322. smalltalk.addMethod(
  3323. unescape('_day_'),
  3324. smalltalk.method({
  3325. selector: unescape('day%3A'),
  3326. category: 'accessing',
  3327. fn: function (aNumber){
  3328. var self=this;
  3329. smalltalk.send(self, "_day_", [aNumber]);
  3330. return self;},
  3331. args: ["aNumber"],
  3332. source: unescape('day%3A%20aNumber%0A%09self%20day%3A%20aNumber'),
  3333. messageSends: ["day:"],
  3334. referencedClasses: []
  3335. }),
  3336. smalltalk.Date);
  3337. smalltalk.addMethod(
  3338. unescape('_year_'),
  3339. smalltalk.method({
  3340. selector: unescape('year%3A'),
  3341. category: 'accessing',
  3342. fn: function (aNumber){
  3343. var self=this;
  3344. self.setFullYear(aNumber);
  3345. return self;},
  3346. args: ["aNumber"],
  3347. source: unescape('year%3A%20aNumber%0A%09%3Cself.setFullYear%28aNumber%29%3E'),
  3348. messageSends: [],
  3349. referencedClasses: []
  3350. }),
  3351. smalltalk.Date);
  3352. smalltalk.addMethod(
  3353. unescape('_dayOfMonth'),
  3354. smalltalk.method({
  3355. selector: unescape('dayOfMonth'),
  3356. category: 'accessing',
  3357. fn: function (){
  3358. var self=this;
  3359. return self.getDate();
  3360. return self;},
  3361. args: [],
  3362. source: unescape('dayOfMonth%0A%09%3Creturn%20self.getDate%28%29%3E'),
  3363. messageSends: [],
  3364. referencedClasses: []
  3365. }),
  3366. smalltalk.Date);
  3367. smalltalk.addMethod(
  3368. unescape('_dayOfMonth_'),
  3369. smalltalk.method({
  3370. selector: unescape('dayOfMonth%3A'),
  3371. category: 'accessing',
  3372. fn: function (aNumber){
  3373. var self=this;
  3374. self.setDate(aNumber);
  3375. return self;},
  3376. args: ["aNumber"],
  3377. source: unescape('dayOfMonth%3A%20aNumber%0A%09%3Cself.setDate%28aNumber%29%3E'),
  3378. messageSends: [],
  3379. referencedClasses: []
  3380. }),
  3381. smalltalk.Date);
  3382. smalltalk.addMethod(
  3383. unescape('_asString'),
  3384. smalltalk.method({
  3385. selector: unescape('asString'),
  3386. category: 'converting',
  3387. fn: function (){
  3388. var self=this;
  3389. return self.toString();
  3390. return self;},
  3391. args: [],
  3392. source: unescape('asString%0A%09%3Creturn%20self.toString%28%29%3E'),
  3393. messageSends: [],
  3394. referencedClasses: []
  3395. }),
  3396. smalltalk.Date);
  3397. smalltalk.addMethod(
  3398. unescape('_printString'),
  3399. smalltalk.method({
  3400. selector: unescape('printString'),
  3401. category: 'printing',
  3402. fn: function (){
  3403. var self=this;
  3404. return smalltalk.send(self, "_asString", []);
  3405. return self;},
  3406. args: [],
  3407. source: unescape('printString%0A%09%5Eself%20asString'),
  3408. messageSends: ["asString"],
  3409. referencedClasses: []
  3410. }),
  3411. smalltalk.Date);
  3412. smalltalk.addMethod(
  3413. unescape('_asMilliseconds'),
  3414. smalltalk.method({
  3415. selector: unescape('asMilliseconds'),
  3416. category: 'converting',
  3417. fn: function (){
  3418. var self=this;
  3419. return smalltalk.send(self, "_time", []);
  3420. return self;},
  3421. args: [],
  3422. source: unescape('asMilliseconds%0A%09%5Eself%20time'),
  3423. messageSends: ["time"],
  3424. referencedClasses: []
  3425. }),
  3426. smalltalk.Date);
  3427. smalltalk.addMethod(
  3428. unescape('_time'),
  3429. smalltalk.method({
  3430. selector: unescape('time'),
  3431. category: 'accessing',
  3432. fn: function (){
  3433. var self=this;
  3434. return self.getTime();
  3435. return self;},
  3436. args: [],
  3437. source: unescape('time%0A%09%3Creturn%20self.getTime%28%29%3E'),
  3438. messageSends: [],
  3439. referencedClasses: []
  3440. }),
  3441. smalltalk.Date);
  3442. smalltalk.addMethod(
  3443. unescape('_time_'),
  3444. smalltalk.method({
  3445. selector: unescape('time%3A'),
  3446. category: 'accessing',
  3447. fn: function (aNumber){
  3448. var self=this;
  3449. self.setTime(aNumber);
  3450. return self;},
  3451. args: ["aNumber"],
  3452. source: unescape('time%3A%20aNumber%0A%09%3Cself.setTime%28aNumber%29%3E'),
  3453. messageSends: [],
  3454. referencedClasses: []
  3455. }),
  3456. smalltalk.Date);
  3457. smalltalk.addMethod(
  3458. unescape('_asDateString'),
  3459. smalltalk.method({
  3460. selector: unescape('asDateString'),
  3461. category: 'converting',
  3462. fn: function (){
  3463. var self=this;
  3464. return self.toDateString();
  3465. return self;},
  3466. args: [],
  3467. source: unescape('asDateString%0A%09%3Creturn%20self.toDateString%28%29%3E'),
  3468. messageSends: [],
  3469. referencedClasses: []
  3470. }),
  3471. smalltalk.Date);
  3472. smalltalk.addMethod(
  3473. unescape('_asTimeString'),
  3474. smalltalk.method({
  3475. selector: unescape('asTimeString'),
  3476. category: 'converting',
  3477. fn: function (){
  3478. var self=this;
  3479. return self.toTimeString();
  3480. return self;},
  3481. args: [],
  3482. source: unescape('asTimeString%0A%09%3Creturn%20self.toTimeString%28%29%3E'),
  3483. messageSends: [],
  3484. referencedClasses: []
  3485. }),
  3486. smalltalk.Date);
  3487. smalltalk.addMethod(
  3488. unescape('_asLocaleString'),
  3489. smalltalk.method({
  3490. selector: unescape('asLocaleString'),
  3491. category: 'converting',
  3492. fn: function (){
  3493. var self=this;
  3494. return self.toLocaleString();
  3495. return self;},
  3496. args: [],
  3497. source: unescape('asLocaleString%0A%09%3Creturn%20self.toLocaleString%28%29%3E'),
  3498. messageSends: [],
  3499. referencedClasses: []
  3500. }),
  3501. smalltalk.Date);
  3502. smalltalk.addMethod(
  3503. unescape('_asNumber'),
  3504. smalltalk.method({
  3505. selector: unescape('asNumber'),
  3506. category: 'converting',
  3507. fn: function (){
  3508. var self=this;
  3509. return smalltalk.send(self, "_asMilliseconds", []);
  3510. return self;},
  3511. args: [],
  3512. source: unescape('asNumber%0A%09%5Eself%20asMilliseconds'),
  3513. messageSends: ["asMilliseconds"],
  3514. referencedClasses: []
  3515. }),
  3516. smalltalk.Date);
  3517. smalltalk.addMethod(
  3518. unescape('_hours_'),
  3519. smalltalk.method({
  3520. selector: unescape('hours%3A'),
  3521. category: 'accessing',
  3522. fn: function (aNumber){
  3523. var self=this;
  3524. self.setHours(aNumber);
  3525. return self;},
  3526. args: ["aNumber"],
  3527. source: unescape('hours%3A%20aNumber%0A%09%3Cself.setHours%28aNumber%29%3E'),
  3528. messageSends: [],
  3529. referencedClasses: []
  3530. }),
  3531. smalltalk.Date);
  3532. smalltalk.addMethod(
  3533. unescape('_minutes_'),
  3534. smalltalk.method({
  3535. selector: unescape('minutes%3A'),
  3536. category: 'accessing',
  3537. fn: function (aNumber){
  3538. var self=this;
  3539. self.setMinutes(aNumber);
  3540. return self;},
  3541. args: ["aNumber"],
  3542. source: unescape('minutes%3A%20aNumber%0A%09%3Cself.setMinutes%28aNumber%29%3E'),
  3543. messageSends: [],
  3544. referencedClasses: []
  3545. }),
  3546. smalltalk.Date);
  3547. smalltalk.addMethod(
  3548. unescape('_seconds_'),
  3549. smalltalk.method({
  3550. selector: unescape('seconds%3A'),
  3551. category: 'accessing',
  3552. fn: function (aNumber){
  3553. var self=this;
  3554. self.setSeconds(aNumber);
  3555. return self;},
  3556. args: ["aNumber"],
  3557. source: unescape('seconds%3A%20aNumber%0A%09%3Cself.setSeconds%28aNumber%29%3E'),
  3558. messageSends: [],
  3559. referencedClasses: []
  3560. }),
  3561. smalltalk.Date);
  3562. smalltalk.addMethod(
  3563. unescape('_milliseconds_'),
  3564. smalltalk.method({
  3565. selector: unescape('milliseconds%3A'),
  3566. category: 'accessing',
  3567. fn: function (aNumber){
  3568. var self=this;
  3569. self.setMilliseconds(aNumber);
  3570. return self;},
  3571. args: ["aNumber"],
  3572. source: unescape('milliseconds%3A%20aNumber%0A%09%3Cself.setMilliseconds%28aNumber%29%3E'),
  3573. messageSends: [],
  3574. referencedClasses: []
  3575. }),
  3576. smalltalk.Date);
  3577. smalltalk.addMethod(
  3578. unescape('_hours'),
  3579. smalltalk.method({
  3580. selector: unescape('hours'),
  3581. category: 'accessing',
  3582. fn: function (){
  3583. var self=this;
  3584. return self.getHours();
  3585. return self;},
  3586. args: [],
  3587. source: unescape('hours%0A%09%3Creturn%20self.getHours%28%29%3E'),
  3588. messageSends: [],
  3589. referencedClasses: []
  3590. }),
  3591. smalltalk.Date);
  3592. smalltalk.addMethod(
  3593. unescape('_minutes'),
  3594. smalltalk.method({
  3595. selector: unescape('minutes'),
  3596. category: 'accessing',
  3597. fn: function (){
  3598. var self=this;
  3599. return self.getMinutes();
  3600. return self;},
  3601. args: [],
  3602. source: unescape('minutes%0A%09%3Creturn%20self.getMinutes%28%29%3E'),
  3603. messageSends: [],
  3604. referencedClasses: []
  3605. }),
  3606. smalltalk.Date);
  3607. smalltalk.addMethod(
  3608. unescape('_seconds'),
  3609. smalltalk.method({
  3610. selector: unescape('seconds'),
  3611. category: 'accessing',
  3612. fn: function (){
  3613. var self=this;
  3614. return self.getSeconds();
  3615. return self;},
  3616. args: [],
  3617. source: unescape('seconds%0A%09%3Creturn%20self.getSeconds%28%29%3E'),
  3618. messageSends: [],
  3619. referencedClasses: []
  3620. }),
  3621. smalltalk.Date);
  3622. smalltalk.addMethod(
  3623. unescape('_milliseconds'),
  3624. smalltalk.method({
  3625. selector: unescape('milliseconds'),
  3626. category: 'accessing',
  3627. fn: function (){
  3628. var self=this;
  3629. return self.getMilliseconds();
  3630. return self;},
  3631. args: [],
  3632. source: unescape('milliseconds%0A%09%3Creturn%20self.getMilliseconds%28%29%3E'),
  3633. messageSends: [],
  3634. referencedClasses: []
  3635. }),
  3636. smalltalk.Date);
  3637. smalltalk.addMethod(
  3638. unescape('__lt'),
  3639. smalltalk.method({
  3640. selector: unescape('%3C'),
  3641. category: 'comparing',
  3642. fn: function (aDate){
  3643. var self=this;
  3644. return self < aDate;
  3645. return self;},
  3646. args: ["aDate"],
  3647. source: unescape('%3C%20aDate%0A%09%3Creturn%20self%20%3C%20aDate%3E'),
  3648. messageSends: [],
  3649. referencedClasses: []
  3650. }),
  3651. smalltalk.Date);
  3652. smalltalk.addMethod(
  3653. unescape('__gt'),
  3654. smalltalk.method({
  3655. selector: unescape('%3E'),
  3656. category: 'comparing',
  3657. fn: function (aDate){
  3658. var self=this;
  3659. return self > aDate;
  3660. return self;},
  3661. args: ["aDate"],
  3662. source: unescape('%3E%20aDate%0A%09%3Creturn%20self%20%3E%3E%20aDate%3E'),
  3663. messageSends: [],
  3664. referencedClasses: []
  3665. }),
  3666. smalltalk.Date);
  3667. smalltalk.addMethod(
  3668. unescape('__lt_eq'),
  3669. smalltalk.method({
  3670. selector: unescape('%3C%3D'),
  3671. category: 'comparing',
  3672. fn: function (aDate){
  3673. var self=this;
  3674. return self <= aDate;
  3675. return self;},
  3676. args: ["aDate"],
  3677. source: unescape('%3C%3D%20aDate%0A%09%3Creturn%20self%20%3C%3D%20aDate%3E'),
  3678. messageSends: [],
  3679. referencedClasses: []
  3680. }),
  3681. smalltalk.Date);
  3682. smalltalk.addMethod(
  3683. unescape('__gt_eq'),
  3684. smalltalk.method({
  3685. selector: unescape('%3E%3D'),
  3686. category: 'comparing',
  3687. fn: function (aDate){
  3688. var self=this;
  3689. return self >= aDate;
  3690. return self;},
  3691. args: ["aDate"],
  3692. source: unescape('%3E%3D%20aDate%0A%09%3Creturn%20self%20%3E%3E%3D%20aDate%3E'),
  3693. messageSends: [],
  3694. referencedClasses: []
  3695. }),
  3696. smalltalk.Date);
  3697. smalltalk.addMethod(
  3698. unescape('__minus'),
  3699. smalltalk.method({
  3700. selector: unescape('-'),
  3701. category: 'arithmetic',
  3702. fn: function (aDate){
  3703. var self=this;
  3704. return self - aDate;
  3705. return self;},
  3706. args: ["aDate"],
  3707. source: unescape('-%20aDate%0A%09%3Creturn%20self%20-%20aDate%3E'),
  3708. messageSends: [],
  3709. referencedClasses: []
  3710. }),
  3711. smalltalk.Date);
  3712. smalltalk.addMethod(
  3713. unescape('__plus'),
  3714. smalltalk.method({
  3715. selector: unescape('+'),
  3716. category: 'arithmetic',
  3717. fn: function (aDate){
  3718. var self=this;
  3719. return self + aDate;
  3720. return self;},
  3721. args: ["aDate"],
  3722. source: unescape('+%20aDate%0A%09%3Creturn%20self%20+%20aDate%3E'),
  3723. messageSends: [],
  3724. referencedClasses: []
  3725. }),
  3726. smalltalk.Date);
  3727. smalltalk.addMethod(
  3728. unescape('_new_'),
  3729. smalltalk.method({
  3730. selector: unescape('new%3A'),
  3731. category: 'instance creation',
  3732. fn: function (anObject){
  3733. var self=this;
  3734. return new Date(anObject);
  3735. return self;},
  3736. args: ["anObject"],
  3737. source: unescape('new%3A%20anObject%0A%09%3Creturn%20new%20Date%28anObject%29%3E'),
  3738. messageSends: [],
  3739. referencedClasses: []
  3740. }),
  3741. smalltalk.Date.klass);
  3742. smalltalk.addMethod(
  3743. unescape('_fromString_'),
  3744. smalltalk.method({
  3745. selector: unescape('fromString%3A'),
  3746. category: 'instance creation',
  3747. fn: function (aString){
  3748. var self=this;
  3749. return smalltalk.send(self, "_new_", [aString]);
  3750. return self;},
  3751. args: ["aString"],
  3752. 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'),
  3753. messageSends: ["new:"],
  3754. referencedClasses: []
  3755. }),
  3756. smalltalk.Date.klass);
  3757. smalltalk.addMethod(
  3758. unescape('_fromSeconds_'),
  3759. smalltalk.method({
  3760. selector: unescape('fromSeconds%3A'),
  3761. category: 'instance creation',
  3762. fn: function (aNumber){
  3763. var self=this;
  3764. return smalltalk.send(self, "_fromMilliseconds_", [((($receiver = aNumber).klass === smalltalk.Number) ? $receiver *(1000) : smalltalk.send($receiver, "__star", [(1000)]))]);
  3765. return self;},
  3766. args: ["aNumber"],
  3767. source: unescape('fromSeconds%3A%20aNumber%0A%09%5Eself%20fromMilliseconds%3A%20aNumber%20*%201000'),
  3768. messageSends: ["fromMilliseconds:", unescape("*")],
  3769. referencedClasses: []
  3770. }),
  3771. smalltalk.Date.klass);
  3772. smalltalk.addMethod(
  3773. unescape('_fromMilliseconds_'),
  3774. smalltalk.method({
  3775. selector: unescape('fromMilliseconds%3A'),
  3776. category: 'instance creation',
  3777. fn: function (aNumber){
  3778. var self=this;
  3779. return smalltalk.send(self, "_new_", [aNumber]);
  3780. return self;},
  3781. args: ["aNumber"],
  3782. source: unescape('fromMilliseconds%3A%20aNumber%0A%09%5Eself%20new%3A%20aNumber'),
  3783. messageSends: ["new:"],
  3784. referencedClasses: []
  3785. }),
  3786. smalltalk.Date.klass);
  3787. smalltalk.addMethod(
  3788. unescape('_today'),
  3789. smalltalk.method({
  3790. selector: unescape('today'),
  3791. category: 'instance creation',
  3792. fn: function (){
  3793. var self=this;
  3794. return smalltalk.send(self, "_new", []);
  3795. return self;},
  3796. args: [],
  3797. source: unescape('today%0A%09%5Eself%20new'),
  3798. messageSends: ["new"],
  3799. referencedClasses: []
  3800. }),
  3801. smalltalk.Date.klass);
  3802. smalltalk.addMethod(
  3803. unescape('_now'),
  3804. smalltalk.method({
  3805. selector: unescape('now'),
  3806. category: 'instance creation',
  3807. fn: function (){
  3808. var self=this;
  3809. return smalltalk.send(self, "_today", []);
  3810. return self;},
  3811. args: [],
  3812. source: unescape('now%0A%09%5Eself%20today'),
  3813. messageSends: ["today"],
  3814. referencedClasses: []
  3815. }),
  3816. smalltalk.Date.klass);
  3817. smalltalk.addMethod(
  3818. unescape('_millisecondsToRun_'),
  3819. smalltalk.method({
  3820. selector: unescape('millisecondsToRun%3A'),
  3821. category: 'instance creation',
  3822. fn: function (aBlock){
  3823. var self=this;
  3824. var t=nil;
  3825. t=smalltalk.send((smalltalk.Date || Date), "_now", []);
  3826. smalltalk.send(aBlock, "_value", []);
  3827. return ((($receiver = smalltalk.send((smalltalk.Date || Date), "_now", [])).klass === smalltalk.Number) ? $receiver -t : smalltalk.send($receiver, "__minus", [t]));
  3828. return self;},
  3829. args: ["aBlock"],
  3830. 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'),
  3831. messageSends: ["now", "value", unescape("-")],
  3832. referencedClasses: ["Date"]
  3833. }),
  3834. smalltalk.Date.klass);
  3835. smalltalk.addClass('UndefinedObject', smalltalk.Object, [], 'Kernel');
  3836. smalltalk.addMethod(
  3837. unescape('_subclass_instanceVariableNames_'),
  3838. smalltalk.method({
  3839. selector: unescape('subclass%3AinstanceVariableNames%3A'),
  3840. category: 'class creation',
  3841. fn: function (aString, anotherString){
  3842. var self=this;
  3843. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, anotherString, nil]);
  3844. return self;},
  3845. args: ["aString", "anotherString"],
  3846. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20anotherString%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20anotherString%20package%3A%20nil'),
  3847. messageSends: ["subclass:instanceVariableNames:package:"],
  3848. referencedClasses: []
  3849. }),
  3850. smalltalk.UndefinedObject);
  3851. smalltalk.addMethod(
  3852. unescape('_subclass_instanceVariableNames_category_'),
  3853. smalltalk.method({
  3854. selector: unescape('subclass%3AinstanceVariableNames%3Acategory%3A'),
  3855. category: 'class creation',
  3856. fn: function (aString, aString2, aString3){
  3857. var self=this;
  3858. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
  3859. return self;},
  3860. args: ["aString", "aString2", "aString3"],
  3861. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20category%3A%20aString3%0A%09%22Kept%20for%20compatibility.%22%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3'),
  3862. messageSends: ["subclass:instanceVariableNames:package:"],
  3863. referencedClasses: []
  3864. }),
  3865. smalltalk.UndefinedObject);
  3866. smalltalk.addMethod(
  3867. unescape('_shallowCopy'),
  3868. smalltalk.method({
  3869. selector: unescape('shallowCopy'),
  3870. category: 'copying',
  3871. fn: function (){
  3872. var self=this;
  3873. return self;
  3874. return self;},
  3875. args: [],
  3876. source: unescape('shallowCopy%0A%09%5Eself'),
  3877. messageSends: [],
  3878. referencedClasses: []
  3879. }),
  3880. smalltalk.UndefinedObject);
  3881. smalltalk.addMethod(
  3882. unescape('_deepCopy'),
  3883. smalltalk.method({
  3884. selector: unescape('deepCopy'),
  3885. category: 'copying',
  3886. fn: function (){
  3887. var self=this;
  3888. return self;
  3889. return self;},
  3890. args: [],
  3891. source: unescape('deepCopy%0A%09%5Eself'),
  3892. messageSends: [],
  3893. referencedClasses: []
  3894. }),
  3895. smalltalk.UndefinedObject);
  3896. smalltalk.addMethod(
  3897. unescape('_ifNil_'),
  3898. smalltalk.method({
  3899. selector: unescape('ifNil%3A'),
  3900. category: 'testing',
  3901. fn: function (aBlock){
  3902. var self=this;
  3903. return smalltalk.send(self, "_ifNil_ifNotNil_", [aBlock, (function(){return nil;})]);
  3904. return self;},
  3905. args: ["aBlock"],
  3906. source: unescape('ifNil%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself%20ifNil%3A%20aBlock%20ifNotNil%3A%20%5B%5D'),
  3907. messageSends: ["ifNil:ifNotNil:"],
  3908. referencedClasses: []
  3909. }),
  3910. smalltalk.UndefinedObject);
  3911. smalltalk.addMethod(
  3912. unescape('_ifNotNil_'),
  3913. smalltalk.method({
  3914. selector: unescape('ifNotNil%3A'),
  3915. category: 'testing',
  3916. fn: function (aBlock){
  3917. var self=this;
  3918. return self;
  3919. return self;},
  3920. args: ["aBlock"],
  3921. source: unescape('ifNotNil%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself'),
  3922. messageSends: [],
  3923. referencedClasses: []
  3924. }),
  3925. smalltalk.UndefinedObject);
  3926. smalltalk.addMethod(
  3927. unescape('_ifNil_ifNotNil_'),
  3928. smalltalk.method({
  3929. selector: unescape('ifNil%3AifNotNil%3A'),
  3930. category: 'testing',
  3931. fn: function (aBlock, anotherBlock){
  3932. var self=this;
  3933. return smalltalk.send(aBlock, "_value", []);
  3934. return self;},
  3935. args: ["aBlock", "anotherBlock"],
  3936. source: unescape('ifNil%3A%20aBlock%20ifNotNil%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EaBlock%20value'),
  3937. messageSends: ["value"],
  3938. referencedClasses: []
  3939. }),
  3940. smalltalk.UndefinedObject);
  3941. smalltalk.addMethod(
  3942. unescape('_ifNotNil_ifNil_'),
  3943. smalltalk.method({
  3944. selector: unescape('ifNotNil%3AifNil%3A'),
  3945. category: 'testing',
  3946. fn: function (aBlock, anotherBlock){
  3947. var self=this;
  3948. return smalltalk.send(anotherBlock, "_value", []);
  3949. return self;},
  3950. args: ["aBlock", "anotherBlock"],
  3951. source: unescape('ifNotNil%3A%20aBlock%20ifNil%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EanotherBlock%20value'),
  3952. messageSends: ["value"],
  3953. referencedClasses: []
  3954. }),
  3955. smalltalk.UndefinedObject);
  3956. smalltalk.addMethod(
  3957. unescape('_isNil'),
  3958. smalltalk.method({
  3959. selector: unescape('isNil'),
  3960. category: 'testing',
  3961. fn: function (){
  3962. var self=this;
  3963. return true;
  3964. return self;},
  3965. args: [],
  3966. source: unescape('isNil%0A%09%5Etrue'),
  3967. messageSends: [],
  3968. referencedClasses: []
  3969. }),
  3970. smalltalk.UndefinedObject);
  3971. smalltalk.addMethod(
  3972. unescape('_notNil'),
  3973. smalltalk.method({
  3974. selector: unescape('notNil'),
  3975. category: 'testing',
  3976. fn: function (){
  3977. var self=this;
  3978. return false;
  3979. return self;},
  3980. args: [],
  3981. source: unescape('notNil%0A%09%5Efalse'),
  3982. messageSends: [],
  3983. referencedClasses: []
  3984. }),
  3985. smalltalk.UndefinedObject);
  3986. smalltalk.addMethod(
  3987. unescape('_printString'),
  3988. smalltalk.method({
  3989. selector: unescape('printString'),
  3990. category: 'printing',
  3991. fn: function (){
  3992. var self=this;
  3993. return "nil";
  3994. return self;},
  3995. args: [],
  3996. source: unescape('printString%0A%20%20%20%20%5E%27nil%27'),
  3997. messageSends: [],
  3998. referencedClasses: []
  3999. }),
  4000. smalltalk.UndefinedObject);
  4001. smalltalk.addMethod(
  4002. unescape('_subclass_instanceVariableNames_package_'),
  4003. smalltalk.method({
  4004. selector: unescape('subclass%3AinstanceVariableNames%3Apackage%3A'),
  4005. category: 'class creation',
  4006. fn: function (aString, aString2, aString3){
  4007. var self=this;
  4008. return smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_superclass_subclass_instanceVariableNames_package_", [self, aString, aString2, aString3]);
  4009. return self;},
  4010. args: ["aString", "aString2", "aString3"],
  4011. 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'),
  4012. messageSends: ["superclass:subclass:instanceVariableNames:package:", "new"],
  4013. referencedClasses: ["ClassBuilder"]
  4014. }),
  4015. smalltalk.UndefinedObject);
  4016. smalltalk.addMethod(
  4017. unescape('_new'),
  4018. smalltalk.method({
  4019. selector: unescape('new'),
  4020. category: 'instance creation',
  4021. fn: function (){
  4022. var self=this;
  4023. smalltalk.send(self, "_error_", ["You cannot create new instances of UndefinedObject. Use nil"]);
  4024. return self;},
  4025. args: [],
  4026. source: unescape('new%0A%09%20%20%20%20self%20error%3A%20%27You%20cannot%20create%20new%20instances%20of%20UndefinedObject.%20Use%20nil%27'),
  4027. messageSends: ["error:"],
  4028. referencedClasses: []
  4029. }),
  4030. smalltalk.UndefinedObject.klass);
  4031. smalltalk.addClass('Collection', smalltalk.Object, [], 'Kernel');
  4032. smalltalk.addMethod(
  4033. unescape('_size'),
  4034. smalltalk.method({
  4035. selector: unescape('size'),
  4036. category: 'accessing',
  4037. fn: function (){
  4038. var self=this;
  4039. smalltalk.send(self, "_subclassResponsibility", []);
  4040. return self;},
  4041. args: [],
  4042. source: unescape('size%0A%09self%20subclassResponsibility'),
  4043. messageSends: ["subclassResponsibility"],
  4044. referencedClasses: []
  4045. }),
  4046. smalltalk.Collection);
  4047. smalltalk.addMethod(
  4048. unescape('_readStream'),
  4049. smalltalk.method({
  4050. selector: unescape('readStream'),
  4051. category: 'accessing',
  4052. fn: function (){
  4053. var self=this;
  4054. return smalltalk.send(self, "_stream", []);
  4055. return self;},
  4056. args: [],
  4057. source: unescape('readStream%0A%09%5Eself%20stream'),
  4058. messageSends: ["stream"],
  4059. referencedClasses: []
  4060. }),
  4061. smalltalk.Collection);
  4062. smalltalk.addMethod(
  4063. unescape('_writeStream'),
  4064. smalltalk.method({
  4065. selector: unescape('writeStream'),
  4066. category: 'accessing',
  4067. fn: function (){
  4068. var self=this;
  4069. return smalltalk.send(self, "_stream", []);
  4070. return self;},
  4071. args: [],
  4072. source: unescape('writeStream%0A%09%5Eself%20stream'),
  4073. messageSends: ["stream"],
  4074. referencedClasses: []
  4075. }),
  4076. smalltalk.Collection);
  4077. smalltalk.addMethod(
  4078. unescape('_stream'),
  4079. smalltalk.method({
  4080. selector: unescape('stream'),
  4081. category: 'accessing',
  4082. fn: function (){
  4083. var self=this;
  4084. return smalltalk.send(smalltalk.send(self, "_streamClass", []), "_on_", [self]);
  4085. return self;},
  4086. args: [],
  4087. source: unescape('stream%0A%09%5Eself%20streamClass%20on%3A%20self'),
  4088. messageSends: ["on:", "streamClass"],
  4089. referencedClasses: []
  4090. }),
  4091. smalltalk.Collection);
  4092. smalltalk.addMethod(
  4093. unescape('_streamClass'),
  4094. smalltalk.method({
  4095. selector: unescape('streamClass'),
  4096. category: 'accessing',
  4097. fn: function (){
  4098. var self=this;
  4099. return smalltalk.send(smalltalk.send(self, "_class", []), "_streamClass", []);
  4100. return self;},
  4101. args: [],
  4102. source: unescape('streamClass%0A%09%5Eself%20class%20streamClass'),
  4103. messageSends: ["streamClass", "class"],
  4104. referencedClasses: []
  4105. }),
  4106. smalltalk.Collection);
  4107. smalltalk.addMethod(
  4108. unescape('_add_'),
  4109. smalltalk.method({
  4110. selector: unescape('add%3A'),
  4111. category: 'adding/removing',
  4112. fn: function (anObject){
  4113. var self=this;
  4114. smalltalk.send(self, "_subclassResponsibility", []);
  4115. return self;},
  4116. args: ["anObject"],
  4117. source: unescape('add%3A%20anObject%0A%09self%20subclassResponsibility'),
  4118. messageSends: ["subclassResponsibility"],
  4119. referencedClasses: []
  4120. }),
  4121. smalltalk.Collection);
  4122. smalltalk.addMethod(
  4123. unescape('_addAll_'),
  4124. smalltalk.method({
  4125. selector: unescape('addAll%3A'),
  4126. category: 'adding/removing',
  4127. fn: function (aCollection){
  4128. var self=this;
  4129. smalltalk.send(aCollection, "_do_", [(function(each){return smalltalk.send(self, "_add_", [each]);})]);
  4130. return aCollection;
  4131. return self;},
  4132. args: ["aCollection"],
  4133. 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'),
  4134. messageSends: ["do:", "add:"],
  4135. referencedClasses: []
  4136. }),
  4137. smalltalk.Collection);
  4138. smalltalk.addMethod(
  4139. unescape('__comma'),
  4140. smalltalk.method({
  4141. selector: unescape('%2C'),
  4142. category: 'copying',
  4143. fn: function (aCollection){
  4144. var self=this;
  4145. return (function($rec){smalltalk.send($rec, "_addAll_", [aCollection]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_copy", []));
  4146. return self;},
  4147. args: ["aCollection"],
  4148. 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'),
  4149. messageSends: ["addAll:", "yourself", "copy"],
  4150. referencedClasses: []
  4151. }),
  4152. smalltalk.Collection);
  4153. smalltalk.addMethod(
  4154. unescape('_copyWith_'),
  4155. smalltalk.method({
  4156. selector: unescape('copyWith%3A'),
  4157. category: 'copying',
  4158. fn: function (anObject){
  4159. var self=this;
  4160. return (function($rec){smalltalk.send($rec, "_add_", [anObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_copy", []));
  4161. return self;},
  4162. args: ["anObject"],
  4163. source: unescape('copyWith%3A%20anObject%0A%09%5Eself%20copy%20add%3A%20anObject%3B%20yourself'),
  4164. messageSends: ["add:", "yourself", "copy"],
  4165. referencedClasses: []
  4166. }),
  4167. smalltalk.Collection);
  4168. smalltalk.addMethod(
  4169. unescape('_copyWithAll_'),
  4170. smalltalk.method({
  4171. selector: unescape('copyWithAll%3A'),
  4172. category: 'copying',
  4173. fn: function (aCollection){
  4174. var self=this;
  4175. return (function($rec){smalltalk.send($rec, "_addAll_", [aCollection]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_copy", []));
  4176. return self;},
  4177. args: ["aCollection"],
  4178. source: unescape('copyWithAll%3A%20aCollection%0A%09%5Eself%20copy%20addAll%3A%20aCollection%3B%20yourself'),
  4179. messageSends: ["addAll:", "yourself", "copy"],
  4180. referencedClasses: []
  4181. }),
  4182. smalltalk.Collection);
  4183. smalltalk.addMethod(
  4184. unescape('_asArray'),
  4185. smalltalk.method({
  4186. selector: unescape('asArray'),
  4187. category: 'converting',
  4188. fn: function (){
  4189. var self=this;
  4190. var array=nil;
  4191. var index=nil;
  4192. array=smalltalk.send((smalltalk.Array || Array), "_new", []);
  4193. index=(0);
  4194. smalltalk.send(self, "_do_", [(function(each){index=((($receiver = index).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));return smalltalk.send(array, "_at_put_", [index, each]);})]);
  4195. return array;
  4196. return self;},
  4197. args: [],
  4198. source: unescape('asArray%0A%09%7C%20array%20index%20%7C%0A%09array%20%3A%3D%20Array%20new.%0A%09index%20%3A%3D%200.%0A%09self%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20index%20%3A%3D%20index%20+%201.%0A%09%20%20%20%20array%20at%3A%20index%20put%3A%20each%5D.%0A%09%5Earray'),
  4199. messageSends: ["new", "do:", unescape("+"), "at:put:"],
  4200. referencedClasses: ["Array"]
  4201. }),
  4202. smalltalk.Collection);
  4203. smalltalk.addMethod(
  4204. unescape('_do_'),
  4205. smalltalk.method({
  4206. selector: unescape('do%3A'),
  4207. category: 'enumerating',
  4208. fn: function (aBlock){
  4209. var self=this;
  4210. for(var i=0;i<self.length;i++){aBlock(self[i]);};
  4211. return self;},
  4212. args: ["aBlock"],
  4213. source: unescape('do%3A%20aBlock%0A%09%3Cfor%28var%20i%3D0%3Bi%3Cself.length%3Bi++%29%7BaBlock%28self%5Bi%5D%29%3B%7D%3E'),
  4214. messageSends: [],
  4215. referencedClasses: []
  4216. }),
  4217. smalltalk.Collection);
  4218. smalltalk.addMethod(
  4219. unescape('_collect_'),
  4220. smalltalk.method({
  4221. selector: unescape('collect%3A'),
  4222. category: 'enumerating',
  4223. fn: function (aBlock){
  4224. var self=this;
  4225. var newCollection=nil;
  4226. newCollection=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []);
  4227. smalltalk.send(self, "_do_", [(function(each){return smalltalk.send(newCollection, "_add_", [smalltalk.send(aBlock, "_value_", [each])]);})]);
  4228. return newCollection;
  4229. return self;},
  4230. args: ["aBlock"],
  4231. 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'),
  4232. messageSends: ["new", "class", "do:", "add:", "value:"],
  4233. referencedClasses: []
  4234. }),
  4235. smalltalk.Collection);
  4236. smalltalk.addMethod(
  4237. unescape('_detect_'),
  4238. smalltalk.method({
  4239. selector: unescape('detect%3A'),
  4240. category: 'enumerating',
  4241. fn: function (aBlock){
  4242. var self=this;
  4243. return smalltalk.send(self, "_detect_ifNone_", [aBlock, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
  4244. return self;},
  4245. args: ["aBlock"],
  4246. source: unescape('detect%3A%20aBlock%0A%09%5Eself%20detect%3A%20aBlock%20ifNone%3A%20%5Bself%20errorNotFound%5D'),
  4247. messageSends: ["detect:ifNone:", "errorNotFound"],
  4248. referencedClasses: []
  4249. }),
  4250. smalltalk.Collection);
  4251. smalltalk.addMethod(
  4252. unescape('_detect_ifNone_'),
  4253. smalltalk.method({
  4254. selector: unescape('detect%3AifNone%3A'),
  4255. category: 'enumerating',
  4256. fn: function (aBlock, anotherBlock){
  4257. var self=this;
  4258. for(var i = 0; i < self.length; i++)
  4259. if(aBlock(self[i]))
  4260. return self[i];
  4261. return anotherBlock();
  4262. ;
  4263. return self;},
  4264. args: ["aBlock", "anotherBlock"],
  4265. 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'),
  4266. messageSends: [],
  4267. referencedClasses: []
  4268. }),
  4269. smalltalk.Collection);
  4270. smalltalk.addMethod(
  4271. unescape('_do_separatedBy_'),
  4272. smalltalk.method({
  4273. selector: unescape('do%3AseparatedBy%3A'),
  4274. category: 'enumerating',
  4275. fn: function (aBlock, anotherBlock){
  4276. var self=this;
  4277. var first=nil;
  4278. first=true;
  4279. 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]);})]);
  4280. return self;},
  4281. args: ["aBlock", "anotherBlock"],
  4282. source: unescape('do%3A%20aBlock%20separatedBy%3A%20anotherBlock%0A%20%20%20%20%09%7C%20first%20%7C%0A%20%20%20%20%09first%20%3A%3D%20true.%0A%20%20%20%20%09self%20do%3A%20%5B%3Aeach%20%7C%0A%20%20%20%20%09%20%20%20%20first%0A%20%20%20%20%09%09ifTrue%3A%20%5Bfirst%20%3A%3D%20false%5D%0A%20%20%20%20%09%09ifFalse%3A%20%5BanotherBlock%20value%5D.%0A%20%20%20%20%09%20%20%20%20aBlock%20value%3A%20each%5D'),
  4283. messageSends: ["do:", "ifTrue:ifFalse:", "value", "value:"],
  4284. referencedClasses: []
  4285. }),
  4286. smalltalk.Collection);
  4287. smalltalk.addMethod(
  4288. unescape('_inject_into_'),
  4289. smalltalk.method({
  4290. selector: unescape('inject%3Ainto%3A'),
  4291. category: 'enumerating',
  4292. fn: function (anObject, aBlock){
  4293. var self=this;
  4294. var result=nil;
  4295. result=anObject;
  4296. smalltalk.send(self, "_do_", [(function(each){return result=smalltalk.send(aBlock, "_value_value_", [result, each]);})]);
  4297. return result;
  4298. return self;},
  4299. args: ["anObject", "aBlock"],
  4300. 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'),
  4301. messageSends: ["do:", "value:value:"],
  4302. referencedClasses: []
  4303. }),
  4304. smalltalk.Collection);
  4305. smalltalk.addMethod(
  4306. unescape('_reject_'),
  4307. smalltalk.method({
  4308. selector: unescape('reject%3A'),
  4309. category: 'enumerating',
  4310. fn: function (aBlock){
  4311. var self=this;
  4312. return smalltalk.send(self, "_select_", [(function(each){return smalltalk.send(smalltalk.send(aBlock, "_value_", [each]), "__eq", [false]);})]);
  4313. return self;},
  4314. args: ["aBlock"],
  4315. 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'),
  4316. messageSends: ["select:", unescape("%3D"), "value:"],
  4317. referencedClasses: []
  4318. }),
  4319. smalltalk.Collection);
  4320. smalltalk.addMethod(
  4321. unescape('_select_'),
  4322. smalltalk.method({
  4323. selector: unescape('select%3A'),
  4324. category: 'enumerating',
  4325. fn: function (aBlock){
  4326. var self=this;
  4327. var stream=nil;
  4328. stream=smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_new", []), "_writeStream", []);
  4329. 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]);})]));})]);
  4330. return smalltalk.send(stream, "_contents", []);
  4331. return self;},
  4332. args: ["aBlock"],
  4333. 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'),
  4334. messageSends: ["writeStream", "new", "class", "do:", "ifTrue:", "value:", "nextPut:", "contents"],
  4335. referencedClasses: []
  4336. }),
  4337. smalltalk.Collection);
  4338. smalltalk.addMethod(
  4339. unescape('_errorNotFound'),
  4340. smalltalk.method({
  4341. selector: unescape('errorNotFound'),
  4342. category: 'error handling',
  4343. fn: function (){
  4344. var self=this;
  4345. smalltalk.send(self, "_error_", ["Object is not in the collection"]);
  4346. return self;},
  4347. args: [],
  4348. source: unescape('errorNotFound%0A%09self%20error%3A%20%27Object%20is%20not%20in%20the%20collection%27'),
  4349. messageSends: ["error:"],
  4350. referencedClasses: []
  4351. }),
  4352. smalltalk.Collection);
  4353. smalltalk.addMethod(
  4354. unescape('_includes_'),
  4355. smalltalk.method({
  4356. selector: unescape('includes%3A'),
  4357. category: 'testing',
  4358. fn: function (anObject){
  4359. var self=this;
  4360. var i = self.length;
  4361. while (i--) {
  4362. if (smalltalk.send(self[i], "__eq", [anObject])) {return true;}
  4363. }
  4364. return false
  4365. ;
  4366. return self;},
  4367. args: ["anObject"],
  4368. 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'),
  4369. messageSends: [],
  4370. referencedClasses: []
  4371. }),
  4372. smalltalk.Collection);
  4373. smalltalk.addMethod(
  4374. unescape('_notEmpty'),
  4375. smalltalk.method({
  4376. selector: unescape('notEmpty'),
  4377. category: 'testing',
  4378. fn: function (){
  4379. var self=this;
  4380. return smalltalk.send(smalltalk.send(self, "_isEmpty", []), "_not", []);
  4381. return self;},
  4382. args: [],
  4383. source: unescape('notEmpty%0A%09%5Eself%20isEmpty%20not'),
  4384. messageSends: ["not", "isEmpty"],
  4385. referencedClasses: []
  4386. }),
  4387. smalltalk.Collection);
  4388. smalltalk.addMethod(
  4389. unescape('_isEmpty'),
  4390. smalltalk.method({
  4391. selector: unescape('isEmpty'),
  4392. category: 'testing',
  4393. fn: function (){
  4394. var self=this;
  4395. return smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [(0)]);
  4396. return self;},
  4397. args: [],
  4398. source: unescape('isEmpty%0A%09%5Eself%20size%20%3D%200'),
  4399. messageSends: [unescape("%3D"), "size"],
  4400. referencedClasses: []
  4401. }),
  4402. smalltalk.Collection);
  4403. smalltalk.addMethod(
  4404. unescape('_remove_'),
  4405. smalltalk.method({
  4406. selector: unescape('remove%3A'),
  4407. category: 'adding/removing',
  4408. fn: function (anObject){
  4409. var self=this;
  4410. return smalltalk.send(self, "_remove_ifAbsent_", [anObject, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
  4411. return self;},
  4412. args: ["anObject"],
  4413. source: unescape('remove%3A%20anObject%0A%20%20%20%20%5Eself%20remove%3A%20anObject%20ifAbsent%3A%20%5Bself%20errorNotFound%5D'),
  4414. messageSends: ["remove:ifAbsent:", "errorNotFound"],
  4415. referencedClasses: []
  4416. }),
  4417. smalltalk.Collection);
  4418. smalltalk.addMethod(
  4419. unescape('_asSet'),
  4420. smalltalk.method({
  4421. selector: unescape('asSet'),
  4422. category: 'converting',
  4423. fn: function (){
  4424. var self=this;
  4425. return smalltalk.send((smalltalk.Set || Set), "_withAll_", [self]);
  4426. return self;},
  4427. args: [],
  4428. source: unescape('asSet%0A%09%5ESet%20withAll%3A%20self'),
  4429. messageSends: ["withAll:"],
  4430. referencedClasses: ["Set"]
  4431. }),
  4432. smalltalk.Collection);
  4433. smalltalk.addMethod(
  4434. unescape('_ifNotEmpty_'),
  4435. smalltalk.method({
  4436. selector: unescape('ifNotEmpty%3A'),
  4437. category: 'testing',
  4438. fn: function (aBlock){
  4439. var self=this;
  4440. smalltalk.send(smalltalk.send(self, "_notEmpty", []), "_ifTrue_", [aBlock]);
  4441. return self;},
  4442. args: ["aBlock"],
  4443. source: unescape('ifNotEmpty%3A%20aBlock%0A%09self%20notEmpty%20ifTrue%3A%20aBlock.'),
  4444. messageSends: ["ifTrue:", "notEmpty"],
  4445. referencedClasses: []
  4446. }),
  4447. smalltalk.Collection);
  4448. smalltalk.addMethod(
  4449. unescape('_ifEmpty_'),
  4450. smalltalk.method({
  4451. selector: unescape('ifEmpty%3A'),
  4452. category: 'testing',
  4453. fn: function (aBlock){
  4454. var self=this;
  4455. smalltalk.send(smalltalk.send(self, "_isEmpty", []), "_ifTrue_", [aBlock]);
  4456. return self;},
  4457. args: ["aBlock"],
  4458. source: unescape('ifEmpty%3A%20aBlock%0A%09self%20isEmpty%20ifTrue%3A%20aBlock.'),
  4459. messageSends: ["ifTrue:", "isEmpty"],
  4460. referencedClasses: []
  4461. }),
  4462. smalltalk.Collection);
  4463. smalltalk.addMethod(
  4464. unescape('_copyWithoutAll_'),
  4465. smalltalk.method({
  4466. selector: unescape('copyWithoutAll%3A'),
  4467. category: 'copying',
  4468. fn: function (aCollection){
  4469. var self=this;
  4470. return smalltalk.send(self, "_reject_", [(function(each){return smalltalk.send(aCollection, "_includes_", [each]);})]);
  4471. return self;},
  4472. args: ["aCollection"],
  4473. 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'),
  4474. messageSends: ["reject:", "includes:"],
  4475. referencedClasses: []
  4476. }),
  4477. smalltalk.Collection);
  4478. smalltalk.addMethod(
  4479. unescape('_remove_ifAbsent_'),
  4480. smalltalk.method({
  4481. selector: unescape('remove%3AifAbsent%3A'),
  4482. category: 'adding/removing',
  4483. fn: function (anObject, aBlock){
  4484. var self=this;
  4485. smalltalk.send(self, "_subclassResponsibility", []);
  4486. return self;},
  4487. args: ["anObject", "aBlock"],
  4488. source: unescape('remove%3A%20anObject%20ifAbsent%3A%20aBlock%0A%20%20%20%20self%20subclassResponsibility'),
  4489. messageSends: ["subclassResponsibility"],
  4490. referencedClasses: []
  4491. }),
  4492. smalltalk.Collection);
  4493. smalltalk.addMethod(
  4494. unescape('_streamClass'),
  4495. smalltalk.method({
  4496. selector: unescape('streamClass'),
  4497. category: 'accessing',
  4498. fn: function (){
  4499. var self=this;
  4500. return (smalltalk.Stream || Stream);
  4501. return self;},
  4502. args: [],
  4503. source: unescape('streamClass%0A%09%20%20%20%20%5EStream'),
  4504. messageSends: [],
  4505. referencedClasses: ["Stream"]
  4506. }),
  4507. smalltalk.Collection.klass);
  4508. smalltalk.addMethod(
  4509. unescape('_with_'),
  4510. smalltalk.method({
  4511. selector: unescape('with%3A'),
  4512. category: 'instance creation',
  4513. fn: function (anObject){
  4514. var self=this;
  4515. return (function($rec){smalltalk.send($rec, "_add_", [anObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  4516. return self;},
  4517. args: ["anObject"],
  4518. source: unescape('with%3A%20anObject%0A%09%20%20%20%20%5Eself%20new%0A%09%09add%3A%20anObject%3B%0A%09%09yourself'),
  4519. messageSends: ["add:", "yourself", "new"],
  4520. referencedClasses: []
  4521. }),
  4522. smalltalk.Collection.klass);
  4523. smalltalk.addMethod(
  4524. unescape('_with_with_'),
  4525. smalltalk.method({
  4526. selector: unescape('with%3Awith%3A'),
  4527. category: 'instance creation',
  4528. fn: function (anObject, anotherObject){
  4529. var self=this;
  4530. return (function($rec){smalltalk.send($rec, "_add_", [anObject]);smalltalk.send($rec, "_add_", [anotherObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  4531. return self;},
  4532. args: ["anObject", "anotherObject"],
  4533. 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'),
  4534. messageSends: ["add:", "yourself", "new"],
  4535. referencedClasses: []
  4536. }),
  4537. smalltalk.Collection.klass);
  4538. smalltalk.addMethod(
  4539. unescape('_with_with_with_'),
  4540. smalltalk.method({
  4541. selector: unescape('with%3Awith%3Awith%3A'),
  4542. category: 'instance creation',
  4543. fn: function (firstObject, secondObject, thirdObject){
  4544. var self=this;
  4545. 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", []));
  4546. return self;},
  4547. args: ["firstObject", "secondObject", "thirdObject"],
  4548. 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'),
  4549. messageSends: ["add:", "yourself", "new"],
  4550. referencedClasses: []
  4551. }),
  4552. smalltalk.Collection.klass);
  4553. smalltalk.addMethod(
  4554. unescape('_withAll_'),
  4555. smalltalk.method({
  4556. selector: unescape('withAll%3A'),
  4557. category: 'instance creation',
  4558. fn: function (aCollection){
  4559. var self=this;
  4560. return (function($rec){smalltalk.send($rec, "_addAll_", [aCollection]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  4561. return self;},
  4562. args: ["aCollection"],
  4563. source: unescape('withAll%3A%20aCollection%0A%09%20%20%20%20%5Eself%20new%0A%09%09addAll%3A%20aCollection%3B%0A%09%09yourself'),
  4564. messageSends: ["addAll:", "yourself", "new"],
  4565. referencedClasses: []
  4566. }),
  4567. smalltalk.Collection.klass);
  4568. smalltalk.addClass('SequenceableCollection', smalltalk.Collection, [], 'Kernel');
  4569. smalltalk.addMethod(
  4570. unescape('_at_'),
  4571. smalltalk.method({
  4572. selector: unescape('at%3A'),
  4573. category: 'accessing',
  4574. fn: function (anIndex){
  4575. var self=this;
  4576. return smalltalk.send(self, "_at_ifAbsent_", [anIndex, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
  4577. return self;},
  4578. args: ["anIndex"],
  4579. source: unescape('at%3A%20anIndex%0A%09%5Eself%20at%3A%20anIndex%20ifAbsent%3A%20%5B%0A%09%20%20%20%20self%20errorNotFound%5D'),
  4580. messageSends: ["at:ifAbsent:", "errorNotFound"],
  4581. referencedClasses: []
  4582. }),
  4583. smalltalk.SequenceableCollection);
  4584. smalltalk.addMethod(
  4585. unescape('_at_ifAbsent_'),
  4586. smalltalk.method({
  4587. selector: unescape('at%3AifAbsent%3A'),
  4588. category: 'accessing',
  4589. fn: function (anIndex, aBlock){
  4590. var self=this;
  4591. smalltalk.send(self, "_subclassResponsibility", []);
  4592. return self;},
  4593. args: ["anIndex", "aBlock"],
  4594. source: unescape('at%3A%20anIndex%20ifAbsent%3A%20aBlock%0A%09self%20subclassResponsibility'),
  4595. messageSends: ["subclassResponsibility"],
  4596. referencedClasses: []
  4597. }),
  4598. smalltalk.SequenceableCollection);
  4599. smalltalk.addMethod(
  4600. unescape('_at_put_'),
  4601. smalltalk.method({
  4602. selector: unescape('at%3Aput%3A'),
  4603. category: 'accessing',
  4604. fn: function (anIndex, anObject){
  4605. var self=this;
  4606. smalltalk.send(self, "_subclassResponsibility", []);
  4607. return self;},
  4608. args: ["anIndex", "anObject"],
  4609. source: unescape('at%3A%20anIndex%20put%3A%20anObject%0A%09self%20subclassResponsibility'),
  4610. messageSends: ["subclassResponsibility"],
  4611. referencedClasses: []
  4612. }),
  4613. smalltalk.SequenceableCollection);
  4614. smalltalk.addMethod(
  4615. unescape('_copyFrom_to_'),
  4616. smalltalk.method({
  4617. selector: unescape('copyFrom%3Ato%3A'),
  4618. category: 'copying',
  4619. fn: function (anIndex, anotherIndex){
  4620. var self=this;
  4621. smalltalk.send(self, "_subclassResponsibility", []);
  4622. return self;},
  4623. args: ["anIndex", "anotherIndex"],
  4624. source: unescape('copyFrom%3A%20anIndex%20to%3A%20anotherIndex%0A%09self%20subclassResponsibility'),
  4625. messageSends: ["subclassResponsibility"],
  4626. referencedClasses: []
  4627. }),
  4628. smalltalk.SequenceableCollection);
  4629. smalltalk.addMethod(
  4630. unescape('_first'),
  4631. smalltalk.method({
  4632. selector: unescape('first'),
  4633. category: 'accessing',
  4634. fn: function (){
  4635. var self=this;
  4636. return smalltalk.send(self, "_at_", [(1)]);
  4637. return self;},
  4638. args: [],
  4639. source: unescape('first%0A%09%5Eself%20at%3A%201'),
  4640. messageSends: ["at:"],
  4641. referencedClasses: []
  4642. }),
  4643. smalltalk.SequenceableCollection);
  4644. smalltalk.addMethod(
  4645. unescape('_fourth'),
  4646. smalltalk.method({
  4647. selector: unescape('fourth'),
  4648. category: 'accessing',
  4649. fn: function (){
  4650. var self=this;
  4651. return smalltalk.send(self, "_at_", [(4)]);
  4652. return self;},
  4653. args: [],
  4654. source: unescape('fourth%0A%09%5Eself%20at%3A%204'),
  4655. messageSends: ["at:"],
  4656. referencedClasses: []
  4657. }),
  4658. smalltalk.SequenceableCollection);
  4659. smalltalk.addMethod(
  4660. unescape('_last'),
  4661. smalltalk.method({
  4662. selector: unescape('last'),
  4663. category: 'accessing',
  4664. fn: function (){
  4665. var self=this;
  4666. return smalltalk.send(self, "_at_", [smalltalk.send(self, "_size", [])]);
  4667. return self;},
  4668. args: [],
  4669. source: unescape('last%0A%09%5Eself%20at%3A%20self%20size'),
  4670. messageSends: ["at:", "size"],
  4671. referencedClasses: []
  4672. }),
  4673. smalltalk.SequenceableCollection);
  4674. smalltalk.addMethod(
  4675. unescape('_second'),
  4676. smalltalk.method({
  4677. selector: unescape('second'),
  4678. category: 'accessing',
  4679. fn: function (){
  4680. var self=this;
  4681. return smalltalk.send(self, "_at_", [(2)]);
  4682. return self;},
  4683. args: [],
  4684. source: unescape('second%0A%09%5Eself%20at%3A%202'),
  4685. messageSends: ["at:"],
  4686. referencedClasses: []
  4687. }),
  4688. smalltalk.SequenceableCollection);
  4689. smalltalk.addMethod(
  4690. unescape('_third'),
  4691. smalltalk.method({
  4692. selector: unescape('third'),
  4693. category: 'accessing',
  4694. fn: function (){
  4695. var self=this;
  4696. return smalltalk.send(self, "_at_", [(3)]);
  4697. return self;},
  4698. args: [],
  4699. source: unescape('third%0A%09%5Eself%20at%3A%203'),
  4700. messageSends: ["at:"],
  4701. referencedClasses: []
  4702. }),
  4703. smalltalk.SequenceableCollection);
  4704. smalltalk.addMethod(
  4705. unescape('_removeLast'),
  4706. smalltalk.method({
  4707. selector: unescape('removeLast'),
  4708. category: 'adding',
  4709. fn: function (){
  4710. var self=this;
  4711. smalltalk.send(self, "_remove_", [smalltalk.send(self, "_last", [])]);
  4712. return self;},
  4713. args: [],
  4714. source: unescape('removeLast%0A%09self%20remove%3A%20self%20last'),
  4715. messageSends: ["remove:", "last"],
  4716. referencedClasses: []
  4717. }),
  4718. smalltalk.SequenceableCollection);
  4719. smalltalk.addMethod(
  4720. unescape('_addLast_'),
  4721. smalltalk.method({
  4722. selector: unescape('addLast%3A'),
  4723. category: 'adding',
  4724. fn: function (anObject){
  4725. var self=this;
  4726. smalltalk.send(self, "_add_", [anObject]);
  4727. return self;},
  4728. args: ["anObject"],
  4729. source: unescape('addLast%3A%20anObject%0A%09self%20add%3A%20anObject'),
  4730. messageSends: ["add:"],
  4731. referencedClasses: []
  4732. }),
  4733. smalltalk.SequenceableCollection);
  4734. smalltalk.addMethod(
  4735. unescape('_withIndexDo_'),
  4736. smalltalk.method({
  4737. selector: unescape('withIndexDo%3A'),
  4738. category: 'enumerating',
  4739. fn: function (aBlock){
  4740. var self=this;
  4741. for(var i=0;i<self.length;i++){aBlock(self[i], i+1);};
  4742. return self;},
  4743. args: ["aBlock"],
  4744. 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'),
  4745. messageSends: [],
  4746. referencedClasses: []
  4747. }),
  4748. smalltalk.SequenceableCollection);
  4749. smalltalk.addMethod(
  4750. unescape('_allButFirst'),
  4751. smalltalk.method({
  4752. selector: unescape('allButFirst'),
  4753. category: 'accessing',
  4754. fn: function (){
  4755. var self=this;
  4756. return smalltalk.send(self, "_copyFrom_to_", [(2), smalltalk.send(self, "_size", [])]);
  4757. return self;},
  4758. args: [],
  4759. source: unescape('allButFirst%0A%09%5Eself%20copyFrom%3A%202%20to%3A%20self%20size'),
  4760. messageSends: ["copyFrom:to:", "size"],
  4761. referencedClasses: []
  4762. }),
  4763. smalltalk.SequenceableCollection);
  4764. smalltalk.addMethod(
  4765. unescape('_allButLast'),
  4766. smalltalk.method({
  4767. selector: unescape('allButLast'),
  4768. category: 'accessing',
  4769. fn: function (){
  4770. var self=this;
  4771. return smalltalk.send(self, "_copyFrom_to_", [(1), ((($receiver = smalltalk.send(self, "_size", [])).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)]))]);
  4772. return self;},
  4773. args: [],
  4774. source: unescape('allButLast%0A%09%5Eself%20copyFrom%3A%201%20to%3A%20self%20size%20-%201'),
  4775. messageSends: ["copyFrom:to:", unescape("-"), "size"],
  4776. referencedClasses: []
  4777. }),
  4778. smalltalk.SequenceableCollection);
  4779. smalltalk.addMethod(
  4780. unescape('_indexOf_'),
  4781. smalltalk.method({
  4782. selector: unescape('indexOf%3A'),
  4783. category: 'accessing',
  4784. fn: function (anObject){
  4785. var self=this;
  4786. return smalltalk.send(self, "_indexOf_ifAbsent_", [anObject, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
  4787. return self;},
  4788. args: ["anObject"],
  4789. source: unescape('indexOf%3A%20anObject%0A%09%5Eself%20indexOf%3A%20anObject%20ifAbsent%3A%20%5Bself%20errorNotFound%5D'),
  4790. messageSends: ["indexOf:ifAbsent:", "errorNotFound"],
  4791. referencedClasses: []
  4792. }),
  4793. smalltalk.SequenceableCollection);
  4794. smalltalk.addMethod(
  4795. unescape('_indexOf_ifAbsent_'),
  4796. smalltalk.method({
  4797. selector: unescape('indexOf%3AifAbsent%3A'),
  4798. category: 'accessing',
  4799. fn: function (anObject, aBlock){
  4800. var self=this;
  4801. for(var i=0;i<self.length;i++){
  4802. if(self[i].__eq(anObject)) {return i+1}
  4803. }
  4804. return aBlock();
  4805. ;
  4806. return self;},
  4807. args: ["anObject", "aBlock"],
  4808. 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'),
  4809. messageSends: [],
  4810. referencedClasses: []
  4811. }),
  4812. smalltalk.SequenceableCollection);
  4813. smalltalk.addMethod(
  4814. unescape('_indexOf_startingAt_ifAbsent_'),
  4815. smalltalk.method({
  4816. selector: unescape('indexOf%3AstartingAt%3AifAbsent%3A'),
  4817. category: 'accessing',
  4818. fn: function (anObject, start, aBlock){
  4819. var self=this;
  4820. for(var i=start-1;i<self.length;i++){
  4821. if(self[i].__eq(anObject)) {return i+1}
  4822. }
  4823. return aBlock();
  4824. ;
  4825. return self;},
  4826. args: ["anObject", "start", "aBlock"],
  4827. 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'),
  4828. messageSends: [],
  4829. referencedClasses: []
  4830. }),
  4831. smalltalk.SequenceableCollection);
  4832. smalltalk.addMethod(
  4833. unescape('_indexOf_startingAt_'),
  4834. smalltalk.method({
  4835. selector: unescape('indexOf%3AstartingAt%3A'),
  4836. category: 'accessing',
  4837. fn: function (anObject, start){
  4838. var self=this;
  4839. return smalltalk.send(self, "_indexOf_startingAt_ifAbsent_", [anObject, start, (function(){return (0);})]);
  4840. return self;},
  4841. args: ["anObject", "start"],
  4842. 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'),
  4843. messageSends: ["indexOf:startingAt:ifAbsent:"],
  4844. referencedClasses: []
  4845. }),
  4846. smalltalk.SequenceableCollection);
  4847. smalltalk.addMethod(
  4848. unescape('_reversed'),
  4849. smalltalk.method({
  4850. selector: unescape('reversed'),
  4851. category: 'converting',
  4852. fn: function (){
  4853. var self=this;
  4854. smalltalk.send(self, "_subclassResponsibility", []);
  4855. return self;},
  4856. args: [],
  4857. source: unescape('reversed%0A%09self%20subclassResponsibility'),
  4858. messageSends: ["subclassResponsibility"],
  4859. referencedClasses: []
  4860. }),
  4861. smalltalk.SequenceableCollection);
  4862. smalltalk.addMethod(
  4863. unescape('_atRandom'),
  4864. smalltalk.method({
  4865. selector: unescape('atRandom'),
  4866. category: 'accessing',
  4867. fn: function (){
  4868. var self=this;
  4869. return smalltalk.send(self, "_at_", [smalltalk.send(smalltalk.send(self, "_size", []), "_atRandom", [])]);
  4870. return self;},
  4871. args: [],
  4872. source: unescape('atRandom%0A%09%5E%20self%20at%3A%20self%20size%20atRandom'),
  4873. messageSends: ["at:", "atRandom", "size"],
  4874. referencedClasses: []
  4875. }),
  4876. smalltalk.SequenceableCollection);
  4877. smalltalk.addClass('String', smalltalk.SequenceableCollection, [], 'Kernel');
  4878. smalltalk.addMethod(
  4879. unescape('__eq'),
  4880. smalltalk.method({
  4881. selector: unescape('%3D'),
  4882. category: 'comparing',
  4883. fn: function (aString){
  4884. var self=this;
  4885. 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}})})();})]));
  4886. return String(self) == aString;
  4887. return self;
  4888. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
  4889. args: ["aString"],
  4890. 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%20aString%3E'),
  4891. messageSends: ["ifFalse:", unescape("%3D"), "class"],
  4892. referencedClasses: []
  4893. }),
  4894. smalltalk.String);
  4895. smalltalk.addMethod(
  4896. unescape('_size'),
  4897. smalltalk.method({
  4898. selector: unescape('size'),
  4899. category: 'accessing',
  4900. fn: function (){
  4901. var self=this;
  4902. return self.length;
  4903. return self;},
  4904. args: [],
  4905. source: unescape('size%0A%09%3Creturn%20self.length%3E'),
  4906. messageSends: [],
  4907. referencedClasses: []
  4908. }),
  4909. smalltalk.String);
  4910. smalltalk.addMethod(
  4911. unescape('_at_'),
  4912. smalltalk.method({
  4913. selector: unescape('at%3A'),
  4914. category: 'accessing',
  4915. fn: function (anIndex){
  4916. var self=this;
  4917. return self[anIndex - 1];
  4918. return self;},
  4919. args: ["anIndex"],
  4920. source: unescape('at%3A%20anIndex%0A%09%3Creturn%20self%5BanIndex%20-%201%5D%3E'),
  4921. messageSends: [],
  4922. referencedClasses: []
  4923. }),
  4924. smalltalk.String);
  4925. smalltalk.addMethod(
  4926. unescape('_at_put_'),
  4927. smalltalk.method({
  4928. selector: unescape('at%3Aput%3A'),
  4929. category: 'accessing',
  4930. fn: function (anIndex, anObject){
  4931. var self=this;
  4932. smalltalk.send(self, "_errorReadOnly", []);
  4933. return self;},
  4934. args: ["anIndex", "anObject"],
  4935. source: unescape('at%3A%20anIndex%20put%3A%20anObject%0A%20%20%20%20%09self%20errorReadOnly'),
  4936. messageSends: ["errorReadOnly"],
  4937. referencedClasses: []
  4938. }),
  4939. smalltalk.String);
  4940. smalltalk.addMethod(
  4941. unescape('_at_ifAbsent_'),
  4942. smalltalk.method({
  4943. selector: unescape('at%3AifAbsent%3A'),
  4944. category: 'accessing',
  4945. fn: function (anIndex, aBlock){
  4946. var self=this;
  4947. (($receiver = smalltalk.send(self, "_at_", [anIndex])) == nil || $receiver == undefined) ? (function(){return aBlock;})() : $receiver;
  4948. return self;},
  4949. args: ["anIndex", "aBlock"],
  4950. source: unescape('at%3A%20anIndex%20ifAbsent%3A%20aBlock%0A%20%20%20%20%09%28self%20at%3A%20anIndex%29%20ifNil%3A%20%5BaBlock%5D'),
  4951. messageSends: ["ifNil:", "at:"],
  4952. referencedClasses: []
  4953. }),
  4954. smalltalk.String);
  4955. smalltalk.addMethod(
  4956. unescape('_escaped'),
  4957. smalltalk.method({
  4958. selector: unescape('escaped'),
  4959. category: 'accessing',
  4960. fn: function (){
  4961. var self=this;
  4962. return escape(self);
  4963. return self;},
  4964. args: [],
  4965. source: unescape('escaped%0A%09%3Creturn%20escape%28self%29%3E'),
  4966. messageSends: [],
  4967. referencedClasses: []
  4968. }),
  4969. smalltalk.String);
  4970. smalltalk.addMethod(
  4971. unescape('_unescaped'),
  4972. smalltalk.method({
  4973. selector: unescape('unescaped'),
  4974. category: 'accessing',
  4975. fn: function (){
  4976. var self=this;
  4977. return unescape(self);
  4978. return self;},
  4979. args: [],
  4980. source: unescape('unescaped%0A%09%3Creturn%20unescape%28self%29%3E'),
  4981. messageSends: [],
  4982. referencedClasses: []
  4983. }),
  4984. smalltalk.String);
  4985. smalltalk.addMethod(
  4986. unescape('_add_'),
  4987. smalltalk.method({
  4988. selector: unescape('add%3A'),
  4989. category: 'adding',
  4990. fn: function (anObject){
  4991. var self=this;
  4992. smalltalk.send(self, "_errorReadOnly", []);
  4993. return self;},
  4994. args: ["anObject"],
  4995. source: unescape('add%3A%20anObject%0A%20%20%20%20%09self%20errorReadOnly'),
  4996. messageSends: ["errorReadOnly"],
  4997. referencedClasses: []
  4998. }),
  4999. smalltalk.String);
  5000. smalltalk.addMethod(
  5001. unescape('__comma'),
  5002. smalltalk.method({
  5003. selector: unescape('%2C'),
  5004. category: 'copying',
  5005. fn: function (aString){
  5006. var self=this;
  5007. return self + aString;
  5008. return self;},
  5009. args: ["aString"],
  5010. source: unescape('%2C%20aString%0A%09%3Creturn%20self%20+%20aString%3E'),
  5011. messageSends: [],
  5012. referencedClasses: []
  5013. }),
  5014. smalltalk.String);
  5015. smalltalk.addMethod(
  5016. unescape('_copyFrom_to_'),
  5017. smalltalk.method({
  5018. selector: unescape('copyFrom%3Ato%3A'),
  5019. category: 'copying',
  5020. fn: function (anIndex, anotherIndex){
  5021. var self=this;
  5022. return self.substring(anIndex - 1, anotherIndex);
  5023. return self;},
  5024. args: ["anIndex", "anotherIndex"],
  5025. source: unescape('copyFrom%3A%20anIndex%20to%3A%20anotherIndex%0A%09%3Creturn%20self.substring%28anIndex%20-%201%2C%20anotherIndex%29%3E'),
  5026. messageSends: [],
  5027. referencedClasses: []
  5028. }),
  5029. smalltalk.String);
  5030. smalltalk.addMethod(
  5031. unescape('_shallowCopy'),
  5032. smalltalk.method({
  5033. selector: unescape('shallowCopy'),
  5034. category: 'copying',
  5035. fn: function (){
  5036. var self=this;
  5037. return smalltalk.send(smalltalk.send(self, "_class", []), "_fromString_", [self]);
  5038. return self;},
  5039. args: [],
  5040. source: unescape('shallowCopy%0A%20%20%20%20%09%5Eself%20class%20fromString%3A%20self'),
  5041. messageSends: ["fromString:", "class"],
  5042. referencedClasses: []
  5043. }),
  5044. smalltalk.String);
  5045. smalltalk.addMethod(
  5046. unescape('_deepCopy'),
  5047. smalltalk.method({
  5048. selector: unescape('deepCopy'),
  5049. category: 'copying',
  5050. fn: function (){
  5051. var self=this;
  5052. return smalltalk.send(self, "_shallowCopy", []);
  5053. return self;},
  5054. args: [],
  5055. source: unescape('deepCopy%0A%20%20%20%20%09%5Eself%20shallowCopy'),
  5056. messageSends: ["shallowCopy"],
  5057. referencedClasses: []
  5058. }),
  5059. smalltalk.String);
  5060. smalltalk.addMethod(
  5061. unescape('_asSelector'),
  5062. smalltalk.method({
  5063. selector: unescape('asSelector'),
  5064. category: 'converting',
  5065. fn: function (){
  5066. var self=this;
  5067. var selector=nil;
  5068. selector=smalltalk.send("_", "__comma", [self]);
  5069. selector=smalltalk.send(selector, "_replace_with_", [":", "_"]);
  5070. selector=smalltalk.send(selector, "_replace_with_", [unescape("%5B+%5D"), "_plus"]);
  5071. selector=smalltalk.send(selector, "_replace_with_", [unescape("-"), "_minus"]);
  5072. selector=smalltalk.send(selector, "_replace_with_", [unescape("%5B*%5D"), "_star"]);
  5073. selector=smalltalk.send(selector, "_replace_with_", [unescape("%5B/%5D"), "_slash"]);
  5074. selector=smalltalk.send(selector, "_replace_with_", [unescape("%3E"), "_gt"]);
  5075. selector=smalltalk.send(selector, "_replace_with_", [unescape("%3C"), "_lt"]);
  5076. selector=smalltalk.send(selector, "_replace_with_", [unescape("%3D"), "_eq"]);
  5077. selector=smalltalk.send(selector, "_replace_with_", [unescape("%2C"), "_comma"]);
  5078. selector=smalltalk.send(selector, "_replace_with_", [unescape("%5B@%5D"), "_at"]);
  5079. return selector;
  5080. return self;},
  5081. args: [],
  5082. source: unescape('asSelector%0A%09%22If%20you%20change%20this%20method%2C%20change%20smalltalk.convertSelector%20too%20%28see%20js/boot.js%20file%29%22%0A%0A%09%7C%20selector%20%7C%0A%09selector%20%3A%3D%20%27_%27%2C%20self.%0A%20%20%20%20%09selector%20%3A%3D%20selector%20replace%3A%20%27%3A%27%20with%3A%20%27_%27.%0A%20%20%20%20%09selector%20%3A%3D%20selector%20replace%3A%20%27%5B+%5D%27%20with%3A%20%27_plus%27.%0A%20%20%20%20%09selector%20%3A%3D%20selector%20replace%3A%20%27-%27%20with%3A%20%27_minus%27.%0A%20%20%20%20%09selector%20%3A%3D%20selector%20replace%3A%20%27%5B*%5D%27%20with%3A%20%27_star%27.%0A%20%20%20%20%09selector%20%3A%3D%20selector%20replace%3A%20%27%5B/%5D%27%20with%3A%20%27_slash%27.%0A%20%20%20%20%09selector%20%3A%3D%20selector%20replace%3A%20%27%3E%27%20with%3A%20%27_gt%27.%0A%20%20%20%20%09selector%20%3A%3D%20selector%20replace%3A%20%27%3C%27%20with%3A%20%27_lt%27.%0A%20%20%20%20%09selector%20%3A%3D%20selector%20replace%3A%20%27%3D%27%20with%3A%20%27_eq%27.%0A%20%20%20%20%09selector%20%3A%3D%20selector%20replace%3A%20%27%2C%27%20with%3A%20%27_comma%27.%0A%20%20%20%20%09selector%20%3A%3D%20selector%20replace%3A%20%27%5B@%5D%27%20with%3A%20%27_at%27.%0A%09%5Eselector'),
  5083. messageSends: [unescape("%2C"), "replace:with:"],
  5084. referencedClasses: []
  5085. }),
  5086. smalltalk.String);
  5087. smalltalk.addMethod(
  5088. unescape('_asJavascript'),
  5089. smalltalk.method({
  5090. selector: unescape('asJavascript'),
  5091. category: 'converting',
  5092. fn: function (){
  5093. var self=this;
  5094. if(self.search(/^[a-zA-Z0-9_:.$ ]*$/) == -1)
  5095. return "unescape(\"" + escape(self) + "\")";
  5096. else
  5097. return "\"" + self + "\"";
  5098. ;
  5099. return self;},
  5100. args: [],
  5101. 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'),
  5102. messageSends: [],
  5103. referencedClasses: []
  5104. }),
  5105. smalltalk.String);
  5106. smalltalk.addMethod(
  5107. unescape('_replace_with_'),
  5108. smalltalk.method({
  5109. selector: unescape('replace%3Awith%3A'),
  5110. category: 'regular expressions',
  5111. fn: function (aString, anotherString){
  5112. var self=this;
  5113. return smalltalk.send(self, "_replaceRegexp_with_", [smalltalk.send((smalltalk.RegularExpression || RegularExpression), "_fromString_flag_", [aString, "g"]), anotherString]);
  5114. return self;},
  5115. args: ["aString", "anotherString"],
  5116. source: unescape('replace%3A%20aString%20with%3A%20anotherString%0A%20%20%20%20%09%5Eself%20replaceRegexp%3A%20%28RegularExpression%20fromString%3A%20aString%20flag%3A%20%27g%27%29%20with%3A%20anotherString'),
  5117. messageSends: ["replaceRegexp:with:", "fromString:flag:"],
  5118. referencedClasses: ["RegularExpression"]
  5119. }),
  5120. smalltalk.String);
  5121. smalltalk.addMethod(
  5122. unescape('_replaceRegexp_with_'),
  5123. smalltalk.method({
  5124. selector: unescape('replaceRegexp%3Awith%3A'),
  5125. category: 'regular expressions',
  5126. fn: function (aRegexp, aString){
  5127. var self=this;
  5128. return self.replace(aRegexp, aString);
  5129. return self;},
  5130. args: ["aRegexp", "aString"],
  5131. source: unescape('replaceRegexp%3A%20aRegexp%20with%3A%20aString%0A%09%3Creturn%20self.replace%28aRegexp%2C%20aString%29%3E'),
  5132. messageSends: [],
  5133. referencedClasses: []
  5134. }),
  5135. smalltalk.String);
  5136. smalltalk.addMethod(
  5137. unescape('_tokenize_'),
  5138. smalltalk.method({
  5139. selector: unescape('tokenize%3A'),
  5140. category: 'converting',
  5141. fn: function (aString){
  5142. var self=this;
  5143. return self.split(aString);
  5144. return self;},
  5145. args: ["aString"],
  5146. source: unescape('tokenize%3A%20aString%0A%09%3Creturn%20self.split%28aString%29%3E'),
  5147. messageSends: [],
  5148. referencedClasses: []
  5149. }),
  5150. smalltalk.String);
  5151. smalltalk.addMethod(
  5152. unescape('_match_'),
  5153. smalltalk.method({
  5154. selector: unescape('match%3A'),
  5155. category: 'regular expressions',
  5156. fn: function (aRegexp){
  5157. var self=this;
  5158. return self.search(aRegexp) != -1;
  5159. return self;},
  5160. args: ["aRegexp"],
  5161. source: unescape('match%3A%20aRegexp%0A%09%3Creturn%20self.search%28aRegexp%29%20%21%3D%20-1%3E'),
  5162. messageSends: [],
  5163. referencedClasses: []
  5164. }),
  5165. smalltalk.String);
  5166. smalltalk.addMethod(
  5167. unescape('_asString'),
  5168. smalltalk.method({
  5169. selector: unescape('asString'),
  5170. category: 'converting',
  5171. fn: function (){
  5172. var self=this;
  5173. return self;
  5174. return self;},
  5175. args: [],
  5176. source: unescape('asString%0A%20%20%20%20%09%5Eself'),
  5177. messageSends: [],
  5178. referencedClasses: []
  5179. }),
  5180. smalltalk.String);
  5181. smalltalk.addMethod(
  5182. unescape('_asNumber'),
  5183. smalltalk.method({
  5184. selector: unescape('asNumber'),
  5185. category: 'converting',
  5186. fn: function (){
  5187. var self=this;
  5188. return Number(self);
  5189. return self;},
  5190. args: [],
  5191. source: unescape('asNumber%0A%09%3Creturn%20Number%28self%29%3E'),
  5192. messageSends: [],
  5193. referencedClasses: []
  5194. }),
  5195. smalltalk.String);
  5196. smalltalk.addMethod(
  5197. unescape('_errorReadOnly'),
  5198. smalltalk.method({
  5199. selector: unescape('errorReadOnly'),
  5200. category: 'error handling',
  5201. fn: function (){
  5202. var self=this;
  5203. smalltalk.send(self, "_error_", [unescape("Object%20is%20read-only")]);
  5204. return self;},
  5205. args: [],
  5206. source: unescape('errorReadOnly%0A%20%20%20%20%09self%20error%3A%20%27Object%20is%20read-only%27'),
  5207. messageSends: ["error:"],
  5208. referencedClasses: []
  5209. }),
  5210. smalltalk.String);
  5211. smalltalk.addMethod(
  5212. unescape('_printString'),
  5213. smalltalk.method({
  5214. selector: unescape('printString'),
  5215. category: 'printing',
  5216. fn: function (){
  5217. var self=this;
  5218. return smalltalk.send(smalltalk.send(unescape("%27"), "__comma", [self]), "__comma", [unescape("%27")]);
  5219. return self;},
  5220. args: [],
  5221. source: unescape('printString%0A%20%20%20%20%09%5E%27%27%27%27%2C%20self%2C%20%27%27%27%27'),
  5222. messageSends: [unescape("%2C")],
  5223. referencedClasses: []
  5224. }),
  5225. smalltalk.String);
  5226. smalltalk.addMethod(
  5227. unescape('_printNl'),
  5228. smalltalk.method({
  5229. selector: unescape('printNl'),
  5230. category: 'printing',
  5231. fn: function (){
  5232. var self=this;
  5233. console.log(self);
  5234. return self;},
  5235. args: [],
  5236. source: unescape('printNl%0A%09%3Cconsole.log%28self%29%3E'),
  5237. messageSends: [],
  5238. referencedClasses: []
  5239. }),
  5240. smalltalk.String);
  5241. smalltalk.addMethod(
  5242. unescape('_isString'),
  5243. smalltalk.method({
  5244. selector: unescape('isString'),
  5245. category: 'testing',
  5246. fn: function (){
  5247. var self=this;
  5248. return true;
  5249. return self;},
  5250. args: [],
  5251. source: unescape('isString%0A%20%20%20%20%09%5Etrue'),
  5252. messageSends: [],
  5253. referencedClasses: []
  5254. }),
  5255. smalltalk.String);
  5256. smalltalk.addMethod(
  5257. unescape('__gt'),
  5258. smalltalk.method({
  5259. selector: unescape('%3E'),
  5260. category: 'comparing',
  5261. fn: function (aString){
  5262. var self=this;
  5263. return String(self) > aString;
  5264. return self;},
  5265. args: ["aString"],
  5266. source: unescape('%3E%20aString%0A%09%3Creturn%20String%28self%29%20%3E%3E%20aString%3E'),
  5267. messageSends: [],
  5268. referencedClasses: []
  5269. }),
  5270. smalltalk.String);
  5271. smalltalk.addMethod(
  5272. unescape('__lt'),
  5273. smalltalk.method({
  5274. selector: unescape('%3C'),
  5275. category: 'comparing',
  5276. fn: function (aString){
  5277. var self=this;
  5278. return String(self) < aString;
  5279. return self;},
  5280. args: ["aString"],
  5281. source: unescape('%3C%20aString%0A%09%3Creturn%20String%28self%29%20%3C%20aString%3E'),
  5282. messageSends: [],
  5283. referencedClasses: []
  5284. }),
  5285. smalltalk.String);
  5286. smalltalk.addMethod(
  5287. unescape('__gt_eq'),
  5288. smalltalk.method({
  5289. selector: unescape('%3E%3D'),
  5290. category: 'comparing',
  5291. fn: function (aString){
  5292. var self=this;
  5293. return String(self) >= aString;
  5294. return self;},
  5295. args: ["aString"],
  5296. source: unescape('%3E%3D%20aString%0A%09%3Creturn%20String%28self%29%20%3E%3E%3D%20aString%3E'),
  5297. messageSends: [],
  5298. referencedClasses: []
  5299. }),
  5300. smalltalk.String);
  5301. smalltalk.addMethod(
  5302. unescape('__lt_eq'),
  5303. smalltalk.method({
  5304. selector: unescape('%3C%3D'),
  5305. category: 'comparing',
  5306. fn: function (aString){
  5307. var self=this;
  5308. return String(self) <= aString;
  5309. return self;},
  5310. args: ["aString"],
  5311. source: unescape('%3C%3D%20aString%0A%09%3Creturn%20String%28self%29%20%3C%3D%20aString%3E'),
  5312. messageSends: [],
  5313. referencedClasses: []
  5314. }),
  5315. smalltalk.String);
  5316. smalltalk.addMethod(
  5317. unescape('_remove_'),
  5318. smalltalk.method({
  5319. selector: unescape('remove%3A'),
  5320. category: 'adding',
  5321. fn: function (anObject){
  5322. var self=this;
  5323. smalltalk.send(self, "_errorReadOnly", []);
  5324. return self;},
  5325. args: ["anObject"],
  5326. source: unescape('remove%3A%20anObject%0A%09self%20errorReadOnly'),
  5327. messageSends: ["errorReadOnly"],
  5328. referencedClasses: []
  5329. }),
  5330. smalltalk.String);
  5331. smalltalk.addMethod(
  5332. unescape('_trimLeft_'),
  5333. smalltalk.method({
  5334. selector: unescape('trimLeft%3A'),
  5335. category: 'regular expressions',
  5336. fn: function (separators){
  5337. var self=this;
  5338. 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"]), ""]);
  5339. return self;},
  5340. args: ["separators"],
  5341. source: unescape('trimLeft%3A%20separators%0A%0A%20%20%20%20%09%5Eself%20replaceRegexp%3A%20%28RegularExpression%20fromString%3A%20%27%5E%5B%27%2C%20separators%2C%20%27%5D+%27%20flag%3A%20%27g%27%29%20with%3A%20%27%27'),
  5342. messageSends: ["replaceRegexp:with:", "fromString:flag:", unescape("%2C")],
  5343. referencedClasses: ["RegularExpression"]
  5344. }),
  5345. smalltalk.String);
  5346. smalltalk.addMethod(
  5347. unescape('_trimRight_'),
  5348. smalltalk.method({
  5349. selector: unescape('trimRight%3A'),
  5350. category: 'regular expressions',
  5351. fn: function (separators){
  5352. var self=this;
  5353. 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"]), ""]);
  5354. return self;},
  5355. args: ["separators"],
  5356. source: unescape('trimRight%3A%20separators%0A%0A%20%20%20%20%09%5Eself%20replaceRegexp%3A%20%28RegularExpression%20fromString%3A%20%27%5B%27%2C%20separators%2C%20%27%5D+%24%27%20flag%3A%20%27g%27%29%20with%3A%20%27%27'),
  5357. messageSends: ["replaceRegexp:with:", "fromString:flag:", unescape("%2C")],
  5358. referencedClasses: ["RegularExpression"]
  5359. }),
  5360. smalltalk.String);
  5361. smalltalk.addMethod(
  5362. unescape('_trimLeft'),
  5363. smalltalk.method({
  5364. selector: unescape('trimLeft'),
  5365. category: 'regular expressions',
  5366. fn: function (){
  5367. var self=this;
  5368. return smalltalk.send(self, "_trimLeft_", [unescape("%5Cs")]);
  5369. return self;},
  5370. args: [],
  5371. source: unescape('trimLeft%0A%09%5Eself%20trimLeft%3A%20%27%5Cs%27'),
  5372. messageSends: ["trimLeft:"],
  5373. referencedClasses: []
  5374. }),
  5375. smalltalk.String);
  5376. smalltalk.addMethod(
  5377. unescape('_trimRight'),
  5378. smalltalk.method({
  5379. selector: unescape('trimRight'),
  5380. category: 'regular expressions',
  5381. fn: function (){
  5382. var self=this;
  5383. return smalltalk.send(self, "_trimRight_", [unescape("%5Cs")]);
  5384. return self;},
  5385. args: [],
  5386. source: unescape('trimRight%0A%09%5Eself%20trimRight%3A%20%27%5Cs%27'),
  5387. messageSends: ["trimRight:"],
  5388. referencedClasses: []
  5389. }),
  5390. smalltalk.String);
  5391. smalltalk.addMethod(
  5392. unescape('_trimBoth'),
  5393. smalltalk.method({
  5394. selector: unescape('trimBoth'),
  5395. category: 'regular expressions',
  5396. fn: function (){
  5397. var self=this;
  5398. return smalltalk.send(self, "_trimBoth_", [unescape("%5Cs")]);
  5399. return self;},
  5400. args: [],
  5401. source: unescape('trimBoth%0A%09%5Eself%20trimBoth%3A%20%27%5Cs%27'),
  5402. messageSends: ["trimBoth:"],
  5403. referencedClasses: []
  5404. }),
  5405. smalltalk.String);
  5406. smalltalk.addMethod(
  5407. unescape('_trimBoth_'),
  5408. smalltalk.method({
  5409. selector: unescape('trimBoth%3A'),
  5410. category: 'regular expressions',
  5411. fn: function (separators){
  5412. var self=this;
  5413. return smalltalk.send(smalltalk.send(self, "_trimLeft_", [separators]), "_trimRight_", [separators]);
  5414. return self;},
  5415. args: ["separators"],
  5416. source: unescape('trimBoth%3A%20separators%0A%0A%20%20%20%20%09%5E%28self%20trimLeft%3A%20separators%29%20trimRight%3A%20separators'),
  5417. messageSends: ["trimRight:", "trimLeft:"],
  5418. referencedClasses: []
  5419. }),
  5420. smalltalk.String);
  5421. smalltalk.addMethod(
  5422. unescape('_asLowercase'),
  5423. smalltalk.method({
  5424. selector: unescape('asLowercase'),
  5425. category: 'converting',
  5426. fn: function (){
  5427. var self=this;
  5428. return self.toLowerCase();
  5429. return self;},
  5430. args: [],
  5431. source: unescape('asLowercase%0A%09%3Creturn%20self.toLowerCase%28%29%3E'),
  5432. messageSends: [],
  5433. referencedClasses: []
  5434. }),
  5435. smalltalk.String);
  5436. smalltalk.addMethod(
  5437. unescape('_asUppercase'),
  5438. smalltalk.method({
  5439. selector: unescape('asUppercase'),
  5440. category: 'converting',
  5441. fn: function (){
  5442. var self=this;
  5443. return self.toUpperCase();
  5444. return self;},
  5445. args: [],
  5446. source: unescape('asUppercase%0A%09%3Creturn%20self.toUpperCase%28%29%3E'),
  5447. messageSends: [],
  5448. referencedClasses: []
  5449. }),
  5450. smalltalk.String);
  5451. smalltalk.addMethod(
  5452. unescape('_join_'),
  5453. smalltalk.method({
  5454. selector: unescape('join%3A'),
  5455. category: 'split join',
  5456. fn: function (aCollection){
  5457. var self=this;
  5458. 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]);})]);})]);
  5459. return self;},
  5460. args: ["aCollection"],
  5461. 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'),
  5462. messageSends: ["streamContents:", "do:separatedBy:", "nextPutAll:", "asString"],
  5463. referencedClasses: ["String"]
  5464. }),
  5465. smalltalk.String);
  5466. smalltalk.addMethod(
  5467. unescape('_includesSubString_'),
  5468. smalltalk.method({
  5469. selector: unescape('includesSubString%3A'),
  5470. category: 'testing',
  5471. fn: function (subString){
  5472. var self=this;
  5473. return self.indexOf(subString) != -1 ;
  5474. return self;},
  5475. args: ["subString"],
  5476. source: unescape('includesSubString%3A%20subString%0A%09%3C%20return%20self.indexOf%28subString%29%20%21%3D%20-1%20%3E'),
  5477. messageSends: [],
  5478. referencedClasses: []
  5479. }),
  5480. smalltalk.String);
  5481. smalltalk.addMethod(
  5482. unescape('_asciiValue'),
  5483. smalltalk.method({
  5484. selector: unescape('asciiValue'),
  5485. category: 'accessing',
  5486. fn: function (){
  5487. var self=this;
  5488. return self.charCodeAt(0);;
  5489. return self;},
  5490. args: [],
  5491. source: unescape('asciiValue%0A%09%3Creturn%20self.charCodeAt%280%29%3B%3E'),
  5492. messageSends: [],
  5493. referencedClasses: []
  5494. }),
  5495. smalltalk.String);
  5496. smalltalk.addMethod(
  5497. unescape('_lineIndicesDo_'),
  5498. smalltalk.method({
  5499. selector: unescape('lineIndicesDo%3A'),
  5500. category: 'split join',
  5501. fn: function (aBlock){
  5502. var self=this;
  5503. try{var cr=nil;
  5504. var lf=nil;
  5505. var start=nil;
  5506. var sz=nil;
  5507. var nextLF=nil;
  5508. var nextCR=nil;
  5509. start=(1);
  5510. sz=smalltalk.send(self, "_size", []);
  5511. cr=smalltalk.send((smalltalk.String || String), "_cr", []);
  5512. nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, (1)]);
  5513. lf=smalltalk.send((smalltalk.String || String), "_lf", []);
  5514. nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, (1)]);
  5515. (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]);})]));})]));})()}})();
  5516. return self;
  5517. } catch(e) {if(e.name === 'stReturn' && e.selector === '_lineIndicesDo_'){return e.fn()} throw(e)}},
  5518. args: ["aBlock"],
  5519. 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'),
  5520. messageSends: ["size", "cr", "indexOf:startingAt:", "lf", "whileTrue:", unescape("%3C%3D"), "ifTrue:", "and:", unescape("%3D"), "value:value:value:", "ifTrue:ifFalse:", "or:", unescape("%3C"), unescape("-"), unescape("+")],
  5521. referencedClasses: ["String"]
  5522. }),
  5523. smalltalk.String);
  5524. smalltalk.addMethod(
  5525. unescape('_linesDo_'),
  5526. smalltalk.method({
  5527. selector: unescape('linesDo%3A'),
  5528. category: 'split join',
  5529. fn: function (aBlock){
  5530. var self=this;
  5531. smalltalk.send(self, "_lineIndicesDo_", [(function(start, endWithoutDelimiters, end){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_copyFrom_to_", [start, endWithoutDelimiters])]);})]);
  5532. return self;},
  5533. args: ["aBlock"],
  5534. 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'),
  5535. messageSends: ["lineIndicesDo:", "value:", "copyFrom:to:"],
  5536. referencedClasses: []
  5537. }),
  5538. smalltalk.String);
  5539. smalltalk.addMethod(
  5540. unescape('_lines'),
  5541. smalltalk.method({
  5542. selector: unescape('lines'),
  5543. category: 'split join',
  5544. fn: function (){
  5545. var self=this;
  5546. var lines=nil;
  5547. lines=smalltalk.send((smalltalk.Array || Array), "_new", []);
  5548. smalltalk.send(self, "_linesDo_", [(function(aLine){return smalltalk.send(lines, "_add_", [aLine]);})]);
  5549. return lines;
  5550. return self;},
  5551. args: [],
  5552. 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'),
  5553. messageSends: ["new", "linesDo:", "add:"],
  5554. referencedClasses: ["Array"]
  5555. }),
  5556. smalltalk.String);
  5557. smalltalk.addMethod(
  5558. unescape('_lineNumber_'),
  5559. smalltalk.method({
  5560. selector: unescape('lineNumber%3A'),
  5561. category: 'split join',
  5562. fn: function (anIndex){
  5563. var self=this;
  5564. try{var lineCount=nil;
  5565. lineCount=(0);
  5566. 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])}})})();})]));})]);
  5567. (function(){throw({name: 'stReturn', selector: '_lineNumber_', fn: function(){return nil}})})();
  5568. return self;
  5569. } catch(e) {if(e.name === 'stReturn' && e.selector === '_lineNumber_'){return e.fn()} throw(e)}},
  5570. args: ["anIndex"],
  5571. 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'),
  5572. messageSends: ["lineIndicesDo:", "ifTrue:", unescape("%3D"), unescape("+"), "copyFrom:to:"],
  5573. referencedClasses: []
  5574. }),
  5575. smalltalk.String);
  5576. smalltalk.addMethod(
  5577. unescape('_reversed'),
  5578. smalltalk.method({
  5579. selector: unescape('reversed'),
  5580. category: 'converting',
  5581. fn: function (){
  5582. var self=this;
  5583. return self.split("").reverse().join("");
  5584. return self;},
  5585. args: [],
  5586. source: unescape('reversed%0A%09%3Creturn%20self.split%28%22%22%29.reverse%28%29.join%28%22%22%29%3E'),
  5587. messageSends: [],
  5588. referencedClasses: []
  5589. }),
  5590. smalltalk.String);
  5591. smalltalk.addMethod(
  5592. unescape('__eq_eq'),
  5593. smalltalk.method({
  5594. selector: unescape('%3D%3D'),
  5595. category: 'comparing',
  5596. fn: function (aString){
  5597. var self=this;
  5598. 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_eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq_eq', fn: function(){return false}})})();})]));
  5599. return String(self) === String(aString);
  5600. return self;
  5601. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq_eq'){return e.fn()} throw(e)}},
  5602. args: ["aString"],
  5603. source: unescape('%3D%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'),
  5604. messageSends: ["ifFalse:", unescape("%3D"), "class"],
  5605. referencedClasses: []
  5606. }),
  5607. smalltalk.String);
  5608. smalltalk.addMethod(
  5609. unescape('_asJavaScriptSelector'),
  5610. smalltalk.method({
  5611. selector: unescape('asJavaScriptSelector'),
  5612. category: 'converting',
  5613. fn: function (){
  5614. var self=this;
  5615. return smalltalk.send(smalltalk.send(smalltalk.send(self, "_asSelector", []), "_replace_with_", [unescape("%5E_"), ""]), "_replace_with_", [unescape("_.*"), ""]);
  5616. return self;},
  5617. args: [],
  5618. 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.'),
  5619. messageSends: ["replace:with:", "asSelector"],
  5620. referencedClasses: []
  5621. }),
  5622. smalltalk.String);
  5623. smalltalk.addMethod(
  5624. unescape('_streamClass'),
  5625. smalltalk.method({
  5626. selector: unescape('streamClass'),
  5627. category: 'accessing',
  5628. fn: function (){
  5629. var self=this;
  5630. return (smalltalk.StringStream || StringStream);
  5631. return self;},
  5632. args: [],
  5633. source: unescape('streamClass%0A%09%20%20%20%20%5EStringStream'),
  5634. messageSends: [],
  5635. referencedClasses: ["StringStream"]
  5636. }),
  5637. smalltalk.String.klass);
  5638. smalltalk.addMethod(
  5639. unescape('_fromString_'),
  5640. smalltalk.method({
  5641. selector: unescape('fromString%3A'),
  5642. category: 'instance creation',
  5643. fn: function (aString){
  5644. var self=this;
  5645. return new self.fn(aString);
  5646. return self;},
  5647. args: ["aString"],
  5648. source: unescape('fromString%3A%20aString%0A%09%20%20%20%20%3Creturn%20new%20self.fn%28aString%29%3E'),
  5649. messageSends: [],
  5650. referencedClasses: []
  5651. }),
  5652. smalltalk.String.klass);
  5653. smalltalk.addMethod(
  5654. unescape('_cr'),
  5655. smalltalk.method({
  5656. selector: unescape('cr'),
  5657. category: 'accessing',
  5658. fn: function (){
  5659. var self=this;
  5660. return '\r';
  5661. return self;},
  5662. args: [],
  5663. source: unescape('cr%0A%09%3Creturn%20%27%5Cr%27%3E'),
  5664. messageSends: [],
  5665. referencedClasses: []
  5666. }),
  5667. smalltalk.String.klass);
  5668. smalltalk.addMethod(
  5669. unescape('_lf'),
  5670. smalltalk.method({
  5671. selector: unescape('lf'),
  5672. category: 'accessing',
  5673. fn: function (){
  5674. var self=this;
  5675. return '\n';
  5676. return self;},
  5677. args: [],
  5678. source: unescape('lf%0A%09%3Creturn%20%27%5Cn%27%3E'),
  5679. messageSends: [],
  5680. referencedClasses: []
  5681. }),
  5682. smalltalk.String.klass);
  5683. smalltalk.addMethod(
  5684. unescape('_space'),
  5685. smalltalk.method({
  5686. selector: unescape('space'),
  5687. category: 'accessing',
  5688. fn: function (){
  5689. var self=this;
  5690. return ' ';
  5691. return self;},
  5692. args: [],
  5693. source: unescape('space%0A%09%3Creturn%20%27%20%27%3E'),
  5694. messageSends: [],
  5695. referencedClasses: []
  5696. }),
  5697. smalltalk.String.klass);
  5698. smalltalk.addMethod(
  5699. unescape('_tab'),
  5700. smalltalk.method({
  5701. selector: unescape('tab'),
  5702. category: 'accessing',
  5703. fn: function (){
  5704. var self=this;
  5705. return '\t';
  5706. return self;},
  5707. args: [],
  5708. source: unescape('tab%0A%09%3Creturn%20%27%5Ct%27%3E'),
  5709. messageSends: [],
  5710. referencedClasses: []
  5711. }),
  5712. smalltalk.String.klass);
  5713. smalltalk.addMethod(
  5714. unescape('_crlf'),
  5715. smalltalk.method({
  5716. selector: unescape('crlf'),
  5717. category: 'accessing',
  5718. fn: function (){
  5719. var self=this;
  5720. return '\r\n';
  5721. return self;},
  5722. args: [],
  5723. source: unescape('crlf%0A%09%3Creturn%20%27%5Cr%5Cn%27%3E'),
  5724. messageSends: [],
  5725. referencedClasses: []
  5726. }),
  5727. smalltalk.String.klass);
  5728. smalltalk.addMethod(
  5729. unescape('_streamContents_'),
  5730. smalltalk.method({
  5731. selector: unescape('streamContents%3A'),
  5732. category: 'instance creation',
  5733. fn: function (blockWithArg){
  5734. var self=this;
  5735. var stream=nil;
  5736. stream=smalltalk.send(smalltalk.send(self, "_streamClass", []), "_on_", [smalltalk.send((smalltalk.String || String), "_new", [])]);
  5737. smalltalk.send(blockWithArg, "_value_", [stream]);
  5738. return smalltalk.send(stream, "_contents", []);
  5739. return self;},
  5740. args: ["blockWithArg"],
  5741. 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'),
  5742. messageSends: ["on:", "streamClass", "new", "value:", "contents"],
  5743. referencedClasses: ["String"]
  5744. }),
  5745. smalltalk.String.klass);
  5746. smalltalk.addMethod(
  5747. unescape('_value_'),
  5748. smalltalk.method({
  5749. selector: unescape('value%3A'),
  5750. category: 'instance creation',
  5751. fn: function (aUTFCharCode){
  5752. var self=this;
  5753. return String.fromCharCode(aUTFCharCode);;
  5754. return self;},
  5755. args: ["aUTFCharCode"],
  5756. source: unescape('value%3A%20aUTFCharCode%0A%0A%09%3Creturn%20String.fromCharCode%28aUTFCharCode%29%3B%3E'),
  5757. messageSends: [],
  5758. referencedClasses: []
  5759. }),
  5760. smalltalk.String.klass);
  5761. smalltalk.addClass('Array', smalltalk.SequenceableCollection, [], 'Kernel');
  5762. smalltalk.addMethod(
  5763. unescape('_size'),
  5764. smalltalk.method({
  5765. selector: unescape('size'),
  5766. category: 'accessing',
  5767. fn: function (){
  5768. var self=this;
  5769. return self.length;
  5770. return self;},
  5771. args: [],
  5772. source: unescape('size%0A%09%3Creturn%20self.length%3E'),
  5773. messageSends: [],
  5774. referencedClasses: []
  5775. }),
  5776. smalltalk.Array);
  5777. smalltalk.addMethod(
  5778. unescape('_at_put_'),
  5779. smalltalk.method({
  5780. selector: unescape('at%3Aput%3A'),
  5781. category: 'accessing',
  5782. fn: function (anIndex, anObject){
  5783. var self=this;
  5784. return self[anIndex - 1] = anObject;
  5785. return self;},
  5786. args: ["anIndex", "anObject"],
  5787. source: unescape('at%3A%20anIndex%20put%3A%20anObject%0A%09%3Creturn%20self%5BanIndex%20-%201%5D%20%3D%20anObject%3E'),
  5788. messageSends: [],
  5789. referencedClasses: []
  5790. }),
  5791. smalltalk.Array);
  5792. smalltalk.addMethod(
  5793. unescape('_at_ifAbsent_'),
  5794. smalltalk.method({
  5795. selector: unescape('at%3AifAbsent%3A'),
  5796. category: 'accessing',
  5797. fn: function (anIndex, aBlock){
  5798. var self=this;
  5799. var value = self[anIndex - 1];
  5800. if(value === undefined) {
  5801. return aBlock();
  5802. } else {
  5803. return value;
  5804. }
  5805. ;
  5806. return self;},
  5807. args: ["anIndex", "aBlock"],
  5808. 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'),
  5809. messageSends: [],
  5810. referencedClasses: []
  5811. }),
  5812. smalltalk.Array);
  5813. smalltalk.addMethod(
  5814. unescape('_add_'),
  5815. smalltalk.method({
  5816. selector: unescape('add%3A'),
  5817. category: 'adding/removing',
  5818. fn: function (anObject){
  5819. var self=this;
  5820. self.push(anObject); return anObject;;
  5821. return self;},
  5822. args: ["anObject"],
  5823. source: unescape('add%3A%20anObject%0A%09%3Cself.push%28anObject%29%3B%20return%20anObject%3B%3E'),
  5824. messageSends: [],
  5825. referencedClasses: []
  5826. }),
  5827. smalltalk.Array);
  5828. smalltalk.addMethod(
  5829. unescape('_shallowCopy'),
  5830. smalltalk.method({
  5831. selector: unescape('shallowCopy'),
  5832. category: 'copying',
  5833. fn: function (){
  5834. var self=this;
  5835. var newCollection=nil;
  5836. newCollection=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []);
  5837. smalltalk.send(self, "_do_", [(function(each){return smalltalk.send(newCollection, "_add_", [each]);})]);
  5838. return newCollection;
  5839. return self;},
  5840. args: [],
  5841. source: unescape('shallowCopy%0A%09%7C%20newCollection%20%7C%0A%09newCollection%20%3A%3D%20self%20class%20new.%0A%09self%20do%3A%20%5B%3Aeach%20%7C%20newCollection%20add%3A%20each%5D.%0A%09%5EnewCollection'),
  5842. messageSends: ["new", "class", "do:", "add:"],
  5843. referencedClasses: []
  5844. }),
  5845. smalltalk.Array);
  5846. smalltalk.addMethod(
  5847. unescape('_deepCopy'),
  5848. smalltalk.method({
  5849. selector: unescape('deepCopy'),
  5850. category: 'copying',
  5851. fn: function (){
  5852. var self=this;
  5853. var newCollection=nil;
  5854. newCollection=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []);
  5855. smalltalk.send(self, "_do_", [(function(each){return smalltalk.send(newCollection, "_add_", [smalltalk.send(each, "_deepCopy", [])]);})]);
  5856. return newCollection;
  5857. return self;},
  5858. args: [],
  5859. source: unescape('deepCopy%0A%09%7C%20newCollection%20%7C%0A%09newCollection%20%3A%3D%20self%20class%20new.%0A%09self%20do%3A%20%5B%3Aeach%20%7C%20newCollection%20add%3A%20each%20deepCopy%5D.%0A%09%5EnewCollection'),
  5860. messageSends: ["new", "class", "do:", "add:", "deepCopy"],
  5861. referencedClasses: []
  5862. }),
  5863. smalltalk.Array);
  5864. smalltalk.addMethod(
  5865. unescape('_copyFrom_to_'),
  5866. smalltalk.method({
  5867. selector: unescape('copyFrom%3Ato%3A'),
  5868. category: 'copying',
  5869. fn: function (anIndex, anotherIndex){
  5870. var self=this;
  5871. var array=nil;
  5872. array=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []);
  5873. smalltalk.send(anIndex, "_to_do_", [anotherIndex, (function(each){return smalltalk.send(array, "_add_", [smalltalk.send(self, "_at_", [each])]);})]);
  5874. return array;
  5875. return self;},
  5876. args: ["anIndex", "anotherIndex"],
  5877. source: unescape('copyFrom%3A%20anIndex%20to%3A%20anotherIndex%0A%09%7C%20array%20%7C%0A%09array%20%3A%3D%20self%20class%20new.%0A%09anIndex%20to%3A%20anotherIndex%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20array%20add%3A%20%28self%20at%3A%20each%29%5D.%0A%09%5Earray'),
  5878. messageSends: ["new", "class", "to:do:", "add:", "at:"],
  5879. referencedClasses: []
  5880. }),
  5881. smalltalk.Array);
  5882. smalltalk.addMethod(
  5883. unescape('_join_'),
  5884. smalltalk.method({
  5885. selector: unescape('join%3A'),
  5886. category: 'enumerating',
  5887. fn: function (aString){
  5888. var self=this;
  5889. return self.join(aString);
  5890. return self;},
  5891. args: ["aString"],
  5892. source: unescape('join%3A%20aString%0A%09%3Creturn%20self.join%28aString%29%3E'),
  5893. messageSends: [],
  5894. referencedClasses: []
  5895. }),
  5896. smalltalk.Array);
  5897. smalltalk.addMethod(
  5898. unescape('_asJavascript'),
  5899. smalltalk.method({
  5900. selector: unescape('asJavascript'),
  5901. category: 'converting',
  5902. fn: function (){
  5903. var self=this;
  5904. 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")]);
  5905. return self;},
  5906. args: [],
  5907. 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'),
  5908. messageSends: [unescape("%2C"), "join:", "collect:", "asJavascript"],
  5909. referencedClasses: []
  5910. }),
  5911. smalltalk.Array);
  5912. smalltalk.addMethod(
  5913. unescape('_sort'),
  5914. smalltalk.method({
  5915. selector: unescape('sort'),
  5916. category: 'enumerating',
  5917. fn: function (){
  5918. var self=this;
  5919. return smalltalk.send(self, "_basicPerform_", ["sort"]);
  5920. return self;},
  5921. args: [],
  5922. source: unescape('sort%0A%20%20%20%20%5Eself%20basicPerform%3A%20%27sort%27'),
  5923. messageSends: ["basicPerform:"],
  5924. referencedClasses: []
  5925. }),
  5926. smalltalk.Array);
  5927. smalltalk.addMethod(
  5928. unescape('_sort_'),
  5929. smalltalk.method({
  5930. selector: unescape('sort%3A'),
  5931. category: 'enumerating',
  5932. fn: function (aBlock){
  5933. var self=this;
  5934. return self.sort(function(a, b) {
  5935. if(aBlock(a,b)) {return -1} else {return 1}
  5936. })
  5937. ;
  5938. return self;},
  5939. args: ["aBlock"],
  5940. 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'),
  5941. messageSends: [],
  5942. referencedClasses: []
  5943. }),
  5944. smalltalk.Array);
  5945. smalltalk.addMethod(
  5946. unescape('_remove_'),
  5947. smalltalk.method({
  5948. selector: unescape('remove%3A'),
  5949. category: 'adding/removing',
  5950. fn: function (anObject){
  5951. var self=this;
  5952. for(var i=0;i<self.length;i++) {
  5953. if(self[i] == anObject) {
  5954. self.splice(i,1);
  5955. break;
  5956. }
  5957. }
  5958. ;
  5959. return self;},
  5960. args: ["anObject"],
  5961. 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'),
  5962. messageSends: [],
  5963. referencedClasses: []
  5964. }),
  5965. smalltalk.Array);
  5966. smalltalk.addMethod(
  5967. unescape('_sorted'),
  5968. smalltalk.method({
  5969. selector: unescape('sorted'),
  5970. category: 'enumerating',
  5971. fn: function (){
  5972. var self=this;
  5973. return smalltalk.send(smalltalk.send(self, "_copy", []), "_sort", []);
  5974. return self;},
  5975. args: [],
  5976. source: unescape('sorted%0A%09%5Eself%20copy%20sort'),
  5977. messageSends: ["sort", "copy"],
  5978. referencedClasses: []
  5979. }),
  5980. smalltalk.Array);
  5981. smalltalk.addMethod(
  5982. unescape('_sorted_'),
  5983. smalltalk.method({
  5984. selector: unescape('sorted%3A'),
  5985. category: 'enumerating',
  5986. fn: function (aBlock){
  5987. var self=this;
  5988. return smalltalk.send(smalltalk.send(self, "_copy", []), "_sort_", [aBlock]);
  5989. return self;},
  5990. args: ["aBlock"],
  5991. source: unescape('sorted%3A%20aBlock%0A%09%5Eself%20copy%20sort%3A%20aBlock'),
  5992. messageSends: ["sort:", "copy"],
  5993. referencedClasses: []
  5994. }),
  5995. smalltalk.Array);
  5996. smalltalk.addMethod(
  5997. unescape('_removeFrom_to_'),
  5998. smalltalk.method({
  5999. selector: unescape('removeFrom%3Ato%3A'),
  6000. category: 'adding/removing',
  6001. fn: function (aNumber, anotherNumber){
  6002. var self=this;
  6003. self.splice(aNumber - 1,anotherNumber - 1);
  6004. return self;},
  6005. args: ["aNumber", "anotherNumber"],
  6006. source: unescape('removeFrom%3A%20aNumber%20to%3A%20anotherNumber%0A%09%3Cself.splice%28aNumber%20-%201%2CanotherNumber%20-%201%29%3E'),
  6007. messageSends: [],
  6008. referencedClasses: []
  6009. }),
  6010. smalltalk.Array);
  6011. smalltalk.addMethod(
  6012. unescape('_printString'),
  6013. smalltalk.method({
  6014. selector: unescape('printString'),
  6015. category: 'enumerating',
  6016. fn: function (){
  6017. var self=this;
  6018. var str=nil;
  6019. str=smalltalk.send("", "_writeStream", []);
  6020. smalltalk.send(str, "_nextPutAll_", [smalltalk.send(smalltalk.send(self, "_printString", [], smalltalk.SequenceableCollection), "__comma", [unescape("%20%28")])]);
  6021. smalltalk.send(self, "_do_separatedBy_", [(function(each){return smalltalk.send(str, "_nextPutAll_", [smalltalk.send(each, "_printString", [])]);}), (function(){return smalltalk.send(str, "_nextPutAll_", [" "]);})]);
  6022. smalltalk.send(str, "_nextPutAll_", [unescape("%29")]);
  6023. return smalltalk.send(str, "_contents", []);
  6024. return self;},
  6025. args: [],
  6026. 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'),
  6027. messageSends: ["writeStream", "nextPutAll:", unescape("%2C"), "printString", "do:separatedBy:", "contents"],
  6028. referencedClasses: []
  6029. }),
  6030. smalltalk.Array);
  6031. smalltalk.addMethod(
  6032. unescape('_reversed'),
  6033. smalltalk.method({
  6034. selector: unescape('reversed'),
  6035. category: 'converting',
  6036. fn: function (){
  6037. var self=this;
  6038. return self._copy().reverse();
  6039. return self;},
  6040. args: [],
  6041. source: unescape('reversed%0A%09%3Creturn%20self._copy%28%29.reverse%28%29%3E'),
  6042. messageSends: [],
  6043. referencedClasses: []
  6044. }),
  6045. smalltalk.Array);
  6046. smalltalk.addMethod(
  6047. unescape('__eq'),
  6048. smalltalk.method({
  6049. selector: unescape('%3D'),
  6050. category: 'comparing',
  6051. fn: function (aCollection){
  6052. var self=this;
  6053. 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}})})();})]));
  6054. 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}})})();})]));})]);
  6055. (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return true}})})();
  6056. return self;
  6057. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
  6058. args: ["aCollection"],
  6059. source: unescape('%3D%20aCollection%0A%09%28self%20class%20%3D%20aCollection%20class%20and%3A%20%5B%0A%20%20%20%20%20%20%20%20%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'),
  6060. messageSends: ["ifFalse:", "and:", unescape("%3D"), "class", "size", "withIndexDo:", "at:"],
  6061. referencedClasses: []
  6062. }),
  6063. smalltalk.Array);
  6064. smalltalk.addClass('RegularExpression', smalltalk.Object, [], 'Kernel');
  6065. smalltalk.addMethod(
  6066. unescape('_compile_'),
  6067. smalltalk.method({
  6068. selector: unescape('compile%3A'),
  6069. category: 'evaluating',
  6070. fn: function (aString){
  6071. var self=this;
  6072. return self.compile(aString);
  6073. return self;},
  6074. args: ["aString"],
  6075. source: unescape('compile%3A%20aString%0A%09%3Creturn%20self.compile%28aString%29%3E'),
  6076. messageSends: [],
  6077. referencedClasses: []
  6078. }),
  6079. smalltalk.RegularExpression);
  6080. smalltalk.addMethod(
  6081. unescape('_exec_'),
  6082. smalltalk.method({
  6083. selector: unescape('exec%3A'),
  6084. category: 'evaluating',
  6085. fn: function (aString){
  6086. var self=this;
  6087. return self.exec(aString) || nil;
  6088. return self;},
  6089. args: ["aString"],
  6090. source: unescape('exec%3A%20aString%0A%09%3Creturn%20self.exec%28aString%29%20%7C%7C%20nil%3E'),
  6091. messageSends: [],
  6092. referencedClasses: []
  6093. }),
  6094. smalltalk.RegularExpression);
  6095. smalltalk.addMethod(
  6096. unescape('_test_'),
  6097. smalltalk.method({
  6098. selector: unescape('test%3A'),
  6099. category: 'evaluating',
  6100. fn: function (aString){
  6101. var self=this;
  6102. return self.test(aString);
  6103. return self;},
  6104. args: ["aString"],
  6105. source: unescape('test%3A%20aString%0A%09%3Creturn%20self.test%28aString%29%3E'),
  6106. messageSends: [],
  6107. referencedClasses: []
  6108. }),
  6109. smalltalk.RegularExpression);
  6110. smalltalk.addMethod(
  6111. unescape('_fromString_flag_'),
  6112. smalltalk.method({
  6113. selector: unescape('fromString%3Aflag%3A'),
  6114. category: 'instance creation',
  6115. fn: function (aString, anotherString){
  6116. var self=this;
  6117. return new RegExp(aString, anotherString);
  6118. return self;},
  6119. args: ["aString", "anotherString"],
  6120. source: unescape('fromString%3A%20aString%20flag%3A%20anotherString%0A%09%3Creturn%20new%20RegExp%28aString%2C%20anotherString%29%3E'),
  6121. messageSends: [],
  6122. referencedClasses: []
  6123. }),
  6124. smalltalk.RegularExpression.klass);
  6125. smalltalk.addMethod(
  6126. unescape('_fromString_'),
  6127. smalltalk.method({
  6128. selector: unescape('fromString%3A'),
  6129. category: 'instance creation',
  6130. fn: function (aString){
  6131. var self=this;
  6132. return smalltalk.send(self, "_fromString_flag_", [aString, ""]);
  6133. return self;},
  6134. args: ["aString"],
  6135. source: unescape('fromString%3A%20aString%0A%09%20%20%20%20%5Eself%20fromString%3A%20aString%20flag%3A%20%27%27'),
  6136. messageSends: ["fromString:flag:"],
  6137. referencedClasses: []
  6138. }),
  6139. smalltalk.RegularExpression.klass);
  6140. smalltalk.addClass('Error', smalltalk.Object, ['messageText'], 'Kernel');
  6141. smalltalk.addMethod(
  6142. unescape('_messageText'),
  6143. smalltalk.method({
  6144. selector: unescape('messageText'),
  6145. category: 'accessing',
  6146. fn: function (){
  6147. var self=this;
  6148. return self['@messageText'];
  6149. return self;},
  6150. args: [],
  6151. source: unescape('messageText%0A%09%5EmessageText'),
  6152. messageSends: [],
  6153. referencedClasses: []
  6154. }),
  6155. smalltalk.Error);
  6156. smalltalk.addMethod(
  6157. unescape('_messageText_'),
  6158. smalltalk.method({
  6159. selector: unescape('messageText%3A'),
  6160. category: 'accessing',
  6161. fn: function (aString){
  6162. var self=this;
  6163. self['@messageText']=aString;
  6164. return self;},
  6165. args: ["aString"],
  6166. source: unescape('messageText%3A%20aString%0A%09messageText%20%3A%3D%20aString'),
  6167. messageSends: [],
  6168. referencedClasses: []
  6169. }),
  6170. smalltalk.Error);
  6171. smalltalk.addMethod(
  6172. unescape('_signal'),
  6173. smalltalk.method({
  6174. selector: unescape('signal'),
  6175. category: 'signaling',
  6176. fn: function (){
  6177. var self=this;
  6178. self.context = smalltalk.getThisContext(); self.smalltalkError = true; throw(self);
  6179. return self;},
  6180. args: [],
  6181. source: unescape('signal%0A%09%3Cself.context%20%3D%20smalltalk.getThisContext%28%29%3B%20self.smalltalkError%20%3D%20true%3B%20throw%28self%29%3E'),
  6182. messageSends: [],
  6183. referencedClasses: []
  6184. }),
  6185. smalltalk.Error);
  6186. smalltalk.addMethod(
  6187. unescape('_context'),
  6188. smalltalk.method({
  6189. selector: unescape('context'),
  6190. category: 'accessing',
  6191. fn: function (){
  6192. var self=this;
  6193. return self.context;
  6194. return self;},
  6195. args: [],
  6196. source: unescape('context%0A%09%3Creturn%20self.context%3E'),
  6197. messageSends: [],
  6198. referencedClasses: []
  6199. }),
  6200. smalltalk.Error);
  6201. smalltalk.addMethod(
  6202. unescape('_jsStack'),
  6203. smalltalk.method({
  6204. selector: unescape('jsStack'),
  6205. category: 'accessing',
  6206. fn: function (){
  6207. var self=this;
  6208. return self.stack;
  6209. return self;},
  6210. args: [],
  6211. source: unescape('jsStack%0A%09%3Creturn%20self.stack%3E'),
  6212. messageSends: [],
  6213. referencedClasses: []
  6214. }),
  6215. smalltalk.Error);
  6216. smalltalk.addMethod(
  6217. unescape('_isSmalltalkError'),
  6218. smalltalk.method({
  6219. selector: unescape('isSmalltalkError'),
  6220. category: 'testing',
  6221. fn: function (){
  6222. var self=this;
  6223. return self.smalltalkError === true;
  6224. return self;},
  6225. args: [],
  6226. source: unescape('isSmalltalkError%0A%09%3Creturn%20self.smalltalkError%20%3D%3D%3D%20true%3E'),
  6227. messageSends: [],
  6228. referencedClasses: []
  6229. }),
  6230. smalltalk.Error);
  6231. smalltalk.addMethod(
  6232. unescape('_signal_'),
  6233. smalltalk.method({
  6234. selector: unescape('signal%3A'),
  6235. category: 'instance creation',
  6236. fn: function (aString){
  6237. var self=this;
  6238. return (function($rec){smalltalk.send($rec, "_messageText_", [aString]);return smalltalk.send($rec, "_signal", []);})(smalltalk.send(self, "_new", []));
  6239. return self;},
  6240. args: ["aString"],
  6241. source: unescape('signal%3A%20aString%0A%09%20%20%20%20%5Eself%20new%0A%09%09messageText%3A%20aString%3B%0A%09%09signal'),
  6242. messageSends: ["messageText:", "signal", "new"],
  6243. referencedClasses: []
  6244. }),
  6245. smalltalk.Error.klass);
  6246. smalltalk.addClass('MethodContext', smalltalk.Object, [], 'Kernel');
  6247. smalltalk.addMethod(
  6248. unescape('_receiver'),
  6249. smalltalk.method({
  6250. selector: unescape('receiver'),
  6251. category: 'accessing',
  6252. fn: function (){
  6253. var self=this;
  6254. return self.receiver;
  6255. return self;},
  6256. args: [],
  6257. source: unescape('receiver%0A%09%3Creturn%20self.receiver%3E'),
  6258. messageSends: [],
  6259. referencedClasses: []
  6260. }),
  6261. smalltalk.MethodContext);
  6262. smalltalk.addMethod(
  6263. unescape('_selector'),
  6264. smalltalk.method({
  6265. selector: unescape('selector'),
  6266. category: 'accessing',
  6267. fn: function (){
  6268. var self=this;
  6269. return smalltalk.convertSelector(self.selector);
  6270. return self;},
  6271. args: [],
  6272. source: unescape('selector%0A%09%3Creturn%20smalltalk.convertSelector%28self.selector%29%3E'),
  6273. messageSends: [],
  6274. referencedClasses: []
  6275. }),
  6276. smalltalk.MethodContext);
  6277. smalltalk.addMethod(
  6278. unescape('_home'),
  6279. smalltalk.method({
  6280. selector: unescape('home'),
  6281. category: 'accessing',
  6282. fn: function (){
  6283. var self=this;
  6284. return self.homeContext;
  6285. return self;},
  6286. args: [],
  6287. source: unescape('home%0A%09%3Creturn%20self.homeContext%3E'),
  6288. messageSends: [],
  6289. referencedClasses: []
  6290. }),
  6291. smalltalk.MethodContext);
  6292. smalltalk.addMethod(
  6293. unescape('_temps'),
  6294. smalltalk.method({
  6295. selector: unescape('temps'),
  6296. category: 'accessing',
  6297. fn: function (){
  6298. var self=this;
  6299. return self.temps;
  6300. return self;},
  6301. args: [],
  6302. source: unescape('temps%0A%09%3Creturn%20self.temps%3E'),
  6303. messageSends: [],
  6304. referencedClasses: []
  6305. }),
  6306. smalltalk.MethodContext);
  6307. smalltalk.addMethod(
  6308. unescape('_printString'),
  6309. smalltalk.method({
  6310. selector: unescape('printString'),
  6311. category: 'accessing',
  6312. fn: function (){
  6313. var self=this;
  6314. return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_printString", [], smalltalk.Object), "__comma", [unescape("%28")]), "__comma", [smalltalk.send(self, "_asString", [])]), "__comma", [unescape("%29")]);
  6315. return self;},
  6316. args: [],
  6317. source: unescape('printString%0A%09%5Esuper%20printString%2C%20%27%28%27%2C%20self%20asString%2C%20%27%29%27'),
  6318. messageSends: [unescape("%2C"), "printString", "asString"],
  6319. referencedClasses: []
  6320. }),
  6321. smalltalk.MethodContext);
  6322. smalltalk.addMethod(
  6323. unescape('_asString'),
  6324. smalltalk.method({
  6325. selector: unescape('asString'),
  6326. category: 'accessing',
  6327. fn: function (){
  6328. var self=this;
  6329. 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", [])]);
  6330. return self;},
  6331. args: [],
  6332. source: unescape('asString%0A%09%5Eself%20receiver%20class%20printString%2C%20%27%20%3E%3E%20%27%2C%20self%20selector'),
  6333. messageSends: [unescape("%2C"), "printString", "class", "receiver", "selector"],
  6334. referencedClasses: []
  6335. }),
  6336. smalltalk.MethodContext);
  6337. smalltalk.addClass('Association', smalltalk.Object, ['key', 'value'], 'Kernel');
  6338. smalltalk.addMethod(
  6339. unescape('__eq'),
  6340. smalltalk.method({
  6341. selector: unescape('%3D'),
  6342. category: 'comparing',
  6343. fn: function (anAssociation){
  6344. var self=this;
  6345. 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", [])]);})]);})]);
  6346. return self;},
  6347. args: ["anAssociation"],
  6348. 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'),
  6349. messageSends: ["and:", unescape("%3D"), "class", "key", "value"],
  6350. referencedClasses: []
  6351. }),
  6352. smalltalk.Association);
  6353. smalltalk.addMethod(
  6354. unescape('_key_'),
  6355. smalltalk.method({
  6356. selector: unescape('key%3A'),
  6357. category: 'accessing',
  6358. fn: function (aKey){
  6359. var self=this;
  6360. self['@key']=aKey;
  6361. return self;},
  6362. args: ["aKey"],
  6363. source: unescape('key%3A%20aKey%0A%09key%20%3A%3D%20aKey'),
  6364. messageSends: [],
  6365. referencedClasses: []
  6366. }),
  6367. smalltalk.Association);
  6368. smalltalk.addMethod(
  6369. unescape('_key'),
  6370. smalltalk.method({
  6371. selector: unescape('key'),
  6372. category: 'accessing',
  6373. fn: function (){
  6374. var self=this;
  6375. return self['@key'];
  6376. return self;},
  6377. args: [],
  6378. source: unescape('key%0A%09%5Ekey'),
  6379. messageSends: [],
  6380. referencedClasses: []
  6381. }),
  6382. smalltalk.Association);
  6383. smalltalk.addMethod(
  6384. unescape('_value_'),
  6385. smalltalk.method({
  6386. selector: unescape('value%3A'),
  6387. category: 'accessing',
  6388. fn: function (aValue){
  6389. var self=this;
  6390. self['@value']=aValue;
  6391. return self;},
  6392. args: ["aValue"],
  6393. source: unescape('value%3A%20aValue%0A%09value%20%3A%3D%20aValue'),
  6394. messageSends: [],
  6395. referencedClasses: []
  6396. }),
  6397. smalltalk.Association);
  6398. smalltalk.addMethod(
  6399. unescape('_value'),
  6400. smalltalk.method({
  6401. selector: unescape('value'),
  6402. category: 'accessing',
  6403. fn: function (){
  6404. var self=this;
  6405. return self['@value'];
  6406. return self;},
  6407. args: [],
  6408. source: unescape('value%0A%09%5Evalue'),
  6409. messageSends: [],
  6410. referencedClasses: []
  6411. }),
  6412. smalltalk.Association);
  6413. smalltalk.addMethod(
  6414. unescape('_storeOn_'),
  6415. smalltalk.method({
  6416. selector: unescape('storeOn%3A'),
  6417. category: 'comparing',
  6418. fn: function (aStream){
  6419. var self=this;
  6420. smalltalk.send(self['@key'], "_storeOn_", [aStream]);
  6421. smalltalk.send(aStream, "_nextPutAll_", [unescape("-%3E")]);
  6422. smalltalk.send(self['@value'], "_storeOn_", [aStream]);
  6423. return self;},
  6424. args: ["aStream"],
  6425. 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'),
  6426. messageSends: ["storeOn:", "nextPutAll:"],
  6427. referencedClasses: []
  6428. }),
  6429. smalltalk.Association);
  6430. smalltalk.addMethod(
  6431. unescape('_key_value_'),
  6432. smalltalk.method({
  6433. selector: unescape('key%3Avalue%3A'),
  6434. category: 'instance creation',
  6435. fn: function (aKey, aValue){
  6436. var self=this;
  6437. return (function($rec){smalltalk.send($rec, "_key_", [aKey]);smalltalk.send($rec, "_value_", [aValue]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  6438. return self;},
  6439. args: ["aKey", "aValue"],
  6440. 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'),
  6441. messageSends: ["key:", "value:", "yourself", "new"],
  6442. referencedClasses: []
  6443. }),
  6444. smalltalk.Association.klass);
  6445. smalltalk.addClass('Dictionary', smalltalk.Collection, [], 'Kernel');
  6446. smalltalk.addMethod(
  6447. unescape('__eq'),
  6448. smalltalk.method({
  6449. selector: unescape('%3D'),
  6450. category: 'comparing',
  6451. fn: function (aDictionary){
  6452. var self=this;
  6453. try{((($receiver = smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [smalltalk.send(aDictionary, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));
  6454. ((($receiver = smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [smalltalk.send(aDictionary, "_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}})})();})]));
  6455. (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return smalltalk.send(smalltalk.send(self, "_associations", []), "__eq", [smalltalk.send(aDictionary, "_associations", [])])}})})();
  6456. return self;
  6457. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
  6458. args: ["aDictionary"],
  6459. source: unescape('%3D%20aDictionary%0A%09self%20class%20%3D%20aDictionary%20class%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09self%20size%20%3D%20aDictionary%20size%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09%5Eself%20associations%20%3D%20aDictionary%20associations'),
  6460. messageSends: ["ifFalse:", unescape("%3D"), "class", "size", "associations"],
  6461. referencedClasses: []
  6462. }),
  6463. smalltalk.Dictionary);
  6464. smalltalk.addMethod(
  6465. unescape('_shallowCopy'),
  6466. smalltalk.method({
  6467. selector: unescape('shallowCopy'),
  6468. category: 'copying',
  6469. fn: function (){
  6470. var self=this;
  6471. var copy=nil;
  6472. copy=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []);
  6473. smalltalk.send(self, "_associationsDo_", [(function(each){return smalltalk.send(copy, "_at_put_", [smalltalk.send(each, "_key", []), smalltalk.send(each, "_value", [])]);})]);
  6474. return copy;
  6475. return self;},
  6476. args: [],
  6477. 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'),
  6478. messageSends: ["new", "class", "associationsDo:", "at:put:", "key", "value"],
  6479. referencedClasses: []
  6480. }),
  6481. smalltalk.Dictionary);
  6482. smalltalk.addMethod(
  6483. unescape('_size'),
  6484. smalltalk.method({
  6485. selector: unescape('size'),
  6486. category: 'accessing',
  6487. fn: function (){
  6488. var self=this;
  6489. return smalltalk.send(smalltalk.send(self, "_keys", []), "_size", []);
  6490. return self;},
  6491. args: [],
  6492. source: unescape('size%0A%09%5Eself%20keys%20size'),
  6493. messageSends: ["size", "keys"],
  6494. referencedClasses: []
  6495. }),
  6496. smalltalk.Dictionary);
  6497. smalltalk.addMethod(
  6498. unescape('_associations'),
  6499. smalltalk.method({
  6500. selector: unescape('associations'),
  6501. category: 'accessing',
  6502. fn: function (){
  6503. var self=this;
  6504. var associations=nil;
  6505. associations=[];
  6506. 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])])]);})]);
  6507. return associations;
  6508. return self;},
  6509. args: [],
  6510. 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'),
  6511. messageSends: ["do:", "keys", "add:", "key:value:", "at:"],
  6512. referencedClasses: ["Association"]
  6513. }),
  6514. smalltalk.Dictionary);
  6515. smalltalk.addMethod(
  6516. unescape('_keys'),
  6517. smalltalk.method({
  6518. selector: unescape('keys'),
  6519. category: 'accessing',
  6520. fn: function (){
  6521. var self=this;
  6522. var keys = [];
  6523. for(var i in self) {
  6524. if(self.hasOwnProperty(i)) {
  6525. keys.push(i);
  6526. }
  6527. };
  6528. return keys;
  6529. ;
  6530. return self;},
  6531. args: [],
  6532. 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'),
  6533. messageSends: [],
  6534. referencedClasses: []
  6535. }),
  6536. smalltalk.Dictionary);
  6537. smalltalk.addMethod(
  6538. unescape('_values'),
  6539. smalltalk.method({
  6540. selector: unescape('values'),
  6541. category: 'accessing',
  6542. fn: function (){
  6543. var self=this;
  6544. return smalltalk.send(smalltalk.send(self, "_keys", []), "_collect_", [(function(each){return smalltalk.send(self, "_at_", [each]);})]);
  6545. return self;},
  6546. args: [],
  6547. source: unescape('values%0A%20%20%20%20%09%5Eself%20keys%20collect%3A%20%5B%3Aeach%20%7C%20self%20at%3A%20each%5D'),
  6548. messageSends: ["collect:", "keys", "at:"],
  6549. referencedClasses: []
  6550. }),
  6551. smalltalk.Dictionary);
  6552. smalltalk.addMethod(
  6553. unescape('_at_put_'),
  6554. smalltalk.method({
  6555. selector: unescape('at%3Aput%3A'),
  6556. category: 'accessing',
  6557. fn: function (aKey, aValue){
  6558. var self=this;
  6559. return smalltalk.send(self, "_basicAt_put_", [aKey, aValue]);
  6560. return self;},
  6561. args: ["aKey", "aValue"],
  6562. source: unescape('at%3A%20aKey%20put%3A%20aValue%0A%09%5Eself%20basicAt%3A%20aKey%20put%3A%20aValue'),
  6563. messageSends: ["basicAt:put:"],
  6564. referencedClasses: []
  6565. }),
  6566. smalltalk.Dictionary);
  6567. smalltalk.addMethod(
  6568. unescape('_at_ifAbsent_'),
  6569. smalltalk.method({
  6570. selector: unescape('at%3AifAbsent%3A'),
  6571. category: 'accessing',
  6572. fn: function (aKey, aBlock){
  6573. var self=this;
  6574. return smalltalk.send(smalltalk.send(self, "_includesKey_", [aKey]), "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_basicAt_", [aKey]);}), aBlock]);
  6575. return self;},
  6576. args: ["aKey", "aBlock"],
  6577. 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'),
  6578. messageSends: ["ifTrue:ifFalse:", "includesKey:", "basicAt:"],
  6579. referencedClasses: []
  6580. }),
  6581. smalltalk.Dictionary);
  6582. smalltalk.addMethod(
  6583. unescape('_at_ifAbsentPut_'),
  6584. smalltalk.method({
  6585. selector: unescape('at%3AifAbsentPut%3A'),
  6586. category: 'accessing',
  6587. fn: function (aKey, aBlock){
  6588. var self=this;
  6589. return smalltalk.send(self, "_at_ifAbsent_", [aKey, (function(){return smalltalk.send(self, "_at_put_", [aKey, smalltalk.send(aBlock, "_value", [])]);})]);
  6590. return self;},
  6591. args: ["aKey", "aBlock"],
  6592. source: unescape('at%3A%20aKey%20ifAbsentPut%3A%20aBlock%0A%20%20%20%20%09%5Eself%20at%3A%20aKey%20ifAbsent%3A%20%5B%0A%20%20%20%20%09%20%20%20%20self%20at%3A%20aKey%20put%3A%20aBlock%20value%5D'),
  6593. messageSends: ["at:ifAbsent:", "at:put:", "value"],
  6594. referencedClasses: []
  6595. }),
  6596. smalltalk.Dictionary);
  6597. smalltalk.addMethod(
  6598. unescape('_at_ifPresent_'),
  6599. smalltalk.method({
  6600. selector: unescape('at%3AifPresent%3A'),
  6601. category: 'accessing',
  6602. fn: function (aKey, aBlock){
  6603. var self=this;
  6604. return (($receiver = smalltalk.send(self, "_basicAt_", [aKey])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_at_", [aKey])]);})() : nil;
  6605. return self;},
  6606. args: ["aKey", "aBlock"],
  6607. 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'),
  6608. messageSends: ["ifNotNil:", "basicAt:", "value:", "at:"],
  6609. referencedClasses: []
  6610. }),
  6611. smalltalk.Dictionary);
  6612. smalltalk.addMethod(
  6613. unescape('_at_ifPresent_ifAbsent_'),
  6614. smalltalk.method({
  6615. selector: unescape('at%3AifPresent%3AifAbsent%3A'),
  6616. category: 'accessing',
  6617. fn: function (aKey, aBlock, anotherBlock){
  6618. var self=this;
  6619. return smalltalk.send(smalltalk.send(self, "_basicAt_", [aKey]), "_ifNil_ifNotNil_", [anotherBlock, (function(){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_at_", [aKey])]);})]);
  6620. return self;},
  6621. args: ["aKey", "aBlock", "anotherBlock"],
  6622. 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'),
  6623. messageSends: ["ifNil:ifNotNil:", "basicAt:", "value:", "at:"],
  6624. referencedClasses: []
  6625. }),
  6626. smalltalk.Dictionary);
  6627. smalltalk.addMethod(
  6628. unescape('_add_'),
  6629. smalltalk.method({
  6630. selector: unescape('add%3A'),
  6631. category: 'adding/removing',
  6632. fn: function (anAssociation){
  6633. var self=this;
  6634. smalltalk.send(self, "_at_put_", [smalltalk.send(anAssociation, "_key", []), smalltalk.send(anAssociation, "_value", [])]);
  6635. return self;},
  6636. args: ["anAssociation"],
  6637. source: unescape('add%3A%20anAssociation%0A%20%20%20%20%09self%20at%3A%20anAssociation%20key%20put%3A%20anAssociation%20value'),
  6638. messageSends: ["at:put:", "key", "value"],
  6639. referencedClasses: []
  6640. }),
  6641. smalltalk.Dictionary);
  6642. smalltalk.addMethod(
  6643. unescape('_addAll_'),
  6644. smalltalk.method({
  6645. selector: unescape('addAll%3A'),
  6646. category: 'adding/removing',
  6647. fn: function (aDictionary){
  6648. var self=this;
  6649. smalltalk.send(self, "_addAll_", [smalltalk.send(aDictionary, "_associations", [])], smalltalk.Collection);
  6650. return aDictionary;
  6651. return self;},
  6652. args: ["aDictionary"],
  6653. source: unescape('addAll%3A%20aDictionary%0A%20%20%20%20%09super%20addAll%3A%20aDictionary%20associations.%0A%20%20%20%20%09%5EaDictionary'),
  6654. messageSends: ["addAll:", "associations"],
  6655. referencedClasses: []
  6656. }),
  6657. smalltalk.Dictionary);
  6658. smalltalk.addMethod(
  6659. unescape('__comma'),
  6660. smalltalk.method({
  6661. selector: unescape('%2C'),
  6662. category: 'copying',
  6663. fn: function (aCollection){
  6664. var self=this;
  6665. smalltalk.send(self, "_shouldNotImplement", []);
  6666. return self;},
  6667. args: ["aCollection"],
  6668. source: unescape('%2C%20aCollection%0A%09self%20shouldNotImplement'),
  6669. messageSends: ["shouldNotImplement"],
  6670. referencedClasses: []
  6671. }),
  6672. smalltalk.Dictionary);
  6673. smalltalk.addMethod(
  6674. unescape('_copyFrom_to_'),
  6675. smalltalk.method({
  6676. selector: unescape('copyFrom%3Ato%3A'),
  6677. category: 'copying',
  6678. fn: function (anIndex, anotherIndex){
  6679. var self=this;
  6680. smalltalk.send(self, "_shouldNotImplement", []);
  6681. return self;},
  6682. args: ["anIndex", "anotherIndex"],
  6683. source: unescape('copyFrom%3A%20anIndex%20to%3A%20anotherIndex%0A%09self%20shouldNotImplement'),
  6684. messageSends: ["shouldNotImplement"],
  6685. referencedClasses: []
  6686. }),
  6687. smalltalk.Dictionary);
  6688. smalltalk.addMethod(
  6689. unescape('_associationsDo_'),
  6690. smalltalk.method({
  6691. selector: unescape('associationsDo%3A'),
  6692. category: 'enumerating',
  6693. fn: function (aBlock){
  6694. var self=this;
  6695. smalltalk.send(smalltalk.send(self, "_associations", []), "_do_", [aBlock]);
  6696. return self;},
  6697. args: ["aBlock"],
  6698. source: unescape('associationsDo%3A%20aBlock%0A%20%20%20%20%09self%20associations%20do%3A%20aBlock'),
  6699. messageSends: ["do:", "associations"],
  6700. referencedClasses: []
  6701. }),
  6702. smalltalk.Dictionary);
  6703. smalltalk.addMethod(
  6704. unescape('_keysAndValuesDo_'),
  6705. smalltalk.method({
  6706. selector: unescape('keysAndValuesDo%3A'),
  6707. category: 'enumerating',
  6708. fn: function (aBlock){
  6709. var self=this;
  6710. smalltalk.send(self, "_associationsDo_", [(function(each){return smalltalk.send(aBlock, "_value_value_", [smalltalk.send(each, "_key", []), smalltalk.send(each, "_value", [])]);})]);
  6711. return self;},
  6712. args: ["aBlock"],
  6713. source: unescape('keysAndValuesDo%3A%20aBlock%0A%20%20%20%20%09self%20associationsDo%3A%20%5B%3Aeach%20%7C%0A%20%20%20%20%09%20%20%20%20aBlock%20value%3A%20each%20key%20value%3A%20each%20value%5D'),
  6714. messageSends: ["associationsDo:", "value:value:", "key", "value"],
  6715. referencedClasses: []
  6716. }),
  6717. smalltalk.Dictionary);
  6718. smalltalk.addMethod(
  6719. unescape('_do_'),
  6720. smalltalk.method({
  6721. selector: unescape('do%3A'),
  6722. category: 'enumerating',
  6723. fn: function (aBlock){
  6724. var self=this;
  6725. smalltalk.send(smalltalk.send(self, "_values", []), "_do_", [aBlock]);
  6726. return self;},
  6727. args: ["aBlock"],
  6728. source: unescape('do%3A%20aBlock%0A%20%20%20%20%09self%20values%20do%3A%20aBlock'),
  6729. messageSends: ["do:", "values"],
  6730. referencedClasses: []
  6731. }),
  6732. smalltalk.Dictionary);
  6733. smalltalk.addMethod(
  6734. unescape('_select_'),
  6735. smalltalk.method({
  6736. selector: unescape('select%3A'),
  6737. category: 'enumerating',
  6738. fn: function (aBlock){
  6739. var self=this;
  6740. var newDict=nil;
  6741. newDict=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []);
  6742. 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]);})]));})]);
  6743. return newDict;
  6744. return self;},
  6745. args: ["aBlock"],
  6746. source: unescape('select%3A%20aBlock%0A%20%20%20%20%09%7C%20newDict%20%7C%0A%20%20%20%20%09newDict%20%3A%3D%20self%20class%20new.%0A%20%20%20%20%09self%20keysAndValuesDo%3A%20%5B%3Akey%20%3Avalue%20%7C%0A%20%20%20%20%09%20%20%20%20%28aBlock%20value%3A%20value%29%20ifTrue%3A%20%5BnewDict%20at%3A%20key%20put%3A%20value%5D%5D.%0A%20%20%20%20%09%5EnewDict'),
  6747. messageSends: ["new", "class", "keysAndValuesDo:", "ifTrue:", "value:", "at:put:"],
  6748. referencedClasses: []
  6749. }),
  6750. smalltalk.Dictionary);
  6751. smalltalk.addMethod(
  6752. unescape('_collect_'),
  6753. smalltalk.method({
  6754. selector: unescape('collect%3A'),
  6755. category: 'enumerating',
  6756. fn: function (aBlock){
  6757. var self=this;
  6758. var newDict=nil;
  6759. newDict=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []);
  6760. smalltalk.send(self, "_keysAndValuesDo_", [(function(key, value){return smalltalk.send(newDict, "_at_put_", [key, smalltalk.send(aBlock, "_value_", [value])]);})]);
  6761. return newDict;
  6762. return self;},
  6763. args: ["aBlock"],
  6764. source: unescape('collect%3A%20aBlock%0A%20%20%20%20%09%7C%20newDict%20%7C%0A%20%20%20%20%09newDict%20%3A%3D%20self%20class%20new.%0A%20%20%20%20%09self%20keysAndValuesDo%3A%20%5B%3Akey%20%3Avalue%20%7C%0A%20%20%20%20%09%20%20%20%20newDict%20at%3A%20key%20put%3A%20%28aBlock%20value%3A%20value%29%5D.%0A%20%20%20%20%09%5EnewDict'),
  6765. messageSends: ["new", "class", "keysAndValuesDo:", "at:put:", "value:"],
  6766. referencedClasses: []
  6767. }),
  6768. smalltalk.Dictionary);
  6769. smalltalk.addMethod(
  6770. unescape('_detect_ifNone_'),
  6771. smalltalk.method({
  6772. selector: unescape('detect%3AifNone%3A'),
  6773. category: 'enumerating',
  6774. fn: function (aBlock, anotherBlock){
  6775. var self=this;
  6776. return smalltalk.send(smalltalk.send(self, "_values", []), "_detect_ifNone_", [aBlock, anotherBlock]);
  6777. return self;},
  6778. args: ["aBlock", "anotherBlock"],
  6779. source: unescape('detect%3A%20aBlock%20ifNone%3A%20anotherBlock%0A%09%5Eself%20values%20detect%3A%20aBlock%20ifNone%3A%20anotherBlock'),
  6780. messageSends: ["detect:ifNone:", "values"],
  6781. referencedClasses: []
  6782. }),
  6783. smalltalk.Dictionary);
  6784. smalltalk.addMethod(
  6785. unescape('_includes_'),
  6786. smalltalk.method({
  6787. selector: unescape('includes%3A'),
  6788. category: 'enumerating',
  6789. fn: function (anObject){
  6790. var self=this;
  6791. return smalltalk.send(smalltalk.send(self, "_values", []), "_includes_", [anObject]);
  6792. return self;},
  6793. args: ["anObject"],
  6794. source: unescape('includes%3A%20anObject%0A%09%5Eself%20values%20includes%3A%20anObject'),
  6795. messageSends: ["includes:", "values"],
  6796. referencedClasses: []
  6797. }),
  6798. smalltalk.Dictionary);
  6799. smalltalk.addMethod(
  6800. unescape('_removeKey_'),
  6801. smalltalk.method({
  6802. selector: unescape('removeKey%3A'),
  6803. category: 'adding/removing',
  6804. fn: function (aKey){
  6805. var self=this;
  6806. smalltalk.send(self, "_remove_", [aKey]);
  6807. return self;},
  6808. args: ["aKey"],
  6809. source: unescape('removeKey%3A%20aKey%0A%20%20%20%20self%20remove%3A%20aKey'),
  6810. messageSends: ["remove:"],
  6811. referencedClasses: []
  6812. }),
  6813. smalltalk.Dictionary);
  6814. smalltalk.addMethod(
  6815. unescape('_at_'),
  6816. smalltalk.method({
  6817. selector: unescape('at%3A'),
  6818. category: 'accessing',
  6819. fn: function (aKey){
  6820. var self=this;
  6821. return smalltalk.send(self, "_at_ifAbsent_", [aKey, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
  6822. return self;},
  6823. args: ["aKey"],
  6824. source: unescape('at%3A%20aKey%0A%09%5Eself%20at%3A%20aKey%20ifAbsent%3A%20%5Bself%20errorNotFound%5D'),
  6825. messageSends: ["at:ifAbsent:", "errorNotFound"],
  6826. referencedClasses: []
  6827. }),
  6828. smalltalk.Dictionary);
  6829. smalltalk.addMethod(
  6830. unescape('_printString'),
  6831. smalltalk.method({
  6832. selector: unescape('printString'),
  6833. category: 'printing',
  6834. fn: function (){
  6835. var self=this;
  6836. 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")]);})]);
  6837. return self;},
  6838. args: [],
  6839. 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'),
  6840. messageSends: ["streamContents:", "nextPutAll:", "printString", "do:separatedBy:", "associations", "key", "value"],
  6841. referencedClasses: ["String"]
  6842. }),
  6843. smalltalk.Dictionary);
  6844. smalltalk.addMethod(
  6845. unescape('_storeOn_'),
  6846. smalltalk.method({
  6847. selector: unescape('storeOn%3A'),
  6848. category: 'printing',
  6849. fn: function (aStream){
  6850. var self=this;
  6851. smalltalk.send(aStream, "_nextPutAll_", [unescape("%23%7B")]);
  6852. smalltalk.send(smalltalk.send(self, "_associations", []), "_do_separatedBy_", [(function(each){return smalltalk.send(each, "_storeOn_", [aStream]);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [". "]);})]);
  6853. smalltalk.send(aStream, "_nextPutAll_", [unescape("%7D")]);
  6854. return self;},
  6855. args: ["aStream"],
  6856. 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'),
  6857. messageSends: ["nextPutAll:", "do:separatedBy:", "associations", "storeOn:"],
  6858. referencedClasses: []
  6859. }),
  6860. smalltalk.Dictionary);
  6861. smalltalk.addMethod(
  6862. unescape('_includesKey_'),
  6863. smalltalk.method({
  6864. selector: unescape('includesKey%3A'),
  6865. category: 'testing',
  6866. fn: function (aKey){
  6867. var self=this;
  6868. return self.hasOwnProperty(aKey);
  6869. return self;},
  6870. args: ["aKey"],
  6871. source: unescape('includesKey%3A%20aKey%0A%09%3Creturn%20self.hasOwnProperty%28aKey%29%3E'),
  6872. messageSends: [],
  6873. referencedClasses: []
  6874. }),
  6875. smalltalk.Dictionary);
  6876. smalltalk.addMethod(
  6877. unescape('_remove_ifAbsent_'),
  6878. smalltalk.method({
  6879. selector: unescape('remove%3AifAbsent%3A'),
  6880. category: 'adding/removing',
  6881. fn: function (aKey, aBlock){
  6882. var self=this;
  6883. return smalltalk.send(self, "_removeKey_ifAbsent_", [aKey, aBlock]);
  6884. return self;},
  6885. args: ["aKey", "aBlock"],
  6886. source: unescape('remove%3A%20aKey%20ifAbsent%3A%20aBlock%0A%20%20%20%20%5Eself%20removeKey%3A%20aKey%20ifAbsent%3A%20aBlock'),
  6887. messageSends: ["removeKey:ifAbsent:"],
  6888. referencedClasses: []
  6889. }),
  6890. smalltalk.Dictionary);
  6891. smalltalk.addMethod(
  6892. unescape('_removeKey_ifAbsent_'),
  6893. smalltalk.method({
  6894. selector: unescape('removeKey%3AifAbsent%3A'),
  6895. category: 'adding/removing',
  6896. fn: function (aKey, aBlock){
  6897. var self=this;
  6898. 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]);})]));
  6899. return self;},
  6900. args: ["aKey", "aBlock"],
  6901. 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'),
  6902. messageSends: ["ifFalse:ifTrue:", "includesKey:", "value", "basicDelete:"],
  6903. referencedClasses: []
  6904. }),
  6905. smalltalk.Dictionary);
  6906. smalltalk.addMethod(
  6907. unescape('_fromPairs_'),
  6908. smalltalk.method({
  6909. selector: unescape('fromPairs%3A'),
  6910. category: 'instance creation',
  6911. fn: function (aCollection){
  6912. var self=this;
  6913. var dict=nil;
  6914. dict=smalltalk.send(self, "_new", []);
  6915. smalltalk.send(aCollection, "_do_", [(function(each){return smalltalk.send(dict, "_add_", [each]);})]);
  6916. return dict;
  6917. return self;},
  6918. args: ["aCollection"],
  6919. 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'),
  6920. messageSends: ["new", "do:", "add:"],
  6921. referencedClasses: []
  6922. }),
  6923. smalltalk.Dictionary.klass);
  6924. smalltalk.addClass('ClassBuilder', smalltalk.Object, [], 'Kernel');
  6925. smalltalk.addMethod(
  6926. unescape('_superclass_subclass_'),
  6927. smalltalk.method({
  6928. selector: unescape('superclass%3Asubclass%3A'),
  6929. category: 'class creation',
  6930. fn: function (aClass, aString){
  6931. var self=this;
  6932. return smalltalk.send(self, "_superclass_subclass_instanceVariableNames_package_", [aClass, aString, "", nil]);
  6933. return self;},
  6934. args: ["aClass", "aString"],
  6935. 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'),
  6936. messageSends: ["superclass:subclass:instanceVariableNames:package:"],
  6937. referencedClasses: []
  6938. }),
  6939. smalltalk.ClassBuilder);
  6940. smalltalk.addMethod(
  6941. unescape('_class_instanceVariableNames_'),
  6942. smalltalk.method({
  6943. selector: unescape('class%3AinstanceVariableNames%3A'),
  6944. category: 'class creation',
  6945. fn: function (aClass, aString){
  6946. var self=this;
  6947. ((($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"])]);})]));
  6948. smalltalk.send(aClass, "_basicAt_put_", ["iVarNames", smalltalk.send(self, "_instanceVariableNamesFor_", [aString])]);
  6949. smalltalk.send(self, "_setupClass_", [aClass]);
  6950. return self;},
  6951. args: ["aClass", "aString"],
  6952. 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'),
  6953. messageSends: ["ifFalse:", "isMetaclass", "error:", unescape("%2C"), "name", "basicAt:put:", "instanceVariableNamesFor:", "setupClass:"],
  6954. referencedClasses: []
  6955. }),
  6956. smalltalk.ClassBuilder);
  6957. smalltalk.addMethod(
  6958. unescape('_instanceVariableNamesFor_'),
  6959. smalltalk.method({
  6960. selector: unescape('instanceVariableNamesFor%3A'),
  6961. category: 'private',
  6962. fn: function (aString){
  6963. var self=this;
  6964. return smalltalk.send(smalltalk.send(aString, "_tokenize_", [" "]), "_reject_", [(function(each){return smalltalk.send(each, "_isEmpty", []);})]);
  6965. return self;},
  6966. args: ["aString"],
  6967. 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'),
  6968. messageSends: ["reject:", "tokenize:", "isEmpty"],
  6969. referencedClasses: []
  6970. }),
  6971. smalltalk.ClassBuilder);
  6972. smalltalk.addMethod(
  6973. unescape('_addSubclassOf_named_instanceVariableNames_'),
  6974. smalltalk.method({
  6975. selector: unescape('addSubclassOf%3Anamed%3AinstanceVariableNames%3A'),
  6976. category: 'private',
  6977. fn: function (aClass, aString, aCollection){
  6978. var self=this;
  6979. smalltalk.addClass(aString, aClass, aCollection);
  6980. return smalltalk[aString];
  6981. return self;},
  6982. args: ["aClass", "aString", "aCollection"],
  6983. 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'),
  6984. messageSends: [],
  6985. referencedClasses: []
  6986. }),
  6987. smalltalk.ClassBuilder);
  6988. smalltalk.addMethod(
  6989. unescape('_setupClass_'),
  6990. smalltalk.method({
  6991. selector: unescape('setupClass%3A'),
  6992. category: 'private',
  6993. fn: function (aClass){
  6994. var self=this;
  6995. smalltalk.init(aClass);;
  6996. return self;},
  6997. args: ["aClass"],
  6998. source: unescape('setupClass%3A%20aClass%0A%09%3Csmalltalk.init%28aClass%29%3B%3E'),
  6999. messageSends: [],
  7000. referencedClasses: []
  7001. }),
  7002. smalltalk.ClassBuilder);
  7003. smalltalk.addMethod(
  7004. unescape('_superclass_subclass_instanceVariableNames_package_'),
  7005. smalltalk.method({
  7006. selector: unescape('superclass%3Asubclass%3AinstanceVariableNames%3Apackage%3A'),
  7007. category: 'class creation',
  7008. fn: function (aClass, aString, aString2, aString3){
  7009. var self=this;
  7010. var newClass=nil;
  7011. newClass=smalltalk.send(self, "_addSubclassOf_named_instanceVariableNames_package_", [aClass, aString, smalltalk.send(self, "_instanceVariableNamesFor_", [aString2]), (($receiver = aString3) == nil || $receiver == undefined) ? (function(){return "unclassified";})() : $receiver]);
  7012. smalltalk.send(self, "_setupClass_", [newClass]);
  7013. return newClass;
  7014. return self;},
  7015. args: ["aClass", "aString", "aString2", "aString3"],
  7016. 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'),
  7017. messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "instanceVariableNamesFor:", "ifNil:", "setupClass:"],
  7018. referencedClasses: []
  7019. }),
  7020. smalltalk.ClassBuilder);
  7021. smalltalk.addMethod(
  7022. unescape('_addSubclassOf_named_instanceVariableNames_package_'),
  7023. smalltalk.method({
  7024. selector: unescape('addSubclassOf%3Anamed%3AinstanceVariableNames%3Apackage%3A'),
  7025. category: 'private',
  7026. fn: function (aClass, aString, aCollection, packageName){
  7027. var self=this;
  7028. smalltalk.addClass(aString, aClass, aCollection, packageName);
  7029. return smalltalk[aString];
  7030. return self;},
  7031. args: ["aClass", "aString", "aCollection", "packageName"],
  7032. 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'),
  7033. messageSends: [],
  7034. referencedClasses: []
  7035. }),
  7036. smalltalk.ClassBuilder);
  7037. smalltalk.addMethod(
  7038. unescape('_copyClass_named_'),
  7039. smalltalk.method({
  7040. selector: unescape('copyClass%3Anamed%3A'),
  7041. category: 'private',
  7042. fn: function (aClass, aString){
  7043. var self=this;
  7044. var newClass=nil;
  7045. newClass=smalltalk.send(self, "_addSubclassOf_named_instanceVariableNames_package_", [smalltalk.send(aClass, "_superclass", []), aString, smalltalk.send(aClass, "_instanceVariableNames", []), smalltalk.send(smalltalk.send(aClass, "_package", []), "_name", [])]);
  7046. smalltalk.send(self, "_setupClass_", [newClass]);
  7047. 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", [])]);})]);
  7048. 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", [])]);})]);
  7049. smalltalk.send(self, "_setupClass_", [newClass]);
  7050. return newClass;
  7051. return self;},
  7052. args: ["aClass", "aString"],
  7053. 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'),
  7054. messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "superclass", "instanceVariableNames", "name", "package", "setupClass:", "do:", "values", "methodDictionary", "addCompiledMethod:", "load:forClass:", "new", "source", "category:", "at:", "selector", "category", "class"],
  7055. referencedClasses: ["Compiler"]
  7056. }),
  7057. smalltalk.ClassBuilder);
  7058. smalltalk.addClass('ClassCategoryReader', smalltalk.Object, ['class', 'category', 'chunkParser'], 'Kernel');
  7059. smalltalk.addMethod(
  7060. unescape('_initialize'),
  7061. smalltalk.method({
  7062. selector: unescape('initialize'),
  7063. category: 'initialization',
  7064. fn: function (){
  7065. var self=this;
  7066. smalltalk.send(self, "_initialize", [], smalltalk.Object);
  7067. self['@chunkParser']=smalltalk.send((smalltalk.ChunkParser || ChunkParser), "_new", []);
  7068. return self;},
  7069. args: [],
  7070. source: unescape('initialize%0A%09super%20initialize.%0A%09chunkParser%20%3A%3D%20ChunkParser%20new.'),
  7071. messageSends: ["initialize", "new"],
  7072. referencedClasses: ["ChunkParser"]
  7073. }),
  7074. smalltalk.ClassCategoryReader);
  7075. smalltalk.addMethod(
  7076. unescape('_class_category_'),
  7077. smalltalk.method({
  7078. selector: unescape('class%3Acategory%3A'),
  7079. category: 'accessing',
  7080. fn: function (aClass, aString){
  7081. var self=this;
  7082. self['@class']=aClass;
  7083. self['@category']=aString;
  7084. return self;},
  7085. args: ["aClass", "aString"],
  7086. source: unescape('class%3A%20aClass%20category%3A%20aString%0A%09class%20%3A%3D%20aClass.%0A%09category%20%3A%3D%20aString'),
  7087. messageSends: [],
  7088. referencedClasses: []
  7089. }),
  7090. smalltalk.ClassCategoryReader);
  7091. smalltalk.addMethod(
  7092. unescape('_scanFrom_'),
  7093. smalltalk.method({
  7094. selector: unescape('scanFrom%3A'),
  7095. category: 'fileIn',
  7096. fn: function (aChunkParser){
  7097. var self=this;
  7098. var chunk=nil;
  7099. (function(){while(!(function(){chunk=smalltalk.send(aChunkParser, "_nextChunk", []);return smalltalk.send(chunk, "_isEmpty", []);})()) {(function(){return smalltalk.send(self, "_compileMethod_", [chunk]);})()}})();
  7100. return self;},
  7101. args: ["aChunkParser"],
  7102. 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'),
  7103. messageSends: ["whileFalse:", "nextChunk", "isEmpty", "compileMethod:"],
  7104. referencedClasses: []
  7105. }),
  7106. smalltalk.ClassCategoryReader);
  7107. smalltalk.addMethod(
  7108. unescape('_compileMethod_'),
  7109. smalltalk.method({
  7110. selector: unescape('compileMethod%3A'),
  7111. category: 'private',
  7112. fn: function (aString){
  7113. var self=this;
  7114. var method=nil;
  7115. method=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_load_forClass_", [aString, self['@class']]);
  7116. smalltalk.send(method, "_category_", [self['@category']]);
  7117. smalltalk.send(self['@class'], "_addCompiledMethod_", [method]);
  7118. return self;},
  7119. args: ["aString"],
  7120. 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'),
  7121. messageSends: ["load:forClass:", "new", "category:", "addCompiledMethod:"],
  7122. referencedClasses: ["Compiler"]
  7123. }),
  7124. smalltalk.ClassCategoryReader);
  7125. smalltalk.addClass('Stream', smalltalk.Object, ['collection', 'position', 'streamSize'], 'Kernel');
  7126. smalltalk.addMethod(
  7127. unescape('_collection'),
  7128. smalltalk.method({
  7129. selector: unescape('collection'),
  7130. category: 'accessing',
  7131. fn: function (){
  7132. var self=this;
  7133. return self['@collection'];
  7134. return self;},
  7135. args: [],
  7136. source: unescape('collection%0A%09%5Ecollection'),
  7137. messageSends: [],
  7138. referencedClasses: []
  7139. }),
  7140. smalltalk.Stream);
  7141. smalltalk.addMethod(
  7142. unescape('_setCollection_'),
  7143. smalltalk.method({
  7144. selector: unescape('setCollection%3A'),
  7145. category: 'accessing',
  7146. fn: function (aCollection){
  7147. var self=this;
  7148. self['@collection']=aCollection;
  7149. return self;},
  7150. args: ["aCollection"],
  7151. source: unescape('setCollection%3A%20aCollection%0A%09collection%20%3A%3D%20aCollection'),
  7152. messageSends: [],
  7153. referencedClasses: []
  7154. }),
  7155. smalltalk.Stream);
  7156. smalltalk.addMethod(
  7157. unescape('_position'),
  7158. smalltalk.method({
  7159. selector: unescape('position'),
  7160. category: 'accessing',
  7161. fn: function (){
  7162. var self=this;
  7163. return (($receiver = self['@position']) == nil || $receiver == undefined) ? (function(){return self['@position']=(0);})() : $receiver;
  7164. return self;},
  7165. args: [],
  7166. source: unescape('position%0A%09%5Eposition%20ifNil%3A%20%5Bposition%20%3A%3D%200%5D'),
  7167. messageSends: ["ifNil:"],
  7168. referencedClasses: []
  7169. }),
  7170. smalltalk.Stream);
  7171. smalltalk.addMethod(
  7172. unescape('_position_'),
  7173. smalltalk.method({
  7174. selector: unescape('position%3A'),
  7175. category: 'accessing',
  7176. fn: function (anInteger){
  7177. var self=this;
  7178. self['@position']=anInteger;
  7179. return self;},
  7180. args: ["anInteger"],
  7181. source: unescape('position%3A%20anInteger%0A%09position%20%3A%3D%20anInteger'),
  7182. messageSends: [],
  7183. referencedClasses: []
  7184. }),
  7185. smalltalk.Stream);
  7186. smalltalk.addMethod(
  7187. unescape('_streamSize'),
  7188. smalltalk.method({
  7189. selector: unescape('streamSize'),
  7190. category: 'accessing',
  7191. fn: function (){
  7192. var self=this;
  7193. return self['@streamSize'];
  7194. return self;},
  7195. args: [],
  7196. source: unescape('streamSize%0A%09%5EstreamSize'),
  7197. messageSends: [],
  7198. referencedClasses: []
  7199. }),
  7200. smalltalk.Stream);
  7201. smalltalk.addMethod(
  7202. unescape('_setStreamSize_'),
  7203. smalltalk.method({
  7204. selector: unescape('setStreamSize%3A'),
  7205. category: 'accessing',
  7206. fn: function (anInteger){
  7207. var self=this;
  7208. self['@streamSize']=anInteger;
  7209. return self;},
  7210. args: ["anInteger"],
  7211. source: unescape('setStreamSize%3A%20anInteger%0A%09streamSize%20%3A%3D%20anInteger'),
  7212. messageSends: [],
  7213. referencedClasses: []
  7214. }),
  7215. smalltalk.Stream);
  7216. smalltalk.addMethod(
  7217. unescape('_contents'),
  7218. smalltalk.method({
  7219. selector: unescape('contents'),
  7220. category: 'accessing',
  7221. fn: function (){
  7222. var self=this;
  7223. return smalltalk.send(smalltalk.send(self, "_collection", []), "_copyFrom_to_", [(1), smalltalk.send(self, "_streamSize", [])]);
  7224. return self;},
  7225. args: [],
  7226. 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'),
  7227. messageSends: ["copyFrom:to:", "collection", "streamSize"],
  7228. referencedClasses: []
  7229. }),
  7230. smalltalk.Stream);
  7231. smalltalk.addMethod(
  7232. unescape('_size'),
  7233. smalltalk.method({
  7234. selector: unescape('size'),
  7235. category: 'accessing',
  7236. fn: function (){
  7237. var self=this;
  7238. return smalltalk.send(self, "_streamSize", []);
  7239. return self;},
  7240. args: [],
  7241. source: unescape('size%0A%09%5Eself%20streamSize'),
  7242. messageSends: ["streamSize"],
  7243. referencedClasses: []
  7244. }),
  7245. smalltalk.Stream);
  7246. smalltalk.addMethod(
  7247. unescape('_reset'),
  7248. smalltalk.method({
  7249. selector: unescape('reset'),
  7250. category: 'actions',
  7251. fn: function (){
  7252. var self=this;
  7253. smalltalk.send(self, "_position_", [(0)]);
  7254. return self;},
  7255. args: [],
  7256. source: unescape('reset%0A%09self%20position%3A%200'),
  7257. messageSends: ["position:"],
  7258. referencedClasses: []
  7259. }),
  7260. smalltalk.Stream);
  7261. smalltalk.addMethod(
  7262. unescape('_close'),
  7263. smalltalk.method({
  7264. selector: unescape('close'),
  7265. category: 'actions',
  7266. fn: function (){
  7267. var self=this;
  7268. return self;},
  7269. args: [],
  7270. source: unescape('close'),
  7271. messageSends: [],
  7272. referencedClasses: []
  7273. }),
  7274. smalltalk.Stream);
  7275. smalltalk.addMethod(
  7276. unescape('_flush'),
  7277. smalltalk.method({
  7278. selector: unescape('flush'),
  7279. category: 'actions',
  7280. fn: function (){
  7281. var self=this;
  7282. return self;},
  7283. args: [],
  7284. source: unescape('flush'),
  7285. messageSends: [],
  7286. referencedClasses: []
  7287. }),
  7288. smalltalk.Stream);
  7289. smalltalk.addMethod(
  7290. unescape('_resetContents'),
  7291. smalltalk.method({
  7292. selector: unescape('resetContents'),
  7293. category: 'actions',
  7294. fn: function (){
  7295. var self=this;
  7296. smalltalk.send(self, "_reset", []);
  7297. smalltalk.send(self, "_setStreamSize_", [(0)]);
  7298. return self;},
  7299. args: [],
  7300. source: unescape('resetContents%0A%09self%20reset.%0A%09self%20setStreamSize%3A%200'),
  7301. messageSends: ["reset", "setStreamSize:"],
  7302. referencedClasses: []
  7303. }),
  7304. smalltalk.Stream);
  7305. smalltalk.addMethod(
  7306. unescape('_do_'),
  7307. smalltalk.method({
  7308. selector: unescape('do%3A'),
  7309. category: 'enumerating',
  7310. fn: function (aBlock){
  7311. var self=this;
  7312. (function(){while(!(function(){return smalltalk.send(self, "_atEnd", []);})()) {(function(){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_next", [])]);})()}})();
  7313. return self;},
  7314. args: ["aBlock"],
  7315. source: unescape('do%3A%20aBlock%0A%09%5Bself%20atEnd%5D%20whileFalse%3A%20%5BaBlock%20value%3A%20self%20next%5D'),
  7316. messageSends: ["whileFalse:", "atEnd", "value:", "next"],
  7317. referencedClasses: []
  7318. }),
  7319. smalltalk.Stream);
  7320. smalltalk.addMethod(
  7321. unescape('_setToEnd'),
  7322. smalltalk.method({
  7323. selector: unescape('setToEnd'),
  7324. category: 'positioning',
  7325. fn: function (){
  7326. var self=this;
  7327. smalltalk.send(self, "_position_", [smalltalk.send(self, "_size", [])]);
  7328. return self;},
  7329. args: [],
  7330. source: unescape('setToEnd%0A%09self%20position%3A%20self%20size'),
  7331. messageSends: ["position:", "size"],
  7332. referencedClasses: []
  7333. }),
  7334. smalltalk.Stream);
  7335. smalltalk.addMethod(
  7336. unescape('_skip_'),
  7337. smalltalk.method({
  7338. selector: unescape('skip%3A'),
  7339. category: 'positioning',
  7340. fn: function (anInteger){
  7341. var self=this;
  7342. 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)])]);
  7343. return self;},
  7344. args: ["anInteger"],
  7345. source: unescape('skip%3A%20anInteger%0A%09self%20position%3A%20%28%28self%20position%20+%20anInteger%29%20min%3A%20self%20size%20max%3A%200%29'),
  7346. messageSends: ["position:", "min:max:", unescape("+"), "position", "size"],
  7347. referencedClasses: []
  7348. }),
  7349. smalltalk.Stream);
  7350. smalltalk.addMethod(
  7351. unescape('_next'),
  7352. smalltalk.method({
  7353. selector: unescape('next'),
  7354. category: 'reading',
  7355. fn: function (){
  7356. var self=this;
  7357. smalltalk.send(self, "_position_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);
  7358. return smalltalk.send(self['@collection'], "_at_", [smalltalk.send(self, "_position", [])]);
  7359. return self;},
  7360. args: [],
  7361. source: unescape('next%0A%09self%20position%3A%20self%20position%20+%201.%20%0A%09%5Ecollection%20at%3A%20self%20position'),
  7362. messageSends: ["position:", unescape("+"), "position", "at:"],
  7363. referencedClasses: []
  7364. }),
  7365. smalltalk.Stream);
  7366. smalltalk.addMethod(
  7367. unescape('_next_'),
  7368. smalltalk.method({
  7369. selector: unescape('next%3A'),
  7370. category: 'reading',
  7371. fn: function (anInteger){
  7372. var self=this;
  7373. var tempCollection=nil;
  7374. tempCollection=smalltalk.send(smalltalk.send(smalltalk.send(self, "_collection", []), "_class", []), "_new", []);
  7375. 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", [])]);})]));})]);
  7376. return tempCollection;
  7377. return self;},
  7378. args: ["anInteger"],
  7379. 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'),
  7380. messageSends: ["new", "class", "collection", "timesRepeat:", "ifFalse:", "atEnd", "add:", "next"],
  7381. referencedClasses: []
  7382. }),
  7383. smalltalk.Stream);
  7384. smalltalk.addMethod(
  7385. unescape('_nextPut_'),
  7386. smalltalk.method({
  7387. selector: unescape('nextPut%3A'),
  7388. category: 'writing',
  7389. fn: function (anObject){
  7390. var self=this;
  7391. smalltalk.send(self, "_position_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);
  7392. smalltalk.send(smalltalk.send(self, "_collection", []), "_at_put_", [smalltalk.send(self, "_position", []), anObject]);
  7393. smalltalk.send(self, "_setStreamSize_", [smalltalk.send(smalltalk.send(self, "_streamSize", []), "_max_", [smalltalk.send(self, "_position", [])])]);
  7394. return self;},
  7395. args: ["anObject"],
  7396. 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'),
  7397. messageSends: ["position:", unescape("+"), "position", "at:put:", "collection", "setStreamSize:", "max:", "streamSize"],
  7398. referencedClasses: []
  7399. }),
  7400. smalltalk.Stream);
  7401. smalltalk.addMethod(
  7402. unescape('_nextPutAll_'),
  7403. smalltalk.method({
  7404. selector: unescape('nextPutAll%3A'),
  7405. category: 'writing',
  7406. fn: function (aCollection){
  7407. var self=this;
  7408. smalltalk.send(aCollection, "_do_", [(function(each){return smalltalk.send(self, "_nextPut_", [each]);})]);
  7409. return self;},
  7410. args: ["aCollection"],
  7411. source: unescape('nextPutAll%3A%20aCollection%0A%09aCollection%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20self%20nextPut%3A%20each%5D'),
  7412. messageSends: ["do:", "nextPut:"],
  7413. referencedClasses: []
  7414. }),
  7415. smalltalk.Stream);
  7416. smalltalk.addMethod(
  7417. unescape('_peek'),
  7418. smalltalk.method({
  7419. selector: unescape('peek'),
  7420. category: 'reading',
  7421. fn: function (){
  7422. var self=this;
  7423. 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)]))]);})]));
  7424. return self;},
  7425. args: [],
  7426. 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'),
  7427. messageSends: ["ifFalse:", "atEnd", "at:", "collection", unescape("+"), "position"],
  7428. referencedClasses: []
  7429. }),
  7430. smalltalk.Stream);
  7431. smalltalk.addMethod(
  7432. unescape('_atEnd'),
  7433. smalltalk.method({
  7434. selector: unescape('atEnd'),
  7435. category: 'testing',
  7436. fn: function (){
  7437. var self=this;
  7438. return smalltalk.send(smalltalk.send(self, "_position", []), "__eq", [smalltalk.send(self, "_size", [])]);
  7439. return self;},
  7440. args: [],
  7441. source: unescape('atEnd%0A%09%5Eself%20position%20%3D%20self%20size'),
  7442. messageSends: [unescape("%3D"), "position", "size"],
  7443. referencedClasses: []
  7444. }),
  7445. smalltalk.Stream);
  7446. smalltalk.addMethod(
  7447. unescape('_atStart'),
  7448. smalltalk.method({
  7449. selector: unescape('atStart'),
  7450. category: 'testing',
  7451. fn: function (){
  7452. var self=this;
  7453. return smalltalk.send(smalltalk.send(self, "_position", []), "__eq", [(0)]);
  7454. return self;},
  7455. args: [],
  7456. source: unescape('atStart%0A%09%5Eself%20position%20%3D%200'),
  7457. messageSends: [unescape("%3D"), "position"],
  7458. referencedClasses: []
  7459. }),
  7460. smalltalk.Stream);
  7461. smalltalk.addMethod(
  7462. unescape('_isEmpty'),
  7463. smalltalk.method({
  7464. selector: unescape('isEmpty'),
  7465. category: 'testing',
  7466. fn: function (){
  7467. var self=this;
  7468. return smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [(0)]);
  7469. return self;},
  7470. args: [],
  7471. source: unescape('isEmpty%0A%09%5Eself%20size%20%3D%200'),
  7472. messageSends: [unescape("%3D"), "size"],
  7473. referencedClasses: []
  7474. }),
  7475. smalltalk.Stream);
  7476. smalltalk.addMethod(
  7477. unescape('_on_'),
  7478. smalltalk.method({
  7479. selector: unescape('on%3A'),
  7480. category: 'instance creation',
  7481. fn: function (aCollection){
  7482. var self=this;
  7483. 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", []));
  7484. return self;},
  7485. args: ["aCollection"],
  7486. 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'),
  7487. messageSends: ["setCollection:", "setStreamSize:", "size", "yourself", "new"],
  7488. referencedClasses: []
  7489. }),
  7490. smalltalk.Stream.klass);
  7491. smalltalk.addClass('StringStream', smalltalk.Stream, [], 'Kernel');
  7492. smalltalk.addMethod(
  7493. unescape('_next_'),
  7494. smalltalk.method({
  7495. selector: unescape('next%3A'),
  7496. category: 'reading',
  7497. fn: function (anInteger){
  7498. var self=this;
  7499. var tempCollection=nil;
  7500. tempCollection=smalltalk.send(smalltalk.send(smalltalk.send(self, "_collection", []), "_class", []), "_new", []);
  7501. 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", [])]);})]));})]);
  7502. return tempCollection;
  7503. return self;},
  7504. args: ["anInteger"],
  7505. 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'),
  7506. messageSends: ["new", "class", "collection", "timesRepeat:", "ifFalse:", "atEnd", unescape("%2C"), "next"],
  7507. referencedClasses: []
  7508. }),
  7509. smalltalk.StringStream);
  7510. smalltalk.addMethod(
  7511. unescape('_nextPut_'),
  7512. smalltalk.method({
  7513. selector: unescape('nextPut%3A'),
  7514. category: 'writing',
  7515. fn: function (aString){
  7516. var self=this;
  7517. smalltalk.send(self, "_nextPutAll_", [aString]);
  7518. return self;},
  7519. args: ["aString"],
  7520. source: unescape('nextPut%3A%20aString%0A%09self%20nextPutAll%3A%20aString'),
  7521. messageSends: ["nextPutAll:"],
  7522. referencedClasses: []
  7523. }),
  7524. smalltalk.StringStream);
  7525. smalltalk.addMethod(
  7526. unescape('_nextPutAll_'),
  7527. smalltalk.method({
  7528. selector: unescape('nextPutAll%3A'),
  7529. category: 'writing',
  7530. fn: function (aString){
  7531. var self=this;
  7532. 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", [])])])]);
  7533. 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", [])]))]);
  7534. smalltalk.send(self, "_setStreamSize_", [smalltalk.send(smalltalk.send(self, "_streamSize", []), "_max_", [smalltalk.send(self, "_position", [])])]);
  7535. return self;},
  7536. args: ["aString"],
  7537. 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'),
  7538. messageSends: ["setCollection:", unescape("%2C"), "copyFrom:to:", "collection", "position", unescape("+"), "size", "position:", "setStreamSize:", "max:", "streamSize"],
  7539. referencedClasses: []
  7540. }),
  7541. smalltalk.StringStream);
  7542. smalltalk.addMethod(
  7543. unescape('_cr'),
  7544. smalltalk.method({
  7545. selector: unescape('cr'),
  7546. category: 'writing',
  7547. fn: function (){
  7548. var self=this;
  7549. return smalltalk.send(self, "_nextPutAll_", [smalltalk.send((smalltalk.String || String), "_cr", [])]);
  7550. return self;},
  7551. args: [],
  7552. source: unescape('cr%0A%09%5Eself%20nextPutAll%3A%20String%20cr'),
  7553. messageSends: ["nextPutAll:", "cr"],
  7554. referencedClasses: ["String"]
  7555. }),
  7556. smalltalk.StringStream);
  7557. smalltalk.addMethod(
  7558. unescape('_crlf'),
  7559. smalltalk.method({
  7560. selector: unescape('crlf'),
  7561. category: 'writing',
  7562. fn: function (){
  7563. var self=this;
  7564. return smalltalk.send(self, "_nextPutAll_", [smalltalk.send((smalltalk.String || String), "_crlf", [])]);
  7565. return self;},
  7566. args: [],
  7567. source: unescape('crlf%0A%09%5Eself%20nextPutAll%3A%20String%20crlf'),
  7568. messageSends: ["nextPutAll:", "crlf"],
  7569. referencedClasses: ["String"]
  7570. }),
  7571. smalltalk.StringStream);
  7572. smalltalk.addMethod(
  7573. unescape('_lf'),
  7574. smalltalk.method({
  7575. selector: unescape('lf'),
  7576. category: 'writing',
  7577. fn: function (){
  7578. var self=this;
  7579. return smalltalk.send(self, "_nextPutAll_", [smalltalk.send((smalltalk.String || String), "_lf", [])]);
  7580. return self;},
  7581. args: [],
  7582. source: unescape('lf%0A%09%5Eself%20nextPutAll%3A%20String%20lf'),
  7583. messageSends: ["nextPutAll:", "lf"],
  7584. referencedClasses: ["String"]
  7585. }),
  7586. smalltalk.StringStream);
  7587. smalltalk.addMethod(
  7588. unescape('_space'),
  7589. smalltalk.method({
  7590. selector: unescape('space'),
  7591. category: 'writing',
  7592. fn: function (){
  7593. var self=this;
  7594. smalltalk.send(self, "_nextPut_", [" "]);
  7595. return self;},
  7596. args: [],
  7597. source: unescape('space%0A%09self%20nextPut%3A%20%27%20%27'),
  7598. messageSends: ["nextPut:"],
  7599. referencedClasses: []
  7600. }),
  7601. smalltalk.StringStream);
  7602. smalltalk.addClass('ClassCommentReader', smalltalk.Object, ['class', 'chunkParser'], 'Kernel');
  7603. smalltalk.addMethod(
  7604. unescape('_class_'),
  7605. smalltalk.method({
  7606. selector: unescape('class%3A'),
  7607. category: 'accessing',
  7608. fn: function (aClass){
  7609. var self=this;
  7610. self['@class']=aClass;
  7611. return self;},
  7612. args: ["aClass"],
  7613. source: unescape('class%3A%20aClass%0A%09class%20%3A%3D%20aClass'),
  7614. messageSends: [],
  7615. referencedClasses: []
  7616. }),
  7617. smalltalk.ClassCommentReader);
  7618. smalltalk.addMethod(
  7619. unescape('_scanFrom_'),
  7620. smalltalk.method({
  7621. selector: unescape('scanFrom%3A'),
  7622. category: 'fileIn',
  7623. fn: function (aChunkParser){
  7624. var self=this;
  7625. var chunk=nil;
  7626. chunk=smalltalk.send(aChunkParser, "_nextChunk", []);
  7627. ((($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]);})]));
  7628. return self;},
  7629. args: ["aChunkParser"],
  7630. 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.'),
  7631. messageSends: ["nextChunk", "ifFalse:", "isEmpty", "setComment:"],
  7632. referencedClasses: []
  7633. }),
  7634. smalltalk.ClassCommentReader);
  7635. smalltalk.addMethod(
  7636. unescape('_initialize'),
  7637. smalltalk.method({
  7638. selector: unescape('initialize'),
  7639. category: 'initialization',
  7640. fn: function (){
  7641. var self=this;
  7642. smalltalk.send(self, "_initialize", [], smalltalk.Object);
  7643. self['@chunkParser']=smalltalk.send((smalltalk.ChunkParser || ChunkParser), "_new", []);
  7644. return self;},
  7645. args: [],
  7646. source: unescape('initialize%0A%09super%20initialize.%0A%09chunkParser%20%3A%3D%20ChunkParser%20new.'),
  7647. messageSends: ["initialize", "new"],
  7648. referencedClasses: ["ChunkParser"]
  7649. }),
  7650. smalltalk.ClassCommentReader);
  7651. smalltalk.addMethod(
  7652. unescape('_setComment_'),
  7653. smalltalk.method({
  7654. selector: unescape('setComment%3A'),
  7655. category: 'private',
  7656. fn: function (aString){
  7657. var self=this;
  7658. smalltalk.send(self['@class'], "_comment_", [aString]);
  7659. return self;},
  7660. args: ["aString"],
  7661. source: unescape('setComment%3A%20aString%0A%20%20%20%20class%20comment%3A%20aString'),
  7662. messageSends: ["comment:"],
  7663. referencedClasses: []
  7664. }),
  7665. smalltalk.ClassCommentReader);
  7666. smalltalk.addClass('Random', smalltalk.Object, [], 'Kernel');
  7667. smalltalk.addMethod(
  7668. unescape('_next'),
  7669. smalltalk.method({
  7670. selector: unescape('next'),
  7671. category: 'accessing',
  7672. fn: function (){
  7673. var self=this;
  7674. return Math.random();
  7675. return self;},
  7676. args: [],
  7677. source: unescape('next%0A%09%3Creturn%20Math.random%28%29%3E'),
  7678. messageSends: [],
  7679. referencedClasses: []
  7680. }),
  7681. smalltalk.Random);
  7682. smalltalk.addMethod(
  7683. unescape('_next_'),
  7684. smalltalk.method({
  7685. selector: unescape('next%3A'),
  7686. category: 'accessing',
  7687. fn: function (anInteger){
  7688. var self=this;
  7689. return smalltalk.send(smalltalk.send((1), "_to_", [anInteger]), "_collect_", [(function(each){return smalltalk.send(self, "_next", []);})]);
  7690. return self;},
  7691. args: ["anInteger"],
  7692. 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'),
  7693. messageSends: ["collect:", "to:", "next"],
  7694. referencedClasses: []
  7695. }),
  7696. smalltalk.Random);
  7697. smalltalk.addClass('Point', smalltalk.Object, ['x', 'y'], 'Kernel');
  7698. smalltalk.addMethod(
  7699. unescape('_x'),
  7700. smalltalk.method({
  7701. selector: unescape('x'),
  7702. category: 'accessing',
  7703. fn: function (){
  7704. var self=this;
  7705. return self['@x'];
  7706. return self;},
  7707. args: [],
  7708. source: unescape('x%0A%09%5Ex'),
  7709. messageSends: [],
  7710. referencedClasses: []
  7711. }),
  7712. smalltalk.Point);
  7713. smalltalk.addMethod(
  7714. unescape('_y'),
  7715. smalltalk.method({
  7716. selector: unescape('y'),
  7717. category: 'accessing',
  7718. fn: function (){
  7719. var self=this;
  7720. return self['@y'];
  7721. return self;},
  7722. args: [],
  7723. source: unescape('y%0A%09%5Ey'),
  7724. messageSends: [],
  7725. referencedClasses: []
  7726. }),
  7727. smalltalk.Point);
  7728. smalltalk.addMethod(
  7729. unescape('_y_'),
  7730. smalltalk.method({
  7731. selector: unescape('y%3A'),
  7732. category: 'accessing',
  7733. fn: function (aNumber){
  7734. var self=this;
  7735. self['@y']=aNumber;
  7736. return self;},
  7737. args: ["aNumber"],
  7738. source: unescape('y%3A%20aNumber%0A%09y%20%3A%3D%20aNumber'),
  7739. messageSends: [],
  7740. referencedClasses: []
  7741. }),
  7742. smalltalk.Point);
  7743. smalltalk.addMethod(
  7744. unescape('_x_'),
  7745. smalltalk.method({
  7746. selector: unescape('x%3A'),
  7747. category: 'accessing',
  7748. fn: function (aNumber){
  7749. var self=this;
  7750. self['@x']=aNumber;
  7751. return self;},
  7752. args: ["aNumber"],
  7753. source: unescape('x%3A%20aNumber%0A%09x%20%3A%3D%20aNumber'),
  7754. messageSends: [],
  7755. referencedClasses: []
  7756. }),
  7757. smalltalk.Point);
  7758. smalltalk.addMethod(
  7759. unescape('__star'),
  7760. smalltalk.method({
  7761. selector: unescape('*'),
  7762. category: 'arithmetic',
  7763. fn: function (aPoint){
  7764. var self=this;
  7765. 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", [])]))]);
  7766. return self;},
  7767. args: ["aPoint"],
  7768. source: unescape('*%20aPoint%0A%09%5EPoint%20x%3A%20self%20x%20*%20aPoint%20asPoint%20x%20y%3A%20self%20y%20*%20aPoint%20asPoint%20y'),
  7769. messageSends: ["x:y:", unescape("*"), "x", "asPoint", "y"],
  7770. referencedClasses: ["Point"]
  7771. }),
  7772. smalltalk.Point);
  7773. smalltalk.addMethod(
  7774. unescape('__plus'),
  7775. smalltalk.method({
  7776. selector: unescape('+'),
  7777. category: 'arithmetic',
  7778. fn: function (aPoint){
  7779. var self=this;
  7780. 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", [])]))]);
  7781. return self;},
  7782. args: ["aPoint"],
  7783. source: unescape('+%20aPoint%0A%09%5EPoint%20x%3A%20self%20x%20+%20aPoint%20asPoint%20x%20y%3A%20self%20y%20+%20aPoint%20asPoint%20y'),
  7784. messageSends: ["x:y:", unescape("+"), "x", "asPoint", "y"],
  7785. referencedClasses: ["Point"]
  7786. }),
  7787. smalltalk.Point);
  7788. smalltalk.addMethod(
  7789. unescape('__minus'),
  7790. smalltalk.method({
  7791. selector: unescape('-'),
  7792. category: 'arithmetic',
  7793. fn: function (aPoint){
  7794. var self=this;
  7795. 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", [])]))]);
  7796. return self;},
  7797. args: ["aPoint"],
  7798. source: unescape('-%20aPoint%0A%09%5EPoint%20x%3A%20self%20x%20-%20aPoint%20asPoint%20x%20y%3A%20self%20y%20-%20aPoint%20asPoint%20y'),
  7799. messageSends: ["x:y:", unescape("-"), "x", "asPoint", "y"],
  7800. referencedClasses: ["Point"]
  7801. }),
  7802. smalltalk.Point);
  7803. smalltalk.addMethod(
  7804. unescape('__slash'),
  7805. smalltalk.method({
  7806. selector: unescape('/'),
  7807. category: 'arithmetic',
  7808. fn: function (aPoint){
  7809. var self=this;
  7810. 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", [])]))]);
  7811. return self;},
  7812. args: ["aPoint"],
  7813. source: unescape('/%20aPoint%0A%09%5EPoint%20x%3A%20self%20x%20/%20aPoint%20asPoint%20x%20y%3A%20self%20y%20/%20aPoint%20asPoint%20y'),
  7814. messageSends: ["x:y:", unescape("/"), "x", "asPoint", "y"],
  7815. referencedClasses: ["Point"]
  7816. }),
  7817. smalltalk.Point);
  7818. smalltalk.addMethod(
  7819. unescape('_asPoint'),
  7820. smalltalk.method({
  7821. selector: unescape('asPoint'),
  7822. category: 'converting',
  7823. fn: function (){
  7824. var self=this;
  7825. return self;
  7826. return self;},
  7827. args: [],
  7828. source: unescape('asPoint%0A%09%5Eself'),
  7829. messageSends: [],
  7830. referencedClasses: []
  7831. }),
  7832. smalltalk.Point);
  7833. smalltalk.addMethod(
  7834. unescape('__eq'),
  7835. smalltalk.method({
  7836. selector: unescape('%3D'),
  7837. category: 'arithmetic',
  7838. fn: function (aPoint){
  7839. var self=this;
  7840. 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", [])])]);})]);
  7841. return self;},
  7842. args: ["aPoint"],
  7843. 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'),
  7844. messageSends: ["and:", unescape("%3D"), "class", unescape("%26"), "x", "y"],
  7845. referencedClasses: []
  7846. }),
  7847. smalltalk.Point);
  7848. smalltalk.addMethod(
  7849. unescape('_x_y_'),
  7850. smalltalk.method({
  7851. selector: unescape('x%3Ay%3A'),
  7852. category: 'instance creation',
  7853. fn: function (aNumber, anotherNumber){
  7854. var self=this;
  7855. return (function($rec){smalltalk.send($rec, "_x_", [aNumber]);smalltalk.send($rec, "_y_", [anotherNumber]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  7856. return self;},
  7857. args: ["aNumber", "anotherNumber"],
  7858. 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'),
  7859. messageSends: ["x:", "y:", "yourself", "new"],
  7860. referencedClasses: []
  7861. }),
  7862. smalltalk.Point.klass);
  7863. smalltalk.addClass('Message', smalltalk.Object, ['selector', 'arguments'], 'Kernel');
  7864. smalltalk.addMethod(
  7865. unescape('_selector'),
  7866. smalltalk.method({
  7867. selector: unescape('selector'),
  7868. category: 'accessing',
  7869. fn: function (){
  7870. var self=this;
  7871. return self['@selector'];
  7872. return self;},
  7873. args: [],
  7874. source: unescape('selector%0A%09%5Eselector'),
  7875. messageSends: [],
  7876. referencedClasses: []
  7877. }),
  7878. smalltalk.Message);
  7879. smalltalk.addMethod(
  7880. unescape('_selector_'),
  7881. smalltalk.method({
  7882. selector: unescape('selector%3A'),
  7883. category: 'accessing',
  7884. fn: function (aString){
  7885. var self=this;
  7886. self['@selector']=aString;
  7887. return self;},
  7888. args: ["aString"],
  7889. source: unescape('selector%3A%20aString%0A%09selector%20%3A%3D%20aString'),
  7890. messageSends: [],
  7891. referencedClasses: []
  7892. }),
  7893. smalltalk.Message);
  7894. smalltalk.addMethod(
  7895. unescape('_arguments_'),
  7896. smalltalk.method({
  7897. selector: unescape('arguments%3A'),
  7898. category: 'accessing',
  7899. fn: function (anArray){
  7900. var self=this;
  7901. self['@arguments']=anArray;
  7902. return self;},
  7903. args: ["anArray"],
  7904. source: unescape('arguments%3A%20anArray%0A%09arguments%20%3A%3D%20anArray'),
  7905. messageSends: [],
  7906. referencedClasses: []
  7907. }),
  7908. smalltalk.Message);
  7909. smalltalk.addMethod(
  7910. unescape('_arguments'),
  7911. smalltalk.method({
  7912. selector: unescape('arguments'),
  7913. category: 'accessing',
  7914. fn: function (){
  7915. var self=this;
  7916. return self['@arguments'];
  7917. return self;},
  7918. args: [],
  7919. source: unescape('arguments%0A%09%5Earguments'),
  7920. messageSends: [],
  7921. referencedClasses: []
  7922. }),
  7923. smalltalk.Message);
  7924. smalltalk.addMethod(
  7925. unescape('_printString'),
  7926. smalltalk.method({
  7927. selector: unescape('printString'),
  7928. category: 'printing',
  7929. fn: function (){
  7930. var self=this;
  7931. 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);})]);
  7932. return self;},
  7933. args: [],
  7934. 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'),
  7935. messageSends: ["streamContents:", "nextPutAll:", "printString"],
  7936. referencedClasses: ["String"]
  7937. }),
  7938. smalltalk.Message);
  7939. smalltalk.addMethod(
  7940. unescape('_selector_arguments_'),
  7941. smalltalk.method({
  7942. selector: unescape('selector%3Aarguments%3A'),
  7943. category: 'instance creation',
  7944. fn: function (aString, anArray){
  7945. var self=this;
  7946. return (function($rec){smalltalk.send($rec, "_selector_", [aString]);smalltalk.send($rec, "_arguments_", [anArray]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  7947. return self;},
  7948. args: ["aString", "anArray"],
  7949. 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'),
  7950. messageSends: ["selector:", "arguments:", "yourself", "new"],
  7951. referencedClasses: []
  7952. }),
  7953. smalltalk.Message.klass);
  7954. smalltalk.addClass('MessageNotUnderstood', smalltalk.Error, ['message', 'receiver'], 'Kernel');
  7955. smalltalk.addMethod(
  7956. unescape('_message'),
  7957. smalltalk.method({
  7958. selector: unescape('message'),
  7959. category: 'accessing',
  7960. fn: function (){
  7961. var self=this;
  7962. return self['@message'];
  7963. return self;},
  7964. args: [],
  7965. source: unescape('message%0A%09%5Emessage'),
  7966. messageSends: [],
  7967. referencedClasses: []
  7968. }),
  7969. smalltalk.MessageNotUnderstood);
  7970. smalltalk.addMethod(
  7971. unescape('_message_'),
  7972. smalltalk.method({
  7973. selector: unescape('message%3A'),
  7974. category: 'accessing',
  7975. fn: function (aMessage){
  7976. var self=this;
  7977. self['@message']=aMessage;
  7978. return self;},
  7979. args: ["aMessage"],
  7980. source: unescape('message%3A%20aMessage%0A%09message%20%3A%3D%20aMessage'),
  7981. messageSends: [],
  7982. referencedClasses: []
  7983. }),
  7984. smalltalk.MessageNotUnderstood);
  7985. smalltalk.addMethod(
  7986. unescape('_receiver'),
  7987. smalltalk.method({
  7988. selector: unescape('receiver'),
  7989. category: 'accessing',
  7990. fn: function (){
  7991. var self=this;
  7992. return self['@receiver'];
  7993. return self;},
  7994. args: [],
  7995. source: unescape('receiver%0A%09%5Ereceiver'),
  7996. messageSends: [],
  7997. referencedClasses: []
  7998. }),
  7999. smalltalk.MessageNotUnderstood);
  8000. smalltalk.addMethod(
  8001. unescape('_receiver_'),
  8002. smalltalk.method({
  8003. selector: unescape('receiver%3A'),
  8004. category: 'accessing',
  8005. fn: function (anObject){
  8006. var self=this;
  8007. self['@receiver']=anObject;
  8008. return self;},
  8009. args: ["anObject"],
  8010. source: unescape('receiver%3A%20anObject%0A%09receiver%20%3A%3D%20anObject'),
  8011. messageSends: [],
  8012. referencedClasses: []
  8013. }),
  8014. smalltalk.MessageNotUnderstood);
  8015. smalltalk.addMethod(
  8016. unescape('_messageText'),
  8017. smalltalk.method({
  8018. selector: unescape('messageText'),
  8019. category: 'accessing',
  8020. fn: function (){
  8021. var self=this;
  8022. 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", [])]);
  8023. return self;},
  8024. args: [],
  8025. source: unescape('messageText%0A%09%5Eself%20receiver%20asString%2C%20%27%20does%20not%20understand%20%23%27%2C%20self%20message%20selector'),
  8026. messageSends: [unescape("%2C"), "asString", "receiver", "selector", "message"],
  8027. referencedClasses: []
  8028. }),
  8029. smalltalk.MessageNotUnderstood);
  8030. smalltalk.addClass('ErrorHandler', smalltalk.Object, [], 'Kernel');
  8031. smalltalk.addMethod(
  8032. unescape('_handleError_'),
  8033. smalltalk.method({
  8034. selector: unescape('handleError%3A'),
  8035. category: 'error handling',
  8036. fn: function (anError){
  8037. var self=this;
  8038. (($receiver = smalltalk.send(anError, "_context", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_logErrorContext_", [smalltalk.send(anError, "_context", [])]);})() : nil;
  8039. smalltalk.send(self, "_logError_", [anError]);
  8040. return self;},
  8041. args: ["anError"],
  8042. source: unescape('handleError%3A%20anError%0A%09anError%20context%20ifNotNil%3A%20%5Bself%20logErrorContext%3A%20anError%20context%5D.%0A%09self%20logError%3A%20anError'),
  8043. messageSends: ["ifNotNil:", "context", "logErrorContext:", "logError:"],
  8044. referencedClasses: []
  8045. }),
  8046. smalltalk.ErrorHandler);
  8047. smalltalk.addMethod(
  8048. unescape('_logContext_'),
  8049. smalltalk.method({
  8050. selector: unescape('logContext%3A'),
  8051. category: 'private',
  8052. fn: function (aContext){
  8053. var self=this;
  8054. (($receiver = smalltalk.send(aContext, "_home", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_logContext_", [smalltalk.send(aContext, "_home", [])]);})() : nil;
  8055. smalltalk.send(self, "_log_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aContext, "_receiver", []), "_asString", []), "__comma", [unescape("%3E%3E")]), "__comma", [smalltalk.send(aContext, "_selector", [])])]);
  8056. return self;},
  8057. args: ["aContext"],
  8058. 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'),
  8059. messageSends: ["ifNotNil:", "home", "logContext:", "log:", unescape("%2C"), "asString", "receiver", "selector"],
  8060. referencedClasses: []
  8061. }),
  8062. smalltalk.ErrorHandler);
  8063. smalltalk.addMethod(
  8064. unescape('_logErrorContext_'),
  8065. smalltalk.method({
  8066. selector: unescape('logErrorContext%3A'),
  8067. category: 'private',
  8068. fn: function (aContext){
  8069. var self=this;
  8070. (($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;
  8071. return self;},
  8072. args: ["aContext"],
  8073. 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'),
  8074. messageSends: ["ifNotNil:", "home", "logContext:"],
  8075. referencedClasses: []
  8076. }),
  8077. smalltalk.ErrorHandler);
  8078. smalltalk.addMethod(
  8079. unescape('_logError_'),
  8080. smalltalk.method({
  8081. selector: unescape('logError%3A'),
  8082. category: 'private',
  8083. fn: function (anError){
  8084. var self=this;
  8085. smalltalk.send(self, "_log_", [smalltalk.send(anError, "_messageText", [])]);
  8086. return self;},
  8087. args: ["anError"],
  8088. source: unescape('logError%3A%20anError%0A%09self%20log%3A%20anError%20messageText'),
  8089. messageSends: ["log:", "messageText"],
  8090. referencedClasses: []
  8091. }),
  8092. smalltalk.ErrorHandler);
  8093. smalltalk.addMethod(
  8094. unescape('_log_'),
  8095. smalltalk.method({
  8096. selector: unescape('log%3A'),
  8097. category: 'private',
  8098. fn: function (aString){
  8099. var self=this;
  8100. smalltalk.send((typeof console == 'undefined' ? nil : console), "_log_", [aString]);
  8101. return self;},
  8102. args: ["aString"],
  8103. source: unescape('log%3A%20aString%0A%09console%20log%3A%20aString'),
  8104. messageSends: ["log:"],
  8105. referencedClasses: []
  8106. }),
  8107. smalltalk.ErrorHandler);
  8108. smalltalk.ErrorHandler.klass.iVarNames = ['current'];
  8109. smalltalk.addMethod(
  8110. unescape('_current'),
  8111. smalltalk.method({
  8112. selector: unescape('current'),
  8113. category: 'accessing',
  8114. fn: function (){
  8115. var self=this;
  8116. return (($receiver = self['@current']) == nil || $receiver == undefined) ? (function(){return self['@current']=smalltalk.send(self, "_new", []);})() : $receiver;
  8117. return self;},
  8118. args: [],
  8119. source: unescape('current%0A%09%5Ecurrent%20ifNil%3A%20%5Bcurrent%20%3A%3D%20self%20new%5D'),
  8120. messageSends: ["ifNil:", "new"],
  8121. referencedClasses: []
  8122. }),
  8123. smalltalk.ErrorHandler.klass);
  8124. smalltalk.addMethod(
  8125. unescape('_initialize'),
  8126. smalltalk.method({
  8127. selector: unescape('initialize'),
  8128. category: 'initialization',
  8129. fn: function (){
  8130. var self=this;
  8131. smalltalk.send(self, "_register", []);
  8132. return self;},
  8133. args: [],
  8134. source: unescape('initialize%0A%09self%20register'),
  8135. messageSends: ["register"],
  8136. referencedClasses: []
  8137. }),
  8138. smalltalk.ErrorHandler.klass);
  8139. smalltalk.addMethod(
  8140. unescape('_register'),
  8141. smalltalk.method({
  8142. selector: unescape('register'),
  8143. category: 'initialization',
  8144. fn: function (){
  8145. var self=this;
  8146. smalltalk.send((smalltalk.ErrorHandler || ErrorHandler), "_setCurrent_", [smalltalk.send(self, "_new", [])]);
  8147. return self;},
  8148. args: [],
  8149. source: unescape('register%0A%09ErrorHandler%20setCurrent%3A%20self%20new'),
  8150. messageSends: ["setCurrent:", "new"],
  8151. referencedClasses: ["ErrorHandler"]
  8152. }),
  8153. smalltalk.ErrorHandler.klass);
  8154. smalltalk.addMethod(
  8155. unescape('_setCurrent_'),
  8156. smalltalk.method({
  8157. selector: unescape('setCurrent%3A'),
  8158. category: 'accessing',
  8159. fn: function (anHandler){
  8160. var self=this;
  8161. self['@current']=anHandler;
  8162. return self;},
  8163. args: ["anHandler"],
  8164. source: unescape('setCurrent%3A%20anHandler%0A%09current%20%3A%3D%20anHandler'),
  8165. messageSends: [],
  8166. referencedClasses: []
  8167. }),
  8168. smalltalk.ErrorHandler.klass);
  8169. smalltalk.addClass('JSObjectProxy', smalltalk.Object, ['jsObject'], 'Kernel');
  8170. smalltalk.addMethod(
  8171. unescape('_jsObject_'),
  8172. smalltalk.method({
  8173. selector: unescape('jsObject%3A'),
  8174. category: 'accessing',
  8175. fn: function (aJSObject){
  8176. var self=this;
  8177. self['@jsObject']=aJSObject;
  8178. return self;},
  8179. args: ["aJSObject"],
  8180. source: unescape('jsObject%3A%20aJSObject%0A%09jsObject%20%3A%3D%20aJSObject'),
  8181. messageSends: [],
  8182. referencedClasses: []
  8183. }),
  8184. smalltalk.JSObjectProxy);
  8185. smalltalk.addMethod(
  8186. unescape('_jsObject'),
  8187. smalltalk.method({
  8188. selector: unescape('jsObject'),
  8189. category: 'accessing',
  8190. fn: function (){
  8191. var self=this;
  8192. return self['@jsObject'];
  8193. return self;},
  8194. args: [],
  8195. source: unescape('jsObject%0A%09%5EjsObject'),
  8196. messageSends: [],
  8197. referencedClasses: []
  8198. }),
  8199. smalltalk.JSObjectProxy);
  8200. smalltalk.addMethod(
  8201. unescape('_printString'),
  8202. smalltalk.method({
  8203. selector: unescape('printString'),
  8204. category: 'proxy',
  8205. fn: function (){
  8206. var self=this;
  8207. return smalltalk.send(smalltalk.send(self, "_jsObject", []), "_toString", []);
  8208. return self;},
  8209. args: [],
  8210. source: unescape('printString%0A%09%5Eself%20jsObject%20toString'),
  8211. messageSends: ["toString", "jsObject"],
  8212. referencedClasses: []
  8213. }),
  8214. smalltalk.JSObjectProxy);
  8215. smalltalk.addMethod(
  8216. unescape('_inspectOn_'),
  8217. smalltalk.method({
  8218. selector: unescape('inspectOn%3A'),
  8219. category: 'proxy',
  8220. fn: function (anInspector){
  8221. var self=this;
  8222. var variables=nil;
  8223. variables=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []);
  8224. smalltalk.send(variables, "_at_put_", [unescape("%23self"), smalltalk.send(self, "_jsObject", [])]);
  8225. smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
  8226. for(var i in self['@jsObject']) {
  8227. variables._at_put_(i, self['@jsObject'][i]);
  8228. };
  8229. smalltalk.send(anInspector, "_setVariables_", [variables]);
  8230. return self;},
  8231. args: ["anInspector"],
  8232. 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'),
  8233. messageSends: ["new", "at:put:", "jsObject", "setLabel:", "printString", "setVariables:"],
  8234. referencedClasses: ["Dictionary"]
  8235. }),
  8236. smalltalk.JSObjectProxy);
  8237. smalltalk.addMethod(
  8238. unescape('_doesNotUnderstand_'),
  8239. smalltalk.method({
  8240. selector: unescape('doesNotUnderstand%3A'),
  8241. category: 'proxy',
  8242. fn: function (aMessage){
  8243. var self=this;
  8244. var obj=nil;
  8245. var selector=nil;
  8246. var jsSelector=nil;
  8247. var arguments=nil;
  8248. obj=smalltalk.send(self, "_jsObject", []);
  8249. selector=smalltalk.send(aMessage, "_selector", []);
  8250. jsSelector=smalltalk.send(selector, "_asJavaScriptSelector", []);
  8251. arguments=smalltalk.send(aMessage, "_arguments", []);
  8252. if(obj[jsSelector] != undefined) {return smalltalk.send(obj, jsSelector, arguments)};
  8253. smalltalk.send(self, "_doesNotUnderstand_", [aMessage], smalltalk.Object);
  8254. return self;},
  8255. args: ["aMessage"],
  8256. 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'),
  8257. messageSends: ["jsObject", "selector", "asJavaScriptSelector", "arguments", "doesNotUnderstand:"],
  8258. referencedClasses: []
  8259. }),
  8260. smalltalk.JSObjectProxy);
  8261. smalltalk.addMethod(
  8262. unescape('_at_'),
  8263. smalltalk.method({
  8264. selector: unescape('at%3A'),
  8265. category: 'accessing',
  8266. fn: function (aString){
  8267. var self=this;
  8268. return self['@jsObject'][aString];
  8269. return self;},
  8270. args: ["aString"],
  8271. source: unescape('at%3A%20aString%0A%09%3Creturn%20self%5B%27@jsObject%27%5D%5BaString%5D%3E'),
  8272. messageSends: [],
  8273. referencedClasses: []
  8274. }),
  8275. smalltalk.JSObjectProxy);
  8276. smalltalk.addMethod(
  8277. unescape('_at_put_'),
  8278. smalltalk.method({
  8279. selector: unescape('at%3Aput%3A'),
  8280. category: 'accessing',
  8281. fn: function (aString, anObject){
  8282. var self=this;
  8283. self['@jsObject'][aString] = anObject;
  8284. return self;},
  8285. args: ["aString", "anObject"],
  8286. source: unescape('at%3A%20aString%20put%3A%20anObject%0A%09%3Cself%5B%27@jsObject%27%5D%5BaString%5D%20%3D%20anObject%3E'),
  8287. messageSends: [],
  8288. referencedClasses: []
  8289. }),
  8290. smalltalk.JSObjectProxy);
  8291. smalltalk.addMethod(
  8292. unescape('_on_'),
  8293. smalltalk.method({
  8294. selector: unescape('on%3A'),
  8295. category: 'instance creation',
  8296. fn: function (aJSObject){
  8297. var self=this;
  8298. return (function($rec){smalltalk.send($rec, "_jsObject_", [aJSObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  8299. return self;},
  8300. args: ["aJSObject"],
  8301. source: unescape('on%3A%20aJSObject%0A%09%5Eself%20new%0A%09%09jsObject%3A%20aJSObject%3B%0A%09%09yourself'),
  8302. messageSends: ["jsObject:", "yourself", "new"],
  8303. referencedClasses: []
  8304. }),
  8305. smalltalk.JSObjectProxy.klass);
  8306. smalltalk.addClass('Set', smalltalk.Collection, ['elements'], 'Kernel');
  8307. smalltalk.addMethod(
  8308. unescape('_add_'),
  8309. smalltalk.method({
  8310. selector: unescape('add%3A'),
  8311. category: 'adding/removing',
  8312. fn: function (anObject){
  8313. var self=this;
  8314. var found;
  8315. for(var i in self['@elements']) {
  8316. if(anObject == self['@elements'][i]) {
  8317. found = true;
  8318. break;
  8319. }
  8320. }
  8321. if(!found) {self['@elements'].push(anObject)}
  8322. ;
  8323. return self;},
  8324. args: ["anObject"],
  8325. 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'),
  8326. messageSends: [],
  8327. referencedClasses: []
  8328. }),
  8329. smalltalk.Set);
  8330. smalltalk.addMethod(
  8331. unescape('_remove_'),
  8332. smalltalk.method({
  8333. selector: unescape('remove%3A'),
  8334. category: 'adding/removing',
  8335. fn: function (anObject){
  8336. var self=this;
  8337. smalltalk.send(self['@elements'], "_remove_", [anObject]);
  8338. return self;},
  8339. args: ["anObject"],
  8340. source: unescape('remove%3A%20anObject%0A%09elements%20remove%3A%20anObject'),
  8341. messageSends: ["remove:"],
  8342. referencedClasses: []
  8343. }),
  8344. smalltalk.Set);
  8345. smalltalk.addMethod(
  8346. unescape('_initialize'),
  8347. smalltalk.method({
  8348. selector: unescape('initialize'),
  8349. category: 'initialization',
  8350. fn: function (){
  8351. var self=this;
  8352. smalltalk.send(self, "_initialize", [], smalltalk.Collection);
  8353. self['@elements']=[];
  8354. return self;},
  8355. args: [],
  8356. source: unescape('initialize%0A%09super%20initialize.%0A%09elements%20%3A%3D%20%23%28%29'),
  8357. messageSends: ["initialize"],
  8358. referencedClasses: []
  8359. }),
  8360. smalltalk.Set);
  8361. smalltalk.addMethod(
  8362. unescape('_size'),
  8363. smalltalk.method({
  8364. selector: unescape('size'),
  8365. category: 'accessing',
  8366. fn: function (){
  8367. var self=this;
  8368. return smalltalk.send(self['@elements'], "_size", []);
  8369. return self;},
  8370. args: [],
  8371. source: unescape('size%0A%09%5Eelements%20size'),
  8372. messageSends: ["size"],
  8373. referencedClasses: []
  8374. }),
  8375. smalltalk.Set);
  8376. smalltalk.addMethod(
  8377. unescape('_asArray'),
  8378. smalltalk.method({
  8379. selector: unescape('asArray'),
  8380. category: 'converting',
  8381. fn: function (){
  8382. var self=this;
  8383. return smalltalk.send(self['@elements'], "_copy", []);
  8384. return self;},
  8385. args: [],
  8386. source: unescape('asArray%0A%09%5Eelements%20copy'),
  8387. messageSends: ["copy"],
  8388. referencedClasses: []
  8389. }),
  8390. smalltalk.Set);
  8391. smalltalk.addMethod(
  8392. unescape('_detect_ifNone_'),
  8393. smalltalk.method({
  8394. selector: unescape('detect%3AifNone%3A'),
  8395. category: 'enumerating',
  8396. fn: function (aBlock, anotherBlock){
  8397. var self=this;
  8398. return smalltalk.send(self['@elements'], "_detect_ifNone_", [aBlock, anotherBlock]);
  8399. return self;},
  8400. args: ["aBlock", "anotherBlock"],
  8401. source: unescape('detect%3A%20aBlock%20ifNone%3A%20anotherBlock%0A%09%5Eelements%20detect%3A%20aBlock%20ifNone%3A%20anotherBlock'),
  8402. messageSends: ["detect:ifNone:"],
  8403. referencedClasses: []
  8404. }),
  8405. smalltalk.Set);
  8406. smalltalk.addMethod(
  8407. unescape('_do_'),
  8408. smalltalk.method({
  8409. selector: unescape('do%3A'),
  8410. category: 'enumerating',
  8411. fn: function (aBlock){
  8412. var self=this;
  8413. smalltalk.send(self['@elements'], "_do_", [aBlock]);
  8414. return self;},
  8415. args: ["aBlock"],
  8416. source: unescape('do%3A%20aBlock%0A%09elements%20do%3A%20aBlock'),
  8417. messageSends: ["do:"],
  8418. referencedClasses: []
  8419. }),
  8420. smalltalk.Set);
  8421. smalltalk.addMethod(
  8422. unescape('_includes_'),
  8423. smalltalk.method({
  8424. selector: unescape('includes%3A'),
  8425. category: 'testing',
  8426. fn: function (anObject){
  8427. var self=this;
  8428. return smalltalk.send(self['@elements'], "_includes_", [anObject]);
  8429. return self;},
  8430. args: ["anObject"],
  8431. source: unescape('includes%3A%20anObject%0A%09%5Eelements%20includes%3A%20anObject'),
  8432. messageSends: ["includes:"],
  8433. referencedClasses: []
  8434. }),
  8435. smalltalk.Set);
  8436. smalltalk.addMethod(
  8437. unescape('__eq'),
  8438. smalltalk.method({
  8439. selector: unescape('%3D'),
  8440. category: 'comparing',
  8441. fn: function (aCollection){
  8442. var self=this;
  8443. 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", [])]);})]);
  8444. return self;},
  8445. args: ["aCollection"],
  8446. source: unescape('%3D%20aCollection%0A%09%5Eself%20class%20%3D%20aCollection%20class%20and%3A%20%5B%0A%20%20%20%20%20%20%20%20%09elements%20%3D%20aCollection%20asArray%5D'),
  8447. messageSends: ["and:", unescape("%3D"), "class", "asArray"],
  8448. referencedClasses: []
  8449. }),
  8450. smalltalk.Set);
  8451. smalltalk.addClass('Transcript', smalltalk.Object, ['textarea'], 'Kernel');
  8452. smalltalk.Transcript.klass.iVarNames = ['current'];
  8453. smalltalk.addMethod(
  8454. unescape('_open'),
  8455. smalltalk.method({
  8456. selector: unescape('open'),
  8457. category: 'instance creation',
  8458. fn: function (){
  8459. var self=this;
  8460. smalltalk.send(smalltalk.send(self, "_current", []), "_open", []);
  8461. return self;},
  8462. args: [],
  8463. source: unescape('open%0A%20%20%20%20self%20current%20open'),
  8464. messageSends: ["open", "current"],
  8465. referencedClasses: []
  8466. }),
  8467. smalltalk.Transcript.klass);
  8468. smalltalk.addMethod(
  8469. unescape('_new'),
  8470. smalltalk.method({
  8471. selector: unescape('new'),
  8472. category: 'instance creation',
  8473. fn: function (){
  8474. var self=this;
  8475. smalltalk.send(self, "_shouldNotImplement", []);
  8476. return self;},
  8477. args: [],
  8478. source: unescape('new%0A%20%20%20%20self%20shouldNotImplement'),
  8479. messageSends: ["shouldNotImplement"],
  8480. referencedClasses: []
  8481. }),
  8482. smalltalk.Transcript.klass);
  8483. smalltalk.addMethod(
  8484. unescape('_current'),
  8485. smalltalk.method({
  8486. selector: unescape('current'),
  8487. category: 'instance creation',
  8488. fn: function (){
  8489. var self=this;
  8490. return self['@current'];
  8491. return self;},
  8492. args: [],
  8493. source: unescape('current%0A%20%20%20%20%5Ecurrent'),
  8494. messageSends: [],
  8495. referencedClasses: []
  8496. }),
  8497. smalltalk.Transcript.klass);
  8498. smalltalk.addMethod(
  8499. unescape('_show_'),
  8500. smalltalk.method({
  8501. selector: unescape('show%3A'),
  8502. category: 'printing',
  8503. fn: function (anObject){
  8504. var self=this;
  8505. smalltalk.send(smalltalk.send(self, "_current", []), "_show_", [anObject]);
  8506. return self;},
  8507. args: ["anObject"],
  8508. source: unescape('show%3A%20anObject%0A%20%20%20%20self%20current%20show%3A%20anObject'),
  8509. messageSends: ["show:", "current"],
  8510. referencedClasses: []
  8511. }),
  8512. smalltalk.Transcript.klass);
  8513. smalltalk.addMethod(
  8514. unescape('_cr'),
  8515. smalltalk.method({
  8516. selector: unescape('cr'),
  8517. category: 'printing',
  8518. fn: function (){
  8519. var self=this;
  8520. smalltalk.send(smalltalk.send(self, "_current", []), "_show_", [smalltalk.send((smalltalk.String || String), "_cr", [])]);
  8521. return self;},
  8522. args: [],
  8523. source: unescape('cr%0A%20%20%20%20self%20current%20show%3A%20String%20cr'),
  8524. messageSends: ["show:", "current", "cr"],
  8525. referencedClasses: ["String"]
  8526. }),
  8527. smalltalk.Transcript.klass);
  8528. smalltalk.addMethod(
  8529. unescape('_clear'),
  8530. smalltalk.method({
  8531. selector: unescape('clear'),
  8532. category: 'printing',
  8533. fn: function (){
  8534. var self=this;
  8535. smalltalk.send(smalltalk.send(self, "_current", []), "_clear", []);
  8536. return self;},
  8537. args: [],
  8538. source: unescape('clear%0A%20%20%20%20self%20current%20clear'),
  8539. messageSends: ["clear", "current"],
  8540. referencedClasses: []
  8541. }),
  8542. smalltalk.Transcript.klass);
  8543. smalltalk.addMethod(
  8544. unescape('_register_'),
  8545. smalltalk.method({
  8546. selector: unescape('register%3A'),
  8547. category: 'instance creation',
  8548. fn: function (aTranscript){
  8549. var self=this;
  8550. self['@current']=aTranscript;
  8551. return self;},
  8552. args: ["aTranscript"],
  8553. source: unescape('register%3A%20aTranscript%0A%09current%20%3A%3D%20aTranscript'),
  8554. messageSends: [],
  8555. referencedClasses: []
  8556. }),
  8557. smalltalk.Transcript.klass);
  8558. smalltalk.addClass('ConsoleTranscript', smalltalk.Object, ['textarea'], 'Kernel');
  8559. smalltalk.addMethod(
  8560. unescape('_clear'),
  8561. smalltalk.method({
  8562. selector: unescape('clear'),
  8563. category: 'printing',
  8564. fn: function (){
  8565. var self=this;
  8566. return self;},
  8567. args: [],
  8568. source: unescape('clear%0A%09%22no%20op%22'),
  8569. messageSends: [],
  8570. referencedClasses: []
  8571. }),
  8572. smalltalk.ConsoleTranscript);
  8573. smalltalk.addMethod(
  8574. unescape('_cr'),
  8575. smalltalk.method({
  8576. selector: unescape('cr'),
  8577. category: 'printing',
  8578. fn: function (){
  8579. var self=this;
  8580. return self;},
  8581. args: [],
  8582. source: unescape('cr%0A%09%22no%20op%22'),
  8583. messageSends: [],
  8584. referencedClasses: []
  8585. }),
  8586. smalltalk.ConsoleTranscript);
  8587. smalltalk.addMethod(
  8588. unescape('_show_'),
  8589. smalltalk.method({
  8590. selector: unescape('show%3A'),
  8591. category: 'printing',
  8592. fn: function (anObject){
  8593. var self=this;
  8594. var string=nil;
  8595. string=smalltalk.send(anObject, "_asString", []);
  8596. console.log(String(string));
  8597. return self;},
  8598. args: ["anObject"],
  8599. 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'),
  8600. messageSends: ["asString"],
  8601. referencedClasses: []
  8602. }),
  8603. smalltalk.ConsoleTranscript);
  8604. smalltalk.addMethod(
  8605. unescape('_open'),
  8606. smalltalk.method({
  8607. selector: unescape('open'),
  8608. category: 'actions',
  8609. fn: function (){
  8610. var self=this;
  8611. return self;},
  8612. args: [],
  8613. source: unescape('open'),
  8614. messageSends: [],
  8615. referencedClasses: []
  8616. }),
  8617. smalltalk.ConsoleTranscript);
  8618. smalltalk.addMethod(
  8619. unescape('_initialize'),
  8620. smalltalk.method({
  8621. selector: unescape('initialize'),
  8622. category: 'initialization',
  8623. fn: function (){
  8624. var self=this;
  8625. smalltalk.send((smalltalk.Transcript || Transcript), "_register_", [smalltalk.send(self, "_new", [])]);
  8626. return self;},
  8627. args: [],
  8628. source: unescape('initialize%0A%09Transcript%20register%3A%20self%20new'),
  8629. messageSends: ["register:", "new"],
  8630. referencedClasses: ["Transcript"]
  8631. }),
  8632. smalltalk.ConsoleTranscript.klass);