Kernel-Helpers.js 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581
  1. define(["amber/boot", "require"], function($boot,requirejs){"use strict";
  2. var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.asReceiver,$globals=$boot.globals;
  3. var $pkg = $core.addPackage("Kernel-Helpers");
  4. $pkg.transport = {"type":"amd","amdNamespace":"amber/core"};
  5. $core.addTrait("TIsInGroup", "Kernel-Helpers");
  6. //>>excludeStart("ide", pragmas.excludeIdeData);
  7. $globals.TIsInGroup.comment="I contain all `isXxx` checking methods that check\x0aif receiver is part of some group of objects (`isBehavior` etc.)\x0a\x0aI should NOT contain tests for\x0ahaving a certain property (`isImmutable` etc.).";
  8. //>>excludeEnd("ide");
  9. $core.addMethod(
  10. $core.method({
  11. selector: "isBehavior",
  12. protocol: "testing",
  13. //>>excludeStart("ide", pragmas.excludeIdeData);
  14. args: [],
  15. source: "isBehavior\x0a\x09^ false",
  16. referencedClasses: [],
  17. //>>excludeEnd("ide");
  18. pragmas: [],
  19. messageSends: []
  20. }, function ($methodClass){ return function (){
  21. var self=this,$self=this;
  22. return false;
  23. }; }),
  24. $globals.TIsInGroup);
  25. $core.addMethod(
  26. $core.method({
  27. selector: "isBoolean",
  28. protocol: "testing",
  29. //>>excludeStart("ide", pragmas.excludeIdeData);
  30. args: [],
  31. source: "isBoolean\x0a\x09^ false",
  32. referencedClasses: [],
  33. //>>excludeEnd("ide");
  34. pragmas: [],
  35. messageSends: []
  36. }, function ($methodClass){ return function (){
  37. var self=this,$self=this;
  38. return false;
  39. }; }),
  40. $globals.TIsInGroup);
  41. $core.addMethod(
  42. $core.method({
  43. selector: "isClass",
  44. protocol: "testing",
  45. //>>excludeStart("ide", pragmas.excludeIdeData);
  46. args: [],
  47. source: "isClass\x0a\x09^ false",
  48. referencedClasses: [],
  49. //>>excludeEnd("ide");
  50. pragmas: [],
  51. messageSends: []
  52. }, function ($methodClass){ return function (){
  53. var self=this,$self=this;
  54. return false;
  55. }; }),
  56. $globals.TIsInGroup);
  57. $core.addMethod(
  58. $core.method({
  59. selector: "isCompiledMethod",
  60. protocol: "testing",
  61. //>>excludeStart("ide", pragmas.excludeIdeData);
  62. args: [],
  63. source: "isCompiledMethod\x0a\x09^ false",
  64. referencedClasses: [],
  65. //>>excludeEnd("ide");
  66. pragmas: [],
  67. messageSends: []
  68. }, function ($methodClass){ return function (){
  69. var self=this,$self=this;
  70. return false;
  71. }; }),
  72. $globals.TIsInGroup);
  73. $core.addMethod(
  74. $core.method({
  75. selector: "isError",
  76. protocol: "testing",
  77. //>>excludeStart("ide", pragmas.excludeIdeData);
  78. args: [],
  79. source: "isError\x0a\x09^ false",
  80. referencedClasses: [],
  81. //>>excludeEnd("ide");
  82. pragmas: [],
  83. messageSends: []
  84. }, function ($methodClass){ return function (){
  85. var self=this,$self=this;
  86. return false;
  87. }; }),
  88. $globals.TIsInGroup);
  89. $core.addMethod(
  90. $core.method({
  91. selector: "isMetaclass",
  92. protocol: "testing",
  93. //>>excludeStart("ide", pragmas.excludeIdeData);
  94. args: [],
  95. source: "isMetaclass\x0a\x09^ false",
  96. referencedClasses: [],
  97. //>>excludeEnd("ide");
  98. pragmas: [],
  99. messageSends: []
  100. }, function ($methodClass){ return function (){
  101. var self=this,$self=this;
  102. return false;
  103. }; }),
  104. $globals.TIsInGroup);
  105. $core.addMethod(
  106. $core.method({
  107. selector: "isNumber",
  108. protocol: "testing",
  109. //>>excludeStart("ide", pragmas.excludeIdeData);
  110. args: [],
  111. source: "isNumber\x0a\x09^ false",
  112. referencedClasses: [],
  113. //>>excludeEnd("ide");
  114. pragmas: [],
  115. messageSends: []
  116. }, function ($methodClass){ return function (){
  117. var self=this,$self=this;
  118. return false;
  119. }; }),
  120. $globals.TIsInGroup);
  121. $core.addMethod(
  122. $core.method({
  123. selector: "isPackage",
  124. protocol: "testing",
  125. //>>excludeStart("ide", pragmas.excludeIdeData);
  126. args: [],
  127. source: "isPackage\x0a\x09^ false",
  128. referencedClasses: [],
  129. //>>excludeEnd("ide");
  130. pragmas: [],
  131. messageSends: []
  132. }, function ($methodClass){ return function (){
  133. var self=this,$self=this;
  134. return false;
  135. }; }),
  136. $globals.TIsInGroup);
  137. $core.addMethod(
  138. $core.method({
  139. selector: "isString",
  140. protocol: "testing",
  141. //>>excludeStart("ide", pragmas.excludeIdeData);
  142. args: [],
  143. source: "isString\x0a\x09^ false",
  144. referencedClasses: [],
  145. //>>excludeEnd("ide");
  146. pragmas: [],
  147. messageSends: []
  148. }, function ($methodClass){ return function (){
  149. var self=this,$self=this;
  150. return false;
  151. }; }),
  152. $globals.TIsInGroup);
  153. $core.addMethod(
  154. $core.method({
  155. selector: "isSymbol",
  156. protocol: "testing",
  157. //>>excludeStart("ide", pragmas.excludeIdeData);
  158. args: [],
  159. source: "isSymbol\x0a\x09^ false",
  160. referencedClasses: [],
  161. //>>excludeEnd("ide");
  162. pragmas: [],
  163. messageSends: []
  164. }, function ($methodClass){ return function (){
  165. var self=this,$self=this;
  166. return false;
  167. }; }),
  168. $globals.TIsInGroup);
  169. $core.addMethod(
  170. $core.method({
  171. selector: "isThenable",
  172. protocol: "testing",
  173. //>>excludeStart("ide", pragmas.excludeIdeData);
  174. args: [],
  175. source: "isThenable\x0a\x09^ false",
  176. referencedClasses: [],
  177. //>>excludeEnd("ide");
  178. pragmas: [],
  179. messageSends: []
  180. }, function ($methodClass){ return function (){
  181. var self=this,$self=this;
  182. return false;
  183. }; }),
  184. $globals.TIsInGroup);
  185. $core.addTrait("TSubclassable", "Kernel-Helpers");
  186. $core.addMethod(
  187. $core.method({
  188. selector: "subclass:",
  189. protocol: "class creation",
  190. //>>excludeStart("ide", pragmas.excludeIdeData);
  191. args: ["aString"],
  192. source: "subclass: aString \x0a\x09\x22Kept for file-in compatibility.\x22\x0a\x09^ self subclass: aString slots: #() package: nil",
  193. referencedClasses: [],
  194. //>>excludeEnd("ide");
  195. pragmas: [],
  196. messageSends: ["subclass:slots:package:"]
  197. }, function ($methodClass){ return function (aString){
  198. var self=this,$self=this;
  199. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  200. return $core.withContext(function($ctx1) {
  201. //>>excludeEnd("ctx");
  202. return $self._subclass_slots_package_(aString,[],nil);
  203. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  204. }, function($ctx1) {$ctx1.fill(self,"subclass:",{aString:aString})});
  205. //>>excludeEnd("ctx");
  206. }; }),
  207. $globals.TSubclassable);
  208. $core.addMethod(
  209. $core.method({
  210. selector: "subclass:instanceVariableNames:",
  211. protocol: "class creation",
  212. //>>excludeStart("ide", pragmas.excludeIdeData);
  213. args: ["aString", "anotherString"],
  214. source: "subclass: aString instanceVariableNames: anotherString\x0a\x09\x22Kept for file-in compatibility.\x22\x0a\x09^ self subclass: aString instanceVariableNames: anotherString package: nil",
  215. referencedClasses: [],
  216. //>>excludeEnd("ide");
  217. pragmas: [],
  218. messageSends: ["subclass:instanceVariableNames:package:"]
  219. }, function ($methodClass){ return function (aString,anotherString){
  220. var self=this,$self=this;
  221. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  222. return $core.withContext(function($ctx1) {
  223. //>>excludeEnd("ctx");
  224. return $self._subclass_instanceVariableNames_package_(aString,anotherString,nil);
  225. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  226. }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:",{aString:aString,anotherString:anotherString})});
  227. //>>excludeEnd("ctx");
  228. }; }),
  229. $globals.TSubclassable);
  230. $core.addMethod(
  231. $core.method({
  232. selector: "subclass:instanceVariableNames:category:",
  233. protocol: "class creation",
  234. //>>excludeStart("ide", pragmas.excludeIdeData);
  235. args: ["aString", "aString2", "aString3"],
  236. source: "subclass: aString instanceVariableNames: aString2 category: aString3\x0a\x09\x22Kept for file-in compatibility.\x22\x0a\x09^ self subclass: aString instanceVariableNames: aString2 package: aString3",
  237. referencedClasses: [],
  238. //>>excludeEnd("ide");
  239. pragmas: [],
  240. messageSends: ["subclass:instanceVariableNames:package:"]
  241. }, function ($methodClass){ return function (aString,aString2,aString3){
  242. var self=this,$self=this;
  243. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  244. return $core.withContext(function($ctx1) {
  245. //>>excludeEnd("ctx");
  246. return $self._subclass_instanceVariableNames_package_(aString,aString2,aString3);
  247. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  248. }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:category:",{aString:aString,aString2:aString2,aString3:aString3})});
  249. //>>excludeEnd("ctx");
  250. }; }),
  251. $globals.TSubclassable);
  252. $core.addMethod(
  253. $core.method({
  254. selector: "subclass:instanceVariableNames:classVariableNames:poolDictionaries:category:",
  255. protocol: "class creation",
  256. //>>excludeStart("ide", pragmas.excludeIdeData);
  257. args: ["aString", "aString2", "classVars", "pools", "aString3"],
  258. source: "subclass: aString instanceVariableNames: aString2 classVariableNames: classVars poolDictionaries: pools category: aString3\x0a\x09\x22Kept for file-in compatibility. ignores class variables and pools.\x22\x0a\x09^ self subclass: aString instanceVariableNames: aString2 package: aString3",
  259. referencedClasses: [],
  260. //>>excludeEnd("ide");
  261. pragmas: [],
  262. messageSends: ["subclass:instanceVariableNames:package:"]
  263. }, function ($methodClass){ return function (aString,aString2,classVars,pools,aString3){
  264. var self=this,$self=this;
  265. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  266. return $core.withContext(function($ctx1) {
  267. //>>excludeEnd("ctx");
  268. return $self._subclass_instanceVariableNames_package_(aString,aString2,aString3);
  269. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  270. }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:classVariableNames:poolDictionaries:category:",{aString:aString,aString2:aString2,classVars:classVars,pools:pools,aString3:aString3})});
  271. //>>excludeEnd("ctx");
  272. }; }),
  273. $globals.TSubclassable);
  274. $core.addMethod(
  275. $core.method({
  276. selector: "subclass:instanceVariableNames:package:",
  277. protocol: "class creation",
  278. //>>excludeStart("ide", pragmas.excludeIdeData);
  279. args: ["aString", "aString2", "aString3"],
  280. source: "subclass: aString instanceVariableNames: aString2 package: aString3\x0a\x09\x22Kept for file-in compatibility.\x22\x0a\x09^ self subclass: aString slots: aString2 instanceVariablesStringAsSlotList package: aString3",
  281. referencedClasses: [],
  282. //>>excludeEnd("ide");
  283. pragmas: [],
  284. messageSends: ["subclass:slots:package:", "instanceVariablesStringAsSlotList"]
  285. }, function ($methodClass){ return function (aString,aString2,aString3){
  286. var self=this,$self=this;
  287. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  288. return $core.withContext(function($ctx1) {
  289. //>>excludeEnd("ctx");
  290. return $self._subclass_slots_package_(aString,$recv(aString2)._instanceVariablesStringAsSlotList(),aString3);
  291. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  292. }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:package:",{aString:aString,aString2:aString2,aString3:aString3})});
  293. //>>excludeEnd("ctx");
  294. }; }),
  295. $globals.TSubclassable);
  296. $core.addMethod(
  297. $core.method({
  298. selector: "subclass:slots:",
  299. protocol: "class creation",
  300. //>>excludeStart("ide", pragmas.excludeIdeData);
  301. args: ["aString", "aCollection"],
  302. source: "subclass: aString slots: aCollection\x0a\x09\x22Kept for file-in compatibility.\x22\x0a\x09^ self subclass: aString slots: aCollection package: nil",
  303. referencedClasses: [],
  304. //>>excludeEnd("ide");
  305. pragmas: [],
  306. messageSends: ["subclass:slots:package:"]
  307. }, function ($methodClass){ return function (aString,aCollection){
  308. var self=this,$self=this;
  309. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  310. return $core.withContext(function($ctx1) {
  311. //>>excludeEnd("ctx");
  312. return $self._subclass_slots_package_(aString,aCollection,nil);
  313. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  314. }, function($ctx1) {$ctx1.fill(self,"subclass:slots:",{aString:aString,aCollection:aCollection})});
  315. //>>excludeEnd("ctx");
  316. }; }),
  317. $globals.TSubclassable);
  318. $core.addMethod(
  319. $core.method({
  320. selector: "subclass:slots:classVariables:package:",
  321. protocol: "class creation",
  322. //>>excludeStart("ide", pragmas.excludeIdeData);
  323. args: ["aString", "aCollection", "anObject", "anotherString"],
  324. source: "subclass: aString slots: aCollection classVariables: anObject package: anotherString\x0a\x09\x22Kept for file-in compatibility. ignores class variables.\x22\x0a\x09^ ClassBuilder new\x0a\x09\x09superclass: self subclass: aString slots: aCollection package: anotherString",
  325. referencedClasses: ["ClassBuilder"],
  326. //>>excludeEnd("ide");
  327. pragmas: [],
  328. messageSends: ["superclass:subclass:slots:package:", "new"]
  329. }, function ($methodClass){ return function (aString,aCollection,anObject,anotherString){
  330. var self=this,$self=this;
  331. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  332. return $core.withContext(function($ctx1) {
  333. //>>excludeEnd("ctx");
  334. return $recv($recv($globals.ClassBuilder)._new())._superclass_subclass_slots_package_(self,aString,aCollection,anotherString);
  335. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  336. }, function($ctx1) {$ctx1.fill(self,"subclass:slots:classVariables:package:",{aString:aString,aCollection:aCollection,anObject:anObject,anotherString:anotherString})});
  337. //>>excludeEnd("ctx");
  338. }; }),
  339. $globals.TSubclassable);
  340. $core.addMethod(
  341. $core.method({
  342. selector: "subclass:slots:classVariables:poolDictionaries:package:",
  343. protocol: "class creation",
  344. //>>excludeStart("ide", pragmas.excludeIdeData);
  345. args: ["aString", "aCollection", "anObject", "anotherObject", "anotherString"],
  346. source: "subclass: aString slots: aCollection classVariables: anObject poolDictionaries: anotherObject package: anotherString\x0a\x09\x22Kept for file-in compatibility. ignores class variables and pools.\x22\x0a\x09^ ClassBuilder new\x0a\x09\x09superclass: self subclass: aString slots: aCollection package: anotherString",
  347. referencedClasses: ["ClassBuilder"],
  348. //>>excludeEnd("ide");
  349. pragmas: [],
  350. messageSends: ["superclass:subclass:slots:package:", "new"]
  351. }, function ($methodClass){ return function (aString,aCollection,anObject,anotherObject,anotherString){
  352. var self=this,$self=this;
  353. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  354. return $core.withContext(function($ctx1) {
  355. //>>excludeEnd("ctx");
  356. return $recv($recv($globals.ClassBuilder)._new())._superclass_subclass_slots_package_(self,aString,aCollection,anotherString);
  357. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  358. }, function($ctx1) {$ctx1.fill(self,"subclass:slots:classVariables:poolDictionaries:package:",{aString:aString,aCollection:aCollection,anObject:anObject,anotherObject:anotherObject,anotherString:anotherString})});
  359. //>>excludeEnd("ctx");
  360. }; }),
  361. $globals.TSubclassable);
  362. $core.addMethod(
  363. $core.method({
  364. selector: "subclass:slots:package:",
  365. protocol: "class creation",
  366. //>>excludeStart("ide", pragmas.excludeIdeData);
  367. args: ["aString", "aCollection", "anotherString"],
  368. source: "subclass: aString slots: aCollection package: anotherString\x0a\x09^ ClassBuilder new\x0a\x09\x09superclass: self subclass: aString slots: aCollection package: anotherString",
  369. referencedClasses: ["ClassBuilder"],
  370. //>>excludeEnd("ide");
  371. pragmas: [],
  372. messageSends: ["superclass:subclass:slots:package:", "new"]
  373. }, function ($methodClass){ return function (aString,aCollection,anotherString){
  374. var self=this,$self=this;
  375. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  376. return $core.withContext(function($ctx1) {
  377. //>>excludeEnd("ctx");
  378. return $recv($recv($globals.ClassBuilder)._new())._superclass_subclass_slots_package_(self,aString,aCollection,anotherString);
  379. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  380. }, function($ctx1) {$ctx1.fill(self,"subclass:slots:package:",{aString:aString,aCollection:aCollection,anotherString:anotherString})});
  381. //>>excludeEnd("ctx");
  382. }; }),
  383. $globals.TSubclassable);
  384. $core.addMethod(
  385. $core.method({
  386. selector: "subclass:uses:",
  387. protocol: "class creation",
  388. //>>excludeStart("ide", pragmas.excludeIdeData);
  389. args: ["aString", "aTraitCompositionDescription"],
  390. source: "subclass: aString uses: aTraitCompositionDescription \x0a\x09\x22Kept for file-in compatibility.\x22\x0a\x09^ self subclass: aString uses: aTraitCompositionDescription slots: #() package: nil",
  391. referencedClasses: [],
  392. //>>excludeEnd("ide");
  393. pragmas: [],
  394. messageSends: ["subclass:uses:slots:package:"]
  395. }, function ($methodClass){ return function (aString,aTraitCompositionDescription){
  396. var self=this,$self=this;
  397. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  398. return $core.withContext(function($ctx1) {
  399. //>>excludeEnd("ctx");
  400. return $self._subclass_uses_slots_package_(aString,aTraitCompositionDescription,[],nil);
  401. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  402. }, function($ctx1) {$ctx1.fill(self,"subclass:uses:",{aString:aString,aTraitCompositionDescription:aTraitCompositionDescription})});
  403. //>>excludeEnd("ctx");
  404. }; }),
  405. $globals.TSubclassable);
  406. $core.addMethod(
  407. $core.method({
  408. selector: "subclass:uses:instanceVariableNames:",
  409. protocol: "class creation",
  410. //>>excludeStart("ide", pragmas.excludeIdeData);
  411. args: ["aString", "aTraitCompositionDescription", "anotherString"],
  412. source: "subclass: aString uses: aTraitCompositionDescription instanceVariableNames: anotherString\x0a\x09\x22Kept for file-in compatibility.\x22\x0a\x09^ self subclass: aString uses: aTraitCompositionDescription instanceVariableNames: anotherString package: nil",
  413. referencedClasses: [],
  414. //>>excludeEnd("ide");
  415. pragmas: [],
  416. messageSends: ["subclass:uses:instanceVariableNames:package:"]
  417. }, function ($methodClass){ return function (aString,aTraitCompositionDescription,anotherString){
  418. var self=this,$self=this;
  419. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  420. return $core.withContext(function($ctx1) {
  421. //>>excludeEnd("ctx");
  422. return $self._subclass_uses_instanceVariableNames_package_(aString,aTraitCompositionDescription,anotherString,nil);
  423. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  424. }, function($ctx1) {$ctx1.fill(self,"subclass:uses:instanceVariableNames:",{aString:aString,aTraitCompositionDescription:aTraitCompositionDescription,anotherString:anotherString})});
  425. //>>excludeEnd("ctx");
  426. }; }),
  427. $globals.TSubclassable);
  428. $core.addMethod(
  429. $core.method({
  430. selector: "subclass:uses:instanceVariableNames:category:",
  431. protocol: "class creation",
  432. //>>excludeStart("ide", pragmas.excludeIdeData);
  433. args: ["aString", "aTraitCompositionDescription", "aString2", "aString3"],
  434. source: "subclass: aString uses: aTraitCompositionDescription instanceVariableNames: aString2 category: aString3\x0a\x09\x22Kept for file-in compatibility.\x22\x0a\x09^ self subclass: aString uses: aTraitCompositionDescription instanceVariableNames: aString2 package: aString3",
  435. referencedClasses: [],
  436. //>>excludeEnd("ide");
  437. pragmas: [],
  438. messageSends: ["subclass:uses:instanceVariableNames:package:"]
  439. }, function ($methodClass){ return function (aString,aTraitCompositionDescription,aString2,aString3){
  440. var self=this,$self=this;
  441. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  442. return $core.withContext(function($ctx1) {
  443. //>>excludeEnd("ctx");
  444. return $self._subclass_uses_instanceVariableNames_package_(aString,aTraitCompositionDescription,aString2,aString3);
  445. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  446. }, function($ctx1) {$ctx1.fill(self,"subclass:uses:instanceVariableNames:category:",{aString:aString,aTraitCompositionDescription:aTraitCompositionDescription,aString2:aString2,aString3:aString3})});
  447. //>>excludeEnd("ctx");
  448. }; }),
  449. $globals.TSubclassable);
  450. $core.addMethod(
  451. $core.method({
  452. selector: "subclass:uses:instanceVariableNames:classVariableNames:poolDictionaries:category:",
  453. protocol: "class creation",
  454. //>>excludeStart("ide", pragmas.excludeIdeData);
  455. args: ["aString", "aTraitCompositionDescription", "aString2", "classVars", "pools", "aString3"],
  456. source: "subclass: aString uses: aTraitCompositionDescription instanceVariableNames: aString2 classVariableNames: classVars poolDictionaries: pools category: aString3\x0a\x09\x22Kept for file-in compatibility. ignores class variables and pools.\x22\x0a\x09^ self subclass: aString uses: aTraitCompositionDescription instanceVariableNames: aString2 package: aString3",
  457. referencedClasses: [],
  458. //>>excludeEnd("ide");
  459. pragmas: [],
  460. messageSends: ["subclass:uses:instanceVariableNames:package:"]
  461. }, function ($methodClass){ return function (aString,aTraitCompositionDescription,aString2,classVars,pools,aString3){
  462. var self=this,$self=this;
  463. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  464. return $core.withContext(function($ctx1) {
  465. //>>excludeEnd("ctx");
  466. return $self._subclass_uses_instanceVariableNames_package_(aString,aTraitCompositionDescription,aString2,aString3);
  467. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  468. }, function($ctx1) {$ctx1.fill(self,"subclass:uses:instanceVariableNames:classVariableNames:poolDictionaries:category:",{aString:aString,aTraitCompositionDescription:aTraitCompositionDescription,aString2:aString2,classVars:classVars,pools:pools,aString3:aString3})});
  469. //>>excludeEnd("ctx");
  470. }; }),
  471. $globals.TSubclassable);
  472. $core.addMethod(
  473. $core.method({
  474. selector: "subclass:uses:instanceVariableNames:package:",
  475. protocol: "class creation",
  476. //>>excludeStart("ide", pragmas.excludeIdeData);
  477. args: ["aString", "aTraitCompositionDescription", "aString2", "aString3"],
  478. source: "subclass: aString uses: aTraitCompositionDescription instanceVariableNames: aString2 package: aString3\x0a\x09\x22Kept for file-in compatibility.\x22\x0a\x09^ self subclass: aString uses: aTraitCompositionDescription slots: aString2 instanceVariablesStringAsSlotList package: aString3",
  479. referencedClasses: [],
  480. //>>excludeEnd("ide");
  481. pragmas: [],
  482. messageSends: ["subclass:uses:slots:package:", "instanceVariablesStringAsSlotList"]
  483. }, function ($methodClass){ return function (aString,aTraitCompositionDescription,aString2,aString3){
  484. var self=this,$self=this;
  485. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  486. return $core.withContext(function($ctx1) {
  487. //>>excludeEnd("ctx");
  488. return $self._subclass_uses_slots_package_(aString,aTraitCompositionDescription,$recv(aString2)._instanceVariablesStringAsSlotList(),aString3);
  489. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  490. }, function($ctx1) {$ctx1.fill(self,"subclass:uses:instanceVariableNames:package:",{aString:aString,aTraitCompositionDescription:aTraitCompositionDescription,aString2:aString2,aString3:aString3})});
  491. //>>excludeEnd("ctx");
  492. }; }),
  493. $globals.TSubclassable);
  494. $core.addMethod(
  495. $core.method({
  496. selector: "subclass:uses:slots:",
  497. protocol: "class creation",
  498. //>>excludeStart("ide", pragmas.excludeIdeData);
  499. args: ["aString", "aTraitCompositionDescription", "aCollection"],
  500. source: "subclass: aString uses: aTraitCompositionDescription slots: aCollection\x0a\x09\x22Kept for file-in compatibility.\x22\x0a\x09^ self subclass: aString uses: aTraitCompositionDescription slots: aCollection package: nil",
  501. referencedClasses: [],
  502. //>>excludeEnd("ide");
  503. pragmas: [],
  504. messageSends: ["subclass:uses:slots:package:"]
  505. }, function ($methodClass){ return function (aString,aTraitCompositionDescription,aCollection){
  506. var self=this,$self=this;
  507. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  508. return $core.withContext(function($ctx1) {
  509. //>>excludeEnd("ctx");
  510. return $self._subclass_uses_slots_package_(aString,aTraitCompositionDescription,aCollection,nil);
  511. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  512. }, function($ctx1) {$ctx1.fill(self,"subclass:uses:slots:",{aString:aString,aTraitCompositionDescription:aTraitCompositionDescription,aCollection:aCollection})});
  513. //>>excludeEnd("ctx");
  514. }; }),
  515. $globals.TSubclassable);
  516. $core.addMethod(
  517. $core.method({
  518. selector: "subclass:uses:slots:package:",
  519. protocol: "class creation",
  520. //>>excludeStart("ide", pragmas.excludeIdeData);
  521. args: ["aString", "aTraitCompositionDescription", "aCollection", "aString3"],
  522. source: "subclass: aString uses: aTraitCompositionDescription slots: aCollection package: aString3\x0a\x09| cls |\x0a\x09cls := self subclass: aString slots: aCollection package: aString3.\x0a\x09cls setTraitComposition: aTraitCompositionDescription asTraitComposition.\x0a\x09^ cls",
  523. referencedClasses: [],
  524. //>>excludeEnd("ide");
  525. pragmas: [],
  526. messageSends: ["subclass:slots:package:", "setTraitComposition:", "asTraitComposition"]
  527. }, function ($methodClass){ return function (aString,aTraitCompositionDescription,aCollection,aString3){
  528. var self=this,$self=this;
  529. var cls;
  530. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  531. return $core.withContext(function($ctx1) {
  532. //>>excludeEnd("ctx");
  533. cls=$self._subclass_slots_package_(aString,aCollection,aString3);
  534. $recv(cls)._setTraitComposition_($recv(aTraitCompositionDescription)._asTraitComposition());
  535. return cls;
  536. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  537. }, function($ctx1) {$ctx1.fill(self,"subclass:uses:slots:package:",{aString:aString,aTraitCompositionDescription:aTraitCompositionDescription,aCollection:aCollection,aString3:aString3,cls:cls})});
  538. //>>excludeEnd("ctx");
  539. }; }),
  540. $globals.TSubclassable);
  541. });