[llvm-commits] [java] r20000 - in /java/trunk: include/llvm/Java/Bytecode.h include/llvm/Java/ClassFile.h lib/ClassFile/ClassFile.cpp lib/Compiler/Compiler.cpp lib/Compiler/Locals.cpp lib/Compiler/OperandStack.cpp runtime/runtime.c
Alkis Evlogimenos
alkis at cs.uiuc.edu
Fri Jun 29 11:19:06 PDT 2007
Author: alkis
Date: Wed Feb 2 10:26:54 2005
New Revision: 20000
URL: http://llvm.org/viewvc/llvm-project?rev=20000&view=rev
Log:
Make llvm-java compile on Windows. Patch contributed by Jeff Cohen!
Modified:
java/trunk/include/llvm/Java/Bytecode.h (contents, props changed)
java/trunk/include/llvm/Java/ClassFile.h (contents, props changed)
java/trunk/lib/ClassFile/ClassFile.cpp (contents, props changed)
java/trunk/lib/Compiler/Compiler.cpp (contents, props changed)
java/trunk/lib/Compiler/Locals.cpp (contents, props changed)
java/trunk/lib/Compiler/OperandStack.cpp (contents, props changed)
java/trunk/runtime/runtime.c (contents, props changed)
Modified: java/trunk/include/llvm/Java/Bytecode.h
URL: http://llvm.org/viewvc/llvm-project/java/trunk/include/llvm/Java/Bytecode.h?rev=20000&r1=19999&r2=20000&view=diff
==============================================================================
--- java/trunk/include/llvm/Java/Bytecode.h (original)
+++ java/trunk/include/llvm/Java/Bytecode.h Wed Feb 2 10:26:54 2005
@@ -14,7 +14,7 @@
#ifndef LLVM_JAVA_BYTECODE_H
#define LLVM_JAVA_BYTECODE_H
-#include <stdint.h>
+#include <llvm/Support/DataTypes.h>
namespace llvm { namespace Java {
Propchange: java/trunk/include/llvm/Java/Bytecode.h
------------------------------------------------------------------------------
--- cvs2svn:cvs-rev (original)
+++ cvs2svn:cvs-rev Wed Feb 2 10:26:54 2005
@@ -1 +1 @@
-1.13
+1.14
Modified: java/trunk/include/llvm/Java/ClassFile.h
URL: http://llvm.org/viewvc/llvm-project/java/trunk/include/llvm/Java/ClassFile.h?rev=20000&r1=19999&r2=20000&view=diff
==============================================================================
--- java/trunk/include/llvm/Java/ClassFile.h (original)
+++ java/trunk/include/llvm/Java/ClassFile.h Wed Feb 2 10:26:54 2005
@@ -22,7 +22,7 @@
#include <stdexcept>
#include <vector>
-#include <stdint.h>
+#include <llvm/Support/DataTypes.h>
namespace llvm { namespace Java {
@@ -193,17 +193,20 @@
std::ostream& dump(std::ostream& os) const;
};
- struct ConstantFieldRef : public ConstantMemberRef {
+ class ConstantFieldRef : public ConstantMemberRef {
+ public:
ConstantFieldRef(const ConstantPool& cp, std::istream& is)
: ConstantMemberRef(cp, is) { }
};
- struct ConstantMethodRef : public ConstantMemberRef {
+ class ConstantMethodRef : public ConstantMemberRef {
+ public:
ConstantMethodRef(const ConstantPool& cp, std::istream& is)
: ConstantMemberRef(cp, is) { }
};
- struct ConstantInterfaceMethodRef : public ConstantMemberRef {
+ class ConstantInterfaceMethodRef : public ConstantMemberRef {
+ public:
ConstantInterfaceMethodRef(const ConstantPool& cp, std::istream& is)
: ConstantMemberRef(cp, is) { }
};
Propchange: java/trunk/include/llvm/Java/ClassFile.h
------------------------------------------------------------------------------
--- cvs2svn:cvs-rev (original)
+++ cvs2svn:cvs-rev Wed Feb 2 10:26:54 2005
@@ -1 +1 @@
-1.27
+1.28
Modified: java/trunk/lib/ClassFile/ClassFile.cpp
URL: http://llvm.org/viewvc/llvm-project/java/trunk/lib/ClassFile/ClassFile.cpp?rev=20000&r1=19999&r2=20000&view=diff
==============================================================================
--- java/trunk/lib/ClassFile/ClassFile.cpp (original)
+++ java/trunk/lib/ClassFile/ClassFile.cpp Wed Feb 2 10:26:54 2005
@@ -18,7 +18,9 @@
#include <llvm/ADT/STLExtras.h>
#include <llvm/Support/CommandLine.h>
#include <llvm/Support/Debug.h>
+#include <llvm/Config/alloca.h>
+#include <algorithm>
#include <cassert>
#include <fstream>
#include <functional>
@@ -517,7 +519,7 @@
: Constant(cp)
{
uint16_t length = readU2(is);
- char buf[length];
+ char *buf = (char *)alloca(length);
std::streamsize s = is.rdbuf()->sgetn(buf, length);
if (s != length)
throw ClassFileParseError(
Propchange: java/trunk/lib/ClassFile/ClassFile.cpp
------------------------------------------------------------------------------
--- cvs2svn:cvs-rev (original)
+++ cvs2svn:cvs-rev Wed Feb 2 10:26:54 2005
@@ -1 +1 @@
-1.34
+1.35
Modified: java/trunk/lib/Compiler/Compiler.cpp
URL: http://llvm.org/viewvc/llvm-project/java/trunk/lib/Compiler/Compiler.cpp?rev=20000&r1=19999&r2=20000&view=diff
==============================================================================
--- java/trunk/lib/Compiler/Compiler.cpp (original)
+++ java/trunk/lib/Compiler/Compiler.cpp Wed Feb 2 10:26:54 2005
@@ -206,6 +206,7 @@
return ConstantFP::get(Type::DoubleTy, d->getValue());
else
assert(0 && "Unknown llvm::Java::Constant!");
+ return 0; // not reached
}
/// Given a JType returns the appropriate llvm::Type.
@@ -268,6 +269,7 @@
// FIXME: Throw something
default: assert(0 && "Cannot parse type descriptor!");
}
+ return 0; // not reached
}
/// Returns the type of the Java string descriptor for JNI.
@@ -313,6 +315,7 @@
// FIXME: Throw something
default: assert(0 && "Cannot parse type descriptor!");
}
+ return 0; // not reached
}
/// Initializes the class info map; in other words it adds the
Propchange: java/trunk/lib/Compiler/Compiler.cpp
------------------------------------------------------------------------------
--- cvs2svn:cvs-rev (original)
+++ cvs2svn:cvs-rev Wed Feb 2 10:26:54 2005
@@ -1 +1 @@
-1.210
+1.211
Modified: java/trunk/lib/Compiler/Locals.cpp
URL: http://llvm.org/viewvc/llvm-project/java/trunk/lib/Compiler/Locals.cpp?rev=20000&r1=19999&r2=20000&view=diff
==============================================================================
--- java/trunk/lib/Compiler/Locals.cpp (original)
+++ java/trunk/lib/Compiler/Locals.cpp Wed Feb 2 10:26:54 2005
@@ -21,6 +21,7 @@
#include <llvm/ADT/StringExtras.h>
#include <llvm/Java/Compiler.h>
+using namespace llvm;
using namespace llvm::Java;
Locals::Locals(unsigned maxLocals)
Propchange: java/trunk/lib/Compiler/Locals.cpp
------------------------------------------------------------------------------
--- cvs2svn:cvs-rev (original)
+++ cvs2svn:cvs-rev Wed Feb 2 10:26:54 2005
@@ -1 +1 @@
-1.7
+1.8
Modified: java/trunk/lib/Compiler/OperandStack.cpp
URL: http://llvm.org/viewvc/llvm-project/java/trunk/lib/Compiler/OperandStack.cpp?rev=20000&r1=19999&r2=20000&view=diff
==============================================================================
--- java/trunk/lib/Compiler/OperandStack.cpp (original)
+++ java/trunk/lib/Compiler/OperandStack.cpp Wed Feb 2 10:26:54 2005
@@ -22,6 +22,7 @@
#include <llvm/Java/Compiler.h>
#include <iostream>
+using namespace llvm;
using namespace llvm::Java;
void OperandStack::copySlots(const SlotMap& src,
Propchange: java/trunk/lib/Compiler/OperandStack.cpp
------------------------------------------------------------------------------
--- cvs2svn:cvs-rev (original)
+++ cvs2svn:cvs-rev Wed Feb 2 10:26:54 2005
@@ -1 +1 @@
-1.9
+1.10
Modified: java/trunk/runtime/runtime.c
URL: http://llvm.org/viewvc/llvm-project/java/trunk/runtime/runtime.c?rev=20000&r1=19999&r2=20000&view=diff
==============================================================================
--- java/trunk/runtime/runtime.c (original)
+++ java/trunk/runtime/runtime.c Wed Feb 2 10:26:54 2005
@@ -9,6 +9,7 @@
struct llvm_java_object_header {
/* gc info, hash info, locking */
+ int dummy;
};
struct llvm_java_object_base {
@@ -41,11 +42,13 @@
jint llvm_java_is_instance_of(jobject obj,
struct llvm_java_object_vtable* clazz) {
+ struct llvm_java_object_vtable* objClazz;
+
/* trivial case 1: a null object can be cast to any type */
if (!obj)
return JNI_TRUE;
- struct llvm_java_object_vtable* objClazz = obj->vtable;
+ objClazz = obj->vtable;
/* trivial case 2: this object is of class clazz */
if (objClazz == clazz)
return JNI_TRUE;
Propchange: java/trunk/runtime/runtime.c
------------------------------------------------------------------------------
--- cvs2svn:cvs-rev (original)
+++ cvs2svn:cvs-rev Wed Feb 2 10:26:54 2005
@@ -1 +1 @@
-1.18
+1.19
More information about the llvm-commits
mailing list