xref: /aosp_15_r20/external/skia/resources/sksl/runtime_errors/IllegalOperators.rts (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1int bit_not(int x) { return ~x; }
2
3int remainder(int x)    { return x %  2; }
4int remainder_eq(int x) { return x %= 2;}
5
6int shl   (int x) { return x <<  1; }
7int shl_eq(int x) { return x <<= 1; }
8int shr   (int x) { return x >>  1; }
9int shr_eq(int x) { return x >>= 1; }
10
11int bit_and   (int x) { return x &  1; }
12int bit_and_eq(int x) { return x &= 1; }
13int bit_or    (int x) { return x |  1; }
14int bit_or_eq (int x) { return x |= 1; }
15int bit_xor   (int x) { return x ^  1; }
16int bit_xor_eq(int x) { return x ^= 1; }
17
18/*%%*
19operator '~' is not allowed
20operator '%' is not allowed
21operator '%=' is not allowed
22operator '<<' is not allowed
23operator '<<=' is not allowed
24operator '>>' is not allowed
25operator '>>=' is not allowed
26operator '&' is not allowed
27operator '&=' is not allowed
28operator '|' is not allowed
29operator '|=' is not allowed
30operator '^' is not allowed
31operator '^=' is not allowed
32*%%*/
33