Mercurial > hg > truffle
comparison src/share/vm/shark/sharkMemoryManager.cpp @ 14702:d4dd5204c0aa
Merge
author | ehelin |
---|---|
date | Fri, 14 Mar 2014 13:27:18 +0100 |
parents | 81ccf2c854c7 |
children | 92aa6797d639 |
comparison
equal
deleted
inserted
replaced
14701:d3ef21095134 | 14702:d4dd5204c0aa |
---|---|
57 SharkEntry *entry = get_entry_for_function(F); | 57 SharkEntry *entry = get_entry_for_function(F); |
58 if (entry != NULL) | 58 if (entry != NULL) |
59 entry->set_code_limit(FunctionEnd); | 59 entry->set_code_limit(FunctionEnd); |
60 } | 60 } |
61 | 61 |
62 unsigned char* SharkMemoryManager::startExceptionTable(const Function* F, | |
63 uintptr_t& ActualSize) { | |
64 return mm()->startExceptionTable(F, ActualSize); | |
65 } | |
66 | |
67 void SharkMemoryManager::endExceptionTable(const Function* F, | |
68 unsigned char* TableStart, | |
69 unsigned char* TableEnd, | |
70 unsigned char* FrameRegister) { | |
71 mm()->endExceptionTable(F, TableStart, TableEnd, FrameRegister); | |
72 } | |
73 | |
74 void SharkMemoryManager::setMemoryWritable() { | 62 void SharkMemoryManager::setMemoryWritable() { |
75 mm()->setMemoryWritable(); | 63 mm()->setMemoryWritable(); |
76 } | 64 } |
77 | 65 |
78 void SharkMemoryManager::setMemoryExecutable() { | 66 void SharkMemoryManager::setMemoryExecutable() { |
79 mm()->setMemoryExecutable(); | 67 mm()->setMemoryExecutable(); |
80 } | |
81 | |
82 void SharkMemoryManager::deallocateExceptionTable(void *ptr) { | |
83 mm()->deallocateExceptionTable(ptr); | |
84 } | 68 } |
85 | 69 |
86 void SharkMemoryManager::deallocateFunctionBody(void *ptr) { | 70 void SharkMemoryManager::deallocateFunctionBody(void *ptr) { |
87 mm()->deallocateFunctionBody(ptr); | 71 mm()->deallocateFunctionBody(ptr); |
88 } | 72 } |
94 | 78 |
95 void* SharkMemoryManager::getPointerToNamedFunction(const std::string &Name, bool AbortOnFailure) { | 79 void* SharkMemoryManager::getPointerToNamedFunction(const std::string &Name, bool AbortOnFailure) { |
96 return mm()->getPointerToNamedFunction(Name, AbortOnFailure); | 80 return mm()->getPointerToNamedFunction(Name, AbortOnFailure); |
97 } | 81 } |
98 | 82 |
83 void SharkMemoryManager::setPoisonMemory(bool poison) { | |
84 mm()->setPoisonMemory(poison); | |
85 } | |
86 | |
87 unsigned char *SharkMemoryManager::allocateSpace(intptr_t Size, | |
88 unsigned int Alignment) { | |
89 return mm()->allocateSpace(Size, Alignment); | |
90 } | |
91 | |
92 #if SHARK_LLVM_VERSION <= 32 | |
93 | |
99 uint8_t* SharkMemoryManager::allocateCodeSection(uintptr_t Size, unsigned Alignment, unsigned SectionID) { | 94 uint8_t* SharkMemoryManager::allocateCodeSection(uintptr_t Size, unsigned Alignment, unsigned SectionID) { |
100 return mm()->allocateCodeSection(Size, Alignment, SectionID); | 95 return mm()->allocateCodeSection(Size, Alignment, SectionID); |
101 } | 96 } |
102 | 97 |
103 uint8_t* SharkMemoryManager::allocateDataSection(uintptr_t Size, unsigned Alignment, unsigned SectionID) { | 98 uint8_t* SharkMemoryManager::allocateDataSection(uintptr_t Size, unsigned Alignment, unsigned SectionID) { |
104 return mm()->allocateDataSection(Size, Alignment, SectionID); | 99 return mm()->allocateDataSection(Size, Alignment, SectionID); |
105 } | 100 } |
106 | 101 |
107 void SharkMemoryManager::setPoisonMemory(bool poison) { | 102 void SharkMemoryManager::deallocateExceptionTable(void *ptr) { |
108 mm()->setPoisonMemory(poison); | 103 mm()->deallocateExceptionTable(ptr); |
109 } | 104 } |
110 | 105 |
111 unsigned char *SharkMemoryManager::allocateSpace(intptr_t Size, | 106 unsigned char* SharkMemoryManager::startExceptionTable(const Function* F, |
112 unsigned int Alignment) { | 107 uintptr_t& ActualSize) { |
113 return mm()->allocateSpace(Size, Alignment); | 108 return mm()->startExceptionTable(F, ActualSize); |
114 } | 109 } |
110 | |
111 void SharkMemoryManager::endExceptionTable(const Function* F, | |
112 unsigned char* TableStart, | |
113 unsigned char* TableEnd, | |
114 unsigned char* FrameRegister) { | |
115 mm()->endExceptionTable(F, TableStart, TableEnd, FrameRegister); | |
116 } | |
117 | |
118 #else | |
119 | |
120 uint8_t *SharkMemoryManager::allocateCodeSection(uintptr_t Size, unsigned Alignment, unsigned SectionID, StringRef SectionName) { | |
121 return mm()->allocateCodeSection(Size, Alignment, SectionID, SectionName); | |
122 } | |
123 | |
124 uint8_t* SharkMemoryManager::allocateDataSection(uintptr_t Size, unsigned Alignment, unsigned SectionID, StringRef SectionName, bool IsReadOnly) { | |
125 return mm()->allocateDataSection(Size, Alignment, SectionID, SectionName, IsReadOnly); | |
126 } | |
127 | |
128 bool SharkMemoryManager::finalizeMemory(std::string *ErrMsg) { | |
129 return mm()->finalizeMemory(ErrMsg); | |
130 } | |
131 | |
132 #endif |