123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257 |
- define(["amber/boot", "require", "amber/core/Kernel-Helpers"], function($boot,requirejs){"use strict";
- var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.asReceiver,$globals=$boot.globals;
- var $pkg = $core.addPackage("Kernel-Objects");
- $pkg.transport = {"type":"amd","amdNamespace":"amber/core"};
- $core.addClass("ProtoObject", null, "Kernel-Objects");
- //>>excludeStart("ide", pragmas.excludeIdeData);
- $globals.ProtoObject.comment="I implement the basic behavior required for any object in Amber.\x0a\x0aIn most cases, subclassing `ProtoObject` is wrong and `Object` should be used instead. However subclassing `ProtoObject` can be useful in some special cases like proxy implementations.";
- //>>excludeEnd("ide");
- $core.addMethod(
- $core.method({
- selector: "=",
- protocol: "comparing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["anObject"],
- source: "= anObject\x0a\x09^ self == anObject",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["=="]
- }, function ($methodClass){ return function (anObject){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $self.__eq_eq(anObject);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"=",{anObject:anObject})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.ProtoObject);
- $core.addMethod(
- $core.method({
- selector: "==",
- protocol: "comparing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["anObject"],
- source: "== anObject\x0a<inlineJS: 'return self === anObject'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return self === anObject"]]],
- messageSends: []
- }, function ($methodClass){ return function (anObject){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return self === anObject;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"==",{anObject:anObject})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.ProtoObject);
- $core.addMethod(
- $core.method({
- selector: "asString",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "asString\x0a\x09^ self printString",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["printString"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $self._printString();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"asString",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.ProtoObject);
- $core.addMethod(
- $core.method({
- selector: "class",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "class\x0a\x09<inlineJS: 'return $self.a$cls'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return $self.a$cls"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $self.a$cls;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"class",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.ProtoObject);
- $core.addMethod(
- $core.method({
- selector: "doesNotUnderstand:",
- protocol: "error handling",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aMessage"],
- source: "doesNotUnderstand: aMessage\x0a\x09MessageNotUnderstood new\x0a\x09\x09receiver: self;\x0a\x09\x09message: aMessage;\x0a\x09\x09signal",
- referencedClasses: ["MessageNotUnderstood"],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["receiver:", "new", "message:", "signal"]
- }, function ($methodClass){ return function (aMessage){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- var $1;
- $1=$recv($globals.MessageNotUnderstood)._new();
- $recv($1)._receiver_(self);
- $recv($1)._message_(aMessage);
- $recv($1)._signal();
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"doesNotUnderstand:",{aMessage:aMessage})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.ProtoObject);
- $core.addMethod(
- $core.method({
- selector: "evaluate:on:",
- protocol: "evaluating",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aString", "anEvaluator"],
- source: "evaluate: aString on: anEvaluator\x0a\x09^ anEvaluator evaluate: aString receiver: self",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["evaluate:receiver:"]
- }, function ($methodClass){ return function (aString,anEvaluator){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv(anEvaluator)._evaluate_receiver_(aString,self);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"evaluate:on:",{aString:aString,anEvaluator:anEvaluator})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.ProtoObject);
- $core.addMethod(
- $core.method({
- selector: "identityHash",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "identityHash\x0a\x09<inlineJS: '\x0a\x09\x09self._deprecatedAPI();\x0a\x09\x09var hash=self.identityHash;\x0a\x09\x09if (hash) return hash;\x0a\x09\x09hash=$core.nextId();\x0a\x09\x09Object.defineProperty(self, ''identityHash'', {value:hash});\x0a\x09\x09return hash;\x0a\x09'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["\x0a\x09\x09self._deprecatedAPI();\x0a\x09\x09var hash=self.identityHash;\x0a\x09\x09if (hash) return hash;\x0a\x09\x09hash=$core.nextId();\x0a\x09\x09Object.defineProperty(self, 'identityHash', {value:hash});\x0a\x09\x09return hash;\x0a\x09"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- self._deprecatedAPI();
- var hash=self.identityHash;
- if (hash) return hash;
- hash=$core.nextId();
- Object.defineProperty(self, 'identityHash', {value:hash});
- return hash;
- ;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"identityHash",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.ProtoObject);
- $core.addMethod(
- $core.method({
- selector: "ifNil:",
- protocol: "testing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aBlock"],
- source: "ifNil: aBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^ self",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (aBlock){
- var self=this,$self=this;
- return self;
- }; }),
- $globals.ProtoObject);
- $core.addMethod(
- $core.method({
- selector: "ifNil:ifNotNil:",
- protocol: "testing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aBlock", "anotherBlock"],
- source: "ifNil: aBlock ifNotNil: anotherBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^ anotherBlock value: self",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["value:"]
- }, function ($methodClass){ return function (aBlock,anotherBlock){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv(anotherBlock)._value_(self);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"ifNil:ifNotNil:",{aBlock:aBlock,anotherBlock:anotherBlock})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.ProtoObject);
- $core.addMethod(
- $core.method({
- selector: "ifNotNil:",
- protocol: "testing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aBlock"],
- source: "ifNotNil: aBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^ aBlock value: self",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["value:"]
- }, function ($methodClass){ return function (aBlock){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv(aBlock)._value_(self);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"ifNotNil:",{aBlock:aBlock})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.ProtoObject);
- $core.addMethod(
- $core.method({
- selector: "ifNotNil:ifNil:",
- protocol: "testing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aBlock", "anotherBlock"],
- source: "ifNotNil: aBlock ifNil: anotherBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^ aBlock value: self",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["value:"]
- }, function ($methodClass){ return function (aBlock,anotherBlock){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv(aBlock)._value_(self);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"ifNotNil:ifNil:",{aBlock:aBlock,anotherBlock:anotherBlock})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.ProtoObject);
- $core.addMethod(
- $core.method({
- selector: "initialize",
- protocol: "initialization",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "initialize",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return self;
- }; }),
- $globals.ProtoObject);
- $core.addMethod(
- $core.method({
- selector: "inspect",
- protocol: "inspecting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "inspect\x0a\x09Inspector inspect: self",
- referencedClasses: ["Inspector"],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["inspect:"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $recv($globals.Inspector)._inspect_(self);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"inspect",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.ProtoObject);
- $core.addMethod(
- $core.method({
- selector: "inspectOn:",
- protocol: "inspecting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["anInspector"],
- source: "inspectOn: anInspector",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (anInspector){
- var self=this,$self=this;
- return self;
- }; }),
- $globals.ProtoObject);
- $core.addMethod(
- $core.method({
- selector: "instVarNamed:",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aString"],
- source: "instVarNamed: aString\x0a\x09<inlineJS: 'return $self[aString]'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return $self[aString]"]]],
- messageSends: []
- }, function ($methodClass){ return function (aString){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $self[aString];
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"instVarNamed:",{aString:aString})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.ProtoObject);
- $core.addMethod(
- $core.method({
- selector: "instVarNamed:put:",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aString", "anObject"],
- source: "instVarNamed: aString put: anObject\x0a\x09<inlineJS: '$self[aString] = anObject'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["$self[aString] = anObject"]]],
- messageSends: []
- }, function ($methodClass){ return function (aString,anObject){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $self[aString] = anObject;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"instVarNamed:put:",{aString:aString,anObject:anObject})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.ProtoObject);
- $core.addMethod(
- $core.method({
- selector: "isKindOf:",
- protocol: "testing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aClass"],
- source: "isKindOf: aClass\x0a\x09^ (self isMemberOf: aClass) or: [ self class inheritsFrom: aClass ]",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["or:", "isMemberOf:", "inheritsFrom:", "class"]
- }, function ($methodClass){ return function (aClass){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- if($core.assert($self._isMemberOf_(aClass))){
- return true;
- } else {
- return $recv($self._class())._inheritsFrom_(aClass);
- }
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"isKindOf:",{aClass:aClass})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.ProtoObject);
- $core.addMethod(
- $core.method({
- selector: "isNil",
- protocol: "testing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "isNil\x0a\x09^ false",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return false;
- }; }),
- $globals.ProtoObject);
- $core.addMethod(
- $core.method({
- selector: "notNil",
- protocol: "testing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "notNil\x0a\x09^ true",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return true;
- }; }),
- $globals.ProtoObject);
- $core.addMethod(
- $core.method({
- selector: "perform:",
- protocol: "message handling",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aString"],
- source: "perform: aString\x0a\x09^ self perform: aString withArguments: #()",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["perform:withArguments:"]
- }, function ($methodClass){ return function (aString){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $self._perform_withArguments_(aString,[]);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"perform:",{aString:aString})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.ProtoObject);
- $core.addMethod(
- $core.method({
- selector: "perform:with:",
- protocol: "message handling",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aString", "anObject"],
- source: "perform: aString with: anObject\x0a\x09<inlineJS: 'return $core.send2(self, aString, [anObject])'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return $core.send2(self, aString, [anObject])"]]],
- messageSends: []
- }, function ($methodClass){ return function (aString,anObject){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $core.send2(self, aString, [anObject]);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"perform:with:",{aString:aString,anObject:anObject})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.ProtoObject);
- $core.addMethod(
- $core.method({
- selector: "perform:withArguments:",
- protocol: "message handling",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aString", "aCollection"],
- source: "perform: aString withArguments: aCollection\x0a\x09<inlineJS: 'return $core.send2(self, aString, aCollection)'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return $core.send2(self, aString, aCollection)"]]],
- messageSends: []
- }, function ($methodClass){ return function (aString,aCollection){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $core.send2(self, aString, aCollection);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"perform:withArguments:",{aString:aString,aCollection:aCollection})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.ProtoObject);
- $core.addMethod(
- $core.method({
- selector: "printOn:",
- protocol: "printing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aStream"],
- source: "printOn: aStream\x0a\x09aStream nextPutAll: (self class name first isVowel\x0a\x09\x09ifTrue: [ 'an ' ]\x0a\x09\x09ifFalse: [ 'a ' ]).\x0a\x09aStream nextPutAll: self class name",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["nextPutAll:", "ifTrue:ifFalse:", "isVowel", "first", "name", "class"]
- }, function ($methodClass){ return function (aStream){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- var $1;
- if($core.assert($recv($recv([$recv([$self._class()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["class"]=1
- //>>excludeEnd("ctx");
- ][0])._name()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["name"]=1
- //>>excludeEnd("ctx");
- ][0])._first())._isVowel())){
- $1="an ";
- } else {
- $1="a ";
- }
- [$recv(aStream)._nextPutAll_($1)
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["nextPutAll:"]=1
- //>>excludeEnd("ctx");
- ][0];
- $recv(aStream)._nextPutAll_($recv($self._class())._name());
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.ProtoObject);
- $core.addMethod(
- $core.method({
- selector: "printString",
- protocol: "printing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "printString\x0a\x09^ String streamContents: [ :str | \x0a\x09\x09self printOn: str ]",
- referencedClasses: ["String"],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["streamContents:", "printOn:"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($globals.String)._streamContents_((function(str){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- return $self._printOn_(str);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({str:str},$ctx1,1)});
- //>>excludeEnd("ctx");
- }));
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"printString",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.ProtoObject);
- $core.addMethod(
- $core.method({
- selector: "yourself",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "yourself\x0a\x09^ self",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return self;
- }; }),
- $globals.ProtoObject);
- $core.addMethod(
- $core.method({
- selector: "~=",
- protocol: "comparing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["anObject"],
- source: "~= anObject\x0a\x09^ (self = anObject) = false",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["="]
- }, function ($methodClass){ return function (anObject){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return [$recv($self.__eq(anObject)).__eq(false)
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["="]=1
- //>>excludeEnd("ctx");
- ][0];
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"~=",{anObject:anObject})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.ProtoObject);
- $core.addMethod(
- $core.method({
- selector: "~~",
- protocol: "comparing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["anObject"],
- source: "~~ anObject\x0a\x09^ (self == anObject) = false",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["=", "=="]
- }, function ($methodClass){ return function (anObject){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($self.__eq_eq(anObject)).__eq(false);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"~~",{anObject:anObject})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.ProtoObject);
- $core.addMethod(
- $core.method({
- selector: "initialize",
- protocol: "initialization",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "initialize",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return self;
- }; }),
- $globals.ProtoObject.a$cls);
- $core.addClass("Object", $globals.ProtoObject, "Kernel-Objects");
- //>>excludeStart("ide", pragmas.excludeIdeData);
- $globals.Object.comment="**I am the root of the Smalltalk class system**. With the exception of unual subclasses of `ProtoObject`, all other classes in the system are subclasses of me.\x0a\x0aI provide default behavior common to all normal objects (some of it inherited from `ProtoObject`), such as:\x0a\x0a- accessing\x0a- copying\x0a- comparison\x0a- error handling\x0a- message sending\x0a- reflection\x0a\x0aAlso utility messages that all objects should respond to are defined here.\x0a\x0aI have no instance variable.\x0a\x0a##Access\x0a\x0aInstance variables can be accessed with `#instVarAt:` and `#instVarAt:put:`. `#instanceVariableNames` answers a collection of all instance variable names.\x0aAccessing JavaScript properties of an object is done through `#basicAt:`, `#basicAt:put:` and `basicDelete:`.\x0a\x0a##Copying\x0a\x0aCopying an object is handled by `#copy` and `#deepCopy`. The first one performs a shallow copy of the receiver, while the second one performs a deep copy.\x0aThe hook method `#postCopy` can be overriden in subclasses to copy fields as necessary to complete the full copy. It will be sent by the copy of the receiver.\x0a\x0a##Comparison\x0a\x0aI understand equality `#=` and identity `#==` comparison.\x0a\x0a##Error handling\x0a\x0a- `#halt` is the typical message to use for inserting breakpoints during debugging.\x0a- `#error:` throws a generic error exception\x0a- `#doesNotUnderstand:` handles the fact that there was an attempt to send the given message to the receiver but the receiver does not understand this message.\x0a\x09Overriding this message can be useful to implement proxies for example.";
- //>>excludeEnd("ide");
- $core.addMethod(
- $core.method({
- selector: "->",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["anObject"],
- source: "-> anObject\x0a\x09^ Association key: self value: anObject",
- referencedClasses: ["Association"],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["key:value:"]
- }, function ($methodClass){ return function (anObject){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($globals.Association)._key_value_(self,anObject);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"->",{anObject:anObject})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "andSelfToNumber:",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "andSelfToNumber: aNumber\x0a\x09self error: 'I am not a number.'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["error:"]
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $self._error_("I am not a number.");
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"andSelfToNumber:",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "appendToString:",
- protocol: "copying",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aString"],
- source: "appendToString: aString\x0a\x09self error: 'Cannot add self to a string.'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["error:"]
- }, function ($methodClass){ return function (aString){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $self._error_("Cannot add self to a string.");
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"appendToString:",{aString:aString})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "asJSONString",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "asJSONString\x0a\x09^ JSON stringify: self asJavaScriptObject",
- referencedClasses: ["JSON"],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["stringify:", "asJavaScriptObject"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($globals.JSON)._stringify_($self._asJavaScriptObject());
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"asJSONString",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "asJavaScriptObject",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "asJavaScriptObject\x0a\x09| variables |\x0a\x09self deprecatedAPI: 'Implement domain-specific #asJavaScriptObject on your classes instead.'.\x0a\x09variables := HashedCollection new.\x0a\x09self class allInstanceVariableNames do: [ :each |\x0a\x09\x09variables at: each put: (self instVarNamed: each) asJavaScriptObject ].\x0a\x09^ variables",
- referencedClasses: ["HashedCollection"],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["deprecatedAPI:", "new", "do:", "allInstanceVariableNames", "class", "at:put:", "asJavaScriptObject", "instVarNamed:"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- var variables;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $self._deprecatedAPI_("Implement domain-specific #asJavaScriptObject on your classes instead.");
- variables=$recv($globals.HashedCollection)._new();
- $recv($recv($self._class())._allInstanceVariableNames())._do_((function(each){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- return $recv(variables)._at_put_(each,$recv($self._instVarNamed_(each))._asJavaScriptObject());
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
- //>>excludeEnd("ctx");
- }));
- return variables;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"asJavaScriptObject",{variables:variables})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "asJavaScriptSource",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "asJavaScriptSource\x0a\x09self deprecatedAPI: 'Implement domain-specific #asJavaScriptSource on your classes instead.'.\x0a\x09^ self asString",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["deprecatedAPI:", "asString"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $self._deprecatedAPI_("Implement domain-specific #asJavaScriptSource on your classes instead.");
- return $self._asString();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"asJavaScriptSource",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "basicAt:",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aString"],
- source: "basicAt: aString\x0a\x09<inlineJS: 'return self[aString]'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return self[aString]"]]],
- messageSends: []
- }, function ($methodClass){ return function (aString){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return self[aString];
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"basicAt:",{aString:aString})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "basicAt:put:",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aString", "anObject"],
- source: "basicAt: aString put: anObject\x0a\x09<inlineJS: 'return self[aString] = anObject'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return self[aString] = anObject"]]],
- messageSends: []
- }, function ($methodClass){ return function (aString,anObject){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return self[aString] = anObject;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"basicAt:put:",{aString:aString,anObject:anObject})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "basicDelete:",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aString"],
- source: "basicDelete: aString\x0a\x09<inlineJS: 'delete self[aString]; return aString'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["delete self[aString]; return aString"]]],
- messageSends: []
- }, function ($methodClass){ return function (aString){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- delete self[aString]; return aString;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"basicDelete:",{aString:aString})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "basicPerform:",
- protocol: "message handling",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aString"],
- source: "basicPerform: aString\x0a\x09^ self basicPerform: aString withArguments: #()",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["basicPerform:withArguments:"]
- }, function ($methodClass){ return function (aString){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $self._basicPerform_withArguments_(aString,[]);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"basicPerform:",{aString:aString})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "basicPerform:withArguments:",
- protocol: "message handling",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aString", "aCollection"],
- source: "basicPerform: aString withArguments: aCollection\x0a\x09<inlineJS: 'return self[aString].apply(self, aCollection);'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return self[aString].apply(self, aCollection);"]]],
- messageSends: []
- }, function ($methodClass){ return function (aString,aCollection){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return self[aString].apply(self, aCollection);;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"basicPerform:withArguments:",{aString:aString,aCollection:aCollection})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "browse",
- protocol: "browsing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "browse\x0a\x09Finder findClass: self class",
- referencedClasses: ["Finder"],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["findClass:", "class"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $recv($globals.Finder)._findClass_($self._class());
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"browse",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "copy",
- protocol: "copying",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "copy\x0a\x09^ self shallowCopy postCopy",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["postCopy", "shallowCopy"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($self._shallowCopy())._postCopy();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"copy",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "deepCopy",
- protocol: "copying",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "deepCopy\x0a\x09<inlineJS: '\x0a\x09\x09var copy = self.a$cls._new();\x0a\x09\x09Object.keys(self).forEach(function (i) {\x0a\x09\x09\x09copy[i] = $recv(self[i])._deepCopy();\x0a\x09\x09});\x0a\x09\x09return copy;\x0a\x09'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["\x0a\x09\x09var copy = self.a$cls._new();\x0a\x09\x09Object.keys(self).forEach(function (i) {\x0a\x09\x09\x09copy[i] = $recv(self[i])._deepCopy();\x0a\x09\x09});\x0a\x09\x09return copy;\x0a\x09"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- var copy = self.a$cls._new();
- Object.keys(self).forEach(function (i) {
- copy[i] = $recv(self[i])._deepCopy();
- });
- return copy;
- ;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"deepCopy",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "deprecatedAPI",
- protocol: "error handling",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "deprecatedAPI\x0a\x09\x22Just a simple way to deprecate methods.\x0a\x09#deprecatedAPI is in the 'error handling' protocol even if it doesn't throw an error,\x0a\x09but it could in the future.\x22\x0a\x09console warn: thisContext home asString, ' is deprecated! (in ', thisContext home home asString, ')'.",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["warn:", ",", "asString", "home"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $recv(console)._warn_([$recv([$recv($recv([$recv([$core.getThisContext()._home()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["home"]=1
- //>>excludeEnd("ctx");
- ][0])._asString()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["asString"]=1
- //>>excludeEnd("ctx");
- ][0]).__comma(" is deprecated! (in ")).__comma($recv([$recv($core.getThisContext()._home())._home()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["home"]=2
- //>>excludeEnd("ctx");
- ][0])._asString())
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx[","]=2
- //>>excludeEnd("ctx");
- ][0]).__comma(")")
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx[","]=1
- //>>excludeEnd("ctx");
- ][0]);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"deprecatedAPI",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "deprecatedAPI:",
- protocol: "error handling",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aString"],
- source: "deprecatedAPI: aString\x0a\x09\x22Just a simple way to deprecate methods.\x0a\x09#deprecatedAPI is in the 'error handling' protocol even if it doesn't throw an error,\x0a\x09but it could in the future.\x22\x0a\x09console warn: thisContext home asString, ' is deprecated! (in ', thisContext home home asString, ')'.\x0a\x09console warn: aString",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["warn:", ",", "asString", "home"]
- }, function ($methodClass){ return function (aString){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- [$recv(console)._warn_([$recv([$recv($recv([$recv([$core.getThisContext()._home()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["home"]=1
- //>>excludeEnd("ctx");
- ][0])._asString()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["asString"]=1
- //>>excludeEnd("ctx");
- ][0]).__comma(" is deprecated! (in ")).__comma($recv([$recv($core.getThisContext()._home())._home()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["home"]=2
- //>>excludeEnd("ctx");
- ][0])._asString())
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx[","]=2
- //>>excludeEnd("ctx");
- ][0]).__comma(")")
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx[","]=1
- //>>excludeEnd("ctx");
- ][0])
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["warn:"]=1
- //>>excludeEnd("ctx");
- ][0];
- $recv(console)._warn_(aString);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"deprecatedAPI:",{aString:aString})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "divideBySelfToNumber:",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "divideBySelfToNumber: aNumber\x0a\x09self error: 'I am not a number.'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["error:"]
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $self._error_("I am not a number.");
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"divideBySelfToNumber:",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "divisionRemainderBySelfToNumber:",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "divisionRemainderBySelfToNumber: aNumber\x0a\x09self error: 'I am not a number.'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["error:"]
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $self._error_("I am not a number.");
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"divisionRemainderBySelfToNumber:",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "error:",
- protocol: "error handling",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aString"],
- source: "error: aString\x0a\x09Error signal: aString",
- referencedClasses: ["Error"],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["signal:"]
- }, function ($methodClass){ return function (aString){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $recv($globals.Error)._signal_(aString);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"error:",{aString:aString})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "halt",
- protocol: "error handling",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "halt\x0a\x09Halt signal",
- referencedClasses: ["Halt"],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["signal"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $recv($globals.Halt)._signal();
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"halt",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "in:",
- protocol: "evaluating",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aValuable"],
- source: "in: aValuable\x0a\x09^ aValuable value: self",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["value:"]
- }, function ($methodClass){ return function (aValuable){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv(aValuable)._value_(self);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"in:",{aValuable:aValuable})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "isImmutable",
- protocol: "testing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "isImmutable\x0a\x09^ false",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return false;
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "isMemberOf:",
- protocol: "testing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aClass"],
- source: "isMemberOf: aClass\x0a\x09^ self class = aClass",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["=", "class"]
- }, function ($methodClass){ return function (aClass){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($self._class()).__eq(aClass);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"isMemberOf:",{aClass:aClass})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "isNumberEqualToSelf:",
- protocol: "comparing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "isNumberEqualToSelf: aNumber\x0a\x09^ false",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- return false;
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "isNumberGreaterThanOrEqualToSelf:",
- protocol: "comparing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "isNumberGreaterThanOrEqualToSelf: aNumber\x0a\x09^ false",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- return false;
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "isNumberGreaterThanSelf:",
- protocol: "comparing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "isNumberGreaterThanSelf: aNumber\x0a\x09^ false",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- return false;
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "isNumberLessThanOrEqualToSelf:",
- protocol: "comparing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "isNumberLessThanOrEqualToSelf: aNumber\x0a\x09^ false",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- return false;
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "isNumberLessThanSelf:",
- protocol: "comparing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "isNumberLessThanSelf: aNumber\x0a\x09^ false",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- return false;
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "isParseFailure",
- protocol: "testing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "isParseFailure\x0a\x09^ false",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return false;
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "isStringEqualToSelf:",
- protocol: "comparing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aString"],
- source: "isStringEqualToSelf: aString\x0a\x09^ false",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (aString){
- var self=this,$self=this;
- return false;
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "isStringGreaterThanOrEqualToSelf:",
- protocol: "comparing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aString"],
- source: "isStringGreaterThanOrEqualToSelf: aString\x0a\x09^ false",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (aString){
- var self=this,$self=this;
- return false;
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "isStringGreaterThanSelf:",
- protocol: "comparing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aString"],
- source: "isStringGreaterThanSelf: aString\x0a\x09^ false",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (aString){
- var self=this,$self=this;
- return false;
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "isStringLessThanOrEqualToSelf:",
- protocol: "comparing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aString"],
- source: "isStringLessThanOrEqualToSelf: aString\x0a\x09^ false",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (aString){
- var self=this,$self=this;
- return false;
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "isStringLessThanSelf:",
- protocol: "comparing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aString"],
- source: "isStringLessThanSelf: aString\x0a\x09^ false",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (aString){
- var self=this,$self=this;
- return false;
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "minusSelfToNumber:",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "minusSelfToNumber: aNumber\x0a\x09self error: 'I am not a number.'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["error:"]
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $self._error_("I am not a number.");
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"minusSelfToNumber:",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "orSelfToNumber:",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "orSelfToNumber: aNumber\x0a\x09self error: 'I am not a number.'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["error:"]
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $self._error_("I am not a number.");
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"orSelfToNumber:",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "plusSelfToNumber:",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "plusSelfToNumber: aNumber\x0a\x09self error: 'I am not a number.'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["error:"]
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $self._error_("I am not a number.");
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"plusSelfToNumber:",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "postCopy",
- protocol: "copying",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "postCopy",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return self;
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "putOn:",
- protocol: "streaming",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aStream"],
- source: "putOn: aStream\x0a\x09aStream nextPut: self",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["nextPut:"]
- }, function ($methodClass){ return function (aStream){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $recv(aStream)._nextPut_(self);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"putOn:",{aStream:aStream})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "respondsTo:",
- protocol: "testing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aSelector"],
- source: "respondsTo: aSelector\x0a\x09^ self class canUnderstand: aSelector",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["canUnderstand:", "class"]
- }, function ($methodClass){ return function (aSelector){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($self._class())._canUnderstand_(aSelector);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"respondsTo:",{aSelector:aSelector})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "shallowCopy",
- protocol: "copying",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "shallowCopy\x0a\x09<inlineJS: '\x0a\x09\x09var copy = self.a$cls._new();\x0a\x09\x09Object.keys(self).forEach(function(i) {\x0a\x09\x09\x09copy[i] = self[i];\x0a\x09\x09});\x0a\x09\x09return copy;\x0a\x09'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["\x0a\x09\x09var copy = self.a$cls._new();\x0a\x09\x09Object.keys(self).forEach(function(i) {\x0a\x09\x09\x09copy[i] = self[i];\x0a\x09\x09});\x0a\x09\x09return copy;\x0a\x09"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- var copy = self.a$cls._new();
- Object.keys(self).forEach(function(i) {
- copy[i] = self[i];
- });
- return copy;
- ;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"shallowCopy",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "shouldNotImplement",
- protocol: "error handling",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "shouldNotImplement\x0a\x09self error: 'This method should not be implemented in ', self class name",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["error:", ",", "name", "class"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $self._error_("This method should not be implemented in ".__comma($recv($self._class())._name()));
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"shouldNotImplement",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "size",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "size\x0a\x09self error: 'Object not indexable'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["error:"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $self._error_("Object not indexable");
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"size",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "subclassResponsibility",
- protocol: "error handling",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "subclassResponsibility\x0a\x09self error: 'This method is a responsibility of a subclass'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["error:"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $self._error_("This method is a responsibility of a subclass");
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"subclassResponsibility",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "timesSelfToNumber:",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "timesSelfToNumber: aNumber\x0a\x09self error: 'I am not a number.'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["error:"]
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $self._error_("I am not a number.");
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"timesSelfToNumber:",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "value",
- protocol: "evaluating",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "value\x0a\x09<inlineJS: 'return self.valueOf()'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return self.valueOf()"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return self.valueOf();
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"value",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "xorSelfToNumber:",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "xorSelfToNumber: aNumber\x0a\x09self error: 'I am not a number.'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["error:"]
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $self._error_("I am not a number.");
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"xorSelfToNumber:",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Object);
- $core.addMethod(
- $core.method({
- selector: "accessorProtocolWith:",
- protocol: "helios",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aGenerator"],
- source: "accessorProtocolWith: aGenerator\x0a\x09aGenerator accessorProtocolForObject",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["accessorProtocolForObject"]
- }, function ($methodClass){ return function (aGenerator){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $recv(aGenerator)._accessorProtocolForObject();
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"accessorProtocolWith:",{aGenerator:aGenerator})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Object.a$cls);
- $core.addMethod(
- $core.method({
- selector: "accessorsSourceCodesWith:",
- protocol: "helios",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aGenerator"],
- source: "accessorsSourceCodesWith: aGenerator\x0a\x09aGenerator accessorsForObject",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["accessorsForObject"]
- }, function ($methodClass){ return function (aGenerator){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $recv(aGenerator)._accessorsForObject();
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"accessorsSourceCodesWith:",{aGenerator:aGenerator})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Object.a$cls);
- $core.addMethod(
- $core.method({
- selector: "initialize",
- protocol: "initialization",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "initialize\x0a\x09\x22no op\x22",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return self;
- }; }),
- $globals.Object.a$cls);
- $core.addMethod(
- $core.method({
- selector: "initializeProtocolWith:",
- protocol: "helios",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aGenerator"],
- source: "initializeProtocolWith: aGenerator\x0a\x09aGenerator initializeProtocolForObject",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["initializeProtocolForObject"]
- }, function ($methodClass){ return function (aGenerator){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $recv(aGenerator)._initializeProtocolForObject();
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"initializeProtocolWith:",{aGenerator:aGenerator})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Object.a$cls);
- $core.addMethod(
- $core.method({
- selector: "initializeSourceCodesWith:",
- protocol: "helios",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aGenerator"],
- source: "initializeSourceCodesWith: aGenerator\x0a\x09aGenerator initializeForObject",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["initializeForObject"]
- }, function ($methodClass){ return function (aGenerator){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $recv(aGenerator)._initializeForObject();
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"initializeSourceCodesWith:",{aGenerator:aGenerator})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Object.a$cls);
- $core.addClass("Boolean", $globals.Object, "Kernel-Objects");
- //>>excludeStart("ide", pragmas.excludeIdeData);
- $globals.Boolean.comment="I define the protocol for logic testing operations and conditional control structures for the logical values (see the `controlling` protocol).\x0a\x0aI have two instances, `true` and `false`.\x0a\x0aI am directly mapped to JavaScript Boolean. The `true` and `false` objects are the JavaScript boolean objects.\x0a\x0a## Usage Example:\x0a\x0a aBoolean not ifTrue: [ ... ] ifFalse: [ ... ]";
- //>>excludeEnd("ide");
- $core.addMethod(
- $core.method({
- selector: "&",
- protocol: "controlling",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aBoolean"],
- source: "& aBoolean\x0a\x09<inlineJS: '\x0a\x09\x09if(self == true) {\x0a\x09\x09return aBoolean;\x0a\x09\x09} else {\x0a\x09\x09return false;\x0a\x09\x09}\x0a\x09'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["\x0a\x09\x09if(self == true) {\x0a\x09\x09return aBoolean;\x0a\x09\x09} else {\x0a\x09\x09return false;\x0a\x09\x09}\x0a\x09"]]],
- messageSends: []
- }, function ($methodClass){ return function (aBoolean){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- if(self == true) {
- return aBoolean;
- } else {
- return false;
- }
- ;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"&",{aBoolean:aBoolean})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Boolean);
- $core.addMethod(
- $core.method({
- selector: "==",
- protocol: "comparing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aBoolean"],
- source: "== aBoolean\x0a<inlineJS: '\x0a\x09if (typeof aBoolean === \x22boolean\x22) return (self == true) === aBoolean;\x0a\x09else if (aBoolean != null && typeof aBoolean === \x22object\x22) return (self == true) === aBoolean.valueOf();\x0a\x09else return false;\x0a'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["\x0a\x09if (typeof aBoolean === \x22boolean\x22) return (self == true) === aBoolean;\x0a\x09else if (aBoolean != null && typeof aBoolean === \x22object\x22) return (self == true) === aBoolean.valueOf();\x0a\x09else return false;"]]],
- messageSends: []
- }, function ($methodClass){ return function (aBoolean){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- if (typeof aBoolean === "boolean") return (self == true) === aBoolean;
- else if (aBoolean != null && typeof aBoolean === "object") return (self == true) === aBoolean.valueOf();
- else return false;;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"==",{aBoolean:aBoolean})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Boolean);
- $core.addMethod(
- $core.method({
- selector: "and:",
- protocol: "controlling",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aBlock"],
- source: "and: aBlock\x0a\x09^ self\x0a\x09\x09ifTrue: \x22aBlock\x22 [ aBlock value ]\x0a\x09\x09ifFalse: [ false ]",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["ifTrue:ifFalse:", "value"]
- }, function ($methodClass){ return function (aBlock){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- if($core.assert(self)){
- return $recv(aBlock)._value();
- } else {
- return false;
- }
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"and:",{aBlock:aBlock})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Boolean);
- $core.addMethod(
- $core.method({
- selector: "asBit",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "asBit\x0a\x09^ self ifTrue: [ 1 ] ifFalse: [ 0 ]",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["ifTrue:ifFalse:"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- if($core.assert(self)){
- return (1);
- } else {
- return (0);
- }
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"asBit",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Boolean);
- $core.addMethod(
- $core.method({
- selector: "asJavaScriptObject",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "asJavaScriptObject\x0a\x09^ self",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return self;
- }; }),
- $globals.Boolean);
- $core.addMethod(
- $core.method({
- selector: "asJavaScriptSource",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "asJavaScriptSource\x0a\x09^ self asString",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["asString"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $self._asString();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"asJavaScriptSource",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Boolean);
- $core.addMethod(
- $core.method({
- selector: "asString",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "asString\x0a\x09<inlineJS: 'return self.toString()'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return self.toString()"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return self.toString();
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"asString",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Boolean);
- $core.addMethod(
- $core.method({
- selector: "deepCopy",
- protocol: "copying",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "deepCopy\x0a\x09^ self",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return self;
- }; }),
- $globals.Boolean);
- $core.addMethod(
- $core.method({
- selector: "ifFalse:",
- protocol: "controlling",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aBlock"],
- source: "ifFalse: aBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^ self ifTrue: [] ifFalse: aBlock",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["ifTrue:ifFalse:"]
- }, function ($methodClass){ return function (aBlock){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $self._ifTrue_ifFalse_((function(){
- }),aBlock);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"ifFalse:",{aBlock:aBlock})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Boolean);
- $core.addMethod(
- $core.method({
- selector: "ifFalse:ifTrue:",
- protocol: "controlling",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aBlock", "anotherBlock"],
- source: "ifFalse: aBlock ifTrue: anotherBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^ self ifTrue: anotherBlock ifFalse: aBlock",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["ifTrue:ifFalse:"]
- }, function ($methodClass){ return function (aBlock,anotherBlock){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $self._ifTrue_ifFalse_(anotherBlock,aBlock);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"ifFalse:ifTrue:",{aBlock:aBlock,anotherBlock:anotherBlock})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Boolean);
- $core.addMethod(
- $core.method({
- selector: "ifTrue:",
- protocol: "controlling",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aBlock"],
- source: "ifTrue: aBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^ self ifTrue: aBlock ifFalse: []",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["ifTrue:ifFalse:"]
- }, function ($methodClass){ return function (aBlock){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $self._ifTrue_ifFalse_(aBlock,(function(){
- }));
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"ifTrue:",{aBlock:aBlock})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Boolean);
- $core.addMethod(
- $core.method({
- selector: "ifTrue:ifFalse:",
- protocol: "controlling",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aBlock", "anotherBlock"],
- source: "ifTrue: aBlock ifFalse: anotherBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09<inlineJS: '\x0a\x09\x09if(self == true) {\x0a\x09\x09return aBlock._value();\x0a\x09\x09} else {\x0a\x09\x09return anotherBlock._value();\x0a\x09\x09}\x0a\x09'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["\x0a\x09\x09if(self == true) {\x0a\x09\x09return aBlock._value();\x0a\x09\x09} else {\x0a\x09\x09return anotherBlock._value();\x0a\x09\x09}\x0a\x09"]]],
- messageSends: []
- }, function ($methodClass){ return function (aBlock,anotherBlock){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- if(self == true) {
- return aBlock._value();
- } else {
- return anotherBlock._value();
- }
- ;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"ifTrue:ifFalse:",{aBlock:aBlock,anotherBlock:anotherBlock})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Boolean);
- $core.addMethod(
- $core.method({
- selector: "isBoolean",
- protocol: "testing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "isBoolean\x0a\x09^ true",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return true;
- }; }),
- $globals.Boolean);
- $core.addMethod(
- $core.method({
- selector: "isImmutable",
- protocol: "testing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "isImmutable\x0a\x09^ true",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return true;
- }; }),
- $globals.Boolean);
- $core.addMethod(
- $core.method({
- selector: "not",
- protocol: "controlling",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "not\x0a\x09^ self = false",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["="]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $self.__eq(false);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"not",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Boolean);
- $core.addMethod(
- $core.method({
- selector: "or:",
- protocol: "controlling",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aBlock"],
- source: "or: aBlock\x0a\x09^ self\x0a\x09\x09ifTrue: [ true ]\x0a\x09\x09ifFalse: \x22aBlock\x22 [ aBlock value ]",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["ifTrue:ifFalse:", "value"]
- }, function ($methodClass){ return function (aBlock){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- if($core.assert(self)){
- return true;
- } else {
- return $recv(aBlock)._value();
- }
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"or:",{aBlock:aBlock})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Boolean);
- $core.addMethod(
- $core.method({
- selector: "printOn:",
- protocol: "printing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aStream"],
- source: "printOn: aStream\x0a\x09aStream nextPutAll: self asString",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["nextPutAll:", "asString"]
- }, function ($methodClass){ return function (aStream){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $recv(aStream)._nextPutAll_($self._asString());
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Boolean);
- $core.addMethod(
- $core.method({
- selector: "shallowCopy",
- protocol: "copying",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "shallowCopy\x0a\x09^ self",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return self;
- }; }),
- $globals.Boolean);
- $core.addMethod(
- $core.method({
- selector: "|",
- protocol: "controlling",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aBoolean"],
- source: "| aBoolean\x0a\x09<inlineJS: '\x0a\x09\x09if(self == true) {\x0a\x09\x09return true;\x0a\x09\x09} else {\x0a\x09\x09return aBoolean;\x0a\x09\x09}\x0a\x09'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["\x0a\x09\x09if(self == true) {\x0a\x09\x09return true;\x0a\x09\x09} else {\x0a\x09\x09return aBoolean;\x0a\x09\x09}\x0a\x09"]]],
- messageSends: []
- }, function ($methodClass){ return function (aBoolean){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- if(self == true) {
- return true;
- } else {
- return aBoolean;
- }
- ;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"|",{aBoolean:aBoolean})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Boolean);
- $core.addClass("Date", $globals.Object, "Kernel-Objects");
- //>>excludeStart("ide", pragmas.excludeIdeData);
- $globals.Date.comment="I am used to work with both dates and times. Therefore `Date today` and `Date now` are both valid in\x0aAmber and answer the same date object.\x0a\x0aDate directly maps to the `Date()` JavaScript constructor, and Amber date objects are JavaScript date objects.\x0a\x0a## API\x0a\x0aThe class-side `instance creation` protocol contains some convenience methods for creating date/time objects such as `#fromSeconds:`.\x0a\x0aArithmetic and comparison is supported (see the `comparing` and `arithmetic` protocols).\x0a\x0aThe `converting` protocol provides convenience methods for various convertions (to numbers, strings, etc.).";
- //>>excludeEnd("ide");
- $core.addMethod(
- $core.method({
- selector: "+",
- protocol: "arithmetic",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "+ aNumber\x0a\x09<inlineJS: 'return new Date($self.getTime() + aNumber)'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return new Date($self.getTime() + aNumber)"]]],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return new Date($self.getTime() + aNumber);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"+",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Date);
- $core.addMethod(
- $core.method({
- selector: "-",
- protocol: "arithmetic",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aDate"],
- source: "- aDate\x0a\x09<inlineJS: 'return self - aDate'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return self - aDate"]]],
- messageSends: []
- }, function ($methodClass){ return function (aDate){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return self - aDate;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"-",{aDate:aDate})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Date);
- $core.addMethod(
- $core.method({
- selector: "<",
- protocol: "comparing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aDate"],
- source: "< aDate\x0a\x09<inlineJS: 'return self < aDate'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return self < aDate"]]],
- messageSends: []
- }, function ($methodClass){ return function (aDate){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return self < aDate;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"<",{aDate:aDate})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Date);
- $core.addMethod(
- $core.method({
- selector: "<=",
- protocol: "comparing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aDate"],
- source: "<= aDate\x0a\x09<inlineJS: 'return self <= aDate'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return self <= aDate"]]],
- messageSends: []
- }, function ($methodClass){ return function (aDate){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return self <= aDate;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"<=",{aDate:aDate})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Date);
- $core.addMethod(
- $core.method({
- selector: "=",
- protocol: "comparing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aDate"],
- source: "= aDate\x0a\x09^ (aDate class == self class) and: [ self asMilliseconds == aDate asMilliseconds ]",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["and:", "==", "class", "asMilliseconds"]
- }, function ($methodClass){ return function (aDate){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- if($core.assert([$recv([$recv(aDate)._class()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["class"]=1
- //>>excludeEnd("ctx");
- ][0]).__eq_eq($self._class())
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["=="]=1
- //>>excludeEnd("ctx");
- ][0])){
- return $recv([$self._asMilliseconds()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["asMilliseconds"]=1
- //>>excludeEnd("ctx");
- ][0]).__eq_eq($recv(aDate)._asMilliseconds());
- } else {
- return false;
- }
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"=",{aDate:aDate})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Date);
- $core.addMethod(
- $core.method({
- selector: ">",
- protocol: "comparing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aDate"],
- source: "> aDate\x0a\x09<inlineJS: 'return self > aDate'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return self > aDate"]]],
- messageSends: []
- }, function ($methodClass){ return function (aDate){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return self > aDate;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,">",{aDate:aDate})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Date);
- $core.addMethod(
- $core.method({
- selector: ">=",
- protocol: "comparing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aDate"],
- source: ">= aDate\x0a\x09<inlineJS: 'return self >= aDate'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return self >= aDate"]]],
- messageSends: []
- }, function ($methodClass){ return function (aDate){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return self >= aDate;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,">=",{aDate:aDate})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Date);
- $core.addMethod(
- $core.method({
- selector: "asDateString",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "asDateString\x0a\x09<inlineJS: 'return self.toDateString()'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return self.toDateString()"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return self.toDateString();
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"asDateString",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Date);
- $core.addMethod(
- $core.method({
- selector: "asLocaleString",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "asLocaleString\x0a\x09<inlineJS: 'return self.toLocaleString()'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return self.toLocaleString()"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return self.toLocaleString();
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"asLocaleString",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Date);
- $core.addMethod(
- $core.method({
- selector: "asMilliseconds",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "asMilliseconds\x0a\x09^ self time",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["time"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $self._time();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"asMilliseconds",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Date);
- $core.addMethod(
- $core.method({
- selector: "asNumber",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "asNumber\x0a\x09^ self asMilliseconds",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["asMilliseconds"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $self._asMilliseconds();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"asNumber",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Date);
- $core.addMethod(
- $core.method({
- selector: "asString",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "asString\x0a\x09<inlineJS: 'return self.toString()'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return self.toString()"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return self.toString();
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"asString",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Date);
- $core.addMethod(
- $core.method({
- selector: "asTimeString",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "asTimeString\x0a\x09<inlineJS: 'return self.toTimeString()'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return self.toTimeString()"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return self.toTimeString();
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"asTimeString",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Date);
- $core.addMethod(
- $core.method({
- selector: "day",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "day\x0a\x09^ self dayOfWeek",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["dayOfWeek"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $self._dayOfWeek();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"day",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Date);
- $core.addMethod(
- $core.method({
- selector: "day:",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "day: aNumber\x0a\x09self dayOfWeek: aNumber",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["dayOfWeek:"]
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $self._dayOfWeek_(aNumber);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"day:",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Date);
- $core.addMethod(
- $core.method({
- selector: "dayOfMonth",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "dayOfMonth\x0a\x09<inlineJS: 'return self.getDate()'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return self.getDate()"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return self.getDate();
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"dayOfMonth",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Date);
- $core.addMethod(
- $core.method({
- selector: "dayOfMonth:",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "dayOfMonth: aNumber\x0a\x09<inlineJS: 'self.setDate(aNumber)'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["self.setDate(aNumber)"]]],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- self.setDate(aNumber);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"dayOfMonth:",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Date);
- $core.addMethod(
- $core.method({
- selector: "dayOfWeek",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "dayOfWeek\x0a\x09<inlineJS: 'return self.getDay() + 1'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return self.getDay() + 1"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return self.getDay() + 1;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"dayOfWeek",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Date);
- $core.addMethod(
- $core.method({
- selector: "dayOfWeek:",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "dayOfWeek: aNumber\x0a\x09<inlineJS: 'return self.setDay(aNumber - 1)'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return self.setDay(aNumber - 1)"]]],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return self.setDay(aNumber - 1);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"dayOfWeek:",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Date);
- $core.addMethod(
- $core.method({
- selector: "hours",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "hours\x0a\x09<inlineJS: 'return self.getHours()'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return self.getHours()"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return self.getHours();
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"hours",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Date);
- $core.addMethod(
- $core.method({
- selector: "hours:",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "hours: aNumber\x0a\x09<inlineJS: 'self.setHours(aNumber)'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["self.setHours(aNumber)"]]],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- self.setHours(aNumber);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"hours:",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Date);
- $core.addMethod(
- $core.method({
- selector: "milliseconds",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "milliseconds\x0a\x09<inlineJS: 'return self.getMilliseconds()'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return self.getMilliseconds()"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return self.getMilliseconds();
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"milliseconds",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Date);
- $core.addMethod(
- $core.method({
- selector: "milliseconds:",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "milliseconds: aNumber\x0a\x09<inlineJS: 'self.setMilliseconds(aNumber)'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["self.setMilliseconds(aNumber)"]]],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- self.setMilliseconds(aNumber);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"milliseconds:",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Date);
- $core.addMethod(
- $core.method({
- selector: "minutes",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "minutes\x0a\x09<inlineJS: 'return self.getMinutes()'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return self.getMinutes()"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return self.getMinutes();
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"minutes",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Date);
- $core.addMethod(
- $core.method({
- selector: "minutes:",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "minutes: aNumber\x0a\x09<inlineJS: 'self.setMinutes(aNumber)'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["self.setMinutes(aNumber)"]]],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- self.setMinutes(aNumber);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"minutes:",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Date);
- $core.addMethod(
- $core.method({
- selector: "month",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "month\x0a\x09<inlineJS: 'return self.getMonth() + 1'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return self.getMonth() + 1"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return self.getMonth() + 1;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"month",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Date);
- $core.addMethod(
- $core.method({
- selector: "month:",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "month: aNumber\x0a\x09<inlineJS: 'self.setMonth(aNumber - 1)'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["self.setMonth(aNumber - 1)"]]],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- self.setMonth(aNumber - 1);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"month:",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Date);
- $core.addMethod(
- $core.method({
- selector: "printOn:",
- protocol: "printing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aStream"],
- source: "printOn: aStream\x0a\x09aStream nextPutAll: self asString",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["nextPutAll:", "asString"]
- }, function ($methodClass){ return function (aStream){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $recv(aStream)._nextPutAll_($self._asString());
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Date);
- $core.addMethod(
- $core.method({
- selector: "seconds",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "seconds\x0a\x09<inlineJS: 'return self.getSeconds()'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return self.getSeconds()"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return self.getSeconds();
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"seconds",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Date);
- $core.addMethod(
- $core.method({
- selector: "seconds:",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "seconds: aNumber\x0a\x09<inlineJS: 'self.setSeconds(aNumber)'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["self.setSeconds(aNumber)"]]],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- self.setSeconds(aNumber);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"seconds:",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Date);
- $core.addMethod(
- $core.method({
- selector: "time",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "time\x0a\x09<inlineJS: 'return self.getTime()'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return self.getTime()"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return self.getTime();
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"time",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Date);
- $core.addMethod(
- $core.method({
- selector: "time:",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "time: aNumber\x0a\x09<inlineJS: 'self.setTime(aNumber)'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["self.setTime(aNumber)"]]],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- self.setTime(aNumber);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"time:",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Date);
- $core.addMethod(
- $core.method({
- selector: "year",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "year\x0a\x09<inlineJS: 'return self.getFullYear()'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return self.getFullYear()"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return self.getFullYear();
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"year",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Date);
- $core.addMethod(
- $core.method({
- selector: "year:",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "year: aNumber\x0a\x09<inlineJS: 'self.setFullYear(aNumber)'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["self.setFullYear(aNumber)"]]],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- self.setFullYear(aNumber);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"year:",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Date);
- $core.addMethod(
- $core.method({
- selector: "classTag",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "classTag\x0a\x09\x22Returns a tag or general category for this class.\x0a\x09Typically used to help tools do some reflection.\x0a\x09Helios, for example, uses this to decide what icon the class should display.\x22\x0a\x09\x0a\x09^ 'magnitude'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return "magnitude";
- }; }),
- $globals.Date.a$cls);
- $core.addMethod(
- $core.method({
- selector: "fromMilliseconds:",
- protocol: "instance creation",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "fromMilliseconds: aNumber\x0a\x09^ self new: aNumber",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["new:"]
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $self._new_(aNumber);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"fromMilliseconds:",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Date.a$cls);
- $core.addMethod(
- $core.method({
- selector: "fromSeconds:",
- protocol: "instance creation",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "fromSeconds: aNumber\x0a\x09^ self fromMilliseconds: aNumber * 1000",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["fromMilliseconds:", "*"]
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $self._fromMilliseconds_($recv(aNumber).__star((1000)));
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"fromSeconds:",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Date.a$cls);
- $core.addMethod(
- $core.method({
- selector: "fromString:",
- protocol: "instance creation",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aString"],
- source: "fromString: aString\x0a\x09\x22Example: Date fromString('2011/04/15 00:00:00')\x22\x0a\x09^ self new: aString",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["new:"]
- }, function ($methodClass){ return function (aString){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $self._new_(aString);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"fromString:",{aString:aString})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Date.a$cls);
- $core.addMethod(
- $core.method({
- selector: "millisecondsToRun:",
- protocol: "instance creation",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aBlock"],
- source: "millisecondsToRun: aBlock\x0a\x09| t |\x0a\x09t := Date now.\x0a\x09aBlock value.\x0a\x09^ Date now - t",
- referencedClasses: ["Date"],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["now", "value", "-"]
- }, function ($methodClass){ return function (aBlock){
- var self=this,$self=this;
- var t;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- t=[$recv($globals.Date)._now()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["now"]=1
- //>>excludeEnd("ctx");
- ][0];
- $recv(aBlock)._value();
- return $recv($recv($globals.Date)._now()).__minus(t);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"millisecondsToRun:",{aBlock:aBlock,t:t})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Date.a$cls);
- $core.addMethod(
- $core.method({
- selector: "new:",
- protocol: "instance creation",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["anObject"],
- source: "new: anObject\x0a\x09<inlineJS: 'return new Date(anObject)'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return new Date(anObject)"]]],
- messageSends: []
- }, function ($methodClass){ return function (anObject){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return new Date(anObject);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"new:",{anObject:anObject})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Date.a$cls);
- $core.addMethod(
- $core.method({
- selector: "now",
- protocol: "instance creation",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "now\x0a\x09^ self today",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["today"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $self._today();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"now",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Date.a$cls);
- $core.addMethod(
- $core.method({
- selector: "today",
- protocol: "instance creation",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "today\x0a\x09^ self new",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["new"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $self._new();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"today",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Date.a$cls);
- $core.addClass("Number", $globals.Object, "Kernel-Objects");
- //>>excludeStart("ide", pragmas.excludeIdeData);
- $globals.Number.comment="I am the Amber representation for all numbers.\x0aI am directly mapped to JavaScript Number.\x0a\x0a## API\x0a\x0aI provide all necessary methods for arithmetic operations, comparison, conversion and so on with numbers.\x0a\x0aMy instances can also be used to evaluate a block a fixed number of times:\x0a\x0a\x095 timesRepeat: [ Transcript show: 'This will be printed 5 times'; cr ].\x0a\x09\x0a\x091 to: 5 do: [ :aNumber| Transcript show: aNumber asString; cr ].\x0a\x09\x0a\x091 to: 10 by: 2 do: [ :aNumber| Transcript show: aNumber asString; cr ].";
- //>>excludeEnd("ide");
- $core.addMethod(
- $core.method({
- selector: "&",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "& aNumber\x0a\x09^ self bitAnd: aNumber",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["bitAnd:"]
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $self._bitAnd_(aNumber);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"&",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "*",
- protocol: "arithmetic",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "* aNumber\x0a\x09<inlineJS: 'return typeof aNumber === \x22number\x22 ?\x0a\x09\x09self * aNumber :\x0a\x09\x09$recv(aNumber)._timesSelfToNumber_(self)'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return typeof aNumber === \x22number\x22 ?\x0a\x09\x09self * aNumber :\x0a\x09\x09$recv(aNumber)._timesSelfToNumber_(self)"]]],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return typeof aNumber === "number" ?
- self * aNumber :
- $recv(aNumber)._timesSelfToNumber_(self);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"*",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "**",
- protocol: "mathematical functions",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["exponent"],
- source: "** exponent\x0a\x09^ self raisedTo: exponent",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["raisedTo:"]
- }, function ($methodClass){ return function (exponent){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $self._raisedTo_(exponent);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"**",{exponent:exponent})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "+",
- protocol: "arithmetic",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "+ aNumber\x0a\x09<inlineJS: 'return typeof aNumber === \x22number\x22 ?\x0a\x09\x09self + aNumber :\x0a\x09\x09$recv(aNumber)._plusSelfToNumber_(self)'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return typeof aNumber === \x22number\x22 ?\x0a\x09\x09self + aNumber :\x0a\x09\x09$recv(aNumber)._plusSelfToNumber_(self)"]]],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return typeof aNumber === "number" ?
- self + aNumber :
- $recv(aNumber)._plusSelfToNumber_(self);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"+",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "-",
- protocol: "arithmetic",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "- aNumber\x0a\x09<inlineJS: 'return typeof aNumber === \x22number\x22 ?\x0a\x09\x09self - aNumber :\x0a\x09\x09$recv(aNumber)._minusSelfToNumber_(self)'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return typeof aNumber === \x22number\x22 ?\x0a\x09\x09self - aNumber :\x0a\x09\x09$recv(aNumber)._minusSelfToNumber_(self)"]]],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return typeof aNumber === "number" ?
- self - aNumber :
- $recv(aNumber)._minusSelfToNumber_(self);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"-",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "/",
- protocol: "arithmetic",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "/ aNumber\x0a\x09<inlineJS: 'return typeof aNumber === \x22number\x22 ?\x0a\x09\x09self / aNumber :\x0a\x09\x09$recv(aNumber)._divideBySelfToNumber_(self)'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return typeof aNumber === \x22number\x22 ?\x0a\x09\x09self / aNumber :\x0a\x09\x09$recv(aNumber)._divideBySelfToNumber_(self)"]]],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return typeof aNumber === "number" ?
- self / aNumber :
- $recv(aNumber)._divideBySelfToNumber_(self);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"/",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "//",
- protocol: "arithmetic",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "// aNumber\x0a\x09^ (self / aNumber) floor",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["floor", "/"]
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($self.__slash(aNumber))._floor();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"//",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "<",
- protocol: "comparing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "< aNumber\x0a<inlineJS: 'return typeof aNumber === \x22number\x22 ?\x0a\x09Number(self) < aNumber :\x0a\x09$recv(aNumber)._isNumberLessThanSelf_(self)'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return typeof aNumber === \x22number\x22 ?\x0a\x09Number(self) < aNumber :\x0a\x09$recv(aNumber)._isNumberLessThanSelf_(self)"]]],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return typeof aNumber === "number" ?
- Number(self) < aNumber :
- $recv(aNumber)._isNumberLessThanSelf_(self);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"<",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "<=",
- protocol: "comparing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "<= aNumber\x0a<inlineJS: 'return typeof aNumber === \x22number\x22 ?\x0a\x09Number(self) <= aNumber :\x0a\x09$recv(aNumber)._isNumberLessThanOrEqualToSelf_(self)'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return typeof aNumber === \x22number\x22 ?\x0a\x09Number(self) <= aNumber :\x0a\x09$recv(aNumber)._isNumberLessThanOrEqualToSelf_(self)"]]],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return typeof aNumber === "number" ?
- Number(self) <= aNumber :
- $recv(aNumber)._isNumberLessThanOrEqualToSelf_(self);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"<=",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "==",
- protocol: "comparing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "== aNumber\x0a<inlineJS: 'return typeof aNumber === \x22number\x22 ?\x0a\x09Number(self) === aNumber :\x0a\x09$recv(aNumber)._isNumberEqualToSelf_(self)'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return typeof aNumber === \x22number\x22 ?\x0a\x09Number(self) === aNumber :\x0a\x09$recv(aNumber)._isNumberEqualToSelf_(self)"]]],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return typeof aNumber === "number" ?
- Number(self) === aNumber :
- $recv(aNumber)._isNumberEqualToSelf_(self);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"==",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: ">",
- protocol: "comparing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "> aNumber\x0a<inlineJS: 'return typeof aNumber === \x22number\x22 ?\x0a\x09Number(self) > aNumber :\x0a\x09$recv(aNumber)._isNumberGreaterThanSelf_(self)'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return typeof aNumber === \x22number\x22 ?\x0a\x09Number(self) > aNumber :\x0a\x09$recv(aNumber)._isNumberGreaterThanSelf_(self)"]]],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return typeof aNumber === "number" ?
- Number(self) > aNumber :
- $recv(aNumber)._isNumberGreaterThanSelf_(self);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,">",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: ">=",
- protocol: "comparing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: ">= aNumber\x0a<inlineJS: 'return typeof aNumber === \x22number\x22 ?\x0a\x09Number(self) >= aNumber :\x0a\x09$recv(aNumber)._isNumberGreaterThanOrEqualToSelf_(self)'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return typeof aNumber === \x22number\x22 ?\x0a\x09Number(self) >= aNumber :\x0a\x09$recv(aNumber)._isNumberGreaterThanOrEqualToSelf_(self)"]]],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return typeof aNumber === "number" ?
- Number(self) >= aNumber :
- $recv(aNumber)._isNumberGreaterThanOrEqualToSelf_(self);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,">=",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "@",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "@ aNumber\x0a\x09^ Point x: self y: aNumber",
- referencedClasses: ["Point"],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["x:y:"]
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($globals.Point)._x_y_(self,aNumber);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"@",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "\x5c\x5c",
- protocol: "arithmetic",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "\x5c\x5c aNumber\x0a\x09<inlineJS: 'return typeof aNumber === \x22number\x22 ?\x0a\x09\x09self % aNumber :\x0a\x09\x09$recv(aNumber)._divisionRemainderBySelfToNumber_(self)'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return typeof aNumber === \x22number\x22 ?\x0a\x09\x09self % aNumber :\x0a\x09\x09$recv(aNumber)._divisionRemainderBySelfToNumber_(self)"]]],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return typeof aNumber === "number" ?
- self % aNumber :
- $recv(aNumber)._divisionRemainderBySelfToNumber_(self);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"\x5c\x5c",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "abs",
- protocol: "arithmetic",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "abs\x0a\x09<inlineJS: 'return Math.abs(self);'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return Math.abs(self);"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return Math.abs(self);;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"abs",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "andSelfToNumber:",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "andSelfToNumber: aNumber\x0a\x09<inlineJS: 'return aNumber & self'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return aNumber & self"]]],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return aNumber & self;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"andSelfToNumber:",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "arcCos",
- protocol: "mathematical functions",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "arcCos\x0a\x09<inlineJS: 'return Math.acos(self);'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return Math.acos(self);"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return Math.acos(self);;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"arcCos",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "arcSin",
- protocol: "mathematical functions",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "arcSin\x0a\x09<inlineJS: 'return Math.asin(self);'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return Math.asin(self);"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return Math.asin(self);;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"arcSin",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "arcTan",
- protocol: "mathematical functions",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "arcTan\x0a\x09<inlineJS: 'return Math.atan(self);'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return Math.atan(self);"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return Math.atan(self);;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"arcTan",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "arcTan:",
- protocol: "mathematical functions",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "arcTan: aNumber\x0a\x09<inlineJS: 'return Math.atan2(self, aNumber);'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return Math.atan2(self, aNumber);"]]],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return Math.atan2(self, aNumber);;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"arcTan:",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "asJavaScriptObject",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "asJavaScriptObject\x0a\x09^ self",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return self;
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "asJavaScriptSource",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "asJavaScriptSource\x0a\x09^ '(', self printString, ')'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: [",", "printString"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return [$recv("(".__comma($self._printString())).__comma(")")
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx[","]=1
- //>>excludeEnd("ctx");
- ][0];
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"asJavaScriptSource",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "asNumber",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "asNumber\x0a\x09^ self",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return self;
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "asPoint",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "asPoint\x0a\x09^ Point x: self y: self",
- referencedClasses: ["Point"],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["x:y:"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($globals.Point)._x_y_(self,self);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"asPoint",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "asString",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "asString\x0a\x09<inlineJS: 'return String(self)'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return String(self)"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return String(self);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"asString",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "atRandom",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "atRandom\x0a\x09^ (Random new next * self) truncated + 1",
- referencedClasses: ["Random"],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["+", "truncated", "*", "next", "new"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($recv($recv($recv($recv($globals.Random)._new())._next()).__star(self))._truncated()).__plus((1));
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"atRandom",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "between:and:",
- protocol: "testing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["min", "max"],
- source: "between: min and: max\x0a ^ self >= min and: [ self <= max ]",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["and:", ">=", "<="]
- }, function ($methodClass){ return function (min,max){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- if($core.assert($self.__gt_eq(min))){
- return $self.__lt_eq(max);
- } else {
- return false;
- }
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"between:and:",{min:min,max:max})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "bitAnd:",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "bitAnd: aNumber\x0a\x09<inlineJS: 'return typeof aNumber === \x22number\x22 ?\x0a\x09\x09self & aNumber :\x0a\x09\x09$recv(aNumber)._andSelfToNumber_(self)'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return typeof aNumber === \x22number\x22 ?\x0a\x09\x09self & aNumber :\x0a\x09\x09$recv(aNumber)._andSelfToNumber_(self)"]]],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return typeof aNumber === "number" ?
- self & aNumber :
- $recv(aNumber)._andSelfToNumber_(self);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"bitAnd:",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "bitNot",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "bitNot\x0a\x09<inlineJS: 'return ~self'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return ~self"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return ~self;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"bitNot",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "bitOr:",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "bitOr: aNumber\x0a\x09<inlineJS: 'return typeof aNumber === \x22number\x22 ?\x0a\x09\x09self | aNumber :\x0a\x09\x09$recv(aNumber)._orSelfToNumber_(self)'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return typeof aNumber === \x22number\x22 ?\x0a\x09\x09self | aNumber :\x0a\x09\x09$recv(aNumber)._orSelfToNumber_(self)"]]],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return typeof aNumber === "number" ?
- self | aNumber :
- $recv(aNumber)._orSelfToNumber_(self);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"bitOr:",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "bitXor:",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "bitXor: aNumber\x0a\x09<inlineJS: 'return typeof aNumber === \x22number\x22 ?\x0a\x09\x09self ^ aNumber :\x0a\x09\x09$recv(aNumber)._xorSelfToNumber_(self)'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return typeof aNumber === \x22number\x22 ?\x0a\x09\x09self ^ aNumber :\x0a\x09\x09$recv(aNumber)._xorSelfToNumber_(self)"]]],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return typeof aNumber === "number" ?
- self ^ aNumber :
- $recv(aNumber)._xorSelfToNumber_(self);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"bitXor:",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "ceiling",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "ceiling\x0a\x09<inlineJS: 'return Math.ceil(self);'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return Math.ceil(self);"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return Math.ceil(self);;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"ceiling",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "copy",
- protocol: "copying",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "copy\x0a\x09^ self",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return self;
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "cos",
- protocol: "mathematical functions",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "cos\x0a\x09<inlineJS: 'return Math.cos(self);'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return Math.cos(self);"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return Math.cos(self);;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"cos",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "deepCopy",
- protocol: "copying",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "deepCopy\x0a\x09^ self copy",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["copy"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $self._copy();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"deepCopy",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "degreesToRadians",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "degreesToRadians\x0a\x09^ self * Number radiansPerDegree",
- referencedClasses: ["Number"],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["*", "radiansPerDegree"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $self.__star($recv($globals.Number)._radiansPerDegree());
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"degreesToRadians",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "divideBySelfToNumber:",
- protocol: "arithmetic",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "divideBySelfToNumber: aNumber\x0a\x09<inlineJS: 'return aNumber / self'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return aNumber / self"]]],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return aNumber / self;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"divideBySelfToNumber:",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "divisionRemainderBySelfToNumber:",
- protocol: "arithmetic",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "divisionRemainderBySelfToNumber: aNumber\x0a\x09<inlineJS: 'return aNumber % self'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return aNumber % self"]]],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return aNumber % self;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"divisionRemainderBySelfToNumber:",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "even",
- protocol: "testing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "even\x0a\x09^ 0 = (self \x5c\x5c 2)",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["=", "\x5c\x5c"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return (0).__eq($self.__backslash_backslash((2)));
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"even",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "floor",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "floor\x0a\x09<inlineJS: 'return Math.floor(self);'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return Math.floor(self);"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return Math.floor(self);;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"floor",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "isFinite",
- protocol: "testing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "isFinite\x0a\x09\x22Answer whether the receiver is finite\x22\x0a\x09<inlineJS: 'return Number.isFinite(self)'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return Number.isFinite(self)"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return Number.isFinite(self);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"isFinite",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "isImmutable",
- protocol: "testing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "isImmutable\x0a\x09^ true",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return true;
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "isNaN",
- protocol: "testing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "isNaN\x0a\x09\x22Answer whether the receiver is IEEE-754 not-a-number\x22\x0a\x09<inlineJS: 'return Number.isNaN(self)'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return Number.isNaN(self)"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return Number.isNaN(self);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"isNaN",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "isNumber",
- protocol: "testing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "isNumber\x0a\x09^ true",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return true;
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "isNumberEqualToSelf:",
- protocol: "comparing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "isNumberEqualToSelf: aNumber\x0a\x09<inlineJS: 'return aNumber === Number(self)'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return aNumber === Number(self)"]]],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return aNumber === Number(self);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"isNumberEqualToSelf:",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "isNumberGreaterThanOrEqualToSelf:",
- protocol: "comparing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "isNumberGreaterThanOrEqualToSelf: aNumber\x0a\x09<inlineJS: 'return aNumber >= self'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return aNumber >= self"]]],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return aNumber >= self;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"isNumberGreaterThanOrEqualToSelf:",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "isNumberGreaterThanSelf:",
- protocol: "comparing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "isNumberGreaterThanSelf: aNumber\x0a\x09<inlineJS: 'return aNumber > self'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return aNumber > self"]]],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return aNumber > self;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"isNumberGreaterThanSelf:",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "isNumberLessThanOrEqualToSelf:",
- protocol: "comparing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "isNumberLessThanOrEqualToSelf: aNumber\x0a\x09<inlineJS: 'return aNumber <= self'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return aNumber <= self"]]],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return aNumber <= self;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"isNumberLessThanOrEqualToSelf:",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "isNumberLessThanSelf:",
- protocol: "comparing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "isNumberLessThanSelf: aNumber\x0a\x09<inlineJS: 'return aNumber < self'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return aNumber < self"]]],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return aNumber < self;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"isNumberLessThanSelf:",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "isZero",
- protocol: "testing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "isZero\x0a\x09^ self = 0",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["="]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $self.__eq((0));
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"isZero",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "ln",
- protocol: "mathematical functions",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "ln\x0a\x09<inlineJS: 'return Math.log(self);'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return Math.log(self);"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return Math.log(self);;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"ln",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "ln1p",
- protocol: "mathematical functions",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "ln1p\x0a\x09<inlineJS: 'return Math.log1p(self);'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return Math.log1p(self);"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return Math.log1p(self);;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"ln1p",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "log",
- protocol: "mathematical functions",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "log\x0a\x09<inlineJS: 'return Math.log(self) / Math.LN10;'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return Math.log(self) / Math.LN10;"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return Math.log(self) / Math.LN10;;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"log",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "log:",
- protocol: "mathematical functions",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "log: aNumber\x0a\x09<inlineJS: 'return Math.log(self) / Math.log(aNumber);'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return Math.log(self) / Math.log(aNumber);"]]],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return Math.log(self) / Math.log(aNumber);;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"log:",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "max:",
- protocol: "arithmetic",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "max: aNumber\x0a\x09<inlineJS: 'return Math.max(self, aNumber);'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return Math.max(self, aNumber);"]]],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return Math.max(self, aNumber);;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"max:",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "min:",
- protocol: "arithmetic",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "min: aNumber\x0a\x09<inlineJS: 'return Math.min(self, aNumber);'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return Math.min(self, aNumber);"]]],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return Math.min(self, aNumber);;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"min:",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "min:max:",
- protocol: "arithmetic",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aMin", "aMax"],
- source: "min: aMin max: aMax\x0a\x09^ (self min: aMin) max: aMax",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["max:", "min:"]
- }, function ($methodClass){ return function (aMin,aMax){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($self._min_(aMin))._max_(aMax);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"min:max:",{aMin:aMin,aMax:aMax})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "minusSelfToNumber:",
- protocol: "arithmetic",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "minusSelfToNumber: aNumber\x0a\x09<inlineJS: 'return aNumber - self'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return aNumber - self"]]],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return aNumber - self;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"minusSelfToNumber:",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "negated",
- protocol: "arithmetic",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "negated\x0a\x09^ 0 - self",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["-"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return (0).__minus(self);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"negated",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "negative",
- protocol: "testing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "negative\x0a\x09\x22Answer whether the receiver is mathematically negative.\x22\x0a\x0a\x09^ self < 0",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["<"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $self.__lt((0));
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"negative",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "odd",
- protocol: "testing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "odd\x0a\x09^ self even not",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["not", "even"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($self._even())._not();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"odd",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "orSelfToNumber:",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "orSelfToNumber: aNumber\x0a\x09<inlineJS: 'return aNumber | self'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return aNumber | self"]]],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return aNumber | self;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"orSelfToNumber:",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "plusSelfToNumber:",
- protocol: "arithmetic",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "plusSelfToNumber: aNumber\x0a\x09<inlineJS: 'return aNumber + self'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return aNumber + self"]]],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return aNumber + self;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"plusSelfToNumber:",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "positive",
- protocol: "testing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "positive\x0a\x09\x22Answer whether the receiver is positive or equal to 0. (ST-80 protocol).\x22\x0a\x0a\x09^ self >= 0",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: [">="]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $self.__gt_eq((0));
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"positive",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "printOn:",
- protocol: "printing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aStream"],
- source: "printOn: aStream\x0a\x09aStream nextPutAll: self asString",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["nextPutAll:", "asString"]
- }, function ($methodClass){ return function (aStream){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $recv(aStream)._nextPutAll_($self._asString());
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "printShowingDecimalPlaces:",
- protocol: "printing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["placesDesired"],
- source: "printShowingDecimalPlaces: placesDesired\x0a\x09<inlineJS: 'return self.toFixed(placesDesired)'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return self.toFixed(placesDesired)"]]],
- messageSends: []
- }, function ($methodClass){ return function (placesDesired){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return self.toFixed(placesDesired);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"printShowingDecimalPlaces:",{placesDesired:placesDesired})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "printStringBase:",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aBase"],
- source: "printStringBase: aBase\x0a\x09<inlineJS: 'return self.toString(aBase)'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return self.toString(aBase)"]]],
- messageSends: []
- }, function ($methodClass){ return function (aBase){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return self.toString(aBase);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"printStringBase:",{aBase:aBase})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "radiansToDegrees",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "radiansToDegrees\x0a\x09^ self / Number radiansPerDegree",
- referencedClasses: ["Number"],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["/", "radiansPerDegree"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $self.__slash($recv($globals.Number)._radiansPerDegree());
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"radiansToDegrees",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "raisedTo:",
- protocol: "mathematical functions",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["exponent"],
- source: "raisedTo: exponent\x0a\x09<inlineJS: 'return Math.pow(self, exponent);'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return Math.pow(self, exponent);"]]],
- messageSends: []
- }, function ($methodClass){ return function (exponent){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return Math.pow(self, exponent);;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"raisedTo:",{exponent:exponent})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "rounded",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "rounded\x0a\x09<inlineJS: 'return Math.round(self);'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return Math.round(self);"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return Math.round(self);;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"rounded",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "sign",
- protocol: "mathematical functions",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "sign\x0a\x09self isZero \x0a\x09\x09ifTrue: [ ^ 0 ].\x0a\x09self positive\x0a\x09\x09ifTrue: [ ^ 1 ]\x0a\x09\x09ifFalse: [ ^ -1 ].",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["ifTrue:", "isZero", "ifTrue:ifFalse:", "positive"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- if($core.assert($self._isZero())){
- return (0);
- }
- if($core.assert($self._positive())){
- return (1);
- } else {
- return (-1);
- }
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"sign",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "sin",
- protocol: "mathematical functions",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "sin\x0a\x09<inlineJS: 'return Math.sin(self);'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return Math.sin(self);"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return Math.sin(self);;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"sin",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "sqrt",
- protocol: "mathematical functions",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "sqrt\x0a\x09<inlineJS: 'return Math.sqrt(self)'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return Math.sqrt(self)"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return Math.sqrt(self);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"sqrt",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "squared",
- protocol: "mathematical functions",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "squared\x0a\x09^ self * self",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["*"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $self.__star(self);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"squared",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "tan",
- protocol: "mathematical functions",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "tan\x0a\x09<inlineJS: 'return Math.tan(self);'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return Math.tan(self);"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return Math.tan(self);;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"tan",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "timesRepeat:",
- protocol: "enumerating",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aBlock"],
- source: "timesRepeat: aBlock\x0a\x09| count |\x0a\x09count := 1.\x0a\x09[ count > self ] whileFalse: [\x0a\x09\x09aBlock value.\x0a\x09\x09count := count + 1 ]",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["whileFalse:", ">", "value", "+"]
- }, function ($methodClass){ return function (aBlock){
- var self=this,$self=this;
- var count;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- count=(1);
- $recv((function(){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- return $recv(count).__gt(self);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
- //>>excludeEnd("ctx");
- }))._whileFalse_((function(){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- $recv(aBlock)._value();
- count=$recv(count).__plus((1));
- return count;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
- //>>excludeEnd("ctx");
- }));
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"timesRepeat:",{aBlock:aBlock,count:count})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "timesSelfToNumber:",
- protocol: "arithmetic",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "timesSelfToNumber: aNumber\x0a\x09<inlineJS: 'return aNumber * self'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return aNumber * self"]]],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return aNumber * self;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"timesSelfToNumber:",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "to:",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "to: aNumber\x0a\x09| array first last count |\x0a\x09first := self truncated.\x0a\x09last := aNumber truncated + 1.\x0a\x09count := 1.\x0a\x09array := Array new.\x0a\x09(last - first) timesRepeat: [\x0a\x09\x09array at: count put: first.\x0a\x09\x09count := count + 1.\x0a\x09\x09first := first + 1 ].\x0a\x09^ array",
- referencedClasses: ["Array"],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["truncated", "+", "new", "timesRepeat:", "-", "at:put:"]
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- var array,first,last,count;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- first=[$self._truncated()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["truncated"]=1
- //>>excludeEnd("ctx");
- ][0];
- last=[$recv($recv(aNumber)._truncated()).__plus((1))
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["+"]=1
- //>>excludeEnd("ctx");
- ][0];
- count=(1);
- array=$recv($globals.Array)._new();
- $recv($recv(last).__minus(first))._timesRepeat_((function(){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- $recv(array)._at_put_(count,first);
- count=[$recv(count).__plus((1))
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx2.sendIdx["+"]=2
- //>>excludeEnd("ctx");
- ][0];
- first=$recv(first).__plus((1));
- return first;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
- //>>excludeEnd("ctx");
- }));
- return array;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"to:",{aNumber:aNumber,array:array,first:first,last:last,count:count})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "to:by:",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["stop", "step"],
- source: "to: stop by: step\x0a\x09| array value pos |\x0a\x09value := self.\x0a\x09array := Array new.\x0a\x09pos := 1.\x0a\x09step = 0 ifTrue: [ self error: 'step must be non-zero' ].\x0a\x09step < 0\x0a\x09\x09ifTrue: [ [ value >= stop ] whileTrue: [\x0a\x09\x09\x09\x09\x09array at: pos put: value.\x0a\x09\x09\x09\x09\x09pos := pos + 1.\x0a\x09\x09\x09\x09\x09value := value + step ]]\x0a\x09\x09ifFalse: [ [ value <= stop ] whileTrue: [\x0a\x09\x09\x09\x09\x09array at: pos put: value.\x0a\x09\x09\x09\x09pos := pos + 1.\x0a\x09\x09\x09\x09\x09value := value + step ]].\x0a\x09^ array",
- referencedClasses: ["Array"],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["new", "ifTrue:", "=", "error:", "ifTrue:ifFalse:", "<", "whileTrue:", ">=", "at:put:", "+", "<="]
- }, function ($methodClass){ return function (stop,step){
- var self=this,$self=this;
- var array,value,pos;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- value=self;
- array=$recv($globals.Array)._new();
- pos=(1);
- if($core.assert($recv(step).__eq((0)))){
- $self._error_("step must be non-zero");
- }
- if($core.assert($recv(step).__lt((0)))){
- [$recv((function(){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- return $recv(value).__gt_eq(stop);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
- //>>excludeEnd("ctx");
- }))._whileTrue_((function(){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- [$recv(array)._at_put_(pos,value)
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx2.sendIdx["at:put:"]=1
- //>>excludeEnd("ctx");
- ][0];
- pos=[$recv(pos).__plus((1))
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx2.sendIdx["+"]=1
- //>>excludeEnd("ctx");
- ][0];
- value=[$recv(value).__plus(step)
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx2.sendIdx["+"]=2
- //>>excludeEnd("ctx");
- ][0];
- return value;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)});
- //>>excludeEnd("ctx");
- }))
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["whileTrue:"]=1
- //>>excludeEnd("ctx");
- ][0];
- } else {
- $recv((function(){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- return $recv(value).__lt_eq(stop);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1,6)});
- //>>excludeEnd("ctx");
- }))._whileTrue_((function(){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- $recv(array)._at_put_(pos,value);
- pos=[$recv(pos).__plus((1))
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx2.sendIdx["+"]=3
- //>>excludeEnd("ctx");
- ][0];
- value=$recv(value).__plus(step);
- return value;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1,7)});
- //>>excludeEnd("ctx");
- }));
- }
- return array;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"to:by:",{stop:stop,step:step,array:array,value:value,pos:pos})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "to:by:do:",
- protocol: "enumerating",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["stop", "step", "aBlock"],
- source: "to: stop by: step do: aBlock\x0a\x09| value |\x0a\x09value := self.\x0a\x09step = 0 ifTrue: [ self error: 'step must be non-zero' ].\x0a\x09step < 0\x0a\x09\x09ifTrue: [ [ value >= stop ] whileTrue: [\x0a\x09\x09\x09\x09\x09aBlock value: value.\x0a\x09\x09\x09\x09\x09value := value + step ]]\x0a\x09\x09ifFalse: [ [ value <= stop ] whileTrue: [\x0a\x09\x09\x09\x09\x09aBlock value: value.\x0a\x09\x09\x09\x09\x09value := value + step ]]",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["ifTrue:", "=", "error:", "ifTrue:ifFalse:", "<", "whileTrue:", ">=", "value:", "+", "<="]
- }, function ($methodClass){ return function (stop,step,aBlock){
- var self=this,$self=this;
- var value;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- value=self;
- if($core.assert($recv(step).__eq((0)))){
- $self._error_("step must be non-zero");
- }
- if($core.assert($recv(step).__lt((0)))){
- [$recv((function(){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- return $recv(value).__gt_eq(stop);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
- //>>excludeEnd("ctx");
- }))._whileTrue_((function(){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- [$recv(aBlock)._value_(value)
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx2.sendIdx["value:"]=1
- //>>excludeEnd("ctx");
- ][0];
- value=[$recv(value).__plus(step)
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx2.sendIdx["+"]=1
- //>>excludeEnd("ctx");
- ][0];
- return value;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)});
- //>>excludeEnd("ctx");
- }))
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["whileTrue:"]=1
- //>>excludeEnd("ctx");
- ][0];
- } else {
- $recv((function(){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- return $recv(value).__lt_eq(stop);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1,6)});
- //>>excludeEnd("ctx");
- }))._whileTrue_((function(){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- $recv(aBlock)._value_(value);
- value=$recv(value).__plus(step);
- return value;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1,7)});
- //>>excludeEnd("ctx");
- }));
- }
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"to:by:do:",{stop:stop,step:step,aBlock:aBlock,value:value})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "to:do:",
- protocol: "enumerating",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["stop", "aBlock"],
- source: "to: stop do: aBlock\x0a\x09\x22Evaluate aBlock for each number from self to aNumber.\x22\x0a\x09| nextValue |\x0a\x09nextValue := self.\x0a\x09[ nextValue <= stop ]\x0a\x09\x09whileTrue:\x0a\x09\x09\x09[ aBlock value: nextValue.\x0a\x09\x09\x09nextValue := nextValue + 1 ]",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["whileTrue:", "<=", "value:", "+"]
- }, function ($methodClass){ return function (stop,aBlock){
- var self=this,$self=this;
- var nextValue;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- nextValue=self;
- $recv((function(){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- return $recv(nextValue).__lt_eq(stop);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
- //>>excludeEnd("ctx");
- }))._whileTrue_((function(){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- $recv(aBlock)._value_(nextValue);
- nextValue=$recv(nextValue).__plus((1));
- return nextValue;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
- //>>excludeEnd("ctx");
- }));
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"to:do:",{stop:stop,aBlock:aBlock,nextValue:nextValue})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "truncated",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "truncated\x0a\x09<inlineJS: '\x0a\x09\x09if(self >= 0) {\x0a\x09\x09\x09return Math.floor(self);\x0a\x09\x09} else {\x0a\x09\x09\x09return Math.floor(self * (-1)) * (-1);\x0a\x09\x09};\x0a\x09'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["\x0a\x09\x09if(self >= 0) {\x0a\x09\x09\x09return Math.floor(self);\x0a\x09\x09} else {\x0a\x09\x09\x09return Math.floor(self * (-1)) * (-1);\x0a\x09\x09};\x0a\x09"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- if(self >= 0) {
- return Math.floor(self);
- } else {
- return Math.floor(self * (-1)) * (-1);
- };
- ;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"truncated",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "xorSelfToNumber:",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "xorSelfToNumber: aNumber\x0a\x09<inlineJS: 'return aNumber ^ self'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return aNumber ^ self"]]],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return aNumber ^ self;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"xorSelfToNumber:",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "|",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "| aNumber\x0a\x09^ self bitOr: aNumber",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["bitOr:"]
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $self._bitOr_(aNumber);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"|",{aNumber:aNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number);
- $core.addMethod(
- $core.method({
- selector: "classTag",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "classTag\x0a\x09\x22Returns a tag or general category for this class.\x0a\x09Typically used to help tools do some reflection.\x0a\x09Helios, for example, uses this to decide what icon the class should display.\x22\x0a\x09\x0a\x09^ 'magnitude'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return "magnitude";
- }; }),
- $globals.Number.a$cls);
- $core.addMethod(
- $core.method({
- selector: "e",
- protocol: "instance creation",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "e\x0a\x09<inlineJS: 'return Math.E;'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return Math.E;"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return Math.E;;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"e",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number.a$cls);
- $core.addMethod(
- $core.method({
- selector: "negativeInfinity",
- protocol: "instance creation",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "negativeInfinity\x0a\x09<inlineJS: 'return Number.NEGATIVE_INFINITY'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return Number.NEGATIVE_INFINITY"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return Number.NEGATIVE_INFINITY;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"negativeInfinity",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number.a$cls);
- $core.addMethod(
- $core.method({
- selector: "pi",
- protocol: "instance creation",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "pi\x0a\x09<inlineJS: 'return Math.PI'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return Math.PI"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return Math.PI;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"pi",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number.a$cls);
- $core.addMethod(
- $core.method({
- selector: "positiveInfinity",
- protocol: "instance creation",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "positiveInfinity\x0a\x09<inlineJS: 'return Number.POSITIVE_INFINITY'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return Number.POSITIVE_INFINITY"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return Number.POSITIVE_INFINITY;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"positiveInfinity",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number.a$cls);
- $core.addMethod(
- $core.method({
- selector: "radiansPerDegree",
- protocol: "instance creation",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "radiansPerDegree\x0a\x09^ (self pi) / 180",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["/", "pi"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($self._pi()).__slash((180));
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"radiansPerDegree",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Number.a$cls);
- $core.addClass("Point", $globals.Object, "Kernel-Objects");
- $core.setSlots($globals.Point, ["x", "y"]);
- //>>excludeStart("ide", pragmas.excludeIdeData);
- $globals.Point.comment="I represent an x-y pair of numbers usually designating a geometric coordinate.\x0a\x0a## API\x0a\x0aInstances are traditionally created using the binary `#@` message to a number:\x0a\x0a\x09100@120\x0a\x0aPoints can then be arithmetically manipulated:\x0a\x0a\x09100@100 + (10@10)\x0a\x0a...or for example:\x0a\x0a\x09(100@100) * 2\x0a\x0a**NOTE:** Creating a point with a negative y-value will need a space after `@` in order to avoid a parsing error:\x0a\x0a\x09100@ -100 \x22but 100@-100 would not parse\x22";
- //>>excludeEnd("ide");
- $core.addMethod(
- $core.method({
- selector: "*",
- protocol: "arithmetic",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aPoint"],
- source: "* aPoint\x0a\x09^ Point x: self x * aPoint asPoint x y: self y * aPoint asPoint y",
- referencedClasses: ["Point"],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["x:y:", "*", "x", "asPoint", "y"]
- }, function ($methodClass){ return function (aPoint){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($globals.Point)._x_y_([$recv([$self._x()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["x"]=1
- //>>excludeEnd("ctx");
- ][0]).__star($recv([$recv(aPoint)._asPoint()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["asPoint"]=1
- //>>excludeEnd("ctx");
- ][0])._x())
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["*"]=1
- //>>excludeEnd("ctx");
- ][0],$recv([$self._y()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["y"]=1
- //>>excludeEnd("ctx");
- ][0]).__star($recv($recv(aPoint)._asPoint())._y()));
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"*",{aPoint:aPoint})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Point);
- $core.addMethod(
- $core.method({
- selector: "+",
- protocol: "arithmetic",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aPoint"],
- source: "+ aPoint\x0a\x09^ Point x: self x + aPoint asPoint x y: self y + aPoint asPoint y",
- referencedClasses: ["Point"],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["x:y:", "+", "x", "asPoint", "y"]
- }, function ($methodClass){ return function (aPoint){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($globals.Point)._x_y_([$recv([$self._x()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["x"]=1
- //>>excludeEnd("ctx");
- ][0]).__plus($recv([$recv(aPoint)._asPoint()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["asPoint"]=1
- //>>excludeEnd("ctx");
- ][0])._x())
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["+"]=1
- //>>excludeEnd("ctx");
- ][0],$recv([$self._y()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["y"]=1
- //>>excludeEnd("ctx");
- ][0]).__plus($recv($recv(aPoint)._asPoint())._y()));
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"+",{aPoint:aPoint})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Point);
- $core.addMethod(
- $core.method({
- selector: "-",
- protocol: "arithmetic",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aPoint"],
- source: "- aPoint\x0a\x09^ Point x: self x - aPoint asPoint x y: self y - aPoint asPoint y",
- referencedClasses: ["Point"],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["x:y:", "-", "x", "asPoint", "y"]
- }, function ($methodClass){ return function (aPoint){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($globals.Point)._x_y_([$recv([$self._x()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["x"]=1
- //>>excludeEnd("ctx");
- ][0]).__minus($recv([$recv(aPoint)._asPoint()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["asPoint"]=1
- //>>excludeEnd("ctx");
- ][0])._x())
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["-"]=1
- //>>excludeEnd("ctx");
- ][0],$recv([$self._y()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["y"]=1
- //>>excludeEnd("ctx");
- ][0]).__minus($recv($recv(aPoint)._asPoint())._y()));
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"-",{aPoint:aPoint})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Point);
- $core.addMethod(
- $core.method({
- selector: "/",
- protocol: "arithmetic",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aPoint"],
- source: "/ aPoint\x0a\x09^ Point x: self x / aPoint asPoint x y: self y / aPoint asPoint y",
- referencedClasses: ["Point"],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["x:y:", "/", "x", "asPoint", "y"]
- }, function ($methodClass){ return function (aPoint){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($globals.Point)._x_y_([$recv([$self._x()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["x"]=1
- //>>excludeEnd("ctx");
- ][0]).__slash($recv([$recv(aPoint)._asPoint()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["asPoint"]=1
- //>>excludeEnd("ctx");
- ][0])._x())
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["/"]=1
- //>>excludeEnd("ctx");
- ][0],$recv([$self._y()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["y"]=1
- //>>excludeEnd("ctx");
- ][0]).__slash($recv($recv(aPoint)._asPoint())._y()));
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"/",{aPoint:aPoint})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Point);
- $core.addMethod(
- $core.method({
- selector: "<",
- protocol: "comparing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aPoint"],
- source: "< aPoint\x0a\x09^ self x < aPoint x and: [\x0a\x09\x09self y < aPoint y ]",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["and:", "<", "x", "y"]
- }, function ($methodClass){ return function (aPoint){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- if($core.assert([$recv([$self._x()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["x"]=1
- //>>excludeEnd("ctx");
- ][0]).__lt($recv(aPoint)._x())
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["<"]=1
- //>>excludeEnd("ctx");
- ][0])){
- return $recv([$self._y()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["y"]=1
- //>>excludeEnd("ctx");
- ][0]).__lt($recv(aPoint)._y());
- } else {
- return false;
- }
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"<",{aPoint:aPoint})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Point);
- $core.addMethod(
- $core.method({
- selector: "<=",
- protocol: "comparing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aPoint"],
- source: "<= aPoint\x0a\x09^ self x <= aPoint x and: [\x0a\x09\x09self y <= aPoint y ]",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["and:", "<=", "x", "y"]
- }, function ($methodClass){ return function (aPoint){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- if($core.assert([$recv([$self._x()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["x"]=1
- //>>excludeEnd("ctx");
- ][0]).__lt_eq($recv(aPoint)._x())
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["<="]=1
- //>>excludeEnd("ctx");
- ][0])){
- return $recv([$self._y()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["y"]=1
- //>>excludeEnd("ctx");
- ][0]).__lt_eq($recv(aPoint)._y());
- } else {
- return false;
- }
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"<=",{aPoint:aPoint})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Point);
- $core.addMethod(
- $core.method({
- selector: "=",
- protocol: "comparing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aPoint"],
- source: "= aPoint\x0a\x09^ aPoint class = self class and: [\x0a\x09\x09(aPoint x = self x) & (aPoint y = self y) ]",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["and:", "=", "class", "&", "x", "y"]
- }, function ($methodClass){ return function (aPoint){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- if($core.assert([$recv([$recv(aPoint)._class()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["class"]=1
- //>>excludeEnd("ctx");
- ][0]).__eq($self._class())
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["="]=1
- //>>excludeEnd("ctx");
- ][0])){
- return $recv([$recv([$recv(aPoint)._x()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["x"]=1
- //>>excludeEnd("ctx");
- ][0]).__eq($self._x())
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["="]=2
- //>>excludeEnd("ctx");
- ][0]).__and($recv([$recv(aPoint)._y()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["y"]=1
- //>>excludeEnd("ctx");
- ][0]).__eq($self._y()));
- } else {
- return false;
- }
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"=",{aPoint:aPoint})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Point);
- $core.addMethod(
- $core.method({
- selector: ">",
- protocol: "comparing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aPoint"],
- source: "> aPoint\x0a\x09^ self x > aPoint x and: [\x0a\x09\x09self y > aPoint y ]",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["and:", ">", "x", "y"]
- }, function ($methodClass){ return function (aPoint){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- if($core.assert([$recv([$self._x()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["x"]=1
- //>>excludeEnd("ctx");
- ][0]).__gt($recv(aPoint)._x())
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx[">"]=1
- //>>excludeEnd("ctx");
- ][0])){
- return $recv([$self._y()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["y"]=1
- //>>excludeEnd("ctx");
- ][0]).__gt($recv(aPoint)._y());
- } else {
- return false;
- }
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,">",{aPoint:aPoint})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Point);
- $core.addMethod(
- $core.method({
- selector: ">=",
- protocol: "comparing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aPoint"],
- source: ">= aPoint\x0a\x09^ self x >= aPoint x and: [\x0a\x09\x09self y >= aPoint y ]",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["and:", ">=", "x", "y"]
- }, function ($methodClass){ return function (aPoint){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- if($core.assert([$recv([$self._x()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["x"]=1
- //>>excludeEnd("ctx");
- ][0]).__gt_eq($recv(aPoint)._x())
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx[">="]=1
- //>>excludeEnd("ctx");
- ][0])){
- return $recv([$self._y()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["y"]=1
- //>>excludeEnd("ctx");
- ][0]).__gt_eq($recv(aPoint)._y());
- } else {
- return false;
- }
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,">=",{aPoint:aPoint})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Point);
- $core.addMethod(
- $core.method({
- selector: "angle",
- protocol: "geometry",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "angle\x0a\x09^ self y arcTan: self x",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["arcTan:", "y", "x"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($self._y())._arcTan_($self._x());
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"angle",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Point);
- $core.addMethod(
- $core.method({
- selector: "asPoint",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "asPoint\x0a\x09^ self",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return self;
- }; }),
- $globals.Point);
- $core.addMethod(
- $core.method({
- selector: "corner:",
- protocol: "rectangle creation",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aPoint"],
- source: "corner: aPoint\x0a\x09^ Rectangle origin: self corner: aPoint",
- referencedClasses: ["Rectangle"],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["origin:corner:"]
- }, function ($methodClass){ return function (aPoint){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($globals.Rectangle)._origin_corner_(self,aPoint);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"corner:",{aPoint:aPoint})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Point);
- $core.addMethod(
- $core.method({
- selector: "dist:",
- protocol: "transforming",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aPoint"],
- source: "dist: aPoint \x0a\x09\x22Answer the distance between aPoint and the receiver.\x22\x0a\x09| dx dy |\x0a\x09dx := aPoint x - x.\x0a\x09dy := aPoint y - y.\x0a\x09^ (dx * dx + (dy * dy)) sqrt",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["-", "x", "y", "sqrt", "+", "*"]
- }, function ($methodClass){ return function (aPoint){
- var self=this,$self=this;
- var dx,dy;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- dx=[$recv($recv(aPoint)._x()).__minus($self.x)
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["-"]=1
- //>>excludeEnd("ctx");
- ][0];
- dy=$recv($recv(aPoint)._y()).__minus($self.y);
- return $recv($recv([$recv(dx).__star(dx)
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["*"]=1
- //>>excludeEnd("ctx");
- ][0]).__plus($recv(dy).__star(dy)))._sqrt();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"dist:",{aPoint:aPoint,dx:dx,dy:dy})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Point);
- $core.addMethod(
- $core.method({
- selector: "dotProduct:",
- protocol: "point functions",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aPoint"],
- source: "dotProduct: aPoint\x0a\x09^ (x * aPoint x) + (y * aPoint y)",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["+", "*", "x", "y"]
- }, function ($methodClass){ return function (aPoint){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv([$recv($self.x).__star($recv(aPoint)._x())
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["*"]=1
- //>>excludeEnd("ctx");
- ][0]).__plus($recv($self.y).__star($recv(aPoint)._y()));
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"dotProduct:",{aPoint:aPoint})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Point);
- $core.addMethod(
- $core.method({
- selector: "extent:",
- protocol: "rectangle creation",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aPoint"],
- source: "extent: aPoint\x0a\x09^ Rectangle origin: self extent: aPoint",
- referencedClasses: ["Rectangle"],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["origin:extent:"]
- }, function ($methodClass){ return function (aPoint){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($globals.Rectangle)._origin_extent_(self,aPoint);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"extent:",{aPoint:aPoint})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Point);
- $core.addMethod(
- $core.method({
- selector: "normal",
- protocol: "point functions",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "normal\x0a\x09\x22Answer a Point representing the unit vector rotated 90 deg clockwise. For the zero point return -1@0.\x22\x0a\x0a\x09| n d |\x0a\x09n := y negated @ x.\x0a\x09(d := (n x * n x + (n y * n y))) = 0\x0a\x09\x09 ifTrue: [ ^ -1 @0 ].\x0a\x09^ n / d sqrt",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["@", "negated", "ifTrue:", "=", "+", "*", "x", "y", "/", "sqrt"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- var n,d;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- n=[$recv($recv($self.y)._negated()).__at($self.x)
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["@"]=1
- //>>excludeEnd("ctx");
- ][0];
- d=$recv([$recv([$recv(n)._x()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["x"]=1
- //>>excludeEnd("ctx");
- ][0]).__star($recv(n)._x())
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["*"]=1
- //>>excludeEnd("ctx");
- ][0]).__plus($recv([$recv(n)._y()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["y"]=1
- //>>excludeEnd("ctx");
- ][0]).__star($recv(n)._y()));
- if($core.assert($recv(d).__eq((0)))){
- return (-1).__at((0));
- }
- return $recv(n).__slash($recv(d)._sqrt());
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"normal",{n:n,d:d})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Point);
- $core.addMethod(
- $core.method({
- selector: "normalized",
- protocol: "point functions",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "normalized\x0a\x09| r |\x0a\x09r := self r.\x0a\x09\x0a\x09r = 0\x0a\x09\x09ifTrue: [ ^ Point x: 0 y: 0 ]\x0a\x09\x09ifFalse: [ ^ Point x: x / r y: y / r ]",
- referencedClasses: ["Point"],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["r", "ifTrue:ifFalse:", "=", "x:y:", "/"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- var r;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- r=$self._r();
- if($core.assert($recv(r).__eq((0)))){
- return [$recv($globals.Point)._x_y_((0),(0))
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["x:y:"]=1
- //>>excludeEnd("ctx");
- ][0];
- } else {
- return $recv($globals.Point)._x_y_([$recv($self.x).__slash(r)
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["/"]=1
- //>>excludeEnd("ctx");
- ][0],$recv($self.y).__slash(r));
- }
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"normalized",{r:r})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Point);
- $core.addMethod(
- $core.method({
- selector: "printOn:",
- protocol: "printing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aStream"],
- source: "printOn: aStream\x0a\x09\x22Print receiver in classic x@y notation.\x22\x0a\x0a\x09x printOn: aStream.\x0a\x09\x0a\x09aStream nextPutAll: '@'.\x0a\x09(y notNil and: [ y negative ]) ifTrue: [\x0a\x09\x09\x09\x22Avoid ambiguous @- construct\x22\x0a\x09\x09\x09aStream space ].\x0a\x09\x0a\x09y printOn: aStream",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["printOn:", "nextPutAll:", "ifTrue:", "and:", "notNil", "negative", "space"]
- }, function ($methodClass){ return function (aStream){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- var $1;
- [$recv($self.x)._printOn_(aStream)
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["printOn:"]=1
- //>>excludeEnd("ctx");
- ][0];
- $recv(aStream)._nextPutAll_("@");
- if($core.assert($recv($self.y)._notNil())){
- $1=$recv($self.y)._negative();
- } else {
- $1=false;
- }
- if($core.assert($1)){
- $recv(aStream)._space();
- }
- $recv($self.y)._printOn_(aStream);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Point);
- $core.addMethod(
- $core.method({
- selector: "r",
- protocol: "polar coordinates",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "r\x0a\x09^ ((x * x) + (y * y)) sqrt",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["sqrt", "+", "*"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($recv([$recv($self.x).__star($self.x)
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["*"]=1
- //>>excludeEnd("ctx");
- ][0]).__plus($recv($self.y).__star($self.y)))._sqrt();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"r",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Point);
- $core.addMethod(
- $core.method({
- selector: "rectangle:",
- protocol: "rectangle creation",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aPoint"],
- source: "rectangle: aPoint\x0a\x09^ Rectangle point: self point: aPoint",
- referencedClasses: ["Rectangle"],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["point:point:"]
- }, function ($methodClass){ return function (aPoint){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($globals.Rectangle)._point_point_(self,aPoint);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"rectangle:",{aPoint:aPoint})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Point);
- $core.addMethod(
- $core.method({
- selector: "translateBy:",
- protocol: "transforming",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["delta"],
- source: "translateBy: delta\x0a\x09\x22Answer a Point translated by delta (an instance of Point).\x22\x0a\x09^ (delta x + x) @ (delta y + y)",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["@", "+", "x", "y"]
- }, function ($methodClass){ return function (delta){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv([$recv($recv(delta)._x()).__plus($self.x)
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["+"]=1
- //>>excludeEnd("ctx");
- ][0]).__at($recv($recv(delta)._y()).__plus($self.y));
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"translateBy:",{delta:delta})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Point);
- $core.addMethod(
- $core.method({
- selector: "x",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "x\x0a\x09^ x",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return $self.x;
- }; }),
- $globals.Point);
- $core.addMethod(
- $core.method({
- selector: "x:",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "x: aNumber\x0a\x09x := aNumber",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- $self.x=aNumber;
- return self;
- }; }),
- $globals.Point);
- $core.addMethod(
- $core.method({
- selector: "y",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "y\x0a\x09^ y",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return $self.y;
- }; }),
- $globals.Point);
- $core.addMethod(
- $core.method({
- selector: "y:",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber"],
- source: "y: aNumber\x0a\x09y := aNumber",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (aNumber){
- var self=this,$self=this;
- $self.y=aNumber;
- return self;
- }; }),
- $globals.Point);
- $core.addMethod(
- $core.method({
- selector: "classTag",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "classTag\x0a\x09\x22Returns a tag or general category for this class.\x0a\x09Typically used to help tools do some reflection.\x0a\x09Helios, for example, uses this to decide what icon the class should display.\x22\x0a\x09\x0a\x09^ 'magnitude'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return "magnitude";
- }; }),
- $globals.Point.a$cls);
- $core.addMethod(
- $core.method({
- selector: "x:y:",
- protocol: "instance creation",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aNumber", "anotherNumber"],
- source: "x: aNumber y: anotherNumber\x0a\x09^ self new\x0a\x09\x09x: aNumber;\x0a\x09\x09y: anotherNumber;\x0a\x09\x09yourself",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["x:", "new", "y:", "yourself"]
- }, function ($methodClass){ return function (aNumber,anotherNumber){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- var $1;
- $1=$self._new();
- $recv($1)._x_(aNumber);
- $recv($1)._y_(anotherNumber);
- return $recv($1)._yourself();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"x:y:",{aNumber:aNumber,anotherNumber:anotherNumber})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Point.a$cls);
- $core.addClass("Random", $globals.Object, "Kernel-Objects");
- //>>excludeStart("ide", pragmas.excludeIdeData);
- $globals.Random.comment="I an used to generate a random number and I am implemented as a trivial wrapper around javascript `Math.random()`.\x0a\x0a## API\x0a\x0aThe typical use case it to use the `#next` method like the following:\x0a\x0a\x09Random new next\x0a\x0aThis will return a float x where x < 1 and x > 0. If you want a random integer from 1 to 10 you can use `#atRandom`\x0a\x0a\x0910 atRandom\x0a\x0aA random number in a specific interval can be obtained with the following:\x0a\x0a\x09(3 to: 7) atRandom\x0a\x0aBe aware that `#to:` does not create an Interval as in other Smalltalk implementations but in fact an `Array` of numbers, so it's better to use:\x0a\x0a\x095 atRandom + 2\x0a\x0aSince `#atRandom` is implemented in `SequencableCollection` you can easy pick an element at random:\x0a\x0a\x09#('a' 'b' 'c') atRandom\x0a\x0aAs well as letter from a `String`:\x0a\x0a\x09'abc' atRandom\x0a\x0aSince Amber does not have Characters this will return a `String` of length 1 like for example `'b'`.";
- //>>excludeEnd("ide");
- $core.addMethod(
- $core.method({
- selector: "next",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "next\x0a\x09<inlineJS: 'return Math.random()'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return Math.random()"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return Math.random();
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"next",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Random);
- $core.addMethod(
- $core.method({
- selector: "next:",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["anInteger"],
- source: "next: anInteger\x0a\x09^ (1 to: anInteger) collect: [ :each | self next ]",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["collect:", "to:", "next"]
- }, function ($methodClass){ return function (anInteger){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv((1)._to_(anInteger))._collect_((function(each){
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx2) {
- //>>excludeEnd("ctx");
- return $self._next();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
- //>>excludeEnd("ctx");
- }));
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"next:",{anInteger:anInteger})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Random);
- $core.addClass("Rectangle", $globals.Object, "Kernel-Objects");
- $core.setSlots($globals.Rectangle, ["origin", "corner"]);
- //>>excludeStart("ide", pragmas.excludeIdeData);
- $globals.Rectangle.comment="I represent a Rectangle defined by my two corners.\x0a\x0aThe simplest way to create an instance is using Point methods:\x0a\x0a 1@1 corner: 2@2\x0a\x0aWIll create a rectangle with 1@1 as the top left and 2@2 at the bottom right.\x0a\x0a 1@1 extent: 1@1\x0a\x0aWill create the same rectangle, defining an origin and a size instead of an origin and a corner.";
- //>>excludeEnd("ide");
- $core.addMethod(
- $core.method({
- selector: "=",
- protocol: "testing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aRectangle"],
- source: "= aRectangle\x0a\x09^ origin = aRectangle origin and: [ corner = aRectangle corner ]",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["and:", "=", "origin", "corner"]
- }, function ($methodClass){ return function (aRectangle){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- if($core.assert([$recv($self.origin).__eq($recv(aRectangle)._origin())
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["="]=1
- //>>excludeEnd("ctx");
- ][0])){
- return $recv($self.corner).__eq($recv(aRectangle)._corner());
- } else {
- return false;
- }
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"=",{aRectangle:aRectangle})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Rectangle);
- $core.addMethod(
- $core.method({
- selector: "containsPoint:",
- protocol: "testing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aPoint"],
- source: "containsPoint: aPoint\x0a\x09^ origin <= aPoint and: [ corner >= aPoint ]",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["and:", "<=", ">="]
- }, function ($methodClass){ return function (aPoint){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- if($core.assert($recv($self.origin).__lt_eq(aPoint))){
- return $recv($self.corner).__gt_eq(aPoint);
- } else {
- return false;
- }
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"containsPoint:",{aPoint:aPoint})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Rectangle);
- $core.addMethod(
- $core.method({
- selector: "containsRect:",
- protocol: "testing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aRect"],
- source: "containsRect: aRect\x0a\x09^ aRect origin >= origin and: [ aRect corner <= corner ]",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["and:", ">=", "origin", "<=", "corner"]
- }, function ($methodClass){ return function (aRect){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- if($core.assert($recv($recv(aRect)._origin()).__gt_eq($self.origin))){
- return $recv($recv(aRect)._corner()).__lt_eq($self.corner);
- } else {
- return false;
- }
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"containsRect:",{aRect:aRect})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Rectangle);
- $core.addMethod(
- $core.method({
- selector: "corner",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "corner\x0a\x09^ corner",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return $self.corner;
- }; }),
- $globals.Rectangle);
- $core.addMethod(
- $core.method({
- selector: "origin",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "origin\x0a\x09^ origin",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return $self.origin;
- }; }),
- $globals.Rectangle);
- $core.addMethod(
- $core.method({
- selector: "printOn:",
- protocol: "testing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aStream"],
- source: "printOn: aStream\x0a\x09origin printOn: aStream.\x0a\x09aStream nextPutAll: ' corner: '.\x0a\x09corner printOn: aStream.",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["printOn:", "nextPutAll:"]
- }, function ($methodClass){ return function (aStream){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- [$recv($self.origin)._printOn_(aStream)
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["printOn:"]=1
- //>>excludeEnd("ctx");
- ][0];
- $recv(aStream)._nextPutAll_(" corner: ");
- $recv($self.corner)._printOn_(aStream);
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Rectangle);
- $core.addMethod(
- $core.method({
- selector: "setPoint:point:",
- protocol: "private",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["pt1", "pt2"],
- source: "setPoint: pt1 point: pt2\x0a\x0a\x09origin := (pt1 x min: pt2 x)@(pt1 y min: pt2 y).\x0a\x09corner := (pt1 x max: pt2 x)@(pt1 y max: pt2 y).",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["@", "min:", "x", "y", "max:"]
- }, function ($methodClass){ return function (pt1,pt2){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $self.origin=[$recv([$recv([$recv(pt1)._x()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["x"]=1
- //>>excludeEnd("ctx");
- ][0])._min_([$recv(pt2)._x()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["x"]=2
- //>>excludeEnd("ctx");
- ][0])
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["min:"]=1
- //>>excludeEnd("ctx");
- ][0]).__at($recv([$recv(pt1)._y()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["y"]=1
- //>>excludeEnd("ctx");
- ][0])._min_([$recv(pt2)._y()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["y"]=2
- //>>excludeEnd("ctx");
- ][0]))
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["@"]=1
- //>>excludeEnd("ctx");
- ][0];
- $self.corner=$recv([$recv([$recv(pt1)._x()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["x"]=3
- //>>excludeEnd("ctx");
- ][0])._max_($recv(pt2)._x())
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["max:"]=1
- //>>excludeEnd("ctx");
- ][0]).__at($recv([$recv(pt1)._y()
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- ,$ctx1.sendIdx["y"]=3
- //>>excludeEnd("ctx");
- ][0])._max_($recv(pt2)._y()));
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"setPoint:point:",{pt1:pt1,pt2:pt2})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Rectangle);
- $core.addMethod(
- $core.method({
- selector: "origin:corner:",
- protocol: "instance creation",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["anOrigin", "aCorner"],
- source: "origin: anOrigin corner: aCorner\x0a\x09^ self basicNew setPoint: anOrigin point: aCorner.",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["setPoint:point:", "basicNew"]
- }, function ($methodClass){ return function (anOrigin,aCorner){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($self._basicNew())._setPoint_point_(anOrigin,aCorner);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"origin:corner:",{anOrigin:anOrigin,aCorner:aCorner})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Rectangle.a$cls);
- $core.addMethod(
- $core.method({
- selector: "origin:extent:",
- protocol: "instance creation",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["anOrigin", "anExtent"],
- source: "origin: anOrigin extent: anExtent\x0a\x09^ self basicNew setPoint: anOrigin point: anOrigin + anExtent.",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["setPoint:point:", "basicNew", "+"]
- }, function ($methodClass){ return function (anOrigin,anExtent){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($self._basicNew())._setPoint_point_(anOrigin,$recv(anOrigin).__plus(anExtent));
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"origin:extent:",{anOrigin:anOrigin,anExtent:anExtent})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Rectangle.a$cls);
- $core.addMethod(
- $core.method({
- selector: "point:point:",
- protocol: "instance creation",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["anOrigin", "aCorner"],
- source: "point: anOrigin point: aCorner\x0a\x09^ self basicNew setPoint: anOrigin point: aCorner.",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["setPoint:point:", "basicNew"]
- }, function ($methodClass){ return function (anOrigin,aCorner){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($self._basicNew())._setPoint_point_(anOrigin,aCorner);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"point:point:",{anOrigin:anOrigin,aCorner:aCorner})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.Rectangle.a$cls);
- $core.addClass("UndefinedObject", $globals.Object, "Kernel-Objects");
- //>>excludeStart("ide", pragmas.excludeIdeData);
- $globals.UndefinedObject.comment="I describe the behavior of my sole instance, `nil`. `nil` represents a prior value for variables that have not been initialized, or for results which are meaningless.\x0a\x0a`nil` is the Smalltalk equivalent of the `undefined` JavaScript object.\x0a\x0a__note:__ When sending messages to the `undefined` JavaScript object, it will be replaced by `nil`.";
- //>>excludeEnd("ide");
- $core.addMethod(
- $core.method({
- selector: "==",
- protocol: "testing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["anObject"],
- source: "== anObject\x0a\x09^ anObject isNil",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["isNil"]
- }, function ($methodClass){ return function (anObject){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv(anObject)._isNil();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"==",{anObject:anObject})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.UndefinedObject);
- $core.addMethod(
- $core.method({
- selector: "asJavaScriptObject",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "asJavaScriptObject\x0a\x09^ null",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return null;
- }; }),
- $globals.UndefinedObject);
- $core.addMethod(
- $core.method({
- selector: "asJavaScriptSource",
- protocol: "converting",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "asJavaScriptSource\x0a\x09^ 'null'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return "null";
- }; }),
- $globals.UndefinedObject);
- $core.addMethod(
- $core.method({
- selector: "deepCopy",
- protocol: "copying",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "deepCopy\x0a\x09^ self",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return self;
- }; }),
- $globals.UndefinedObject);
- $core.addMethod(
- $core.method({
- selector: "identityHash",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "identityHash\x0a\x09^ 'NIL'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return "NIL";
- }; }),
- $globals.UndefinedObject);
- $core.addMethod(
- $core.method({
- selector: "ifNil:",
- protocol: "testing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aBlock"],
- source: "ifNil: aBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^ self ifNil: aBlock ifNotNil: []",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["ifNil:ifNotNil:"]
- }, function ($methodClass){ return function (aBlock){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $self._ifNil_ifNotNil_(aBlock,(function(){
- }));
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"ifNil:",{aBlock:aBlock})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.UndefinedObject);
- $core.addMethod(
- $core.method({
- selector: "ifNil:ifNotNil:",
- protocol: "testing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aBlock", "anotherBlock"],
- source: "ifNil: aBlock ifNotNil: anotherBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^ aBlock value",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["value"]
- }, function ($methodClass){ return function (aBlock,anotherBlock){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv(aBlock)._value();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"ifNil:ifNotNil:",{aBlock:aBlock,anotherBlock:anotherBlock})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.UndefinedObject);
- $core.addMethod(
- $core.method({
- selector: "ifNotNil:",
- protocol: "testing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aBlock"],
- source: "ifNotNil: aBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^ self",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (aBlock){
- var self=this,$self=this;
- return self;
- }; }),
- $globals.UndefinedObject);
- $core.addMethod(
- $core.method({
- selector: "ifNotNil:ifNil:",
- protocol: "testing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aBlock", "anotherBlock"],
- source: "ifNotNil: aBlock ifNil: anotherBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^ anotherBlock value",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["value"]
- }, function ($methodClass){ return function (aBlock,anotherBlock){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv(anotherBlock)._value();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"ifNotNil:ifNil:",{aBlock:aBlock,anotherBlock:anotherBlock})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.UndefinedObject);
- $core.addMethod(
- $core.method({
- selector: "isImmutable",
- protocol: "testing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "isImmutable\x0a\x09^ true",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return true;
- }; }),
- $globals.UndefinedObject);
- $core.addMethod(
- $core.method({
- selector: "isNil",
- protocol: "testing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "isNil\x0a\x09^ true",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return true;
- }; }),
- $globals.UndefinedObject);
- $core.addMethod(
- $core.method({
- selector: "notNil",
- protocol: "testing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "notNil\x0a\x09^ false",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return false;
- }; }),
- $globals.UndefinedObject);
- $core.addMethod(
- $core.method({
- selector: "printOn:",
- protocol: "printing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aStream"],
- source: "printOn: aStream\x0a\x09aStream nextPutAll: 'nil'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["nextPutAll:"]
- }, function ($methodClass){ return function (aStream){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $recv(aStream)._nextPutAll_("nil");
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.UndefinedObject);
- $core.addMethod(
- $core.method({
- selector: "shallowCopy",
- protocol: "copying",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "shallowCopy\x0a\x09^ self",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return self;
- }; }),
- $globals.UndefinedObject);
- $core.addMethod(
- $core.method({
- selector: "value",
- protocol: "evaluating",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "value\x0a\x09<inlineJS: 'return null'>",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [["inlineJS:", ["return null"]]],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return null;
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"value",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.UndefinedObject);
- $core.addMethod(
- $core.method({
- selector: "new",
- protocol: "instance creation",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "new\x0a\x09\x09self error: 'You cannot create new instances of UndefinedObject. Use nil'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["error:"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $self._error_("You cannot create new instances of UndefinedObject. Use nil");
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"new",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.UndefinedObject.a$cls);
- $core.setTraitComposition([{trait: $globals.TIsInGroup}], $globals.Object);
- $core.setTraitComposition([{trait: $globals.TSubclassable}], $globals.UndefinedObject);
- });
|