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