1
0

Kernel.js 253 KB

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