Kernel-Objects.js 194 KB

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