This commit is contained in:
Lana Steuck 2012-05-25 16:32:02 -07:00
commit cc0d0b06ff
156 changed files with 2992 additions and 1736 deletions

View file

@ -159,3 +159,5 @@ a6e6d42203e6d35f9e8b31eac25b0021b4dd58ad jdk8-b33
f151d5833912a82cd4f203944da0305c3be83ecc jdk8-b35 f151d5833912a82cd4f203944da0305c3be83ecc jdk8-b35
98ce9816ae089c959ba1e70fba98423a31c4e9fa jdk8-b36 98ce9816ae089c959ba1e70fba98423a31c4e9fa jdk8-b36
b3a91113026c99b0da010d41055719ab0d8938f0 jdk8-b37 b3a91113026c99b0da010d41055719ab0d8938f0 jdk8-b37
4cc5610a6dd6227da766ebf9742eb11ff5ded6c0 jdk8-b38
35a5397278779a2f8f3013f81586dc8f30cb149d jdk8-b39

View file

@ -159,3 +159,5 @@ cc771d92284f71765eca14d6d08703c4af254c04 jdk8-b21
5285317ebb4e8e4f6d8d52b5616fa801e2ea844d jdk8-b35 5285317ebb4e8e4f6d8d52b5616fa801e2ea844d jdk8-b35
6a6ba0a07f33d37a2f97b1107e60c6a9a69ec84d jdk8-b36 6a6ba0a07f33d37a2f97b1107e60c6a9a69ec84d jdk8-b36
b2972095a4b1e2a97409b7c3df61f3b263a5ce14 jdk8-b37 b2972095a4b1e2a97409b7c3df61f3b263a5ce14 jdk8-b37
d939bd0ab13c16647ffa38cc4b64fb31b7d44e10 jdk8-b38
8927dd68aee3fa54a1a698e2980e1b2f6c7c12c1 jdk8-b39

View file

@ -159,3 +159,5 @@ e24c5cc8b0f7cc48374eef0f995838fb4823e0eb jdk8-b34
e3d735914edd0a621b16bb85417423f8e6af5d51 jdk8-b35 e3d735914edd0a621b16bb85417423f8e6af5d51 jdk8-b35
a5a61f259961a7f46b002e5cc50b4a9bf86927b6 jdk8-b36 a5a61f259961a7f46b002e5cc50b4a9bf86927b6 jdk8-b36
83fac66442cf680bb59ec9e3a71cc4729322b595 jdk8-b37 83fac66442cf680bb59ec9e3a71cc4729322b595 jdk8-b37
b8cbfb31139f820e5e094ba71449e58159fbe22e jdk8-b38
785af00e2827990f149b32ec37f523dbca3efdd1 jdk8-b39

View file

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# #
# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -26,7 +26,7 @@
# #
# Get clones of all nested repositories # Get clones of all nested repositories
sh ./make/scripts/hgforest.sh clone sh ./make/scripts/hgforest.sh clone $*
# Update all existing repositories to the latest sources # Update all existing repositories to the latest sources
sh ./make/scripts/hgforest.sh pull -u sh ./make/scripts/hgforest.sh pull -u

View file

@ -244,3 +244,7 @@ dff6e3459210f8dd0430b9b03ccc99280560da30 hs24-b08
50b4400ca1ecb2ac2fde35f5e53ec8f04b86be7f jdk8-b36 50b4400ca1ecb2ac2fde35f5e53ec8f04b86be7f jdk8-b36
bfcf92bfefb82da00f7fdbf0d9273feaa0a9456d jdk8-b37 bfcf92bfefb82da00f7fdbf0d9273feaa0a9456d jdk8-b37
7d5ec8bf38d1b12e0e09ec381f10976b8beede3b hs24-b09 7d5ec8bf38d1b12e0e09ec381f10976b8beede3b hs24-b09
637c3f5f068f88fb9ec9c5867341cf59fd5ebedc jdk8-b38
73147e6c48813b5fee904aa33f79a77103250ff4 hs24-b10
96a403721094ecdaf6a1f4f52ebd0a82e07df199 jdk8-b39
14b0e07ab9a6fa1662414496b7e07ac8450cf517 hs24-b11

View file

@ -1,5 +1,5 @@
# #
# Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -31,11 +31,11 @@
# #
# Don't put quotes (fail windows build). # Don't put quotes (fail windows build).
HOTSPOT_VM_COPYRIGHT=Copyright 2011 HOTSPOT_VM_COPYRIGHT=Copyright 2012
HS_MAJOR_VER=24 HS_MAJOR_VER=24
HS_MINOR_VER=0 HS_MINOR_VER=0
HS_BUILD_NUMBER=09 HS_BUILD_NUMBER=11
JDK_MAJOR_VER=1 JDK_MAJOR_VER=1
JDK_MINOR_VER=8 JDK_MINOR_VER=8

View file

@ -102,9 +102,11 @@ CXXFLAGS = \
# a time and date. # a time and date.
vm_version.o: CXXFLAGS += ${JRE_VERSION} vm_version.o: CXXFLAGS += ${JRE_VERSION}
ifndef JAVASE_EMBEDDED ifndef JAVASE_EMBEDDED
ifneq (${ARCH},arm)
CFLAGS += -DINCLUDE_TRACE CFLAGS += -DINCLUDE_TRACE
endif endif
endif
# CFLAGS_WARN holds compiler options to suppress/enable warnings. # CFLAGS_WARN holds compiler options to suppress/enable warnings.
CFLAGS += $(CFLAGS_WARN/BYFILE) CFLAGS += $(CFLAGS_WARN/BYFILE)
@ -153,11 +155,13 @@ SOURCE_PATHS+=$(HS_COMMON_SRC)/os/posix/vm
SOURCE_PATHS+=$(HS_COMMON_SRC)/cpu/$(Platform_arch)/vm SOURCE_PATHS+=$(HS_COMMON_SRC)/cpu/$(Platform_arch)/vm
SOURCE_PATHS+=$(HS_COMMON_SRC)/os_cpu/$(Platform_os_arch)/vm SOURCE_PATHS+=$(HS_COMMON_SRC)/os_cpu/$(Platform_os_arch)/vm
ifndef JAVASE_EMBEDDED ifndef JAVASE_EMBEDDED
ifneq (${ARCH},arm)
SOURCE_PATHS+=$(shell if [ -d $(HS_ALT_SRC)/share/vm/jfr ]; then \ SOURCE_PATHS+=$(shell if [ -d $(HS_ALT_SRC)/share/vm/jfr ]; then \
find $(HS_ALT_SRC)/share/vm/jfr -type d; \ find $(HS_ALT_SRC)/share/vm/jfr -type d; \
fi) fi)
endif endif
endif
CORE_PATHS=$(foreach path,$(SOURCE_PATHS),$(call altsrc,$(path)) $(path)) CORE_PATHS=$(foreach path,$(SOURCE_PATHS),$(call altsrc,$(path)) $(path))
CORE_PATHS+=$(GENERATED)/jvmtifiles CORE_PATHS+=$(GENERATED)/jvmtifiles

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -238,9 +238,12 @@ void LIR_Assembler::emit_string_compare(LIR_Opr left, LIR_Opr right, LIR_Opr dst
Register result = dst->as_register(); Register result = dst->as_register();
{ {
// Get a pointer to the first character of string0 in tmp0 and get string0.count in str0 // Get a pointer to the first character of string0 in tmp0
// Get a pointer to the first character of string1 in tmp1 and get string1.count in str1 // and get string0.length() in str0
// Also, get string0.count-string1.count in o7 and get the condition code set // Get a pointer to the first character of string1 in tmp1
// and get string1.length() in str1
// Also, get string0.length()-string1.length() in
// o7 and get the condition code set
// Note: some instructions have been hoisted for better instruction scheduling // Note: some instructions have been hoisted for better instruction scheduling
Register tmp0 = L0; Register tmp0 = L0;
@ -248,27 +251,40 @@ void LIR_Assembler::emit_string_compare(LIR_Opr left, LIR_Opr right, LIR_Opr dst
Register tmp2 = L2; Register tmp2 = L2;
int value_offset = java_lang_String:: value_offset_in_bytes(); // char array int value_offset = java_lang_String:: value_offset_in_bytes(); // char array
int offset_offset = java_lang_String::offset_offset_in_bytes(); // first character position if (java_lang_String::has_offset_field()) {
int count_offset = java_lang_String:: count_offset_in_bytes(); int offset_offset = java_lang_String::offset_offset_in_bytes(); // first character position
int count_offset = java_lang_String:: count_offset_in_bytes();
__ load_heap_oop(str0, value_offset, tmp0); __ load_heap_oop(str0, value_offset, tmp0);
__ ld(str0, offset_offset, tmp2); __ ld(str0, offset_offset, tmp2);
__ add(tmp0, arrayOopDesc::base_offset_in_bytes(T_CHAR), tmp0); __ add(tmp0, arrayOopDesc::base_offset_in_bytes(T_CHAR), tmp0);
__ ld(str0, count_offset, str0); __ ld(str0, count_offset, str0);
__ sll(tmp2, exact_log2(sizeof(jchar)), tmp2); __ sll(tmp2, exact_log2(sizeof(jchar)), tmp2);
} else {
__ load_heap_oop(str0, value_offset, tmp1);
__ add(tmp1, arrayOopDesc::base_offset_in_bytes(T_CHAR), tmp0);
__ ld(tmp1, arrayOopDesc::length_offset_in_bytes(), str0);
}
// str1 may be null // str1 may be null
add_debug_info_for_null_check_here(info); add_debug_info_for_null_check_here(info);
__ load_heap_oop(str1, value_offset, tmp1); if (java_lang_String::has_offset_field()) {
__ add(tmp0, tmp2, tmp0); int offset_offset = java_lang_String::offset_offset_in_bytes(); // first character position
int count_offset = java_lang_String:: count_offset_in_bytes();
__ load_heap_oop(str1, value_offset, tmp1);
__ add(tmp0, tmp2, tmp0);
__ ld(str1, offset_offset, tmp2); __ ld(str1, offset_offset, tmp2);
__ add(tmp1, arrayOopDesc::base_offset_in_bytes(T_CHAR), tmp1); __ add(tmp1, arrayOopDesc::base_offset_in_bytes(T_CHAR), tmp1);
__ ld(str1, count_offset, str1); __ ld(str1, count_offset, str1);
__ sll(tmp2, exact_log2(sizeof(jchar)), tmp2); __ sll(tmp2, exact_log2(sizeof(jchar)), tmp2);
__ add(tmp1, tmp2, tmp1);
} else {
__ load_heap_oop(str1, value_offset, tmp2);
__ add(tmp2, arrayOopDesc::base_offset_in_bytes(T_CHAR), tmp1);
__ ld(tmp2, arrayOopDesc::length_offset_in_bytes(), str1);
}
__ subcc(str0, str1, O7); __ subcc(str0, str1, O7);
__ add(tmp1, tmp2, tmp1);
} }
{ {
@ -302,7 +318,7 @@ void LIR_Assembler::emit_string_compare(LIR_Opr left, LIR_Opr right, LIR_Opr dst
// Shift base0 and base1 to the end of the arrays, negate limit // Shift base0 and base1 to the end of the arrays, negate limit
__ add(base0, limit, base0); __ add(base0, limit, base0);
__ add(base1, limit, base1); __ add(base1, limit, base1);
__ neg(limit); // limit = -min{string0.count, strin1.count} __ neg(limit); // limit = -min{string0.length(), string1.length()}
__ lduh(base0, limit, chr0); __ lduh(base0, limit, chr0);
__ bind(Lloop); __ bind(Lloop);

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -505,19 +505,28 @@ void LIR_Assembler::emit_string_compare(LIR_Opr arg0, LIR_Opr arg1, LIR_Opr dst,
// Get addresses of first characters from both Strings // Get addresses of first characters from both Strings
__ load_heap_oop(rsi, Address(rax, java_lang_String::value_offset_in_bytes())); __ load_heap_oop(rsi, Address(rax, java_lang_String::value_offset_in_bytes()));
__ movptr (rcx, Address(rax, java_lang_String::offset_offset_in_bytes())); if (java_lang_String::has_offset_field()) {
__ lea (rsi, Address(rsi, rcx, Address::times_2, arrayOopDesc::base_offset_in_bytes(T_CHAR))); __ movptr (rcx, Address(rax, java_lang_String::offset_offset_in_bytes()));
__ movl (rax, Address(rax, java_lang_String::count_offset_in_bytes()));
__ lea (rsi, Address(rsi, rcx, Address::times_2, arrayOopDesc::base_offset_in_bytes(T_CHAR)));
} else {
__ movl (rax, Address(rsi, arrayOopDesc::length_offset_in_bytes()));
__ lea (rsi, Address(rsi, arrayOopDesc::base_offset_in_bytes(T_CHAR)));
}
// rbx, may be NULL // rbx, may be NULL
add_debug_info_for_null_check_here(info); add_debug_info_for_null_check_here(info);
__ load_heap_oop(rdi, Address(rbx, java_lang_String::value_offset_in_bytes())); __ load_heap_oop(rdi, Address(rbx, java_lang_String::value_offset_in_bytes()));
__ movptr (rcx, Address(rbx, java_lang_String::offset_offset_in_bytes())); if (java_lang_String::has_offset_field()) {
__ lea (rdi, Address(rdi, rcx, Address::times_2, arrayOopDesc::base_offset_in_bytes(T_CHAR))); __ movptr (rcx, Address(rbx, java_lang_String::offset_offset_in_bytes()));
__ movl (rbx, Address(rbx, java_lang_String::count_offset_in_bytes()));
__ lea (rdi, Address(rdi, rcx, Address::times_2, arrayOopDesc::base_offset_in_bytes(T_CHAR)));
} else {
__ movl (rbx, Address(rdi, arrayOopDesc::length_offset_in_bytes()));
__ lea (rdi, Address(rdi, arrayOopDesc::base_offset_in_bytes(T_CHAR)));
}
// compute minimum length (in rax) and difference of lengths (on top of stack) // compute minimum length (in rax) and difference of lengths (on top of stack)
__ movl (rbx, Address(rbx, java_lang_String::count_offset_in_bytes()));
__ movl (rax, Address(rax, java_lang_String::count_offset_in_bytes()));
__ mov (rcx, rbx); __ mov (rcx, rbx);
__ subptr(rbx, rax); // subtract lengths __ subptr(rbx, rax); // subtract lengths
__ push (rbx); // result __ push (rbx); // result
@ -1462,7 +1471,11 @@ void LIR_Assembler::emit_opConvert(LIR_OpConvert* op) {
break; break;
case Bytecodes::_l2i: case Bytecodes::_l2i:
#ifdef _LP64
__ movl(dest->as_register(), src->as_register_lo());
#else
move_regs(src->as_register_lo(), dest->as_register()); move_regs(src->as_register_lo(), dest->as_register());
#endif
break; break;
case Bytecodes::_i2b: case Bytecodes::_i2b:

View file

@ -59,7 +59,7 @@ typedef struct _MODULEINFO {
#include <Tlhelp32.h> #include <Tlhelp32.h>
typedef unsigned int socklen_t; typedef int socklen_t;
// #include "jni.h" // #include "jni.h"

View file

@ -4820,99 +4820,92 @@ struct hostent* os::get_host_by_name(char* name) {
return (struct hostent*)os::WinSock2Dll::gethostbyname(name); return (struct hostent*)os::WinSock2Dll::gethostbyname(name);
} }
int os::socket_close(int fd) { int os::socket_close(int fd) {
ShouldNotReachHere(); return ::closesocket(fd);
return 0;
} }
int os::socket_available(int fd, jint *pbytes) { int os::socket_available(int fd, jint *pbytes) {
ShouldNotReachHere(); int ret = ::ioctlsocket(fd, FIONREAD, (u_long*)pbytes);
return 0; return (ret < 0) ? 0 : 1;
} }
int os::socket(int domain, int type, int protocol) { int os::socket(int domain, int type, int protocol) {
ShouldNotReachHere(); return ::socket(domain, type, protocol);
return 0;
} }
int os::listen(int fd, int count) { int os::listen(int fd, int count) {
ShouldNotReachHere(); return ::listen(fd, count);
return 0;
} }
int os::connect(int fd, struct sockaddr* him, socklen_t len) { int os::connect(int fd, struct sockaddr* him, socklen_t len) {
ShouldNotReachHere(); return ::connect(fd, him, len);
return 0;
} }
int os::accept(int fd, struct sockaddr* him, socklen_t* len) { int os::accept(int fd, struct sockaddr* him, socklen_t* len) {
ShouldNotReachHere(); return ::accept(fd, him, len);
return 0;
} }
int os::sendto(int fd, char* buf, size_t len, uint flags, int os::sendto(int fd, char* buf, size_t len, uint flags,
struct sockaddr* to, socklen_t tolen) { struct sockaddr* to, socklen_t tolen) {
ShouldNotReachHere();
return 0; return ::sendto(fd, buf, (int)len, flags, to, tolen);
} }
int os::recvfrom(int fd, char *buf, size_t nBytes, uint flags, int os::recvfrom(int fd, char *buf, size_t nBytes, uint flags,
sockaddr* from, socklen_t* fromlen) { sockaddr* from, socklen_t* fromlen) {
ShouldNotReachHere();
return 0; return ::recvfrom(fd, buf, (int)nBytes, flags, from, fromlen);
} }
int os::recv(int fd, char* buf, size_t nBytes, uint flags) { int os::recv(int fd, char* buf, size_t nBytes, uint flags) {
ShouldNotReachHere(); return ::recv(fd, buf, (int)nBytes, flags);
return 0;
} }
int os::send(int fd, char* buf, size_t nBytes, uint flags) { int os::send(int fd, char* buf, size_t nBytes, uint flags) {
ShouldNotReachHere(); return ::send(fd, buf, (int)nBytes, flags);
return 0;
} }
int os::raw_send(int fd, char* buf, size_t nBytes, uint flags) { int os::raw_send(int fd, char* buf, size_t nBytes, uint flags) {
ShouldNotReachHere(); return ::send(fd, buf, (int)nBytes, flags);
return 0;
} }
int os::timeout(int fd, long timeout) { int os::timeout(int fd, long timeout) {
ShouldNotReachHere(); fd_set tbl;
return 0; struct timeval t;
t.tv_sec = timeout / 1000;
t.tv_usec = (timeout % 1000) * 1000;
tbl.fd_count = 1;
tbl.fd_array[0] = fd;
return ::select(1, &tbl, 0, 0, &t);
} }
int os::get_host_name(char* name, int namelen) { int os::get_host_name(char* name, int namelen) {
ShouldNotReachHere(); return ::gethostname(name, namelen);
return 0;
} }
int os::socket_shutdown(int fd, int howto) { int os::socket_shutdown(int fd, int howto) {
ShouldNotReachHere(); return ::shutdown(fd, howto);
return 0;
} }
int os::bind(int fd, struct sockaddr* him, socklen_t len) { int os::bind(int fd, struct sockaddr* him, socklen_t len) {
ShouldNotReachHere(); return ::bind(fd, him, len);
return 0;
} }
int os::get_sock_name(int fd, struct sockaddr* him, socklen_t* len) { int os::get_sock_name(int fd, struct sockaddr* him, socklen_t* len) {
ShouldNotReachHere(); return ::getsockname(fd, him, len);
return 0;
} }
int os::get_sock_opt(int fd, int level, int optname, int os::get_sock_opt(int fd, int level, int optname,
char* optval, socklen_t* optlen) { char* optval, socklen_t* optlen) {
ShouldNotReachHere(); return ::getsockopt(fd, level, optname, optval, optlen);
return 0;
} }
int os::set_sock_opt(int fd, int level, int optname, int os::set_sock_opt(int fd, int level, int optname,
const char* optval, socklen_t optlen) { const char* optval, socklen_t optlen) {
ShouldNotReachHere(); return ::setsockopt(fd, level, optname, optval, optlen);
return 0;
} }

View file

@ -3355,7 +3355,8 @@ instanceKlassHandle ClassFileParser::parseClassFile(Symbol* name,
static_field_size, static_field_size,
total_oop_map_count, total_oop_map_count,
access_flags, access_flags,
rt, CHECK_(nullHandle)); rt, host_klass,
CHECK_(nullHandle));
instanceKlassHandle this_klass (THREAD, ik); instanceKlassHandle this_klass (THREAD, ik);
assert(this_klass->static_field_size() == static_field_size, "sanity"); assert(this_klass->static_field_size() == static_field_size, "sanity");

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -143,7 +143,27 @@ compute_optional_offset(int& dest_offset,
} }
int java_lang_String::value_offset = 0;
int java_lang_String::offset_offset = 0;
int java_lang_String::count_offset = 0;
int java_lang_String::hash_offset = 0;
bool java_lang_String::initialized = false;
void java_lang_String::compute_offsets() {
assert(!initialized, "offsets should be initialized only once");
klassOop k = SystemDictionary::String_klass();
compute_offset(value_offset, k, vmSymbols::value_name(), vmSymbols::char_array_signature());
compute_optional_offset(offset_offset, k, vmSymbols::offset_name(), vmSymbols::int_signature());
compute_optional_offset(count_offset, k, vmSymbols::count_name(), vmSymbols::int_signature());
compute_optional_offset(hash_offset, k, vmSymbols::hash_name(), vmSymbols::int_signature());
initialized = true;
}
Handle java_lang_String::basic_create(int length, bool tenured, TRAPS) { Handle java_lang_String::basic_create(int length, bool tenured, TRAPS) {
assert(initialized, "Must be initialized");
// Create the String object first, so there's a chance that the String // Create the String object first, so there's a chance that the String
// and the char array it points to end up in the same cache line. // and the char array it points to end up in the same cache line.
oop obj; oop obj;
@ -2837,10 +2857,6 @@ int java_lang_System::err_offset_in_bytes() {
int java_lang_String::value_offset;
int java_lang_String::offset_offset;
int java_lang_String::count_offset;
int java_lang_String::hash_offset;
int java_lang_Class::_klass_offset; int java_lang_Class::_klass_offset;
int java_lang_Class::_array_klass_offset; int java_lang_Class::_array_klass_offset;
int java_lang_Class::_resolved_constructor_offset; int java_lang_Class::_resolved_constructor_offset;
@ -3000,12 +3016,6 @@ void JavaClasses::compute_hard_coded_offsets() {
const int x = heapOopSize; const int x = heapOopSize;
const int header = instanceOopDesc::base_offset_in_bytes(); const int header = instanceOopDesc::base_offset_in_bytes();
// Do the String Class
java_lang_String::value_offset = java_lang_String::hc_value_offset * x + header;
java_lang_String::offset_offset = java_lang_String::hc_offset_offset * x + header;
java_lang_String::count_offset = java_lang_String::offset_offset + sizeof (jint);
java_lang_String::hash_offset = java_lang_String::count_offset + sizeof (jint);
// Throwable Class // Throwable Class
java_lang_Throwable::backtrace_offset = java_lang_Throwable::hc_backtrace_offset * x + header; java_lang_Throwable::backtrace_offset = java_lang_Throwable::hc_backtrace_offset * x + header;
java_lang_Throwable::detailMessage_offset = java_lang_Throwable::hc_detailMessage_offset * x + header; java_lang_Throwable::detailMessage_offset = java_lang_Throwable::hc_detailMessage_offset * x + header;
@ -3200,9 +3210,13 @@ void JavaClasses::check_offsets() {
// java.lang.String // java.lang.String
CHECK_OFFSET("java/lang/String", java_lang_String, value, "[C"); CHECK_OFFSET("java/lang/String", java_lang_String, value, "[C");
CHECK_OFFSET("java/lang/String", java_lang_String, offset, "I"); if (java_lang_String::has_offset_field()) {
CHECK_OFFSET("java/lang/String", java_lang_String, count, "I"); CHECK_OFFSET("java/lang/String", java_lang_String, offset, "I");
CHECK_OFFSET("java/lang/String", java_lang_String, hash, "I"); CHECK_OFFSET("java/lang/String", java_lang_String, count, "I");
}
if (java_lang_String::has_hash_field()) {
CHECK_OFFSET("java/lang/String", java_lang_String, hash, "I");
}
// java.lang.Class // java.lang.Class

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -52,26 +52,36 @@
class java_lang_String : AllStatic { class java_lang_String : AllStatic {
private: private:
enum {
hc_value_offset = 0,
hc_offset_offset = 1
//hc_count_offset = 2 -- not a word-scaled offset
//hc_hash_offset = 3 -- not a word-scaled offset
};
static int value_offset; static int value_offset;
static int offset_offset; static int offset_offset;
static int count_offset; static int count_offset;
static int hash_offset; static int hash_offset;
static bool initialized;
static Handle basic_create(int length, bool tenured, TRAPS); static Handle basic_create(int length, bool tenured, TRAPS);
static Handle basic_create_from_unicode(jchar* unicode, int length, bool tenured, TRAPS); static Handle basic_create_from_unicode(jchar* unicode, int length, bool tenured, TRAPS);
static void set_value( oop string, typeArrayOop buffer) { string->obj_field_put(value_offset, (oop)buffer); } static void set_value( oop string, typeArrayOop buffer) {
static void set_offset(oop string, int offset) { string->int_field_put(offset_offset, offset); } assert(initialized, "Must be initialized");
static void set_count( oop string, int count) { string->int_field_put(count_offset, count); } string->obj_field_put(value_offset, (oop)buffer);
}
static void set_offset(oop string, int offset) {
assert(initialized, "Must be initialized");
if (offset_offset > 0) {
string->int_field_put(offset_offset, offset);
}
}
static void set_count( oop string, int count) {
assert(initialized, "Must be initialized");
if (count_offset > 0) {
string->int_field_put(count_offset, count);
}
}
public: public:
static void compute_offsets();
// Instance creation // Instance creation
static Handle create_from_unicode(jchar* unicode, int len, TRAPS); static Handle create_from_unicode(jchar* unicode, int len, TRAPS);
static Handle create_tenured_from_unicode(jchar* unicode, int len, TRAPS); static Handle create_tenured_from_unicode(jchar* unicode, int len, TRAPS);
@ -82,23 +92,61 @@ class java_lang_String : AllStatic {
static Handle create_from_platform_dependent_str(const char* str, TRAPS); static Handle create_from_platform_dependent_str(const char* str, TRAPS);
static Handle char_converter(Handle java_string, jchar from_char, jchar to_char, TRAPS); static Handle char_converter(Handle java_string, jchar from_char, jchar to_char, TRAPS);
static int value_offset_in_bytes() { return value_offset; } static bool has_offset_field() {
static int count_offset_in_bytes() { return count_offset; } assert(initialized, "Must be initialized");
static int offset_offset_in_bytes() { return offset_offset; } return (offset_offset > 0);
static int hash_offset_in_bytes() { return hash_offset; } }
static bool has_count_field() {
assert(initialized, "Must be initialized");
return (count_offset > 0);
}
static bool has_hash_field() {
assert(initialized, "Must be initialized");
return (hash_offset > 0);
}
static int value_offset_in_bytes() {
assert(initialized && (value_offset > 0), "Must be initialized");
return value_offset;
}
static int count_offset_in_bytes() {
assert(initialized && (count_offset > 0), "Must be initialized");
return count_offset;
}
static int offset_offset_in_bytes() {
assert(initialized && (offset_offset > 0), "Must be initialized");
return offset_offset;
}
static int hash_offset_in_bytes() {
assert(initialized && (hash_offset > 0), "Must be initialized");
return hash_offset;
}
// Accessors // Accessors
static typeArrayOop value(oop java_string) { static typeArrayOop value(oop java_string) {
assert(initialized && (value_offset > 0), "Must be initialized");
assert(is_instance(java_string), "must be java_string"); assert(is_instance(java_string), "must be java_string");
return (typeArrayOop) java_string->obj_field(value_offset); return (typeArrayOop) java_string->obj_field(value_offset);
} }
static int offset(oop java_string) { static int offset(oop java_string) {
assert(initialized, "Must be initialized");
assert(is_instance(java_string), "must be java_string"); assert(is_instance(java_string), "must be java_string");
return java_string->int_field(offset_offset); if (offset_offset > 0) {
return java_string->int_field(offset_offset);
} else {
return 0;
}
} }
static int length(oop java_string) { static int length(oop java_string) {
assert(initialized, "Must be initialized");
assert(is_instance(java_string), "must be java_string"); assert(is_instance(java_string), "must be java_string");
return java_string->int_field(count_offset); if (count_offset > 0) {
return java_string->int_field(count_offset);
} else {
return ((typeArrayOop)java_string->obj_field(value_offset))->length();
}
} }
static int utf8_length(oop java_string); static int utf8_length(oop java_string);

View file

@ -1971,6 +1971,9 @@ void SystemDictionary::initialize_preloaded_classes(TRAPS) {
// first do Object, String, Class // first do Object, String, Class
initialize_wk_klasses_through(WK_KLASS_ENUM_NAME(Class_klass), scan, CHECK); initialize_wk_klasses_through(WK_KLASS_ENUM_NAME(Class_klass), scan, CHECK);
// Calculate offsets for String and Class classes since they are loaded and
// can be used after this point.
java_lang_String::compute_offsets();
java_lang_Class::compute_offsets(); java_lang_Class::compute_offsets();
// Fixup mirrors for classes loaded before java.lang.Class. // Fixup mirrors for classes loaded before java.lang.Class.

View file

@ -340,6 +340,9 @@
template(park_event_name, "nativeParkEventPointer") \ template(park_event_name, "nativeParkEventPointer") \
template(cache_field_name, "cache") \ template(cache_field_name, "cache") \
template(value_name, "value") \ template(value_name, "value") \
template(offset_name, "offset") \
template(count_name, "count") \
template(hash_name, "hash") \
template(frontCacheEnabled_name, "frontCacheEnabled") \ template(frontCacheEnabled_name, "frontCacheEnabled") \
template(stringCacheEnabled_name, "stringCacheEnabled") \ template(stringCacheEnabled_name, "stringCacheEnabled") \
template(numberOfLeadingZeros_name, "numberOfLeadingZeros") \ template(numberOfLeadingZeros_name, "numberOfLeadingZeros") \

View file

@ -6332,10 +6332,10 @@ void CMSCollector::reset(bool asynch) {
) )
} }
void CMSCollector::do_CMS_operation(CMS_op_type op) { void CMSCollector::do_CMS_operation(CMS_op_type op, GCCause::Cause gc_cause) {
gclog_or_tty->date_stamp(PrintGC && PrintGCDateStamps); gclog_or_tty->date_stamp(PrintGC && PrintGCDateStamps);
TraceCPUTime tcpu(PrintGCDetails, true, gclog_or_tty); TraceCPUTime tcpu(PrintGCDetails, true, gclog_or_tty);
TraceTime t("GC", PrintGC, !PrintGCDetails, gclog_or_tty); TraceTime t(GCCauseString("GC", gc_cause), PrintGC, !PrintGCDetails, gclog_or_tty);
TraceCollectorStats tcs(counters()); TraceCollectorStats tcs(counters());
switch (op) { switch (op) {

View file

@ -717,7 +717,7 @@ class CMSCollector: public CHeapObj {
CMS_op_checkpointRootsFinal CMS_op_checkpointRootsFinal
}; };
void do_CMS_operation(CMS_op_type op); void do_CMS_operation(CMS_op_type op, GCCause::Cause gc_cause);
bool stop_world_and_do(CMS_op_type op); bool stop_world_and_do(CMS_op_type op);
OopTaskQueueSet* task_queues() { return _task_queues; } OopTaskQueueSet* task_queues() { return _task_queues; }

View file

@ -146,7 +146,7 @@ void VM_CMS_Initial_Mark::doit() {
VM_CMS_Operation::verify_before_gc(); VM_CMS_Operation::verify_before_gc();
IsGCActiveMark x; // stop-world GC active IsGCActiveMark x; // stop-world GC active
_collector->do_CMS_operation(CMSCollector::CMS_op_checkpointRootsInitial); _collector->do_CMS_operation(CMSCollector::CMS_op_checkpointRootsInitial, gch->gc_cause());
VM_CMS_Operation::verify_after_gc(); VM_CMS_Operation::verify_after_gc();
#ifndef USDT2 #ifndef USDT2
@ -178,7 +178,7 @@ void VM_CMS_Final_Remark::doit() {
VM_CMS_Operation::verify_before_gc(); VM_CMS_Operation::verify_before_gc();
IsGCActiveMark x; // stop-world GC active IsGCActiveMark x; // stop-world GC active
_collector->do_CMS_operation(CMSCollector::CMS_op_checkpointRootsFinal); _collector->do_CMS_operation(CMSCollector::CMS_op_checkpointRootsFinal, gch->gc_cause());
VM_CMS_Operation::verify_after_gc(); VM_CMS_Operation::verify_after_gc();
#ifndef USDT2 #ifndef USDT2

View file

@ -1252,10 +1252,7 @@ bool G1CollectedHeap::do_collection(bool explicit_gc,
gclog_or_tty->date_stamp(G1Log::fine() && PrintGCDateStamps); gclog_or_tty->date_stamp(G1Log::fine() && PrintGCDateStamps);
TraceCPUTime tcpu(G1Log::finer(), true, gclog_or_tty); TraceCPUTime tcpu(G1Log::finer(), true, gclog_or_tty);
char verbose_str[128]; TraceTime t(GCCauseString("Full GC", gc_cause()), G1Log::fine(), true, gclog_or_tty);
sprintf(verbose_str, "Full GC (%s)", GCCause::to_string(gc_cause()));
TraceTime t(verbose_str, G1Log::fine(), true, gclog_or_tty);
TraceCollectorStats tcs(g1mm()->full_collection_counters()); TraceCollectorStats tcs(g1mm()->full_collection_counters());
TraceMemoryManagerStats tms(true /* fullGC */, gc_cause()); TraceMemoryManagerStats tms(true /* fullGC */, gc_cause());
@ -3600,12 +3597,10 @@ G1CollectedHeap::do_collection_pause_at_safepoint(double target_pause_time_ms) {
gclog_or_tty->date_stamp(G1Log::fine() && PrintGCDateStamps); gclog_or_tty->date_stamp(G1Log::fine() && PrintGCDateStamps);
TraceCPUTime tcpu(G1Log::finer(), true, gclog_or_tty); TraceCPUTime tcpu(G1Log::finer(), true, gclog_or_tty);
char verbose_str[128]; GCCauseString gc_cause_str = GCCauseString("GC pause", gc_cause())
sprintf(verbose_str, "GC pause (%s) (%s)%s", .append(g1_policy()->gcs_are_young() ? " (young)" : " (mixed)")
GCCause::to_string(gc_cause()), .append(g1_policy()->during_initial_mark_pause() ? " (initial-mark)" : "");
g1_policy()->gcs_are_young() ? "young" : "mixed", TraceTime t(gc_cause_str, G1Log::fine() && !G1Log::finer(), true, gclog_or_tty);
g1_policy()->during_initial_mark_pause() ? " (initial-mark)" : "");
TraceTime t(verbose_str, G1Log::fine() && !G1Log::finer(), true, gclog_or_tty);
TraceCollectorStats tcs(g1mm()->incremental_collection_counters()); TraceCollectorStats tcs(g1mm()->incremental_collection_counters());
TraceMemoryManagerStats tms(false /* fullGC */, gc_cause()); TraceMemoryManagerStats tms(false /* fullGC */, gc_cause());
@ -5502,7 +5497,7 @@ void G1CollectedHeap::evacuate_collection_set() {
if (evacuation_failed()) { if (evacuation_failed()) {
remove_self_forwarding_pointers(); remove_self_forwarding_pointers();
if (G1Log::finer()) { if (G1Log::finer()) {
gclog_or_tty->print(" (to-space overflow)"); gclog_or_tty->print(" (to-space exhausted)");
} else if (G1Log::fine()) { } else if (G1Log::fine()) {
gclog_or_tty->print("--"); gclog_or_tty->print("--");
} }

View file

@ -886,9 +886,8 @@ void G1CollectorPolicy::record_collection_pause_start(double start_time_sec,
size_t start_used) { size_t start_used) {
if (G1Log::finer()) { if (G1Log::finer()) {
gclog_or_tty->stamp(PrintGCTimeStamps); gclog_or_tty->stamp(PrintGCTimeStamps);
gclog_or_tty->print("[GC pause (%s) (%s)", gclog_or_tty->print("[%s", (const char*)GCCauseString("GC pause", _g1->gc_cause())
GCCause::to_string(_g1->gc_cause()), .append(gcs_are_young() ? " (young)" : " (mixed)"));
gcs_are_young() ? "young" : "mixed");
} }
// We only need to do this here as the policy will only be applied // We only need to do this here as the policy will only be applied
@ -1010,7 +1009,8 @@ T sum_of(T* sum_arr, int start, int n, int N) {
void G1CollectorPolicy::print_par_stats(int level, void G1CollectorPolicy::print_par_stats(int level,
const char* str, const char* str,
double* data) { double* data,
bool showDecimals) {
double min = data[0], max = data[0]; double min = data[0], max = data[0];
double total = 0.0; double total = 0.0;
LineBuffer buf(level); LineBuffer buf(level);
@ -1023,7 +1023,11 @@ void G1CollectorPolicy::print_par_stats(int level,
max = val; max = val;
total += val; total += val;
if (G1Log::finest()) { if (G1Log::finest()) {
buf.append(" %.1lf", val); if (showDecimals) {
buf.append(" %.1lf", val);
} else {
buf.append(" %d", (int)val);
}
} }
} }
@ -1031,36 +1035,26 @@ void G1CollectorPolicy::print_par_stats(int level,
buf.append_and_print_cr(""); buf.append_and_print_cr("");
} }
double avg = total / (double) no_of_gc_threads(); double avg = total / (double) no_of_gc_threads();
buf.append_and_print_cr(" Avg: %.1lf Min: %.1lf Max: %.1lf Diff: %.1lf]", if (showDecimals) {
avg, min, max, max - min); buf.append_and_print_cr(" Min: %.1lf, Avg: %.1lf, Max: %.1lf, Diff: %.1lf, Sum: %.1lf]",
} min, avg, max, max - min, total);
} else {
void G1CollectorPolicy::print_par_sizes(int level, buf.append_and_print_cr(" Min: %d, Avg: %d, Max: %d, Diff: %d, Sum: %d]",
const char* str, (int)min, (int)avg, (int)max, (int)max - (int)min, (int)total);
double* data) {
double min = data[0], max = data[0];
double total = 0.0;
LineBuffer buf(level);
buf.append("[%s :", str);
for (uint i = 0; i < no_of_gc_threads(); ++i) {
double val = data[i];
if (val < min)
min = val;
if (val > max)
max = val;
total += val;
buf.append(" %d", (int) val);
} }
buf.append_and_print_cr("");
double avg = total / (double) no_of_gc_threads();
buf.append_and_print_cr(" Sum: %d, Avg: %d, Min: %d, Max: %d, Diff: %d]",
(int)total, (int)avg, (int)min, (int)max, (int)max - (int)min);
} }
void G1CollectorPolicy::print_stats(int level, void G1CollectorPolicy::print_stats(int level,
const char* str, const char* str,
double value) { double value) {
LineBuffer(level).append_and_print_cr("[%s: %5.1lf ms]", str, value); LineBuffer(level).append_and_print_cr("[%s: %.1lf ms]", str, value);
}
void G1CollectorPolicy::print_stats(int level,
const char* str,
double value,
int workers) {
LineBuffer(level).append_and_print_cr("[%s: %.1lf ms, GC Workers: %d]", str, value, workers);
} }
void G1CollectorPolicy::print_stats(int level, void G1CollectorPolicy::print_stats(int level,
@ -1373,7 +1367,7 @@ void G1CollectorPolicy::record_collection_pause_end(int no_of_gc_threads) {
print_stats(1, "Root Region Scan Waiting", _root_region_scan_wait_time_ms); print_stats(1, "Root Region Scan Waiting", _root_region_scan_wait_time_ms);
} }
if (parallel) { if (parallel) {
print_stats(1, "Parallel Time", _cur_collection_par_time_ms); print_stats(1, "Parallel Time", _cur_collection_par_time_ms, no_of_gc_threads);
print_par_stats(2, "GC Worker Start", _par_last_gc_worker_start_times_ms); print_par_stats(2, "GC Worker Start", _par_last_gc_worker_start_times_ms);
print_par_stats(2, "Ext Root Scanning", _par_last_ext_root_scan_times_ms); print_par_stats(2, "Ext Root Scanning", _par_last_ext_root_scan_times_ms);
if (print_marking_info) { if (print_marking_info) {
@ -1381,13 +1375,15 @@ void G1CollectorPolicy::record_collection_pause_end(int no_of_gc_threads) {
} }
print_par_stats(2, "Update RS", _par_last_update_rs_times_ms); print_par_stats(2, "Update RS", _par_last_update_rs_times_ms);
if (G1Log::finest()) { if (G1Log::finest()) {
print_par_sizes(3, "Processed Buffers", _par_last_update_rs_processed_buffers); print_par_stats(3, "Processed Buffers", _par_last_update_rs_processed_buffers,
false /* showDecimals */);
} }
print_par_stats(2, "Scan RS", _par_last_scan_rs_times_ms); print_par_stats(2, "Scan RS", _par_last_scan_rs_times_ms);
print_par_stats(2, "Object Copy", _par_last_obj_copy_times_ms); print_par_stats(2, "Object Copy", _par_last_obj_copy_times_ms);
print_par_stats(2, "Termination", _par_last_termination_times_ms); print_par_stats(2, "Termination", _par_last_termination_times_ms);
if (G1Log::finest()) { if (G1Log::finest()) {
print_par_sizes(3, "Termination Attempts", _par_last_termination_attempts); print_par_stats(3, "Termination Attempts", _par_last_termination_attempts,
false /* showDecimals */);
} }
for (int i = 0; i < _parallel_gc_threads; i++) { for (int i = 0; i < _parallel_gc_threads; i++) {
@ -1601,9 +1597,9 @@ void G1CollectorPolicy::record_collection_pause_end(int no_of_gc_threads) {
_collectionSetChooser->verify(); _collectionSetChooser->verify();
} }
#define EXT_SIZE_FORMAT "%d%s" #define EXT_SIZE_FORMAT "%.1f%s"
#define EXT_SIZE_PARAMS(bytes) \ #define EXT_SIZE_PARAMS(bytes) \
byte_size_in_proper_unit((bytes)), \ byte_size_in_proper_unit((double)(bytes)), \
proper_unit_for_byte_size((bytes)) proper_unit_for_byte_size((bytes))
void G1CollectorPolicy::print_heap_transition() { void G1CollectorPolicy::print_heap_transition() {

View file

@ -552,10 +552,10 @@ public:
private: private:
void print_stats(int level, const char* str, double value); void print_stats(int level, const char* str, double value);
void print_stats(int level, const char* str, double value, int workers);
void print_stats(int level, const char* str, int value); void print_stats(int level, const char* str, int value);
void print_par_stats(int level, const char* str, double* data); void print_par_stats(int level, const char* str, double* data, bool showDecimals = true);
void print_par_sizes(int level, const char* str, double* data);
void check_other_times(int level, void check_other_times(int level,
NumberSeq* other_times_ms, NumberSeq* other_times_ms,

View file

@ -42,6 +42,7 @@ VM_G1CollectForAllocation::VM_G1CollectForAllocation(
void VM_G1CollectForAllocation::doit() { void VM_G1CollectForAllocation::doit() {
G1CollectedHeap* g1h = G1CollectedHeap::heap(); G1CollectedHeap* g1h = G1CollectedHeap::heap();
GCCauseSetter x(g1h, _gc_cause);
_result = g1h->satisfy_failed_allocation(_word_size, &_pause_succeeded); _result = g1h->satisfy_failed_allocation(_word_size, &_pause_succeeded);
assert(_result == NULL || _pause_succeeded, assert(_result == NULL || _pause_succeeded,
"if we get back a result, the pause should have succeeded"); "if we get back a result, the pause should have succeeded");

View file

@ -916,7 +916,7 @@ void ParNewGeneration::collect(bool full,
size_policy->minor_collection_begin(); size_policy->minor_collection_begin();
} }
TraceTime t1("GC", PrintGC && !PrintGCDetails, true, gclog_or_tty); TraceTime t1(GCCauseString("GC", gch->gc_cause()), PrintGC && !PrintGCDetails, true, gclog_or_tty);
// Capture heap used before collection (for printing). // Capture heap used before collection (for printing).
size_t gch_prev_used = gch->used(); size_t gch_prev_used = gch->used();

View file

@ -160,16 +160,10 @@ bool PSMarkSweep::invoke_no_policy(bool clear_all_softrefs) {
{ {
HandleMark hm; HandleMark hm;
const bool is_system_gc = gc_cause == GCCause::_java_lang_system_gc;
// This is useful for debugging but don't change the output the
// the customer sees.
const char* gc_cause_str = "Full GC";
if (is_system_gc && PrintGCDetails) {
gc_cause_str = "Full GC (System)";
}
gclog_or_tty->date_stamp(PrintGC && PrintGCDateStamps); gclog_or_tty->date_stamp(PrintGC && PrintGCDateStamps);
TraceCPUTime tcpu(PrintGCDetails, true, gclog_or_tty); TraceCPUTime tcpu(PrintGCDetails, true, gclog_or_tty);
TraceTime t1(gc_cause_str, PrintGC, !PrintGCDetails, gclog_or_tty); TraceTime t1(GCCauseString("Full GC", gc_cause), PrintGC, !PrintGCDetails, gclog_or_tty);
TraceCollectorStats tcs(counters()); TraceCollectorStats tcs(counters());
TraceMemoryManagerStats tms(true /* Full GC */,gc_cause); TraceMemoryManagerStats tms(true /* Full GC */,gc_cause);

View file

@ -2047,17 +2047,9 @@ bool PSParallelCompact::invoke_no_policy(bool maximum_heap_compaction) {
gc_task_manager()->task_idle_workers(); gc_task_manager()->task_idle_workers();
heap->set_par_threads(gc_task_manager()->active_workers()); heap->set_par_threads(gc_task_manager()->active_workers());
const bool is_system_gc = gc_cause == GCCause::_java_lang_system_gc;
// This is useful for debugging but don't change the output the
// the customer sees.
const char* gc_cause_str = "Full GC";
if (is_system_gc && PrintGCDetails) {
gc_cause_str = "Full GC (System)";
}
gclog_or_tty->date_stamp(PrintGC && PrintGCDateStamps); gclog_or_tty->date_stamp(PrintGC && PrintGCDateStamps);
TraceCPUTime tcpu(PrintGCDetails, true, gclog_or_tty); TraceCPUTime tcpu(PrintGCDetails, true, gclog_or_tty);
TraceTime t1(gc_cause_str, PrintGC, !PrintGCDetails, gclog_or_tty); TraceTime t1(GCCauseString("Full GC", gc_cause), PrintGC, !PrintGCDetails, gclog_or_tty);
TraceCollectorStats tcs(counters()); TraceCollectorStats tcs(counters());
TraceMemoryManagerStats tms(true /* Full GC */,gc_cause); TraceMemoryManagerStats tms(true /* Full GC */,gc_cause);
@ -2090,7 +2082,8 @@ bool PSParallelCompact::invoke_no_policy(bool maximum_heap_compaction) {
} }
#endif // #ifndef PRODUCT #endif // #ifndef PRODUCT
bool max_on_system_gc = UseMaximumCompactionOnSystemGC && is_system_gc; bool max_on_system_gc = UseMaximumCompactionOnSystemGC
&& gc_cause == GCCause::_java_lang_system_gc;
summary_phase(vmthread_cm, maximum_heap_compaction || max_on_system_gc); summary_phase(vmthread_cm, maximum_heap_compaction || max_on_system_gc);
COMPILER2_PRESENT(assert(DerivedPointerTable::is_active(), "Sanity")); COMPILER2_PRESENT(assert(DerivedPointerTable::is_active(), "Sanity"));

View file

@ -325,7 +325,7 @@ bool PSScavenge::invoke_no_policy() {
gclog_or_tty->date_stamp(PrintGC && PrintGCDateStamps); gclog_or_tty->date_stamp(PrintGC && PrintGCDateStamps);
TraceCPUTime tcpu(PrintGCDetails, true, gclog_or_tty); TraceCPUTime tcpu(PrintGCDetails, true, gclog_or_tty);
TraceTime t1("GC", PrintGC, !PrintGCDetails, gclog_or_tty); TraceTime t1(GCCauseString("GC", gc_cause), PrintGC, !PrintGCDetails, gclog_or_tty);
TraceCollectorStats tcs(counters()); TraceCollectorStats tcs(counters());
TraceMemoryManagerStats tms(false /* not full GC */,gc_cause); TraceMemoryManagerStats tms(false /* not full GC */,gc_cause);

View file

@ -31,9 +31,15 @@ float AdaptiveWeightedAverage::compute_adaptive_average(float new_sample,
float average) { float average) {
// We smooth the samples by not using weight() directly until we've // We smooth the samples by not using weight() directly until we've
// had enough data to make it meaningful. We'd like the first weight // had enough data to make it meaningful. We'd like the first weight
// used to be 1, the second to be 1/2, etc until we have 100/weight // used to be 1, the second to be 1/2, etc until we have
// samples. // OLD_THRESHOLD/weight samples.
unsigned count_weight = 100/count(); unsigned count_weight = 0;
// Avoid division by zero if the counter wraps (7158457)
if (!is_old()) {
count_weight = OLD_THRESHOLD/count();
}
unsigned adaptive_weight = (MAX2(weight(), count_weight)); unsigned adaptive_weight = (MAX2(weight(), count_weight));
float new_avg = exp_avg(average, new_sample, adaptive_weight); float new_avg = exp_avg(average, new_sample, adaptive_weight);
@ -43,8 +49,6 @@ float AdaptiveWeightedAverage::compute_adaptive_average(float new_sample,
void AdaptiveWeightedAverage::sample(float new_sample) { void AdaptiveWeightedAverage::sample(float new_sample) {
increment_count(); increment_count();
assert(count() != 0,
"Wraparound -- history would be incorrectly discarded");
// Compute the new weighted average // Compute the new weighted average
float new_avg = compute_adaptive_average(new_sample, average()); float new_avg = compute_adaptive_average(new_sample, average());

View file

@ -50,11 +50,20 @@ class AdaptiveWeightedAverage : public CHeapObj {
unsigned _weight; // The weight used to smooth the averages unsigned _weight; // The weight used to smooth the averages
// A higher weight favors the most // A higher weight favors the most
// recent data. // recent data.
bool _is_old; // Has enough historical data
const static unsigned OLD_THRESHOLD = 100;
protected: protected:
float _last_sample; // The last value sampled. float _last_sample; // The last value sampled.
void increment_count() { _sample_count++; } void increment_count() {
_sample_count++;
if (!_is_old && _sample_count > OLD_THRESHOLD) {
_is_old = true;
}
}
void set_average(float avg) { _average = avg; } void set_average(float avg) { _average = avg; }
// Helper function, computes an adaptive weighted average // Helper function, computes an adaptive weighted average
@ -64,13 +73,15 @@ class AdaptiveWeightedAverage : public CHeapObj {
public: public:
// Input weight must be between 0 and 100 // Input weight must be between 0 and 100
AdaptiveWeightedAverage(unsigned weight, float avg = 0.0) : AdaptiveWeightedAverage(unsigned weight, float avg = 0.0) :
_average(avg), _sample_count(0), _weight(weight), _last_sample(0.0) { _average(avg), _sample_count(0), _weight(weight), _last_sample(0.0),
_is_old(false) {
} }
void clear() { void clear() {
_average = 0; _average = 0;
_sample_count = 0; _sample_count = 0;
_last_sample = 0; _last_sample = 0;
_is_old = false;
} }
// Useful for modifying static structures after startup. // Useful for modifying static structures after startup.
@ -84,7 +95,8 @@ class AdaptiveWeightedAverage : public CHeapObj {
float average() const { return _average; } float average() const { return _average; }
unsigned weight() const { return _weight; } unsigned weight() const { return _weight; }
unsigned count() const { return _sample_count; } unsigned count() const { return _sample_count; }
float last_sample() const { return _last_sample; } float last_sample() const { return _last_sample; }
bool is_old() const { return _is_old; }
// Update data with a new sample. // Update data with a new sample.
void sample(float new_sample); void sample(float new_sample);

View file

@ -88,4 +88,36 @@ class GCCause : public AllStatic {
static const char* to_string(GCCause::Cause cause); static const char* to_string(GCCause::Cause cause);
}; };
// Helper class for doing logging that includes the GC Cause
// as a string.
class GCCauseString : StackObj {
private:
static const int _length = 128;
char _buffer[_length];
int _position;
public:
GCCauseString(const char* prefix, GCCause::Cause cause) {
if (PrintGCCause) {
_position = jio_snprintf(_buffer, _length, "%s (%s)", prefix, GCCause::to_string(cause));
} else {
_position = jio_snprintf(_buffer, _length, "%s", prefix);
}
assert(_position >= 0 && _position <= _length,
err_msg("Need to increase the buffer size in GCCauseString? %d", _position));
}
GCCauseString& append(const char* str) {
int res = jio_snprintf(_buffer + _position, _length - _position, "%s", str);
_position += res;
assert(res >= 0 && _position <= _length,
err_msg("Need to increase the buffer size in GCCauseString? %d", res));
return *this;
}
operator const char*() {
return _buffer;
}
};
#endif // SHARE_VM_GC_INTERFACE_GCCAUSE_HPP #endif // SHARE_VM_GC_INTERFACE_GCCAUSE_HPP

View file

@ -548,7 +548,7 @@ void DefNewGeneration::collect(bool full,
init_assuming_no_promotion_failure(); init_assuming_no_promotion_failure();
TraceTime t1("GC", PrintGC && !PrintGCDetails, true, gclog_or_tty); TraceTime t1(GCCauseString("GC", gch->gc_cause()), PrintGC && !PrintGCDetails, true, gclog_or_tty);
// Capture heap used before collection (for printing). // Capture heap used before collection (for printing).
size_t gch_prev_used = gch->used(); size_t gch_prev_used = gch->used();

View file

@ -78,8 +78,8 @@ public:
void do_oop(oop* p) { void do_oop(oop* p) {
if (p != NULL) { if (p != NULL) {
oop obj = *p; oop obj = *p;
if (obj->klass() == SystemDictionary::String_klass()) { if (obj->klass() == SystemDictionary::String_klass() &&
java_lang_String::has_hash_field()) {
int hash = java_lang_String::hash_string(obj); int hash = java_lang_String::hash_string(obj);
obj->int_field_put(hash_offset, hash); obj->int_field_put(hash_offset, hash);
} }

View file

@ -480,26 +480,15 @@ void GenCollectedHeap::do_collection(bool full,
const size_t perm_prev_used = perm_gen()->used(); const size_t perm_prev_used = perm_gen()->used();
print_heap_before_gc(); print_heap_before_gc();
if (Verbose) {
gclog_or_tty->print_cr("GC Cause: %s", GCCause::to_string(gc_cause()));
}
{ {
FlagSetting fl(_is_gc_active, true); FlagSetting fl(_is_gc_active, true);
bool complete = full && (max_level == (n_gens()-1)); bool complete = full && (max_level == (n_gens()-1));
const char* gc_cause_str = "GC "; const char* gc_cause_prefix = complete ? "Full GC" : "GC";
if (complete) {
GCCause::Cause cause = gc_cause();
if (cause == GCCause::_java_lang_system_gc) {
gc_cause_str = "Full GC (System) ";
} else {
gc_cause_str = "Full GC ";
}
}
gclog_or_tty->date_stamp(PrintGC && PrintGCDateStamps); gclog_or_tty->date_stamp(PrintGC && PrintGCDateStamps);
TraceCPUTime tcpu(PrintGCDetails, true, gclog_or_tty); TraceCPUTime tcpu(PrintGCDetails, true, gclog_or_tty);
TraceTime t(gc_cause_str, PrintGCDetails, false, gclog_or_tty); TraceTime t(GCCauseString(gc_cause_prefix, gc_cause()), PrintGCDetails, false, gclog_or_tty);
gc_prologue(complete); gc_prologue(complete);
increment_total_collections(complete); increment_total_collections(complete);

View file

@ -76,7 +76,7 @@ void GenMarkSweep::invoke_at_safepoint(int level, ReferenceProcessor* rp,
_ref_processor = rp; _ref_processor = rp;
rp->setup_policy(clear_all_softrefs); rp->setup_policy(clear_all_softrefs);
TraceTime t1("Full GC", PrintGC && !PrintGCDetails, true, gclog_or_tty); TraceTime t1(GCCauseString("Full GC", gch->gc_cause()), PrintGC && !PrintGCDetails, true, gclog_or_tty);
// When collecting the permanent generation methodOops may be moving, // When collecting the permanent generation methodOops may be moving,
// so we either have to flush all bcp data or convert it into bci. // so we either have to flush all bcp data or convert it into bci.

View file

@ -128,11 +128,12 @@ klassOop oopFactory::new_instanceKlass(Symbol* name, int vtable_len, int itable_
int static_field_size, int static_field_size,
unsigned int nonstatic_oop_map_count, unsigned int nonstatic_oop_map_count,
AccessFlags access_flags, AccessFlags access_flags,
ReferenceType rt, TRAPS) { ReferenceType rt,
KlassHandle host_klass, TRAPS) {
instanceKlassKlass* ikk = instanceKlassKlass::cast(Universe::instanceKlassKlassObj()); instanceKlassKlass* ikk = instanceKlassKlass::cast(Universe::instanceKlassKlassObj());
return ikk->allocate_instance_klass(name, vtable_len, itable_len, return ikk->allocate_instance_klass(name, vtable_len, itable_len,
static_field_size, nonstatic_oop_map_count, static_field_size, nonstatic_oop_map_count,
access_flags, rt, CHECK_NULL); access_flags, rt, host_klass, CHECK_NULL);
} }

View file

@ -78,7 +78,8 @@ class oopFactory: AllStatic {
int static_field_size, int static_field_size,
unsigned int nonstatic_oop_map_count, unsigned int nonstatic_oop_map_count,
AccessFlags access_flags, AccessFlags access_flags,
ReferenceType rt, TRAPS); ReferenceType rt,
KlassHandle host_klass, TRAPS);
// Methods // Methods
private: private:

View file

@ -880,10 +880,17 @@ class ContiguousSpace: public CompactibleSpace {
void object_iterate_mem(MemRegion mr, UpwardsObjectClosure* cl); void object_iterate_mem(MemRegion mr, UpwardsObjectClosure* cl);
// iterates on objects up to the safe limit // iterates on objects up to the safe limit
HeapWord* object_iterate_careful(ObjectClosureCareful* cl); HeapWord* object_iterate_careful(ObjectClosureCareful* cl);
inline HeapWord* concurrent_iteration_safe_limit(); HeapWord* concurrent_iteration_safe_limit() {
assert(_concurrent_iteration_safe_limit <= top(),
"_concurrent_iteration_safe_limit update missed");
return _concurrent_iteration_safe_limit;
}
// changes the safe limit, all objects from bottom() to the new // changes the safe limit, all objects from bottom() to the new
// limit should be properly initialized // limit should be properly initialized
inline void set_concurrent_iteration_safe_limit(HeapWord* new_limit); void set_concurrent_iteration_safe_limit(HeapWord* new_limit) {
assert(new_limit <= top(), "uninitialized objects in the safe range");
_concurrent_iteration_safe_limit = new_limit;
}
#ifndef SERIALGC #ifndef SERIALGC
// In support of parallel oop_iterate. // In support of parallel oop_iterate.

View file

@ -67,17 +67,4 @@ OffsetTableContigSpace::block_start_const(const void* p) const {
return _offsets.block_start(p); return _offsets.block_start(p);
} }
inline HeapWord* ContiguousSpace::concurrent_iteration_safe_limit()
{
assert(_concurrent_iteration_safe_limit <= top(),
"_concurrent_iteration_safe_limit update missed");
return _concurrent_iteration_safe_limit;
}
inline void ContiguousSpace::set_concurrent_iteration_safe_limit(HeapWord* new_limit)
{
assert(new_limit <= top(), "uninitialized objects in the safe range");
_concurrent_iteration_safe_limit = new_limit;
}
#endif // SHARE_VM_MEMORY_SPACE_INLINE_HPP #endif // SHARE_VM_MEMORY_SPACE_INLINE_HPP

View file

@ -1862,7 +1862,7 @@ void instanceKlass::follow_weak_klass_links(
if (impl != NULL) { if (impl != NULL) {
if (!is_alive->do_object_b(impl)) { if (!is_alive->do_object_b(impl)) {
// remove this guy // remove this guy
*start_of_implementor() = NULL; *adr_implementor() = NULL;
} }
} }
} else { } else {

View file

@ -78,6 +78,7 @@
// The embedded nonstatic oop-map blocks are short pairs (offset, length) // The embedded nonstatic oop-map blocks are short pairs (offset, length)
// indicating where oops are located in instances of this klass. // indicating where oops are located in instances of this klass.
// [EMBEDDED implementor of the interface] only exist for interface // [EMBEDDED implementor of the interface] only exist for interface
// [EMBEDDED host klass ] only exist for an anonymous class (JSR 292 enabled)
// forward declaration for class -- see below for definition // forward declaration for class -- see below for definition
@ -176,10 +177,6 @@ class instanceKlass: public Klass {
oop _class_loader; oop _class_loader;
// Protection domain. // Protection domain.
oop _protection_domain; oop _protection_domain;
// Host class, which grants its access privileges to this class also.
// This is only non-null for an anonymous class (JSR 292 enabled).
// The host class is either named, or a previously loaded anonymous class.
klassOop _host_klass;
// Class signers. // Class signers.
objArrayOop _signers; objArrayOop _signers;
// The InnerClasses attribute and EnclosingMethod attribute. The // The InnerClasses attribute and EnclosingMethod attribute. The
@ -234,9 +231,13 @@ class instanceKlass: public Klass {
int _nonstatic_oop_map_size;// size in words of nonstatic oop map blocks int _nonstatic_oop_map_size;// size in words of nonstatic oop map blocks
bool _is_marked_dependent; // used for marking during flushing and deoptimization bool _is_marked_dependent; // used for marking during flushing and deoptimization
bool _rewritten; // methods rewritten. enum {
bool _has_nonstatic_fields; // for sizing with UseCompressedOops _misc_rewritten = 1 << 0, // methods rewritten.
bool _should_verify_class; // allow caching of preverification _misc_has_nonstatic_fields = 1 << 1, // for sizing with UseCompressedOops
_misc_should_verify_class = 1 << 2, // allow caching of preverification
_misc_is_anonymous = 1 << 3 // has embedded _inner_classes field
};
u2 _misc_flags;
u2 _minor_version; // minor version number of class file u2 _minor_version; // minor version number of class file
u2 _major_version; // major version number of class file u2 _major_version; // major version number of class file
Thread* _init_thread; // Pointer to current thread doing initialization (to handle recusive initialization) Thread* _init_thread; // Pointer to current thread doing initialization (to handle recusive initialization)
@ -276,13 +277,29 @@ class instanceKlass: public Klass {
// NULL: no implementor. // NULL: no implementor.
// A klassOop that's not itself: one implementor. // A klassOop that's not itself: one implementor.
// Itsef: more than one implementors. // Itsef: more than one implementors.
// embedded host klass follows here
// The embedded host klass only exists in an anonymous class for
// dynamic language support (JSR 292 enabled). The host class grants
// its access privileges to this class also. The host class is either
// named, or a previously loaded anonymous class. A non-anonymous class
// or an anonymous class loaded through normal classloading does not
// have this embedded field.
//
friend class instanceKlassKlass; friend class instanceKlassKlass;
friend class SystemDictionary; friend class SystemDictionary;
public: public:
bool has_nonstatic_fields() const { return _has_nonstatic_fields; } bool has_nonstatic_fields() const {
void set_has_nonstatic_fields(bool b) { _has_nonstatic_fields = b; } return (_misc_flags & _misc_has_nonstatic_fields) != 0;
}
void set_has_nonstatic_fields(bool b) {
if (b) {
_misc_flags |= _misc_has_nonstatic_fields;
} else {
_misc_flags &= ~_misc_has_nonstatic_fields;
}
}
// field sizes // field sizes
int nonstatic_field_size() const { return _nonstatic_field_size; } int nonstatic_field_size() const { return _nonstatic_field_size; }
@ -335,7 +352,7 @@ class instanceKlass: public Klass {
int java_fields_count() const { return (int)_java_fields_count; } int java_fields_count() const { return (int)_java_fields_count; }
// Number of fields including any injected fields // Number of fields including any injected fields
int all_fields_count() const { return _fields->length() / sizeof(FieldInfo::field_slots); } int all_fields_count() const { return _fields->length() / FieldInfo::field_slots; }
typeArrayOop fields() const { return _fields; } typeArrayOop fields() const { return _fields; }
@ -396,11 +413,19 @@ class instanceKlass: public Klass {
bool is_in_error_state() const { return _init_state == initialization_error; } bool is_in_error_state() const { return _init_state == initialization_error; }
bool is_reentrant_initialization(Thread *thread) { return thread == _init_thread; } bool is_reentrant_initialization(Thread *thread) { return thread == _init_thread; }
ClassState init_state() { return (ClassState)_init_state; } ClassState init_state() { return (ClassState)_init_state; }
bool is_rewritten() const { return _rewritten; } bool is_rewritten() const { return (_misc_flags & _misc_rewritten) != 0; }
// defineClass specified verification // defineClass specified verification
bool should_verify_class() const { return _should_verify_class; } bool should_verify_class() const {
void set_should_verify_class(bool value) { _should_verify_class = value; } return (_misc_flags & _misc_should_verify_class) != 0;
}
void set_should_verify_class(bool value) {
if (value) {
_misc_flags |= _misc_should_verify_class;
} else {
_misc_flags &= ~_misc_should_verify_class;
}
}
// marking // marking
bool is_marked_dependent() const { return _is_marked_dependent; } bool is_marked_dependent() const { return _is_marked_dependent; }
@ -469,9 +494,30 @@ class instanceKlass: public Klass {
void set_protection_domain(oop pd) { oop_store((oop*) &_protection_domain, pd); } void set_protection_domain(oop pd) { oop_store((oop*) &_protection_domain, pd); }
// host class // host class
oop host_klass() const { return _host_klass; } oop host_klass() const {
void set_host_klass(oop host) { oop_store((oop*) &_host_klass, host); } oop* hk = adr_host_klass();
bool is_anonymous() const { return _host_klass != NULL; } if (hk == NULL) {
return NULL;
} else {
return *hk;
}
}
void set_host_klass(oop host) {
assert(is_anonymous(), "not anonymous");
oop* addr = adr_host_klass();
assert(addr != NULL, "no reversed space");
oop_store(addr, host);
}
bool is_anonymous() const {
return (_misc_flags & _misc_is_anonymous) != 0;
}
void set_is_anonymous(bool value) {
if (value) {
_misc_flags |= _misc_is_anonymous;
} else {
_misc_flags &= ~_misc_is_anonymous;
}
}
// signers // signers
objArrayOop signers() const { return _signers; } objArrayOop signers() const { return _signers; }
@ -651,7 +697,7 @@ class instanceKlass: public Klass {
// Access to the implementor of an interface. // Access to the implementor of an interface.
klassOop implementor() const klassOop implementor() const
{ {
klassOop* k = start_of_implementor(); klassOop* k = (klassOop*)adr_implementor();
if (k == NULL) { if (k == NULL) {
return NULL; return NULL;
} else { } else {
@ -661,7 +707,7 @@ class instanceKlass: public Klass {
void set_implementor(klassOop k) { void set_implementor(klassOop k) {
assert(is_interface(), "not interface"); assert(is_interface(), "not interface");
oop* addr = (oop*)start_of_implementor(); oop* addr = adr_implementor();
oop_store_without_check(addr, k); oop_store_without_check(addr, k);
} }
@ -717,9 +763,11 @@ class instanceKlass: public Klass {
{ {
return object_size(align_object_offset(vtable_length()) + return object_size(align_object_offset(vtable_length()) +
align_object_offset(itable_length()) + align_object_offset(itable_length()) +
(is_interface() ? ((is_interface() || is_anonymous()) ?
(align_object_offset(nonstatic_oop_map_size()) + (int)sizeof(klassOop)/HeapWordSize) : align_object_offset(nonstatic_oop_map_size()) :
nonstatic_oop_map_size())); nonstatic_oop_map_size()) +
(is_interface() ? (int)sizeof(klassOop)/HeapWordSize : 0) +
(is_anonymous() ? (int)sizeof(klassOop)/HeapWordSize : 0));
} }
static int vtable_start_offset() { return header_size(); } static int vtable_start_offset() { return header_size(); }
static int vtable_length_offset() { return oopDesc::header_size() + offset_of(instanceKlass, _vtable_len) / HeapWordSize; } static int vtable_length_offset() { return oopDesc::header_size() + offset_of(instanceKlass, _vtable_len) / HeapWordSize; }
@ -737,15 +785,29 @@ class instanceKlass: public Klass {
return (OopMapBlock*)(start_of_itable() + align_object_offset(itable_length())); return (OopMapBlock*)(start_of_itable() + align_object_offset(itable_length()));
} }
klassOop* start_of_implementor() const { oop* adr_implementor() const {
if (is_interface()) { if (is_interface()) {
return (klassOop*)(start_of_nonstatic_oop_maps() + return (oop*)(start_of_nonstatic_oop_maps() +
nonstatic_oop_map_count()); nonstatic_oop_map_count());
} else { } else {
return NULL; return NULL;
} }
}; };
oop* adr_host_klass() const {
if (is_anonymous()) {
oop* adr_impl = adr_implementor();
if (adr_impl != NULL) {
return adr_impl + 1;
} else {
return (oop*)(start_of_nonstatic_oop_maps() +
nonstatic_oop_map_count());
}
} else {
return NULL;
}
}
// Allocation profiling support // Allocation profiling support
juint alloc_size() const { return _alloc_count * size_helper(); } juint alloc_size() const { return _alloc_count * size_helper(); }
void set_alloc_size(juint n) {} void set_alloc_size(juint n) {}
@ -819,7 +881,7 @@ private:
#else #else
void set_init_state(ClassState state) { _init_state = (u1)state; } void set_init_state(ClassState state) { _init_state = (u1)state; }
#endif #endif
void set_rewritten() { _rewritten = true; } void set_rewritten() { _misc_flags |= _misc_rewritten; }
void set_init_thread(Thread *thread) { _init_thread = thread; } void set_init_thread(Thread *thread) { _init_thread = thread; }
u2 idnum_allocated_count() const { return _idnum_allocated_count; } u2 idnum_allocated_count() const { return _idnum_allocated_count; }
@ -852,10 +914,8 @@ private:
oop* adr_constants() const { return (oop*)&this->_constants;} oop* adr_constants() const { return (oop*)&this->_constants;}
oop* adr_class_loader() const { return (oop*)&this->_class_loader;} oop* adr_class_loader() const { return (oop*)&this->_class_loader;}
oop* adr_protection_domain() const { return (oop*)&this->_protection_domain;} oop* adr_protection_domain() const { return (oop*)&this->_protection_domain;}
oop* adr_host_klass() const { return (oop*)&this->_host_klass;}
oop* adr_signers() const { return (oop*)&this->_signers;} oop* adr_signers() const { return (oop*)&this->_signers;}
oop* adr_inner_classes() const { return (oop*)&this->_inner_classes;} oop* adr_inner_classes() const { return (oop*)&this->_inner_classes;}
oop* adr_implementor() const { return (oop*)start_of_implementor(); }
oop* adr_methods_jmethod_ids() const { return (oop*)&this->_methods_jmethod_ids;} oop* adr_methods_jmethod_ids() const { return (oop*)&this->_methods_jmethod_ids;}
oop* adr_methods_cached_itable_indices() const { return (oop*)&this->_methods_cached_itable_indices;} oop* adr_methods_cached_itable_indices() const { return (oop*)&this->_methods_cached_itable_indices;}
oop* adr_class_annotations() const { return (oop*)&this->_class_annotations;} oop* adr_class_annotations() const { return (oop*)&this->_class_annotations;}

View file

@ -103,7 +103,9 @@ void instanceKlassKlass::oop_follow_contents(oop obj) {
MarkSweep::mark_and_push(ik->adr_class_loader()); MarkSweep::mark_and_push(ik->adr_class_loader());
MarkSweep::mark_and_push(ik->adr_inner_classes()); MarkSweep::mark_and_push(ik->adr_inner_classes());
MarkSweep::mark_and_push(ik->adr_protection_domain()); MarkSweep::mark_and_push(ik->adr_protection_domain());
MarkSweep::mark_and_push(ik->adr_host_klass()); if (ik->adr_host_klass() != NULL) {
MarkSweep::mark_and_push(ik->adr_host_klass());
}
MarkSweep::mark_and_push(ik->adr_signers()); MarkSweep::mark_and_push(ik->adr_signers());
MarkSweep::mark_and_push(ik->adr_class_annotations()); MarkSweep::mark_and_push(ik->adr_class_annotations());
MarkSweep::mark_and_push(ik->adr_fields_annotations()); MarkSweep::mark_and_push(ik->adr_fields_annotations());
@ -139,7 +141,9 @@ void instanceKlassKlass::oop_follow_contents(ParCompactionManager* cm,
PSParallelCompact::mark_and_push(cm, ik->adr_class_loader()); PSParallelCompact::mark_and_push(cm, ik->adr_class_loader());
PSParallelCompact::mark_and_push(cm, ik->adr_inner_classes()); PSParallelCompact::mark_and_push(cm, ik->adr_inner_classes());
PSParallelCompact::mark_and_push(cm, ik->adr_protection_domain()); PSParallelCompact::mark_and_push(cm, ik->adr_protection_domain());
PSParallelCompact::mark_and_push(cm, ik->adr_host_klass()); if (ik->adr_host_klass() != NULL) {
PSParallelCompact::mark_and_push(cm, ik->adr_host_klass());
}
PSParallelCompact::mark_and_push(cm, ik->adr_signers()); PSParallelCompact::mark_and_push(cm, ik->adr_signers());
PSParallelCompact::mark_and_push(cm, ik->adr_class_annotations()); PSParallelCompact::mark_and_push(cm, ik->adr_class_annotations());
PSParallelCompact::mark_and_push(cm, ik->adr_fields_annotations()); PSParallelCompact::mark_and_push(cm, ik->adr_fields_annotations());
@ -177,10 +181,12 @@ int instanceKlassKlass::oop_oop_iterate(oop obj, OopClosure* blk) {
blk->do_oop(ik->adr_constants()); blk->do_oop(ik->adr_constants());
blk->do_oop(ik->adr_class_loader()); blk->do_oop(ik->adr_class_loader());
blk->do_oop(ik->adr_protection_domain()); blk->do_oop(ik->adr_protection_domain());
blk->do_oop(ik->adr_host_klass()); if (ik->adr_host_klass() != NULL) {
blk->do_oop(ik->adr_host_klass());
}
blk->do_oop(ik->adr_signers()); blk->do_oop(ik->adr_signers());
blk->do_oop(ik->adr_inner_classes()); blk->do_oop(ik->adr_inner_classes());
if (ik->is_interface()) { if (ik->adr_implementor() != NULL) {
blk->do_oop(ik->adr_implementor()); blk->do_oop(ik->adr_implementor());
} }
blk->do_oop(ik->adr_class_annotations()); blk->do_oop(ik->adr_class_annotations());
@ -227,15 +233,13 @@ int instanceKlassKlass::oop_oop_iterate_m(oop obj, OopClosure* blk,
adr = ik->adr_protection_domain(); adr = ik->adr_protection_domain();
if (mr.contains(adr)) blk->do_oop(adr); if (mr.contains(adr)) blk->do_oop(adr);
adr = ik->adr_host_klass(); adr = ik->adr_host_klass();
if (mr.contains(adr)) blk->do_oop(adr); if (adr != NULL && mr.contains(adr)) blk->do_oop(adr);
adr = ik->adr_signers(); adr = ik->adr_signers();
if (mr.contains(adr)) blk->do_oop(adr); if (mr.contains(adr)) blk->do_oop(adr);
adr = ik->adr_inner_classes(); adr = ik->adr_inner_classes();
if (mr.contains(adr)) blk->do_oop(adr); if (mr.contains(adr)) blk->do_oop(adr);
if (ik->is_interface()) { adr = ik->adr_implementor();
adr = ik->adr_implementor(); if (adr != NULL && mr.contains(adr)) blk->do_oop(adr);
if (mr.contains(adr)) blk->do_oop(adr);
}
adr = ik->adr_class_annotations(); adr = ik->adr_class_annotations();
if (mr.contains(adr)) blk->do_oop(adr); if (mr.contains(adr)) blk->do_oop(adr);
adr = ik->adr_fields_annotations(); adr = ik->adr_fields_annotations();
@ -270,10 +274,12 @@ int instanceKlassKlass::oop_adjust_pointers(oop obj) {
MarkSweep::adjust_pointer(ik->adr_constants()); MarkSweep::adjust_pointer(ik->adr_constants());
MarkSweep::adjust_pointer(ik->adr_class_loader()); MarkSweep::adjust_pointer(ik->adr_class_loader());
MarkSweep::adjust_pointer(ik->adr_protection_domain()); MarkSweep::adjust_pointer(ik->adr_protection_domain());
MarkSweep::adjust_pointer(ik->adr_host_klass()); if (ik->adr_host_klass() != NULL) {
MarkSweep::adjust_pointer(ik->adr_host_klass());
}
MarkSweep::adjust_pointer(ik->adr_signers()); MarkSweep::adjust_pointer(ik->adr_signers());
MarkSweep::adjust_pointer(ik->adr_inner_classes()); MarkSweep::adjust_pointer(ik->adr_inner_classes());
if (ik->is_interface()) { if (ik->adr_implementor() != NULL) {
MarkSweep::adjust_pointer(ik->adr_implementor()); MarkSweep::adjust_pointer(ik->adr_implementor());
} }
MarkSweep::adjust_pointer(ik->adr_class_annotations()); MarkSweep::adjust_pointer(ik->adr_class_annotations());
@ -302,7 +308,7 @@ void instanceKlassKlass::oop_push_contents(PSPromotionManager* pm, oop obj) {
} }
oop* hk_addr = ik->adr_host_klass(); oop* hk_addr = ik->adr_host_klass();
if (PSScavenge::should_scavenge(hk_addr)) { if (hk_addr != NULL && PSScavenge::should_scavenge(hk_addr)) {
pm->claim_or_forward_depth(hk_addr); pm->claim_or_forward_depth(hk_addr);
} }
@ -328,9 +334,13 @@ int instanceKlassKlass::oop_update_pointers(ParCompactionManager* cm, oop obj) {
for (oop* cur_oop = beg_oop; cur_oop < end_oop; ++cur_oop) { for (oop* cur_oop = beg_oop; cur_oop < end_oop; ++cur_oop) {
PSParallelCompact::adjust_pointer(cur_oop); PSParallelCompact::adjust_pointer(cur_oop);
} }
if (ik->is_interface()) { // embedded oops
if (ik->adr_implementor() != NULL) {
PSParallelCompact::adjust_pointer(ik->adr_implementor()); PSParallelCompact::adjust_pointer(ik->adr_implementor());
} }
if (ik->adr_host_klass() != NULL) {
PSParallelCompact::adjust_pointer(ik->adr_host_klass());
}
OopClosure* closure = PSParallelCompact::adjust_root_pointer_closure(); OopClosure* closure = PSParallelCompact::adjust_root_pointer_closure();
iterate_c_heap_oops(ik, closure); iterate_c_heap_oops(ik, closure);
@ -346,16 +356,23 @@ instanceKlassKlass::allocate_instance_klass(Symbol* name, int vtable_len, int it
int static_field_size, int static_field_size,
unsigned nonstatic_oop_map_count, unsigned nonstatic_oop_map_count,
AccessFlags access_flags, AccessFlags access_flags,
ReferenceType rt, TRAPS) { ReferenceType rt,
KlassHandle host_klass, TRAPS) {
const int nonstatic_oop_map_size = const int nonstatic_oop_map_size =
instanceKlass::nonstatic_oop_map_size(nonstatic_oop_map_count); instanceKlass::nonstatic_oop_map_size(nonstatic_oop_map_count);
int size = align_object_offset(vtable_len) + align_object_offset(itable_len); int size = align_object_offset(vtable_len) + align_object_offset(itable_len);
if (access_flags.is_interface()) { if (access_flags.is_interface() || !host_klass.is_null()) {
size += align_object_offset(nonstatic_oop_map_size) + (int)sizeof(klassOop)/HeapWordSize; size += align_object_offset(nonstatic_oop_map_size);
} else { } else {
size += nonstatic_oop_map_size; size += nonstatic_oop_map_size;
} }
if (access_flags.is_interface()) {
size += (int)sizeof(klassOop)/HeapWordSize;
}
if (!host_klass.is_null()) {
size += (int)sizeof(klassOop)/HeapWordSize;
}
size = instanceKlass::object_size(size); size = instanceKlass::object_size(size);
// Allocation // Allocation
@ -389,6 +406,7 @@ instanceKlassKlass::allocate_instance_klass(Symbol* name, int vtable_len, int it
ik->set_static_field_size(static_field_size); ik->set_static_field_size(static_field_size);
ik->set_nonstatic_oop_map_size(nonstatic_oop_map_size); ik->set_nonstatic_oop_map_size(nonstatic_oop_map_size);
ik->set_access_flags(access_flags); ik->set_access_flags(access_flags);
ik->set_is_anonymous(!host_klass.is_null());
assert(k()->size() == size, "wrong size for object"); assert(k()->size() == size, "wrong size for object");
ik->set_array_klasses(NULL); ik->set_array_klasses(NULL);
@ -401,7 +419,6 @@ instanceKlassKlass::allocate_instance_klass(Symbol* name, int vtable_len, int it
ik->set_constants(NULL); ik->set_constants(NULL);
ik->set_class_loader(NULL); ik->set_class_loader(NULL);
ik->set_protection_domain(NULL); ik->set_protection_domain(NULL);
ik->set_host_klass(NULL);
ik->set_signers(NULL); ik->set_signers(NULL);
ik->set_source_file_name(NULL); ik->set_source_file_name(NULL);
ik->set_source_debug_extension(NULL); ik->set_source_debug_extension(NULL);
@ -503,7 +520,9 @@ void instanceKlassKlass::oop_print_on(oop obj, outputStream* st) {
st->print(BULLET"constants: "); ik->constants()->print_value_on(st); st->cr(); st->print(BULLET"constants: "); ik->constants()->print_value_on(st); st->cr();
st->print(BULLET"class loader: "); ik->class_loader()->print_value_on(st); st->cr(); st->print(BULLET"class loader: "); ik->class_loader()->print_value_on(st); st->cr();
st->print(BULLET"protection domain: "); ik->protection_domain()->print_value_on(st); st->cr(); st->print(BULLET"protection domain: "); ik->protection_domain()->print_value_on(st); st->cr();
st->print(BULLET"host class: "); ik->host_klass()->print_value_on(st); st->cr(); if (ik->host_klass() != NULL) {
st->print(BULLET"host class: "); ik->host_klass()->print_value_on(st); st->cr();
}
st->print(BULLET"signers: "); ik->signers()->print_value_on(st); st->cr(); st->print(BULLET"signers: "); ik->signers()->print_value_on(st); st->cr();
if (ik->source_file_name() != NULL) { if (ik->source_file_name() != NULL) {
st->print(BULLET"source file: "); st->print(BULLET"source file: ");

View file

@ -48,6 +48,7 @@ class instanceKlassKlass : public klassKlass {
unsigned int nonstatic_oop_map_count, unsigned int nonstatic_oop_map_count,
AccessFlags access_flags, AccessFlags access_flags,
ReferenceType rt, ReferenceType rt,
KlassHandle host_klass,
TRAPS); TRAPS);
// Casting from klassOop // Casting from klassOop

View file

@ -137,6 +137,7 @@ JVMState* DirectCallGenerator::generate(JVMState* jvms) {
} }
CallStaticJavaNode *call = new (kit.C, tf()->domain()->cnt()) CallStaticJavaNode(tf(), target, method(), kit.bci()); CallStaticJavaNode *call = new (kit.C, tf()->domain()->cnt()) CallStaticJavaNode(tf(), target, method(), kit.bci());
_call_node = call; // Save the call node in case we need it later
if (!is_static) { if (!is_static) {
// Make an explicit receiver null_check as part of this call. // Make an explicit receiver null_check as part of this call.
// Since we share a map with the caller, his JVMS gets adjusted. // Since we share a map with the caller, his JVMS gets adjusted.
@ -155,7 +156,6 @@ JVMState* DirectCallGenerator::generate(JVMState* jvms) {
kit.set_edges_for_java_call(call, false, _separate_io_proj); kit.set_edges_for_java_call(call, false, _separate_io_proj);
Node* ret = kit.set_results_for_java_call(call, _separate_io_proj); Node* ret = kit.set_results_for_java_call(call, _separate_io_proj);
kit.push_node(method()->return_type()->basic_type(), ret); kit.push_node(method()->return_type()->basic_type(), ret);
_call_node = call; // Save the call node in case we need it later
return kit.transfer_exceptions_into_jvms(); return kit.transfer_exceptions_into_jvms();
} }

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -3748,3 +3748,81 @@ void GraphKit::g1_write_barrier_post(Node* oop_store,
final_sync(ideal); final_sync(ideal);
} }
#undef __ #undef __
Node* GraphKit::load_String_offset(Node* ctrl, Node* str) {
if (java_lang_String::has_offset_field()) {
int offset_offset = java_lang_String::offset_offset_in_bytes();
const TypeInstPtr* string_type = TypeInstPtr::make(TypePtr::NotNull, C->env()->String_klass(),
false, NULL, 0);
const TypePtr* offset_field_type = string_type->add_offset(offset_offset);
int offset_field_idx = C->get_alias_index(offset_field_type);
return make_load(ctrl,
basic_plus_adr(str, str, offset_offset),
TypeInt::INT, T_INT, offset_field_idx);
} else {
return intcon(0);
}
}
Node* GraphKit::load_String_length(Node* ctrl, Node* str) {
if (java_lang_String::has_count_field()) {
int count_offset = java_lang_String::count_offset_in_bytes();
const TypeInstPtr* string_type = TypeInstPtr::make(TypePtr::NotNull, C->env()->String_klass(),
false, NULL, 0);
const TypePtr* count_field_type = string_type->add_offset(count_offset);
int count_field_idx = C->get_alias_index(count_field_type);
return make_load(ctrl,
basic_plus_adr(str, str, count_offset),
TypeInt::INT, T_INT, count_field_idx);
} else {
return load_array_length(load_String_value(ctrl, str));
}
}
Node* GraphKit::load_String_value(Node* ctrl, Node* str) {
int value_offset = java_lang_String::value_offset_in_bytes();
const TypeInstPtr* string_type = TypeInstPtr::make(TypePtr::NotNull, C->env()->String_klass(),
false, NULL, 0);
const TypePtr* value_field_type = string_type->add_offset(value_offset);
const TypeAryPtr* value_type = TypeAryPtr::make(TypePtr::NotNull,
TypeAry::make(TypeInt::CHAR,TypeInt::POS),
ciTypeArrayKlass::make(T_CHAR), true, 0);
int value_field_idx = C->get_alias_index(value_field_type);
return make_load(ctrl, basic_plus_adr(str, str, value_offset),
value_type, T_OBJECT, value_field_idx);
}
void GraphKit::store_String_offset(Node* ctrl, Node* str, Node* value) {
int offset_offset = java_lang_String::offset_offset_in_bytes();
const TypeInstPtr* string_type = TypeInstPtr::make(TypePtr::NotNull, C->env()->String_klass(),
false, NULL, 0);
const TypePtr* offset_field_type = string_type->add_offset(offset_offset);
int offset_field_idx = C->get_alias_index(offset_field_type);
store_to_memory(ctrl, basic_plus_adr(str, offset_offset),
value, T_INT, offset_field_idx);
}
void GraphKit::store_String_value(Node* ctrl, Node* str, Node* value) {
int value_offset = java_lang_String::value_offset_in_bytes();
const TypeInstPtr* string_type = TypeInstPtr::make(TypePtr::NotNull, C->env()->String_klass(),
false, NULL, 0);
const TypePtr* value_field_type = string_type->add_offset(value_offset);
const TypeAryPtr* value_type = TypeAryPtr::make(TypePtr::NotNull,
TypeAry::make(TypeInt::CHAR,TypeInt::POS),
ciTypeArrayKlass::make(T_CHAR), true, 0);
int value_field_idx = C->get_alias_index(value_field_type);
store_to_memory(ctrl, basic_plus_adr(str, value_offset),
value, T_OBJECT, value_field_idx);
}
void GraphKit::store_String_length(Node* ctrl, Node* str, Node* value) {
int count_offset = java_lang_String::count_offset_in_bytes();
const TypeInstPtr* string_type = TypeInstPtr::make(TypePtr::NotNull, C->env()->String_klass(),
false, NULL, 0);
const TypePtr* count_field_type = string_type->add_offset(count_offset);
int count_field_idx = C->get_alias_index(count_field_type);
store_to_memory(ctrl, basic_plus_adr(str, count_offset),
value, T_INT, count_field_idx);
}

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -781,6 +781,14 @@ class GraphKit : public Phase {
Node* new_array(Node* klass_node, Node* count_val, int nargs, Node* new_array(Node* klass_node, Node* count_val, int nargs,
Node* *return_size_val = NULL); Node* *return_size_val = NULL);
// java.lang.String helpers
Node* load_String_offset(Node* ctrl, Node* str);
Node* load_String_length(Node* ctrl, Node* str);
Node* load_String_value(Node* ctrl, Node* str);
void store_String_offset(Node* ctrl, Node* str, Node* value);
void store_String_length(Node* ctrl, Node* str, Node* value);
void store_String_value(Node* ctrl, Node* str, Node* value);
// Handy for making control flow // Handy for making control flow
IfNode* create_and_map_if(Node* ctrl, Node* tst, float prob, float cnt) { IfNode* create_and_map_if(Node* ctrl, Node* tst, float prob, float cnt) {
IfNode* iff = new (C, 2) IfNode(ctrl, tst, prob, cnt);// New IfNode's IfNode* iff = new (C, 2) IfNode(ctrl, tst, prob, cnt);// New IfNode's

View file

@ -147,7 +147,8 @@ class LibraryCallKit : public GraphKit {
return generate_method_call(method_id, true, false); return generate_method_call(method_id, true, false);
} }
Node* make_string_method_node(int opcode, Node* str1, Node* cnt1, Node* str2, Node* cnt2); Node* make_string_method_node(int opcode, Node* str1_start, Node* cnt1, Node* str2_start, Node* cnt2);
Node* make_string_method_node(int opcode, Node* str1, Node* str2);
bool inline_string_compareTo(); bool inline_string_compareTo();
bool inline_string_indexOf(); bool inline_string_indexOf();
Node* string_indexOf(Node* string_object, ciTypeArray* target_array, jint offset, jint cache_i, jint md2_i); Node* string_indexOf(Node* string_object, ciTypeArray* target_array, jint offset, jint cache_i, jint md2_i);
@ -873,48 +874,76 @@ Node* LibraryCallKit::generate_current_thread(Node* &tls_output) {
//------------------------------make_string_method_node------------------------ //------------------------------make_string_method_node------------------------
// Helper method for String intrinsic finctions. // Helper method for String intrinsic functions. This version is called
Node* LibraryCallKit::make_string_method_node(int opcode, Node* str1, Node* cnt1, Node* str2, Node* cnt2) { // with str1 and str2 pointing to String object nodes.
const int value_offset = java_lang_String::value_offset_in_bytes(); //
const int count_offset = java_lang_String::count_offset_in_bytes(); Node* LibraryCallKit::make_string_method_node(int opcode, Node* str1, Node* str2) {
const int offset_offset = java_lang_String::offset_offset_in_bytes();
Node* no_ctrl = NULL; Node* no_ctrl = NULL;
ciInstanceKlass* klass = env()->String_klass(); // Get start addr of string
const TypeOopPtr* string_type = TypeOopPtr::make_from_klass(klass); Node* str1_value = load_String_value(no_ctrl, str1);
Node* str1_offset = load_String_offset(no_ctrl, str1);
const TypeAryPtr* value_type =
TypeAryPtr::make(TypePtr::NotNull,
TypeAry::make(TypeInt::CHAR,TypeInt::POS),
ciTypeArrayKlass::make(T_CHAR), true, 0);
// Get start addr of string and substring
Node* str1_valuea = basic_plus_adr(str1, str1, value_offset);
Node* str1_value = make_load(no_ctrl, str1_valuea, value_type, T_OBJECT, string_type->add_offset(value_offset));
Node* str1_offseta = basic_plus_adr(str1, str1, offset_offset);
Node* str1_offset = make_load(no_ctrl, str1_offseta, TypeInt::INT, T_INT, string_type->add_offset(offset_offset));
Node* str1_start = array_element_address(str1_value, str1_offset, T_CHAR); Node* str1_start = array_element_address(str1_value, str1_offset, T_CHAR);
Node* str2_valuea = basic_plus_adr(str2, str2, value_offset); // Get length of string 1
Node* str2_value = make_load(no_ctrl, str2_valuea, value_type, T_OBJECT, string_type->add_offset(value_offset)); Node* str1_len = load_String_length(no_ctrl, str1);
Node* str2_offseta = basic_plus_adr(str2, str2, offset_offset);
Node* str2_offset = make_load(no_ctrl, str2_offseta, TypeInt::INT, T_INT, string_type->add_offset(offset_offset)); Node* str2_value = load_String_value(no_ctrl, str2);
Node* str2_offset = load_String_offset(no_ctrl, str2);
Node* str2_start = array_element_address(str2_value, str2_offset, T_CHAR); Node* str2_start = array_element_address(str2_value, str2_offset, T_CHAR);
Node* str2_len = NULL;
Node* result = NULL;
switch (opcode) {
case Op_StrIndexOf:
// Get length of string 2
str2_len = load_String_length(no_ctrl, str2);
result = new (C, 6) StrIndexOfNode(control(), memory(TypeAryPtr::CHARS),
str1_start, str1_len, str2_start, str2_len);
break;
case Op_StrComp:
// Get length of string 2
str2_len = load_String_length(no_ctrl, str2);
result = new (C, 6) StrCompNode(control(), memory(TypeAryPtr::CHARS),
str1_start, str1_len, str2_start, str2_len);
break;
case Op_StrEquals:
result = new (C, 5) StrEqualsNode(control(), memory(TypeAryPtr::CHARS),
str1_start, str2_start, str1_len);
break;
default:
ShouldNotReachHere();
return NULL;
}
// All these intrinsics have checks.
C->set_has_split_ifs(true); // Has chance for split-if optimization
return _gvn.transform(result);
}
// Helper method for String intrinsic functions. This version is called
// with str1 and str2 pointing to char[] nodes, with cnt1 and cnt2 pointing
// to Int nodes containing the lenghts of str1 and str2.
//
Node* LibraryCallKit::make_string_method_node(int opcode, Node* str1_start, Node* cnt1, Node* str2_start, Node* cnt2) {
Node* result = NULL; Node* result = NULL;
switch (opcode) { switch (opcode) {
case Op_StrIndexOf: case Op_StrIndexOf:
result = new (C, 6) StrIndexOfNode(control(), memory(TypeAryPtr::CHARS), result = new (C, 6) StrIndexOfNode(control(), memory(TypeAryPtr::CHARS),
str1_start, cnt1, str2_start, cnt2); str1_start, cnt1, str2_start, cnt2);
break; break;
case Op_StrComp: case Op_StrComp:
result = new (C, 6) StrCompNode(control(), memory(TypeAryPtr::CHARS), result = new (C, 6) StrCompNode(control(), memory(TypeAryPtr::CHARS),
str1_start, cnt1, str2_start, cnt2); str1_start, cnt1, str2_start, cnt2);
break; break;
case Op_StrEquals: case Op_StrEquals:
result = new (C, 5) StrEqualsNode(control(), memory(TypeAryPtr::CHARS), result = new (C, 5) StrEqualsNode(control(), memory(TypeAryPtr::CHARS),
str1_start, str2_start, cnt1); str1_start, str2_start, cnt1);
break; break;
default: default:
ShouldNotReachHere(); ShouldNotReachHere();
@ -932,10 +961,6 @@ bool LibraryCallKit::inline_string_compareTo() {
if (!Matcher::has_match_rule(Op_StrComp)) return false; if (!Matcher::has_match_rule(Op_StrComp)) return false;
const int value_offset = java_lang_String::value_offset_in_bytes();
const int count_offset = java_lang_String::count_offset_in_bytes();
const int offset_offset = java_lang_String::offset_offset_in_bytes();
_sp += 2; _sp += 2;
Node *argument = pop(); // pop non-receiver first: it was pushed second Node *argument = pop(); // pop non-receiver first: it was pushed second
Node *receiver = pop(); Node *receiver = pop();
@ -952,18 +977,7 @@ bool LibraryCallKit::inline_string_compareTo() {
return true; return true;
} }
ciInstanceKlass* klass = env()->String_klass(); Node* compare = make_string_method_node(Op_StrComp, receiver, argument);
const TypeOopPtr* string_type = TypeOopPtr::make_from_klass(klass);
Node* no_ctrl = NULL;
// Get counts for string and argument
Node* receiver_cnta = basic_plus_adr(receiver, receiver, count_offset);
Node* receiver_cnt = make_load(no_ctrl, receiver_cnta, TypeInt::INT, T_INT, string_type->add_offset(count_offset));
Node* argument_cnta = basic_plus_adr(argument, argument, count_offset);
Node* argument_cnt = make_load(no_ctrl, argument_cnta, TypeInt::INT, T_INT, string_type->add_offset(count_offset));
Node* compare = make_string_method_node(Op_StrComp, receiver, receiver_cnt, argument, argument_cnt);
push(compare); push(compare);
return true; return true;
} }
@ -973,10 +987,6 @@ bool LibraryCallKit::inline_string_equals() {
if (!Matcher::has_match_rule(Op_StrEquals)) return false; if (!Matcher::has_match_rule(Op_StrEquals)) return false;
const int value_offset = java_lang_String::value_offset_in_bytes();
const int count_offset = java_lang_String::count_offset_in_bytes();
const int offset_offset = java_lang_String::offset_offset_in_bytes();
int nargs = 2; int nargs = 2;
_sp += nargs; _sp += nargs;
Node* argument = pop(); // pop non-receiver first: it was pushed second Node* argument = pop(); // pop non-receiver first: it was pushed second
@ -1030,24 +1040,31 @@ bool LibraryCallKit::inline_string_equals() {
} }
} }
const TypeOopPtr* string_type = TypeOopPtr::make_from_klass(klass);
Node* no_ctrl = NULL;
Node* receiver_cnt;
Node* argument_cnt;
if (!stopped()) { if (!stopped()) {
const TypeOopPtr* string_type = TypeOopPtr::make_from_klass(klass);
// Properly cast the argument to String // Properly cast the argument to String
argument = _gvn.transform(new (C, 2) CheckCastPPNode(control(), argument, string_type)); argument = _gvn.transform(new (C, 2) CheckCastPPNode(control(), argument, string_type));
// This path is taken only when argument's type is String:NotNull. // This path is taken only when argument's type is String:NotNull.
argument = cast_not_null(argument, false); argument = cast_not_null(argument, false);
// Get counts for string and argument Node* no_ctrl = NULL;
Node* receiver_cnta = basic_plus_adr(receiver, receiver, count_offset);
receiver_cnt = make_load(no_ctrl, receiver_cnta, TypeInt::INT, T_INT, string_type->add_offset(count_offset));
Node* argument_cnta = basic_plus_adr(argument, argument, count_offset); // Get start addr of receiver
argument_cnt = make_load(no_ctrl, argument_cnta, TypeInt::INT, T_INT, string_type->add_offset(count_offset)); Node* receiver_val = load_String_value(no_ctrl, receiver);
Node* receiver_offset = load_String_offset(no_ctrl, receiver);
Node* receiver_start = array_element_address(receiver_val, receiver_offset, T_CHAR);
// Get length of receiver
Node* receiver_cnt = load_String_length(no_ctrl, receiver);
// Get start addr of argument
Node* argument_val = load_String_value(no_ctrl, argument);
Node* argument_offset = load_String_offset(no_ctrl, argument);
Node* argument_start = array_element_address(argument_val, argument_offset, T_CHAR);
// Get length of argument
Node* argument_cnt = load_String_length(no_ctrl, argument);
// Check for receiver count != argument count // Check for receiver count != argument count
Node* cmp = _gvn.transform( new(C, 3) CmpINode(receiver_cnt, argument_cnt) ); Node* cmp = _gvn.transform( new(C, 3) CmpINode(receiver_cnt, argument_cnt) );
@ -1057,14 +1074,14 @@ bool LibraryCallKit::inline_string_equals() {
phi->init_req(4, intcon(0)); phi->init_req(4, intcon(0));
region->init_req(4, if_ne); region->init_req(4, if_ne);
} }
}
// Check for count == 0 is done by mach node StrEquals. // Check for count == 0 is done by assembler code for StrEquals.
if (!stopped()) { if (!stopped()) {
Node* equals = make_string_method_node(Op_StrEquals, receiver, receiver_cnt, argument, argument_cnt); Node* equals = make_string_method_node(Op_StrEquals, receiver_start, receiver_cnt, argument_start, argument_cnt);
phi->init_req(1, equals); phi->init_req(1, equals);
region->init_req(1, control()); region->init_req(1, control());
}
} }
// post merge // post merge
@ -1162,20 +1179,9 @@ Node* LibraryCallKit::string_indexOf(Node* string_object, ciTypeArray* target_ar
const int nargs = 2; // number of arguments to push back for uncommon trap in predicate const int nargs = 2; // number of arguments to push back for uncommon trap in predicate
const int value_offset = java_lang_String::value_offset_in_bytes(); Node* source = load_String_value(no_ctrl, string_object);
const int count_offset = java_lang_String::count_offset_in_bytes(); Node* sourceOffset = load_String_offset(no_ctrl, string_object);
const int offset_offset = java_lang_String::offset_offset_in_bytes(); Node* sourceCount = load_String_length(no_ctrl, string_object);
ciInstanceKlass* klass = env()->String_klass();
const TypeOopPtr* string_type = TypeOopPtr::make_from_klass(klass);
const TypeAryPtr* source_type = TypeAryPtr::make(TypePtr::NotNull, TypeAry::make(TypeInt::CHAR,TypeInt::POS), ciTypeArrayKlass::make(T_CHAR), true, 0);
Node* sourceOffseta = basic_plus_adr(string_object, string_object, offset_offset);
Node* sourceOffset = make_load(no_ctrl, sourceOffseta, TypeInt::INT, T_INT, string_type->add_offset(offset_offset));
Node* sourceCounta = basic_plus_adr(string_object, string_object, count_offset);
Node* sourceCount = make_load(no_ctrl, sourceCounta, TypeInt::INT, T_INT, string_type->add_offset(count_offset));
Node* sourcea = basic_plus_adr(string_object, string_object, value_offset);
Node* source = make_load(no_ctrl, sourcea, source_type, T_OBJECT, string_type->add_offset(value_offset));
Node* target = _gvn.transform( makecon(TypeOopPtr::make_from_constant(target_array, true)) ); Node* target = _gvn.transform( makecon(TypeOopPtr::make_from_constant(target_array, true)) );
jint target_length = target_array->length(); jint target_length = target_array->length();
@ -1243,10 +1249,6 @@ Node* LibraryCallKit::string_indexOf(Node* string_object, ciTypeArray* target_ar
//------------------------------inline_string_indexOf------------------------ //------------------------------inline_string_indexOf------------------------
bool LibraryCallKit::inline_string_indexOf() { bool LibraryCallKit::inline_string_indexOf() {
const int value_offset = java_lang_String::value_offset_in_bytes();
const int count_offset = java_lang_String::count_offset_in_bytes();
const int offset_offset = java_lang_String::offset_offset_in_bytes();
_sp += 2; _sp += 2;
Node *argument = pop(); // pop non-receiver first: it was pushed second Node *argument = pop(); // pop non-receiver first: it was pushed second
Node *receiver = pop(); Node *receiver = pop();
@ -1280,12 +1282,21 @@ bool LibraryCallKit::inline_string_indexOf() {
Node* result_phi = new (C, 4) PhiNode(result_rgn, TypeInt::INT); Node* result_phi = new (C, 4) PhiNode(result_rgn, TypeInt::INT);
Node* no_ctrl = NULL; Node* no_ctrl = NULL;
// Get counts for string and substr // Get start addr of source string
Node* source_cnta = basic_plus_adr(receiver, receiver, count_offset); Node* source = load_String_value(no_ctrl, receiver);
Node* source_cnt = make_load(no_ctrl, source_cnta, TypeInt::INT, T_INT, string_type->add_offset(count_offset)); Node* source_offset = load_String_offset(no_ctrl, receiver);
Node* source_start = array_element_address(source, source_offset, T_CHAR);
Node* substr_cnta = basic_plus_adr(argument, argument, count_offset); // Get length of source string
Node* substr_cnt = make_load(no_ctrl, substr_cnta, TypeInt::INT, T_INT, string_type->add_offset(count_offset)); Node* source_cnt = load_String_length(no_ctrl, receiver);
// Get start addr of substring
Node* substr = load_String_value(no_ctrl, argument);
Node* substr_offset = load_String_offset(no_ctrl, argument);
Node* substr_start = array_element_address(substr, substr_offset, T_CHAR);
// Get length of source string
Node* substr_cnt = load_String_length(no_ctrl, argument);
// Check for substr count > string count // Check for substr count > string count
Node* cmp = _gvn.transform( new(C, 3) CmpINode(substr_cnt, source_cnt) ); Node* cmp = _gvn.transform( new(C, 3) CmpINode(substr_cnt, source_cnt) );
@ -1308,7 +1319,7 @@ bool LibraryCallKit::inline_string_indexOf() {
} }
if (!stopped()) { if (!stopped()) {
result = make_string_method_node(Op_StrIndexOf, receiver, source_cnt, argument, substr_cnt); result = make_string_method_node(Op_StrIndexOf, source_start, source_cnt, substr_start, substr_cnt);
result_phi->init_req(1, result); result_phi->init_req(1, result);
result_rgn->init_req(1, control()); result_rgn->init_req(1, control());
} }
@ -1333,11 +1344,19 @@ bool LibraryCallKit::inline_string_indexOf() {
ciInstance* str = str_const->as_instance(); ciInstance* str = str_const->as_instance();
assert(str != NULL, "must be instance"); assert(str != NULL, "must be instance");
ciObject* v = str->field_value_by_offset(value_offset).as_object(); ciObject* v = str->field_value_by_offset(java_lang_String::value_offset_in_bytes()).as_object();
int o = str->field_value_by_offset(offset_offset).as_int();
int c = str->field_value_by_offset(count_offset).as_int();
ciTypeArray* pat = v->as_type_array(); // pattern (argument) character array ciTypeArray* pat = v->as_type_array(); // pattern (argument) character array
int o;
int c;
if (java_lang_String::has_offset_field()) {
o = str->field_value_by_offset(java_lang_String::offset_offset_in_bytes()).as_int();
c = str->field_value_by_offset(java_lang_String::count_offset_in_bytes()).as_int();
} else {
o = 0;
c = pat->length();
}
// constant strings have no offset and count == length which // constant strings have no offset and count == length which
// simplifies the resulting code somewhat so lets optimize for that. // simplifies the resulting code somewhat so lets optimize for that.
if (o != 0 || c != pat->length()) { if (o != 0 || c != pat->length()) {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -528,16 +528,6 @@ PhaseStringOpts::PhaseStringOpts(PhaseGVN* gvn, Unique_Node_List*):
} }
// Collect the types needed to talk about the various slices of memory // Collect the types needed to talk about the various slices of memory
const TypeInstPtr* string_type = TypeInstPtr::make(TypePtr::NotNull, C->env()->String_klass(),
false, NULL, 0);
const TypePtr* value_field_type = string_type->add_offset(java_lang_String::value_offset_in_bytes());
const TypePtr* offset_field_type = string_type->add_offset(java_lang_String::offset_offset_in_bytes());
const TypePtr* count_field_type = string_type->add_offset(java_lang_String::count_offset_in_bytes());
value_field_idx = C->get_alias_index(value_field_type);
count_field_idx = C->get_alias_index(count_field_type);
offset_field_idx = C->get_alias_index(offset_field_type);
char_adr_idx = C->get_alias_index(TypeAryPtr::CHARS); char_adr_idx = C->get_alias_index(TypeAryPtr::CHARS);
// For each locally allocated StringBuffer see if the usages can be // For each locally allocated StringBuffer see if the usages can be
@ -897,8 +887,8 @@ bool StringConcat::validate_control_flow() {
} }
Node* PhaseStringOpts::fetch_static_field(GraphKit& kit, ciField* field) { Node* PhaseStringOpts::fetch_static_field(GraphKit& kit, ciField* field) {
const TypeKlassPtr* klass_type = TypeKlassPtr::make(field->holder()); const TypeInstPtr* mirror_type = TypeInstPtr::make(field->holder()->java_mirror());
Node* klass_node = __ makecon(klass_type); Node* klass_node = __ makecon(mirror_type);
BasicType bt = field->layout_type(); BasicType bt = field->layout_type();
ciType* field_klass = field->type(); ciType* field_klass = field->type();
@ -913,6 +903,7 @@ Node* PhaseStringOpts::fetch_static_field(GraphKit& kit, ciField* field) {
// and may yield a vacuous result if the field is of interface type. // and may yield a vacuous result if the field is of interface type.
type = TypeOopPtr::make_from_constant(con, true)->isa_oopptr(); type = TypeOopPtr::make_from_constant(con, true)->isa_oopptr();
assert(type != NULL, "field singleton type must be consistent"); assert(type != NULL, "field singleton type must be consistent");
return __ makecon(type);
} else { } else {
type = TypeOopPtr::make_from_klass(field_klass->as_klass()); type = TypeOopPtr::make_from_klass(field_klass->as_klass());
} }
@ -922,7 +913,7 @@ Node* PhaseStringOpts::fetch_static_field(GraphKit& kit, ciField* field) {
return kit.make_load(NULL, kit.basic_plus_adr(klass_node, field->offset_in_bytes()), return kit.make_load(NULL, kit.basic_plus_adr(klass_node, field->offset_in_bytes()),
type, T_OBJECT, type, T_OBJECT,
C->get_alias_index(klass_type->add_offset(field->offset_in_bytes()))); C->get_alias_index(mirror_type->add_offset(field->offset_in_bytes())));
} }
Node* PhaseStringOpts::int_stringSize(GraphKit& kit, Node* arg) { Node* PhaseStringOpts::int_stringSize(GraphKit& kit, Node* arg) {
@ -1173,18 +1164,9 @@ void PhaseStringOpts::int_getChars(GraphKit& kit, Node* arg, Node* char_array, N
Node* PhaseStringOpts::copy_string(GraphKit& kit, Node* str, Node* char_array, Node* start) { Node* PhaseStringOpts::copy_string(GraphKit& kit, Node* str, Node* char_array, Node* start) {
Node* string = str; Node* string = str;
Node* offset = kit.make_load(kit.control(), Node* offset = kit.load_String_offset(kit.control(), string);
kit.basic_plus_adr(string, string, java_lang_String::offset_offset_in_bytes()), Node* count = kit.load_String_length(kit.control(), string);
TypeInt::INT, T_INT, offset_field_idx); Node* value = kit.load_String_value (kit.control(), string);
Node* count = kit.make_load(kit.control(),
kit.basic_plus_adr(string, string, java_lang_String::count_offset_in_bytes()),
TypeInt::INT, T_INT, count_field_idx);
const TypeAryPtr* value_type = TypeAryPtr::make(TypePtr::NotNull,
TypeAry::make(TypeInt::CHAR,TypeInt::POS),
ciTypeArrayKlass::make(T_CHAR), true, 0);
Node* value = kit.make_load(kit.control(),
kit.basic_plus_adr(string, string, java_lang_String::value_offset_in_bytes()),
value_type, T_OBJECT, value_field_idx);
// copy the contents // copy the contents
if (offset->is_Con() && count->is_Con() && value->is_Con() && count->get_int() < unroll_string_copy_length) { if (offset->is_Con() && count->is_Con() && value->is_Con() && count->get_int() < unroll_string_copy_length) {
@ -1341,10 +1323,9 @@ void PhaseStringOpts::replace_string_concat(StringConcat* sc) {
arg = phi; arg = phi;
sc->set_argument(argi, arg); sc->set_argument(argi, arg);
} }
// Node* offset = kit.make_load(NULL, kit.basic_plus_adr(arg, arg, offset_offset),
// TypeInt::INT, T_INT, offset_field_idx); Node* count = kit.load_String_length(kit.control(), arg);
Node* count = kit.make_load(kit.control(), kit.basic_plus_adr(arg, arg, java_lang_String::count_offset_in_bytes()),
TypeInt::INT, T_INT, count_field_idx);
length = __ AddI(length, count); length = __ AddI(length, count);
string_sizes->init_req(argi, NULL); string_sizes->init_req(argi, NULL);
break; break;
@ -1435,12 +1416,11 @@ void PhaseStringOpts::replace_string_concat(StringConcat* sc) {
} }
// Intialize the string // Intialize the string
kit.store_to_memory(kit.control(), kit.basic_plus_adr(result, java_lang_String::offset_offset_in_bytes()), if (java_lang_String::has_offset_field()) {
__ intcon(0), T_INT, offset_field_idx); kit.store_String_offset(kit.control(), result, __ intcon(0));
kit.store_to_memory(kit.control(), kit.basic_plus_adr(result, java_lang_String::count_offset_in_bytes()), kit.store_String_length(kit.control(), result, length);
length, T_INT, count_field_idx); }
kit.store_to_memory(kit.control(), kit.basic_plus_adr(result, java_lang_String::value_offset_in_bytes()), kit.store_String_value(kit.control(), result, char_array);
char_array, T_OBJECT, value_field_idx);
// hook up the outgoing control and result // hook up the outgoing control and result
kit.replace_call(sc->end(), result); kit.replace_call(sc->end(), result);

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -41,9 +41,6 @@ class PhaseStringOpts : public Phase {
// Memory slices needed for code gen // Memory slices needed for code gen
int char_adr_idx; int char_adr_idx;
int value_field_idx;
int count_field_idx;
int offset_field_idx;
// Integer.sizeTable - used for int to String conversion // Integer.sizeTable - used for int to String conversion
ciField* size_table_field; ciField* size_table_field;

View file

@ -1221,12 +1221,11 @@ Node* SuperWord::vector_opd(Node_List* p, int opd_idx) {
return opd; // input is matching vector return opd; // input is matching vector
} }
assert(!opd->is_VectorStore(), "such vector is not expected here"); assert(!opd->is_VectorStore(), "such vector is not expected here");
// Convert scalar input to vector. Use p0's type because it's container // Convert scalar input to vector with the same number of elements as
// maybe smaller than the operand's container. // p0's vector. Use p0's type because size of operand's container in
const Type* opd_t = velt_type(!in_bb(opd) ? p0 : opd); // vector should match p0's size regardless operand's size.
const Type* p0_t = velt_type(p0); const Type* p0_t = velt_type(p0);
if (p0_t->higher_equal(opd_t)) opd_t = p0_t; VectorNode* vn = VectorNode::scalar2vector(_phase->C, opd, vlen, p0_t);
VectorNode* vn = VectorNode::scalar2vector(_phase->C, opd, vlen, opd_t);
_phase->_igvn.register_new_node_with_optimizer(vn); _phase->_igvn.register_new_node_with_optimizer(vn);
_phase->set_ctrl(vn, _phase->get_ctrl(opd)); _phase->set_ctrl(vn, _phase->get_ctrl(opd));
@ -1234,14 +1233,15 @@ Node* SuperWord::vector_opd(Node_List* p, int opd_idx) {
} }
// Insert pack operation // Insert pack operation
const Type* opd_t = velt_type(!in_bb(opd) ? p0 : opd); const Type* p0_t = velt_type(p0);
PackNode* pk = PackNode::make(_phase->C, opd, opd_t); PackNode* pk = PackNode::make(_phase->C, opd, p0_t);
DEBUG_ONLY( const BasicType opd_bt = opd->bottom_type()->basic_type(); )
for (uint i = 1; i < vlen; i++) { for (uint i = 1; i < vlen; i++) {
Node* pi = p->at(i); Node* pi = p->at(i);
Node* in = pi->in(opd_idx); Node* in = pi->in(opd_idx);
assert(my_pack(in) == NULL, "Should already have been unpacked"); assert(my_pack(in) == NULL, "Should already have been unpacked");
assert(opd_t == velt_type(!in_bb(in) ? pi : in), "all same type"); assert(opd_bt == in->bottom_type()->basic_type(), "all same type");
pk->add_opd(in); pk->add_opd(in);
} }
_phase->_igvn.register_new_node_with_optimizer(pk); _phase->_igvn.register_new_node_with_optimizer(pk);

View file

@ -3039,7 +3039,7 @@ jint Arguments::parse(const JavaVMInitArgs* args) {
return result; return result;
} }
#ifdef JAVASE_EMBEDDED #if (defined JAVASE_EMBEDDED || defined ARM)
UNSUPPORTED_OPTION(UseG1GC, "G1 GC"); UNSUPPORTED_OPTION(UseG1GC, "G1 GC");
#endif #endif
@ -3092,6 +3092,14 @@ jint Arguments::parse(const JavaVMInitArgs* args) {
PrintGC = true; PrintGC = true;
} }
if (!JDK_Version::is_gte_jdk18x_version()) {
// To avoid changing the log format for 7 updates this flag is only
// true by default in JDK8 and above.
if (FLAG_IS_DEFAULT(PrintGCCause)) {
FLAG_SET_DEFAULT(PrintGCCause, false);
}
}
// Set object alignment values. // Set object alignment values.
set_object_alignment(); set_object_alignment();

View file

@ -148,6 +148,8 @@ void Flag::print_as_flag(outputStream* st) {
st->print("-XX:%s=" UINTX_FORMAT, name, get_uintx()); st->print("-XX:%s=" UINTX_FORMAT, name, get_uintx());
} else if (is_uint64_t()) { } else if (is_uint64_t()) {
st->print("-XX:%s=" UINT64_FORMAT, name, get_uint64_t()); st->print("-XX:%s=" UINT64_FORMAT, name, get_uint64_t());
} else if (is_double()) {
st->print("-XX:%s=%f", name, get_double());
} else if (is_ccstr()) { } else if (is_ccstr()) {
st->print("-XX:%s=", name); st->print("-XX:%s=", name);
const char* cp = get_ccstr(); const char* cp = get_ccstr();

View file

@ -3902,7 +3902,10 @@ class CommandLineFlags {
" of this flag is true for JDK 6 and earlier") \ " of this flag is true for JDK 6 and earlier") \
\ \
diagnostic(bool, WhiteBoxAPI, false, \ diagnostic(bool, WhiteBoxAPI, false, \
"Enable internal testing APIs") "Enable internal testing APIs") \
\
product(bool, PrintGCCause, true, \
"Include GC cause in GC logging")
/* /*
* Macros for factoring of globals * Macros for factoring of globals

View file

@ -206,6 +206,10 @@ class JDK_Version VALUE_OBJ_CLASS_SPEC {
return current().compare_major(7) == 0; return current().compare_major(7) == 0;
} }
static bool is_jdk18x_version() {
return current().compare_major(8) == 0;
}
static bool is_gte_jdk13x_version() { static bool is_gte_jdk13x_version() {
return current().compare_major(3) >= 0; return current().compare_major(3) >= 0;
} }
@ -225,6 +229,10 @@ class JDK_Version VALUE_OBJ_CLASS_SPEC {
static bool is_gte_jdk17x_version() { static bool is_gte_jdk17x_version() {
return current().compare_major(7) >= 0; return current().compare_major(7) >= 0;
} }
static bool is_gte_jdk18x_version() {
return current().compare_major(8) >= 0;
}
}; };
#endif // SHARE_VM_RUNTIME_JAVA_HPP #endif // SHARE_VM_RUNTIME_JAVA_HPP

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -179,6 +179,11 @@ const jlong NANOSECS_PER_SEC = CONST64(1000000000);
const jint NANOSECS_PER_MILLISEC = 1000000; const jint NANOSECS_PER_MILLISEC = 1000000;
inline const char* proper_unit_for_byte_size(size_t s) { inline const char* proper_unit_for_byte_size(size_t s) {
#ifdef _LP64
if (s >= 10*G) {
return "G";
}
#endif
if (s >= 10*M) { if (s >= 10*M) {
return "M"; return "M";
} else if (s >= 10*K) { } else if (s >= 10*K) {
@ -188,17 +193,22 @@ inline const char* proper_unit_for_byte_size(size_t s) {
} }
} }
inline size_t byte_size_in_proper_unit(size_t s) { template <class T>
inline T byte_size_in_proper_unit(T s) {
#ifdef _LP64
if (s >= 10*G) {
return (T)(s/G);
}
#endif
if (s >= 10*M) { if (s >= 10*M) {
return s/M; return (T)(s/M);
} else if (s >= 10*K) { } else if (s >= 10*K) {
return s/K; return (T)(s/K);
} else { } else {
return s; return s;
} }
} }
//---------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------
// VM type definitions // VM type definitions

View file

@ -13,7 +13,18 @@
Porter, 1980, An algorithm for suffix stripping, Program, Vol. 14, Porter, 1980, An algorithm for suffix stripping, Program, Vol. 14,
no. 3, pp 130-137, no. 3, pp 130-137,
See also http://www.tartarus.org/~martin/PorterStemmer http://www.tartarus.org/~martin/PorterStemmer
The software is completely free for any purpose, unless notes at the head
of the program text indicates otherwise (which is rare). In any case,
the notes about licensing are never more restrictive than the BSD License.
In every case where the software is not written by me (Martin Porter),
this licensing arrangement has been endorsed by the contributor, and it is
therefore unnecessary to ask the contributor again to confirm it.
I have not asked any contributors (or their employers, if they have them)
for proofs that they have the right to distribute their software in this way.
History: History:

View file

@ -0,0 +1,71 @@
/*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
/**
* @test
* @bug 7160610
* @summary Unknown Native Code compilation issue.
*
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-OptimizeFill Test7160610
*/
public class Test7160610 {
private static final byte[] BYTE_ARRAY = new byte[7];
private static int[] anIntArray1190 = new int[32768];
private static int[] anIntArray1191 = new int[32768];
public static void main(String arg[]) {
int i = 256;
for(int j = BYTE_ARRAY[2]; j < anIntArray1190.length; j++) {
anIntArray1190[j] = BYTE_ARRAY[2];
}
for(int k = BYTE_ARRAY[2]; (k ^ BYTE_ARRAY[1]) > -5001; k++) {
int i1 = (int)(Math.random() * 128D * (double)i);
anIntArray1190[i1] = (int)(Math.random() * 256D);
}
for(int l = BYTE_ARRAY[2]; (l ^ BYTE_ARRAY[1]) > -21; l++) {
for(int j1 = BYTE_ARRAY[0]; j1 < i + -BYTE_ARRAY[0]; j1++) {
for(int k1 = BYTE_ARRAY[0]; (k1 ^ BYTE_ARRAY[1]) > -128; k1++) {
int l1 = k1 - -(j1 << 0x26cb6487);
anIntArray1191[l1] = (anIntArray1190[l1 + -BYTE_ARRAY[0]] - -anIntArray1190[l1 - -BYTE_ARRAY[0]] - -anIntArray1190[-128 + l1] - -anIntArray1190[128 + l1]) / BYTE_ARRAY[6];
}
}
int ai[] = anIntArray1190;
anIntArray1190 = anIntArray1191;
anIntArray1191 = ai;
}
}
static {
BYTE_ARRAY[6] = 4;
BYTE_ARRAY[5] = 5;
BYTE_ARRAY[4] = 3;
BYTE_ARRAY[3] = 2;
BYTE_ARRAY[2] = 0;
BYTE_ARRAY[1] = -1;
BYTE_ARRAY[0] = 1;
}
}

View file

@ -0,0 +1,38 @@
/*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
/*
* Note that in the run command below the only important flag is PrintCommandLineFlags.
* The others are just flags of all types; bool, intx, uintx, uint64_t, double and ccstr.
*
* @test PrintAsFlag
* @summary verify that Flag::print_as_flag() works correctly. This is used by "jinfo -flag" and -XX:+PrintCommandLineFlags.
* @run main/othervm -XX:+PrintCommandLineFlags -XX:-ShowMessageBoxOnError -XX:BiasedLockingStartupDelay=4000 -XX:ParallelGCThreads=4 -XX:MaxRAM=1G -XX:CMSSmallCoalSurplusPercent=1.05 -XX:ErrorFile="file" PrintAsFlag
*/
public class PrintAsFlag {
public static void main(String... args) {
System.out.printf("Done");
}
}

View file

@ -159,3 +159,5 @@ f3244c1f04864d35c41fa8d13669faf4f65b81e2 jdk8-b28
e187f3ede64965dc2979df9a211107cd3d38eacb jdk8-b35 e187f3ede64965dc2979df9a211107cd3d38eacb jdk8-b35
cfd288fe1d3e2b700838342e70d71d44ac991af5 jdk8-b36 cfd288fe1d3e2b700838342e70d71d44ac991af5 jdk8-b36
90204bfab4e2bed402badcc997cbf8446ab5669f jdk8-b37 90204bfab4e2bed402badcc997cbf8446ab5669f jdk8-b37
5bbe0cb6f2f2d7ce292da77bf4fa9d618d770a78 jdk8-b38
f95fdbe525c88ef0d57dc1390be6582a8af5e07c jdk8-b39

View file

@ -159,3 +159,5 @@ f1d020a49c8c33667fb10c8caa255206a78a3675 jdk8-b34
e8afc16522e190cb93c66bcb15d6fba0fe9e6833 jdk8-b35 e8afc16522e190cb93c66bcb15d6fba0fe9e6833 jdk8-b35
89b36c658e39f0a2957be55453a3a3befd9c8a6b jdk8-b36 89b36c658e39f0a2957be55453a3a3befd9c8a6b jdk8-b36
b05a948db1b6c933c980f24e4dc8fd897b7cf4ef jdk8-b37 b05a948db1b6c933c980f24e4dc8fd897b7cf4ef jdk8-b37
ac1ba3b56775e3cdcd91b7a48793b59f6a3c18b5 jdk8-b38
7f6b44fd303478caa83575dbc225de187c509c50 jdk8-b39

View file

@ -160,3 +160,5 @@ ddfe5562f61f54ed2121ac0c73b688b94f3e66b5 jdk8-b32
45da9cb055ee258dc09e69c1718e27eadea38e45 jdk8-b36 45da9cb055ee258dc09e69c1718e27eadea38e45 jdk8-b36
9e82ac15ab80370d6e021aea7b98c7c9626adb5e jdk8-b37 9e82ac15ab80370d6e021aea7b98c7c9626adb5e jdk8-b37
c45f3509a70796c54b48f32910d1caf435763416 jdk8-b38 c45f3509a70796c54b48f32910d1caf435763416 jdk8-b38
b6f52911752110a2889681923992c7a0baa52ccc jdk8-b39
b88fc3359dc7edabfa8a228855d8cebf8843c055 jdk8-b40

View file

@ -65,12 +65,8 @@ FILES_export = \
com/apple/laf/ScreenMenuPropertyHandler.java \ com/apple/laf/ScreenMenuPropertyHandler.java \
com/apple/laf/ScreenMenuPropertyListener.java com/apple/laf/ScreenMenuPropertyListener.java
#RESOURCE_BUNDLES_COMPILED_PROPERTIES += \ RESOURCE_BUNDLES_COMPILED_PROPERTIES += \
# com/apple/laf/resources/aqua.properties \ com/apple/laf/resources/aqua.properties
# com/apple/laf/resources/aqua_de.properties \
# com/apple/laf/resources/aqua_fr.properties \
# com/apple/laf/resources/aqua_ja.properties
# #
# Rules # Rules

View file

@ -156,6 +156,7 @@ JDK_MAN_PAGES = \
jstack.1 \ jstack.1 \
jstat.1 \ jstat.1 \
jstatd.1 \ jstatd.1 \
jvisualvm.1 \
native2ascii.1 \ native2ascii.1 \
rmic.1 \ rmic.1 \
schemagen.1 \ schemagen.1 \
@ -1311,8 +1312,8 @@ $(TEMP_PREV_JDK_COMPARISON): install-previous-jdk $(DIRDIFF_JARFILE)
@$(java-vm-cleanup) @$(java-vm-cleanup)
# Clean up names in the messages printed out # Clean up names in the messages printed out
CAT_FILTER = $(SED) -e "s@$(JDK_IMAGE_DIR)@JDK_IMAGE@g" \ CAT_FILTER = $(SED) -e "s|$(JDK_IMAGE_DIR)|JDK_IMAGE|g" \
-e "s@$(JRE_IMAGE_DIR)@JRE_IMAGE@g" -e "s|$(JRE_IMAGE_DIR)|JRE_IMAGE|g"
# Report on the jre image comparison # Report on the jre image comparison
compare-image-jre: $(TEMP_PREV_JRE_COMPARISON) compare-image-jre: $(TEMP_PREV_JRE_COMPARISON)

View file

@ -197,6 +197,10 @@ $(GENSRCDIR)/%.java: $(SHARE_SRC)/classes/%.properties
$(add-property-java-file) $(add-property-java-file)
$(GENSRCDIR)/%.java: $(GENSRCDIR)/%.properties $(GENSRCDIR)/%.java: $(GENSRCDIR)/%.properties
$(add-property-java-file) $(add-property-java-file)
ifdef PLATFORM_SRC_MACOS
$(GENSRCDIR)/%.java: $(PLATFORM_SRC_MACOS)/classes/%.properties
$(add-property-java-file)
endif
ifndef OPENJDK ifndef OPENJDK
$(GENSRCDIR)/%.java: $(CLOSED_PLATFORM_SRC)/classes/%.properties $(GENSRCDIR)/%.java: $(CLOSED_PLATFORM_SRC)/classes/%.properties
$(add-property-java-file) $(add-property-java-file)

View file

@ -30,6 +30,7 @@ import java.awt.image.BufferedImage;
import javax.swing.*; import javax.swing.*;
import javax.swing.border.Border; import javax.swing.border.Border;
import javax.swing.plaf.UIResource;
import javax.swing.plaf.basic.BasicHTML; import javax.swing.plaf.basic.BasicHTML;
import javax.swing.text.View; import javax.swing.text.View;
@ -76,8 +77,11 @@ public abstract class AquaButtonLabeledUI extends AquaButtonToggleUI implements
protected void setThemeBorder(final AbstractButton b) { protected void setThemeBorder(final AbstractButton b) {
super.setThemeBorder(b); super.setThemeBorder(b);
// Set the correct border Border border = b.getBorder();
b.setBorder(AquaButtonBorder.getBevelButtonBorder()); if (border == null || border instanceof UIResource) {
// Set the correct border
b.setBorder(AquaButtonBorder.getBevelButtonBorder());
}
} }
protected abstract AquaButtonBorder getPainter(); protected abstract AquaButtonBorder getPainter();

View file

@ -250,6 +250,7 @@ public class AquaLookAndFeel extends BasicLookAndFeel {
*/ */
private void initResourceBundle(final UIDefaults table) { private void initResourceBundle(final UIDefaults table) {
table.setDefaultLocale(Locale.getDefault()); table.setDefaultLocale(Locale.getDefault());
table.addResourceBundle(PKG_PREFIX + "resources.aqua");
try { try {
final ResourceBundle aquaProperties = MacOSXResourceBundle.getMacResourceBundle(PKG_PREFIX + "resources.aqua"); final ResourceBundle aquaProperties = MacOSXResourceBundle.getMacResourceBundle(PKG_PREFIX + "resources.aqua");
final Enumeration<String> propertyKeys = aquaProperties.getKeys(); final Enumeration<String> propertyKeys = aquaProperties.getKeys();
@ -259,7 +260,6 @@ public class AquaLookAndFeel extends BasicLookAndFeel {
table.put(key, aquaProperties.getString(key)); table.put(key, aquaProperties.getString(key));
} }
} catch (final Exception e) { } catch (final Exception e) {
table.addResourceBundle(PKG_PREFIX + "resources.aqua");
} }
} }

View file

@ -318,7 +318,7 @@ public class AquaTabbedPaneUI extends AquaTabbedPaneCopyFromBasicUI {
} }
// not for the scrolling tabs // not for the scrolling tabs
if (tabIndex >= 0) { if (component == null && tabIndex >= 0) {
paintTitle(g2d, font, metrics, textRect, tabIndex, title); paintTitle(g2d, font, metrics, textRect, tabIndex, title);
} }

View file

@ -36,45 +36,45 @@
# support. # support.
############ FILE CHOOSER STRINGS ############# ############ FILE CHOOSER STRINGS #############
FileChooser.fileDescriptionText=Generic File FileChooser.fileDescription.textAndMnemonic=Generic File
FileChooser.directoryDescriptionText=Directory FileChooser.directoryDescription.textAndMnemonic=Directory
FileChooser.newFolderErrorText=Error occured during folder creation FileChooser.newFolderError.textAndMnemonic=Error occured during folder creation
FileChooser.newFolderErrorSeparator= : FileChooser.newFolderErrorSeparator= :
FileChooser.acceptAllFileFilterText=All Files FileChooser.acceptAllFileFilter.textAndMnemonic=All Files
FileChooser.cancelButtonText=Cancel FileChooser.cancelButton.textAndMnemonic=Cancel
FileChooser.saveButtonText=Save FileChooser.saveButton.textAndMnemonic=Save
FileChooser.openButtonText=Open FileChooser.openButton.textAndMnemonic=Open
FileChooser.saveDialogTitleText=Save FileChooser.saveDialogTitle.textAndMnemonic=Save
FileChooser.openDialogTitleText=Open FileChooser.openDialogTitle.textAndMnemonic=Open
FileChooser.updateButtonText=Update FileChooser.updateButton.textAndMnemonic=Update
FileChooser.helpButtonText=Help FileChooser.helpButton.textAndMnemonic=Help
FileChooser.directoryOpenButtonText=Open FileChooser.directoryOpenButton.textAndMnemonic=Open
# File Size Units # File Size Units
FileChooser.fileSizeKiloBytes={0} KB FileChooser.fileSizeKiloBytes={0} KB
FileChooser.fileSizeMegaBytes={0} MB FileChooser.fileSizeMegaBytes={0} MB
FileChooser.fileSizeGigaBytes={0} GB FileChooser.fileSizeGigaBytes={0} GB
// Mac-specific strings # Mac-specific strings
FileChooser.saveTitleText=Save FileChooser.saveTitle.textAndMnemonic=Save
FileChooser.openTitleText=Open FileChooser.openTitle.textAndMnemonic=Open
FileChooser.newFolderExistsErrorText=That name is already taken FileChooser.newFolderExistsError.textAndMnemonic=That name is already taken
FileChooser.chooseButtonText=Choose FileChooser.chooseButton.textAndMnemonic=Choose
FileChooser.newFolderButtonText=New Folder FileChooser.newFolderButton.textAndMnemonic=New Folder
FileChooser.newFolderTitleText=New Folder FileChooser.newFolderTitle.textAndMnemonic=New Folder
FileChooser.fileNameLabelText=File: FileChooser.fileNameLabel.textAndMnemonic=File:
FileChooser.saveDialogFileNameLabelText=Save As: FileChooser.saveDialogFileNameLabel.textAndMnemonic=Save As:
FileChooser.filesOfTypeLabelText=File Format: FileChooser.filesOfTypeLabel.textAndMnemonic=File Format:
FileChooser.desktopName=Desktop FileChooser.desktopName=Desktop
FileChooser.newFolderPromptText=Name of new folder: FileChooser.newFolderPrompt.textAndMnemonic=Name of new folder:
FileChooser.untitledFolderName=untitled folder FileChooser.untitledFolderName=untitled folder
FileChooser.untitledFileName=untitled FileChooser.untitledFileName=untitled
FileChooser.createButtonText=Create FileChooser.createButton.textAndMnemonic=Create
FileChooser.byDateText=Date Modified FileChooser.byDate.textAndMnemonic=Date Modified
FileChooser.byNameText=Name FileChooser.by.textAndMnemonic=Name
FileChooser.newFolderAccessibleName=New Folder FileChooser.newFolderAccessibleName=New Folder
FileChooser.mac.newFolder=untitled folder FileChooser.mac.newFolder=untitled folder
@ -82,76 +82,54 @@ FileChooser.mac.newFolder.subsequent=untitled folder {0}
############ COLOR CHOOSER STRINGS ############# ############ COLOR CHOOSER STRINGS #############
ColorChooser.previewText=Preview ColorChooser.preview.textAndMnemonic=Preview
ColorChooser.okText=OK ColorChooser.ok.textAndMnemonic=OK
ColorChooser.cancelText=Cancel ColorChooser.cancel.textAndMnemonic=Cancel
ColorChooser.resetText=Reset ColorChooser.reset.textAndMnemonic=&Reset
# VK_XXX constant for 'ColorChooser.resetText' button to make mnemonic ColorChooser.sample.textAndMnemonic=Sample Text Sample Text
ColorChooser.resetMnemonic=82 ColorChooser.swatches.textAndMnemonic=&Swatches
ColorChooser.sampleText=Sample Text Sample Text ColorChooser.swatchesRecent.textAndMnemonic=Recent:
ColorChooser.swatchesNameText=Swatches ColorChooser.hsb.textAndMnemonic=&HSB
ColorChooser.swatchesMnemonic=83 ColorChooser.hsbHue.textAndMnemonic=H
ColorChooser.swatchesDisplayedMnemonicIndex=0 ColorChooser.hsbSaturation.textAndMnemonic=S
ColorChooser.swatchesRecentText=Recent: ColorChooser.hsbBrightness.textAndMnemonic=B
ColorChooser.hsbNameText=HSB ColorChooser.hsbRed.textAndMnemonic=R
# Each of the ColorChooser types can define a mnemonic, as a KeyEvent.VK_XXX ColorChooser.hsbGreen.textAndMnemonic=G
# constant, and an index into the text to render the mnemonic as. The ColorChooser.hsbBlue.textAndMnemonic=B
# mnemonic is xxxMnemonic and the index of the character to underline is ColorChooser.rgb.textAndMnemonic=R&GB
# xxxDisplayedMnemonicIndex. ColorChooser.rgbRed.textAndMnemonic=Re&d
ColorChooser.hsbMnemonic=72 ColorChooser.rgbGreen.textAndMnemonic=Gree&n
ColorChooser.hsbDisplayedMnemonicIndex=0 ColorChooser.rgbBlue.textAndMnemonic=&Blue
ColorChooser.hsbHueText=H
ColorChooser.hsbSaturationText=S
ColorChooser.hsbBrightnessText=B
ColorChooser.hsbRedText=R
ColorChooser.hsbGreenText=G
ColorChooser.hsbBlueText=B
ColorChooser.rgbNameText=RGB
ColorChooser.rgbMnemonic=71
ColorChooser.rgbDisplayedMnemonicIndex=1
ColorChooser.rgbRedText=Red
ColorChooser.rgbRedMnemonic=68
ColorChooser.rgbGreenText=Green
ColorChooser.rgbGreenMnemonic=78
ColorChooser.rgbBlueText=Blue
ColorChooser.rgbBlueMnemonic=66
############ OPTION PANE STRINGS ############# ############ OPTION PANE STRINGS #############
# Mnemonic keys correspond to KeyEvent.VK_XXX constant
# We only define mnemonics for YES/NO, but for completeness you can # We only define mnemonics for YES/NO, but for completeness you can
# define mnemonics for any of the buttons. # define mnemonics for any of the buttons.
OptionPane.yesButtonText=Yes OptionPane.yesButton.textAndMnemonic=&Yes
OptionPane.yesButtonMnemonic=89 OptionPane.noButton.textAndMnemonic=&No
OptionPane.noButtonText=No OptionPane.okButton.textAndMnemonic=OK
OptionPane.noButtonMnemonic=78 OptionPane.cancelButton.textAndMnemonic=Cancel
OptionPane.okButtonText=OK OptionPane.title.textAndMnemonic=Select an Option
OptionPane.okButtonMnemonic=0
OptionPane.cancelButtonText=Cancel
OptionPane.cancelButtonMnemonic=0
OptionPane.titleText=Select an Option
# Title for the dialog for the showInputDialog methods. Only used if # Title for the dialog for the showInputDialog methods. Only used if
# the developer uses one of the variants that doesn't take a title. # the developer uses one of the variants that doesn't take a title.
OptionPane.inputDialogTitle=Input OptionPane.inputDialog.titleAndMnemonic=Input
# Title for the dialog for the showMessageDialog methods. Only used if # Title for the dialog for the showMessageDialog methods. Only used if
# the developer uses one of the variants that doesn't take a title. # the developer uses one of the variants that doesn't take a title.
OptionPane.messageDialogTitle=Message OptionPane.messageDialog.titleAndMnemonic=Message
############ Printing Dialog Strings ############ ############ Printing Dialog Strings ############
PrintingDialog.titleProgressText=Printing PrintingDialog.titleProgress.textAndMnemonic=Printing
PrintingDialog.titleAbortingText=Printing (Aborting) PrintingDialog.titleAborting.textAndMnemonic=Printing (Aborting)
PrintingDialog.contentInitialText=Printing in progress... PrintingDialog.contentInitial.textAndMnemonic=Printing in progress...
# The following string will be formatted by a MessageFormat # The following string will be formatted by a MessageFormat
# and {0} will be replaced by page number being printed # and {0} will be replaced by page number being printed
PrintingDialog.contentProgressText=Printed page {0}... PrintingDialog.contentProgress.textAndMnemonic=Printed page {0}...
PrintingDialog.contentAbortingText=Printing aborting... PrintingDialog.contentAborting.textAndMnemonic=Printing aborting...
PrintingDialog.abortButtonText=Abort PrintingDialog.abortButton.textAndMnemonic=&Abort
PrintingDialog.abortButtonMnemonic=65 PrintingDialog.abortButtonToolTip.textAndMnemonic=Abort Printing
PrintingDialog.abortButtonDisplayedMnemonicIndex=0
PrintingDialog.abortButtonToolTipText=Abort Printing
############ Internal Frame Strings ############ ############ Internal Frame Strings ############
InternalFrame.iconButtonToolTip=Minimize InternalFrame.iconButtonToolTip=Minimize
@ -160,42 +138,42 @@ InternalFrame.restoreButtonToolTip=Restore
InternalFrame.closeButtonToolTip=Close InternalFrame.closeButtonToolTip=Close
############ Internal Frame Title Pane Strings ############ ############ Internal Frame Title Pane Strings ############
InternalFrameTitlePane.restoreButtonText=Restore InternalFrameTitlePane.restoreButton.textAndMnemonic=Restore
InternalFrameTitlePane.moveButtonText=Move InternalFrameTitlePane.moveButton.textAndMnemonic=Move
InternalFrameTitlePane.sizeButtonText=Size InternalFrameTitlePane.sizeButton.textAndMnemonic=Size
InternalFrameTitlePane.minimizeButtonText=Minimize InternalFrameTitlePane.minimizeButton.textAndMnemonic=Minimize
InternalFrameTitlePane.maximizeButtonText=Maximize InternalFrameTitlePane.maximizeButton.textAndMnemonic=Maximize
InternalFrameTitlePane.closeButtonText=Close InternalFrameTitlePane.closeButton.textAndMnemonic=Close
############ Text strings ############# ############ Text strings #############
# Used for html forms # Used for html forms
FormView.submitButtonText=Submit Query FormView.submitButton.textAndMnemonic=Submit Query
FormView.resetButtonText=Reset FormView.resetButton.textAndMnemonic=Reset
FormView.browseFileButtonText=Browse... FormView.browseFileButton.textAndMnemonic=Browse...
############ Abstract Document Strings ############ ############ Abstract Document Strings ############
AbstractDocument.styleChangeText=style change AbstractDocument.styleChange.textAndMnemonic=style change
AbstractDocument.additionText=addition AbstractDocument.addition.textAndMnemonic=addition
AbstractDocument.deletionText=deletion AbstractDocument.deletion.textAndMnemonic=deletion
AbstractDocument.undoText=Undo AbstractDocument.undo.textAndMnemonic=Undo
AbstractDocument.redoText=Redo AbstractDocument.redo.textAndMnemonic=Redo
############ Abstract Button Strings ############ ############ Abstract Button Strings ############
AbstractButton.clickText=click AbstractButton.click.textAndMnemonic=click
############ Abstract Undoable Edit Strings ############ ############ Abstract Undoable Edit Strings ############
AbstractUndoableEdit.undoText=Undo AbstractUndoableEdit.undo.textAndMnemonic=Undo
AbstractUndoableEdit.redoText=Redo AbstractUndoableEdit.redo.textAndMnemonic=Redo
############ Combo Box Strings ############ ############ Combo Box Strings ############
ComboBox.togglePopupText=togglePopup ComboBox.togglePopup.textAndMnemonic=togglePopup
############ Progress Monitor Strings ############ ############ Progress Monitor Strings ############
ProgressMonitor.progressText=Progress... ProgressMonitor.progress.textAndMnemonic=Progress...
############ Split Pane Strings ############ ############ Split Pane Strings ############
SplitPane.leftButtonText=left button SplitPane.leftButton.textAndMnemonic=left button
SplitPane.rightButtonText=right button SplitPane.rightButton.textAndMnemonic=right button
# Used for Isindex # Used for Isindex
IsindexView.prompt=This is a searchable index. Enter search keywords: IsindexView.prompt=This is a searchable index. Enter search keywords:

View file

@ -40,7 +40,7 @@ public class CGraphicsDevice extends GraphicsDevice {
private final int displayID; private final int displayID;
// Array of all GraphicsConfig instances for this device // Array of all GraphicsConfig instances for this device
private final CGraphicsConfig[] configs; private final GraphicsConfiguration[] configs;
// Default config (temporarily hard coded) // Default config (temporarily hard coded)
private final int DEFAULT_CONFIG = 0; private final int DEFAULT_CONFIG = 0;
@ -49,7 +49,7 @@ public class CGraphicsDevice extends GraphicsDevice {
public CGraphicsDevice(int displayID) { public CGraphicsDevice(int displayID) {
this.displayID = displayID; this.displayID = displayID;
configs = new CGraphicsConfig[] { configs = new GraphicsConfiguration[] {
CGLGraphicsConfig.getConfig(this, 0) CGLGraphicsConfig.getConfig(this, 0)
}; };
} }
@ -66,7 +66,7 @@ public class CGraphicsDevice extends GraphicsDevice {
*/ */
@Override @Override
public GraphicsConfiguration[] getConfigurations() { public GraphicsConfiguration[] getConfigurations() {
return configs; return configs.clone();
} }
/** /**

View file

@ -56,6 +56,8 @@ import sun.java2d.SunGraphics2D;
import sun.java2d.opengl.OGLRenderQueue; import sun.java2d.opengl.OGLRenderQueue;
import sun.java2d.pipe.Region; import sun.java2d.pipe.Region;
import sun.util.logging.PlatformLogger;
import javax.swing.JComponent; import javax.swing.JComponent;
import javax.swing.SwingUtilities; import javax.swing.SwingUtilities;
import javax.swing.RepaintManager; import javax.swing.RepaintManager;
@ -65,7 +67,10 @@ import sun.lwawt.macosx.CDropTarget;
import com.sun.java.swing.SwingUtilities3; import com.sun.java.swing.SwingUtilities3;
public abstract class LWComponentPeer<T extends Component, D extends JComponent> public abstract class LWComponentPeer<T extends Component, D extends JComponent>
implements ComponentPeer, DropTargetPeer { implements ComponentPeer, DropTargetPeer
{
private static final PlatformLogger focusLog = PlatformLogger.getLogger("sun.lwawt.focus.LWComponentPeer");
// State lock is to be used for modifications to this // State lock is to be used for modifications to this
// peer's fields (e.g. bounds, background, font, etc.) // peer's fields (e.g. bounds, background, font, etc.)
// It should be the last lock in the lock chain // It should be the last lock in the lock chain
@ -372,7 +377,7 @@ public abstract class LWComponentPeer<T extends Component, D extends JComponent>
} }
@Override @Override
public void dispose() { public final void dispose() {
if (disposed.compareAndSet(false, true)) { if (disposed.compareAndSet(false, true)) {
disposeImpl(); disposeImpl();
} }
@ -885,7 +890,13 @@ public abstract class LWComponentPeer<T extends Component, D extends JComponent>
@Override @Override
public boolean requestFocus(Component lightweightChild, boolean temporary, public boolean requestFocus(Component lightweightChild, boolean temporary,
boolean focusedWindowChangeAllowed, long time, boolean focusedWindowChangeAllowed, long time,
CausedFocusEvent.Cause cause) { CausedFocusEvent.Cause cause)
{
if (focusLog.isLoggable(PlatformLogger.FINEST)) {
focusLog.finest("lightweightChild=" + lightweightChild + ", temporary=" + temporary +
", focusedWindowChangeAllowed=" + focusedWindowChangeAllowed +
", time= " + time + ", cause=" + cause);
}
if (LWKeyboardFocusManagerPeer.getInstance(getAppContext()). if (LWKeyboardFocusManagerPeer.getInstance(getAppContext()).
processSynchronousLightweightTransfer(getTarget(), lightweightChild, temporary, processSynchronousLightweightTransfer(getTarget(), lightweightChild, temporary,
focusedWindowChangeAllowed, time)) { focusedWindowChangeAllowed, time)) {
@ -901,19 +912,44 @@ public abstract class LWComponentPeer<T extends Component, D extends JComponent>
case LWKeyboardFocusManagerPeer.SNFH_SUCCESS_PROCEED: case LWKeyboardFocusManagerPeer.SNFH_SUCCESS_PROCEED:
Window parentWindow = SunToolkit.getContainingWindow(getTarget()); Window parentWindow = SunToolkit.getContainingWindow(getTarget());
if (parentWindow == null) { if (parentWindow == null) {
focusLog.fine("request rejected, parentWindow is null");
LWKeyboardFocusManagerPeer.removeLastFocusRequest(getTarget()); LWKeyboardFocusManagerPeer.removeLastFocusRequest(getTarget());
return false; return false;
} }
LWWindowPeer parentPeer = (LWWindowPeer) parentWindow.getPeer(); LWWindowPeer parentPeer = (LWWindowPeer) parentWindow.getPeer();
if (parentPeer == null) { if (parentPeer == null) {
focusLog.fine("request rejected, parentPeer is null");
LWKeyboardFocusManagerPeer.removeLastFocusRequest(getTarget()); LWKeyboardFocusManagerPeer.removeLastFocusRequest(getTarget());
return false; return false;
} }
// A fix for 7145768. Ensure the parent window is currently natively focused.
// The more evident place to perform this check is in KFM.shouldNativelyFocusHeavyweight,
// however that is the shared code and this particular problem's reproducibility has
// platform specifics. So, it was decided to narrow down the fix to lwawt (OSX) in
// current release. TODO: consider fixing it in the shared code.
if (!focusedWindowChangeAllowed) {
LWWindowPeer decoratedPeer = parentPeer.isSimpleWindow() ?
LWWindowPeer.getOwnerFrameDialog(parentPeer) : parentPeer;
if (decoratedPeer == null || !decoratedPeer.getPlatformWindow().isActive()) {
if (focusLog.isLoggable(PlatformLogger.FINE)) {
focusLog.fine("request rejected, focusedWindowChangeAllowed==false, " +
"decoratedPeer is inactive: " + decoratedPeer);
}
LWKeyboardFocusManagerPeer.removeLastFocusRequest(getTarget());
return false;
}
}
boolean res = parentPeer.requestWindowFocus(cause); boolean res = parentPeer.requestWindowFocus(cause);
// If parent window can be made focused and has been made focused (synchronously) // If parent window can be made focused and has been made focused (synchronously)
// then we can proceed with children, otherwise we retreat // then we can proceed with children, otherwise we retreat
if (!res || !parentWindow.isFocused()) { if (!res || !parentWindow.isFocused()) {
if (focusLog.isLoggable(PlatformLogger.FINE)) {
focusLog.fine("request rejected, res= " + res + ", parentWindow.isFocused()=" +
parentWindow.isFocused());
}
LWKeyboardFocusManagerPeer.removeLastFocusRequest(getTarget()); LWKeyboardFocusManagerPeer.removeLastFocusRequest(getTarget());
return false; return false;
} }
@ -940,8 +976,8 @@ public abstract class LWComponentPeer<T extends Component, D extends JComponent>
@Override @Override
public Image createImage(int w, int h) { public Image createImage(int w, int h) {
// TODO: accelerated image CGraphicsConfig gc = (CGraphicsConfig)getGraphicsConfiguration();
return getGraphicsConfiguration().createCompatibleImage(w, h); return gc.createAcceleratedImage(getTarget(), w, h);
} }
@Override @Override

View file

@ -88,20 +88,20 @@ public abstract class LWCursorManager {
} else { } else {
cursor = (c != null) ? c.getCursor() : null; cursor = (c != null) ? c.getCursor() : null;
} }
// TODO: default cursor for modal blocked windows
setCursor(cursor); setCursor(cursor);
} }
/** /**
* Returns the first visible, enabled and showing component under cursor. * Returns the first visible, enabled and showing component under cursor.
* Returns null for modal blocked windows.
* *
* @param cursorPos Current cursor position. * @param cursorPos Current cursor position.
* @return Component * @return Component or null.
*/ */
private static final Component findComponent(final Point cursorPos) { private static final Component findComponent(final Point cursorPos) {
final LWComponentPeer<?, ?> peer = LWWindowPeer.getPeerUnderCursor(); final LWComponentPeer<?, ?> peer = LWWindowPeer.getPeerUnderCursor();
Component c = null; Component c = null;
if (peer != null) { if (peer != null && peer.getWindowPeerOrSelf().getBlocker() == null) {
c = peer.getTarget(); c = peer.getTarget();
if (c instanceof Container) { if (c instanceof Container) {
final Point p = peer.getLocationOnScreen(); final Point p = peer.getLocationOnScreen();

View file

@ -81,6 +81,18 @@ abstract class LWTextComponentPeer<T extends TextComponent, D extends JComponent
firstChangeSkipped = true; firstChangeSkipped = true;
} }
@Override
protected final void disposeImpl() {
synchronized (getDelegateLock()) {
// visible caret has a timer thread which must be stopped
getTextComponent().getCaret().setVisible(false);
}
super.disposeImpl();
}
/**
* This method should be called under getDelegateLock().
*/
abstract JTextComponent getTextComponent(); abstract JTextComponent getTextComponent();
public Dimension getPreferredSize(final int rows, final int columns) { public Dimension getPreferredSize(final int rows, final int columns) {

View file

@ -50,7 +50,7 @@ public class LWWindowPeer
EMBEDDEDFRAME EMBEDDEDFRAME
} }
private static final sun.util.logging.PlatformLogger focusLog = PlatformLogger.getLogger("sun.lwawt.focus.LWWindowPeer"); private static final PlatformLogger focusLog = PlatformLogger.getLogger("sun.lwawt.focus.LWWindowPeer");
private PlatformWindow platformWindow; private PlatformWindow platformWindow;
@ -101,8 +101,6 @@ public class LWWindowPeer
// events between MOUSE_PRESSED and MOUSE_RELEASED for particular button // events between MOUSE_PRESSED and MOUSE_RELEASED for particular button
private static int mouseClickButtons = 0; private static int mouseClickButtons = 0;
private volatile boolean cachedFocusableWindow;
private volatile boolean isOpaque = true; private volatile boolean isOpaque = true;
private static final Font DEFAULT_FONT = new Font("Lucida Grande", Font.PLAIN, 13); private static final Font DEFAULT_FONT = new Font("Lucida Grande", Font.PLAIN, 13);
@ -172,8 +170,6 @@ public class LWWindowPeer
setAlwaysOnTop(getTarget().isAlwaysOnTop()); setAlwaysOnTop(getTarget().isAlwaysOnTop());
updateMinimumSize(); updateMinimumSize();
cachedFocusableWindow = getTarget().isFocusableWindow();
setOpacity(getTarget().getOpacity()); setOpacity(getTarget().getOpacity());
setOpaque(getTarget().isOpaque()); setOpaque(getTarget().isOpaque());
@ -245,15 +241,17 @@ public class LWWindowPeer
getInstance(getAppContext()); getInstance(getAppContext());
if (visible) { if (visible) {
updateFocusableWindowState(); if (!getTarget().isAutoRequestFocus()) {
changeFocusedWindow(true, true); return;
} else {
requestWindowFocus(CausedFocusEvent.Cause.ACTIVATION);
}
// Focus the owner in case this window is focused. // Focus the owner in case this window is focused.
} else if (manager.getCurrentFocusedWindow() == getTarget()) { } else if (manager.getCurrentFocusedWindow() == getTarget()) {
// Transfer focus to the owner.
LWWindowPeer owner = getOwnerFrameDialog(LWWindowPeer.this); LWWindowPeer owner = getOwnerFrameDialog(LWWindowPeer.this);
if (owner != null) { if (owner != null) {
// KFM will do all the rest. owner.requestWindowFocus(CausedFocusEvent.Cause.ACTIVATION);
owner.changeFocusedWindow(true, false);
} }
} }
} }
@ -400,7 +398,6 @@ public class LWWindowPeer
@Override @Override
public void updateFocusableWindowState() { public void updateFocusableWindowState() {
cachedFocusableWindow = getTarget().isFocusableWindow();
platformWindow.updateFocusableWindowState(); platformWindow.updateFocusableWindowState();
} }
@ -409,6 +406,8 @@ public class LWWindowPeer
synchronized (getPeerTreeLock()) { synchronized (getPeerTreeLock()) {
this.blocker = blocked ? (LWWindowPeer)blocker.getPeer() : null; this.blocker = blocked ? (LWWindowPeer)blocker.getPeer() : null;
} }
platformWindow.setModalBlocked(blocked);
} }
@Override @Override
@ -617,7 +616,7 @@ public class LWWindowPeer
} }
public void notifyActivation(boolean activation) { public void notifyActivation(boolean activation) {
changeFocusedWindow(activation, false); changeFocusedWindow(activation);
} }
// MouseDown in non-client area // MouseDown in non-client area
@ -1063,6 +1062,10 @@ public class LWWindowPeer
return lastMouseEventPeer; return lastMouseEventPeer;
} }
/*
* Requests platform to set native focus on a frame/dialog.
* In case of a simple window, triggers appropriate java focus change.
*/
public boolean requestWindowFocus(CausedFocusEvent.Cause cause) { public boolean requestWindowFocus(CausedFocusEvent.Cause cause) {
if (focusLog.isLoggable(PlatformLogger.FINE)) { if (focusLog.isLoggable(PlatformLogger.FINE)) {
focusLog.fine("requesting native focus to " + this); focusLog.fine("requesting native focus to " + this);
@ -1106,14 +1109,14 @@ public class LWWindowPeer
} }
// DKFM will synthesize all the focus/activation events correctly. // DKFM will synthesize all the focus/activation events correctly.
changeFocusedWindow(true, false); changeFocusedWindow(true);
return true; return true;
// In case the toplevel is active but not focused, change focus directly, // In case the toplevel is active but not focused, change focus directly,
// as requesting native focus on it will not have effect. // as requesting native focus on it will not have effect.
} else if (getTarget() == currentActive && !getTarget().hasFocus()) { } else if (getTarget() == currentActive && !getTarget().hasFocus()) {
changeFocusedWindow(true, false); changeFocusedWindow(true);
return true; return true;
} }
return platformWindow.requestWindowFocus(); return platformWindow.requestWindowFocus();
@ -1122,7 +1125,19 @@ public class LWWindowPeer
private boolean focusAllowedFor() { private boolean focusAllowedFor() {
Window window = getTarget(); Window window = getTarget();
// TODO: check if modal blocked // TODO: check if modal blocked
return window.isVisible() && window.isEnabled() && window.isFocusableWindow(); return window.isVisible() && window.isEnabled() && isFocusableWindow();
}
private boolean isFocusableWindow() {
boolean focusable = getTarget().isFocusableWindow();
if (isSimpleWindow()) {
LWWindowPeer ownerPeer = getOwnerFrameDialog(this);
if (ownerPeer == null) {
return false;
}
return focusable && ownerPeer.getTarget().isFocusableWindow();
}
return focusable;
} }
public boolean isSimpleWindow() { public boolean isSimpleWindow() {
@ -1131,19 +1146,19 @@ public class LWWindowPeer
} }
/* /*
* "Delegates" the responsibility of managing focus to keyboard focus manager. * Changes focused window on java level.
*/ */
private void changeFocusedWindow(boolean becomesFocused, boolean isShowing) { private void changeFocusedWindow(boolean becomesFocused) {
if (focusLog.isLoggable(PlatformLogger.FINE)) { if (focusLog.isLoggable(PlatformLogger.FINE)) {
focusLog.fine((becomesFocused?"gaining":"loosing") + " focus window: " + this); focusLog.fine((becomesFocused?"gaining":"loosing") + " focus window: " + this);
} }
if (isShowing && !getTarget().isAutoRequestFocus() || skipNextFocusChange) { if (skipNextFocusChange) {
focusLog.fine("skipping focus change"); focusLog.fine("skipping focus change");
skipNextFocusChange = false; skipNextFocusChange = false;
return; return;
} }
if (!isFocusableWindow() && becomesFocused) {
if (!cachedFocusableWindow) { focusLog.fine("the window is not focusable");
return; return;
} }
if (becomesFocused) { if (becomesFocused) {
@ -1182,7 +1197,7 @@ public class LWWindowPeer
postEvent(windowEvent); postEvent(windowEvent);
} }
private static LWWindowPeer getOwnerFrameDialog(LWWindowPeer peer) { static LWWindowPeer getOwnerFrameDialog(LWWindowPeer peer) {
Window owner = (peer != null ? peer.getTarget().getOwner() : null); Window owner = (peer != null ? peer.getTarget().getOwner() : null);
while (owner != null && !(owner instanceof Frame || owner instanceof Dialog)) { while (owner != null && !(owner instanceof Frame || owner instanceof Dialog)) {
owner = owner.getOwner(); owner = owner.getOwner();

View file

@ -108,6 +108,8 @@ public interface PlatformWindow {
public void flip(int x1, int y1, int x2, int y2, public void flip(int x1, int y1, int x2, int y2,
BufferCapabilities.FlipContents flipAction); BufferCapabilities.FlipContents flipAction);
public void setModalBlocked(boolean blocked);
public void toFront(); public void toFront();
public void toBack(); public void toBack();

View file

@ -112,28 +112,19 @@ public class CEmbeddedFrame extends EmbeddedFrame {
public void handleFocusEvent(boolean focused) { public void handleFocusEvent(boolean focused) {
this.focused = focused; this.focused = focused;
updateOverlayWindowActiveState(); if (parentWindowActive) {
responder.handleWindowFocusEvent(focused);
}
} }
public void handleWindowFocusEvent(boolean parentWindowActive) { public void handleWindowFocusEvent(boolean parentWindowActive) {
this.parentWindowActive = parentWindowActive; this.parentWindowActive = parentWindowActive;
updateOverlayWindowActiveState(); if (focused) {
responder.handleWindowFocusEvent(parentWindowActive);
}
} }
public boolean isParentWindowActive() { public boolean isParentWindowActive() {
return parentWindowActive; return parentWindowActive;
} }
/*
* May change appearance of contents of window, and generate a
* WINDOW_ACTIVATED event.
*/
private void updateOverlayWindowActiveState() {
final boolean showAsFocused = parentWindowActive && focused;
dispatchEvent(
new FocusEvent(this, showAsFocused ?
FocusEvent.FOCUS_GAINED :
FocusEvent.FOCUS_LOST));
}
} }

View file

@ -34,6 +34,7 @@ import java.util.List;
import java.io.*; import java.io.*;
import sun.awt.CausedFocusEvent.Cause; import sun.awt.CausedFocusEvent.Cause;
import sun.awt.AWTAccessor;
import sun.java2d.pipe.Region; import sun.java2d.pipe.Region;
class CFileDialog implements FileDialogPeer { class CFileDialog implements FileDialogPeer {
@ -53,33 +54,40 @@ class CFileDialog implements FileDialogPeer {
title = " "; title = " ";
} }
String userFileName = nativeRunFileDialog(title, String[] userFileNames = nativeRunFileDialog(title,
dialogMode, navigateApps, dialogMode,
target.isMultipleMode(),
navigateApps,
target.getFilenameFilter() != null, target.getFilenameFilter() != null,
target.getDirectory(), target.getDirectory(),
target.getFile()); target.getFile());
File file = null; String directory = null;
if (userFileName != null) { String file = null;
// the dialog wasn't cancelled File[] files = null;
file = new File(userFileName);
}
if (file != null) { if (userFileNames != null) {
// make sure directory always ends in '/' // the dialog wasn't cancelled
String parent = file.getParent(); int filesNumber = userFileNames.length;
if (!parent.endsWith(File.separator)) { files = new File[filesNumber];
parent = parent + File.separator; for (int i = 0; i < filesNumber; i++) {
files[i] = new File(userFileNames[i]);
} }
// store results back in component directory = files[0].getParent();
target.setDirectory(parent); // make sure directory always ends in '/'
target.setFile(file.getName()); if (!directory.endsWith(File.separator)) {
} else { directory = directory + File.separator;
// setting file name to null is how we tell }
// java client that user hit the cancel button
target.setFile(null); file = files[0].getName(); // pick any file
} }
// store results back in component
AWTAccessor.FileDialogAccessor accessor = AWTAccessor.getFileDialogAccessor();
accessor.setDirectory(target, directory);
accessor.setFile(target, file);
accessor.setFiles(target, files);
} finally { } finally {
// Java2 Dialog waits for hide to let show() return // Java2 Dialog waits for hide to let show() return
target.dispose(); target.dispose();
@ -133,8 +141,8 @@ class CFileDialog implements FileDialogPeer {
return ret; return ret;
} }
private native String nativeRunFileDialog(String title, int mode, private native String[] nativeRunFileDialog(String title, int mode,
boolean shouldNavigateApps, boolean hasFilenameFilter, boolean multipleMode, boolean shouldNavigateApps, boolean hasFilenameFilter,
String directory, String file); String directory, String file);
@Override @Override

View file

@ -205,4 +205,7 @@ public class CPlatformEmbeddedFrame implements PlatformWindow {
@Override @Override
public void setWindowState(int windowState) {} public void setWindowState(int windowState) {}
@Override
public void setModalBlocked(boolean blocked) {}
} }

View file

@ -204,4 +204,8 @@ final class CPlatformResponder {
} }
} }
} }
void handleWindowFocusEvent(boolean gained) {
peer.notifyActivation(gained);
}
} }

View file

@ -49,9 +49,9 @@ public class CPlatformView extends CFRetainedResource {
super(0, true); super(0, true);
} }
public void initialize(LWWindowPeer peer) { public void initialize(LWWindowPeer peer, CPlatformResponder responder) {
this.peer = peer; this.peer = peer;
this.responder = new CPlatformResponder(peer, false); this.responder = responder;
if (!LWCToolkit.getSunAwtDisableCALayers()) { if (!LWCToolkit.getSunAwtDisableCALayers()) {
this.windowLayer = new CGLLayer(peer); this.windowLayer = new CGLLayer(peer);

View file

@ -61,6 +61,7 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
private static native void nativeSetNSWindowMinimizedIcon(long nsWindowPtr, long nsImage); private static native void nativeSetNSWindowMinimizedIcon(long nsWindowPtr, long nsImage);
private static native void nativeSetNSWindowRepresentedFilename(long nsWindowPtr, String representedFilename); private static native void nativeSetNSWindowRepresentedFilename(long nsWindowPtr, String representedFilename);
private static native void nativeSetNSWindowSecurityWarningPositioning(long nsWindowPtr, double x, double y, float biasX, float biasY); private static native void nativeSetNSWindowSecurityWarningPositioning(long nsWindowPtr, double x, double y, float biasX, float biasY);
private static native void nativeSetEnabled(long nsWindowPtr, boolean isEnabled);
private static native void nativeSynthesizeMouseEnteredExitedEvents(long nsWindowPtr); private static native void nativeSynthesizeMouseEnteredExitedEvents(long nsWindowPtr);
private static native int nativeGetScreenNSWindowIsOn_AppKitThread(long nsWindowPtr); private static native int nativeGetScreenNSWindowIsOn_AppKitThread(long nsWindowPtr);
@ -207,6 +208,7 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
private boolean visible = false; // visibility status from native perspective private boolean visible = false; // visibility status from native perspective
private boolean undecorated; // initialized in getInitialStyleBits() private boolean undecorated; // initialized in getInitialStyleBits()
private Rectangle normalBounds = null; // not-null only for undecorated maximized windows private Rectangle normalBounds = null; // not-null only for undecorated maximized windows
private CPlatformResponder responder;
public CPlatformWindow(final PeerType peerType) { public CPlatformWindow(final PeerType peerType) {
super(0, true); super(0, true);
@ -231,8 +233,9 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
final long parentNSWindowPtr = (owner != null ? owner.getNSWindowPtr() : 0); final long parentNSWindowPtr = (owner != null ? owner.getNSWindowPtr() : 0);
String warningString = target.getWarningString(); String warningString = target.getWarningString();
responder = new CPlatformResponder(peer, false);
contentView = new CPlatformView(); contentView = new CPlatformView();
contentView.initialize(peer); contentView.initialize(peer, responder);
final long nativeWindowPtr = nativeCreateNSWindow(contentView.getAWTView(), styleBits, 0, 0, 0, 0); final long nativeWindowPtr = nativeCreateNSWindow(contentView.getAWTView(), styleBits, 0, 0, 0, 0);
setPtr(nativeWindowPtr); setPtr(nativeWindowPtr);
@ -311,6 +314,10 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
styleBits = SET(styleBits, NONACTIVATING, true); styleBits = SET(styleBits, NONACTIVATING, true);
} }
if (Window.Type.UTILITY.equals(target.getType())) {
styleBits = SET(styleBits, UTILITY, true);
}
if (target instanceof javax.swing.RootPaneContainer) { if (target instanceof javax.swing.RootPaneContainer) {
javax.swing.JRootPane rootpane = ((javax.swing.RootPaneContainer)target).getRootPane(); javax.swing.JRootPane rootpane = ((javax.swing.RootPaneContainer)target).getRootPane();
Object prop = null; Object prop = null;
@ -800,6 +807,15 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
// value when the native notification comes to us // value when the native notification comes to us
} }
@Override
public void setModalBlocked(boolean blocked) {
if (target.getModalExclusionType() == Dialog.ModalExclusionType.APPLICATION_EXCLUDE) {
return;
}
nativeSetEnabled(getNSWindowPtr(), !blocked);
}
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
// UTILITY METHODS // UTILITY METHODS
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
@ -851,7 +867,7 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
focusLogger.fine("the app is inactive, so the notification is ignored"); focusLogger.fine("the app is inactive, so the notification is ignored");
return; return;
} }
peer.notifyActivation(gained); responder.handleWindowFocusEvent(gained);
} }
private void deliverMoveResizeEvent(int x, int y, int width, int height) { private void deliverMoveResizeEvent(int x, int y, int width, int height) {

View file

@ -27,9 +27,9 @@ package sun.lwawt.macosx;
import sun.awt.datatransfer.ToolkitThreadBlockedHandler; import sun.awt.datatransfer.ToolkitThreadBlockedHandler;
// TODO:BG this class is really a NOOP right now, but should be filled in if needed.
final class CToolkitThreadBlockedHandler implements ToolkitThreadBlockedHandler { final class CToolkitThreadBlockedHandler implements ToolkitThreadBlockedHandler {
private final LWCToolkit toolkit = (LWCToolkit)java.awt.Toolkit.getDefaultToolkit();
public void lock() { public void lock() {
} }
@ -41,9 +41,10 @@ final class CToolkitThreadBlockedHandler implements ToolkitThreadBlockedHandler
} }
public void enter() { public void enter() {
toolkit.startNativeNestedEventLoop();
} }
public void exit() { public void exit() {
toolkit.stopNativeNestedEventLoop();
} }
} }

View file

@ -63,6 +63,10 @@ public class LWCToolkit extends LWToolkit {
private static native void initIDs(); private static native void initIDs();
static native void startNativeNestedEventLoop();
static native void stopNativeNestedEventLoop();
private static CInputMethodDescriptor sInputMethodDescriptor; private static CInputMethodDescriptor sInputMethodDescriptor;
static { static {

View file

@ -48,7 +48,6 @@
//#define IM_DEBUG TRUE //#define IM_DEBUG TRUE
//#define EXTRA_DEBUG //#define EXTRA_DEBUG
static BOOL shouldUsePressAndHold() { static BOOL shouldUsePressAndHold() {
static int shouldUsePressAndHold = -1; static int shouldUsePressAndHold = -1;
if (shouldUsePressAndHold != -1) return shouldUsePressAndHold; if (shouldUsePressAndHold != -1) return shouldUsePressAndHold;
@ -81,7 +80,7 @@ AWT_ASSERT_APPKIT_THREAD;
fEnablePressAndHold = shouldUsePressAndHold(); fEnablePressAndHold = shouldUsePressAndHold();
fInPressAndHold = NO; fInPressAndHold = NO;
fPAHNeedsToSelect = NO; fPAHNeedsToSelect = NO;
mouseIsOver = NO; mouseIsOver = NO;
if (windowLayer != nil) { if (windowLayer != nil) {
@ -302,16 +301,25 @@ AWT_ASSERT_APPKIT_THREAD;
*/ */
-(void) deliverJavaMouseEvent: (NSEvent *) event { -(void) deliverJavaMouseEvent: (NSEvent *) event {
BOOL isEnabled = YES;
NSEventType type = [event type]; NSWindow* window = [self window];
if ([window isKindOfClass: [AWTWindow_Panel class]] || [window isKindOfClass: [AWTWindow_Normal class]]) {
isEnabled = [(AWTWindow*)[window delegate] isEnabled];
}
if (!isEnabled) {
return;
}
NSEventType type = [event type];
// check synthesized mouse entered/exited events // check synthesized mouse entered/exited events
if ((type == NSMouseEntered && mouseIsOver) || (type == NSMouseExited && !mouseIsOver)) { if ((type == NSMouseEntered && mouseIsOver) || (type == NSMouseExited && !mouseIsOver)) {
return; return;
}else if ((type == NSMouseEntered && !mouseIsOver) || (type == NSMouseExited && mouseIsOver)) { }else if ((type == NSMouseEntered && !mouseIsOver) || (type == NSMouseExited && mouseIsOver)) {
mouseIsOver = !mouseIsOver; mouseIsOver = !mouseIsOver;
} }
[AWTToolkit eventCountPlusPlus]; [AWTToolkit eventCountPlusPlus];
JNIEnv *env = [ThreadUtilities getJNIEnv]; JNIEnv *env = [ThreadUtilities getJNIEnv];
@ -385,6 +393,14 @@ AWT_ASSERT_APPKIT_THREAD;
} }
-(void) deliverJavaKeyEventHelper: (NSEvent *) event { -(void) deliverJavaKeyEventHelper: (NSEvent *) event {
static NSEvent* sLastKeyEvent = nil;
if (event == sLastKeyEvent) {
// The event is repeatedly delivered by keyDown: after performKeyEquivalent:
return;
}
[sLastKeyEvent release];
sLastKeyEvent = [event retain];
[AWTToolkit eventCountPlusPlus]; [AWTToolkit eventCountPlusPlus];
JNIEnv *env = [ThreadUtilities getJNIEnv]; JNIEnv *env = [ThreadUtilities getJNIEnv];

View file

@ -35,28 +35,53 @@
@class AWTView; @class AWTView;
@interface AWTWindow : NSPanel <NSWindowDelegate> { @interface AWTWindow : NSObject <NSWindowDelegate> {
@private @private
JNFWeakJObjectWrapper *javaPlatformWindow; JNFWeakJObjectWrapper *javaPlatformWindow;
CMenuBar *javaMenuBar; CMenuBar *javaMenuBar;
NSSize javaMinSize; NSSize javaMinSize;
NSSize javaMaxSize; NSSize javaMaxSize;
jint styleBits; jint styleBits;
BOOL isEnabled;
} }
// An instance of either AWTWindow_Normal or AWTWindow_Panel
@property (nonatomic, retain) NSWindow *nsWindow;
@property (nonatomic, retain) JNFWeakJObjectWrapper *javaPlatformWindow; @property (nonatomic, retain) JNFWeakJObjectWrapper *javaPlatformWindow;
@property (nonatomic, retain) CMenuBar *javaMenuBar; @property (nonatomic, retain) CMenuBar *javaMenuBar;
@property (nonatomic) NSSize javaMinSize; @property (nonatomic) NSSize javaMinSize;
@property (nonatomic) NSSize javaMaxSize; @property (nonatomic) NSSize javaMaxSize;
@property (nonatomic) jint styleBits; @property (nonatomic) jint styleBits;
@property (nonatomic) BOOL isEnabled;
- (id) initWithPlatformWindow:(JNFWeakJObjectWrapper *)javaPlatformWindow - (id) initWithPlatformWindow:(JNFWeakJObjectWrapper *)javaPlatformWindow
styleBits:(jint)styleBits styleBits:(jint)styleBits
frameRect:(NSRect)frameRect frameRect:(NSRect)frameRect
contentView:(NSView *)contentView; contentView:(NSView *)contentView;
- (void) adjustGrowBoxWindow;
- (BOOL) isTopmostWindowUnderMouse; - (BOOL) isTopmostWindowUnderMouse;
// NSWindow overrides delegate methods
- (BOOL) canBecomeKeyWindow;
- (BOOL) canBecomeMainWindow;
- (BOOL) worksWhenModal;
- (void)sendEvent:(NSEvent *)event;
@end
@interface AWTWindow_Normal : NSWindow
- (id) initWithDelegate:(AWTWindow *)delegate
frameRect:(NSRect)rect
styleMask:(NSUInteger)styleMask
contentView:(NSView *)view;
@end
@interface AWTWindow_Panel : NSPanel
- (id) initWithDelegate:(AWTWindow *)delegate
frameRect:(NSRect)rect
styleMask:(NSUInteger)styleMask
contentView:(NSView *)view;
@end @end
#endif _AWTWINDOW_H #endif _AWTWINDOW_H

View file

@ -51,22 +51,76 @@
static JNF_CLASS_CACHE(jc_CPlatformWindow, "sun/lwawt/macosx/CPlatformWindow"); static JNF_CLASS_CACHE(jc_CPlatformWindow, "sun/lwawt/macosx/CPlatformWindow");
// --------------------------------------------------------------
// NSWindow/NSPanel descendants implementation
#define AWT_NS_WINDOW_IMPLEMENTATION \
- (id) initWithDelegate:(AWTWindow *)delegate \
frameRect:(NSRect)contectRect \
styleMask:(NSUInteger)styleMask \
contentView:(NSView *)view \
{ \
self = [super initWithContentRect:contectRect \
styleMask:styleMask \
backing:NSBackingStoreBuffered \
defer:NO]; \
\
if (self == nil) return nil; \
\
[self setDelegate:delegate]; \
[self setContentView:view]; \
[self setInitialFirstResponder:view]; \
[self setReleasedWhenClosed:NO]; \
[self setPreservesContentDuringLiveResize:YES]; \
\
return self; \
} \
\
/* NSWindow overrides */ \
- (BOOL) canBecomeKeyWindow { \
return [(AWTWindow*)[self delegate] canBecomeKeyWindow]; \
} \
\
- (BOOL) canBecomeMainWindow { \
return [(AWTWindow*)[self delegate] canBecomeMainWindow]; \
} \
\
- (BOOL) worksWhenModal { \
return [(AWTWindow*)[self delegate] worksWhenModal]; \
} \
\
- (void)sendEvent:(NSEvent *)event { \
[(AWTWindow*)[self delegate] sendEvent:event]; \
[super sendEvent:event]; \
}
@implementation AWTWindow_Normal
AWT_NS_WINDOW_IMPLEMENTATION
@end
@implementation AWTWindow_Panel
AWT_NS_WINDOW_IMPLEMENTATION
@end
// END of NSWindow/NSPanel descendants implementation
// --------------------------------------------------------------
@implementation AWTWindow @implementation AWTWindow
@synthesize nsWindow;
@synthesize javaPlatformWindow; @synthesize javaPlatformWindow;
@synthesize javaMenuBar; @synthesize javaMenuBar;
@synthesize javaMinSize; @synthesize javaMinSize;
@synthesize javaMaxSize; @synthesize javaMaxSize;
@synthesize styleBits; @synthesize styleBits;
@synthesize isEnabled;
- (void) updateMinMaxSize:(BOOL)resizable { - (void) updateMinMaxSize:(BOOL)resizable {
if (resizable) { if (resizable) {
[self setMinSize:self.javaMinSize]; [self.nsWindow setMinSize:self.javaMinSize];
[self setMaxSize:self.javaMaxSize]; [self.nsWindow setMaxSize:self.javaMaxSize];
} else { } else {
NSRect currentFrame = [self frame]; NSRect currentFrame = [self.nsWindow frame];
[self setMinSize:currentFrame.size]; [self.nsWindow setMinSize:currentFrame.size];
[self setMaxSize:currentFrame.size]; [self.nsWindow setMaxSize:currentFrame.size];
} }
} }
@ -97,38 +151,38 @@ static JNF_CLASS_CACHE(jc_CPlatformWindow, "sun/lwawt/macosx/CPlatformWindow");
if (IS(mask, RESIZABLE)) { if (IS(mask, RESIZABLE)) {
BOOL resizable = IS(bits, RESIZABLE); BOOL resizable = IS(bits, RESIZABLE);
[self updateMinMaxSize:resizable]; [self updateMinMaxSize:resizable];
[self setShowsResizeIndicator:resizable]; [self.nsWindow setShowsResizeIndicator:resizable];
} }
if (IS(mask, HAS_SHADOW)) { if (IS(mask, HAS_SHADOW)) {
[self setHasShadow:IS(bits, HAS_SHADOW)]; [self.nsWindow setHasShadow:IS(bits, HAS_SHADOW)];
} }
if (IS(mask, ZOOMABLE)) { if (IS(mask, ZOOMABLE)) {
[[self standardWindowButton:NSWindowZoomButton] setEnabled:IS(bits, ZOOMABLE)]; [[self.nsWindow standardWindowButton:NSWindowZoomButton] setEnabled:IS(bits, ZOOMABLE)];
} }
if (IS(mask, ALWAYS_ON_TOP)) { if (IS(mask, ALWAYS_ON_TOP)) {
[self setLevel:IS(bits, ALWAYS_ON_TOP) ? NSFloatingWindowLevel : NSNormalWindowLevel]; [self.nsWindow setLevel:IS(bits, ALWAYS_ON_TOP) ? NSFloatingWindowLevel : NSNormalWindowLevel];
} }
if (IS(mask, HIDES_ON_DEACTIVATE)) { if (IS(mask, HIDES_ON_DEACTIVATE)) {
[self setHidesOnDeactivate:IS(bits, HIDES_ON_DEACTIVATE)]; [self.nsWindow setHidesOnDeactivate:IS(bits, HIDES_ON_DEACTIVATE)];
} }
if (IS(mask, DRAGGABLE_BACKGROUND)) { if (IS(mask, DRAGGABLE_BACKGROUND)) {
[self setMovableByWindowBackground:IS(bits, DRAGGABLE_BACKGROUND)]; [self.nsWindow setMovableByWindowBackground:IS(bits, DRAGGABLE_BACKGROUND)];
} }
if (IS(mask, DOCUMENT_MODIFIED)) { if (IS(mask, DOCUMENT_MODIFIED)) {
[self setDocumentEdited:IS(bits, DOCUMENT_MODIFIED)]; [self.nsWindow setDocumentEdited:IS(bits, DOCUMENT_MODIFIED)];
} }
if ([self respondsToSelector:@selector(toggleFullScreen:)]) { if ([self.nsWindow respondsToSelector:@selector(toggleFullScreen:)]) {
if (IS(mask, FULLSCREENABLE)) { if (IS(mask, FULLSCREENABLE)) {
[self setCollectionBehavior:(1 << 7) /*NSWindowCollectionBehaviorFullScreenPrimary*/]; [self.nsWindow setCollectionBehavior:(1 << 7) /*NSWindowCollectionBehaviorFullScreenPrimary*/];
} else { } else {
[self setCollectionBehavior:NSWindowCollectionBehaviorDefault]; [self.nsWindow setCollectionBehavior:NSWindowCollectionBehaviorDefault];
} }
} }
@ -150,42 +204,55 @@ AWT_ASSERT_APPKIT_THREAD;
contentRect.size.height = 1.0; contentRect.size.height = 1.0;
} }
self = [super initWithContentRect:contentRect self = [super init];
styleMask:styleMask
backing:NSBackingStoreBuffered
defer:NO];
if (self == nil) return nil; // no hope if (self == nil) return nil; // no hope
if (IS(bits, UTILITY) ||
IS(bits, NONACTIVATING) ||
IS(bits, HUD) ||
IS(bits, HIDES_ON_DEACTIVATE))
{
self.nsWindow = [[AWTWindow_Panel alloc] initWithDelegate:self
frameRect:contentRect
styleMask:styleMask
contentView:view];
}
else
{
// These windows will appear in the window list in the dock icon menu
self.nsWindow = [[AWTWindow_Normal alloc] initWithDelegate:self
frameRect:contentRect
styleMask:styleMask
contentView:view];
}
if (self.nsWindow == nil) return nil; // no hope either
self.isEnabled = YES;
self.javaPlatformWindow = platformWindow; self.javaPlatformWindow = platformWindow;
self.styleBits = bits; self.styleBits = bits;
[self setPropertiesForStyleBits:styleBits mask:MASK(_METHOD_PROP_BITMASK)]; [self setPropertiesForStyleBits:styleBits mask:MASK(_METHOD_PROP_BITMASK)];
[self setDelegate:self];
[self setContentView:view];
[self setInitialFirstResponder:view];
[self setReleasedWhenClosed:NO];
[self setPreservesContentDuringLiveResize:YES];
return self; return self;
} }
// checks that this window is under the mouse cursor and this point is not overlapped by others windows // checks that this window is under the mouse cursor and this point is not overlapped by others windows
- (BOOL) isTopmostWindowUnderMouse { - (BOOL) isTopmostWindowUnderMouse {
int currentWinID = [self windowNumber]; int currentWinID = [self.nsWindow windowNumber];
NSRect screenRect = [[NSScreen mainScreen] frame]; NSRect screenRect = [[NSScreen mainScreen] frame];
NSPoint nsMouseLocation = [NSEvent mouseLocation]; NSPoint nsMouseLocation = [NSEvent mouseLocation];
CGPoint cgMouseLocation = CGPointMake(nsMouseLocation.x, screenRect.size.height - nsMouseLocation.y); CGPoint cgMouseLocation = CGPointMake(nsMouseLocation.x, screenRect.size.height - nsMouseLocation.y);
NSMutableArray *windows = (NSMutableArray *)CGWindowListCopyWindowInfo(kCGWindowListOptionOnScreenOnly | kCGWindowListExcludeDesktopElements, kCGNullWindowID); NSMutableArray *windows = (NSMutableArray *)CGWindowListCopyWindowInfo(kCGWindowListOptionOnScreenOnly | kCGWindowListExcludeDesktopElements, kCGNullWindowID);
for (NSDictionary *window in windows) { for (NSDictionary *window in windows) {
int layer = [[window objectForKey:(id)kCGWindowLayer] intValue]; int layer = [[window objectForKey:(id)kCGWindowLayer] intValue];
if (layer == 0) { if (layer == 0) {
int winID = [[window objectForKey:(id)kCGWindowNumber] intValue]; int winID = [[window objectForKey:(id)kCGWindowNumber] intValue];
CGRect rect; CGRect rect;
CGRectMakeWithDictionaryRepresentation((CFDictionaryRef)[window objectForKey:(id)kCGWindowBounds], &rect); CGRectMakeWithDictionaryRepresentation((CFDictionaryRef)[window objectForKey:(id)kCGWindowBounds], &rect);
if (CGRectContainsPoint(rect, cgMouseLocation)) { if (CGRectContainsPoint(rect, cgMouseLocation)) {
@ -199,35 +266,35 @@ AWT_ASSERT_APPKIT_THREAD;
} }
- (void) synthesizeMouseEnteredExitedEvents { - (void) synthesizeMouseEnteredExitedEvents {
int eventType = 0; int eventType = 0;
BOOL isUnderMouse = [self isTopmostWindowUnderMouse]; BOOL isUnderMouse = [self isTopmostWindowUnderMouse];
BOOL mouseIsOver = [[self contentView] mouseIsOver]; BOOL mouseIsOver = [[self.nsWindow contentView] mouseIsOver];
if (isUnderMouse && !mouseIsOver) { if (isUnderMouse && !mouseIsOver) {
eventType = NSMouseEntered; eventType = NSMouseEntered;
} else if (!isUnderMouse && mouseIsOver) { } else if (!isUnderMouse && mouseIsOver) {
eventType = NSMouseExited; eventType = NSMouseExited;
} else { } else {
return; return;
} }
NSPoint screenLocation = [NSEvent mouseLocation]; NSPoint screenLocation = [NSEvent mouseLocation];
NSPoint windowLocation = [self convertScreenToBase: screenLocation]; NSPoint windowLocation = [self.nsWindow convertScreenToBase: screenLocation];
int modifierFlags = (eventType == NSMouseEntered) ? NSMouseEnteredMask : NSMouseExitedMask; int modifierFlags = (eventType == NSMouseEntered) ? NSMouseEnteredMask : NSMouseExitedMask;
NSEvent *mouseEvent = [NSEvent enterExitEventWithType: eventType NSEvent *mouseEvent = [NSEvent enterExitEventWithType: eventType
location: windowLocation location: windowLocation
modifierFlags: modifierFlags modifierFlags: modifierFlags
timestamp: 0 timestamp: 0
windowNumber: [self windowNumber] windowNumber: [self.nsWindow windowNumber]
context: nil context: nil
eventNumber: 0 eventNumber: 0
trackingNumber: 0 trackingNumber: 0
userData: nil userData: nil
]; ];
[[self contentView] deliverJavaMouseEvent: mouseEvent]; [[self.nsWindow contentView] deliverJavaMouseEvent: mouseEvent];
} }
- (void) dealloc { - (void) dealloc {
@ -236,19 +303,20 @@ AWT_ASSERT_APPKIT_THREAD;
JNIEnv *env = [ThreadUtilities getJNIEnv]; JNIEnv *env = [ThreadUtilities getJNIEnv];
[self.javaPlatformWindow setJObject:nil withEnv:env]; [self.javaPlatformWindow setJObject:nil withEnv:env];
self.nsWindow = nil;
[super dealloc]; [super dealloc];
} }
// NSWindow overrides // NSWindow overrides
- (BOOL) canBecomeKeyWindow { - (BOOL) canBecomeKeyWindow {
AWT_ASSERT_APPKIT_THREAD; AWT_ASSERT_APPKIT_THREAD;
return IS(self.styleBits, SHOULD_BECOME_KEY); return self.isEnabled && IS(self.styleBits, SHOULD_BECOME_KEY);
} }
- (BOOL) canBecomeMainWindow { - (BOOL) canBecomeMainWindow {
AWT_ASSERT_APPKIT_THREAD; AWT_ASSERT_APPKIT_THREAD;
return IS(self.styleBits, SHOULD_BECOME_MAIN); return self.isEnabled && IS(self.styleBits, SHOULD_BECOME_MAIN);
} }
- (BOOL) worksWhenModal { - (BOOL) worksWhenModal {
@ -270,7 +338,7 @@ AWT_ASSERT_APPKIT_THREAD;
if (awtWindow != NULL) { if (awtWindow != NULL) {
// translate the point into Java coordinates // translate the point into Java coordinates
NSPoint loc = [event locationInWindow]; NSPoint loc = [event locationInWindow];
loc.y = [self frame].size.height - loc.y; loc.y = [self.nsWindow frame].size.height - loc.y;
// send up to the GestureHandler to recursively dispatch on the AWT event thread // send up to the GestureHandler to recursively dispatch on the AWT event thread
static JNF_CLASS_CACHE(jc_GestureHandler, "com/apple/eawt/event/GestureHandler"); static JNF_CLASS_CACHE(jc_GestureHandler, "com/apple/eawt/event/GestureHandler");
@ -333,7 +401,7 @@ AWT_ASSERT_APPKIT_THREAD;
// TODO: create generic AWT assert // TODO: create generic AWT assert
} }
NSRect frame = ConvertNSScreenRect(env, [self frame]); NSRect frame = ConvertNSScreenRect(env, [self.nsWindow frame]);
static JNF_MEMBER_CACHE(jm_deliverMoveResizeEvent, jc_CPlatformWindow, "deliverMoveResizeEvent", "(IIII)V"); static JNF_MEMBER_CACHE(jm_deliverMoveResizeEvent, jc_CPlatformWindow, "deliverMoveResizeEvent", "(IIII)V");
JNFCallVoidMethod(env, platformWindow, jm_deliverMoveResizeEvent, JNFCallVoidMethod(env, platformWindow, jm_deliverMoveResizeEvent,
@ -523,8 +591,8 @@ AWT_ASSERT_APPKIT_THREAD;
if ([event type] == NSLeftMouseDown || [event type] == NSRightMouseDown || [event type] == NSOtherMouseDown) { if ([event type] == NSLeftMouseDown || [event type] == NSRightMouseDown || [event type] == NSOtherMouseDown) {
NSPoint p = [NSEvent mouseLocation]; NSPoint p = [NSEvent mouseLocation];
NSRect frame = [self frame]; NSRect frame = [self.nsWindow frame];
NSRect contentRect = [self contentRectForFrameRect:frame]; NSRect contentRect = [self.nsWindow contentRectForFrameRect:frame];
// Check if the click happened in the non-client area (title bar) // Check if the click happened in the non-client area (title bar)
if (p.y >= (frame.origin.y + contentRect.size.height)) { if (p.y >= (frame.origin.y + contentRect.size.height)) {
@ -535,15 +603,14 @@ AWT_ASSERT_APPKIT_THREAD;
JNFCallVoidMethod(env, platformWindow, jm_deliverNCMouseDown); JNFCallVoidMethod(env, platformWindow, jm_deliverNCMouseDown);
} }
} }
[super sendEvent:event];
} }
- (void)constrainSize:(NSSize*)size { - (void)constrainSize:(NSSize*)size {
float minWidth = 0.f, minHeight = 0.f; float minWidth = 0.f, minHeight = 0.f;
if (IS(self.styleBits, DECORATED)) { if (IS(self.styleBits, DECORATED)) {
NSRect frame = [self frame]; NSRect frame = [self.nsWindow frame];
NSRect contentRect = [NSWindow contentRectForFrameRect:frame styleMask:[self styleMask]]; NSRect contentRect = [NSWindow contentRectForFrameRect:frame styleMask:[self.nsWindow styleMask]];
float top = frame.size.height - contentRect.size.height; float top = frame.size.height - contentRect.size.height;
float left = contentRect.origin.x - frame.origin.x; float left = contentRect.origin.x - frame.origin.x;
@ -562,6 +629,27 @@ AWT_ASSERT_APPKIT_THREAD;
size->height = MAX(size->height, minHeight); size->height = MAX(size->height, minHeight);
} }
- (void) setEnabled: (BOOL)flag {
self.isEnabled = flag;
if (IS(self.styleBits, CLOSEABLE)) {
[[self.nsWindow standardWindowButton:NSWindowCloseButton] setEnabled: flag];
}
if (IS(self.styleBits, MINIMIZABLE)) {
[[self.nsWindow standardWindowButton:NSWindowMiniaturizeButton] setEnabled: flag];
}
if (IS(self.styleBits, ZOOMABLE)) {
[[self.nsWindow standardWindowButton:NSWindowZoomButton] setEnabled: flag];
}
if (IS(self.styleBits, RESIZABLE)) {
[self updateMinMaxSize:flag];
[self.nsWindow setShowsResizeIndicator:flag];
}
}
@end // AWTWindow @end // AWTWindow
@ -596,7 +684,7 @@ AWT_ASSERT_NOT_APPKIT_THREAD;
JNF_COCOA_EXIT(env); JNF_COCOA_EXIT(env);
return ptr_to_jlong(window); return ptr_to_jlong(window ? window.nsWindow : nil);
} }
/* /*
@ -610,17 +698,19 @@ JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CPlatformWindow_nativeSetNSWindowSt
JNF_COCOA_ENTER(env); JNF_COCOA_ENTER(env);
AWT_ASSERT_NOT_APPKIT_THREAD; AWT_ASSERT_NOT_APPKIT_THREAD;
AWTWindow *window = OBJC(windowPtr); NSWindow *nsWindow = OBJC(windowPtr);
[JNFRunLoop performOnMainThreadWaiting:NO withBlock:^(){ [JNFRunLoop performOnMainThreadWaiting:NO withBlock:^(){
AWT_ASSERT_APPKIT_THREAD; AWT_ASSERT_APPKIT_THREAD;
AWTWindow *window = (AWTWindow*)[nsWindow delegate];
// scans the bit field, and only updates the values requested by the mask // scans the bit field, and only updates the values requested by the mask
// (this implicity handles the _CALLBACK_PROP_BITMASK case, since those are passive reads) // (this implicity handles the _CALLBACK_PROP_BITMASK case, since those are passive reads)
jint newBits = window.styleBits & ~mask | bits & mask; jint newBits = window.styleBits & ~mask | bits & mask;
// resets the NSWindow's style mask if the mask intersects any of those bits // resets the NSWindow's style mask if the mask intersects any of those bits
if (mask & MASK(_STYLE_PROP_BITMASK)) { if (mask & MASK(_STYLE_PROP_BITMASK)) {
[window setStyleMask:[AWTWindow styleMaskForStyleBits:newBits]]; [nsWindow setStyleMask:[AWTWindow styleMaskForStyleBits:newBits]];
} }
// calls methods on NSWindow to change other properties, based on the mask // calls methods on NSWindow to change other properties, based on the mask
@ -645,12 +735,14 @@ JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CPlatformWindow_nativeSetNSWindowMe
JNF_COCOA_ENTER(env); JNF_COCOA_ENTER(env);
AWT_ASSERT_NOT_APPKIT_THREAD; AWT_ASSERT_NOT_APPKIT_THREAD;
AWTWindow *window = OBJC(windowPtr); NSWindow *nsWindow = OBJC(windowPtr);
CMenuBar *menuBar = OBJC(menuBarPtr); CMenuBar *menuBar = OBJC(menuBarPtr);
[JNFRunLoop performOnMainThreadWaiting:NO withBlock:^(){ [JNFRunLoop performOnMainThreadWaiting:NO withBlock:^(){
AWT_ASSERT_APPKIT_THREAD; AWT_ASSERT_APPKIT_THREAD;
if ([window isKeyWindow]) [window.javaMenuBar deactivate]; AWTWindow *window = (AWTWindow*)[nsWindow delegate];
if ([nsWindow isKeyWindow]) [window.javaMenuBar deactivate];
window.javaMenuBar = menuBar; window.javaMenuBar = menuBar;
// if ([self isKeyWindow]) { // if ([self isKeyWindow]) {
@ -674,15 +766,15 @@ JNIEXPORT jobject JNICALL Java_sun_lwawt_macosx_CPlatformWindow_nativeGetNSWindo
JNF_COCOA_ENTER(env); JNF_COCOA_ENTER(env);
AWT_ASSERT_NOT_APPKIT_THREAD; AWT_ASSERT_NOT_APPKIT_THREAD;
AWTWindow *window = OBJC(windowPtr); NSWindow *nsWindow = OBJC(windowPtr);
__block NSRect contentRect = NSZeroRect; __block NSRect contentRect = NSZeroRect;
__block NSRect frame = NSZeroRect; __block NSRect frame = NSZeroRect;
[JNFRunLoop performOnMainThreadWaiting:YES withBlock:^(){ [JNFRunLoop performOnMainThreadWaiting:YES withBlock:^(){
AWT_ASSERT_APPKIT_THREAD; AWT_ASSERT_APPKIT_THREAD;
frame = [window frame]; frame = [nsWindow frame];
contentRect = [NSWindow contentRectForFrameRect:frame styleMask:[window styleMask]]; contentRect = [NSWindow contentRectForFrameRect:frame styleMask:[nsWindow styleMask]];
}]; }];
jint top = (jint)(frame.size.height - contentRect.size.height); jint top = (jint)(frame.size.height - contentRect.size.height);
@ -712,24 +804,26 @@ AWT_ASSERT_NOT_APPKIT_THREAD;
NSRect jrect = NSMakeRect(originX, originY, width, height); NSRect jrect = NSMakeRect(originX, originY, width, height);
// TODO: not sure we need displayIfNeeded message in our view // TODO: not sure we need displayIfNeeded message in our view
AWTWindow *window = OBJC(windowPtr); NSWindow *nsWindow = OBJC(windowPtr);
[JNFRunLoop performOnMainThreadWaiting:NO withBlock:^(){ [JNFRunLoop performOnMainThreadWaiting:NO withBlock:^(){
AWT_ASSERT_APPKIT_THREAD; AWT_ASSERT_APPKIT_THREAD;
AWTWindow *window = (AWTWindow*)[nsWindow delegate];
NSRect rect = ConvertNSScreenRect(NULL, jrect); NSRect rect = ConvertNSScreenRect(NULL, jrect);
[window constrainSize:&rect.size]; [window constrainSize:&rect.size];
[window setFrame:rect display:YES]; [nsWindow setFrame:rect display:YES];
// only start tracking events if pointer is above the toplevel // only start tracking events if pointer is above the toplevel
// TODO: should post an Entered event if YES. // TODO: should post an Entered event if YES.
NSPoint mLocation = [NSEvent mouseLocation]; NSPoint mLocation = [NSEvent mouseLocation];
[window setAcceptsMouseMovedEvents:NSPointInRect(mLocation, rect)]; [nsWindow setAcceptsMouseMovedEvents:NSPointInRect(mLocation, rect)];
// ensure we repaint the whole window after the resize operation // ensure we repaint the whole window after the resize operation
// (this will also re-enable screen updates, which were disabled above) // (this will also re-enable screen updates, which were disabled above)
// TODO: send PaintEvent // TODO: send PaintEvent
[window synthesizeMouseEnteredExitedEvents]; [window synthesizeMouseEnteredExitedEvents];
}]; }];
@ -752,10 +846,12 @@ AWT_ASSERT_NOT_APPKIT_THREAD;
if (maxW < 1) maxW = 1; if (maxW < 1) maxW = 1;
if (maxH < 1) maxH = 1; if (maxH < 1) maxH = 1;
AWTWindow *window = OBJC(windowPtr); NSWindow *nsWindow = OBJC(windowPtr);
[JNFRunLoop performOnMainThreadWaiting:NO withBlock:^(){ [JNFRunLoop performOnMainThreadWaiting:NO withBlock:^(){
AWT_ASSERT_APPKIT_THREAD; AWT_ASSERT_APPKIT_THREAD;
AWTWindow *window = (AWTWindow*)[nsWindow delegate];
NSSize min = { minW, minH }; NSSize min = { minW, minH };
NSSize max = { maxW, maxH }; NSSize max = { maxW, maxH };
@ -781,11 +877,11 @@ JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CPlatformWindow_nativePushNSWindowT
JNF_COCOA_ENTER(env); JNF_COCOA_ENTER(env);
AWT_ASSERT_NOT_APPKIT_THREAD; AWT_ASSERT_NOT_APPKIT_THREAD;
AWTWindow *window = OBJC(windowPtr); NSWindow *nsWindow = OBJC(windowPtr);
[JNFRunLoop performOnMainThreadWaiting:NO withBlock:^(){ [JNFRunLoop performOnMainThreadWaiting:NO withBlock:^(){
AWT_ASSERT_APPKIT_THREAD; AWT_ASSERT_APPKIT_THREAD;
[window orderBack:nil]; [nsWindow orderBack:nil];
}]; }];
JNF_COCOA_EXIT(env); JNF_COCOA_EXIT(env);
@ -802,14 +898,14 @@ JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CPlatformWindow_nativePushNSWindowT
JNF_COCOA_ENTER(env); JNF_COCOA_ENTER(env);
AWT_ASSERT_NOT_APPKIT_THREAD; AWT_ASSERT_NOT_APPKIT_THREAD;
AWTWindow *window = OBJC(windowPtr); NSWindow *nsWindow = OBJC(windowPtr);
[JNFRunLoop performOnMainThreadWaiting:NO withBlock:^(){ [JNFRunLoop performOnMainThreadWaiting:NO withBlock:^(){
AWT_ASSERT_APPKIT_THREAD; AWT_ASSERT_APPKIT_THREAD;
if (![window isKeyWindow]) { if (![nsWindow isKeyWindow]) {
[window makeKeyAndOrderFront:window]; [nsWindow makeKeyAndOrderFront:nsWindow];
} else { } else {
[window orderFront:window]; [nsWindow orderFront:nsWindow];
} }
}]; }];
@ -827,8 +923,8 @@ JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CPlatformWindow_nativeSetNSWindowTi
JNF_COCOA_ENTER(env); JNF_COCOA_ENTER(env);
AWT_ASSERT_NOT_APPKIT_THREAD; AWT_ASSERT_NOT_APPKIT_THREAD;
AWTWindow *window = OBJC(windowPtr); NSWindow *nsWindow = OBJC(windowPtr);
[window performSelectorOnMainThread:@selector(setTitle:) [nsWindow performSelectorOnMainThread:@selector(setTitle:)
withObject:JNFJavaToNSString(env, jtitle) withObject:JNFJavaToNSString(env, jtitle)
waitUntilDone:NO]; waitUntilDone:NO];
@ -846,11 +942,11 @@ JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CPlatformWindow_nativeSetNSWindowAl
JNF_COCOA_ENTER(env); JNF_COCOA_ENTER(env);
AWT_ASSERT_NOT_APPKIT_THREAD; AWT_ASSERT_NOT_APPKIT_THREAD;
AWTWindow *window = OBJC(windowPtr); NSWindow *nsWindow = OBJC(windowPtr);
[JNFRunLoop performOnMainThreadWaiting:NO withBlock:^(){ [JNFRunLoop performOnMainThreadWaiting:NO withBlock:^(){
AWT_ASSERT_APPKIT_THREAD; AWT_ASSERT_APPKIT_THREAD;
[window setAlphaValue:alpha]; [nsWindow setAlphaValue:alpha];
}]; }];
JNF_COCOA_EXIT(env); JNF_COCOA_EXIT(env);
@ -867,11 +963,11 @@ JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CPlatformWindow_nativeRevalidateNSW
JNF_COCOA_ENTER(env); JNF_COCOA_ENTER(env);
AWT_ASSERT_NOT_APPKIT_THREAD; AWT_ASSERT_NOT_APPKIT_THREAD;
AWTWindow *window = OBJC(windowPtr); NSWindow *nsWindow = OBJC(windowPtr);
[JNFRunLoop performOnMainThreadWaiting:NO withBlock:^(){ [JNFRunLoop performOnMainThreadWaiting:NO withBlock:^(){
AWT_ASSERT_APPKIT_THREAD; AWT_ASSERT_APPKIT_THREAD;
[window invalidateShadow]; [nsWindow invalidateShadow];
}]; }];
JNF_COCOA_EXIT(env); JNF_COCOA_EXIT(env);
@ -890,8 +986,8 @@ JNIEXPORT jint JNICALL Java_sun_lwawt_macosx_CPlatformWindow_nativeScreenOn_1App
JNF_COCOA_ENTER(env); JNF_COCOA_ENTER(env);
AWT_ASSERT_APPKIT_THREAD; AWT_ASSERT_APPKIT_THREAD;
AWTWindow *window = OBJC(windowPtr); NSWindow *nsWindow = OBJC(windowPtr);
NSDictionary *props = [[window screen] deviceDescription]; NSDictionary *props = [[nsWindow screen] deviceDescription];
ret = [[props objectForKey:@"NSScreenNumber"] intValue]; ret = [[props objectForKey:@"NSScreenNumber"] intValue];
JNF_COCOA_EXIT(env); JNF_COCOA_EXIT(env);
@ -910,12 +1006,12 @@ JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CPlatformWindow_nativeSetNSWindowMi
JNF_COCOA_ENTER(env); JNF_COCOA_ENTER(env);
AWT_ASSERT_NOT_APPKIT_THREAD; AWT_ASSERT_NOT_APPKIT_THREAD;
AWTWindow *window = OBJC(windowPtr); NSWindow *nsWindow = OBJC(windowPtr);
NSImage *image = OBJC(nsImagePtr); NSImage *image = OBJC(nsImagePtr);
[JNFRunLoop performOnMainThreadWaiting:NO withBlock:^(){ [JNFRunLoop performOnMainThreadWaiting:NO withBlock:^(){
AWT_ASSERT_APPKIT_THREAD; AWT_ASSERT_APPKIT_THREAD;
[window setMiniwindowImage:image]; [nsWindow setMiniwindowImage:image];
}]; }];
JNF_COCOA_EXIT(env); JNF_COCOA_EXIT(env);
@ -932,12 +1028,12 @@ JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CPlatformWindow_nativeSetNSWindowRe
JNF_COCOA_ENTER(env); JNF_COCOA_ENTER(env);
AWT_ASSERT_NOT_APPKIT_THREAD; AWT_ASSERT_NOT_APPKIT_THREAD;
AWTWindow *window = OBJC(windowPtr); NSWindow *nsWindow = OBJC(windowPtr);
NSURL *url = (filename == NULL) ? nil : [NSURL fileURLWithPath:JNFNormalizedNSStringForPath(env, filename)]; NSURL *url = (filename == NULL) ? nil : [NSURL fileURLWithPath:JNFNormalizedNSStringForPath(env, filename)];
[JNFRunLoop performOnMainThreadWaiting:NO withBlock:^(){ [JNFRunLoop performOnMainThreadWaiting:NO withBlock:^(){
AWT_ASSERT_APPKIT_THREAD; AWT_ASSERT_APPKIT_THREAD;
[window setRepresentedURL:url]; [nsWindow setRepresentedURL:url];
}]; }];
JNF_COCOA_EXIT(env); JNF_COCOA_EXIT(env);
@ -969,14 +1065,16 @@ JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CPlatformWindow_nativeSynthesizeMou
{ {
JNF_COCOA_ENTER(env); JNF_COCOA_ENTER(env);
AWT_ASSERT_NOT_APPKIT_THREAD; AWT_ASSERT_NOT_APPKIT_THREAD;
AWTWindow *window = OBJC(windowPtr); NSWindow *nsWindow = OBJC(windowPtr);
[JNFRunLoop performOnMainThreadWaiting:NO withBlock:^(){ [JNFRunLoop performOnMainThreadWaiting:NO withBlock:^(){
AWT_ASSERT_APPKIT_THREAD; AWT_ASSERT_APPKIT_THREAD;
AWTWindow *window = (AWTWindow*)[nsWindow delegate];
[window synthesizeMouseEnteredExitedEvents]; [window synthesizeMouseEnteredExitedEvents];
}]; }];
JNF_COCOA_EXIT(env); JNF_COCOA_EXIT(env);
} }
@ -993,8 +1091,8 @@ JNIEXPORT jint JNICALL Java_sun_lwawt_macosx_CPlatformWindow_nativeGetScreenNSWi
JNF_COCOA_ENTER(env); JNF_COCOA_ENTER(env);
AWT_ASSERT_APPKIT_THREAD; AWT_ASSERT_APPKIT_THREAD;
AWTWindow *window = OBJC(windowPtr); NSWindow *nsWindow = OBJC(windowPtr);
NSScreen* screen = [window screen]; NSScreen* screen = [nsWindow screen];
//+++gdb NOTE: This is using a linear search of the screens. If it should //+++gdb NOTE: This is using a linear search of the screens. If it should
// prove to be a bottleneck, this can definitely be improved. However, // prove to be a bottleneck, this can definitely be improved. However,
@ -1025,12 +1123,12 @@ JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CPlatformWindow__1toggleFullScreenM
{ {
JNF_COCOA_ENTER(env); JNF_COCOA_ENTER(env);
AWTWindow *window = OBJC(windowPtr); NSWindow *nsWindow = OBJC(windowPtr);
SEL toggleFullScreenSelector = @selector(toggleFullScreen:); SEL toggleFullScreenSelector = @selector(toggleFullScreen:);
if (![window respondsToSelector:toggleFullScreenSelector]) return; if (![nsWindow respondsToSelector:toggleFullScreenSelector]) return;
[JNFRunLoop performOnMainThreadWaiting:NO withBlock:^(){ [JNFRunLoop performOnMainThreadWaiting:NO withBlock:^(){
[window performSelector:toggleFullScreenSelector withObject:nil]; [nsWindow performSelector:toggleFullScreenSelector withObject:nil];
}]; }];
JNF_COCOA_EXIT(env); JNF_COCOA_EXIT(env);
@ -1044,15 +1142,31 @@ JNIEXPORT jboolean JNICALL Java_sun_lwawt_macosx_CMouseInfoPeer_nativeIsWindowUn
JNF_COCOA_ENTER(env); JNF_COCOA_ENTER(env);
AWT_ASSERT_NOT_APPKIT_THREAD; AWT_ASSERT_NOT_APPKIT_THREAD;
AWTWindow *aWindow = OBJC(windowPtr); NSWindow *nsWindow = OBJC(windowPtr);
[JNFRunLoop performOnMainThreadWaiting:YES withBlock:^() { [JNFRunLoop performOnMainThreadWaiting:YES withBlock:^() {
AWT_ASSERT_APPKIT_THREAD; AWT_ASSERT_APPKIT_THREAD;
NSPoint pt = [aWindow mouseLocationOutsideOfEventStream]; NSPoint pt = [nsWindow mouseLocationOutsideOfEventStream];
underMouse = [[aWindow contentView] hitTest:pt] != nil; underMouse = [[nsWindow contentView] hitTest:pt] != nil;
}]; }];
JNF_COCOA_EXIT(env); JNF_COCOA_EXIT(env);
return underMouse; return underMouse;
} }
JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CPlatformWindow_nativeSetEnabled
(JNIEnv *env, jclass clazz, jlong windowPtr, jboolean isEnabled)
{
JNF_COCOA_ENTER(env);
NSWindow *nsWindow = OBJC(windowPtr);
[JNFRunLoop performOnMainThreadWaiting:NO withBlock:^(){
AWTWindow *window = (AWTWindow*)[nsWindow delegate];
[window setEnabled: isEnabled];
}];
JNF_COCOA_EXIT(env);
}

View file

@ -46,11 +46,14 @@
// File dialog's mode // File dialog's mode
jint fMode; jint fMode;
// Indicates whether the user can select multiple files
BOOL fMultipleMode;
// Should we navigate into apps? // Should we navigate into apps?
BOOL fNavigateApps; BOOL fNavigateApps;
// panel's filename // Contains the absolute paths of the selected files as URLs
NSString *fReturnedFilename; NSArray *fURLs;
} }
// Allocator // Allocator
@ -60,6 +63,7 @@
directory:(NSString *)inPath directory:(NSString *)inPath
file:(NSString *)inFile file:(NSString *)inFile
mode:(jint)inMode mode:(jint)inMode
multipleMode:(BOOL)inMultipleMode
shouldNavigate:(BOOL)inNavigateApps shouldNavigate:(BOOL)inNavigateApps
withEnv:(JNIEnv*)env; withEnv:(JNIEnv*)env;
@ -69,7 +73,7 @@
// Get dialog return value // Get dialog return value
- (BOOL) userClickedOK; - (BOOL) userClickedOK;
// Filename user chose // Returns the absolute paths of the selected files as URLs
- (NSString *) filename; - (NSArray *) URLs;
@end @end

View file

@ -41,6 +41,7 @@
directory:(NSString *)inPath directory:(NSString *)inPath
file:(NSString *)inFile file:(NSString *)inFile
mode:(jint)inMode mode:(jint)inMode
multipleMode:(BOOL)inMultipleMode
shouldNavigate:(BOOL)inNavigateApps shouldNavigate:(BOOL)inNavigateApps
withEnv:(JNIEnv*)env; withEnv:(JNIEnv*)env;
{ {
@ -54,6 +55,7 @@
fTitle = inTitle; fTitle = inTitle;
[fTitle retain]; [fTitle retain];
fMode = inMode; fMode = inMode;
fMultipleMode = inMultipleMode;
fNavigateApps = inNavigateApps; fNavigateApps = inNavigateApps;
fPanelResult = NSCancelButton; fPanelResult = NSCancelButton;
} }
@ -79,8 +81,8 @@
[fTitle release]; [fTitle release];
fTitle = nil; fTitle = nil;
[fReturnedFilename release]; [fURLs release];
fReturnedFilename = nil; fURLs = nil;
[super dealloc]; [super dealloc];
} }
@ -105,7 +107,7 @@
if (fMode == java_awt_FileDialog_LOAD) { if (fMode == java_awt_FileDialog_LOAD) {
NSOpenPanel *openPanel = (NSOpenPanel *)thePanel; NSOpenPanel *openPanel = (NSOpenPanel *)thePanel;
[openPanel setAllowsMultipleSelection:NO]; [openPanel setAllowsMultipleSelection:fMultipleMode];
[openPanel setCanChooseFiles:YES]; [openPanel setCanChooseFiles:YES];
[openPanel setCanChooseDirectories:NO]; [openPanel setCanChooseDirectories:NO];
[openPanel setCanCreateDirectories:YES]; [openPanel setCanCreateDirectories:YES];
@ -114,8 +116,16 @@
[thePanel setDelegate:self]; [thePanel setDelegate:self];
fPanelResult = [thePanel runModalForDirectory:fDirectory file:fFile]; fPanelResult = [thePanel runModalForDirectory:fDirectory file:fFile];
[thePanel setDelegate:nil]; [thePanel setDelegate:nil];
fReturnedFilename = [thePanel filename];
[fReturnedFilename retain]; if ([self userClickedOK]) {
if (fMode == java_awt_FileDialog_LOAD) {
NSOpenPanel *openPanel = (NSOpenPanel *)thePanel;
fURLs = [openPanel URLs];
} else {
fURLs = [NSArray arrayWithObject:[thePanel URL]];
}
[fURLs retain];
}
} }
[self disposer]; [self disposer];
@ -158,8 +168,8 @@
return fPanelResult == NSOKButton; return fPanelResult == NSOKButton;
} }
- (NSString *)filename { - (NSArray *)URLs {
return [[fReturnedFilename retain] autorelease]; return [[fURLs retain] autorelease];
} }
@end @end
@ -167,13 +177,14 @@
* Class: sun_lwawt_macosx_CFileDialog * Class: sun_lwawt_macosx_CFileDialog
* Method: nativeRunFileDialog * Method: nativeRunFileDialog
* Signature: (Ljava/lang/String;ILjava/io/FilenameFilter; * Signature: (Ljava/lang/String;ILjava/io/FilenameFilter;
* Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; * Ljava/lang/String;Ljava/lang/String;)[Ljava/lang/String;
*/ */
JNIEXPORT jstring JNICALL JNIEXPORT jobjectArray JNICALL
Java_sun_lwawt_macosx_CFileDialog_nativeRunFileDialog Java_sun_lwawt_macosx_CFileDialog_nativeRunFileDialog
(JNIEnv *env, jobject peer, jstring title, jint mode, jboolean navigateApps, jboolean hasFilter, jstring directory, jstring file) (JNIEnv *env, jobject peer, jstring title, jint mode, jboolean multipleMode,
jboolean navigateApps, jboolean hasFilter, jstring directory, jstring file)
{ {
jstring returnValue = NULL; jobjectArray returnValue = NULL;
JNF_COCOA_ENTER(env); JNF_COCOA_ENTER(env);
NSString *dialogTitle = JNFJavaToNSString(env, title); NSString *dialogTitle = JNFJavaToNSString(env, title);
@ -187,6 +198,7 @@ JNF_COCOA_ENTER(env);
directory:JNFJavaToNSString(env, directory) directory:JNFJavaToNSString(env, directory)
file:JNFJavaToNSString(env, file) file:JNFJavaToNSString(env, file)
mode:mode mode:mode
multipleMode:multipleMode
shouldNavigate:navigateApps shouldNavigate:navigateApps
withEnv:env]; withEnv:env];
@ -196,8 +208,18 @@ JNF_COCOA_ENTER(env);
waitUntilDone:YES]; waitUntilDone:YES];
if ([dialogDelegate userClickedOK]) { if ([dialogDelegate userClickedOK]) {
NSString *filename = [dialogDelegate filename]; NSArray *urls = [dialogDelegate URLs];
returnValue = JNFNSToJavaString(env, filename); jsize count = [urls count];
jclass stringClass = (*env)->FindClass(env, "java/lang/String");
returnValue = (*env)->NewObjectArray(env, count, stringClass, NULL);
(*env)->DeleteLocalRef(env, stringClass);
[urls enumerateObjectsUsingBlock:^(id url, NSUInteger index, BOOL *stop) {
jstring filename = JNFNormalizedJavaStringForPath(env, [url path]);
(*env)->SetObjectArrayElement(env, returnValue, index, filename);
(*env)->DeleteLocalRef(env, filename);
}];
} }
[dialogDelegate release]; [dialogDelegate release];

View file

@ -163,7 +163,6 @@ AWT_ASSERT_ANY_THREAD;
if ([reps count]) { if ([reps count]) {
NSImage *nsImage = [[NSImage alloc] initWithSize:NSMakeSize(0, 0)]; NSImage *nsImage = [[NSImage alloc] initWithSize:NSMakeSize(0, 0)];
[nsImage addRepresentations: reps]; [nsImage addRepresentations: reps];
[reps release];
if (nsImage != nil) { if (nsImage != nil) {
CFRetain(nsImage); // GC CFRetain(nsImage); // GC

View file

@ -42,6 +42,7 @@ jint* gButtonDownMasks;
@implementation AWTToolkit @implementation AWTToolkit
static long eventCount; static long eventCount;
static bool shouldKeepRunningNestedLoop = NO;
+ (long) getEventCount{ + (long) getEventCount{
return eventCount; return eventCount;
@ -456,3 +457,36 @@ Java_sun_font_FontManager_populateFontFileNameMap
{ {
} }
/*
* Class: sun_lwawt_macosx_LWCToolkit
* Method: startNativeNestedEventLoop
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_sun_lwawt_macosx_LWCToolkit_startNativeNestedEventLoop
(JNIEnv *env, jclass cls)
{
if(!shouldKeepRunningNestedLoop) {
NSRunLoop *theRL = [NSRunLoop currentRunLoop];
NSApplication * app = [NSApplication sharedApplication];
shouldKeepRunningNestedLoop = YES;
while (shouldKeepRunningNestedLoop && [theRL runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]])
{
NSEvent * event = [app nextEventMatchingMask: 0xFFFFFFFF untilDate:nil inMode:NSDefaultRunLoopMode dequeue:YES];
if (event != nil) {
[app sendEvent: event];
}
}
}
}
/*
* Class: sun_lwawt_macosx_LWCToolkit
* Method: stopNativeNestedEventLoop
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_sun_lwawt_macosx_LWCToolkit_stopNativeNestedEventLoop
(JNIEnv *env, jclass cls)
{
shouldKeepRunningNestedLoop = NO;
}

View file

@ -204,7 +204,8 @@ JNF_COCOA_ENTER(env);
if (!CGLSD_MakeCurrentToScratch(env, oglc)) { if (!CGLSD_MakeCurrentToScratch(env, oglc)) {
return NULL; return NULL;
} }
} else if ([NSOpenGLContext currentContext] == nil) { // make sure our context is current
} else if ([NSOpenGLContext currentContext] != ctxinfo->context) {
[ctxinfo->context makeCurrentContext]; [ctxinfo->context makeCurrentContext];
} }

View file

@ -18,28 +18,23 @@
############ FILE CHOOSER STRINGS ############# ############ FILE CHOOSER STRINGS #############
FileChooser.acceptAllFileFilterText=* FileChooser.acceptAllFileFilter.textAndMnemonic=*
FileChooser.cancelButtonText=Cancel FileChooser.cancelButton.textAndMnemonic=Cancel
FileChooser.saveButtonText=Save FileChooser.saveButton.textAndMnemonic=Save
FileChooser.openButtonText=OK FileChooser.openButton.textAndMnemonic=OK
FileChooser.saveDialogTitleText=Save FileChooser.saveDialogTitle.textAndMnemonic=Save
FileChooser.openDialogTitleText=Open FileChooser.openDialogTitle.textAndMnemonic=Open
FileChooser.updateButtonText=Update FileChooser.updateButton.textAndMnemonic=Update
FileChooser.helpButtonText=Help FileChooser.helpButton.textAndMnemonic=Help
FileChooser.pathLabelText=Enter path or folder name: FileChooser.pathLabel.textAndMnemonic=Enter &path or folder name:
FileChooser.pathLabelMnemonic=80 FileChooser.filterLabel.textAndMnemonic=Filte&r
FileChooser.filterLabelText=Filter FileChooser.foldersLabel.textAndMnemonic=Fo&lders
FileChooser.filterLabelMnemonic=82 FileChooser.filesLabel.textAndMnemonic=F&iles
FileChooser.foldersLabelText=Folders FileChooser.enterFileNameLabel.textAndMnemonic=E&nter file name:
FileChooser.foldersLabelMnemonic=76 FileChooser.enterFolderNameLabel.textAndMnemonic=Enter folder name:
FileChooser.filesLabelText=Files
FileChooser.filesLabelMnemonic=73
FileChooser.enterFileNameLabelText=Enter file name:
FileChooser.enterFileNameLabelMnemonic=78
FileChooser.enterFolderNameLabelText=Enter folder name:
FileChooser.cancelButtonToolTipText=Abort file chooser dialog. FileChooser.cancelButtonToolTip.textAndMnemonic=Abort file chooser dialog.
FileChooser.saveButtonToolTipText=Save selected file. FileChooser.saveButtonToolTip.textAndMnemonic=Save selected file.
FileChooser.openButtonToolTipText=Open selected file. FileChooser.openButtonToolTip.textAndMnemonic=Open selected file.
FileChooser.updateButtonToolTipText=Update directory listing. FileChooser.updateButtonToolTip.textAndMnemonic=Update directory listing.
FileChooser.helpButtonToolTipText=FileChooser help. FileChooser.helpButtonToolTip.textAndMnemonic=FileChooser help.

View file

@ -18,28 +18,23 @@
############ FILE CHOOSER STRINGS ############# ############ FILE CHOOSER STRINGS #############
FileChooser.acceptAllFileFilterText=* FileChooser.acceptAllFileFilter.textAndMnemonic=*
FileChooser.cancelButtonText=Abbrechen FileChooser.cancelButton.textAndMnemonic=Abbrechen
FileChooser.saveButtonText=Speichern FileChooser.saveButton.textAndMnemonic=Speichern
FileChooser.openButtonText=OK FileChooser.openButton.textAndMnemonic=OK
FileChooser.saveDialogTitleText=Speichern FileChooser.saveDialogTitle.textAndMnemonic=Speichern
FileChooser.openDialogTitleText=\u00D6ffnen FileChooser.openDialogTitle.textAndMnemonic=\u00D6ffnen
FileChooser.updateButtonText=Aktualisieren FileChooser.updateButton.textAndMnemonic=Aktualisieren
FileChooser.helpButtonText=Hilfe FileChooser.helpButton.textAndMnemonic=Hilfe
FileChooser.pathLabelText=Pfad- oder Ordnernamen eingeben: FileChooser.pathLabel.textAndMnemonic=&Pfad- oder Ordnernamen eingeben:
FileChooser.pathLabelMnemonic=80 FileChooser.filterLabel.textAndMnemonic=Filte&r
FileChooser.filterLabelText=Filter FileChooser.foldersLabel.textAndMnemonic=Ordner(&L)
FileChooser.filterLabelMnemonic=82 FileChooser.filesLabel.textAndMnemonic=Date&ien
FileChooser.foldersLabelText=Ordner FileChooser.enterFileNameLabel.textAndMnemonic=Datei&namen eingeben:
FileChooser.foldersLabelMnemonic=76 FileChooser.enterFolderNameLabel.textAndMnemonic=Ordnernamen eingeben:
FileChooser.filesLabelText=Dateien
FileChooser.filesLabelMnemonic=73
FileChooser.enterFileNameLabelText=Dateinamen eingeben:
FileChooser.enterFileNameLabelMnemonic=78
FileChooser.enterFolderNameLabelText=Ordnernamen eingeben:
FileChooser.cancelButtonToolTipText=Dialogfeld f\u00FCr Dateiauswahl schlie\u00DFen. FileChooser.cancelButtonToolTip.textAndMnemonic=Dialogfeld f\u00FCr Dateiauswahl schlie\u00DFen.
FileChooser.saveButtonToolTipText=Ausgew\u00E4hlte Datei speichern. FileChooser.saveButtonToolTip.textAndMnemonic=Ausgew\u00E4hlte Datei speichern.
FileChooser.openButtonToolTipText=Ausgew\u00E4hlte Datei \u00F6ffnen. FileChooser.openButtonToolTip.textAndMnemonic=Ausgew\u00E4hlte Datei \u00F6ffnen.
FileChooser.updateButtonToolTipText=Verzeichnisliste aktualisieren. FileChooser.updateButtonToolTip.textAndMnemonic=Verzeichnisliste aktualisieren.
FileChooser.helpButtonToolTipText=FileChooser-Hilfe. FileChooser.helpButtonToolTip.textAndMnemonic=FileChooser-Hilfe.

View file

@ -18,28 +18,23 @@
############ FILE CHOOSER STRINGS ############# ############ FILE CHOOSER STRINGS #############
FileChooser.acceptAllFileFilterText=* FileChooser.acceptAllFileFilter.textAndMnemonic=*
FileChooser.cancelButtonText=Cancelar FileChooser.cancelButton.textAndMnemonic=Cancelar
FileChooser.saveButtonText=Guardar FileChooser.saveButton.textAndMnemonic=Guardar
FileChooser.openButtonText=Aceptar FileChooser.openButton.textAndMnemonic=Aceptar
FileChooser.saveDialogTitleText=Guardar FileChooser.saveDialogTitle.textAndMnemonic=Guardar
FileChooser.openDialogTitleText=Abrir FileChooser.openDialogTitle.textAndMnemonic=Abrir
FileChooser.updateButtonText=Actualizar FileChooser.updateButton.textAndMnemonic=Actualizar
FileChooser.helpButtonText=Ayuda FileChooser.helpButton.textAndMnemonic=Ayuda
FileChooser.pathLabelText=Introducir nombre de la ruta de acceso o carpeta: FileChooser.pathLabel.textAndMnemonic=Introducir nombre de la ruta de acceso o car&peta:
FileChooser.pathLabelMnemonic=80 FileChooser.filterLabel.textAndMnemonic=Filt&ro
FileChooser.filterLabelText=Filtro FileChooser.foldersLabel.textAndMnemonic=Carpetas(&L)
FileChooser.filterLabelMnemonic=82 FileChooser.filesLabel.textAndMnemonic=Arch&ivos
FileChooser.foldersLabelText=Carpetas FileChooser.enterFileNameLabel.textAndMnemonic=I&ntroducir nombre de archivo:
FileChooser.foldersLabelMnemonic=76 FileChooser.enterFolderNameLabel.textAndMnemonic=Introducir nombre de carpeta:
FileChooser.filesLabelText=Archivos
FileChooser.filesLabelMnemonic=73
FileChooser.enterFileNameLabelText=Introducir nombre de archivo:
FileChooser.enterFileNameLabelMnemonic=78
FileChooser.enterFolderNameLabelText=Introducir nombre de carpeta:
FileChooser.cancelButtonToolTipText=Abortar cuadro de di\u00E1logo del selector de archivos. FileChooser.cancelButtonToolTip.textAndMnemonic=Abortar cuadro de di\u00E1logo del selector de archivos.
FileChooser.saveButtonToolTipText=Guardar archivo seleccionado. FileChooser.saveButtonToolTip.textAndMnemonic=Guardar archivo seleccionado.
FileChooser.openButtonToolTipText=Abrir archivo seleccionado. FileChooser.openButtonToolTip.textAndMnemonic=Abrir archivo seleccionado.
FileChooser.updateButtonToolTipText=Actualizar lista de directorios. FileChooser.updateButtonToolTip.textAndMnemonic=Actualizar lista de directorios.
FileChooser.helpButtonToolTipText=Ayuda del selector de archivos. FileChooser.helpButtonToolTip.textAndMnemonic=Ayuda del selector de archivos.

View file

@ -18,28 +18,23 @@
############ FILE CHOOSER STRINGS ############# ############ FILE CHOOSER STRINGS #############
FileChooser.acceptAllFileFilterText=* FileChooser.acceptAllFileFilter.textAndMnemonic=*
FileChooser.cancelButtonText=Annuler FileChooser.cancelButton.textAndMnemonic=Annuler
FileChooser.saveButtonText=Enregistrer FileChooser.saveButton.textAndMnemonic=Enregistrer
FileChooser.openButtonText=OK FileChooser.openButton.textAndMnemonic=OK
FileChooser.saveDialogTitleText=Enregistrer FileChooser.saveDialogTitle.textAndMnemonic=Enregistrer
FileChooser.openDialogTitleText=Ouvrir FileChooser.openDialogTitle.textAndMnemonic=Ouvrir
FileChooser.updateButtonText=Mettre \u00E0 jour FileChooser.updateButton.textAndMnemonic=Mettre \u00E0 jour
FileChooser.helpButtonText=Aide FileChooser.helpButton.textAndMnemonic=Aide
FileChooser.pathLabelText=Entrez le chemin ou le nom du dossier : FileChooser.pathLabel.textAndMnemonic=Entrez le chemin ou le nom du dossier (&P):
FileChooser.pathLabelMnemonic=80 FileChooser.filterLabel.textAndMnemonic=Filt&re
FileChooser.filterLabelText=Filtre FileChooser.foldersLabel.textAndMnemonic=Dossiers(&L)
FileChooser.filterLabelMnemonic=82 FileChooser.filesLabel.textAndMnemonic=F&ichiers
FileChooser.foldersLabelText=Dossiers FileChooser.enterFileNameLabel.textAndMnemonic=E&ntrez le nom du fichier :
FileChooser.foldersLabelMnemonic=76 FileChooser.enterFolderNameLabel.textAndMnemonic=Entrez le nom du dossier :
FileChooser.filesLabelText=Fichiers
FileChooser.filesLabelMnemonic=73
FileChooser.enterFileNameLabelText=Entrez le nom du fichier :
FileChooser.enterFileNameLabelMnemonic=78
FileChooser.enterFolderNameLabelText=Entrez le nom du dossier :
FileChooser.cancelButtonToolTipText=Ferme la bo\u00EEte de dialogue du s\u00E9lecteur de fichiers. FileChooser.cancelButtonToolTip.textAndMnemonic=Ferme la bo\u00EEte de dialogue du s\u00E9lecteur de fichiers.
FileChooser.saveButtonToolTipText=Enregistre le fichier s\u00E9lectionn\u00E9. FileChooser.saveButtonToolTip.textAndMnemonic=Enregistre le fichier s\u00E9lectionn\u00E9.
FileChooser.openButtonToolTipText=Ouvre le fichier s\u00E9lectionn\u00E9. FileChooser.openButtonToolTip.textAndMnemonic=Ouvre le fichier s\u00E9lectionn\u00E9.
FileChooser.updateButtonToolTipText=Met \u00E0 jour la liste des r\u00E9pertoires. FileChooser.updateButtonToolTip.textAndMnemonic=Met \u00E0 jour la liste des r\u00E9pertoires.
FileChooser.helpButtonToolTipText=Aide du s\u00E9lecteur de fichiers FileChooser.helpButtonToolTip.textAndMnemonic=Aide du s\u00E9lecteur de fichiers

View file

@ -18,28 +18,23 @@
############ FILE CHOOSER STRINGS ############# ############ FILE CHOOSER STRINGS #############
FileChooser.acceptAllFileFilterText=* FileChooser.acceptAllFileFilter.textAndMnemonic=*
FileChooser.cancelButtonText=Annulla FileChooser.cancelButton.textAndMnemonic=Annulla
FileChooser.saveButtonText=Salva FileChooser.saveButton.textAndMnemonic=Salva
FileChooser.openButtonText=OK FileChooser.openButton.textAndMnemonic=OK
FileChooser.saveDialogTitleText=Salva FileChooser.saveDialogTitle.textAndMnemonic=Salva
FileChooser.openDialogTitleText=Apri FileChooser.openDialogTitle.textAndMnemonic=Apri
FileChooser.updateButtonText=Aggiorna FileChooser.updateButton.textAndMnemonic=Aggiorna
FileChooser.helpButtonText=? FileChooser.helpButton.textAndMnemonic=?
FileChooser.pathLabelText=Percorso o nome cartella: FileChooser.pathLabel.textAndMnemonic=&Percorso o nome cartella:
FileChooser.pathLabelMnemonic=80 FileChooser.filterLabel.textAndMnemonic=Filt&ro
FileChooser.filterLabelText=Filtro FileChooser.foldersLabel.textAndMnemonic=Carte&lle
FileChooser.filterLabelMnemonic=82 FileChooser.filesLabel.textAndMnemonic=F&ile
FileChooser.foldersLabelText=Cartelle FileChooser.enterFileNameLabel.textAndMnemonic=&Nome file:
FileChooser.foldersLabelMnemonic=76 FileChooser.enterFolderNameLabel.textAndMnemonic=Nome cartella:
FileChooser.filesLabelText=File
FileChooser.filesLabelMnemonic=73
FileChooser.enterFileNameLabelText=Nome file:
FileChooser.enterFileNameLabelMnemonic=78
FileChooser.enterFolderNameLabelText=Nome cartella:
FileChooser.cancelButtonToolTipText=Chiude la finestra di dialogo di selezione file. FileChooser.cancelButtonToolTip.textAndMnemonic=Chiude la finestra di dialogo di selezione file.
FileChooser.saveButtonToolTipText=Salva il file selezionato. FileChooser.saveButtonToolTip.textAndMnemonic=Salva il file selezionato.
FileChooser.openButtonToolTipText=Apre il file selezionato. FileChooser.openButtonToolTip.textAndMnemonic=Apre il file selezionato.
FileChooser.updateButtonToolTipText=Aggiorna lista directory. FileChooser.updateButtonToolTip.textAndMnemonic=Aggiorna lista directory.
FileChooser.helpButtonToolTipText=Guida FileChooser. FileChooser.helpButtonToolTip.textAndMnemonic=Guida FileChooser.

View file

@ -18,28 +18,23 @@
############ FILE CHOOSER STRINGS ############# ############ FILE CHOOSER STRINGS #############
FileChooser.acceptAllFileFilterText=* FileChooser.acceptAllFileFilter.textAndMnemonic=*
FileChooser.cancelButtonText=\u53D6\u6D88 FileChooser.cancelButton.textAndMnemonic=\u53D6\u6D88
FileChooser.saveButtonText=\u4FDD\u5B58 FileChooser.saveButton.textAndMnemonic=\u4FDD\u5B58
FileChooser.openButtonText=OK FileChooser.openButton.textAndMnemonic=OK
FileChooser.saveDialogTitleText=\u4FDD\u5B58 FileChooser.saveDialogTitle.textAndMnemonic=\u4FDD\u5B58
FileChooser.openDialogTitleText=\u958B\u304F FileChooser.openDialogTitle.textAndMnemonic=\u958B\u304F
FileChooser.updateButtonText=\u66F4\u65B0 FileChooser.updateButton.textAndMnemonic=\u66F4\u65B0
FileChooser.helpButtonText=\u30D8\u30EB\u30D7 FileChooser.helpButton.textAndMnemonic=\u30D8\u30EB\u30D7
FileChooser.pathLabelText=\u30D1\u30B9\u307E\u305F\u306F\u30D5\u30A9\u30EB\u30C0\u540D\u3092\u5165\u529B: FileChooser.pathLabel.textAndMnemonic=\u30D1\u30B9\u307E\u305F\u306F\u30D5\u30A9\u30EB\u30C0\u540D\u3092\u5165\u529B(&P):
FileChooser.pathLabelMnemonic=80 FileChooser.filterLabel.textAndMnemonic=\u30D5\u30A3\u30EB\u30BF(&R)
FileChooser.filterLabelText=\u30D5\u30A3\u30EB\u30BF FileChooser.foldersLabel.textAndMnemonic=\u30D5\u30A9\u30EB\u30C0(&L)
FileChooser.filterLabelMnemonic=82 FileChooser.filesLabel.textAndMnemonic=\u30D5\u30A1\u30A4\u30EB(&I)
FileChooser.foldersLabelText=\u30D5\u30A9\u30EB\u30C0 FileChooser.enterFileNameLabel.textAndMnemonic=\u30D5\u30A1\u30A4\u30EB\u540D\u3092\u5165\u529B(&N):
FileChooser.foldersLabelMnemonic=76 FileChooser.enterFolderNameLabel.textAndMnemonic=\u30D5\u30A9\u30EB\u30C0\u540D\u3092\u5165\u529B:
FileChooser.filesLabelText=\u30D5\u30A1\u30A4\u30EB
FileChooser.filesLabelMnemonic=73
FileChooser.enterFileNameLabelText=\u30D5\u30A1\u30A4\u30EB\u540D\u3092\u5165\u529B:
FileChooser.enterFileNameLabelMnemonic=78
FileChooser.enterFolderNameLabelText=\u30D5\u30A9\u30EB\u30C0\u540D\u3092\u5165\u529B:
FileChooser.cancelButtonToolTipText=\u30D5\u30A1\u30A4\u30EB\u30FB\u30C1\u30E5\u30FC\u30B6\u30FB\u30C0\u30A4\u30A2\u30ED\u30B0\u3092\u7D42\u4E86\u3057\u307E\u3059\u3002 FileChooser.cancelButtonToolTip.textAndMnemonic=\u30D5\u30A1\u30A4\u30EB\u30FB\u30C1\u30E5\u30FC\u30B6\u30FB\u30C0\u30A4\u30A2\u30ED\u30B0\u3092\u7D42\u4E86\u3057\u307E\u3059\u3002
FileChooser.saveButtonToolTipText=\u9078\u629E\u3057\u305F\u30D5\u30A1\u30A4\u30EB\u3092\u4FDD\u5B58\u3057\u307E\u3059\u3002 FileChooser.saveButtonToolTip.textAndMnemonic=\u9078\u629E\u3057\u305F\u30D5\u30A1\u30A4\u30EB\u3092\u4FDD\u5B58\u3057\u307E\u3059\u3002
FileChooser.openButtonToolTipText=\u9078\u629E\u3057\u305F\u30D5\u30A1\u30A4\u30EB\u3092\u958B\u304D\u307E\u3059\u3002 FileChooser.openButtonToolTip.textAndMnemonic=\u9078\u629E\u3057\u305F\u30D5\u30A1\u30A4\u30EB\u3092\u958B\u304D\u307E\u3059\u3002
FileChooser.updateButtonToolTipText=\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u30EA\u30B9\u30C8\u3092\u66F4\u65B0\u3057\u307E\u3059\u3002 FileChooser.updateButtonToolTip.textAndMnemonic=\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u30EA\u30B9\u30C8\u3092\u66F4\u65B0\u3057\u307E\u3059\u3002
FileChooser.helpButtonToolTipText=FileChooser\u306E\u30D8\u30EB\u30D7\u3067\u3059\u3002 FileChooser.helpButtonToolTip.textAndMnemonic=FileChooser\u306E\u30D8\u30EB\u30D7\u3067\u3059\u3002

View file

@ -18,28 +18,23 @@
############ FILE CHOOSER STRINGS ############# ############ FILE CHOOSER STRINGS #############
FileChooser.acceptAllFileFilterText=* FileChooser.acceptAllFileFilter.textAndMnemonic=*
FileChooser.cancelButtonText=\uCDE8\uC18C FileChooser.cancelButton.textAndMnemonic=\uCDE8\uC18C
FileChooser.saveButtonText=\uC800\uC7A5 FileChooser.saveButton.textAndMnemonic=\uC800\uC7A5
FileChooser.openButtonText=\uD655\uC778 FileChooser.openButton.textAndMnemonic=\uD655\uC778
FileChooser.saveDialogTitleText=\uC800\uC7A5 FileChooser.saveDialogTitle.textAndMnemonic=\uC800\uC7A5
FileChooser.openDialogTitleText=\uC5F4\uAE30 FileChooser.openDialogTitle.textAndMnemonic=\uC5F4\uAE30
FileChooser.updateButtonText=\uAC31\uC2E0 FileChooser.updateButton.textAndMnemonic=\uAC31\uC2E0
FileChooser.helpButtonText=\uB3C4\uC6C0\uB9D0 FileChooser.helpButton.textAndMnemonic=\uB3C4\uC6C0\uB9D0
FileChooser.pathLabelText=\uACBD\uB85C \uB610\uB294 \uD3F4\uB354 \uC774\uB984 \uC785\uB825: FileChooser.pathLabel.textAndMnemonic=\uACBD\uB85C \uB610\uB294 \uD3F4\uB354 \uC774\uB984 \uC785\uB825(&P):
FileChooser.pathLabelMnemonic=80 FileChooser.filterLabel.textAndMnemonic=\uD544\uD130(&R)
FileChooser.filterLabelText=\uD544\uD130 FileChooser.foldersLabel.textAndMnemonic=\uD3F4\uB354(&L)
FileChooser.filterLabelMnemonic=82 FileChooser.filesLabel.textAndMnemonic=\uD30C\uC77C(&I)
FileChooser.foldersLabelText=\uD3F4\uB354 FileChooser.enterFileNameLabel.textAndMnemonic=\uD30C\uC77C \uC774\uB984 \uC785\uB825(&N):
FileChooser.foldersLabelMnemonic=76 FileChooser.enterFolderNameLabel.textAndMnemonic=\uD3F4\uB354 \uC774\uB984 \uC785\uB825:
FileChooser.filesLabelText=\uD30C\uC77C
FileChooser.filesLabelMnemonic=73
FileChooser.enterFileNameLabelText=\uD30C\uC77C \uC774\uB984 \uC785\uB825:
FileChooser.enterFileNameLabelMnemonic=78
FileChooser.enterFolderNameLabelText=\uD3F4\uB354 \uC774\uB984 \uC785\uB825:
FileChooser.cancelButtonToolTipText=\uD30C\uC77C \uC120\uD0DD\uAE30 \uB300\uD654\uC0C1\uC790\uB97C \uC911\uB2E8\uD569\uB2C8\uB2E4. FileChooser.cancelButtonToolTip.textAndMnemonic=\uD30C\uC77C \uC120\uD0DD\uAE30 \uB300\uD654\uC0C1\uC790\uB97C \uC911\uB2E8\uD569\uB2C8\uB2E4.
FileChooser.saveButtonToolTipText=\uC120\uD0DD\uB41C \uD30C\uC77C\uC744 \uC800\uC7A5\uD569\uB2C8\uB2E4. FileChooser.saveButtonToolTip.textAndMnemonic=\uC120\uD0DD\uB41C \uD30C\uC77C\uC744 \uC800\uC7A5\uD569\uB2C8\uB2E4.
FileChooser.openButtonToolTipText=\uC120\uD0DD\uB41C \uD30C\uC77C\uC744 \uC5FD\uB2C8\uB2E4. FileChooser.openButtonToolTip.textAndMnemonic=\uC120\uD0DD\uB41C \uD30C\uC77C\uC744 \uC5FD\uB2C8\uB2E4.
FileChooser.updateButtonToolTipText=\uB514\uB809\uD1A0\uB9AC \uBAA9\uB85D\uC744 \uAC31\uC2E0\uD569\uB2C8\uB2E4. FileChooser.updateButtonToolTip.textAndMnemonic=\uB514\uB809\uD1A0\uB9AC \uBAA9\uB85D\uC744 \uAC31\uC2E0\uD569\uB2C8\uB2E4.
FileChooser.helpButtonToolTipText=FileChooser \uB3C4\uC6C0\uB9D0\uC785\uB2C8\uB2E4. FileChooser.helpButtonToolTip.textAndMnemonic=FileChooser \uB3C4\uC6C0\uB9D0\uC785\uB2C8\uB2E4.

View file

@ -18,28 +18,23 @@
############ FILE CHOOSER STRINGS ############# ############ FILE CHOOSER STRINGS #############
FileChooser.acceptAllFileFilterText=* FileChooser.acceptAllFileFilter.textAndMnemonic=*
FileChooser.cancelButtonText=Cancelar FileChooser.cancelButton.textAndMnemonic=Cancelar
FileChooser.saveButtonText=Salvar FileChooser.saveButton.textAndMnemonic=Salvar
FileChooser.openButtonText=OK FileChooser.openButton.textAndMnemonic=OK
FileChooser.saveDialogTitleText=Salvar FileChooser.saveDialogTitle.textAndMnemonic=Salvar
FileChooser.openDialogTitleText=Abrir FileChooser.openDialogTitle.textAndMnemonic=Abrir
FileChooser.updateButtonText=Atualizar FileChooser.updateButton.textAndMnemonic=Atualizar
FileChooser.helpButtonText=Ajuda FileChooser.helpButton.textAndMnemonic=Ajuda
FileChooser.pathLabelText=Informar caminho ou nome da pasta: FileChooser.pathLabel.textAndMnemonic=Informar caminho ou nome da &pasta:
FileChooser.pathLabelMnemonic=80 FileChooser.filterLabel.textAndMnemonic=Filt&ro
FileChooser.filterLabelText=Filtro FileChooser.foldersLabel.textAndMnemonic=Pastas(&L)
FileChooser.filterLabelMnemonic=82 FileChooser.filesLabel.textAndMnemonic=Arqu&ivos
FileChooser.foldersLabelText=Pastas FileChooser.enterFileNameLabel.textAndMnemonic=I&nformar nome do arquivo:
FileChooser.foldersLabelMnemonic=76 FileChooser.enterFolderNameLabel.textAndMnemonic=Informar nome da pasta:
FileChooser.filesLabelText=Arquivos
FileChooser.filesLabelMnemonic=73
FileChooser.enterFileNameLabelText=Informar nome do arquivo:
FileChooser.enterFileNameLabelMnemonic=78
FileChooser.enterFolderNameLabelText=Informar nome da pasta:
FileChooser.cancelButtonToolTipText=Abortar caixa de di\u00E1logo do seletor de arquivos. FileChooser.cancelButtonToolTip.textAndMnemonic=Abortar caixa de di\u00E1logo do seletor de arquivos.
FileChooser.saveButtonToolTipText=Salvar arquivo selecionado. FileChooser.saveButtonToolTip.textAndMnemonic=Salvar arquivo selecionado.
FileChooser.openButtonToolTipText=Abrir arquivo selecionado. FileChooser.openButtonToolTip.textAndMnemonic=Abrir arquivo selecionado.
FileChooser.updateButtonToolTipText=Atualizar lista de diret\u00F3rios. FileChooser.updateButtonToolTip.textAndMnemonic=Atualizar lista de diret\u00F3rios.
FileChooser.helpButtonToolTipText=Ajuda do FileChooser. FileChooser.helpButtonToolTip.textAndMnemonic=Ajuda do FileChooser.

View file

@ -18,28 +18,23 @@
############ FILE CHOOSER STRINGS ############# ############ FILE CHOOSER STRINGS #############
FileChooser.acceptAllFileFilterText=* FileChooser.acceptAllFileFilter.textAndMnemonic=*
FileChooser.cancelButtonText=Avbryt FileChooser.cancelButton.textAndMnemonic=Avbryt
FileChooser.saveButtonText=Spara FileChooser.saveButton.textAndMnemonic=Spara
FileChooser.openButtonText=OK FileChooser.openButton.textAndMnemonic=OK
FileChooser.saveDialogTitleText=Spara FileChooser.saveDialogTitle.textAndMnemonic=Spara
FileChooser.openDialogTitleText=\u00D6ppna FileChooser.openDialogTitle.textAndMnemonic=\u00D6ppna
FileChooser.updateButtonText=Uppdatera FileChooser.updateButton.textAndMnemonic=Uppdatera
FileChooser.helpButtonText=Hj\u00E4lp FileChooser.helpButton.textAndMnemonic=Hj\u00E4lp
FileChooser.pathLabelText=Ange s\u00F6kv\u00E4g eller mappnamn: FileChooser.pathLabel.textAndMnemonic=Ange s\u00F6kv\u00E4g eller mappnamn(&P):
FileChooser.pathLabelMnemonic=80 FileChooser.filterLabel.textAndMnemonic=Filte&r
FileChooser.filterLabelText=Filter FileChooser.foldersLabel.textAndMnemonic=Mappar(&L)
FileChooser.filterLabelMnemonic=82 FileChooser.filesLabel.textAndMnemonic=F&iler
FileChooser.foldersLabelText=Mappar FileChooser.enterFileNameLabel.textAndMnemonic=A&nge filnamn:
FileChooser.foldersLabelMnemonic=76 FileChooser.enterFolderNameLabel.textAndMnemonic=Ange ett mappnamn:
FileChooser.filesLabelText=Filer
FileChooser.filesLabelMnemonic=73
FileChooser.enterFileNameLabelText=Ange filnamn:
FileChooser.enterFileNameLabelMnemonic=78
FileChooser.enterFolderNameLabelText=Ange ett mappnamn:
FileChooser.cancelButtonToolTipText=Avbryt dialogrutan Filv\u00E4ljare. FileChooser.cancelButtonToolTip.textAndMnemonic=Avbryt dialogrutan Filv\u00E4ljare.
FileChooser.saveButtonToolTipText=Spara vald fil. FileChooser.saveButtonToolTip.textAndMnemonic=Spara vald fil.
FileChooser.openButtonToolTipText=\u00D6ppna vald fil. FileChooser.openButtonToolTip.textAndMnemonic=\u00D6ppna vald fil.
FileChooser.updateButtonToolTipText=Uppdatera kataloglistan. FileChooser.updateButtonToolTip.textAndMnemonic=Uppdatera kataloglistan.
FileChooser.helpButtonToolTipText=Hj\u00E4lp - Filv\u00E4ljare. FileChooser.helpButtonToolTip.textAndMnemonic=Hj\u00E4lp - Filv\u00E4ljare.

View file

@ -18,28 +18,23 @@
############ FILE CHOOSER STRINGS ############# ############ FILE CHOOSER STRINGS #############
FileChooser.acceptAllFileFilterText=* FileChooser.acceptAllFileFilter.textAndMnemonic=*
FileChooser.cancelButtonText=\u53D6\u6D88 FileChooser.cancelButton.textAndMnemonic=\u53D6\u6D88
FileChooser.saveButtonText=\u4FDD\u5B58 FileChooser.saveButton.textAndMnemonic=\u4FDD\u5B58
FileChooser.openButtonText=\u786E\u5B9A FileChooser.openButton.textAndMnemonic=\u786E\u5B9A
FileChooser.saveDialogTitleText=\u4FDD\u5B58 FileChooser.saveDialogTitle.textAndMnemonic=\u4FDD\u5B58
FileChooser.openDialogTitleText=\u6253\u5F00 FileChooser.openDialogTitle.textAndMnemonic=\u6253\u5F00
FileChooser.updateButtonText=\u66F4\u65B0 FileChooser.updateButton.textAndMnemonic=\u66F4\u65B0
FileChooser.helpButtonText=\u5E2E\u52A9 FileChooser.helpButton.textAndMnemonic=\u5E2E\u52A9
FileChooser.pathLabelText=\u952E\u5165\u8DEF\u5F84\u6216\u6587\u4EF6\u5939\u540D: FileChooser.pathLabel.textAndMnemonic=\u952E\u5165\u8DEF\u5F84\u6216\u6587\u4EF6\u5939\u540D: (&P)
FileChooser.pathLabelMnemonic=80 FileChooser.filterLabel.textAndMnemonic=\u7B5B\u9009\u5668(&R)
FileChooser.filterLabelText=\u7B5B\u9009\u5668 FileChooser.foldersLabel.textAndMnemonic=\u6587\u4EF6\u5939(&L)
FileChooser.filterLabelMnemonic=82 FileChooser.filesLabel.textAndMnemonic=\u6587\u4EF6(&I)
FileChooser.foldersLabelText=\u6587\u4EF6\u5939 FileChooser.enterFileNameLabel.textAndMnemonic=\u952E\u5165\u6587\u4EF6\u540D: (&N)
FileChooser.foldersLabelMnemonic=76 FileChooser.enterFolderNameLabel.textAndMnemonic=\u8F93\u5165\u6587\u4EF6\u5939\u540D:
FileChooser.filesLabelText=\u6587\u4EF6
FileChooser.filesLabelMnemonic=73
FileChooser.enterFileNameLabelText=\u952E\u5165\u6587\u4EF6\u540D:
FileChooser.enterFileNameLabelMnemonic=78
FileChooser.enterFolderNameLabelText=\u8F93\u5165\u6587\u4EF6\u5939\u540D:
FileChooser.cancelButtonToolTipText=\u4E2D\u6B62\u6587\u4EF6\u9009\u62E9\u5668\u5BF9\u8BDD\u6846\u3002 FileChooser.cancelButtonToolTip.textAndMnemonic=\u4E2D\u6B62\u6587\u4EF6\u9009\u62E9\u5668\u5BF9\u8BDD\u6846\u3002
FileChooser.saveButtonToolTipText=\u4FDD\u5B58\u6240\u9009\u6587\u4EF6\u3002 FileChooser.saveButtonToolTip.textAndMnemonic=\u4FDD\u5B58\u6240\u9009\u6587\u4EF6\u3002
FileChooser.openButtonToolTipText=\u6253\u5F00\u6240\u9009\u6587\u4EF6\u3002 FileChooser.openButtonToolTip.textAndMnemonic=\u6253\u5F00\u6240\u9009\u6587\u4EF6\u3002
FileChooser.updateButtonToolTipText=\u66F4\u65B0\u76EE\u5F55\u5217\u8868\u3002 FileChooser.updateButtonToolTip.textAndMnemonic=\u66F4\u65B0\u76EE\u5F55\u5217\u8868\u3002
FileChooser.helpButtonToolTipText=FileChooser \u5E2E\u52A9\u3002 FileChooser.helpButtonToolTip.textAndMnemonic=FileChooser \u5E2E\u52A9\u3002

View file

@ -18,28 +18,23 @@
############ FILE CHOOSER STRINGS ############# ############ FILE CHOOSER STRINGS #############
FileChooser.acceptAllFileFilterText=* FileChooser.acceptAllFileFilter.textAndMnemonic=*
FileChooser.cancelButtonText=\u53D6\u6D88 FileChooser.cancelButton.textAndMnemonic=\u53D6\u6D88
FileChooser.saveButtonText=\u5132\u5B58 FileChooser.saveButton.textAndMnemonic=\u5132\u5B58
FileChooser.openButtonText=\u78BA\u5B9A FileChooser.openButton.textAndMnemonic=\u78BA\u5B9A
FileChooser.saveDialogTitleText=\u5132\u5B58 FileChooser.saveDialogTitle.textAndMnemonic=\u5132\u5B58
FileChooser.openDialogTitleText=\u958B\u555F FileChooser.openDialogTitle.textAndMnemonic=\u958B\u555F
FileChooser.updateButtonText=\u66F4\u65B0 FileChooser.updateButton.textAndMnemonic=\u66F4\u65B0
FileChooser.helpButtonText=\u8AAA\u660E FileChooser.helpButton.textAndMnemonic=\u8AAA\u660E
FileChooser.pathLabelText=\u8F38\u5165\u8DEF\u5F91\u6216\u8CC7\u6599\u593E\u540D\u7A31: FileChooser.pathLabel.textAndMnemonic=\u8F38\u5165\u8DEF\u5F91\u6216\u8CC7\u6599\u593E\u540D\u7A31(&P):
FileChooser.pathLabelMnemonic=80 FileChooser.filterLabel.textAndMnemonic=\u7BE9\u9078(&R)
FileChooser.filterLabelText=\u7BE9\u9078 FileChooser.foldersLabel.textAndMnemonic=\u8CC7\u6599\u593E(&L)
FileChooser.filterLabelMnemonic=82 FileChooser.filesLabel.textAndMnemonic=\u6A94\u6848(&I)
FileChooser.foldersLabelText=\u8CC7\u6599\u593E FileChooser.enterFileNameLabel.textAndMnemonic=\u8F38\u5165\u6A94\u6848\u540D\u7A31(&N):
FileChooser.foldersLabelMnemonic=76 FileChooser.enterFolderNameLabel.textAndMnemonic=\u8F38\u5165\u8CC7\u6599\u593E\u540D\u7A31:
FileChooser.filesLabelText=\u6A94\u6848
FileChooser.filesLabelMnemonic=73
FileChooser.enterFileNameLabelText=\u8F38\u5165\u6A94\u6848\u540D\u7A31:
FileChooser.enterFileNameLabelMnemonic=78
FileChooser.enterFolderNameLabelText=\u8F38\u5165\u8CC7\u6599\u593E\u540D\u7A31:
FileChooser.cancelButtonToolTipText=\u4E2D\u6B62\u6A94\u6848\u9078\u64C7\u5668\u5C0D\u8A71\u65B9\u584A\u3002 FileChooser.cancelButtonToolTip.textAndMnemonic=\u4E2D\u6B62\u6A94\u6848\u9078\u64C7\u5668\u5C0D\u8A71\u65B9\u584A\u3002
FileChooser.saveButtonToolTipText=\u5132\u5B58\u9078\u53D6\u7684\u6A94\u6848\u3002 FileChooser.saveButtonToolTip.textAndMnemonic=\u5132\u5B58\u9078\u53D6\u7684\u6A94\u6848\u3002
FileChooser.openButtonToolTipText=\u958B\u555F\u9078\u53D6\u7684\u6A94\u6848\u3002 FileChooser.openButtonToolTip.textAndMnemonic=\u958B\u555F\u9078\u53D6\u7684\u6A94\u6848\u3002
FileChooser.updateButtonToolTipText=\u66F4\u65B0\u76EE\u9304\u6E05\u55AE\u3002 FileChooser.updateButtonToolTip.textAndMnemonic=\u66F4\u65B0\u76EE\u9304\u6E05\u55AE\u3002
FileChooser.helpButtonToolTipText=\u300C\u6A94\u6848\u9078\u64C7\u5668\u300D\u8AAA\u660E\u3002 FileChooser.helpButtonToolTip.textAndMnemonic=\u300C\u6A94\u6848\u9078\u64C7\u5668\u300D\u8AAA\u660E\u3002

Some files were not shown because too many files have changed in this diff Show more