Skip to content
Browse files

static -> #

  • Loading branch information...
1 parent e41078a commit 787d8c8487046f1d80cfd4c287165eb9afb68f19 @jckarter committed
Showing with 93,334 additions and 93,335 deletions.
  1. +2 −2 editor-support/SyntaxHighlightingExample.clay
  2. +5 −5 examples/cocoa/appkit/example.clay
  3. +1 −1 examples/cocoa/uikit/Example/example.clay
  4. +4 −4 lib-clay/any/any.clay
  5. +8 −8 lib-clay/arrays/arrays.clay
  6. +2 −2 lib-clay/characters/characters.clay
  7. +12,654 −12,654 lib-clay/cocoa/appkit/generated/generated.macosx.x86.32.clay
  8. +12,479 −12,479 lib-clay/cocoa/appkit/generated/generated.macosx.x86.64.clay
  9. +4,080 −4,080 lib-clay/cocoa/foundation/generated/generated.macosx.arm.clay
  10. +5,607 −5,607 lib-clay/cocoa/foundation/generated/generated.macosx.x86.32.clay
  11. +5,607 −5,607 lib-clay/cocoa/foundation/generated/generated.macosx.x86.64.clay
  12. +163 −163 lib-clay/cocoa/objc/objc.clay
  13. +1 −1 lib-clay/cocoa/objc/platform/platform.arm.clay
  14. +4 −4 lib-clay/cocoa/objc/platform/platform.x86.32.clay
  15. +3 −3 lib-clay/cocoa/objc/platform/platform.x86.64.clay
  16. +8,222 −8,222 lib-clay/cocoa/qtkit/generated/generated.macosx.x86.32.clay
  17. +8,115 −8,115 lib-clay/cocoa/qtkit/generated/generated.macosx.x86.64.clay
  18. +2,511 −2,511 lib-clay/cocoa/quartzcore/generated/generated.macosx.arm.clay
  19. +3,696 −3,696 lib-clay/cocoa/quartzcore/generated/generated.macosx.x86.32.clay
  20. +3,696 −3,696 lib-clay/cocoa/quartzcore/generated/generated.macosx.x86.64.clay
  21. +4,817 −4,817 lib-clay/cocoa/uikit/generated/generated.macosx.arm.clay
  22. +37 −37 lib-clay/cocoa/util/util.clay
  23. +10,320 −10,320 lib-clay/cocoa/webkit/generated/generated.macosx.x86.32.clay
  24. +10,251 −10,251 lib-clay/cocoa/webkit/generated/generated.macosx.x86.64.clay
  25. +5 −5 lib-clay/commandline/dispatch/dispatch.clay
  26. +1 −1 lib-clay/commandline/options/spec.clay
  27. +3 −3 lib-clay/comparators/comparators.clay
  28. +18 −18 lib-clay/complex/complex.clay
  29. +1 −1 lib-clay/defaultarguments/defaultarguments.clay
  30. +7 −7 lib-clay/deques/deques.clay
  31. +1 −1 lib-clay/destructors/destructors.clay
  32. +1 −1 lib-clay/enumerations/enumerations.clay
  33. +2 −2 lib-clay/exceptions/exceptions.clay
  34. +6 −6 lib-clay/externals/externals.clay
  35. +1 −1 lib-clay/hashmaps/hashmaps.clay
  36. +75 −75 lib-clay/identifiers/identifiers.clay
  37. +8 −8 lib-clay/interfaces/interfaces.clay
  38. +2 −2 lib-clay/io/directories/directories.unix.clay
  39. +2 −2 lib-clay/io/files/raw/raw.unix.clay
  40. +2 −2 lib-clay/io/files/raw/raw.windows.clay
  41. +1 −1 lib-clay/io/mapping/mapping.unix.clay
  42. +1 −1 lib-clay/io/mapping/mapping.windows.clay
  43. +2 −2 lib-clay/io/paths/paths.unix.clay
  44. +2 −2 lib-clay/io/paths/paths.windows.clay
  45. +5 −5 lib-clay/io/sockets/sockets.clay
  46. +3 −3 lib-clay/io/streams/streams.clay
  47. +2 −2 lib-clay/keywordarguments/keywordarguments.clay
  48. +1 −1 lib-clay/lambdas/lambdas.clay
  49. +3 −3 lib-clay/math/bigfloat/bigfloat.clay
  50. +3 −3 lib-clay/maybe/maybe.clay
  51. +4 −4 lib-clay/memory/memory.clay
  52. +96 −96 lib-clay/numbers/floats/floats.clay
  53. +57 −57 lib-clay/numbers/numbers.clay
  54. +12 −12 lib-clay/numbers/overflow/overflow.clay
  55. +77 −77 lib-clay/operators/operators.clay
  56. +3 −3 lib-clay/paged/allocator/allocator.clay
  57. +1 −1 lib-clay/paged/namedscalars/namedscalars.clay
  58. +4 −4 lib-clay/paged/namedvectors/namedvectors.clay
  59. +2 −2 lib-clay/paged/sharedpointers/sharedpointers.clay
  60. +4 −4 lib-clay/paged/vectors/vectors.clay
  61. +40 −40 lib-clay/parsing/combinators/generic/generic.clay
  62. +1 −1 lib-clay/parsing/combinators/wrapper/wrapper.clay
  63. +31 −31 lib-clay/pointers/pointers.clay
  64. +7 −7 lib-clay/printer/formatter/formatter.clay
  65. +1 −1 lib-clay/printer/printer.clay
  66. +7 −7 lib-clay/random/random.clay
  67. +19 −20 lib-clay/records/records.clay
  68. +18 −18 lib-clay/referencetypes/referencetypes.clay
  69. +39 −39 lib-clay/remote/marshaling/marshaling.clay
  70. +6 −6 lib-clay/remote/messages/messages.clay
  71. +4 −4 lib-clay/sequences/force/force.clay
  72. +4 −4 lib-clay/sequences/handle/handle.clay
  73. +2 −2 lib-clay/sequences/lazy/filtered/filtered.clay
  74. +9 −9 lib-clay/sequences/lazy/grouped/grouped.clay
  75. +3 −3 lib-clay/sequences/lazy/mapped/mapped.clay
  76. +5 −5 lib-clay/sequences/lazy/range/range.clay
  77. +3 −3 lib-clay/sequences/lazy/reversed/reversed.clay
  78. +3 −3 lib-clay/sequences/lazy/sliced/sliced.clay
  79. +2 −2 lib-clay/sequences/lazy/zipped/zipped.clay
  80. +3 −3 lib-clay/sequences/sequences.clay
  81. +3 −3 lib-clay/sharedpointers/sharedpointers.clay
  82. +9 −9 lib-clay/simd/simd.clay
  83. +4 −4 lib-clay/statics/statics.clay
  84. +1 −1 lib-clay/strings/constants/constants.clay
  85. +1 −1 lib-clay/strings/cstringrefs/cstringrefs.clay
  86. +8 −8 lib-clay/strings/strings.clay
  87. +3 −3 lib-clay/system/system.clay
  88. +2 −2 lib-clay/test/memory/memory.clay
  89. +1 −1 lib-clay/test/memory2/memory2.clay
  90. +2 −2 lib-clay/test/test.clay
  91. +8 −8 lib-clay/tuples/tuples.clay
  92. +6 −6 lib-clay/twohash/implementation/implementation.clay
  93. +13 −13 lib-clay/twohash/twohash.clay
  94. +42 −42 lib-clay/types/types.clay
  95. +5 −5 lib-clay/unions/unions.clay
  96. +4 −4 lib-clay/uniquepointers/uniquepointers.clay
  97. +33 −33 lib-clay/values/values.clay
  98. +17 −17 lib-clay/variants/nested/nested.clay
  99. +23 −23 lib-clay/variants/variants.clay
  100. +2 −2 lib-clay/vectors/buffer/buffer.clay
  101. +1 −1 lib-clay/vectors/generic/generic.clay
  102. +5 −5 lib-clay/vectors/vectors.clay
  103. +30 −30 misc/Xcode/objc-export/cocoa/objc/export/export.clay
  104. +1 −1 test/bindings/ref/1/main.clay
  105. +65 −65 test/cocoa/objc/internals/test.macosx.clay
  106. +25 −25 test/cocoa/objc/main.macosx.clay
  107. +6 −6 test/cocoa/objc/subclassing/main.macosx.clay
  108. +15 −15 test/cocoa/util/test.macosx.clay
  109. +1 −1 test/codepointers/3/main.clay
  110. +1 −1 test/codepointers/30/main.clay
  111. +2 −2 test/codepointers/31/main.clay
  112. +1 −1 test/codepointers/32/main.clay
  113. +1 −1 test/commandline/options/test.clay
  114. +7 −7 test/computedrecords/custompredicate/main.clay
  115. +3 −3 test/computedrecords/customproperty/main.clay
  116. +1 −1 test/deques/memory/main.clay
  117. +5 −5 test/dispatch/main.clay
  118. +6 −6 test/evaluator/1/main.clay
  119. +1 −1 test/exceptions/vectors/main.clay
  120. +2 −2 test/externals/main.clay
  121. +1 −1 test/globalvariables/ctorsdtors/main.clay
  122. +1 −1 test/identifiers/ident/main.clay
  123. +3 −3 test/identifiers/main.clay
  124. +1 −1 test/lambdas/stateless/main.clay
  125. +3 −3 test/llvm/3/main.clay
  126. +4 −4 test/llvm/4/main.clay
  127. +1 −1 test/memory/copy/main.clay
  128. +4 −4 test/operators/extendedassignment/main.clay
  129. +1 −1 test/operators/pod/test.clay
  130. +4 −4 test/operators/proxyassignment/main.clay
  131. +1 −1 test/patterns/main.clay
  132. +2 −2 test/permissive/main.clay
  133. +1 −1 test/remote/marshaling/test.clay
  134. +1 −1 test/sequences/force/main.clay
  135. +3 −3 test/sequences/group/test.clay
  136. +1 −1 test/sequences/multivalued/main.clay
  137. +1 −1 test/sequences/staticsized/main.clay
  138. +1 −1 test/sequences/strict/main.clay
  139. +1 −1 test/tuples/single/2/main-disabled.clay
  140. +4 −4 test/uncategorized/19/main.clay
  141. +1 −1 test/uncategorized/2/main.clay
  142. +1 −1 test/uncategorized/41/main.clay
  143. +1 −1 test/uncategorized/42/main.clay
  144. +1 −1 test/uncategorized/namedunions/main.clay
  145. +1 −1 test/uncategorized/staticfor_forwarded/main.clay
  146. +13 −13 test/values/1/main.clay
  147. +1 −1 test/valuesemantics/main.clay
View
4 editor-support/SyntaxHighlightingExample.clay
@@ -106,7 +106,7 @@ record TypesTest (
variant VariantTest (TypesTest, Int);
instance InstanceTest (VariantTest);
-keywordsTest(x, ref y, rvalue z, forward w, static v) {
+keywordsTest(x, ref y, rvalue z, forward w, #v) {
if (x) {} else {}
switch (x)
@@ -198,7 +198,7 @@ operatorsTest() {
(..x);
- static x;
+ #x;
ref x;
forward x;
}
View
10 examples/cocoa/appkit/example.clay
@@ -11,11 +11,11 @@ record ExampleAppDelegate = newClass("ExampleAppDelegate", NSObject,
),
);
-overload selector(static "performAdd:") = Void, Id;
-overload selector(static "performSubtract:") = Void, Id;
-overload selector(static "performMultiply:") = Void, Id;
-overload selector(static "performDivide:") = Void, Id;
-overload selector(static "performClear:") = Void, Id;
+overload selector(#"performAdd:") = Void, Id;
+overload selector(#"performSubtract:") = Void, Id;
+overload selector(#"performMultiply:") = Void, Id;
+overload selector(#"performDivide:") = Void, Id;
+overload selector(#"performClear:") = Void, Id;
record ExampleController = newClass("ExampleController", NSObject,
InstanceVars(
View
2 examples/cocoa/uikit/Example/example.clay
@@ -1,7 +1,7 @@
import cocoa.*;
import cocoa.uikit.*;
-overload selector(static "performMath:") = Void, UISegmentedControl;
+overload selector(#"performMath:") = Void, UISegmentedControl;
record ExampleAppDelegate = newClass("ExampleAppDelegate", NSObject,
InstanceVars(
View
8 lib-clay/any/any.clay
@@ -31,7 +31,7 @@ record Any (
);
// disable default value semantics
-overload RegularRecord?(static Any) = false;
+overload RegularRecord?(#Any) = false;
overload Any() {
return Any(
@@ -63,7 +63,7 @@ overload Any(x:Any) {
);
}
-overload BitwiseMovedType?(static Any) = true;
+overload BitwiseMovedType?(#Any) = true;
overload resetUnsafe(x:Any) {
x <-- Any();
@@ -105,10 +105,10 @@ alias box(x:T) {
}
[T]
-anyIs?(x:Any, static T) = (x.id == typeId[T]);
+anyIs?(x:Any, #T) = (x.id == typeId[T]);
[T]
-unbox(x:Any, static T) {
+unbox(x:Any, #T) {
assert(x.id == typeId[T]);
return ref Pointer[T](x.ptr)^;
}
View
16 lib-clay/arrays/arrays.clay
@@ -4,10 +4,10 @@
//
[T,n]
-overload ContiguousSequence?(static Array[T,n]) = true;
+overload ContiguousSequence?(#Array[T,n]) = true;
[T,n]
-overload SequenceContainer?(static Array[T,n]) = true;
+overload SequenceContainer?(#Array[T,n]) = true;
@@ -19,7 +19,7 @@ overload SequenceContainer?(static Array[T,n]) = true;
inline overload size(a:Array[T,n]) = SizeT(n);
[T,n]
-inline overload StaticSize(static Array[T,n]) = SizeT(n);
+inline overload StaticSize(#Array[T,n]) = SizeT(n);
[T,n,I | Integer?(I)]
inline overload index(a:Array[T,n], i:I) {
@@ -120,13 +120,13 @@ overload Array[T,n](elt: T) --> returned:Array[T,n] {
}
[n, S | Sequence?(S)]
-overload Array(static n, forward s:S) {
+overload Array(#n, forward s:S) {
alias T = SequenceElementType(S);
return Array[T,n](s);
}
[n, S | MultiValuedSequence?(S)]
-overload Array(static n, forward s:S) = Array(static n, mapped(Tuple, s));
+overload Array(#n, forward s:S) = Array(#n, mapped(Tuple, s));
@@ -175,7 +175,7 @@ overload Array[T,n](rvalue s:S) --> returned:Array[T,n] {
[S | StaticSizedSequence?(S)]
alias overload Array(s:S) {
alias T = SequenceElementType(S);
- alias n = static Int(StaticSize(S));
+ alias n = #Int(StaticSize(S));
return Array[T,n](s);
}
@@ -240,7 +240,7 @@ overload lesser?(a:Array[T,n], b:Array[T,n]) {
[..A | countValues(..A) > 0 and equalValues?(..A)]
alias array(..args:A) {
- return Array[takeValues(static 1, ..A), countValues(..A)](..args);
+ return Array[takeValues(#1, ..A), countValues(..A)](..args);
}
@@ -250,7 +250,7 @@ alias array(..args:A) {
//
[n]
-integerArray(static n) = Array(static n, range(n));
+integerArray(#n) = Array(#n, range(n));
View
4 lib-clay/characters/characters.clay
@@ -7,8 +7,8 @@ inline overload __operators__.charLiteral(code) = Char(code);
record UniChar (code:UInt32);
Character?(x) = false;
-overload Character?(static Char) = true;
-overload Character?(static UniChar) = true;
+overload Character?(#Char) = true;
+overload Character?(#UniChar) = true;
[I | Integer?(I)]
inline overload Char(c:I) --> returned:Char {
View
25,308 lib-clay/cocoa/appkit/generated/generated.macosx.x86.32.clay
12,654 additions, 12,654 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
24,958 lib-clay/cocoa/appkit/generated/generated.macosx.x86.64.clay
12,479 additions, 12,479 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
8,160 lib-clay/cocoa/foundation/generated/generated.macosx.arm.clay
4,080 additions, 4,080 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
11,214 lib-clay/cocoa/foundation/generated/generated.macosx.x86.32.clay
5,607 additions, 5,607 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
11,214 lib-clay/cocoa/foundation/generated/generated.macosx.x86.64.clay
5,607 additions, 5,607 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
326 lib-clay/cocoa/objc/objc.clay
@@ -43,7 +43,7 @@ private var objcConstantString[value]
//
[value | Identifier?(value)]
-NSSTR(static value) = ObjectHandle(&objcConstantString[value]);
+NSSTR(#value) = ObjectHandle(&objcConstantString[value]);
@@ -57,50 +57,50 @@ define encodeIdentifier;
overload encodeIdentifier() = "";
-[X] overload encodeIdentifier(static X) = "?";
-[T] overload encodeIdentifier(static Pointer[T])
+[X] overload encodeIdentifier(#X) = "?";
+[T] overload encodeIdentifier(#Pointer[T])
= IdentifierConcat("^", encodeIdentifier(T));
// XXX distinguish raw pointer from Pointer[UInt8]
-overload encodeIdentifier(static RawPointer) = "^v";
+overload encodeIdentifier(#RawPointer) = "^v";
[T | Record?(T)]
-overload encodeIdentifier(static Pointer[Pointer[T]])
+overload encodeIdentifier(#Pointer[Pointer[T]])
= IdentifierConcat("^^{", IdentifierStaticName(T), "}");
[T | Tuple?(T)]
-overload encodeIdentifier(static Pointer[Pointer[T]]) = "^^{Tuple}";
+overload encodeIdentifier(#Pointer[Pointer[T]]) = "^^{Tuple}";
[T | Union?(T)]
-overload encodeIdentifier(static Pointer[Pointer[T]]) = "^^(Union)";
+overload encodeIdentifier(#Pointer[Pointer[T]]) = "^^(Union)";
-[T | RegularRecord?(T)] overload encodeIdentifier(static T)
+[T | RegularRecord?(T)] overload encodeIdentifier(#T)
= IdentifierConcat(
"{", IdentifierStaticName(T), "=",
encodeIdentifier(..RecordFieldTypes(T)),
"}"
);
-[..Members] overload encodeIdentifier(static Tuple[..Members])
+[..Members] overload encodeIdentifier(#Tuple[..Members])
= IdentifierConcat("{Tuple=", encodeIdentifier(..RecordFieldTypes(T)), "}");
-[..Members] overload encodeIdentifier(static Union[..Members])
+[..Members] overload encodeIdentifier(#Union[..Members])
= IdentifierConcat("(Union=", encodeIdentifier(..Members), ")");
-overload encodeIdentifier(static Pointer[CChar]) = "*";
-overload encodeIdentifier(static ObjectHandle) = "@";
-overload encodeIdentifier(static ClassHandle) = "#";
-overload encodeIdentifier(static SEL) = ":";
-
-overload encodeIdentifier(static Int8) = "c";
-overload encodeIdentifier(static Int16) = "s";
-overload encodeIdentifier(static Int32) = "i";
-overload encodeIdentifier(static Int64) = "q";
-overload encodeIdentifier(static UInt8) = "C";
-overload encodeIdentifier(static UInt16) = "S";
-overload encodeIdentifier(static UInt32) = "I";
-overload encodeIdentifier(static UInt64) = "Q";
-overload encodeIdentifier(static Float32) = "f";
-overload encodeIdentifier(static Float64) = "d";
-overload encodeIdentifier(static Bool) = "c";
-overload encodeIdentifier(static Void) = "v";
-overload encodeIdentifier(static []) = "v";
+overload encodeIdentifier(#Pointer[CChar]) = "*";
+overload encodeIdentifier(#ObjectHandle) = "@";
+overload encodeIdentifier(#ClassHandle) = "#";
+overload encodeIdentifier(#SEL) = ":";
+
+overload encodeIdentifier(#Int8) = "c";
+overload encodeIdentifier(#Int16) = "s";
+overload encodeIdentifier(#Int32) = "i";
+overload encodeIdentifier(#Int64) = "q";
+overload encodeIdentifier(#UInt8) = "C";
+overload encodeIdentifier(#UInt16) = "S";
+overload encodeIdentifier(#UInt32) = "I";
+overload encodeIdentifier(#UInt64) = "Q";
+overload encodeIdentifier(#Float32) = "f";
+overload encodeIdentifier(#Float64) = "d";
+overload encodeIdentifier(#Bool) = "c";
+overload encodeIdentifier(#Void) = "v";
+overload encodeIdentifier(#[]) = "v";
[..T | countValues(..T) > 1]
overload encodeIdentifier(..types: T)
@@ -150,9 +150,9 @@ private retain(x) {
ObjectType?(T) = false;
[O | ObjectType?(O)] overload objectHandle(x: O) : ObjectHandle = x.__handle__;
-[O | ObjectType?(O)] overload ObjectParameterType(static O) = O;
+[O | ObjectType?(O)] overload ObjectParameterType(#O) = O;
-[O | ObjectRef?(O)] nil(static O) = O();
+[O | ObjectRef?(O)] nil(#O) = O();
[O | ObjectRef?(O)] nil?(obj: O) = null?(obj.__handle__);
[O | ObjectType?(O)] overload O() = O(nilHandle);
@@ -176,7 +176,7 @@ overload assign(ref left: O1, right: O2) {
record Id (__handle__: ObjectHandle);
-overload ObjectType?(static Id) = true;
+overload ObjectType?(#Id) = true;
overload nil() = nil(Id);
@@ -202,10 +202,10 @@ overload O(o: RawPointer) = O(ObjectHandle(o));
record Retained[O] (__handle__: ObjectHandle);
-[O | ObjectType?(O)] overload RegularRecord?(static Retained[O]) = false;
+[O | ObjectType?(O)] overload RegularRecord?(#Retained[O]) = false;
[O | ObjectType?(O)] overload objectHandle(obj: Retained[O]) : ObjectHandle = obj.__handle__;
-[O | ObjectType?(O)] overload ObjectParameterType(static Retained[O]) = O;
+[O | ObjectType?(O)] overload ObjectParameterType(#Retained[O]) = O;
[O | ObjectType?(O)] overload Retained[O]() = Retained[O](nilHandle);
@@ -265,7 +265,7 @@ overload assign(ref left: Retained[O1], rvalue right: Retained[O2]) {
overload destroy(obj: Retained[O]) { release(obj.__handle__); }
[O | ObjectType?(O)]
-overload BitwiseMovedType?(static Retained[O]) = true;
+overload BitwiseMovedType?(#Retained[O]) = true;
[O | ObjectType?(O)]
overload resetUnsafe(obj: Retained[O]) { obj.__handle__ = nilHandle; }
@@ -277,7 +277,7 @@ overload resetUnsafe(obj: Retained[O]) { obj.__handle__ = nilHandle; }
//
overload objectHandle(x: ObjectHandle) : ObjectHandle = x;
-overload ObjectParameterType(static ObjectHandle) = Id;
+overload ObjectParameterType(#ObjectHandle) = Id;
@@ -289,11 +289,11 @@ define SuperclassType;
define Subclass?;
[Super, Sub]
-overload Subclass?(static Super, static Sub)
+overload Subclass?(#Super, #Sub)
= Subclass?(Super, SuperclassType(Sub));
-[Super] overload Subclass?(static Super, static Super) = true;
-[Super] overload Subclass?(static Super, static Void) = false;
+[Super] overload Subclass?(#Super, #Super) = true;
+[Super] overload Subclass?(#Super, #Void) = false;
@@ -316,12 +316,12 @@ overload InstanceMethods(..values) = InstanceMethods[Type(Tuple(..values))](Tupl
//
[T | Class?(T)]
-ClassInstanceVars(static T) = [];
+ClassInstanceVars(#T) = [];
define ClassClassMethods;
define ClassInstanceMethods;
MangledModuleChar(c) = c;
-overload MangledModuleChar(static ".") = "__";
+overload MangledModuleChar(#".") = "__";
MangledModuleName(T) = IdentifierConcat(..mapValues(
MangledModuleChar,
@@ -329,33 +329,33 @@ MangledModuleName(T) = IdentifierConcat(..mapValues(
));
[T | ClayClass?(T)]
-overload ClassName(static T) {
+overload ClassName(#T) {
return StaticName(IdentifierConcat(
"clay__", MangledModuleName(T), "__", IdentifierStaticName(T)
));
}
[T | ExternalClass?(T) or ExternalClayClass?(T)]
-ClassName(static T) = StaticName(T);
+ClassName(#T) = StaticName(T);
define ClassStaticName;
[T | CallDefined?(ClassStaticName, Static[T])]
-overload ClassName(static T) = StaticName(ClassStaticName(T));
+overload ClassName(#T) = StaticName(ClassStaticName(T));
[T, name | Class?(T) and SuperclassType(T) != Void and Identifier?(name)]
-ClassIvarType(static T, static name) = ClassIvarType(SuperclassType(T), name);
+ClassIvarType(#T, #name) = ClassIvarType(SuperclassType(T), name);
[T, name | Class?(T) and Identifier?(name) and assocValue?(name, ..ClassInstanceVars(T))]
-overload ClassIvarType(static T, static name) = firstValue(..assocValue(name, ..ClassInstanceVars(T)));
+overload ClassIvarType(#T, #name) = firstValue(..assocValue(name, ..ClassInstanceVars(T)));
ClassIvarNames(T) = ..mapValues(ivar => ivar.0, ..ClassInstanceVars(T));
ClassIvarTypes(T) = ..mapValues(ivar => ivar.1, ..ClassInstanceVars(T));
ClassInstanceVar?(T, ivar) = false;
[T, ivar | Class?(T) and Identifier?(ivar)]
-overload ClassInstanceVar?(static T, static ivar) = ClassInstanceVar?(SuperclassType(T), ivar);
+overload ClassInstanceVar?(#T, #ivar) = ClassInstanceVar?(SuperclassType(T), ivar);
[T, ivar | Class?(T) and Identifier?(ivar) and assocValue?(ivar, ..ClassInstanceVars(T))]
-overload ClassInstanceVar?(static T, static ivar) = true;
+overload ClassInstanceVar?(#T, #ivar) = true;
@@ -364,7 +364,7 @@ overload ClassInstanceVar?(static T, static ivar) = true;
//
Class?(T) = Type?(T) and CallDefined?(SuperclassType, Static[T]);
-[T | Class?(T)] overload ObjectType?(static T) = true;
+[T | Class?(T)] overload ObjectType?(#T) = true;
ExternalClass?(T) = false;
define classObjcName;
@@ -372,19 +372,19 @@ define classObjcName;
ValidSuperclass?(T) = Class?(T) or T == Void;
[Super | ValidSuperclass?(Super)]
-externalClass(static Super) = recordWithProperties(
+externalClass(#Super) = recordWithProperties(
[
[SuperclassType, Super],
- [ExternalClass?, static true],
+ [ExternalClass?, #true],
],
["__handle__", ObjectHandle]
);
[name, Super | Identifier?(name) and ValidSuperclass?(Super)]
-overload externalClass(static name, static Super) = recordWithProperties(
+overload externalClass(#name, #Super) = recordWithProperties(
[
[SuperclassType, Super],
- [ExternalClass?, static true],
+ [ExternalClass?, #true],
[ClassStaticName, name],
],
["__handle__", ObjectHandle]
@@ -401,16 +401,16 @@ _objcExternalClassMake(name: StringConstant) {
}
[T | ExternalClass?(T)]
-overload objcClassMake(static T) {
+overload objcClassMake(#T) {
return _objcExternalClassMake(ClassName(T));
}
[T | ExternalClass?(T)]
-overload objcInitIvar(static T, ivarName)
+overload objcInitIvar(#T, ivarName)
= class_getInstanceVariable(objcClass[Class], cstring(StaticName(ivarName)));
[T | ExternalClass?(T)]
-overload objcInitIvarOffset(static T, ivarName)
+overload objcInitIvarOffset(#T, ivarName)
= ivar_getOffset(objcIvar[Class, ivarName]);
@@ -423,14 +423,14 @@ ClayClass?(T) = false;
ExternalClayClass?(T) = false;
[Super, IV, CM, IM] // XXX | ValidSuperclass?(Super)]
-newClass(static Super,
+newClass(#Super,
instancevars: InstanceVars[IV],
classmethods: ClassMethods[CM],
instancemethods: InstanceMethods[IM]
) = recordWithProperties(
[
[SuperclassType, Super],
- [ClayClass?, static true],
+ [ClayClass?, #true],
Tuple(ClassInstanceVars, ..unpack(instancevars.value)),
Tuple(ClassClassMethods, ..unpack(classmethods.value)),
Tuple(ClassInstanceMethods, ..unpack(instancemethods.value)),
@@ -439,14 +439,14 @@ newClass(static Super,
);
[name, Super, IV, CM, IM] // XXX ValidSuperclass?(Super)]
-overload newClass(static name, static Super,
+overload newClass(#name, #Super,
instancevars: InstanceVars[IV],
classmethods: ClassMethods[CM],
instancemethods: InstanceMethods[IM]
) = recordWithProperties(
[
[SuperclassType, Super],
- [ClayClass?, static true],
+ [ClayClass?, #true],
[ClassStaticName, name],
Tuple(ClassInstanceVars, ..unpack(instancevars.value)),
Tuple(ClassClassMethods, ..unpack(classmethods.value)),
@@ -456,15 +456,15 @@ overload newClass(static name, static Super,
);
[Super, IV, CM, IM] // XXX | ValidSuperclass?(Super)]
-newExternalClass(static Super,
+newExternalClass(#Super,
instancevars: InstanceVars[IV],
classmethods: ClassMethods[CM],
instancemethods: InstanceMethods[IM]
) = recordWithProperties(
[
[SuperclassType, Super],
- [ClayClass?, static true],
- [ExternalClayClass?, static true],
+ [ClayClass?, #true],
+ [ExternalClayClass?, #true],
Tuple(ClassInstanceVars, ..unpack(instancevars.value)),
Tuple(ClassClassMethods, ..unpack(classmethods.value)),
Tuple(ClassInstanceMethods, ..unpack(instancemethods.value)),
@@ -490,7 +490,7 @@ private raiseNSException(reason: ObjectHandle, format: ObjectHandle, ..args) {
}
[T, sel]
-private classMethodImp(static T, static sel, fn)
+private classMethodImp(#T, #sel, fn)
= makeCCodePointer(
(self, _cmd, ..args) => {
try {
@@ -508,7 +508,7 @@ private classMethodImp(static T, static sel, fn)
);
[T, sel]
-private instanceMethodImp(static T, static sel, fn)
+private instanceMethodImp(#T, #sel, fn)
= makeCCodePointer(
(self, _cmd, ..args) => {
try {
@@ -646,7 +646,7 @@ private _objcNewClassMake(
}
[T | ClayClass?(T)]
-inline overload objcClassMake(static T) : ClassHandle {
+inline overload objcClassMake(#T) : ClassHandle {
var handle = _objcNewClassMake(
objcClass[SuperclassType(T)],
ClassName(T),
@@ -670,10 +670,10 @@ inline overload objcClassMake(static T) : ClassHandle {
}
[T | ClayClass?(T)]
-overload objcInitIvar(static T, ivarName) = Ivar();
+overload objcInitIvar(#T, ivarName) = Ivar();
[T | ClayClass?(T)]
-overload objcInitIvarOffset(static T, ivarName) = PtrInt();
+overload objcInitIvarOffset(#T, ivarName) = PtrInt();
@@ -681,11 +681,11 @@ overload objcInitIvarOffset(static T, ivarName) = PtrInt();
// Class objects as objc params
//
-[T | Class?(T)] classHandle(static T) = objcClass[T];
-[T | Class?(T)] overload objectHandle(static T) = ObjectHandle(classHandle(T));
-[T | Class?(T)] overload ObjectParameterType(static Static[T]) = Id; // XXX Class
+[T | Class?(T)] classHandle(#T) = objcClass[T];
+[T | Class?(T)] overload objectHandle(#T) = ObjectHandle(classHandle(T));
+[T | Class?(T)] overload ObjectParameterType(#Static[T]) = Id; // XXX Class
-[T | ObjectRef?(T)] overload encodeIdentifier(static T) = "@";
+[T | ObjectRef?(T)] overload encodeIdentifier(#T) = "@";
// XXX class container
@@ -710,12 +710,12 @@ Selector?(sel) = FixedSelector?(sel) or VarargSelector?(sel);
selectorHandle(sel) = objcSelector[sel];
[sel | Selector?(sel)]
-SelectorArgumentCount(static sel) = countValues(..GenericSelector(sel)) - 1;
+SelectorArgumentCount(#sel) = countValues(..GenericSelector(sel)) - 1;
[sel | FixedSelector?(sel)]
-GenericSelector(static sel) = ..selector(sel);
+GenericSelector(#sel) = ..selector(sel);
[sel | VarargSelector?(sel)]
-overload GenericSelector(static sel) = ..varargSelector(sel);
+overload GenericSelector(#sel) = ..varargSelector(sel);
@@ -724,40 +724,40 @@ overload GenericSelector(static sel) = ..varargSelector(sel);
//
[T, sel | ExternalClass?(T) and FixedSelector?(sel)]
-TypedSelector(static T, static sel) = ..externalInstanceMethod(T, sel);
+TypedSelector(#T, #sel) = ..externalInstanceMethod(T, sel);
[T, sel | ExternalClass?(T) and FixedSelector?(sel)]
-overload TypedSelector(static Static[T], static sel) = ..externalClassMethod(T, sel);
+overload TypedSelector(#Static[T], #sel) = ..externalClassMethod(T, sel);
[T, sel | ClayClass?(T) and FixedSelector?(sel)]
-overload TypedSelector(static T, static sel)
+overload TypedSelector(#T, #sel)
= ..restValues(..assocValue(sel, ..ClassInstanceMethods(T)));
[T, sel | ClayClass?(T) and FixedSelector?(sel)]
-overload TypedSelector(static Static[T], static sel)
+overload TypedSelector(#Static[T], #sel)
= ..restValues(..assocValue(sel, ..ClassClassMethods(T)));
[T, sel | ExternalClass?(T) and FixedSelector?(sel)]
-TypedSelector?(static T, static sel)
+TypedSelector?(#T, #sel)
= CallDefined?(externalInstanceMethod, Static[T], Static[sel]);
[T, sel | ExternalClass?(T) and FixedSelector?(sel)]
-overload TypedSelector?(static Static[T], static sel)
+overload TypedSelector?(#Static[T], #sel)
= CallDefined?(externalClassMethod, Static[Static[T]], Static[sel]);
[T, sel | ClayClass?(T) and FixedSelector?(sel)]
-overload TypedSelector?(static T, static sel)
+overload TypedSelector?(#T, #sel)
= assocCountValues(sel, ..ClassInstanceMethods(T)) > 1;
[T, sel | ClayClass?(T) and FixedSelector?(sel)]
-overload TypedSelector?(static Static[T], static sel)
+overload TypedSelector?(#Static[T], #sel)
= assocCountValues(sel, ..ClassClassMethods(T)) > 1;
[T, sel | ExternalClass?(T) and VarargSelector?(sel)]
-overload TypedSelector(static T, static sel) = ..externalVarargInstanceMethod(T, sel);
+overload TypedSelector(#T, #sel) = ..externalVarargInstanceMethod(T, sel);
[T, sel | ExternalClass?(T) and VarargSelector?(sel)]
-overload TypedSelector(static Static[T], static sel) = ..externalVarargClassMethod(T, sel);
+overload TypedSelector(#Static[T], #sel) = ..externalVarargClassMethod(T, sel);
[T, sel | ExternalClass?(T) and VarargSelector?(sel)]
-overload TypedSelector?(static T, static sel)
+overload TypedSelector?(#T, #sel)
= CallDefined?(externalVarargInstanceMethod, Static[T], Static[sel]);
[T, sel | ExternalClass?(T) and VarargSelector?(sel)]
-overload TypedSelector?(static Static[T], static sel)
+overload TypedSelector?(#Static[T], #sel)
= CallDefined?(externalVarargClassMethod, Static[Static[T]], Static[sel]);
@@ -767,34 +767,34 @@ overload TypedSelector?(static Static[T], static sel)
//
[sel | Selector?(sel)]
-private Selector(static Id, static sel) = ..GenericSelector(sel);
+private Selector(#Id, #sel) = ..GenericSelector(sel);
[T, sel | Class?(T) and Selector?(sel)]
-overload Selector(static T, static sel) = ..GenericSelector(sel);
+overload Selector(#T, #sel) = ..GenericSelector(sel);
[T, sel | Class?(T) and Selector?(sel)]
-overload Selector(static Static[T], static sel) = ..GenericSelector(sel);
+overload Selector(#Static[T], #sel) = ..GenericSelector(sel);
[T, sel | Class?(T) and SuperclassType(T) != Void]
-overload Selector(static T, static sel) = ..Selector(SuperclassType(T), sel);
+overload Selector(#T, #sel) = ..Selector(SuperclassType(T), sel);
[T, sel |
Class?(T)
and TypedSelector?(T, sel)
]
-overload Selector(static T, static sel) = ..TypedSelector(T, sel);
+overload Selector(#T, #sel) = ..TypedSelector(T, sel);
[T, sel | Class?(T) and SuperclassType(T) != Void]
-overload Selector(static Static[T], static sel) = ..Selector(Static[SuperclassType(T)], sel);
+overload Selector(#Static[T], #sel) = ..Selector(Static[SuperclassType(T)], sel);
[T, sel |
Class?(T)
and TypedSelector?(Static[T], sel)
]
-overload Selector(static Static[T], static sel) = ..TypedSelector(Static[T], sel);
+overload Selector(#Static[T], #sel) = ..TypedSelector(Static[T], sel);
[T, sel]
-SelectorReturnType(static T, static sel) = firstValue(..Selector(T, sel));
+SelectorReturnType(#T, #sel) = firstValue(..Selector(T, sel));
[T, sel]
-SelectorArgumentTypes(static T, static sel) = ..restValues(..Selector(T, sel));
+SelectorArgumentTypes(#T, #sel) = ..restValues(..Selector(T, sel));
@@ -807,7 +807,7 @@ AllocatingSelector?(sel) = false;
IdentifierStartsWith?(sel, "alloc")
or IdentifierStartsWith?(sel, "new")
]
-overload AllocatingSelector?(static sel) = true;
+overload AllocatingSelector?(#sel) = true;
RetainingSelector?(sel) = false;
[sel |
@@ -815,24 +815,24 @@ RetainingSelector?(sel) = false;
or IdentifierStartsWith?(sel, "mutableCopy")
or sel == "retain"
]
-overload RetainingSelector?(static sel) = true;
+overload RetainingSelector?(#sel) = true;
ForwardingSelector?(sel) = false;
[sel | IdentifierStartsWith?(sel, "init")]
-overload ForwardingSelector?(static sel) = true;
+overload ForwardingSelector?(#sel) = true;
AutoreleasingSelector?(sel) = false;
-overload AutoreleasingSelector?(static "autorelease") = true;
+overload AutoreleasingSelector?(#"autorelease") = true;
[T, sel | Class?(T) and AllocatingSelector?(sel)]
-overload SelectorReturnType(static Static[T], static sel) = T;
+overload SelectorReturnType(#Static[T], #sel) = T;
[T, sel | ObjectType?(T) and (
RetainingSelector?(sel)
or ForwardingSelector?(sel)
or AutoreleasingSelector?(sel)
)]
-overload SelectorReturnType(static T, static sel) = T;
+overload SelectorReturnType(#T, #sel) = T;
@@ -842,13 +842,13 @@ overload SelectorReturnType(static T, static sel) = T;
ObjectRef?(T) = false;
[T | ObjectType?(T)]
-overload ObjectRef?(static T) = true;
+overload ObjectRef?(#T) = true;
[T | ObjectType?(T)]
-overload ObjectRef?(static Retained[T]) = true;
+overload ObjectRef?(#Retained[T]) = true;
MsgSendCompatible?(ParamType, ValueType) = false;
-[T] overload MsgSendCompatible?(static T, static T) = true;
+[T] overload MsgSendCompatible?(#T, #T) = true;
[Param, Value |
ObjectRef?(Param)
@@ -858,13 +858,13 @@ MsgSendCompatible?(ParamType, ValueType) = false;
or Subclass?(ObjectParameterType(Param), ObjectParameterType(Value))
)
]
-overload MsgSendCompatible?(static Param, static Value) = true;
+overload MsgSendCompatible?(#Param, #Value) = true;
[Value | ObjectParameterType?(Value)]
-overload MsgSendCompatible?(static Id, static Value) = true;
+overload MsgSendCompatible?(#Id, #Value) = true;
[Value | ObjectParameterType?(Value)]
-overload MsgSendCompatible?(static Retained[Id], static Value) = true;
+overload MsgSendCompatible?(#Retained[Id], #Value) = true;
// XXX selector container
@@ -872,31 +872,31 @@ overload MsgSendCompatible?(static Retained[Id], static Value) = true;
MsgSendParamType(Param) = Param;
[Param | ObjectRef?(Param)]
-overload MsgSendParamType(static Param) = ObjectHandle;
+overload MsgSendParamType(#Param) = ObjectHandle;
-overload MsgSendParamType(static Void) = static [];
-overload MsgSendParamType(static Bool) = BOOL;
+overload MsgSendParamType(#Void) = #[];
+overload MsgSendParamType(#Bool) = BOOL;
[Param]
-/*private*/ msgSendUnbox1(static Param, forward x: Param) = forward x;
+/*private*/ msgSendUnbox1(#Param, forward x: Param) = forward x;
[Param, Value | ObjectRef?(Param)]
-overload msgSendUnbox1(static Param, forward x: Value) = objectHandle(x);
+overload msgSendUnbox1(#Param, forward x: Value) = objectHandle(x);
-overload msgSendUnbox1(static Bool, forward x: Bool) = if (x) BOOL(1) else BOOL(0);
+overload msgSendUnbox1(#Bool, forward x: Bool) = if (x) BOOL(1) else BOOL(0);
private varArgUnbox1(forward x) = forward x;
[Param | ObjectRef?(Param)]
overload varArgUnbox1(forward x: Param) = objectHandle(x);
[T, S | FixedSelector?(S)]
-/*XXX private*/ msgSendUnbox(static T, static S, forward ..args)
- = forward ..mapValues2(msgSendUnbox1, static SelectorArgumentCount(S),
+/*XXX private*/ msgSendUnbox(#T, #S, forward ..args)
+ = forward ..mapValues2(msgSendUnbox1, #SelectorArgumentCount(S),
..SelectorArgumentTypes(T, S),
..args
);
[T, S | VarargSelector?(S)]
-overload msgSendUnbox(static T, static S, forward ..args) {
- var argCount = static SelectorArgumentCount(S);
+overload msgSendUnbox(#T, #S, forward ..args) {
+ var argCount = #SelectorArgumentCount(S);
return forward
..mapValues2(msgSendUnbox1, argCount, ..SelectorArgumentTypes(T, S), ..args),
..mapValues(varArgUnbox1, ..dropValues(argCount, ..args));
@@ -904,19 +904,19 @@ overload msgSendUnbox(static T, static S, forward ..args) {
[Return]
-/*XXX private*/ msgSendBox1(static Return, forward x: Return) = forward x;
+/*XXX private*/ msgSendBox1(#Return, forward x: Return) = forward x;
-overload msgSendBox1(static Void) = ;
+overload msgSendBox1(#Void) = ;
-overload msgSendBox1(static Bool, forward x: BOOL) = x != NO;
+overload msgSendBox1(#Bool, forward x: BOOL) = x != NO;
[T | ObjectRef?(T)]
-overload msgSendBox1(static T, forward x: ObjectHandle)
+overload msgSendBox1(#T, forward x: ObjectHandle)
= T(x);
[T, S | FixedSelector?(S)]
-/*XXX private*/ msgSendBox(static T, static S, forward ..args)
- = forward ..mapValues2(msgSendBox1, static SelectorArgumentCount(S),
+/*XXX private*/ msgSendBox(#T, #S, forward ..args)
+ = forward ..mapValues2(msgSendBox1, #SelectorArgumentCount(S),
..SelectorArgumentTypes(T, S),
..args
);
@@ -937,36 +937,36 @@ SelectorTypeEncoding(T, S)
//
[T, S | Selector?(S)]
-private objc_msgSend_for(static T, static S) = objc_msgSend;
+private objc_msgSend_for(#T, #S) = objc_msgSend;
[T, S | Selector?(S) and StRet?(SelectorReturnParamType(T, S))]
-overload objc_msgSend_for(static T, static S) = objc_msgSend_stret;
+overload objc_msgSend_for(#T, #S) = objc_msgSend_stret;
[T, S | Selector?(S) and FpRet?(SelectorReturnParamType(T, S))]
-overload objc_msgSend_for(static T, static S) = objc_msgSend_fpret;
+overload objc_msgSend_for(#T, #S) = objc_msgSend_fpret;
[T, S | Selector?(S)]
-private objc_msgSendSuper_for(static T, static S) = objc_msgSendSuper;
+private objc_msgSendSuper_for(#T, #S) = objc_msgSendSuper;
[T, S | Selector?(S) and StRet?(SelectorReturnParamType(T, S))]
-overload objc_msgSendSuper_for(static T, static S) = objc_msgSendSuper_stret;
+overload objc_msgSendSuper_for(#T, #S) = objc_msgSendSuper_stret;
[T, S | Selector?(S)]
-private class_getMethodImplementation_for(static T, static S) = class_getMethodImplementation;
+private class_getMethodImplementation_for(#T, #S) = class_getMethodImplementation;
[T, S | Selector?(S) and StRet?(SelectorReturnParamType(T, S))]
-overload class_getMethodImplementation_for(static T, static S) = class_getMethodImplementation_stret;
+overload class_getMethodImplementation_for(#T, #S) = class_getMethodImplementation_stret;
SelectorCallableWith?(C, S, ..T) = false;
[C, S, ..TT | FixedSelector?(S) and countValues(..TT) == SelectorArgumentCount(S)]
-overload SelectorCallableWith?(static C, static S, ..T: TT)
+overload SelectorCallableWith?(#C, #S, ..T: TT)
= _SelectorCallableWith?(C, S, ..T);
[C, S, ..TT | VarargSelector?(S) and countValues(..TT) >= SelectorArgumentCount(S)]
-overload SelectorCallableWith?(static C, static S, ..T: TT)
- = _SelectorCallableWith?(C, S, ..takeValues(static countValues(..varargSelector(S)) - 1, ..T));
+overload SelectorCallableWith?(#C, #S, ..T: TT)
+ = _SelectorCallableWith?(C, S, ..takeValues(#countValues(..varargSelector(S)) - 1, ..T));
private _SelectorCallableWith?(C, S, ..T) {
alias Params = Tuple(..SelectorArgumentTypes(C, S));
alias Values = Tuple(..T);
- ..for (n in staticIntegers(static countValues(..T))) {
+ ..for (n in staticIntegers(#countValues(..T))) {
if (not MsgSendCompatible?(staticIndex(Params, n), staticIndex(Values, n)))
return false;
}
@@ -974,13 +974,13 @@ private _SelectorCallableWith?(C, S, ..T) {
}
[C, S | FixedSelector?(S)]
-SelectorImpType(static C, static S) = CCodePointer[
+SelectorImpType(#C, #S) = CCodePointer[
[ObjectHandle, SelectorHandle, ..SelectorArgumentParamTypes(C, S)],
SelectorReturnParamType(C, S)
];
[C, S | VarargSelector?(S)]
-overload SelectorImpType(static C, static S) = VarArgsCCodePointer[
+overload SelectorImpType(#C, #S) = VarArgsCCodePointer[
[ObjectHandle, SelectorHandle, ..SelectorArgumentParamTypes(C, S)],
SelectorReturnParamType(C, S)
];
@@ -989,21 +989,21 @@ private msgSender(C, S)
= SelectorImpType(C, S)(objc_msgSend_for(C, S));
[C, S | FixedSelector?(S)]
-private msgSenderSuper(static C, static S)
+private msgSenderSuper(#C, #S)
= CCodePointer[
[Pointer[ObjcSuper], SelectorHandle, ..SelectorArgumentParamTypes(C, S)],
SelectorReturnParamType(C, S)
](objc_msgSendSuper_for(C, S));
[C, S | VarargSelector?(S)]
-overload msgSenderSuper(static C, static S)
+overload msgSenderSuper(#C, #S)
= VarArgsCCodePointer[
[Pointer[ObjcSuper], SelectorHandle, ..SelectorArgumentParamTypes(C, S)],
SelectorReturnParamType(C, S)
](objc_msgSendSuper_for(C, S));
[SelfT, S, ..T]
-msgSend(static SelfT, imp, self, static S, forward ..args: T) {
+msgSend(#SelfT, imp, self, #S, forward ..args: T) {
var cmdHandle = selectorHandle(S);
return forward ..mapValues(ret => msgSendBox1(SelectorReturnType(SelfT, S), ret),
@@ -1018,42 +1018,42 @@ msgSend(static SelfT, imp, self, static S, forward ..args: T) {
//
private _identifierSelectorChar(c) = c;
-overload _identifierSelectorChar(static "_") = ":";
+overload _identifierSelectorChar(#"_") = ":";
[argCount, underscoreCount, lastCharacter]
-private _extraColon(static argCount, static underscoreCount, static lastCharacter) = ;
+private _extraColon(#argCount, #underscoreCount, #lastCharacter) = ;
[argCount, underscoreCount, lastCharacter |
argCount > underscoreCount
and lastCharacter != "_"
and lastCharacter != ":"
]
-overload _extraColon(static argCount, static underscoreCount, static lastCharacter)
+overload _extraColon(#argCount, #underscoreCount, #lastCharacter)
= ":";
-[argCount] private _identifierSelector(static argCount, ..chars) {
+[argCount] private _identifierSelector(#argCount, ..chars) {
var lastCharacter = lastValue(..chars);
return IdentifierConcat(
..mapValues(_identifierSelectorChar, ..chars),
- .._extraColon(static argCount, static countOccurrences("_", ..chars), lastCharacter)
+ .._extraColon(#argCount, #countOccurrences("_", ..chars), lastCharacter)
);
}
private var memoIdentifierSelector[identifier, argCount]
- = _identifierSelector(static argCount, ..IdentifierChars(identifier));
+ = _identifierSelector(#argCount, ..IdentifierChars(identifier));
-[argCount] identifierSelector(identifier, static argCount)
+[argCount] identifierSelector(identifier, #argCount)
= memoIdentifierSelector[identifier, argCount];
[identifier, minArity]
-private _ValidMethodIdentifier?(static identifier, static minArity)
- = Selector?(identifierSelector(identifier, static minArity))
- or Selector?(identifierSelector(identifier, static minArity+1));
+private _ValidMethodIdentifier?(#identifier, #minArity)
+ = Selector?(identifierSelector(identifier, #minArity))
+ or Selector?(identifierSelector(identifier, #minArity+1));
[identifier]
-ValidMethodIdentifier?(static identifier) = true;
+ValidMethodIdentifier?(#identifier) = true;
//= _ValidMethodIdentifier?(
- // static identifier,
- // static countOccurrences("_", ...IdentifierChars(identifier))
+ // #identifier,
+ // #countOccurrences("_", ...IdentifierChars(identifier))
//);
@@ -1068,13 +1068,13 @@ overload MethodRef(T, forward value, identifier)
= MethodRef[T, Type(captureValue(value)), identifier](captureValue(value));
[T, cmd | ObjectRef?(T) and cmd != "__handle__" and ValidMethodIdentifier?(cmd)]
-overload fieldRef(forward self: T, static cmd)
+overload fieldRef(forward self: T, #cmd)
= MethodRef(ObjectParameterType(T), self, cmd);
[T, cmd | Class?(T) and ValidMethodIdentifier?(cmd)]
-overload fieldRef(static T, static cmd) = MethodRef(Static[T], T, cmd);
+overload fieldRef(#T, #cmd) = MethodRef(Static[T], T, cmd);
[T, selector, ..Args | ObjectParameterType?(T) and Selector?(selector)]
-callMethod(forward self: T, static selector, forward ..args: Args)
+callMethod(forward self: T, #selector, forward ..args: Args)
= forward ..msgSend(
T,
msgSender(T, selector),
@@ -1084,15 +1084,15 @@ callMethod(forward self: T, static selector, forward ..args: Args)
);
[T, Captured, identifier, ..Args |
- Selector?(identifierSelector(identifier, static countValues(..Args)))
+ Selector?(identifierSelector(identifier, #countValues(..Args)))
and SelectorCallableWith?(
T,
- identifierSelector(identifier, static countValues(..Args)),
+ identifierSelector(identifier, #countValues(..Args)),
..Args
)
]
overload call(method: MethodRef[T, Captured, identifier], forward ..args: Args) {
- var selector = identifierSelector(identifier, static countValues(..Args));
+ var selector = identifierSelector(identifier, #countValues(..Args));
return forward ..msgSend(
T,
msgSender(T, selector),
@@ -1111,7 +1111,7 @@ overload call(method: MethodRef[T, Captured, identifier], forward ..args: Args)
record MethodDelegate[T, selector] (self: ObjectHandle, imp: IMP);
[T, selector | ObjectParameterType?(T) and Selector?(selector)]
-overload MethodDelegate(self: T, static selector) {
+overload MethodDelegate(self: T, #selector) {
var selfHandle = objectHandle(self);
var imp = class_getMethodImplementation_for(T, selector)(
object_getClass(selfHandle),
@@ -1145,7 +1145,7 @@ overload dereference(obj: Retained[T]) = IvarsRef[T](objectHandle(obj));
[T, ivar | Class?(T) and ivar != "__handle__" and ClassInstanceVar?(T, ivar)]
-overload fieldRef(ivars: IvarsRef[T], static ivar)
+overload fieldRef(ivars: IvarsRef[T], #ivar)
= ref Pointer[ClassIvarType(T, ivar)](
Pointer[UInt8](ivars.__handle__) + objcIvarOffset[T, ivar]
)^;
@@ -1171,11 +1171,11 @@ overload SuperMethodRef(forward super: SuperRef[T, Captured], identifier)
= SuperMethodRef[T, Captured, identifier](super.__self__);
[T, Captured, cmd | Class?(T) and cmd != "__self__"]
-overload fieldRef(sup: SuperRef[T, Captured], static cmd)
+overload fieldRef(sup: SuperRef[T, Captured], #cmd)
= SuperMethodRef(sup, cmd);
[T, Captured, selector, ..Args | Class?(T) and Selector?(selector)]
-overload callMethod(sup: SuperRef[T, Captured], static selector, forward ..args: Args) {
+overload callMethod(sup: SuperRef[T, Captured], #selector, forward ..args: Args) {
var super = ObjcSuper(
objectHandle(forwardValue(sup.__self__)),
classHandle(SuperclassType(T))
@@ -1191,7 +1191,7 @@ overload callMethod(sup: SuperRef[T, Captured], static selector, forward ..args:
[T, Captured, identifier, ..Args]
overload call(method: SuperMethodRef[T, Captured, identifier], forward ..args: Args) {
- var selector = identifierSelector(identifier, static countValues(..Args));
+ var selector = identifierSelector(identifier, #countValues(..Args));
var super = ObjcSuper(
objectHandle(forwardValue(method.__self__)),
classHandle(SuperclassType(T))
View
2 lib-clay/cocoa/objc/platform/platform.arm.clay
@@ -5,7 +5,7 @@ StRet?(type) = false;
//Fp2Ret?(type) = false;
// XXX not tested!
-[T | Type?(T)] overload StRet?(static T) = not inValues?(TypeSize(T), 1, 2, 4, 8);
+[T | Type?(T)] overload StRet?(#T) = not inValues?(TypeSize(T), 1, 2, 4, 8);
external __CFConstantStringClassReference : Opaque;
View
8 lib-clay/cocoa/objc/platform/platform.x86.32.clay
@@ -4,12 +4,12 @@ FpRet?(type) = false;
StRet?(type) = false;
//Fp2Ret?(type) = false;
-overload FpRet?(static Float32) = true;
-overload FpRet?(static Float64) = true;
-//FpRet?(static Float80) = true;
+overload FpRet?(#Float32) = true;
+overload FpRet?(#Float64) = true;
+//FpRet?(#Float80) = true;
// note: structs never return in registers on linux, netbsd, solaris
-[T | Type?(T)] overload StRet?(static T) = not inValues?(TypeSize(T), 1, 2, 4, 8);
+[T | Type?(T)] overload StRet?(#T) = not inValues?(TypeSize(T), 1, 2, 4, 8);
external __CFConstantStringClassReference : Opaque;
View
6 lib-clay/cocoa/objc/platform/platform.x86.64.clay
@@ -4,10 +4,10 @@ FpRet?(type) = false;
StRet?(type) = false;
//Fp2Ret?(type) = false;
-//overload FpRet?(static Float80) = true;
-//overload Fp2Ret?(static Complex[Float80]) = true;
+//overload FpRet?(#Float80) = true;
+//overload Fp2Ret?(#Complex[Float80]) = true;
-[T | Type?(T)] overload StRet?(static T) = TypeSize(T) > 16;
+[T | Type?(T)] overload StRet?(#T) = TypeSize(T) > 16;
external __CFConstantStringClassReference : Opaque;
View
16,444 lib-clay/cocoa/qtkit/generated/generated.macosx.x86.32.clay
8,222 additions, 8,222 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
16,230 lib-clay/cocoa/qtkit/generated/generated.macosx.x86.64.clay
8,115 additions, 8,115 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
5,022 lib-clay/cocoa/quartzcore/generated/generated.macosx.arm.clay
2,511 additions, 2,511 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
7,392 lib-clay/cocoa/quartzcore/generated/generated.macosx.x86.32.clay
3,696 additions, 3,696 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
7,392 lib-clay/cocoa/quartzcore/generated/generated.macosx.x86.64.clay
3,696 additions, 3,696 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
9,634 lib-clay/cocoa/uikit/generated/generated.macosx.arm.clay
4,817 additions, 4,817 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
74 lib-clay/cocoa/util/util.clay
@@ -50,7 +50,7 @@ overload NSNumber(x: Bool) = NSNumber.numberWithBool(x);
// NSString overloads
//
[ident | Identifier?(ident)]
-overload NSString(static ident) = NSString(NSSTR(ident));
+overload NSString(#ident) = NSString(NSSTR(ident));
[S | CCompatibleString?(S)]
overload NSString(s: S) = NSString(NSString.stringWithUTF8String(cstring(s)));
@@ -79,7 +79,7 @@ record NSValueTypeMismatch (object: Id);
instance Exception (NSValueTypeMismatch);
[T, O | ObjectRef?(O)]
-fromNSValue(static T, o: O) {
+fromNSValue(#T, o: O) {
if (CStringRef(o.objCType()) != encode(T))
throw NSValueTypeMismatch(Id(o));
else
@@ -87,12 +87,12 @@ fromNSValue(static T, o: O) {
}
[T, O | ObjectRef?(O)]
-fromNSValueUnsafe(static T, o: O) --> returned: T {
+fromNSValueUnsafe(#T, o: O) --> returned: T {
o.getValue(RawPointer(&returned));
}
[T, O | ObjectRef?(O)]
-overload fromNSValueUnsafe(static Pointer[T], o: O) = Pointer[T](o.pointerValue());
+overload fromNSValueUnsafe(#Pointer[T], o: O) = Pointer[T](o.pointerValue());
@@ -108,24 +108,24 @@ overload Maybe[T](o: O) = if (nil?(o)) nothing(T) else Maybe(T(o));
//
[N | Numeric?(N) or N == Bool]
-overload ObjectParameterType(static N) = NSNumber;
+overload ObjectParameterType(#N) = NSNumber;
[N | Numeric?(N) or N == Bool]
overload objectHandle(n: N) = objectHandle(NSNumber(n));
[T | RegularRecord?(T) and not ObjectRef?(T)]
-overload ObjectParameterType(static T) = NSValue;
+overload ObjectParameterType(#T) = NSValue;
[T | RegularRecord?(T) and not ObjectRef?(T)]
overload objectHandle(r: T) = objectHandle(makeNSValue(r));
[S | CCompatibleString?(S)]
-overload ObjectParameterType(static S) = NSString;
+overload ObjectParameterType(#S) = NSString;
[S | CCompatibleString?(S)]
overload objectHandle(s: S) = objectHandle(NSString(s));
[i | Identifier?(i)]
-overload ObjectParameterType(static Static[i]) = NSString;
+overload ObjectParameterType(#Static[i]) = NSString;
[i | Identifier?(i)]
-overload objectHandle(static i) = NSSTR(i);
+overload objectHandle(#i) = NSSTR(i);
@@ -219,7 +219,7 @@ overload index(o: O, n: I) = o.objectAtIndex(NSUInteger(n));
// array and dictionary constructors
//
[T, ..E | Class?(T) and allValues?(ObjectParameterType?, ..E)]
-makeArrayOfClass(static T, forward ..elements: E)
+makeArrayOfClass(#T, forward ..elements: E)
= T.arrayWithObjects(..mapValues(objectHandle, ..elements), nilHandle);
[..E | allValues?(ObjectParameterType?, ..E)]
@@ -238,7 +238,7 @@ private ValidDictionaryKVs?(..E)
and allValues?(ObjectParameterType?, ..E);
[T, ..E | Class?(T) and ValidDictionaryKVs?(..E)]
-private makeDictionaryOfClass(static T, forward ..kvs: E)
+private makeDictionaryOfClass(#T, forward ..kvs: E)
= T.dictionaryWithObjectsAndKeys(
..mapValues(objectHandle, ..swapValuePairs(..kvs)),
nilHandle
@@ -292,15 +292,15 @@ withAutoreleasePool(fn) {
Class?(O)
and Selector?(superSelector)
and CallDefined?(call, F,
- O, ..dropValues(static SelectorArgumentCount(superSelector), ..A)
+ O, ..dropValues(#SelectorArgumentCount(superSelector), ..A)
)
]
initObjectWith(
- self_: O, static superSelector, forward initFn_: F, forward ..args:A
+ self_: O, #superSelector, forward initFn_: F, forward ..args:A
) {
var self = self_;
forward initFn = initFn_;
- var superArgCount = static SelectorArgumentCount(superSelector);
+ var superArgCount = #SelectorArgumentCount(superSelector);
// self = super(self).init...(...);
self = callMethod(super(self), superSelector,
@@ -366,17 +366,17 @@ deallocObject(self: O) {
//
[selector | Selector?(selector)]
-AutoreleasedClassMethod(static selector)
+AutoreleasedClassMethod(#selector)
= [selector, class => class.alloc().init().autorelease()];
[selector, instanceSelector | Selector?(selector) and Selector?(instanceSelector)]
-overload AutoreleasedClassMethod(static selector, static instanceSelector)
+overload AutoreleasedClassMethod(#selector, #instanceSelector)
= [selector, (class, ..args) =>
callMethod(class.alloc(), instanceSelector, ..args).autorelease()
];
[selector, superSelector | Selector?(selector) and Selector?(superSelector)]
-InitInstanceMethod(static selector, static superSelector, ..Types)
+InitInstanceMethod(#selector, #superSelector, ..Types)
= [selector, (self, ..args) => initObject(self, superSelector, ..args), ..Types];
overload InitInstanceMethod(selector) = InitInstanceMethod(selector, "init");
@@ -388,39 +388,39 @@ define CopyInheriting;
define CopyImmutable;
[selector | Selector?(selector)]
-CopyInstanceMethod(static selector, static CopyRoot)
+CopyInstanceMethod(#selector, #CopyRoot)
= [selector, copyRootObject];
[selector | Selector?(selector)]
-overload CopyInstanceMethod(static selector, static CopyInheriting)
+overload CopyInstanceMethod(#selector, #CopyInheriting)
= [selector, copyInheritingObject];
[selector | Selector?(selector)]
-overload CopyInstanceMethod(static selector, static CopyImmutable)
+overload CopyInstanceMethod(#selector, #CopyImmutable)
= [selector, copyImmutableObject];
[Flag | Flag == CopyRoot or Flag == CopyInheriting or Flag == CopyImmutable]
-overload CopyInstanceMethod(static Flag)
+overload CopyInstanceMethod(#Flag)
= CopyInstanceMethod("copyWithZone:", Flag);
[selector | Selector?(selector)]
-DeallocInstanceMethod(static selector) = [selector, deallocObject];
+DeallocInstanceMethod(#selector) = [selector, deallocObject];
overload DeallocInstanceMethod() = DeallocInstanceMethod("dealloc");
[ivarName, readerSelector | Identifier?(ivarName) and Selector?(readerSelector)]
-ReaderInstanceMethod(static ivarName, static readerSelector, T)
+ReaderInstanceMethod(#ivarName, #readerSelector, T)
= [readerSelector, self => T(fieldRef(self^, ivarName)), T];
[ivarName | Identifier?(ivarName) and Selector?(ivarName)]
-overload ReaderInstanceMethod(static ivarName, T)
+overload ReaderInstanceMethod(#ivarName, T)
= ReaderInstanceMethod(ivarName, ivarName, T);
[ivarName, readerSelector | Identifier?(ivarName) and Selector?(readerSelector)]
-overload ReaderInstanceMethod(static ivarName, static readerSelector)
+overload ReaderInstanceMethod(#ivarName, #readerSelector)
= [readerSelector, self => SelectorReturnType(Id, readerSelector)(fieldRef(self^, ivarName))];
[ivarName | Identifier?(ivarName) and Selector?(ivarName)]
-overload ReaderInstanceMethod(static ivarName)
+overload ReaderInstanceMethod(#ivarName)
= ReaderInstanceMethod(ivarName, ivarName);
@@ -428,19 +428,19 @@ defaultWriterSelector(ivarName)
= IdentifierConcat("set", IdentifierCapitalize(ivarName), ":");
[ivarName, writerSelector | Identifier?(ivarName) and Selector?(writerSelector)]
-WriterInstanceMethod(static ivarName, static writerSelector, T)
+WriterInstanceMethod(#ivarName, #writerSelector, T)
= [writerSelector, (self, value) => { fieldRef(self^, ivarName) = value; }, Void, T];
[ivarName | Identifier?(ivarName) and Selector?(defaultWriterSelector(ivarName))]
-overload WriterInstanceMethod(static ivarName, T)
+overload WriterInstanceMethod(#ivarName, T)
= WriterInstanceMethod(ivarName, defaultWriterSelector(ivarName), Void, T);
[ivarName, writerSelector | Identifier?(ivarName) and Selector?(writerSelector)]
-overload WriterInstanceMethod(static ivarName, static writerSelector)
+overload WriterInstanceMethod(#ivarName, #writerSelector)
= [writerSelector, (self, value) => { fieldRef(self^, ivarName) = value; }];
[ivarName | Identifier?(ivarName) and Selector?(defaultWriterSelector(ivarName))]
-overload WriterInstanceMethod(static ivarName)
+overload WriterInstanceMethod(#ivarName)
= WriterInstanceMethod(ivarName, defaultWriterSelector(ivarName));
@@ -449,7 +449,7 @@ overload WriterInstanceMethod(static ivarName)
and Selector?(readerSelector)
and Selector?(writerSelector)
]
-PropertyInstanceMethods(static ivarName, static readerSelector, static writerSelector, T)
+PropertyInstanceMethods(#ivarName, #readerSelector, #writerSelector, T)
= ReaderInstanceMethod(ivarName, readerSelector, T),
WriterInstanceMethod(ivarName, writerSelector, T);
@@ -458,7 +458,7 @@ PropertyInstanceMethods(static ivarName, static readerSelector, static writerSel
and Selector?(readerSelector)
and Selector?(defaultWriterSelector(readerSelector))
]
-overload PropertyInstanceMethods(static ivarName, static readerSelector, T)
+overload PropertyInstanceMethods(#ivarName, #readerSelector, T)
= ..PropertyInstanceMethods(ivarName, readerSelector, defaultWriterSelector(readerSelector), T);
[ivarName |
@@ -466,7 +466,7 @@ overload PropertyInstanceMethods(static ivarName, static readerSelector, T)
and Selector?(ivarName)
and Selector?(defaultWriterSelector(ivarName))
]
-overload PropertyInstanceMethods(static ivarName, T)
+overload PropertyInstanceMethods(#ivarName, T)
= ..PropertyInstanceMethods(ivarName, ivarName, defaultWriterSelector(ivarName), T);
[ivarName, readerSelector, writerSelector |
@@ -474,7 +474,7 @@ overload PropertyInstanceMethods(static ivarName, T)
and Selector?(readerSelector)
and Selector?(writerSelector)
]
-overload PropertyInstanceMethods(static ivarName, static readerSelector, static writerSelector)
+overload PropertyInstanceMethods(#ivarName, #readerSelector, #writerSelector)
= ReaderInstanceMethod(ivarName, readerSelector),
WriterInstanceMethod(ivarName, writerSelector);
@@ -483,7 +483,7 @@ overload PropertyInstanceMethods(static ivarName, static readerSelector, static
and Selector?(readerSelector)
and Selector?(defaultWriterSelector(readerSelector))
]
-overload PropertyInstanceMethods(static ivarName, static readerSelector)
+overload PropertyInstanceMethods(#ivarName, #readerSelector)
= ..PropertyInstanceMethods(ivarName, readerSelector, defaultWriterSelector(readerSelector));
[ivarName |
@@ -491,7 +491,7 @@ overload PropertyInstanceMethods(static ivarName, static readerSelector)
and Selector?(ivarName)
and Selector?(defaultWriterSelector(ivarName))
]
-overload PropertyInstanceMethods(static ivarName)
+overload PropertyInstanceMethods(#ivarName)
= ..PropertyInstanceMethods(ivarName, ivarName, defaultWriterSelector(ivarName));
@@ -516,7 +516,7 @@ overload printTo(stream, o: O) {
private toIBOutlet(ivar) = [ivar.0, IBOutlet(ivar.1)];
private toIBAction(method) = [method.0, IBAction(method.1),
- ..dropValues(static 2, ..unpack(method))
+ ..dropValues(#2, ..unpack(method))
];
IBOutlets(..ivars) = ..mapValues(toIBOutlet, ..ivars);
View
20,640 lib-clay/cocoa/webkit/generated/generated.macosx.x86.32.clay
10,320 additions, 10,320 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
20,502 lib-clay/cocoa/webkit/generated/generated.macosx.x86.64.clay
10,251 additions, 10,251 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
10 lib-clay/commandline/dispatch/dispatch.clay
@@ -33,7 +33,7 @@ private usage(..commandTuples) {
[fn | CallDefined?(fn, Vector[String])]
-private commandName(static fn) = StaticName(fn);
+private commandName(#fn) = StaticName(fn);
[fn, ..Description | CallDefined?(fn, Vector[String])]
overload commandName(commandTuple: Tuple[Static[fn], ..Description])
@@ -48,7 +48,7 @@ overload commandName(commandTuple: Tuple[Name, Callable, ..Description])
= commandTuple.0;
[fn | CallDefined?(fn, Vector[String])]
-private commandFunction(static fn) = fn;
+private commandFunction(#fn) = fn;
[fn, ..Description | CallDefined?(fn, Vector[String])]
overload commandFunction(commandTuple: Tuple[Static[fn], ..Description])
@@ -63,12 +63,12 @@ overload commandFunction(commandTuple: Tuple[Name, Callable, ..Description])
= commandTuple.1;
[fn | CallDefined?(fn, Vector[String])]
-private commandDescription(static fn)
+private commandDescription(#fn)
= ;
[fn, ..Description | CallDefined?(fn, Vector[String])]
overload commandDescription(commandTuple: Tuple[Static[fn], ..Description])
- = ..dropValues(static 1, ..unpack(commandTuple));
+ = ..dropValues(#1, ..unpack(commandTuple));
[
Name, Callable, ..Description
@@ -76,7 +76,7 @@ overload commandDescription(commandTuple: Tuple[Static[fn], ..Description])
and CallDefined?(call, Callable, Vector[String])
]
overload commandDescription(commandTuple: Tuple[Name, Callable, ..Description])
- = ..dropValues(static 2, ..unpack(commandTuple));
+ = ..dropValues(#2, ..unpack(commandTuple));
private commandTypeReturnCount(T)
= countValues(..Type(..commandFunction(typeToRValue(T))(Vector[String]())));
View
2 lib-clay/commandline/options/spec.clay
@@ -33,7 +33,7 @@ overload OptionSpec(part : S, ..parts) : OptionSpec{
alias OptionSpecs = Vector[OptionSpec];
[T]
-private SpecPart?(static T) = String?(T) or (T == Char) or (T == Flags);
+private SpecPart?(#T) = String?(T) or (T == Char) or (T == Flags);
private define addSpecPart;
View
6 lib-clay/comparators/comparators.clay
@@ -13,7 +13,7 @@ inline overload greaterEquals?(comparator, a, b) = not lesser?(a, b);
// The natural comparison
record Natural();
-overload Comparator?(static Natural) = true;
+overload Comparator?(#Natural) = true;
natural() = Natural();
@@ -26,7 +26,7 @@ inline overload greaterEquals?(c : Natural, x, y) = greaterEquals?(x, y);
// Comparing on a specific function
record Comparing[F](comparing : F);
-[F] overload Comparator?(static Comparing[F]) = true;
+[F] overload Comparator?(#Comparing[F]) = true;
comparing(f) = Comparing(f);
@@ -40,7 +40,7 @@ comparing(f) = Comparing(f);
// Comparing in reversed of the normal order
record Reversed[C](original : C);
-[C | Comparator?(C)] overload Comparator?(static Reversed[C]) = true;
+[C | Comparator?(C)] overload Comparator?(#Reversed[C]) = true;
[C | Comparator?(C)] reversed(c : C) = Reversed(c);
[C | Comparator?(C)] overload reversed(c : Reversed[C]) = c.original;
View
36 lib-clay/complex/complex.clay
@@ -8,11 +8,11 @@ alias ComplexFloat = Complex32;
alias ComplexDouble = Complex64;
alias ComplexLongDouble = Complex80;
-[T] Complex?(static T) = false;
-overload Complex?(static Complex32) = true;
-overload Complex?(static Complex64) = true;
-overload Complex?(static Complex80) = true;
-[A, B] overload Complex?(static A, static B) = Complex?(A) and Complex?(B);
+[T] Complex?(#T) = false;
+overload Complex?(#Complex32) = true;
+overload Complex?(#Complex64) = true;
+overload Complex?(#Complex80) = true;
+[A, B] overload Complex?(#A, #B) = Complex?(A) and Complex?(B);
private define re;
private define im;
@@ -64,16 +64,16 @@ inline overload Complex(a:T) = Complex(a,0.f);
[T | Imaginary?(T)]
inline overload Complex(a:T) = Complex(0.f,a);
-ComplexBaseType(static Complex32) = Float;
-overload ComplexBaseType(static Complex64) = Double;
-overload ComplexBaseType(static Complex80) = LongDouble;
+ComplexBaseType(#Complex32) = Float;
+overload ComplexBaseType(#Complex64) = Double;
+overload ComplexBaseType(#Complex80) = LongDouble;
[T | Complex?(T)]
-ComplexRealType(static T) = ComplexBaseType(T);
+ComplexRealType(#T) = ComplexBaseType(T);
-ComplexImagType(static Complex32) = IFloat;
-overload ComplexImagType(static Complex64) = IDouble;
-overload ComplexImagType(static Complex80) = ILongDouble;
+ComplexImagType(#Complex32) = IFloat;
+overload ComplexImagType(#Complex64) = IDouble;
+overload ComplexImagType(#Complex80) = ILongDouble;
[T | Complex?(T)]
overload ComplexRealType(z:T) = Type(real(z));
@@ -82,10 +82,10 @@ overload ComplexRealType(z:T) = Type(real(z));
overload ComplexImagType(z:T) = Type(imag(z));
[T | Complex?(T)]
-ComplexType(static T) = T;
+ComplexType(#T) = T;
[T | Float?(T)]
-overload ComplexType(static T) = Type(Complex(T()));
+overload ComplexType(#T) = Type(Complex(T()));
[T | Complex?(T)]
overload T() = T(0.);
@@ -319,13 +319,13 @@ inline overload subnormal?(x:T) = subnormal?(real(x)) or subnormal?(imag(x));
inline overload normalized?(x:T) = not subnormal?(x) and finite?(x);
[T | Complex?(T)]
-overload infinity(static T) = Complex(infinity(ComplexRealType(T)),infinity(ComplexImagType(T)));
+overload infinity(#T) = Complex(infinity(ComplexRealType(T)),infinity(ComplexImagType(T)));
[T | Complex?(T)]
-overload negativeInfinity(static T) = Complex(negativeInfinity(ComplexRealType(T)),negativeInfinity(ComplexImagType(T)));
+overload negativeInfinity(#T) = Complex(negativeInfinity(ComplexRealType(T)),negativeInfinity(ComplexImagType(T)));
[T | Complex?(T)]
-overload nan(static T) = Complex(nan(ComplexRealType(T)),nan(ComplexImagType(T)));
+overload nan(#T) = Complex(nan(ComplexRealType(T)),nan(ComplexImagType(T)));
[T | Complex?(T)]
-overload snan(static T) = Complex(snan(ComplexRealType(T)),snan(ComplexImagType(T)));
+overload snan(#T) = Complex(snan(ComplexRealType(T)),snan(ComplexImagType(T)));
View
2 lib-clay/defaultarguments/defaultarguments.clay
@@ -1,2 +1,2 @@
[..T] defaultArguments(defaults, forward ..args:T)
- = forward ..args, ..dropValues(static countValues(..T), ..unpack(defaults));
+ = forward ..args, ..dropValues(#countValues(..T), ..unpack(defaults));
View
14 lib-clay/deques/deques.clay
@@ -44,11 +44,11 @@ record DequeCoordinate[T] (
dec(i.current);
}
-[T, I | Integer?(I)] overload updateAssign(static add, ref i: DequeCoordinate[T], n: I) {
+[T, I | Integer?(I)] overload updateAssign(#add, ref i: DequeCoordinate[T], n: I) {
i += PtrInt(n);
}
-[T] overload updateAssign(static add, ref i: DequeCoordinate[T], n: PtrInt) {
+[T] overload updateAssign(#add, ref i: DequeCoordinate[T], n: PtrInt) {
var offset = n + PtrInt(i.current - i.first);
if (offset >= 0 and offset < DequeBufferSSize(T))
i.current += n;
@@ -69,7 +69,7 @@ record DequeCoordinate[T] (
j += n;
}
-[T, I | Integer?(I)] overload updateAssign(static subtract, ref i: DequeCoordinate[T], n: I) {
+[T, I | Integer?(I)] overload updateAssign(#subtract, ref i: DequeCoordinate[T], n: I) {
i += -PtrInt(n);
}
@@ -107,11 +107,11 @@ record Deque[T] (
= coord.node >= d.map and coord.node < d.map + d.mapSize
and coord >= d.begin and coord <= d.end;
-[T] overload RegularRecord?(static Deque[T]) = false;
+[T] overload RegularRecord?(#Deque[T]) = false;
-[T] overload SequenceContainer?(static Deque[T]) = true;
+[T] overload SequenceContainer?(#Deque[T]) = true;
-[T] overload UnderlyingContainerConstructor(static Deque[T]) = Deque;
+[T] overload UnderlyingContainerConstructor(#Deque[T]) = Deque;
[T] overload Deque[T]() --> deque: Deque[T] {
initializeDequeMap(deque, SizeT(0));
@@ -192,7 +192,7 @@ overload Deque(forward from:A) = Deque(mapped(Tuple, from));
}
}
-[T] overload BitwiseMovedType?(static Deque[T]) = true;
+[T] overload BitwiseMovedType?(#Deque[T]) = true;
[T] overload resetUnsafe(d: Deque[T]) {
d.map <-- Pointer[Pointer[T]](0);
View
2 lib-clay/destructors/destructors.clay
@@ -1,5 +1,5 @@
record DestroyedBy[Value, Destructor] (value: Value, destructor: Destructor);
-[V,D] overload RegularRecord?(static DestroyedBy[V,D]) = false;
+[V,D] overload RegularRecord?(#DestroyedBy[V,D]) = false;
[V,D] overload DestroyedBy[V,D]();
[V,D] overload destroy(d: DestroyedBy[V,D]) { d.destructor(d.value); }
View
2 lib-clay/enumerations/enumerations.clay
@@ -46,7 +46,7 @@ inline overload lesser?(a:E, b:E) = (enumToInt(a) < enumToInt(b));
[E | Enum?(E)]
enumName(x:E) {
alias n = EnumMemberCount(E);
- ..for (i in staticIntegers(static n)) {
+ ..for (i in staticIntegers(#n)) {
if (x == E(unwrapStatic(i)))
return EnumMemberName(E, i);
}
View
4 lib-clay/exceptions/exceptions.clay
@@ -75,10 +75,10 @@ alias throwButPropagateLike(ex, ..expr) {
//
[T]
-overload exceptionIs?(static T, exp:RawPointer) = nestedVariantIs?(exceptionObject(exp), T);
+overload exceptionIs?(#T, exp:RawPointer) = nestedVariantIs?(exceptionObject(exp), T);
[T]
-overload exceptionAs(static T, exp:RawPointer) --> ex:T {
+overload exceptionAs(#T, exp:RawPointer) --> ex:T {
ex <-- moveUnsafe(nestedVariantAs(exceptionObject(exp), T));
freeRawMemory(exp);
}
View
12 lib-clay/externals/externals.clay
@@ -9,26 +9,26 @@ alias ExternalException = Pointer[Maybe[Exception]];
// = ..callExternal(external_fn, ..);
[inCount]
-inline wrapAsExternal(impl_fn, static inCount, exp:ExternalException, ..inoutp) {
+inline wrapAsExternal(impl_fn, #inCount, exp:ExternalException, ..inoutp) {
try {
- ..mapValues(dereference, ..dropValues(static inCount, ..inoutp))
- <-- ..impl_fn(..mapValues(dereference, ..takeValues(static inCount, ..inoutp)));
+ ..mapValues(dereference, ..dropValues(#inCount, ..inoutp))
+ <-- ..impl_fn(..mapValues(dereference, ..takeValues(#inCount, ..inoutp)));
exp^ <-- nothing(Exception);
} catch (ex) {
exp^ <-- Maybe(ex);
}
}
-[T] private unpointer(static Pointer[T]) = T;
+[T] private unpointer(#Pointer[T]) = T;
[..IO, ..T |
- [..T] == [..mapValues(unpointer, ..takeValues(static countValues(..T), ..IO))]
+ [..T] == [..mapValues(unpointer, ..takeValues(#countValues(..T), ..IO))]
]
inline callExternal(
external_fn:CCodePointer[[ExternalException, ..IO], []],
..args:T
)
- --> ..out:mapValues(unpointer, ..dropValues(static countValues(..T), ..IO))
+ --> ..out:mapValues(unpointer, ..dropValues(#countValues(..T), ..IO))
{
var ex = uninitializedUnsafe(Maybe[Exception]);
external_fn(..mapValues(addressOf, ex, ..args, ..out));
View
2 lib-clay/hashmaps/hashmaps.clay
@@ -158,7 +158,7 @@ private record HashMapItems[CapturedMap,K,V] =
node : WeakNodePtr[K,V];
[CapturedMap,K,V]
-overload HashMapItems(forward captured:CapturedMap, static K, static V)
+overload HashMapItems(forward captured:CapturedMap, #K, #V)
--> returned:HashMapItems[CapturedMap,K,V]
{
returned.map <-- captured;
View
150 lib-clay/identifiers/identifiers.clay
@@ -1,126 +1,126 @@
IdentifierChars(identifier)
= ..mapValues(
- n => IdentifierSlice(identifier, n, static unwrapStatic(n)+1),
- ..staticIntegers(static IdentifierSize(identifier))
+ (#n) => IdentifierSlice(identifier, n, #(n+1)),
+ ..staticIntegers(#IdentifierSize(identifier))
);
IdentifierStartsWith?(identifier, startsWith) = false;
[identifier, startsWith | IdentifierSize(identifier) >= IdentifierSize(startsWith)]
-overload IdentifierStartsWith?(static identifier, static startsWith)
- = IdentifierSlice(identifier, static 0, static IdentifierSize(startsWith))
+overload IdentifierStartsWith?(#identifier, #startsWith)
+ = IdentifierSlice(identifier, #0, #IdentifierSize(startsWith))
== startsWith;
IdentifierEndsWith?(identifier, endsWith) = false;
[identifier, endsWith | IdentifierSize(identifier) >= IdentifierSize(endsWith)]
-overload IdentifierEndsWith?(static identifier, static endsWith)
+overload IdentifierEndsWith?(#identifier, #endsWith)
= IdentifierSlice(identifier,
- static IdentifierSize(identifier) - IdentifierSize(endsWith),
- static IdentifierSize(identifier)
+ #(IdentifierSize(identifier) - IdentifierSize(endsWith)),
+ #IdentifierSize(identifier)
) == endsWith;
[identifier, sub, start |
Identifier?(identifier) and Identifier?(sub)
]
-IdentifierFind(static identifier, static sub, static start)
- = IdentifierFind(identifier, sub, static start + 1);
+IdentifierFind(#identifier, #sub, #start)
+ = IdentifierFind(identifier, sub, #(start + 1));
[identifier, sub, start |
Identifier?(identifier) and Identifier?(sub)
and IdentifierSize(identifier) < IdentifierSize(sub) + start
]
-overload IdentifierFind(static identifier, static sub, static start) = -1;
+overload IdentifierFind(#identifier, #sub, #start) = -1;
[identifier, sub, start |
Identifier?(identifier) and Identifier?(sub)
and IdentifierSize(identifier) >= IdentifierSize(sub) + start
- and IdentifierSlice(identifier, static start, static start + IdentifierSize(sub))
+ and IdentifierSlice(identifier, #start, #(start + IdentifierSize(sub)))
== sub
]
-overload IdentifierFind(static identifier, static sub, static start) = start;
+overload IdentifierFind(#identifier, #sub, #start) = start;
-overload IdentifierFind(identifier, sub) = IdentifierFind(identifier, sub, static 0);
+overload IdentifierFind(identifier, sub) = IdentifierFind(identifier, sub, #0);
IdentifierCapitalize(i)
= IdentifierConcat(
- IdentifierUpperChar(IdentifierSlice(i, static 0, static 1)),
- IdentifierSlice(i, static 1, static IdentifierSize(i))
+ IdentifierUpperChar(IdentifierSlice(i, #0, #1)),
+ IdentifierSlice(i, #1, #IdentifierSize(i))
);
IdentifierDecapitalize(i)
= IdentifierConcat(
- IdentifierLowerChar(IdentifierSlice(i, static 0, static 1)),
- IdentifierSlice(i, static 1, static IdentifierSize(i))
+ IdentifierLowerChar(IdentifierSlice(i, #0, #1)),
+ IdentifierSlice(i, #1, #IdentifierSize(i))
);
[i | Identifier?(i) and IdentifierSize(i) == 1]
-IdentifierUpperChar(static i) = i;
-
-overload IdentifierUpperChar(static "a") = "A";
-overload IdentifierUpperChar(static "b") = "B";
-overload IdentifierUpperChar(static "c") = "C";
-overload IdentifierUpperChar(static "d") = "D";
-overload IdentifierUpperChar(static "e") = "E";
-overload IdentifierUpperChar(static "f") = "F";
-overload IdentifierUpperChar(static "g") = "G";
-overload IdentifierUpperChar(static "h") = "H";
-overload IdentifierUpperChar(static "i") = "I";
-overload IdentifierUpperChar(static "j") = "J";
-overload IdentifierUpperChar(static "k") = "K";
-overload IdentifierUpperChar(static "l") = "L";
-overload IdentifierUpperChar(static "m") = "M";
-overload IdentifierUpperChar(static "n") = "N";
-overload IdentifierUpperChar(static "o") = "O";
-overload IdentifierUpperChar(static "p") = "P";
-overload IdentifierUpperChar(static "q") = "Q";
-overload IdentifierUpperChar(static "r") = "R";
-overload IdentifierUpperChar(static "s") = "S";
-overload IdentifierUpperChar(static "t") = "T";
-overload IdentifierUpperChar(static "u") = "U";
-overload IdentifierUpperChar(static "v") = "V";
-overload IdentifierUpperChar(static "w") = "W";
-overload IdentifierUpperChar(static "x") = "X";
-overload IdentifierUpperChar(static "y") = "Y";
-overload IdentifierUpperChar(static "z") = "Z";
+IdentifierUpperChar(#i) = i;
+
+overload IdentifierUpperChar(#"a") = "A";
+overload IdentifierUpperChar(#"b") = "B";
+overload IdentifierUpperChar(#"c") = "C";
+overload IdentifierUpperChar(#"d") = "D";