Merge

Wed, 09 May 2012 10:54:29 -0700

author
kvn
date
Wed, 09 May 2012 10:54:29 -0700
changeset 3750
2766551175a0
parent 3742
38b4116b6766
parent 3749
3a97daec1b34
child 3753
5799726c54d7
child 3778
2f4819f92dc7

Merge

src/share/vm/oops/instanceKlass.hpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp	Sat May 05 10:24:55 2012 -0400
     1.2 +++ b/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp	Wed May 09 10:54:29 2012 -0700
     1.3 @@ -1462,7 +1462,11 @@
     1.4        break;
     1.5  
     1.6      case Bytecodes::_l2i:
     1.7 +#ifdef _LP64
     1.8 +      __ movl(dest->as_register(), src->as_register_lo());
     1.9 +#else
    1.10        move_regs(src->as_register_lo(), dest->as_register());
    1.11 +#endif
    1.12        break;
    1.13  
    1.14      case Bytecodes::_i2b:
     2.1 --- a/src/os/windows/vm/jvm_windows.h	Sat May 05 10:24:55 2012 -0400
     2.2 +++ b/src/os/windows/vm/jvm_windows.h	Wed May 09 10:54:29 2012 -0700
     2.3 @@ -59,7 +59,7 @@
     2.4  
     2.5  #include <Tlhelp32.h>
     2.6  
     2.7 -typedef unsigned int socklen_t;
     2.8 +typedef int socklen_t;
     2.9  
    2.10  // #include "jni.h"
    2.11  
     3.1 --- a/src/os/windows/vm/os_windows.cpp	Sat May 05 10:24:55 2012 -0400
     3.2 +++ b/src/os/windows/vm/os_windows.cpp	Wed May 09 10:54:29 2012 -0700
     3.3 @@ -4820,99 +4820,92 @@
     3.4    return (struct hostent*)os::WinSock2Dll::gethostbyname(name);
     3.5  }
     3.6  
     3.7 -
     3.8  int os::socket_close(int fd) {
     3.9 -  ShouldNotReachHere();
    3.10 -  return 0;
    3.11 +  return ::closesocket(fd);
    3.12  }
    3.13  
    3.14  int os::socket_available(int fd, jint *pbytes) {
    3.15 -  ShouldNotReachHere();
    3.16 -  return 0;
    3.17 +  int ret = ::ioctlsocket(fd, FIONREAD, (u_long*)pbytes);
    3.18 +  return (ret < 0) ? 0 : 1;
    3.19  }
    3.20  
    3.21  int os::socket(int domain, int type, int protocol) {
    3.22 -  ShouldNotReachHere();
    3.23 -  return 0;
    3.24 +  return ::socket(domain, type, protocol);
    3.25  }
    3.26  
    3.27  int os::listen(int fd, int count) {
    3.28 -  ShouldNotReachHere();
    3.29 -  return 0;
    3.30 +  return ::listen(fd, count);
    3.31  }
    3.32  
    3.33  int os::connect(int fd, struct sockaddr* him, socklen_t len) {
    3.34 -  ShouldNotReachHere();
    3.35 -  return 0;
    3.36 +  return ::connect(fd, him, len);
    3.37  }
    3.38  
    3.39  int os::accept(int fd, struct sockaddr* him, socklen_t* len) {
    3.40 -  ShouldNotReachHere();
    3.41 -  return 0;
    3.42 +  return ::accept(fd, him, len);
    3.43  }
    3.44  
    3.45  int os::sendto(int fd, char* buf, size_t len, uint flags,
    3.46                 struct sockaddr* to, socklen_t tolen) {
    3.47 -  ShouldNotReachHere();
    3.48 -  return 0;
    3.49 +
    3.50 +  return ::sendto(fd, buf, (int)len, flags, to, tolen);
    3.51  }
    3.52  
    3.53  int os::recvfrom(int fd, char *buf, size_t nBytes, uint flags,
    3.54                   sockaddr* from, socklen_t* fromlen) {
    3.55 -  ShouldNotReachHere();
    3.56 -  return 0;
    3.57 +
    3.58 +  return ::recvfrom(fd, buf, (int)nBytes, flags, from, fromlen);
    3.59  }
    3.60  
    3.61  int os::recv(int fd, char* buf, size_t nBytes, uint flags) {
    3.62 -  ShouldNotReachHere();
    3.63 -  return 0;
    3.64 +  return ::recv(fd, buf, (int)nBytes, flags);
    3.65  }
    3.66  
    3.67  int os::send(int fd, char* buf, size_t nBytes, uint flags) {
    3.68 -  ShouldNotReachHere();
    3.69 -  return 0;
    3.70 +  return ::send(fd, buf, (int)nBytes, flags);
    3.71  }
    3.72  
    3.73  int os::raw_send(int fd, char* buf, size_t nBytes, uint flags) {
    3.74 -  ShouldNotReachHere();
    3.75 -  return 0;
    3.76 +  return ::send(fd, buf, (int)nBytes, flags);
    3.77  }
    3.78  
    3.79  int os::timeout(int fd, long timeout) {
    3.80 -  ShouldNotReachHere();
    3.81 -  return 0;
    3.82 +  fd_set tbl;
    3.83 +  struct timeval t;
    3.84 +
    3.85 +  t.tv_sec  = timeout / 1000;
    3.86 +  t.tv_usec = (timeout % 1000) * 1000;
    3.87 +
    3.88 +  tbl.fd_count    = 1;
    3.89 +  tbl.fd_array[0] = fd;
    3.90 +
    3.91 +  return ::select(1, &tbl, 0, 0, &t);
    3.92  }
    3.93  
    3.94  int os::get_host_name(char* name, int namelen) {
    3.95 -  ShouldNotReachHere();
    3.96 -  return 0;
    3.97 +  return ::gethostname(name, namelen);
    3.98  }
    3.99  
   3.100  int os::socket_shutdown(int fd, int howto) {
   3.101 -  ShouldNotReachHere();
   3.102 -  return 0;
   3.103 +  return ::shutdown(fd, howto);
   3.104  }
   3.105  
   3.106  int os::bind(int fd, struct sockaddr* him, socklen_t len) {
   3.107 -  ShouldNotReachHere();
   3.108 -  return 0;
   3.109 +  return ::bind(fd, him, len);
   3.110  }
   3.111  
   3.112  int os::get_sock_name(int fd, struct sockaddr* him, socklen_t* len) {
   3.113 -  ShouldNotReachHere();
   3.114 -  return 0;
   3.115 +  return ::getsockname(fd, him, len);
   3.116  }
   3.117  
   3.118  int os::get_sock_opt(int fd, int level, int optname,
   3.119                       char* optval, socklen_t* optlen) {
   3.120 -  ShouldNotReachHere();
   3.121 -  return 0;
   3.122 +  return ::getsockopt(fd, level, optname, optval, optlen);
   3.123  }
   3.124  
   3.125  int os::set_sock_opt(int fd, int level, int optname,
   3.126                       const char* optval, socklen_t optlen) {
   3.127 -  ShouldNotReachHere();
   3.128 -  return 0;
   3.129 +  return ::setsockopt(fd, level, optname, optval, optlen);
   3.130  }
   3.131  
   3.132  
     4.1 --- a/src/share/vm/oops/instanceKlass.hpp	Sat May 05 10:24:55 2012 -0400
     4.2 +++ b/src/share/vm/oops/instanceKlass.hpp	Wed May 09 10:54:29 2012 -0700
     4.3 @@ -352,7 +352,7 @@
     4.4    int java_fields_count() const           { return (int)_java_fields_count; }
     4.5  
     4.6    // Number of fields including any injected fields
     4.7 -  int all_fields_count() const            { return _fields->length() / sizeof(FieldInfo::field_slots); }
     4.8 +  int all_fields_count() const            { return _fields->length() / FieldInfo::field_slots; }
     4.9  
    4.10    typeArrayOop fields() const              { return _fields; }
    4.11  
     5.1 --- a/src/share/vm/opto/callGenerator.cpp	Sat May 05 10:24:55 2012 -0400
     5.2 +++ b/src/share/vm/opto/callGenerator.cpp	Wed May 09 10:54:29 2012 -0700
     5.3 @@ -137,6 +137,7 @@
     5.4    }
     5.5  
     5.6    CallStaticJavaNode *call = new (kit.C, tf()->domain()->cnt()) CallStaticJavaNode(tf(), target, method(), kit.bci());
     5.7 +  _call_node = call;  // Save the call node in case we need it later
     5.8    if (!is_static) {
     5.9      // Make an explicit receiver null_check as part of this call.
    5.10      // Since we share a map with the caller, his JVMS gets adjusted.
    5.11 @@ -155,7 +156,6 @@
    5.12    kit.set_edges_for_java_call(call, false, _separate_io_proj);
    5.13    Node* ret = kit.set_results_for_java_call(call, _separate_io_proj);
    5.14    kit.push_node(method()->return_type()->basic_type(), ret);
    5.15 -  _call_node = call;  // Save the call node in case we need it later
    5.16    return kit.transfer_exceptions_into_jvms();
    5.17  }
    5.18  
     6.1 --- a/src/share/vm/opto/stringopts.cpp	Sat May 05 10:24:55 2012 -0400
     6.2 +++ b/src/share/vm/opto/stringopts.cpp	Wed May 09 10:54:29 2012 -0700
     6.3 @@ -897,8 +897,8 @@
     6.4  }
     6.5  
     6.6  Node* PhaseStringOpts::fetch_static_field(GraphKit& kit, ciField* field) {
     6.7 -  const TypeKlassPtr* klass_type = TypeKlassPtr::make(field->holder());
     6.8 -  Node* klass_node = __ makecon(klass_type);
     6.9 +  const TypeInstPtr* mirror_type = TypeInstPtr::make(field->holder()->java_mirror());
    6.10 +  Node* klass_node = __ makecon(mirror_type);
    6.11    BasicType bt = field->layout_type();
    6.12    ciType* field_klass = field->type();
    6.13  
    6.14 @@ -913,6 +913,7 @@
    6.15        // and may yield a vacuous result if the field is of interface type.
    6.16        type = TypeOopPtr::make_from_constant(con, true)->isa_oopptr();
    6.17        assert(type != NULL, "field singleton type must be consistent");
    6.18 +      return __ makecon(type);
    6.19      } else {
    6.20        type = TypeOopPtr::make_from_klass(field_klass->as_klass());
    6.21      }
    6.22 @@ -922,7 +923,7 @@
    6.23  
    6.24    return kit.make_load(NULL, kit.basic_plus_adr(klass_node, field->offset_in_bytes()),
    6.25                         type, T_OBJECT,
    6.26 -                       C->get_alias_index(klass_type->add_offset(field->offset_in_bytes())));
    6.27 +                       C->get_alias_index(mirror_type->add_offset(field->offset_in_bytes())));
    6.28  }
    6.29  
    6.30  Node* PhaseStringOpts::int_stringSize(GraphKit& kit, Node* arg) {
     7.1 --- a/src/share/vm/opto/superword.cpp	Sat May 05 10:24:55 2012 -0400
     7.2 +++ b/src/share/vm/opto/superword.cpp	Wed May 09 10:54:29 2012 -0700
     7.3 @@ -1221,12 +1221,11 @@
     7.4        return opd; // input is matching vector
     7.5      }
     7.6      assert(!opd->is_VectorStore(), "such vector is not expected here");
     7.7 -    // Convert scalar input to vector. Use p0's type because it's container
     7.8 -    // maybe smaller than the operand's container.
     7.9 -    const Type* opd_t = velt_type(!in_bb(opd) ? p0 : opd);
    7.10 -    const Type* p0_t  = velt_type(p0);
    7.11 -    if (p0_t->higher_equal(opd_t)) opd_t = p0_t;
    7.12 -    VectorNode* vn    = VectorNode::scalar2vector(_phase->C, opd, vlen, opd_t);
    7.13 +    // Convert scalar input to vector with the same number of elements as
    7.14 +    // p0's vector. Use p0's type because size of operand's container in
    7.15 +    // vector should match p0's size regardless operand's size.
    7.16 +    const Type* p0_t = velt_type(p0);
    7.17 +    VectorNode* vn = VectorNode::scalar2vector(_phase->C, opd, vlen, p0_t);
    7.18  
    7.19      _phase->_igvn.register_new_node_with_optimizer(vn);
    7.20      _phase->set_ctrl(vn, _phase->get_ctrl(opd));
    7.21 @@ -1234,14 +1233,15 @@
    7.22    }
    7.23  
    7.24    // Insert pack operation
    7.25 -  const Type* opd_t = velt_type(!in_bb(opd) ? p0 : opd);
    7.26 -  PackNode* pk = PackNode::make(_phase->C, opd, opd_t);
    7.27 +  const Type* p0_t = velt_type(p0);
    7.28 +  PackNode* pk = PackNode::make(_phase->C, opd, p0_t);
    7.29 +  DEBUG_ONLY( const BasicType opd_bt = opd->bottom_type()->basic_type(); )
    7.30  
    7.31    for (uint i = 1; i < vlen; i++) {
    7.32      Node* pi = p->at(i);
    7.33      Node* in = pi->in(opd_idx);
    7.34      assert(my_pack(in) == NULL, "Should already have been unpacked");
    7.35 -    assert(opd_t == velt_type(!in_bb(in) ? pi : in), "all same type");
    7.36 +    assert(opd_bt == in->bottom_type()->basic_type(), "all same type");
    7.37      pk->add_opd(in);
    7.38    }
    7.39    _phase->_igvn.register_new_node_with_optimizer(pk);
     8.1 --- a/test/compiler/7070134/Stemmer.java	Sat May 05 10:24:55 2012 -0400
     8.2 +++ b/test/compiler/7070134/Stemmer.java	Wed May 09 10:54:29 2012 -0700
     8.3 @@ -13,7 +13,18 @@
     8.4         Porter, 1980, An algorithm for suffix stripping, Program, Vol. 14,
     8.5         no. 3, pp 130-137,
     8.6  
     8.7 -   See also http://www.tartarus.org/~martin/PorterStemmer
     8.8 +   http://www.tartarus.org/~martin/PorterStemmer
     8.9 +
    8.10 +   The software is completely free for any purpose, unless notes at the head
    8.11 +   of the program text indicates otherwise (which is rare). In any case,
    8.12 +   the notes about licensing are never more restrictive than the BSD License.
    8.13 +
    8.14 +   In every case where the software is not written by me (Martin Porter),
    8.15 +   this licensing arrangement has been endorsed by the contributor, and it is
    8.16 +   therefore unnecessary to ask the contributor again to confirm it.
    8.17 +
    8.18 +   I have not asked any contributors (or their employers, if they have them)
    8.19 +   for proofs that they have the right to distribute their software in this way.
    8.20  
    8.21     History:
    8.22  
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/test/compiler/7160610/Test7160610.java	Wed May 09 10:54:29 2012 -0700
     9.3 @@ -0,0 +1,71 @@
     9.4 +/*
     9.5 + * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
     9.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     9.7 + *
     9.8 + * This code is free software; you can redistribute it and/or modify it
     9.9 + * under the terms of the GNU General Public License version 2 only, as
    9.10 + * published by the Free Software Foundation.
    9.11 + *
    9.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
    9.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    9.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    9.15 + * version 2 for more details (a copy is included in the LICENSE file that
    9.16 + * accompanied this code).
    9.17 + *
    9.18 + * You should have received a copy of the GNU General Public License version
    9.19 + * 2 along with this work; if not, write to the Free Software Foundation,
    9.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    9.21 + *
    9.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    9.23 + * or visit www.oracle.com if you need additional information or have any
    9.24 + * questions.
    9.25 + *
    9.26 + */
    9.27 +
    9.28 +/**
    9.29 + * @test
    9.30 + * @bug 7160610
    9.31 + * @summary Unknown Native Code compilation issue.
    9.32 + *
    9.33 + * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-OptimizeFill Test7160610
    9.34 + */
    9.35 +
    9.36 +public class Test7160610 {
    9.37 +  private static final byte[] BYTE_ARRAY = new byte[7];
    9.38 +  private static int[] anIntArray1190 = new int[32768];
    9.39 +  private static int[] anIntArray1191 = new int[32768];
    9.40 +
    9.41 +  public static void main(String arg[]) {
    9.42 +    int i = 256;
    9.43 +    for(int j = BYTE_ARRAY[2]; j < anIntArray1190.length; j++) {
    9.44 +      anIntArray1190[j] = BYTE_ARRAY[2];
    9.45 +    }
    9.46 +
    9.47 +    for(int k = BYTE_ARRAY[2]; (k ^ BYTE_ARRAY[1]) > -5001; k++) {
    9.48 +      int i1 = (int)(Math.random() * 128D * (double)i);
    9.49 +      anIntArray1190[i1] = (int)(Math.random() * 256D);
    9.50 +    }
    9.51 +
    9.52 +    for(int l = BYTE_ARRAY[2]; (l ^ BYTE_ARRAY[1]) > -21; l++) {
    9.53 +      for(int j1 = BYTE_ARRAY[0]; j1 < i + -BYTE_ARRAY[0]; j1++) {
    9.54 +        for(int k1 = BYTE_ARRAY[0]; (k1 ^ BYTE_ARRAY[1]) > -128; k1++) {
    9.55 +          int l1 = k1 - -(j1 << 0x26cb6487);
    9.56 +          anIntArray1191[l1] = (anIntArray1190[l1 + -BYTE_ARRAY[0]] - -anIntArray1190[l1 - -BYTE_ARRAY[0]] - -anIntArray1190[-128 + l1] - -anIntArray1190[128 + l1]) / BYTE_ARRAY[6];
    9.57 +        }
    9.58 +      }
    9.59 +      int ai[] = anIntArray1190;
    9.60 +      anIntArray1190 = anIntArray1191;
    9.61 +      anIntArray1191 = ai;
    9.62 +    }
    9.63 +  }
    9.64 +
    9.65 +  static {
    9.66 +    BYTE_ARRAY[6] = 4;
    9.67 +    BYTE_ARRAY[5] = 5;
    9.68 +    BYTE_ARRAY[4] = 3;
    9.69 +    BYTE_ARRAY[3] = 2;
    9.70 +    BYTE_ARRAY[2] = 0;
    9.71 +    BYTE_ARRAY[1] = -1;
    9.72 +    BYTE_ARRAY[0] = 1;
    9.73 +  }
    9.74 +}

mercurial