PageRenderTime 36ms CodeModel.GetById 26ms app.highlight 3ms RepoModel.GetById 2ms app.codeStats 0ms

/Frameworks/Foundation/objj.platform/CPArray.j

http://github.com/jfahrenkrug/MapKit-HelloWorld
Unknown | 625 lines | 625 code | 0 blank | 0 comment | 0 complexity | 488d76356deeb088e3a97c6624b6af28 MD5 | raw file
  1i;10;CPObject.ji;9;CPRange.ji;14;CPEnumerator.ji;18;CPSortDescriptor.ji;13;CPException.jc;17789;
  2var _1=objj_allocateClassPair(CPEnumerator,"_CPArrayEnumerator"),_2=_1.isa;
  3class_addIvars(_1,[new objj_ivar("_array"),new objj_ivar("_index")]);
  4objj_registerClassPair(_1);
  5objj_addClassForBundle(_1,objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
  6class_addMethods(_1,[new objj_method(sel_getUid("initWithArray:"),function(_3,_4,_5){
  7with(_3){
  8_3=objj_msgSendSuper({receiver:_3,super_class:objj_getClass("CPEnumerator")},"init");
  9if(_3){
 10_array=_5;
 11_index=-1;
 12}
 13return _3;
 14}
 15}),new objj_method(sel_getUid("nextObject"),function(_6,_7){
 16with(_6){
 17if(++_index>=objj_msgSend(_array,"count")){
 18return nil;
 19}
 20return objj_msgSend(_array,"objectAtIndex:",_index);
 21}
 22})]);
 23var _1=objj_allocateClassPair(CPEnumerator,"_CPReverseArrayEnumerator"),_2=_1.isa;
 24class_addIvars(_1,[new objj_ivar("_array"),new objj_ivar("_index")]);
 25objj_registerClassPair(_1);
 26objj_addClassForBundle(_1,objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
 27class_addMethods(_1,[new objj_method(sel_getUid("initWithArray:"),function(_8,_9,_a){
 28with(_8){
 29_8=objj_msgSendSuper({receiver:_8,super_class:objj_getClass("CPEnumerator")},"init");
 30if(_8){
 31_array=_a;
 32_index=objj_msgSend(_array,"count");
 33}
 34return _8;
 35}
 36}),new objj_method(sel_getUid("nextObject"),function(_b,_c){
 37with(_b){
 38if(--_index<0){
 39return nil;
 40}
 41return objj_msgSend(_array,"objectAtIndex:",_index);
 42}
 43})]);
 44var _1=objj_allocateClassPair(CPObject,"CPArray"),_2=_1.isa;
 45objj_registerClassPair(_1);
 46objj_addClassForBundle(_1,objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
 47class_addMethods(_1,[new objj_method(sel_getUid("init"),function(_d,_e){
 48with(_d){
 49return _d;
 50}
 51}),new objj_method(sel_getUid("initWithArray:"),function(_f,_10,_11){
 52with(_f){
 53_f=objj_msgSendSuper({receiver:_f,super_class:objj_getClass("CPObject")},"init");
 54if(_f){
 55objj_msgSend(_f,"setArray:",_11);
 56}
 57return _f;
 58}
 59}),new objj_method(sel_getUid("initWithArray:copyItems:"),function(_12,_13,_14,_15){
 60with(_12){
 61if(!_15){
 62return objj_msgSend(_12,"initWithArray:",_14);
 63}
 64_12=objj_msgSendSuper({receiver:_12,super_class:objj_getClass("CPObject")},"init");
 65if(_12){
 66var _16=0,_17=objj_msgSend(_14,"count");
 67for(;_16<_17;++i){
 68if(_14[i].isa){
 69_12[i]=objj_msgSend(_14,"copy");
 70}else{
 71_12[i]=_14;
 72}
 73}
 74}
 75return _12;
 76}
 77}),new objj_method(sel_getUid("initWithObjects:"),function(_18,_19,_1a){
 78with(_18){
 79var i=2,_1c;
 80for(;i<arguments.length&&(_1c=arguments[i])!=nil;++i){
 81push(_1c);
 82}
 83return _18;
 84}
 85}),new objj_method(sel_getUid("initWithObjects:count:"),function(_1d,_1e,_1f,_20){
 86with(_1d){
 87_1d=objj_msgSendSuper({receiver:_1d,super_class:objj_getClass("CPObject")},"init");
 88if(_1d){
 89var _21=0;
 90for(;_21<_20;++_21){
 91push(_1f[_21]);
 92}
 93}
 94return _1d;
 95}
 96}),new objj_method(sel_getUid("hash"),function(_22,_23){
 97with(_22){
 98if(_22.__address==nil){
 99_22.__address=_objj_generateObjectHash();
100}
101return _22.__address;
102}
103}),new objj_method(sel_getUid("containsObject:"),function(_24,_25,_26){
104with(_24){
105return objj_msgSend(_24,"indexOfObject:",_26)!=CPNotFound;
106}
107}),new objj_method(sel_getUid("count"),function(_27,_28){
108with(_27){
109return length;
110}
111}),new objj_method(sel_getUid("indexOfObject:"),function(_29,_2a,_2b){
112with(_29){
113if(_2b===nil){
114return CPNotFound;
115}
116var i=0,_2d=length;
117if(_2b.isa){
118for(;i<_2d;++i){
119if(objj_msgSend(_29[i],"isEqual:",_2b)){
120return i;
121}
122}
123}else{
124if(_29.indexOf){
125return indexOf(_2b);
126}else{
127for(;i<_2d;++i){
128if(_29[i]==_2b){
129return i;
130}
131}
132}
133}
134return CPNotFound;
135}
136}),new objj_method(sel_getUid("indexOfObject:inRange:"),function(_2e,_2f,_30,_31){
137with(_2e){
138if(_30===nil){
139return CPNotFound;
140}
141var i=_31.location,_33=MIN(CPMaxRange(_31),length);
142if(_30.isa){
143for(;i<_33;++i){
144if(objj_msgSend(_2e[i],"isEqual:",_30)){
145return i;
146}
147}
148}else{
149for(;i<_33;++i){
150if(_2e[i]==_30){
151return i;
152}
153}
154}
155return CPNotFound;
156}
157}),new objj_method(sel_getUid("indexOfObjectIdenticalTo:"),function(_34,_35,_36){
158with(_34){
159if(_36===nil){
160return CPNotFound;
161}
162if(_34.indexOf){
163return indexOf(_36);
164}else{
165var _37=0,_38=length;
166for(;_37<_38;++_37){
167if(_34[_37]==_36){
168return _37;
169}
170}
171}
172return CPNotFound;
173}
174}),new objj_method(sel_getUid("indexOfObjectIdenticalTo:inRange:"),function(_39,_3a,_3b,_3c){
175with(_39){
176if(_3b===nil){
177return CPNotFound;
178}
179if(_39.indexOf){
180var _3d=indexOf(_3b,_3c.location);
181if(CPLocationInRange(_3d,_3c)){
182return _3d;
183}
184}else{
185var _3d=_3c.location,_3e=MIN(CPMaxRange(_3c),length);
186for(;_3d<_3e;++_3d){
187if(_39[_3d]==_3b){
188return _3d;
189}
190}
191}
192return CPNotFound;
193}
194}),new objj_method(sel_getUid("indexOfObject:sortedBySelector:"),function(_3f,_40,_41,_42){
195with(_3f){
196return objj_msgSend(_3f,"indexOfObject:sortedByFunction:",_41,function(lhs,rhs){
197objj_msgSend(lhs,_42,rhs);
198});
199}
200}),new objj_method(sel_getUid("indexOfObject:sortedByFunction:"),function(_45,_46,_47,_48){
201with(_45){
202return objj_msgSend(_45,"indexOfObject:sortedByFunction:context:",_47,_48,nil);
203}
204}),new objj_method(sel_getUid("indexOfObject:sortedByFunction:context:"),function(_49,_4a,_4b,_4c,_4d){
205with(_49){
206if(!_4c||_4b===undefined){
207return CPNotFound;
208}
209var mid,c,_50=0,_51=length-1;
210while(_50<=_51){
211mid=FLOOR((_50+_51)/2);
212c=_4c(_4b,_49[mid],_4d);
213if(c>0){
214_50=mid+1;
215}else{
216if(c<0){
217_51=mid-1;
218}else{
219while(mid<length-1&&_4c(_4b,_49[mid+1],_4d)==CPOrderedSame){
220mid++;
221}
222return mid;
223}
224}
225}
226return CPNotFound;
227}
228}),new objj_method(sel_getUid("indexOfObject:sortedByDescriptors:"),function(_52,_53,_54,_55){
229with(_52){
230objj_msgSend(_52,"indexOfObject:sortedByFunction:",_54,function(lhs,rhs){
231var i=0,_59=objj_msgSend(_55,"count"),_5a=CPOrderedSame;
232while(i<_59){
233if((_5a=objj_msgSend(_55[i++],"compareObject:withObject:",lhs,rhs))!=CPOrderedSame){
234return _5a;
235}
236}
237return _5a;
238});
239}
240}),new objj_method(sel_getUid("lastObject"),function(_5b,_5c){
241with(_5b){
242var _5d=objj_msgSend(_5b,"count");
243if(!_5d){
244return nil;
245}
246return _5b[_5d-1];
247}
248}),new objj_method(sel_getUid("objectAtIndex:"),function(_5e,_5f,_60){
249with(_5e){
250return _5e[_60];
251}
252}),new objj_method(sel_getUid("objectsAtIndexes:"),function(_61,_62,_63){
253with(_61){
254var _64=objj_msgSend(_63,"firstIndex"),_65=[];
255while(_64!=CPNotFound){
256objj_msgSend(_65,"addObject:",_61[_64]);
257_64=objj_msgSend(_63,"indexGreaterThanIndex:",_64);
258}
259return _65;
260}
261}),new objj_method(sel_getUid("objectEnumerator"),function(_66,_67){
262with(_66){
263return objj_msgSend(objj_msgSend(_CPArrayEnumerator,"alloc"),"initWithArray:",_66);
264}
265}),new objj_method(sel_getUid("reverseObjectEnumerator"),function(_68,_69){
266with(_68){
267return objj_msgSend(objj_msgSend(_CPReverseArrayEnumerator,"alloc"),"initWithArray:",_68);
268}
269}),new objj_method(sel_getUid("makeObjectsPerformSelector:"),function(_6a,_6b,_6c){
270with(_6a){
271if(!_6c){
272objj_msgSend(CPException,"raise:reason:",CPInvalidArgumentException,"makeObjectsPerformSelector: 'aSelector' can't be nil");
273}
274var _6d=0,_6e=length;
275for(;_6d<_6e;++_6d){
276objj_msgSend(_6a[_6d],_6c);
277}
278}
279}),new objj_method(sel_getUid("makeObjectsPerformSelector:withObject:"),function(_6f,_70,_71,_72){
280with(_6f){
281if(!_71){
282objj_msgSend(CPException,"raise:reason:",CPInvalidArgumentException,"makeObjectsPerformSelector:withObject 'aSelector' can't be nil");
283}
284var _73=0,_74=length;
285for(;_73<_74;++_73){
286objj_msgSend(_6f[_73],_71,_72);
287}
288}
289}),new objj_method(sel_getUid("firstObjectCommonWithArray:"),function(_75,_76,_77){
290with(_75){
291if(!objj_msgSend(_77,"count")||!objj_msgSend(_75,"count")){
292return nil;
293}
294var i=0,_79=objj_msgSend(_75,"count");
295for(;i<_79;++i){
296if(objj_msgSend(_77,"containsObject:",_75[i])){
297return _75[i];
298}
299}
300return nil;
301}
302}),new objj_method(sel_getUid("isEqualToArray:"),function(_7a,_7b,_7c){
303with(_7a){
304if(_7a===_7c){
305return YES;
306}
307if(length!=_7c.length){
308return NO;
309}
310var _7d=0,_7e=objj_msgSend(_7a,"count");
311for(;_7d<_7e;++_7d){
312var lhs=_7a[_7d],rhs=_7c[_7d];
313if(lhs!==rhs&&(!lhs.isa||!rhs.isa||!objj_msgSend(lhs,"isEqual:",rhs))){
314return NO;
315}
316}
317return YES;
318}
319}),new objj_method(sel_getUid("isEqual:"),function(_81,_82,_83){
320with(_81){
321if(_81===_83){
322return YES;
323}
324if(!objj_msgSend(_83,"isKindOfClass:",objj_msgSend(CPArray,"class"))){
325return NO;
326}
327return objj_msgSend(_81,"isEqualToArray:",_83);
328}
329}),new objj_method(sel_getUid("arrayByAddingObject:"),function(_84,_85,_86){
330with(_84){
331if(_86===nil||_86===undefined){
332objj_msgSend(CPException,"raise:reason:",CPInvalidArgumentException,"arrayByAddingObject: object can't be nil");
333}
334var _87=objj_msgSend(_84,"copy");
335_87.push(_86);
336return _87;
337}
338}),new objj_method(sel_getUid("arrayByAddingObjectsFromArray:"),function(_88,_89,_8a){
339with(_88){
340return slice(0).concat(_8a);
341}
342}),new objj_method(sel_getUid("subarrayWithRange:"),function(_8b,_8c,_8d){
343with(_8b){
344if(_8d.location<0||CPMaxRange(_8d)>length){
345objj_msgSend(CPException,"raise:reason:",CPRangeException,"subarrayWithRange: aRange out of bounds");
346}
347return slice(_8d.location,CPMaxRange(_8d));
348}
349}),new objj_method(sel_getUid("sortedArrayUsingDescriptors:"),function(_8e,_8f,_90){
350with(_8e){
351var _91=objj_msgSend(_8e,"copy");
352objj_msgSend(_91,"sortUsingDescriptors:",_90);
353return _91;
354}
355}),new objj_method(sel_getUid("sortedArrayUsingFunction:"),function(_92,_93,_94){
356with(_92){
357return objj_msgSend(_92,"sortedArrayUsingFunction:context:",_94,nil);
358}
359}),new objj_method(sel_getUid("sortedArrayUsingFunction:context:"),function(_95,_96,_97,_98){
360with(_95){
361var _99=objj_msgSend(_95,"copy");
362objj_msgSend(_99,"sortUsingFunction:context:",_97,_98);
363return _99;
364}
365}),new objj_method(sel_getUid("sortedArrayUsingSelector:"),function(_9a,_9b,_9c){
366with(_9a){
367var _9d=objj_msgSend(_9a,"copy");
368objj_msgSend(_9d,"sortUsingSelector:",_9c);
369return _9d;
370}
371}),new objj_method(sel_getUid("componentsJoinedByString:"),function(_9e,_9f,_a0){
372with(_9e){
373return join(_a0);
374}
375}),new objj_method(sel_getUid("description"),function(_a1,_a2){
376with(_a1){
377var i=0,_a4=objj_msgSend(_a1,"count"),_a5="(";
378for(;i<_a4;++i){
379if(_a1[i].isa){
380_a5+=objj_msgSend(_a1[i],"description");
381}else{
382_a5+=_a1[i];
383}
384if(i!=_a4-1){
385_a5+=", ";
386}
387}
388return _a5+")";
389}
390}),new objj_method(sel_getUid("pathsMatchingExtensions:"),function(_a6,_a7,_a8){
391with(_a6){
392var _a9=0,_aa=objj_msgSend(_a6,"count"),_ab=[];
393for(;_a9<_aa;++_a9){
394if(_a6[_a9].isa&&objj_msgSend(_a6[_a9],"isKindOfClass:",objj_msgSend(CPString,"class"))&&objj_msgSend(_a8,"containsObject:",objj_msgSend(_a6[_a9],"pathExtension"))){
395_ab.push(_a6[_a9]);
396}
397}
398return _ab;
399}
400}),new objj_method(sel_getUid("setValue:forKey:"),function(_ac,_ad,_ae,_af){
401with(_ac){
402var i=0,_b1=objj_msgSend(_ac,"count");
403for(;i<_b1;++i){
404objj_msgSend(_ac[i],"setValue:forKey:",_ae,_af);
405}
406}
407}),new objj_method(sel_getUid("valueForKey:"),function(_b2,_b3,_b4){
408with(_b2){
409var i=0,_b6=objj_msgSend(_b2,"count"),_b7=[];
410for(;i<_b6;++i){
411_b7.push(objj_msgSend(_b2[i],"valueForKey:",_b4));
412}
413return _b7;
414}
415}),new objj_method(sel_getUid("copy"),function(_b8,_b9){
416with(_b8){
417return slice(0);
418}
419})]);
420class_addMethods(_2,[new objj_method(sel_getUid("alloc"),function(_ba,_bb){
421with(_ba){
422return [];
423}
424}),new objj_method(sel_getUid("array"),function(_bc,_bd){
425with(_bc){
426return objj_msgSend(objj_msgSend(_bc,"alloc"),"init");
427}
428}),new objj_method(sel_getUid("arrayWithArray:"),function(_be,_bf,_c0){
429with(_be){
430return objj_msgSend(objj_msgSend(_be,"alloc"),"initWithArray:",_c0);
431}
432}),new objj_method(sel_getUid("arrayWithObject:"),function(_c1,_c2,_c3){
433with(_c1){
434return objj_msgSend(objj_msgSend(_c1,"alloc"),"initWithObjects:",_c3);
435}
436}),new objj_method(sel_getUid("arrayWithObjects:"),function(_c4,_c5,_c6){
437with(_c4){
438var i=2,_c8=objj_msgSend(objj_msgSend(_c4,"alloc"),"init"),_c9;
439for(;i<arguments.length&&(_c9=arguments[i])!=nil;++i){
440_c8.push(_c9);
441}
442return _c8;
443}
444}),new objj_method(sel_getUid("arrayWithObjects:count:"),function(_ca,_cb,_cc,_cd){
445with(_ca){
446return objj_msgSend(objj_msgSend(_ca,"alloc"),"initWithObjects:count:",_cc,_cd);
447}
448})]);
449var _1=objj_getClass("CPArray");
450if(!_1){
451objj_exception_throw(new objj_exception(OBJJClassNotFoundException,"*** Could not find definition for class \"CPArray\""));
452}
453var _2=_1.isa;
454class_addMethods(_1,[new objj_method(sel_getUid("initWithCapacity:"),function(_ce,_cf,_d0){
455with(_ce){
456return _ce;
457}
458}),new objj_method(sel_getUid("addObject:"),function(_d1,_d2,_d3){
459with(_d1){
460push(_d3);
461}
462}),new objj_method(sel_getUid("addObjectsFromArray:"),function(_d4,_d5,_d6){
463with(_d4){
464splice.apply(_d4,[length,0].concat(_d6));
465}
466}),new objj_method(sel_getUid("insertObject:atIndex:"),function(_d7,_d8,_d9,_da){
467with(_d7){
468splice(_da,0,_d9);
469}
470}),new objj_method(sel_getUid("insertObjects:atIndexes:"),function(_db,_dc,_dd,_de){
471with(_db){
472var _df=objj_msgSend(_de,"count"),_e0=objj_msgSend(_dd,"count");
473if(_df!==_e0){
474objj_msgSend(CPException,"raise:reason:",CPRangeException,"the counts of the passed-in array ("+_e0+") and index set ("+_df+") must be identical.");
475}
476var _e1=objj_msgSend(_de,"lastIndex");
477if(_e1>=objj_msgSend(_db,"count")+_df){
478objj_msgSend(CPException,"raise:reason:",CPRangeException,"the last index ("+_e1+") must be less than the sum of the original count ("+objj_msgSend(_db,"count")+") and the insertion count ("+_df+").");
479}
480var _e2=0,_e3=objj_msgSend(_de,"firstIndex");
481for(;_e2<_e0;++_e2,_e3=objj_msgSend(_de,"indexGreaterThanIndex:",_e3)){
482objj_msgSend(_db,"insertObject:atIndex:",_dd[_e2],_e3);
483}
484}
485}),new objj_method(sel_getUid("replaceObjectAtIndex:withObject:"),function(_e4,_e5,_e6,_e7){
486with(_e4){
487_e4[_e6]=_e7;
488}
489}),new objj_method(sel_getUid("replaceObjectsAtIndexes:withObjects:"),function(_e8,_e9,_ea,_eb){
490with(_e8){
491var i=0,_ed=objj_msgSend(_ea,"firstIndex");
492while(_ed!=CPNotFound){
493objj_msgSend(_e8,"replaceObjectAtIndex:withObject:",_ed,_eb[i++]);
494_ed=objj_msgSend(_ea,"indexGreaterThanIndex:",_ed);
495}
496}
497}),new objj_method(sel_getUid("replaceObjectsInRange:withObjectsFromArray:range:"),function(_ee,_ef,_f0,_f1,_f2){
498with(_ee){
499if(!_f2.location&&_f2.length==objj_msgSend(_f1,"count")){
500objj_msgSend(_ee,"replaceObjectsInRange:withObjectsFromArray:",_f0,_f1);
501}else{
502splice.apply(_ee,[_f0.location,_f0.length].concat(objj_msgSend(_f1,"subarrayWithRange:",_f2)));
503}
504}
505}),new objj_method(sel_getUid("replaceObjectsInRange:withObjectsFromArray:"),function(_f3,_f4,_f5,_f6){
506with(_f3){
507splice.apply(_f3,[_f5.location,_f5.length].concat(_f6));
508}
509}),new objj_method(sel_getUid("setArray:"),function(_f7,_f8,_f9){
510with(_f7){
511if(_f7==_f9){
512return;
513}
514splice.apply(_f7,[0,length].concat(_f9));
515}
516}),new objj_method(sel_getUid("removeAllObjects"),function(_fa,_fb){
517with(_fa){
518splice(0,length);
519}
520}),new objj_method(sel_getUid("removeLastObject"),function(_fc,_fd){
521with(_fc){
522pop();
523}
524}),new objj_method(sel_getUid("removeObject:"),function(_fe,_ff,_100){
525with(_fe){
526objj_msgSend(_fe,"removeObject:inRange:",_100,CPMakeRange(0,length));
527}
528}),new objj_method(sel_getUid("removeObject:inRange:"),function(self,_cmd,_103,_104){
529with(self){
530var _105;
531while((_105=objj_msgSend(self,"indexOfObject:inRange:",_103,_104))!=CPNotFound){
532objj_msgSend(self,"removeObjectAtIndex:",_105);
533_104=CPIntersectionRange(CPMakeRange(_105,length-_105),_104);
534}
535}
536}),new objj_method(sel_getUid("removeObjectAtIndex:"),function(self,_cmd,_108){
537with(self){
538splice(_108,1);
539}
540}),new objj_method(sel_getUid("removeObjectsAtIndexes:"),function(self,_cmd,_10b){
541with(self){
542var _10c=objj_msgSend(_10b,"lastIndex");
543while(_10c!=CPNotFound){
544objj_msgSend(self,"removeObjectAtIndex:",_10c);
545_10c=objj_msgSend(_10b,"indexLessThanIndex:",_10c);
546}
547}
548}),new objj_method(sel_getUid("removeObjectIdenticalTo:"),function(self,_cmd,_10f){
549with(self){
550objj_msgSend(self,"removeObjectIdenticalTo:inRange:",_10f,CPMakeRange(0,length));
551}
552}),new objj_method(sel_getUid("removeObjectIdenticalTo:inRange:"),function(self,_cmd,_112,_113){
553with(self){
554var _114;
555while((_114=objj_msgSend(self,"indexOfObjectIdenticalTo:inRange:",_112,_113))!=CPNotFound){
556objj_msgSend(self,"removeObjectAtIndex:",_114);
557_113=CPIntersectionRange(CPMakeRange(_114,length-_114),_113);
558}
559}
560}),new objj_method(sel_getUid("removeObjectsInArray:"),function(self,_cmd,_117){
561with(self){
562var _118=0,_119=objj_msgSend(_117,"count");
563for(;_118<_119;++_118){
564objj_msgSend(self,"removeObject:",_117[_118]);
565}
566}
567}),new objj_method(sel_getUid("removeObjectsInRange:"),function(self,_cmd,_11c){
568with(self){
569splice(_11c.location,_11c.length);
570}
571}),new objj_method(sel_getUid("exchangeObjectAtIndex:withObjectAtIndex:"),function(self,_cmd,_11f,_120){
572with(self){
573var _121=self[_11f];
574self[_11f]=self[_120];
575self[_120]=_121;
576}
577}),new objj_method(sel_getUid("sortUsingDescriptors:"),function(self,_cmd,_124){
578with(self){
579sort(function(lhs,rhs){
580var i=0,_128=objj_msgSend(_124,"count"),_129=CPOrderedSame;
581while(i<_128){
582if((_129=objj_msgSend(_124[i++],"compareObject:withObject:",lhs,rhs))!=CPOrderedSame){
583return _129;
584}
585}
586return _129;
587});
588}
589}),new objj_method(sel_getUid("sortUsingFunction:context:"),function(self,_cmd,_12c,_12d){
590with(self){
591sort(function(lhs,rhs){
592return _12c(lhs,rhs,_12d);
593});
594}
595}),new objj_method(sel_getUid("sortUsingSelector:"),function(self,_cmd,_132){
596with(self){
597sort(function(lhs,rhs){
598return objj_msgSend(lhs,_132,rhs);
599});
600}
601})]);
602class_addMethods(_2,[new objj_method(sel_getUid("arrayWithCapacity:"),function(self,_cmd,_137){
603with(self){
604return objj_msgSend(objj_msgSend(self,"alloc"),"initWithCapacity:",_137);
605}
606})]);
607var _1=objj_getClass("CPArray");
608if(!_1){
609objj_exception_throw(new objj_exception(OBJJClassNotFoundException,"*** Could not find definition for class \"CPArray\""));
610}
611var _2=_1.isa;
612class_addMethods(_1,[new objj_method(sel_getUid("initWithCoder:"),function(self,_cmd,_13a){
613with(self){
614return objj_msgSend(_13a,"decodeObjectForKey:","CP.objects");
615}
616}),new objj_method(sel_getUid("encodeWithCoder:"),function(self,_cmd,_13d){
617with(self){
618objj_msgSend(_13d,"_encodeArrayOfObjects:forKey:",self,"CP.objects");
619}
620})]);
621var _1=objj_allocateClassPair(CPArray,"CPMutableArray"),_2=_1.isa;
622objj_registerClassPair(_1);
623objj_addClassForBundle(_1,objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
624Array.prototype.isa=CPArray;
625objj_msgSend(CPArray,"initialize");