Tue, 12 Feb 2013 19:25:09 +0000
8007464: Add graph inference support
Summary: Add support for more aggressive type-inference scheme
Reviewed-by: jjg
duke@1 | 1 | #!/bin/sh |
duke@1 | 2 | |
duke@1 | 3 | # |
ohair@962 | 4 | # Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. |
duke@1 | 5 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
duke@1 | 6 | # |
duke@1 | 7 | # This code is free software; you can redistribute it and/or modify it |
duke@1 | 8 | # under the terms of the GNU General Public License version 2 only, as |
ohair@554 | 9 | # published by the Free Software Foundation. Oracle designates this |
duke@1 | 10 | # particular file as subject to the "Classpath" exception as provided |
ohair@554 | 11 | # by Oracle in the LICENSE file that accompanied this code. |
duke@1 | 12 | # |
duke@1 | 13 | # This code is distributed in the hope that it will be useful, but WITHOUT |
duke@1 | 14 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
duke@1 | 15 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
duke@1 | 16 | # version 2 for more details (a copy is included in the LICENSE file that |
duke@1 | 17 | # accompanied this code). |
duke@1 | 18 | # |
duke@1 | 19 | # You should have received a copy of the GNU General Public License version |
duke@1 | 20 | # 2 along with this work; if not, write to the Free Software Foundation, |
duke@1 | 21 | # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
duke@1 | 22 | # |
ohair@554 | 23 | # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
ohair@554 | 24 | # or visit www.oracle.com if you need additional information or have any |
ohair@554 | 25 | # questions. |
duke@1 | 26 | # |
duke@1 | 27 | |
duke@1 | 28 | mydir="`dirname $0`" |
jjh@805 | 29 | case `uname -s` in |
jjh@805 | 30 | CYGWIN*) |
jjh@805 | 31 | mydir=`cygpath -m $mydir` |
jjh@805 | 32 | ;; |
jjh@805 | 33 | esac |
jjg@871 | 34 | mylib="$mydir/../lib" |
duke@1 | 35 | |
duke@1 | 36 | # By default, put the jar file and its dependencies on the bootclasspath. |
duke@1 | 37 | # This is always required on a Mac, because the system langtools classes |
duke@1 | 38 | # are always on the main class path; in addition, it may be required on |
duke@1 | 39 | # standard versions of JDK (i.e. using rt.jar and tools.jar) because some |
duke@1 | 40 | # langtools interfaces are in rt.jar. |
duke@1 | 41 | # Assume that the jar file being invoked lists all the necessary langtools |
duke@1 | 42 | # jar files in its Class-Path manifest entry, so there is no need to search |
duke@1 | 43 | # dependent jar files for additional dependencies. |
duke@1 | 44 | |
duke@1 | 45 | if [ "$LANGTOOLS_USE_BOOTCLASSPATH" != "no" ]; then |
jjg@471 | 46 | cp=`unzip -c "$mylib/#PROGRAM#.jar" META-INF/MANIFEST.MF | |
duke@1 | 47 | grep "Class-Path:" | |
jjg@656 | 48 | sed -e 's|Class-Path: *||' -e 's|\([a-z]*\.jar\) *|'"$mylib"'/\1#PS#|g'` |
jjg@656 | 49 | bcp="$mylib/#PROGRAM#.jar#PS#$cp" |
duke@1 | 50 | fi |
duke@1 | 51 | |
jjg@308 | 52 | # tools currently assumes that assertions are enabled in the launcher |
jjg@370 | 53 | ea=-ea:com.sun.tools... |
duke@1 | 54 | |
jjg@308 | 55 | # Any parameters starting with -J are passed to the JVM. |
jjg@308 | 56 | # All other parameters become parameters of #PROGRAM#. |
jjg@308 | 57 | |
jjg@308 | 58 | # Separate out -J* options for the JVM |
jjg@308 | 59 | # Unset IFS and use newline as arg separator to preserve spaces in args |
jjg@308 | 60 | DUALCASE=1 # for MKS: make case statement case-sensitive (6709498) |
jjg@308 | 61 | saveIFS="$IFS" |
jjg@308 | 62 | nl=' |
jjg@308 | 63 | ' |
jjg@308 | 64 | for i in "$@" ; do |
jjg@308 | 65 | IFS= |
jjg@308 | 66 | case $i in |
jjg@308 | 67 | -J* ) javaOpts=$javaOpts$nl`echo $i | sed -e 's/^-J//'` ;; |
jjg@308 | 68 | * ) toolOpts=$toolOpts$nl$i ;; |
jjg@308 | 69 | esac |
jjg@308 | 70 | IFS="$saveIFS" |
jjg@308 | 71 | done |
jjg@308 | 72 | unset DUALCASE |
jjg@308 | 73 | |
jjg@548 | 74 | IFS=$nl |
jjg@871 | 75 | "#TARGET_JAVA#" "${bcp:+-Xbootclasspath/p:"$bcp"}" ${ea} ${javaOpts} -jar "${mylib}/#PROGRAM#.jar" ${toolOpts} |