Kernel.js 251 KB

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