Do not reserve such a large heap on Windows i386.
[SquirrelJME.git] / compatibility.mkd
blob84954f5c8e9d735d2cd22f5af6901b741ed89e6e
1 # Compatibility
3 SquirrelJME aims to be compatible with most programs however there are
4 situations and rare edge cases where there will be no compatibility. This is
5 to make the implementation easier.
7 ## `Flushable` Interface
9 The interface `Flushable` does not exist in Java ME and as such it does not
10 exist in SquirrelJME.
12 ## LCDUI Display Input
14 Only the first display (index zero) supports input events such as keyboard,
15 buttons, mice, and touchscreen. Any secondary displays which are attached
16 will not have events handled for them at all. This is to make it easier to
17 implement.
19 ## Limited Network Interface Support
21 The Generic Connection Framework (GCF) has API to provide access to various
22 system interfaces, WiFi devices, 3GPP/CDMA (Mobile data), and dial-up
23 connections. Since supporting all of these are complicated, support for these
24 across systems will be limited to an as needed basis.
26 ## `Reader`'s `lock` Is `null`
28 Since SquirrelJME uses a reference counted garbage collector the `Reader`'s
29 `lock` object in the default constructor is set to `null` instead of `this`.
30 This is so that readers do not remain in memory unable to be freed because
31 objects still refer to them and such.
33 ## `SUPER` Is Always Set
35 In all clases the `SUPER` flag is assumed to be set, this flag just modifies
36 the behavior of `invokespecial`. When it is not set then that instruction
37 can invoke nearly every method directly (it was called before
38 `invokenonvirtual`). However, the Java compiler since Java 1.1 always set
39 the flag for classes it compiled. Since CLDC 1.0 was released well after
40 Java 2 was and is defined as a Java 2 virtual machine all code written for
41 J2ME should have classes where this flag is set. As such instead of
42 supporting the logic to handle cases where it is not set, the flag will just
43 be ignored and assumed to be set.
45 ## Supported Encodings
47 Only the following character encodings are supported:
49  * _ASCII_
50  * _IBM037_
51  * _ISO-8859-1_
52  * _UTF-8_
54 Note that UTF codepoints above U+FFFF are not fully supported and are not
55 available in Java ME. Surrogate pairs in UTF-16 will be encoded in UTF-8 as
56 six bytes. Additionally when decoding, if a sequence that is above U+FFFF is
57 read then it will decode to the replacement character. This may cause a loss of
58 or mutation of data when processing files.
60 See:
62  * <https://unicode.org/faq/utf_bom.html#utf8-4>
63  * <https://www.unicode.org/reports/tr26/>