Skip to content

Commit 072eaef

Browse files
author
J. Duke
committed
Merge
2 parents 83b39d4 + f46969a commit 072eaef

File tree

492 files changed

+27111
-9071
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

492 files changed

+27111
-9071
lines changed

.hgtags-top-repo

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,3 +225,4 @@ d2dcb110e9dbaf9903c05b211df800e78e4b394e jdk8-b100
225225
9f74a220677dc265a724515d8e2617548cef62f1 jdk8-b101
226226
5eb3c1dc348f72a7f84f7d9d07834e8bbe09a799 jdk8-b102
227227
b7e64be81c8a7690703df5711f4fc2375da8a9cb jdk8-b103
228+
96c1b9b7524b52c3fcefc90ffad4c767396727c8 jdk8-b104

README-builds.html

Lines changed: 17 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ <h3><a name="get_source">Getting the Source</a></h3>
154154
</code>
155155
</blockquote>
156156
Once you have all the repositories, keep in mind that each
157-
repository is it's own independent repository.
157+
repository is its own independent repository.
158158
You can also re-run <code>./get_source.sh</code> anytime to
159159
pull over all the latest changesets in all the repositories.
160160
This set of nested repositories has been given the term
@@ -241,6 +241,14 @@ <h3><a name="repositories">Repositories</a></h3>
241241
source code for the OpenJDK Corba functionality
242242
</td>
243243
</tr>
244+
<tr>
245+
<td>
246+
nashorn
247+
</td>
248+
<td>
249+
source code for the OpenJDK JavaScript implementation
250+
</td>
251+
</tr>
244252
</tbody>
245253
</table>
246254
</blockquote>
@@ -386,7 +394,7 @@ <h3><a name="setup">System Setup</a></h3>
386394
<code>--with-boot-jdk</code>.
387395
</li>
388396
<li>
389-
Insure that GNU make, the Bootstrap JDK,
397+
Ensure that GNU make, the Bootstrap JDK,
390398
and the compilers are all
391399
in your PATH environment variable
392400
</li>
@@ -1307,9 +1315,9 @@ <h3><a name="faq">FAQ</a></h3>
13071315
you will need to modify the makefiles. But for normal file
13081316
additions or removals, no changes are needed. There are certan
13091317
exceptions for some native libraries where the source files are spread
1310-
over many directories which also contain courses for other
1318+
over many directories which also contain sources for other
13111319
libraries. In these cases it was simply easier to create include lists
1312-
rather thane excludes.
1320+
rather than excludes.
13131321
</p>
13141322

13151323
<p>
@@ -1327,14 +1335,14 @@ <h3><a name="faq">FAQ</a></h3>
13271335
<p>
13281336
<b>Q:</b>
13291337
<code>configure</code> provides OpenJDK-specific features such as
1330-
<code>--enable-jigsaw</code> or <code>--with-builddeps-server</code>
1331-
that are not described in this document. What about those?
1338+
<code>--with-builddeps-server</code> that are not
1339+
described in this document. What about those?
13321340
<br>
13331341
<b>A:</b>
13341342
Try them out if you like! But be aware that most of these are
13351343
experimental features.
13361344
Many of them don't do anything at all at the moment; the option
1337-
is just a placeholder. Other depends on
1345+
is just a placeholder. Others depend on
13381346
pieces of code or infrastructure that is currently
13391347
not ready for prime time.
13401348
</p>
@@ -1385,24 +1393,6 @@ <h3><a name="faq">FAQ</a></h3>
13851393
system and some will need to wait until after.
13861394
</p>
13871395

1388-
<p>
1389-
<b>Q:</b> What is @GenerateNativeHeaders?
1390-
<br>
1391-
<b>A:</b>
1392-
To speed up compilation, we added a flag to javac which makes it
1393-
do the job of javah as well, as a by-product; that is, generating
1394-
native .h header files. These files are only generated
1395-
if a class contains native methods. However, sometimes
1396-
a class contains no native method,
1397-
but still contains constants that native code needs to use.
1398-
The new GenerateNativeHeaders annotation tells javac to
1399-
force generation of a
1400-
header file in these cases. (We don't want to generate
1401-
native headers for all classes that contains constants
1402-
but no native methods, since
1403-
that would slow down the compilation process needlessly.)
1404-
</p>
1405-
14061396
<p>
14071397
<b>Q:</b>
14081398
Is anything able to use the results of the new build's default make target?
@@ -1429,10 +1419,9 @@ <h3><a name="faq">FAQ</a></h3>
14291419
What should I do?
14301420
<br>
14311421
<b>A:</b>
1432-
It might very well be that we have missed to add support for
1422+
It might very well be that we have neglected to add support for
14331423
an option that was actually used from outside the build system.
1434-
Email us and we will
1435-
add support for it!
1424+
Email us and we will add support for it!
14361425
</p>
14371426

14381427
</blockquote>

common/autoconf/generated-configure.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29573,7 +29573,7 @@ if test "x$OPENJDK_TARGET_OS" = xsolaris; then
2957329573
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
2957429574
fi
2957529575
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29576-
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
29576+
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
2957729577
# Setting these parameters makes it an error to link to macosx APIs that are
2957829578
# newer than the given OS version and makes the linked binaries compatible even
2957929579
# if built on a newer version of the OS.

common/autoconf/toolchain.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,7 @@ if test "x$OPENJDK_TARGET_OS" = xsolaris; then
905905
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
906906
fi
907907
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
908-
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
908+
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
909909
# Setting these parameters makes it an error to link to macosx APIs that are
910910
# newer than the given OS version and makes the linked binaries compatible even
911911
# if built on a newer version of the OS.

corba/.hgtags

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,3 +225,4 @@ c8286839d0df04aba819ec4bef12b86babccf30e jdk8-b90
225225
a013024b07475782f1fa8e196e950b34b4077663 jdk8-b101
226226
528c7e76eaeee022817ee085668459bc97cf5665 jdk8-b102
227227
49c4a777fdfd648d4c3fffc940fdb97a23108ca8 jdk8-b103
228+
d411c60a8c2fe8fdc572af907775e90f7eefd513 jdk8-b104

hotspot/.hgtags

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,3 +369,5 @@ c4697c1c448416108743b59118b4a2498b339d0c jdk8-b102
369369
7f55137d6aa81efc6eb0035813709f2cb6a26b8b hs25-b45
370370
6f9be7f87b9653e94fd8fb3070891a0cc91b15bf jdk8-b103
371371
580430d131ccd475e2f2ad4006531b8c4813d102 hs25-b46
372+
104743074675359cfbf7f4dcd9ab2a5974a16627 jdk8-b104
373+
c1604d5885a6f2adc0bcea2fa142a8f6bafad2f0 hs25-b47

hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/InstanceKlass.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,19 +75,19 @@ private static synchronized void initialize(TypeDataBase db) throws WrongTypeExc
7575
javaFieldsCount = new CIntField(type.getCIntegerField("_java_fields_count"), 0);
7676
constants = new MetadataField(type.getAddressField("_constants"), 0);
7777
classLoaderData = type.getAddressField("_class_loader_data");
78-
sourceFileName = type.getAddressField("_source_file_name");
7978
sourceDebugExtension = type.getAddressField("_source_debug_extension");
8079
innerClasses = type.getAddressField("_inner_classes");
80+
sourceFileNameIndex = new CIntField(type.getCIntegerField("_source_file_name_index"), 0);
8181
nonstaticFieldSize = new CIntField(type.getCIntegerField("_nonstatic_field_size"), 0);
8282
staticFieldSize = new CIntField(type.getCIntegerField("_static_field_size"), 0);
83-
staticOopFieldCount = new CIntField(type.getCIntegerField("_static_oop_field_count"), 0);
83+
staticOopFieldCount = new CIntField(type.getCIntegerField("_static_oop_field_count"), 0);
8484
nonstaticOopMapSize = new CIntField(type.getCIntegerField("_nonstatic_oop_map_size"), 0);
8585
isMarkedDependent = new CIntField(type.getCIntegerField("_is_marked_dependent"), 0);
8686
initState = new CIntField(type.getCIntegerField("_init_state"), 0);
8787
vtableLen = new CIntField(type.getCIntegerField("_vtable_len"), 0);
8888
itableLen = new CIntField(type.getCIntegerField("_itable_len"), 0);
8989
breakpoints = type.getAddressField("_breakpoints");
90-
genericSignature = type.getAddressField("_generic_signature");
90+
genericSignatureIndex = new CIntField(type.getCIntegerField("_generic_signature_index"), 0);
9191
majorVersion = new CIntField(type.getCIntegerField("_major_version"), 0);
9292
minorVersion = new CIntField(type.getCIntegerField("_minor_version"), 0);
9393
headerSize = Oop.alignObjectOffset(type.getSize());
@@ -134,9 +134,9 @@ public InstanceKlass(Address addr) {
134134
private static CIntField javaFieldsCount;
135135
private static MetadataField constants;
136136
private static AddressField classLoaderData;
137-
private static AddressField sourceFileName;
138137
private static AddressField sourceDebugExtension;
139138
private static AddressField innerClasses;
139+
private static CIntField sourceFileNameIndex;
140140
private static CIntField nonstaticFieldSize;
141141
private static CIntField staticFieldSize;
142142
private static CIntField staticOopFieldCount;
@@ -146,7 +146,7 @@ public InstanceKlass(Address addr) {
146146
private static CIntField vtableLen;
147147
private static CIntField itableLen;
148148
private static AddressField breakpoints;
149-
private static AddressField genericSignature;
149+
private static CIntField genericSignatureIndex;
150150
private static CIntField majorVersion;
151151
private static CIntField minorVersion;
152152

@@ -346,15 +346,15 @@ public int getAllFieldsCount() {
346346
public ConstantPool getConstants() { return (ConstantPool) constants.getValue(this); }
347347
public ClassLoaderData getClassLoaderData() { return ClassLoaderData.instantiateWrapperFor(classLoaderData.getValue(getAddress())); }
348348
public Oop getClassLoader() { return getClassLoaderData().getClassLoader(); }
349-
public Symbol getSourceFileName() { return getSymbol(sourceFileName); }
349+
public Symbol getSourceFileName() { return getConstants().getSymbolAt(sourceFileNameIndex.getValue(this)); }
350350
public String getSourceDebugExtension(){ return CStringUtilities.getString(sourceDebugExtension.getValue(getAddress())); }
351351
public long getNonstaticFieldSize() { return nonstaticFieldSize.getValue(this); }
352352
public long getStaticOopFieldCount() { return staticOopFieldCount.getValue(this); }
353353
public long getNonstaticOopMapSize() { return nonstaticOopMapSize.getValue(this); }
354354
public boolean getIsMarkedDependent() { return isMarkedDependent.getValue(this) != 0; }
355355
public long getVtableLen() { return vtableLen.getValue(this); }
356356
public long getItableLen() { return itableLen.getValue(this); }
357-
public Symbol getGenericSignature() { return getSymbol(genericSignature); }
357+
public Symbol getGenericSignature() { return getConstants().getSymbolAt(genericSignatureIndex.getValue(this)); }
358358
public long majorVersion() { return majorVersion.getValue(this); }
359359
public long minorVersion() { return minorVersion.getValue(this); }
360360

hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassDump.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,13 @@ public void run() {
9292
System.err.println("Warning: Can not create class filter!");
9393
}
9494
}
95-
String outputDirectory = System.getProperty("sun.jvm.hotspot.tools.jcore.outputDir", ".");
96-
setOutputDirectory(outputDirectory);
95+
96+
// outputDirectory and jarStream are alternatives: setting one closes the other.
97+
// If neither is set, use outputDirectory from the System property:
98+
if (outputDirectory == null && jarStream == null) {
99+
String dirName = System.getProperty("sun.jvm.hotspot.tools.jcore.outputDir", ".");
100+
setOutputDirectory(dirName);
101+
}
97102

98103
// walk through the system dictionary
99104
SystemDictionary dict = VM.getVM().getSystemDictionary();

hotspot/make/bsd/makefiles/gcc.make

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ ifeq ($(USE_CLANG), true)
247247
# Not yet supported by clang in Xcode 4.6.2
248248
# WARNINGS_ARE_ERRORS += -Wno-tautological-constant-out-of-range-compare
249249
WARNINGS_ARE_ERRORS += -Wno-delete-non-virtual-dtor -Wno-deprecated -Wno-format -Wno-dynamic-class-memaccess
250-
WARNINGS_ARE_ERRORS += -Wno-return-type -Wno-empty-body
250+
WARNINGS_ARE_ERRORS += -Wno-empty-body
251251
endif
252252
253253
WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef

hotspot/make/hotspot_version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ HOTSPOT_VM_COPYRIGHT=Copyright 2013
3535

3636
HS_MAJOR_VER=25
3737
HS_MINOR_VER=0
38-
HS_BUILD_NUMBER=46
38+
HS_BUILD_NUMBER=47
3939

4040
JDK_MAJOR_VER=1
4141
JDK_MINOR_VER=8

hotspot/src/cpu/sparc/vm/macroAssembler_sparc.cpp

Lines changed: 69 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,7 @@
2929
#include "interpreter/interpreter.hpp"
3030
#include "memory/cardTableModRefBS.hpp"
3131
#include "memory/resourceArea.hpp"
32+
#include "memory/universe.hpp"
3233
#include "prims/methodHandles.hpp"
3334
#include "runtime/biasedLocking.hpp"
3435
#include "runtime/interfaceSupport.hpp"
@@ -1145,7 +1146,7 @@ void MacroAssembler::set_narrow_klass(Klass* k, Register d) {
11451146
assert(oop_recorder() != NULL, "this assembler needs an OopRecorder");
11461147
int klass_index = oop_recorder()->find_index(k);
11471148
RelocationHolder rspec = metadata_Relocation::spec(klass_index);
1148-
narrowOop encoded_k = oopDesc::encode_klass(k);
1149+
narrowOop encoded_k = Klass::encode_klass(k);
11491150

11501151
assert_not_delayed();
11511152
// Relocation with special format (see relocInfo_sparc.hpp).
@@ -1419,7 +1420,6 @@ void MacroAssembler::verify_oop_subroutine() {
14191420
load_klass(O0_obj, O0_obj);
14201421
// assert((klass != NULL)
14211422
br_null_short(O0_obj, pn, fail);
1422-
// TODO: Future assert that klass is lower 4g memory for UseCompressedKlassPointers
14231423

14241424
wrccr( O5_save_flags ); // Restore CCR's
14251425

@@ -4089,52 +4089,91 @@ void MacroAssembler::decode_heap_oop_not_null(Register src, Register dst) {
40894089
}
40904090

40914091
void MacroAssembler::encode_klass_not_null(Register r) {
4092-
assert(Metaspace::is_initialized(), "metaspace should be initialized");
40934092
assert (UseCompressedKlassPointers, "must be compressed");
4094-
assert (LogKlassAlignmentInBytes == Universe::narrow_klass_shift(), "decode alg wrong");
4095-
if (Universe::narrow_klass_base() != NULL)
4096-
sub(r, G6_heapbase, r);
4097-
srlx(r, LogKlassAlignmentInBytes, r);
4093+
assert(Universe::narrow_klass_base() != NULL, "narrow_klass_base should be initialized");
4094+
assert(r != G6_heapbase, "bad register choice");
4095+
set((intptr_t)Universe::narrow_klass_base(), G6_heapbase);
4096+
sub(r, G6_heapbase, r);
4097+
if (Universe::narrow_klass_shift() != 0) {
4098+
assert (LogKlassAlignmentInBytes == Universe::narrow_klass_shift(), "decode alg wrong");
4099+
srlx(r, LogKlassAlignmentInBytes, r);
4100+
}
4101+
reinit_heapbase();
40984102
}
40994103

41004104
void MacroAssembler::encode_klass_not_null(Register src, Register dst) {
4101-
assert(Metaspace::is_initialized(), "metaspace should be initialized");
4102-
assert (UseCompressedKlassPointers, "must be compressed");
4103-
assert (LogKlassAlignmentInBytes == Universe::narrow_klass_shift(), "decode alg wrong");
4104-
if (Universe::narrow_klass_base() == NULL) {
4105-
srlx(src, LogKlassAlignmentInBytes, dst);
4105+
if (src == dst) {
4106+
encode_klass_not_null(src);
41064107
} else {
4107-
sub(src, G6_heapbase, dst);
4108-
srlx(dst, LogKlassAlignmentInBytes, dst);
4108+
assert (UseCompressedKlassPointers, "must be compressed");
4109+
assert(Universe::narrow_klass_base() != NULL, "narrow_klass_base should be initialized");
4110+
set((intptr_t)Universe::narrow_klass_base(), dst);
4111+
sub(src, dst, dst);
4112+
if (Universe::narrow_klass_shift() != 0) {
4113+
srlx(dst, LogKlassAlignmentInBytes, dst);
4114+
}
41094115
}
41104116
}
41114117

4118+
// Function instr_size_for_decode_klass_not_null() counts the instructions
4119+
// generated by decode_klass_not_null() and reinit_heapbase(). Hence, if
4120+
// the instructions they generate change, then this method needs to be updated.
4121+
int MacroAssembler::instr_size_for_decode_klass_not_null() {
4122+
assert (UseCompressedKlassPointers, "only for compressed klass ptrs");
4123+
// set + add + set
4124+
int num_instrs = insts_for_internal_set((intptr_t)Universe::narrow_klass_base()) + 1 +
4125+
insts_for_internal_set((intptr_t)Universe::narrow_ptrs_base());
4126+
if (Universe::narrow_klass_shift() == 0) {
4127+
return num_instrs * BytesPerInstWord;
4128+
} else { // sllx
4129+
return (num_instrs + 1) * BytesPerInstWord;
4130+
}
4131+
}
4132+
4133+
// !!! If the instructions that get generated here change then function
4134+
// instr_size_for_decode_klass_not_null() needs to get updated.
41124135
void MacroAssembler::decode_klass_not_null(Register r) {
4113-
assert(Metaspace::is_initialized(), "metaspace should be initialized");
41144136
// Do not add assert code to this unless you change vtableStubs_sparc.cpp
41154137
// pd_code_size_limit.
41164138
assert (UseCompressedKlassPointers, "must be compressed");
4117-
assert (LogKlassAlignmentInBytes == Universe::narrow_klass_shift(), "decode alg wrong");
4118-
sllx(r, LogKlassAlignmentInBytes, r);
4119-
if (Universe::narrow_klass_base() != NULL)
4120-
add(r, G6_heapbase, r);
4139+
assert(Universe::narrow_klass_base() != NULL, "narrow_klass_base should be initialized");
4140+
assert(r != G6_heapbase, "bad register choice");
4141+
set((intptr_t)Universe::narrow_klass_base(), G6_heapbase);
4142+
if (Universe::narrow_klass_shift() != 0)
4143+
sllx(r, LogKlassAlignmentInBytes, r);
4144+
add(r, G6_heapbase, r);
4145+
reinit_heapbase();
41214146
}
41224147

41234148
void MacroAssembler::decode_klass_not_null(Register src, Register dst) {
4124-
assert(Metaspace::is_initialized(), "metaspace should be initialized");
4125-
// Do not add assert code to this unless you change vtableStubs_sparc.cpp
4126-
// pd_code_size_limit.
4127-
assert (UseCompressedKlassPointers, "must be compressed");
4128-
assert (LogKlassAlignmentInBytes == Universe::narrow_klass_shift(), "decode alg wrong");
4129-
sllx(src, LogKlassAlignmentInBytes, dst);
4130-
if (Universe::narrow_klass_base() != NULL)
4131-
add(dst, G6_heapbase, dst);
4149+
if (src == dst) {
4150+
decode_klass_not_null(src);
4151+
} else {
4152+
// Do not add assert code to this unless you change vtableStubs_sparc.cpp
4153+
// pd_code_size_limit.
4154+
assert (UseCompressedKlassPointers, "must be compressed");
4155+
assert(Universe::narrow_klass_base() != NULL, "narrow_klass_base should be initialized");
4156+
if (Universe::narrow_klass_shift() != 0) {
4157+
assert((src != G6_heapbase) && (dst != G6_heapbase), "bad register choice");
4158+
set((intptr_t)Universe::narrow_klass_base(), G6_heapbase);
4159+
sllx(src, LogKlassAlignmentInBytes, dst);
4160+
add(dst, G6_heapbase, dst);
4161+
reinit_heapbase();
4162+
} else {
4163+
set((intptr_t)Universe::narrow_klass_base(), dst);
4164+
add(src, dst, dst);
4165+
}
4166+
}
41324167
}
41334168

41344169
void MacroAssembler::reinit_heapbase() {
41354170
if (UseCompressedOops || UseCompressedKlassPointers) {
4136-
AddressLiteral base(Universe::narrow_ptrs_base_addr());
4137-
load_ptr_contents(base, G6_heapbase);
4171+
if (Universe::heap() != NULL) {
4172+
set((intptr_t)Universe::narrow_ptrs_base(), G6_heapbase);
4173+
} else {
4174+
AddressLiteral base(Universe::narrow_ptrs_base_addr());
4175+
load_ptr_contents(base, G6_heapbase);
4176+
}
41384177
}
41394178
}
41404179

hotspot/src/cpu/sparc/vm/macroAssembler_sparc.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,6 +1177,9 @@ class MacroAssembler : public Assembler {
11771177
void push_CPU_state();
11781178
void pop_CPU_state();
11791179

1180+
// Returns the byte size of the instructions generated by decode_klass_not_null().
1181+
static int instr_size_for_decode_klass_not_null();
1182+
11801183
// if heap base register is used - reinit it with the correct value
11811184
void reinit_heapbase();
11821185

0 commit comments

Comments
 (0)