//
virtual uint64_t getConstantPoolEntryAddress(unsigned Index) = 0;
- // allocateGlobal - Allocate some space for a global variable. This is
- // used by the JIT to allocate space in the global variable region.
- virtual unsigned char* allocateGlobal(unsigned size, unsigned alignment) {
- return new unsigned char[(size_t)size];
- }
+ // allocateGlobal - Allocate some space for a global variable.
+ virtual unsigned char* allocateGlobal(unsigned size, unsigned alignment) = 0;
/// createDebugEmitter - Return a dynamically allocated machine
/// code emitter, which just prints the opcodes and fields out the cout. This
return 0;
}
+ virtual unsigned char* allocateGlobal(unsigned size, unsigned alignment) {
+ assert(0 && "Globals not implemented yet!");
+ return 0;
+ }
+
/// JIT SPECIFIC FUNCTIONS - DO NOT IMPLEMENT THESE HERE!
void startFunctionStub(unsigned StubSize) {
assert(0 && "JIT specific function called!");
std::cout << "<relocation> ";
}
+ virtual unsigned char* allocateGlobal(unsigned size, unsigned alignment)
+ { return 0; }
+
uint64_t getConstantPoolEntryAddress(unsigned Num) { return 0; }
uint64_t getCurrentPCValue() { return 0; }
uint64_t getCurrentPCOffset() { return 0; }
uint64_t getConstantPoolEntryAddress(unsigned Num) {
return MCE.getConstantPoolEntryAddress(Num);
}
+
+ virtual unsigned char* allocateGlobal(unsigned size, unsigned alignment)
+ { return MCE.allocateGlobal(size, alignment); }
+
uint64_t getCurrentPCValue() {
return MCE.getCurrentPCValue();
}