本文整理汇总了C++中Assembly::resolve方法的典型用法代码示例。如果您正苦于以下问题:C++ Assembly::resolve方法的具体用法?C++ Assembly::resolve怎么用?C++ Assembly::resolve使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Assembly
的用法示例。
在下文中一共展示了Assembly::resolve方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: initialiseStatics
static void initialiseStatics() {
CLIJit::initialise();
VMObject::globalLock = new mvm::LockNormal();
N3* vm = N3::bootstrapVM = N3::allocateBootstrap();
VMThread::TheThread = new VMThread(0, vm);
vm->assemblyPath.push_back("");
vm->assemblyPath.push_back(MSCorlib::libsPath);
Assembly* ass = vm->constructAssembly(vm->asciizToUTF8("mscorlib"));
if(!ass->resolve(1, "dll"))
VMThread::get()->getVM()->error("can not load mscorlib.dll. Abort");
vm->coreAssembly = ass;
#define INIT(var, nameSpace, name, type, prim) {\
var = (VMClass*)vm->coreAssembly->loadTypeFromName( \
vm->asciizToUTF8(name), \
vm->asciizToUTF8(nameSpace),\
false, false, false, true); \
var->isPrimitive = prim; \
if (type) { \
var->naturalType = type; \
var->virtualType = type; \
}}
assert(VMObject::llvmType);
INIT(MSCorlib::pObject, "System", "Object", VMObject::llvmType, false);
INIT(MSCorlib::pValue, "System", "ValueType", 0, false);
INIT(MSCorlib::pVoid, "System", "Void", llvm::Type::getVoidTy(getGlobalContext()), true);
INIT(MSCorlib::pBoolean, "System", "Boolean", llvm::Type::getInt1Ty(getGlobalContext()), true);
INIT(MSCorlib::pUInt8, "System", "Byte", llvm::Type::getInt8Ty(getGlobalContext()), true);
INIT(MSCorlib::pSInt8, "System", "SByte", llvm::Type::getInt8Ty(getGlobalContext()), true);
INIT(MSCorlib::pChar, "System", "Char", llvm::Type::getInt16Ty(getGlobalContext()), true);
INIT(MSCorlib::pSInt16, "System", "Int16", llvm::Type::getInt16Ty(getGlobalContext()), true);
INIT(MSCorlib::pUInt16, "System", "UInt16", llvm::Type::getInt16Ty(getGlobalContext()), true);
INIT(MSCorlib::pSInt32, "System", "Int32", llvm::Type::getInt32Ty(getGlobalContext()), true);
INIT(MSCorlib::pUInt32, "System", "UInt32", llvm::Type::getInt32Ty(getGlobalContext()), true);
INIT(MSCorlib::pSInt64, "System", "Int64", llvm::Type::getInt64Ty(getGlobalContext()), true);
INIT(MSCorlib::pUInt64, "System", "UInt64", llvm::Type::getInt64Ty(getGlobalContext()), true);
INIT(MSCorlib::pIntPtr, "System", "IntPtr", llvm::PointerType::getUnqual(llvm::Type::getInt8Ty(getGlobalContext())), true);
INIT(MSCorlib::pUIntPtr, "System", "UIntPtr", llvm::PointerType::getUnqual(llvm::Type::getInt8Ty(getGlobalContext())), true);
INIT(MSCorlib::pDouble, "System", "Double", llvm::Type::getDoubleTy(getGlobalContext()), true);
INIT(MSCorlib::pFloat, "System", "Single", llvm::Type::getFloatTy(getGlobalContext()), true);
INIT(MSCorlib::pEnum, "System", "Enum", llvm::Type::getInt32Ty(getGlobalContext()), true);
INIT(MSCorlib::pArray, "System", "Array", 0, true);
INIT(MSCorlib::pException,"System", "Exception", 0, false);
INIT(MSCorlib::pDelegate, "System", "Delegate", 0, false);
#undef INIT
VMClassArray::SuperArray = MSCorlib::pArray;
MSCorlib::loadStringClass(vm);
#define BUILD_ARRAY(name, type) \
MSCorlib::array##name = ass->constructArray(MSCorlib::p##name, 1);
ON_TYPES(BUILD_ARRAY, _F_NT);
ON_STRING(BUILD_ARRAY, _F_NT);
N3::clinitName = vm->asciizToUTF8(".cctor");
N3::ctorName = vm->asciizToUTF8(".ctor");
N3::invokeName = vm->asciizToUTF8("Invoke");
N3::math = vm->asciizToUTF8("Math");
N3::system = vm->asciizToUTF8("System");
N3::sqrt = vm->asciizToUTF8("Sqrt");
N3::sin = vm->asciizToUTF8("Sin");
N3::cos = vm->asciizToUTF8("Cos");
N3::exp = vm->asciizToUTF8("Exp");
N3::log = vm->asciizToUTF8("Log");
N3::floor = vm->asciizToUTF8("Floor");
N3::log10 = vm->asciizToUTF8("Log10");
N3::isNan = vm->asciizToUTF8("IsNaN");
N3::pow = vm->asciizToUTF8("Pow");
N3::floatName = vm->asciizToUTF8("Float");
N3::doubleName = vm->asciizToUTF8("Double");
N3::testInfinity = vm->asciizToUTF8("TestInfinity");
MSCorlib::pArray->resolveType(1, 0, 0);
MSCorlib::pArray->resolveVT();
MSCorlib::initialise(vm);
}