Kernel.js 222 KB

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