[llvm-commits] [vmkit] r51064 - in /vmkit/trunk/lib/N3/VMCore: N3.cpp N3.h N3Initialise.cpp
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Tue May 13 13:11:29 PDT 2008
Author: geoffray
Date: Tue May 13 15:11:29 2008
New Revision: 51064
URL: http://llvm.org/viewvc/llvm-project?rev=51064&view=rev
Log:
Make N3::allocate, vm->assemblyPath and N3::name take const char*.
Thanks Bill!
Modified:
vmkit/trunk/lib/N3/VMCore/N3.cpp
vmkit/trunk/lib/N3/VMCore/N3.h
vmkit/trunk/lib/N3/VMCore/N3Initialise.cpp
Modified: vmkit/trunk/lib/N3/VMCore/N3.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/N3.cpp?rev=51064&r1=51063&r2=51064&view=diff
==============================================================================
--- vmkit/trunk/lib/N3/VMCore/N3.cpp (original)
+++ vmkit/trunk/lib/N3/VMCore/N3.cpp Tue May 13 15:11:29 2008
@@ -80,7 +80,7 @@
#endif
VMThread::threadKey->set(vm->bootstrapThread);
- vm->name = (char*)"bootstrapN3";
+ vm->name = "bootstrapN3";
vm->hashUTF8 = UTF8Map::allocate();
vm->hashStr = StringMap::allocate();
vm->loadedAssemblies = AssemblyMap::allocate();
@@ -90,7 +90,7 @@
}
-N3* N3::allocate(char* name, N3* parent) {
+N3* N3::allocate(const char* name, N3* parent) {
N3 *vm= gc_new(N3)();
#ifdef MULTIPLE_GC
@@ -133,7 +133,7 @@
uint32 idx = 0;
while ((res == 0) && (idx < assemblyPath.size())) {
- char* cur = assemblyPath[idx];
+ const char* cur = assemblyPath[idx];
uint32 strLen = strlen(cur);
char* buf = (char*)alloca(strLen + alen + 16);
Modified: vmkit/trunk/lib/N3/VMCore/N3.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/N3.h?rev=51064&r1=51063&r2=51064&view=diff
==============================================================================
--- vmkit/trunk/lib/N3/VMCore/N3.h (original)
+++ vmkit/trunk/lib/N3/VMCore/N3.h Tue May 13 15:11:29 2008
@@ -43,15 +43,15 @@
Assembly* constructAssembly(const UTF8* name);
Assembly* lookupAssembly(const UTF8* name);
- char* name;
+ const char* name;
StringMap * hashStr;
AssemblyMap* loadedAssemblies;
- std::vector<char*> assemblyPath;
+ std::vector<const char*> assemblyPath;
Assembly* coreAssembly;
static N3* allocateBootstrap();
- static N3* allocate(char* name, N3* parent);
+ static N3* allocate(const char* name, N3* parent);
ArrayUInt8* openAssembly(const UTF8* name, const char* extension);
Modified: vmkit/trunk/lib/N3/VMCore/N3Initialise.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/N3Initialise.cpp?rev=51064&r1=51063&r2=51064&view=diff
==============================================================================
--- vmkit/trunk/lib/N3/VMCore/N3Initialise.cpp (original)
+++ vmkit/trunk/lib/N3/VMCore/N3Initialise.cpp Tue May 13 15:11:29 2008
@@ -247,7 +247,7 @@
if (assemblyName == 0)
VMThread::get()->vm->error("can not find mscorlib.dll. Abort");
- vm->assemblyPath.push_back((char*)"");
+ vm->assemblyPath.push_back("");
vm->assemblyPath.push_back(assemblyName);
const UTF8* mscorlib = vm->asciizConstructUTF8("mscorlib");
@@ -424,7 +424,7 @@
}
extern "C" int start_app(int argc, char** argv) {
- N3* vm = N3::allocate((char*)"", N3::bootstrapVM);
+ N3* vm = N3::allocate("", N3::bootstrapVM);
vm->runMain(argc, argv);
return 0;
}
More information about the llvm-commits
mailing list