Commit Graph

2644 Commits

Author SHA1 Message Date
Joel Dice
349d381d95 progress towards cross-endian bootimage builds
This fixes a number of bugs concerning cross-architecture bootimage
builds involving diffent endianesses.  There will be more work to do
before it works.
2011-09-16 20:53:08 -06:00
Joel Dice
178dd7af34 Merge remote branch 'origin/master' into ios 2011-09-16 20:46:03 -06:00
Joel Dice
d342c9b8c5 fix 64-bit Windows openjdk-src build 2011-09-16 19:01:14 -06:00
Joel Dice
029a9ca507 fix MinGW (non-w64) build
Commit a2dca0dc fixed the MinGW-w64 openjdk-src build but broke the
traditional MinGW build.  This should ensure that both work.
2011-09-16 18:42:18 -06:00
Joel Dice
916c96c2b9 fix access violation introduced in last commit 2011-09-14 13:27:17 -06:00
Brian Haar
446c09dd33 Fix for File.length() integer overflow on 32-bit Windows.
The File.length() method was returning a signed 32-bit value
on 32-bit Windows systems.  This was causing an integer overflow
on file sizes greater than 2 GB.  This appears to be caused by
the way Windows handles the STAT() function.  This patch checks
whether the current platform is Windows then uses the Windows API
to get the correct file size and return it as a jlong.
2011-09-14 13:18:20 -06:00
Joel Dice
ab840c91db Merge branch 'oss-master' into ios 2011-09-12 20:27:59 -06:00
Joel Dice
be01e5b687 fix handling of 64-bit arguments to Method.invoke on 32-bit architectures
The previous code failed to account for alignment padding in the
Double and Long classes.
2011-09-12 20:26:32 -06:00
Joel Dice
8a30efc52f only generate crash dumps for access violations and divides-by-zero
Some apps and libraries may generate recoverable SEH exceptions on
Windows, in which cases we don't want to waste time and disk space
generating memory dumps.
2011-09-12 13:45:21 -06:00
Joel Dice
84a6daa400 fix unused parameter warning 2011-09-01 11:36:00 -06:00
Joel Dice
66bc326523 Merge branch 'cross-bootimage' into ios 2011-09-01 10:53:39 -06:00
Joel Dice
6949fc3d60 Merge remote-tracking branch 'origin/master' into ios 2011-09-01 10:53:20 -06:00
Joel Dice
e3fc8d3dd2 enable cross-architecture ARM bootimage builds 2011-09-01 10:51:56 -06:00
Joel Dice
8c9bfccb9e Merge remote branch 'origin/bufferedReaderFix' into oss-master 2011-09-01 09:37:10 -06:00
Seth Goings
fb3a23f02d Fixed behavior of readLine accepting *\n\n as a line, not two 2011-09-01 09:31:08 -06:00
Seth Goings
97e03b9f28 Fixed possible ArrayIndexOutOfBounds exception 2011-09-01 09:11:39 -06:00
Joel Dice
e505cbe99d more progress towards cross-architecture bootimage builds
This commit fixes a lot of bugs.  All tests are now pass for Linux
x86_64 to Linux i386 cross builds.
2011-08-31 21:18:00 -06:00
Joel Dice
5d55d61c17 fix use of uninitalized memory in jnienv.cpp 2011-08-31 21:16:22 -06:00
Joel Dice
67300c229a change local variable name to avoid shadowing another variable 2011-08-31 21:15:41 -06:00
Seth Goings
c75b06ddc1 Added support for non POSIX line endings. Will now accept: \r and \r\n as line endings (per Sun's JavaDoc) 2011-08-31 20:46:15 -06:00
Joel Dice
6923c74c4c Merge branch 'ios' of oss:/var/local/git/avian into ios
Conflicts:
	makefile
2011-08-29 19:07:42 -06:00
Joel Dice
5b4f17997f progress towards cross-architecture bootimage builds
This monster commit is the first step towards supporting
cross-architecture bootimage builds.  The challenge is to build a heap
and code image for the target platform where the word size and
endianess may differ from those of the build architecture.  That means
the memory layout of objects may differ due to alignment and size
differences, so we can't just copy objects into the heap image
unchanged; we must copy field by field, resizing values, reversing
endianess and shifting offsets as necessary.

This commit also removes POD (plain old data) type support from the
type generator because it added a lot of complication and little
value.
2011-08-29 19:00:17 -06:00
Joel Dice
f0cb26ec51 treat carriage returns as whitespace when parsing types.def
On Windows, some versions of Git automatically translate Unix line
endings to Windows line endings, which can break the build unless we
treat carriage returns as whitespace when parsing.
2011-08-29 14:31:30 -06:00
Joel Dice
9522842b4b support cross builds on OS X to non-Mac targets 2011-08-23 17:04:04 -06:00
Joel Dice
4c47f4fae8 Merge remote-tracking branch 'origin/master' into ios 2011-08-23 16:40:01 -06:00
Joel Dice
d09e5ee8eb fix Windows build regression 2011-08-15 16:37:15 -06:00
Anonymous
16aa5c3d59 improve IOException message in the case of a Runtime.exec() failure
We now properly forward the errno value from the child when execvp()
fails, which the parent then uses to for the errno message as well as
including the failed command's name in the message.
2011-08-15 07:12:52 -06:00
Joel Dice
b4661d2ccd Merge remote branch 'origin/master' into ios 2011-08-15 07:09:44 -06:00
Joel Dice
1c59aa51d8 add fields and methods to AbstractList for compatibility
Google Protocol Buffers relies on these.
2011-08-12 14:29:22 -06:00
Joel Dice
3df3892d34 throw AbstractMethodError when appropriate in prepareMethodForCall
Otherwise, we'll crash later when we try to compile an abstract
method.
2011-08-12 14:19:21 -06:00
Joel Dice
561eb72726 fix typo in readme.txt 2011-08-12 14:17:31 -06:00
Topher Lamey
10183a9870 Added AbstractMap for protobuf, and String getByte encoding for Latin-1 2011-08-12 13:30:51 -06:00
Anonymous
3d7c65d314 implement File.getAbsolutePath()/File.getAbsoluteFile() on Unix platforms 2011-08-11 08:52:49 -06:00
Anonymous
7ed580cf84 fix boolean deserialization in ObjectInputStream 2011-08-11 08:52:09 -06:00
Joel Dice
3c45db68c3 update copyright years in license.txt 2011-08-11 08:33:42 -06:00
Joel Dice
8d2ca7aaf5 fix Thread.interrupt deadlock
Previously, we returned immediately from Monitor.wait if we found we
had been interrupted, but this caused deadlock when waiting to enter
the exclusive state, since we never released Machine::stateLock to
allow active threads to transition into the idle state.  This commit
ensures that we at least briefly release the lock without actually
waiting in that case.
2011-08-11 07:35:03 -06:00
Joel Dice
44f7bd9fe0 fix argument alignment for Darwin/ARM 2011-08-10 21:33:56 -06:00
Joel Dice
39cffb8933 set minimum capacity to one if it's zero in Segment constructor
Allocating an empty Segment causes problems for later computations, so
we avoid it even if the caller would otherwise permit it.
2011-08-10 21:30:55 -06:00
Joel Dice
e5a8d5c824 add support for Apple iOS on ARM
Most tests are passing, but not all, so this still needs more work.
2011-08-10 19:21:48 -06:00
Joel Dice
4b9cb4f4e4 enable JMX support for openjdk-src build and implement GetInputArgumentArray 2011-08-05 18:06:29 -06:00
Joel Dice
5dbcbb825b fix Logging test for tails=true build
In the tails=true build, the calling method cannot always be
determined due to stack frames being optimized away, so we must be
prepared for LogRecord.getSourceMethodName to return null.
2011-08-05 18:04:38 -06:00
Joel Dice
792653e190 strip leading slashes from name in ZipFile.getEntry
This is necessary to allow resource loading of the form
Foo.class.getResourceAsStream("/foo.txt") from JAR files.
2011-07-26 09:09:04 -06:00
Joel Dice
801327752a accept (but currently ignore) -client and -server options for command-line compatibility with java 2011-07-18 14:17:22 -06:00
Joel Dice
c3824c6844 fix crash when encountering invokespecial call to abstract method
We must throw an AbstractMethodError when such a call is executed (not
when the call is compiled), so we compile this case as a call to a
thunk which throws such an error.
2011-07-17 19:54:55 -06:00
Joel Dice
08d4fddbb4 handle case of class with no methods in classInitializer 2011-07-17 19:51:48 -06:00
Joel Dice
753b90a811 request an object mask when allocating a singleton
Singletons may have embedded object references, and if they are
allocated at fixed memory locations (e.g. if they are larger than
64KB), they must have object masks so the garbage collector knows were
to find said references.
2011-07-17 19:48:28 -06:00
Joel Dice
adbe74efbe add debug logging to finder.cpp 2011-07-17 19:48:12 -06:00
Joel Dice
20091031da increase HeapCapacity to 256MB in bootimage.cpp
This is necessary to avoid running out of memory when building
bootimages of certain apps with OpenJDK using ProGuard'ed code.
2011-07-17 19:45:58 -06:00
Joel Dice
f6d489ff88 memoize padding calculations in x86.cpp
These calculations were appearing high on profiles of apps which force
a lot of methods to be compiled at startup.
2011-07-16 19:12:45 -06:00
Joel Dice
67cbc79613 fix crash in BranchEvent::compile for bootimage builds
We can't reduce a conditional branch to an unconditional jump unless
both arguments to the comparison are constants *and* those constants
have been resolved.  The latter may not be true in the case of a
bootimage build.
2011-07-16 19:10:05 -06:00