Commit Graph

402 Commits

Author SHA1 Message Date
Joel Dice
a16a00a7fb implement ByteArrayOutputStream.reset 2008-09-26 15:29:38 -06:00
Joel Dice
93a96f3833 fix backwards logic in Stack.empty 2008-09-26 08:10:16 -06:00
J. Treadwell
8e79618392 added StringBuffer/Builder methods 2008-09-22 09:31:10 -06:00
Joel Dice
27efbcf5e1 fix single-byte BufferedInputStream.read to generate unsigned result 2008-09-02 14:54:34 -06:00
Joel Dice
e0e827596e make Long.parseLong more efficient 2008-08-29 11:37:53 -06:00
Joel Dice
9017b5996a implement HashSet.toString 2008-08-22 14:02:38 -06:00
Joel Dice
c8cc7d931b maintain a table to look up methods called via JNI
This simplifies the JNI implementation for looking up methods.  It also
fixes a bug where an applications calls GetStaticMethodID with class A
and then calls CallStatic<Type>Method with class B which extends A.  The
old code would look in the wrong method table and thus call the wrong
method.
2008-08-15 12:32:33 -06:00
Matt Weaver
56e708aab0 Added the final method "name()", not being used presently, but useful if toString() is overridden. 2008-08-12 16:21:39 -06:00
Joel Dice
86dfaf9ff0 implement ByteBuffer.getInt(int) 2008-08-12 11:09:17 -06:00
Eric Scharff
e45b1f68c7 prepend copyright notice and license to source files 2008-08-05 14:15:10 -06:00
Eric Scharff
7e0941f6fb Added java.lang.AssertionError 2008-08-05 14:06:37 -06:00
Eric Scharff
f601897d9e Accept uppercase letters as digits, per the spec for Character.digit 2008-08-05 14:05:36 -06:00
Matt Weaver
0bd29069f4 Added override, soley for documentation purposes (mark methods overriding parent) 2008-07-22 11:33:55 -06:00
Joel Dice
b59422fa94 fix windows build, where hstrerror is not available 2008-07-21 15:29:02 -06:00
Joel Dice
5b94b17ea2 clean up exception handling in java-nio.cpp 2008-07-21 15:35:14 -06:00
Joel Dice
a677a2da17 fix class cast exception in TreeSet ctor 2008-07-17 15:46:54 -06:00
Matt Weaver
244393430d Merge branch 'master' of git://oss.readytalk.com/avian 2008-07-16 11:26:29 -06:00
Eric Scharff
0df3beef06 Merge branch 'master' of ssh://oss.readytalk.com/var/local/git/avian 2008-07-15 09:38:02 -06:00
Eric Scharff
13a535d1c6 Added a getContentLength() method to URLConnection
This is particularly important if you want to get the number of bytes of a
resource loaded by the class loader:
  getClass().getResource("myFile").openConnection().getContentLength()
2008-07-15 09:36:52 -06:00
Joel Dice
0ae338e74a fix various bugs in BufferedReader.readLine 2008-07-15 08:59:00 -06:00
Matt Weaver
f81e9f7f5d Added for compliance. This makes IDEs happy, as certain types of "warning" casts are somewhat unavoidable. As it is small and potentially useful, I threw it in. 2008-07-14 11:05:33 -06:00
Matt Weaver
2d1ec11edc Added no arg constructor to support Comparable types. 2008-07-14 08:45:51 -06:00
Eric Scharff
7534459fec Stylistic tweaks 2008-07-13 21:54:07 -06:00
Zsombor
17a42c5611 add a few String methods 2008-07-13 20:34:13 -06:00
Zsombor
4fed24270b add skeleton java.util.regex classes 2008-07-13 20:33:51 -06:00
Zsombor
0ffba474fa implement additional Unicode support in Character 2008-07-13 20:33:26 -06:00
Zsombor
99fa6d1495 add StringBuilder.indexOf 2008-07-13 18:59:30 -06:00
Joel Dice
d1b6de8131 add license headers 2008-07-13 18:56:18 -06:00
Zsombor
2fe571c461 add StringBuffer.append(char[]) 2008-07-13 18:55:05 -06:00
Zsombor
074f1a3853 trivial AccessController implementation 2008-07-13 18:46:27 -06:00
Joel Dice
4ecce8286f fix recursive invocation of Thread constructor 2008-07-13 18:34:59 -06:00
Zsombor
d28a860138 add Arrays.fill 2008-07-13 18:28:27 -06:00
Zsombor
6409747f17 add Properties.getProperty(String,String) 2008-07-13 18:27:42 -06:00
Zsombor
e507a26081 add System.getProperties 2008-07-13 18:27:05 -06:00
Joel Dice
975c2c12a8 add license header to BitSet.java 2008-07-13 18:25:26 -06:00
Zsombor
dcccddeb55 add FilenameFilter interface 2008-07-13 18:24:23 -06:00
Zsombor
0e539615e7 add Thread.name field 2008-07-13 18:21:04 -06:00
Zsombor
e1d712ef71 java.util.BitSet implementation 2008-07-13 18:16:55 -06:00
Zsombor
2e0ca31148 implement File.list and File.mkdirs 2008-07-13 18:14:37 -06:00
Joel Dice
a016eeaba0 fix Long.toString for Long.MIN_VALUE case 2008-07-13 17:54:44 -06:00
Eric Scharff
bba4f75c2f Tweaked code indentation and formatting to match existing style 2008-07-03 10:49:08 -06:00
Joel Dice
befdfa4e9e add copyright header to CharSequence.java 2008-07-03 09:36:55 -06:00
Zsombor
e3fd0d9c7d add a few classes and methods to the classpath
Add java.lang.CharSequence, java.util.AbstractSet,
java.util.AbstractCollection, Collections.unmodifiableSet,
 System.getProperty(String,String), etc.
2008-07-03 09:16:32 -06:00
Joel Dice
9388b6e2ce pass O_TRUNC to open in FileOutputStream.open 2008-06-26 15:58:14 -06:00
Joel Dice
575df206cd fix System.currentTimeMillis on Windows 2008-06-17 09:05:57 -06:00
Joel Dice
af794d9be0 implement Date.toString, which just defers to ctime for now (part 2) 2008-06-16 11:45:23 -06:00
Joel Dice
4694d75553 implement Date.toString, which just defers to ctime for now 2008-06-16 10:08:51 -06:00
Joel Dice
14e2513590 fix some API compatibility issues in the class library 2008-05-07 17:44:43 -06:00
Joel Dice
24d0ea0d9b use StackTraceElement.toString in Throwable.printStackTrace 2008-04-21 16:31:50 -06:00
Joel Dice
819588546e implement a few StackTraceElement methods 2008-04-21 16:30:41 -06:00
Joel Dice
d9ec8e20bf implement Thread.getStackTrace, activeCount, and enumerate 2008-04-11 16:48:39 -06:00
Joel Dice
e9eacd900d add Class.isInterface 2008-04-01 16:48:58 -06:00
Joel Dice
c9ef443944 add Modifier.isNative and isAbstract 2008-04-01 16:42:50 -06:00
Joel Dice
91494d9081 add constructor to ByteBuffer 2008-03-28 18:08:08 -06:00
Joel Dice
6cddd10e0a various code cleanups, bug fixes, and compatibility fixes in NIO code 2008-03-25 16:17:29 -06:00
Joel Dice
3a208edbbc update NIO code to be more compatible with Java 2008-03-25 11:18:17 -06:00
Joel Dice
1b098c9267 implement ArithmeticException 2008-03-21 13:48:42 -06:00
Joel Dice
7dd9b96717 add additional methods and fields to class library 2008-03-20 18:40:18 -06:00
Joel Dice
8e1ec5794f implement java.util.Random and java.lang.Math.random in Java 2008-03-20 18:39:25 -06:00
Joel Dice
7343eea558 Merge branch 'master' of oss:/var/local/git/avian 2008-03-05 14:22:04 -07:00
Joel Dice
3e7acd7861 fix backwards logic in Collections.toArray 2008-03-05 14:21:53 -07:00
Eric Scharff
89bc3bc4e7 Fix bug in StringBuilder.insert() 2008-03-05 12:10:59 -07:00
Joel Dice
1bca2e9e5d tweak Math.natRandom for Windows to guarantee we never return anything outside [0,1) 2008-02-29 12:49:00 -07:00
Joel Dice
3c237547ee fix Math.natRandom for Windows build 2008-02-29 12:39:09 -07:00
Joel Dice
51a731847a java.util code cleanup 2008-02-28 15:18:46 -07:00
Joel Dice
35d4d19c07 Merge branch 'master' of oss:/var/local/git/avian 2008-02-28 11:37:14 -07:00
Joel Dice
9d76d6a04e implement a few more classpath methods, including Collection.addAll and Collection.toArray 2008-02-28 11:37:10 -07:00
Eric Scharff
e23f2bafd5 Implemented trivial impolementation of java.util.Random.nextDouble() 2008-02-28 11:02:58 -07:00
Eric Scharff
11d218f956 Slight fix for improved type safety 2008-02-28 10:03:24 -07:00
Eric Scharff
0d5b7bd126 Support for floating point conversions and tests
Floats and doubles can now be read from strings, using the C standard library
functions for this purpose (strtof and strtod).  The code also relies on
standard library functions to implement isNaN() and isInfinite()
2008-02-28 08:35:16 -07:00
Eric Scharff
73e7bfc1dc Added constructor for java.util.HashMap 2008-02-28 08:33:52 -07:00
Eric Scharff
eaa8d5c64b Trivial implementation of java.util.Random.nextInt(int n) 2008-02-26 09:37:46 -07:00
Joel Dice
2edaa82801 prepend copyright notice and license to all source files; add license.txt and readme.txt 2008-02-19 11:06:52 -07:00
Dain
8a0ffe186f Adds appending of doubles to a StringBuffer 2008-01-30 16:26:30 -07:00
Joel Dice
7a262d0578 add java.lang.OutOfMemoryError 2008-01-29 08:18:23 -07:00
Joel Dice
707359d555 remove redundant synchronization from Collections.SynchronizedCollection 2008-01-28 08:10:23 -07:00
Dain
6926ca6778 Added parsing of new line characters in properties files. 2008-01-23 16:39:45 -07:00
Joel Dice
35160e46d8 don't include embedded boot classpath in libvm.a, only the executable 2008-01-18 17:54:36 -07:00
Joel Dice
bb701f309c implement StringBuffer.append(boolean) 2008-01-18 16:16:24 -07:00
Joel Dice
dc6c7e9121 use more conventional os.name properties 2008-01-18 08:35:20 -07:00
Joel Dice
86704591e7 Throwable.initCause should return 'this' 2008-01-03 10:08:33 -07:00
Joel Dice
be5600d79d fix Integer.toHexString to treat its argument as unsigned 2007-12-26 12:17:52 -07:00
Joel Dice
f116225933 fix 64-bit arithmetic support on x86-32 2007-12-22 17:00:35 -07:00
Joel Dice
c53470f9c8 Merge branch 'master' of dice.ecovate.com:git/vm 2007-12-21 17:27:49 -07:00
Joel Dice
a867e4d587 snapshot 2007-12-21 17:26:55 -07:00
James Sanders
8c56845616 Added support for Math.cos 2007-12-21 14:10:40 -07:00
Eric Scharff
6954c9c377 Fixes for PushbackReader (which only can push back one char) and StringReader. 2007-12-18 12:19:52 -07:00
Eric Scharff
8b2577b77c Add method to create one hashtable from a map, useful in converting a
HashMap into a Hashtable.
2007-12-18 11:23:59 -07:00
Eric Scharff
7224c98766 Trivial implementation of java.util.Random 2007-12-17 15:43:51 -07:00
Eric Scharff
5af58548b7 Removed unused variable in StringBuilder. 2007-12-14 16:16:40 -07:00
Joel Dice
216224dcc4 fix length tracking bugs in StringBuilder 2007-12-13 09:19:58 -07:00
Eric Scharff
ec653fbc1e Use the default line separator when logging 2007-12-11 10:26:28 -07:00
Joel Dice
fc78e122c0 Merge branch 'master' of dice:git/vm 2007-12-03 16:36:57 -07:00
Joel Dice
9f5c2f4122 implement Arrays.sort 2007-12-03 16:32:54 -07:00
Eric Scharff
3cc1232fc2 sys/wait.h should only be included when NOT compiling for win32 2007-12-03 13:25:46 -07:00
James Sanders
3f8a370ba8 Implemented Runtime.exec, Process.waitFor and Process.exitValue for non-windows 2007-11-30 16:39:51 -07:00
James Sanders
266c256116 Added IllegalThreadStateException, which is used by java.lang.Process 2007-11-30 16:11:06 -07:00
James Sanders
8f652ce12d Implemented native Process.exitValue and Process.waitFor on windows 2007-11-29 18:01:07 -07:00
James Sanders
b6ad93856d Merge branch 'master' of dice.readytalk.com:/home/dicej/git/vm 2007-11-28 17:52:23 -07:00
James Sanders
bf102aa1a8 implemented Runtime.exec(String) and Runtime.exec(String[]) 2007-11-28 17:52:08 -07:00
Eric Scharff
51c198f0f0 Implemented java.lang.Math.random() properly (seeding the random number
on first use, and then using the system random number generator)
2007-11-28 17:06:04 -07:00
Joel Dice
d24b633665 fix return value of ByteArrayOutputStream.size() 2007-11-27 16:59:49 -07:00
Joel Dice
74235ea33c add ByteArrayOutputStream.size() 2007-11-27 10:30:55 -07:00
Joel Dice
6fe0c4636f various bugfixes and tweaks in reflection 2007-11-20 13:40:07 -07:00
Joel Dice
80f23a5040 implement Class.getEnumConstants 2007-11-17 11:39:29 -07:00
Joel Dice
4f047ded8c make ArrayList.set() do bounds checking 2007-11-15 11:53:33 -07:00
Joel Dice
a6a1f8ba98 make ByteBuffer implement Comparable 2007-11-15 11:53:01 -07:00
Joel Dice
69f1024887 add missing classpath methods 2007-11-14 09:32:36 -07:00
Joel Dice
d1048f9bcb implement ByteBuffer.get(byte[]) 2007-11-09 14:32:33 -07:00
Joel Dice
7b8fb7233e add PersistentSet.toString(), fix a bug when removing the last element, and add a couple sanity checks 2007-11-09 08:08:35 -07:00
Joel Dice
fef3cddb9e fix build breakage due to missing isEmpty() methods 2007-11-07 09:48:09 -07:00
Joel Dice
4611c89dbe add a few classpath methods 2007-11-06 17:41:53 -07:00
Eric Scharff
76d876c039 Removed custom logging code, which is factored correctly elsewhere. 2007-11-06 11:20:12 -07:00
Joel Dice
94e9bd0fd2 clean up bootstrap type generation to eliminate redundancy (broken) 2007-11-04 14:15:28 -07:00
Joel Dice
7dfbd87a40 bugfixes 2007-11-02 15:42:19 -06:00
Joel Dice
e820b6a8a4 sketch of singleton support 2007-11-02 15:08:14 -06:00
Joel Dice
b71d5104ba snapshot 2007-11-01 13:24:09 -06:00
Joel Dice
7a4cca45c2 fix subtle length vs. limit bug in ByteArrayInputStream 2007-10-31 10:11:14 -06:00
Eric Scharff
1d04186a0c Fixed bug in ByteBuffer.getLong() 2007-10-31 09:27:26 -06:00
Eric Scharff
2fd2df53fd Fixed thinko in ByteArrayInputStream 2007-10-30 16:52:24 -06:00
Eric Scharff
b85c643251 Minor optimization for ByteArrayInputStream 2007-10-30 15:37:46 -06:00
Eric Scharff
907ce57975 Order of arraycopy backwards 2007-10-30 15:10:32 -06:00
Eric Scharff
df79f410f1 Optimize bulk reads from ByteArrayInputStream 2007-10-30 15:08:49 -06:00
Eric Scharff
958d39aa03 Add debug information for ByteBuffer 2007-10-30 14:55:00 -06:00
Joel Dice
67faa23d83 Merge branch 'master' of dice:git/vm 2007-10-29 15:42:48 -06:00
Joel Dice
956106f518 implement StringBuilder.delete() more efficiently 2007-10-29 15:40:05 -06:00
Eric Scharff
c97b16b8bc implement a few classpath methods required by SWT for Mac OS X 2007-10-29 15:23:13 -06:00
Eric Scharff
bcd2c75f41 Implements String.delete(char oldChar, String newChar), StringBuffer and
StringBuilder delete(int startIndex, int endIndex), and
replace (int startIndex, int endIndex, String replacementString)
2007-10-29 15:07:36 -06:00
Joel Dice
78ee14fff5 Merge branch 'master' of dice:git/vm 2007-10-29 14:57:40 -06:00
Joel Dice
75d4a4ff96 implement a few classpath methods required by SWT for Win32 2007-10-29 14:57:33 -06:00
Eric Scharff
8e95590dea Added a temporary hack for logging.
if the System property rt.log.dir is set, standard logging messages are
written both to standard out and to the file log.txt inside the directory
provided.  This allows us to get debugging information quickly.
2007-10-29 12:04:26 -06:00
Joel Dice
09cedfd7cb make Boolean, Byte, Short, etc. implement Comparable 2007-10-28 18:51:08 -06:00
Joel Dice
6710ca85d7 clean up JNIEXPORT definitions 2007-10-26 18:20:37 -06:00
Joel Dice
8e1637ec6b Merge branch 'master' of dice:git/vm 2007-10-26 18:05:02 -06:00
Joel Dice
4b92017ea9 fix several win32 bugs in SocketSelector 2007-10-26 18:04:55 -06:00
Eric Scharff
789cc8e9a2 On the Mac, building in the vm object is complicated. Instead,
rely on external files.
2007-10-26 16:10:12 -06:00
Joel Dice
f354abb4a0 build fixes and refactoring 2007-10-26 15:02:39 -06:00
Joel Dice
e892f1bff5 refactor System.getProperty() to reduce coupling with native code 2007-10-26 12:13:21 -06:00
Joel Dice
ccdc7fdda3 eliminate bin2c and use objcopy instead to translate binary data to an object file 2007-10-26 11:38:36 -06:00
Eric Scharff
25275933ce Print line numbers correctly for native and unknown source 2007-10-25 17:57:56 -06:00
Eric Scharff
a81b77a37e fixes i2f i2d implementation. Fixes image drawing bugs on Mac OS X.
Also fixes a crash caused by implementing StringBuffer.toString(float)
2007-10-25 14:26:51 -06:00
Joel Dice
b12b779c7f add support for passing properties to the VM via JNI; use vm.builtins property to specify builtin libraries 2007-10-25 12:33:43 -06:00
Joel Dice
c694b8c7e6 fix unix build breakage 2007-10-24 15:03:59 -06:00
Joel Dice
eaf1d205cd more windows port fixes 2007-10-24 11:24:19 -06:00
Joel Dice
5bfd90cfed more system-specific tweaks for windows port 2007-10-24 10:24:02 -06:00
Joel Dice
ea6f67a7c7 tweak os-specific system properties 2007-10-24 09:44:51 -06:00
Joel Dice
e145d09523 fix posix build breakage 2007-10-23 17:22:42 -06:00
Joel Dice
1381267e70 mork work on the windows port 2007-10-23 11:22:48 -06:00
Eric Scharff
52bc20ace2 Optimized calendar implementation. Year can now be computed with arithmetic,
not a loop to find the current year.
2007-10-22 15:53:46 -06:00
Eric Scharff
7eb08c5fc4 If a Calendar changes values, update the (cached) fields. 2007-10-22 12:23:56 -06:00