This commit is contained in:
Vladimir Kozlov 2012-05-09 10:54:29 -07:00
commit 65e294a51d
9 changed files with 133 additions and 53 deletions

View File

@ -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:

View File

@ -59,7 +59,7 @@ typedef struct _MODULEINFO {
#include <Tlhelp32.h>
typedef unsigned int socklen_t;
typedef int socklen_t;
// #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);
}
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);
}

View File

@ -352,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; }

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());
_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();
}

View File

@ -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) {

View File

@ -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);

View File

@ -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:

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;
}
}