changeset 4597:8bc6f680a88d

fixed visual studio project files
author Christian Haeubl <christian.haeubl@oracle.com>
date Tue, 14 Feb 2012 15:01:36 -0800
parents 6845b56f7ce0
children 6a44a26ed9e6
files graal/com.oracle.max.graal.hotspot/src/com/oracle/max/graal/hotspot/ri/HotSpotMethodResolvedImpl.java src/share/tools/ProjectCreator/BuildConfig.java
diffstat 2 files changed, 8 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.max.graal.hotspot/src/com/oracle/max/graal/hotspot/ri/HotSpotMethodResolvedImpl.java	Tue Feb 14 14:01:37 2012 -0800
+++ b/graal/com.oracle.max.graal.hotspot/src/com/oracle/max/graal/hotspot/ri/HotSpotMethodResolvedImpl.java	Tue Feb 14 15:01:36 2012 -0800
@@ -201,13 +201,15 @@
 
     @Override
     public int compilationComplexity() {
-        if (compilationComplexity < 0) {
+        if (compilationComplexity <= 0 && codeSize() > 0) {
             BytecodeStream s = new BytecodeStream(code());
             int result = 0;
             int currentBC;
             while ((currentBC = s.currentBC()) != Bytecodes.END) {
                 result += Bytecodes.compilationComplexity(currentBC);
+                s.next();
             }
+            assert result > 0;
             compilationComplexity = result;
         }
         return compilationComplexity;
--- a/src/share/tools/ProjectCreator/BuildConfig.java	Tue Feb 14 14:01:37 2012 -0800
+++ b/src/share/tools/ProjectCreator/BuildConfig.java	Tue Feb 14 15:01:36 2012 -0800
@@ -68,16 +68,13 @@
         if (value != null) {
             outDir = value;
         }
-        if(outDir.endsWith("fastdebug")) {
-            outDir = outDir.substring(0, outDir.lastIndexOf("fastdebug") - 1);
-        } else if (outDir.endsWith("debug")) {
-            outDir = outDir.substring(0, outDir.lastIndexOf("debug") - 1);
+        
+        int lastDirectorySeparator = Math.max(outDir.lastIndexOf("/"), outDir.lastIndexOf("\\"));
+        if (lastDirectorySeparator >= 0) {
+            outDir = outDir.substring(0, lastDirectorySeparator);
         }
         
-        if (!build.equals("product")) {
-            outDir += Util.sep + build;
-        }
-        outDir += Util.sep + "jre" + Util.sep + "bin";
+        outDir += Util.sep + build + Util.sep + "bin";
         if (flavour.equals("graal")) {
             outDir += Util.sep + "graal";
         } else if (flavour.equals("compiler1")) {