History

Updated System class, removed some unsupported features, updated properties

Dmitry Kabak (userdima committed 13 years ago

Commit 11a39471 parent f6838533 files · +21 −2Browse files

Showing the changes to java (3 of 3 files). Show all

Unified · Split

3 files
  1. java/pkg/java/lang/System.java +9 −2
  2. java/pkg/java/lang/System_L.b +11 −0
  3. java/pkg/java/lang/System_L.m +1 −0
java/pkg/java/lang/System.java+9−2
@@ -1142,10 +1142,17 @@ public final class System { · 1141 unmodified lines
1142 setErr0(new PrintStream(new BufferedOutputStream(fdErr, 128), true));1142 setErr0(new PrintStream(new BufferedOutputStream(fdErr, 128), true));
1143 // Load the zip library now in order to keep java.util.zip.ZipFile1143 // Load the zip library now in order to keep java.util.zip.ZipFile
1144 // from trying to use itself to load this library later.1144 // from trying to use itself to load this library later.
1145 loadLibrary("zip");1145 // [Inferno] <
1146 // Not really needed now. We have no libraries, no jars, and currently
1147 // can run only converted dis code.
1148 //loadLibrary("zip");
1149 // [Inferno] >
1146 1150
1147 // Setup Java signal handlers for HUP, TERM, and INT (where available).1151 // Setup Java signal handlers for HUP, TERM, and INT (where available).
1148 Terminator.setup();1152 // [Inferno] <
1153 // No terminators in Inferno
1154 //Terminator.setup();
1155 // [Inferno] >
1149 1156
1150 // Initialize any miscellenous operating system settings that need to be1157 // Initialize any miscellenous operating system settings that need to be
1151 // set for the class libraries. Currently this is no-op everywhere except1158 // set for the class libraries. Currently this is no-op everywhere except
java/pkg/java/lang/System_L.b+11−0
@@ -50,6 +50,13 @@ init( jni_p : JNI ) · 49 unmodified lines
50 #<<50 #<<
51}51}
52 52
53mapLibraryName_rString_rString( p0 : JString) : JString
54{#>>
55 # TODO: what are libraries in Inferno?
56 # dis files? native modules? .m?
57 return p0;
58}#<<
59
53setIn0_rInputStream_V( p0 : JObject)60setIn0_rInputStream_V( p0 : JObject)
54{#>>61{#>>
55 Value : import JNI;62 Value : import JNI;
@@ -141,6 +148,9 @@ initProperties_rProperties_rProperties( p0 : JObject ) : JObject · 85 unmodified lines
141 # Default properties148 # Default properties
142 # TODO: ask Inferno when possible instead of hardcoded values149 # TODO: ask Inferno when possible instead of hardcoded values
143 properties := array [] of {150 properties := array [] of {
151 ("java.vm.version", "20.51-b01-457"), #FIXME: write real version here
152 ("java.vm.name", "Inferno's JVM, Sux(?)"),
153 ("java.vm.info", "mixed mode"),
144 ("java.vendor", "Inferno project"),154 ("java.vendor", "Inferno project"),
145 ("java.vendor.url", "http://www.vitanuova.com/inferno/"),155 ("java.vendor.url", "http://www.vitanuova.com/inferno/"),
146 ("java.home", "/java"),156 ("java.home", "/java"),
@@ -149,6 +159,7 @@ initProperties_rProperties_rProperties( p0 : JObject ) : JObject · 2 unmodified lines
149 ("os.name", "Inferno OS"),159 ("os.name", "Inferno OS"),
150 ("os.arch", "x86"),160 ("os.arch", "x86"),
151 ("os.version", "4th edition"),161 ("os.version", "4th edition"),
162 ("file.encoding", "utf-8"),
152 ("file.separator", "/"),163 ("file.separator", "/"),
153 ("path.separator", ":"),164 ("path.separator", ":"),
154 ("line.separator", "\n"),165 ("line.separator", "\n"),
java/pkg/java/lang/System_L.m+1−0
@@ -13,6 +13,7 @@ System_L : module · 12 unmodified lines
13 setErr0_rPrintStream_V : fn( p0 : JObject);13 setErr0_rPrintStream_V : fn( p0 : JObject);
14 currentTimeMillis_J : fn( ) : big;14 currentTimeMillis_J : fn( ) : big;
15 arraycopy_rObject_I_rObject_I_I_V : fn( p0 : JObject,p1 : int,p2 : JObject,p3 : int,p4 : int);15 arraycopy_rObject_I_rObject_I_I_V : fn( p0 : JObject,p1 : int,p2 : JObject,p3 : int,p4 : int);
16 mapLibraryName_rString_rString : fn( p0 : JString) : JString;
16 identityHashCode_rObject_I : fn( p0 : JObject) : int;17 identityHashCode_rObject_I : fn( p0 : JObject) : int;
17 initProperties_rProperties_rProperties : fn( p0 : JObject ) : JObject;18 initProperties_rProperties_rProperties : fn( p0 : JObject ) : JObject;
18 GetUserName_rString : fn( ) : JString;19 GetUserName_rString : fn( ) : JString;