< prev index next >

src/share/vm/opto/escape.cpp

Print this page


   1 /*
   2  * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 939           //
 940           // src or dst could be j.l.Object when other is basic type array:
 941           //
 942           //   arraycopy(char[],0,Object*,0,size);
 943           //   arraycopy(Object*,0,char[],0,size);
 944           //
 945           // Don't add edges in such cases.
 946           //
 947           bool arg_is_arraycopy_dest = src_has_oops && is_arraycopy &&
 948                                        arg_has_oops && (i > TypeFunc::Parms);
 949 #ifdef ASSERT
 950           if (!(is_arraycopy ||
 951                 (call->as_CallLeaf()->_name != NULL &&
 952                  (strcmp(call->as_CallLeaf()->_name, "g1_wb_pre")  == 0 ||
 953                   strcmp(call->as_CallLeaf()->_name, "g1_wb_post") == 0 ||
 954                   strcmp(call->as_CallLeaf()->_name, "updateBytesCRC32") == 0 ||
 955                   strcmp(call->as_CallLeaf()->_name, "aescrypt_encryptBlock") == 0 ||
 956                   strcmp(call->as_CallLeaf()->_name, "aescrypt_decryptBlock") == 0 ||
 957                   strcmp(call->as_CallLeaf()->_name, "cipherBlockChaining_encryptAESCrypt") == 0 ||
 958                   strcmp(call->as_CallLeaf()->_name, "cipherBlockChaining_decryptAESCrypt") == 0 ||

 959                   strcmp(call->as_CallLeaf()->_name, "sha1_implCompress") == 0 ||
 960                   strcmp(call->as_CallLeaf()->_name, "sha1_implCompressMB") == 0 ||
 961                   strcmp(call->as_CallLeaf()->_name, "sha256_implCompress") == 0 ||
 962                   strcmp(call->as_CallLeaf()->_name, "sha256_implCompressMB") == 0 ||
 963                   strcmp(call->as_CallLeaf()->_name, "sha512_implCompress") == 0 ||
 964                   strcmp(call->as_CallLeaf()->_name, "sha512_implCompressMB") == 0 ||
 965                   strcmp(call->as_CallLeaf()->_name, "multiplyToLen") == 0)
 966                   ))) {
 967             call->dump();
 968             fatal(err_msg_res("EA unexpected CallLeaf %s", call->as_CallLeaf()->_name));
 969           }
 970 #endif
 971           // Always process arraycopy's destination object since
 972           // we need to add all possible edges to references in
 973           // source object.
 974           if (arg_esc >= PointsToNode::ArgEscape &&
 975               !arg_is_arraycopy_dest) {
 976             continue;
 977           }
 978           set_escape_state(arg_ptn, PointsToNode::ArgEscape);


   1 /*
   2  * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 939           //
 940           // src or dst could be j.l.Object when other is basic type array:
 941           //
 942           //   arraycopy(char[],0,Object*,0,size);
 943           //   arraycopy(Object*,0,char[],0,size);
 944           //
 945           // Don't add edges in such cases.
 946           //
 947           bool arg_is_arraycopy_dest = src_has_oops && is_arraycopy &&
 948                                        arg_has_oops && (i > TypeFunc::Parms);
 949 #ifdef ASSERT
 950           if (!(is_arraycopy ||
 951                 (call->as_CallLeaf()->_name != NULL &&
 952                  (strcmp(call->as_CallLeaf()->_name, "g1_wb_pre")  == 0 ||
 953                   strcmp(call->as_CallLeaf()->_name, "g1_wb_post") == 0 ||
 954                   strcmp(call->as_CallLeaf()->_name, "updateBytesCRC32") == 0 ||
 955                   strcmp(call->as_CallLeaf()->_name, "aescrypt_encryptBlock") == 0 ||
 956                   strcmp(call->as_CallLeaf()->_name, "aescrypt_decryptBlock") == 0 ||
 957                   strcmp(call->as_CallLeaf()->_name, "cipherBlockChaining_encryptAESCrypt") == 0 ||
 958                   strcmp(call->as_CallLeaf()->_name, "cipherBlockChaining_decryptAESCrypt") == 0 ||
 959                   strcmp(call->as_CallLeaf()->_name, "ghash_processBlocks") == 0 ||
 960                   strcmp(call->as_CallLeaf()->_name, "sha1_implCompress") == 0 ||
 961                   strcmp(call->as_CallLeaf()->_name, "sha1_implCompressMB") == 0 ||
 962                   strcmp(call->as_CallLeaf()->_name, "sha256_implCompress") == 0 ||
 963                   strcmp(call->as_CallLeaf()->_name, "sha256_implCompressMB") == 0 ||
 964                   strcmp(call->as_CallLeaf()->_name, "sha512_implCompress") == 0 ||
 965                   strcmp(call->as_CallLeaf()->_name, "sha512_implCompressMB") == 0 ||
 966                   strcmp(call->as_CallLeaf()->_name, "multiplyToLen") == 0)
 967                   ))) {
 968             call->dump();
 969             fatal(err_msg_res("EA unexpected CallLeaf %s", call->as_CallLeaf()->_name));
 970           }
 971 #endif
 972           // Always process arraycopy's destination object since
 973           // we need to add all possible edges to references in
 974           // source object.
 975           if (arg_esc >= PointsToNode::ArgEscape &&
 976               !arg_is_arraycopy_dest) {
 977             continue;
 978           }
 979           set_escape_state(arg_ptn, PointsToNode::ArgEscape);


< prev index next >