Kernel.js 218 KB

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