提交 d4b64e4d 编写于 作者: A amurillo

Merge

......@@ -35,7 +35,7 @@ HOTSPOT_VM_COPYRIGHT=Copyright 2011
HS_MAJOR_VER=24
HS_MINOR_VER=0
HS_BUILD_NUMBER=09
HS_BUILD_NUMBER=10
JDK_MAJOR_VER=1
JDK_MINOR_VER=8
......
......@@ -1462,7 +1462,11 @@ void LIR_Assembler::emit_opConvert(LIR_OpConvert* op) {
break;
case Bytecodes::_l2i:
#ifdef _LP64
__ movl(dest->as_register(), src->as_register_lo());
#else
move_regs(src->as_register_lo(), dest->as_register());
#endif
break;
case Bytecodes::_i2b:
......
......@@ -59,7 +59,7 @@ typedef struct _MODULEINFO {
#include <Tlhelp32.h>
typedef unsigned int socklen_t;
typedef int socklen_t;
// #include "jni.h"
......
......@@ -4820,99 +4820,92 @@ struct hostent* os::get_host_by_name(char* name) {
return (struct hostent*)os::WinSock2Dll::gethostbyname(name);
}
int os::socket_close(int fd) {
ShouldNotReachHere();
return 0;
return ::closesocket(fd);
}
int os::socket_available(int fd, jint *pbytes) {
ShouldNotReachHere();
return 0;
int ret = ::ioctlsocket(fd, FIONREAD, (u_long*)pbytes);
return (ret < 0) ? 0 : 1;
}
int os::socket(int domain, int type, int protocol) {
ShouldNotReachHere();
return 0;
return ::socket(domain, type, protocol);
}
int os::listen(int fd, int count) {
ShouldNotReachHere();
return 0;
return ::listen(fd, count);
}
int os::connect(int fd, struct sockaddr* him, socklen_t len) {
ShouldNotReachHere();
return 0;
return ::connect(fd, him, len);
}
int os::accept(int fd, struct sockaddr* him, socklen_t* len) {
ShouldNotReachHere();
return 0;
return ::accept(fd, him, len);
}
int os::sendto(int fd, char* buf, size_t len, uint flags,
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,
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) {
ShouldNotReachHere();
return 0;
return ::recv(fd, buf, (int)nBytes, flags);
}
int os::send(int fd, char* buf, size_t nBytes, uint flags) {
ShouldNotReachHere();
return 0;
return ::send(fd, buf, (int)nBytes, flags);
}
int os::raw_send(int fd, char* buf, size_t nBytes, uint flags) {
ShouldNotReachHere();
return 0;
return ::send(fd, buf, (int)nBytes, flags);
}
int os::timeout(int fd, long timeout) {
ShouldNotReachHere();
return 0;
fd_set tbl;
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) {
ShouldNotReachHere();
return 0;
return ::gethostname(name, namelen);
}
int os::socket_shutdown(int fd, int howto) {
ShouldNotReachHere();
return 0;
return ::shutdown(fd, howto);
}
int os::bind(int fd, struct sockaddr* him, socklen_t len) {
ShouldNotReachHere();
return 0;
return ::bind(fd, him, len);
}
int os::get_sock_name(int fd, struct sockaddr* him, socklen_t* len) {
ShouldNotReachHere();
return 0;
return ::getsockname(fd, him, len);
}
int os::get_sock_opt(int fd, int level, int optname,
char* optval, socklen_t* optlen) {
ShouldNotReachHere();
return 0;
return ::getsockopt(fd, level, optname, optval, optlen);
}
int os::set_sock_opt(int fd, int level, int optname,
const char* optval, socklen_t optlen) {
ShouldNotReachHere();
return 0;
return ::setsockopt(fd, level, optname, optval, optlen);
}
......
......@@ -3355,7 +3355,8 @@ instanceKlassHandle ClassFileParser::parseClassFile(Symbol* name,
static_field_size,
total_oop_map_count,
access_flags,
rt, CHECK_(nullHandle));
rt, host_klass,
CHECK_(nullHandle));
instanceKlassHandle this_klass (THREAD, ik);
assert(this_klass->static_field_size() == static_field_size, "sanity");
......
......@@ -128,11 +128,12 @@ klassOop oopFactory::new_instanceKlass(Symbol* name, int vtable_len, int itable_
int static_field_size,
unsigned int nonstatic_oop_map_count,
AccessFlags access_flags,
ReferenceType rt, TRAPS) {
ReferenceType rt,
KlassHandle host_klass, TRAPS) {
instanceKlassKlass* ikk = instanceKlassKlass::cast(Universe::instanceKlassKlassObj());
return ikk->allocate_instance_klass(name, vtable_len, itable_len,
static_field_size, nonstatic_oop_map_count,
access_flags, rt, CHECK_NULL);
access_flags, rt, host_klass, CHECK_NULL);
}
......
......@@ -78,7 +78,8 @@ class oopFactory: AllStatic {
int static_field_size,
unsigned int nonstatic_oop_map_count,
AccessFlags access_flags,
ReferenceType rt, TRAPS);
ReferenceType rt,
KlassHandle host_klass, TRAPS);
// Methods
private:
......
......@@ -880,10 +880,17 @@ class ContiguousSpace: public CompactibleSpace {
void object_iterate_mem(MemRegion mr, UpwardsObjectClosure* cl);
// iterates on objects up to the safe limit
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
// 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
// In support of parallel oop_iterate.
......
......@@ -67,17 +67,4 @@ OffsetTableContigSpace::block_start_const(const void* p) const {
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
......@@ -1862,7 +1862,7 @@ void instanceKlass::follow_weak_klass_links(
if (impl != NULL) {
if (!is_alive->do_object_b(impl)) {
// remove this guy
*start_of_implementor() = NULL;
*adr_implementor() = NULL;
}
}
} else {
......
......@@ -78,6 +78,7 @@
// The embedded nonstatic oop-map blocks are short pairs (offset, length)
// indicating where oops are located in instances of this klass.
// [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
......@@ -176,10 +177,6 @@ class instanceKlass: public Klass {
oop _class_loader;
// 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.
objArrayOop _signers;
// 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
bool _is_marked_dependent; // used for marking during flushing and deoptimization
bool _rewritten; // methods rewritten.
bool _has_nonstatic_fields; // for sizing with UseCompressedOops
bool _should_verify_class; // allow caching of preverification
enum {
_misc_rewritten = 1 << 0, // methods rewritten.
_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 _major_version; // major version number of class file
Thread* _init_thread; // Pointer to current thread doing initialization (to handle recusive initialization)
......@@ -276,13 +277,29 @@ class instanceKlass: public Klass {
// NULL: no implementor.
// A klassOop that's not itself: one implementor.
// 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 SystemDictionary;
public:
bool has_nonstatic_fields() const { return _has_nonstatic_fields; }
void set_has_nonstatic_fields(bool b) { _has_nonstatic_fields = b; }
bool has_nonstatic_fields() const {
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
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; }
// 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; }
......@@ -396,11 +413,19 @@ class instanceKlass: public Klass {
bool is_in_error_state() const { return _init_state == initialization_error; }
bool is_reentrant_initialization(Thread *thread) { return thread == _init_thread; }
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
bool should_verify_class() const { return _should_verify_class; }
void set_should_verify_class(bool value) { _should_verify_class = value; }
bool should_verify_class() const {
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
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); }
// host class
oop host_klass() const { return _host_klass; }
void set_host_klass(oop host) { oop_store((oop*) &_host_klass, host); }
bool is_anonymous() const { return _host_klass != NULL; }
oop host_klass() const {
oop* hk = adr_host_klass();
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
objArrayOop signers() const { return _signers; }
......@@ -651,7 +697,7 @@ class instanceKlass: public Klass {
// Access to the implementor of an interface.
klassOop implementor() const
{
klassOop* k = start_of_implementor();
klassOop* k = (klassOop*)adr_implementor();
if (k == NULL) {
return NULL;
} else {
......@@ -661,7 +707,7 @@ class instanceKlass: public Klass {
void set_implementor(klassOop k) {
assert(is_interface(), "not interface");
oop* addr = (oop*)start_of_implementor();
oop* addr = adr_implementor();
oop_store_without_check(addr, k);
}
......@@ -717,9 +763,11 @@ class instanceKlass: public Klass {
{
return object_size(align_object_offset(vtable_length()) +
align_object_offset(itable_length()) +
(is_interface() ?
(align_object_offset(nonstatic_oop_map_size()) + (int)sizeof(klassOop)/HeapWordSize) :
nonstatic_oop_map_size()));
((is_interface() || is_anonymous()) ?
align_object_offset(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_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()));
}
klassOop* start_of_implementor() const {
oop* adr_implementor() const {
if (is_interface()) {
return (klassOop*)(start_of_nonstatic_oop_maps() +
nonstatic_oop_map_count());
return (oop*)(start_of_nonstatic_oop_maps() +
nonstatic_oop_map_count());
} else {
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
juint alloc_size() const { return _alloc_count * size_helper(); }
void set_alloc_size(juint n) {}
......@@ -819,7 +881,7 @@ private:
#else
void set_init_state(ClassState state) { _init_state = (u1)state; }
#endif
void set_rewritten() { _rewritten = true; }
void set_rewritten() { _misc_flags |= _misc_rewritten; }
void set_init_thread(Thread *thread) { _init_thread = thread; }
u2 idnum_allocated_count() const { return _idnum_allocated_count; }
......@@ -852,10 +914,8 @@ private:
oop* adr_constants() const { return (oop*)&this->_constants;}
oop* adr_class_loader() const { return (oop*)&this->_class_loader;}
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_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_cached_itable_indices() const { return (oop*)&this->_methods_cached_itable_indices;}
oop* adr_class_annotations() const { return (oop*)&this->_class_annotations;}
......
......@@ -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_inner_classes());
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_class_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_inner_classes());
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_class_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_class_loader());
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_inner_classes());
if (ik->is_interface()) {
if (ik->adr_implementor() != NULL) {
blk->do_oop(ik->adr_implementor());
}
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();
if (mr.contains(adr)) blk->do_oop(adr);
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();
if (mr.contains(adr)) blk->do_oop(adr);
adr = ik->adr_inner_classes();
if (mr.contains(adr)) blk->do_oop(adr);
if (ik->is_interface()) {
adr = ik->adr_implementor();
if (mr.contains(adr)) blk->do_oop(adr);
}
adr = ik->adr_implementor();
if (adr != NULL && mr.contains(adr)) blk->do_oop(adr);
adr = ik->adr_class_annotations();
if (mr.contains(adr)) blk->do_oop(adr);
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_class_loader());
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_inner_classes());
if (ik->is_interface()) {
if (ik->adr_implementor() != NULL) {
MarkSweep::adjust_pointer(ik->adr_implementor());
}
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();
if (PSScavenge::should_scavenge(hk_addr)) {
if (hk_addr != NULL && PSScavenge::should_scavenge(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) {
PSParallelCompact::adjust_pointer(cur_oop);
}
if (ik->is_interface()) {
// embedded oops
if (ik->adr_implementor() != NULL) {
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();
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,
unsigned nonstatic_oop_map_count,
AccessFlags access_flags,
ReferenceType rt, TRAPS) {
ReferenceType rt,
KlassHandle host_klass, TRAPS) {
const int nonstatic_oop_map_size =
instanceKlass::nonstatic_oop_map_size(nonstatic_oop_map_count);
int size = align_object_offset(vtable_len) + align_object_offset(itable_len);
if (access_flags.is_interface()) {
size += align_object_offset(nonstatic_oop_map_size) + (int)sizeof(klassOop)/HeapWordSize;
if (access_flags.is_interface() || !host_klass.is_null()) {
size += align_object_offset(nonstatic_oop_map_size);
} else {
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);
// 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_nonstatic_oop_map_size(nonstatic_oop_map_size);
ik->set_access_flags(access_flags);
ik->set_is_anonymous(!host_klass.is_null());
assert(k()->size() == size, "wrong size for object");
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_class_loader(NULL);
ik->set_protection_domain(NULL);
ik->set_host_klass(NULL);
ik->set_signers(NULL);
ik->set_source_file_name(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"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"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();
if (ik->source_file_name() != NULL) {
st->print(BULLET"source file: ");
......
......@@ -48,6 +48,7 @@ class instanceKlassKlass : public klassKlass {
unsigned int nonstatic_oop_map_count,
AccessFlags access_flags,
ReferenceType rt,
KlassHandle host_klass,
TRAPS);
// Casting from klassOop
......
......@@ -137,6 +137,7 @@ JVMState* DirectCallGenerator::generate(JVMState* jvms) {
}
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) {
// Make an explicit receiver null_check as part of this call.
// 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);
Node* ret = kit.set_results_for_java_call(call, _separate_io_proj);
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();
}
......
......@@ -897,8 +897,8 @@ bool StringConcat::validate_control_flow() {
}
Node* PhaseStringOpts::fetch_static_field(GraphKit& kit, ciField* field) {
const TypeKlassPtr* klass_type = TypeKlassPtr::make(field->holder());
Node* klass_node = __ makecon(klass_type);
const TypeInstPtr* mirror_type = TypeInstPtr::make(field->holder()->java_mirror());
Node* klass_node = __ makecon(mirror_type);
BasicType bt = field->layout_type();
ciType* field_klass = field->type();
......@@ -913,6 +913,7 @@ Node* PhaseStringOpts::fetch_static_field(GraphKit& kit, ciField* field) {
// and may yield a vacuous result if the field is of interface type.
type = TypeOopPtr::make_from_constant(con, true)->isa_oopptr();
assert(type != NULL, "field singleton type must be consistent");
return __ makecon(type);
} else {
type = TypeOopPtr::make_from_klass(field_klass->as_klass());
}
......@@ -922,7 +923,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()),
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) {
......
......@@ -1221,12 +1221,11 @@ Node* SuperWord::vector_opd(Node_List* p, int opd_idx) {
return opd; // input is matching vector
}
assert(!opd->is_VectorStore(), "such vector is not expected here");
// Convert scalar input to vector. Use p0's type because it's container
// maybe smaller than the operand's container.
const Type* opd_t = velt_type(!in_bb(opd) ? p0 : opd);
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, opd_t);
// Convert scalar input to vector with the same number of elements as
// p0's vector. Use p0's type because size of operand's container in
// vector should match p0's size regardless operand's size.
const Type* p0_t = velt_type(p0);
VectorNode* vn = VectorNode::scalar2vector(_phase->C, opd, vlen, p0_t);
_phase->_igvn.register_new_node_with_optimizer(vn);
_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
const Type* opd_t = velt_type(!in_bb(opd) ? p0 : opd);
PackNode* pk = PackNode::make(_phase->C, opd, opd_t);
const Type* p0_t = velt_type(p0);
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++) {
Node* pi = p->at(i);
Node* in = pi->in(opd_idx);
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);
}
_phase->_igvn.register_new_node_with_optimizer(pk);
......
......@@ -148,6 +148,8 @@ void Flag::print_as_flag(outputStream* st) {
st->print("-XX:%s=" UINTX_FORMAT, name, get_uintx());
} else if (is_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()) {
st->print("-XX:%s=", name);
const char* cp = get_ccstr();
......
......@@ -13,7 +13,18 @@
Porter, 1980, An algorithm for suffix stripping, Program, Vol. 14,
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:
......
/*
* 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;
}
}
/*
* 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");
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册