[arch-commits] Commit in rubinius/repos (8 files)
Jan Steffens
heftig at nymeria.archlinux.org
Tue Jan 7 21:29:34 UTC 2014
Date: Tuesday, January 7, 2014 @ 22:29:33
Author: heftig
Revision: 103552
archrelease: copy trunk to community-staging-i686, community-staging-x86_64
Added:
rubinius/repos/community-staging-i686/
rubinius/repos/community-staging-i686/PKGBUILD
(from rev 103551, rubinius/trunk/PKGBUILD)
rubinius/repos/community-staging-i686/gemrc
(from rev 103551, rubinius/trunk/gemrc)
rubinius/repos/community-staging-i686/llvm34.patch
(from rev 103551, rubinius/trunk/llvm34.patch)
rubinius/repos/community-staging-x86_64/
rubinius/repos/community-staging-x86_64/PKGBUILD
(from rev 103551, rubinius/trunk/PKGBUILD)
rubinius/repos/community-staging-x86_64/gemrc
(from rev 103551, rubinius/trunk/gemrc)
rubinius/repos/community-staging-x86_64/llvm34.patch
(from rev 103551, rubinius/trunk/llvm34.patch)
---------------------------------------+
community-staging-i686/PKGBUILD | 89 +++++++++++++++
community-staging-i686/gemrc | 5
community-staging-i686/llvm34.patch | 182 ++++++++++++++++++++++++++++++++
community-staging-x86_64/PKGBUILD | 89 +++++++++++++++
community-staging-x86_64/gemrc | 5
community-staging-x86_64/llvm34.patch | 182 ++++++++++++++++++++++++++++++++
6 files changed, 552 insertions(+)
Copied: rubinius/repos/community-staging-i686/PKGBUILD (from rev 103551, rubinius/trunk/PKGBUILD)
===================================================================
--- community-staging-i686/PKGBUILD (rev 0)
+++ community-staging-i686/PKGBUILD 2014-01-07 21:29:33 UTC (rev 103552)
@@ -0,0 +1,89 @@
+# $Id$
+# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens at gmail.com>
+
+pkgbase=rubinius
+pkgname=(rubinius rubinius-ruby)
+pkgver=2.2.3
+pkgrel=2
+pkgdesc="Ruby runtime written in Ruby, designed for concurrency"
+arch=(i686 x86_64)
+url="http://rubini.us"
+license=(custom)
+depends=(llvm-libs libffi openssl libyaml)
+makedepends=(llvm rubinius-ruby)
+options=(!emptydirs)
+source=(http://releases.rubini.us/${pkgbase}-${pkgver}.tar.bz2
+ gemrc dirs.patch llvm34.patch)
+sha256sums=('b3426aa6996420f1d9d8a7926a94160b84d8bdf725793c64462b27b74f2f2acf'
+ '4bb7eb2fe66e396ed16b589cdb656831407b39ad4e138d88536754c0448ac614'
+ '93f3918dc2a5679e281e724f9b3cb712ffa784c1e52e6fa7ce75f74ce6655a66'
+ 'a24850f34a8a308ce4a4e1da12d75a669095a38b6b5da5082eb4d3bd41770095')
+
+prepare() {
+ export GEM_HOME="$srcdir/gemdir" LANG="en_US.UTF-8"
+ cd $pkgbase-$pkgver
+
+ patch -Np1 -i ../dirs.patch
+ patch -Np1 -i ../llvm34.patch
+
+ mkdir -p "$GEM_HOME"
+ gem install --no-user-install -N vendor/cache/bundler-*.gem
+
+ "$GEM_HOME/bin/bundle" install --local
+}
+
+build() {
+ export GEM_HOME="$srcdir/gemdir" LANG="en_US.UTF-8"
+ cd $pkgbase-$pkgver
+
+ ./configure --prefix=/usr \
+ --mandir=/usr/share/man \
+ --includedir=/usr/include/rubinius \
+ --appdir=/usr/lib/rubinius \
+ --gemsdir=/usr/lib/rubinius/gems \
+ --preserve-prefix \
+ --llvm-shared \
+ --without-rpath
+ rake build
+}
+
+check() {
+ export GEM_HOME="$srcdir/gemdir" LANG="en_US.UTF-8"
+ cd $pkgbase-$pkgver
+
+ rake vm:test || :
+}
+
+package_rubinius() {
+ optdepends=('ruby-docs: Ruby documentation')
+
+ export GEM_HOME="$srcdir/gemdir" LANG="en_US.UTF-8"
+ cd $pkgbase-$pkgver
+
+ DESTDIR="$pkgdir" rake install
+
+ mkdir -p "$pkgdir/usr/share/ri"
+ ln -s 2.0.0 "$pkgdir/usr/share/ri/2.1"
+
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/rubinius/LICENSE"
+
+### Split rubinius-ruby
+ mkdir -p "$srcdir/ruby/usr/bin"
+ for _f in "$pkgdir"/usr/bin/*; do
+ [[ $_f == */rbx ]] && continue
+ mv $_f "$srcdir/ruby/usr/bin"
+ done
+}
+
+package_rubinius-ruby() {
+ pkgdesc="Ruby compat for Rubinius"
+ depends=(rubinius)
+ provides=(ruby)
+ conflicts=(ruby)
+ backup=(etc/gemrc)
+
+ mv ruby/* "$pkgdir"
+ install -Dm644 gemrc "$pkgdir/etc/gemrc"
+ install -d "$pkgdir/usr/share/licenses/rubinius-ruby"
+ ln -s ../rubinius/LICENSE "$pkgdir/usr/share/licenses/rubinius-ruby/LICENSE"
+}
Copied: rubinius/repos/community-staging-i686/gemrc (from rev 103551, rubinius/trunk/gemrc)
===================================================================
--- community-staging-i686/gemrc (rev 0)
+++ community-staging-i686/gemrc 2014-01-07 21:29:33 UTC (rev 103552)
@@ -0,0 +1,5 @@
+# Read about the gemrc format at http://docs.rubygems.org/read/chapter/11
+
+# --user-install is used to install to $HOME/.gem/ by default since we want to separate
+# pacman installed gems and gem installed gems
+gem: --user-install
Copied: rubinius/repos/community-staging-i686/llvm34.patch (from rev 103551, rubinius/trunk/llvm34.patch)
===================================================================
--- community-staging-i686/llvm34.patch (rev 0)
+++ community-staging-i686/llvm34.patch 2014-01-07 21:29:33 UTC (rev 103552)
@@ -0,0 +1,182 @@
+diff --git i/vm/llvm/disassembler.cpp w/vm/llvm/disassembler.cpp
+index 79c74ff..b3ea424 100644
+--- i/vm/llvm/disassembler.cpp
++++ w/vm/llvm/disassembler.cpp
+@@ -46,20 +46,27 @@ namespace rubinius {
+ #if RBX_LLVM_API_VER > 300
+ llvm::TargetOptions options;
+ options.NoFramePointerElim = true;
++#if RBX_LLVM_API_VER < 304
+ options.NoFramePointerElimNonLeaf = true;
++#endif
+ target_machine = target->createTargetMachine(host, llvm::sys::getHostCPUName(), "", options);
+ #else
+ target_machine = target->createTargetMachine(host, llvm::sys::getHostCPUName(), "");
+ #endif
+
+ sub_target = target->createMCSubtargetInfo(host, llvm::sys::getHostCPUName(), "");
+- asm_info = target->createMCAsmInfo(host);
+
+ #if RBX_LLVM_API_VER > 300
+ instr_info = target->createMCInstrInfo();
+ reg_info = target->createMCRegInfo(host);
+ #endif
+
++#if RBX_LLVM_API_VER > 303
++ asm_info = target->createMCAsmInfo(*reg_info, host);
++#else
++ asm_info = target->createMCAsmInfo(host);
++#endif
++
+ if(asm_info) {
+ disassembler = target->createMCDisassembler(*sub_target);
+ memory_object = new JITMemoryObject((const uint8_t*)buffer, (uint64_t) size);
+diff --git i/vm/llvm/jit_builder.cpp w/vm/llvm/jit_builder.cpp
+index 652350f..c479aab 100644
+--- i/vm/llvm/jit_builder.cpp
++++ w/vm/llvm/jit_builder.cpp
+@@ -56,12 +56,21 @@ namespace jit {
+ "", "rubinius", true, "", 0);
+ DIFile file = debug_builder().createFile(file_str, "");
+
++#if RBX_LLVM_API_VER > 303
++ DIType dummy_return_type = debug_builder().createNullPtrType();
++ Value* dummy_signature[] = {
++ &*dummy_return_type,
++ };
++ DICompositeType dummy_subroutine_type = debug_builder().createSubroutineType(file,
++ debug_builder().getOrCreateArray(dummy_signature));
++#else
+ DIType dummy_return_type = debug_builder().createNullPtrType("dummy type");
+ Value* dummy_signature[] = {
+ &*dummy_return_type,
+ };
+ DIType dummy_subroutine_type = debug_builder().createSubroutineType(file,
+ debug_builder().getOrCreateArray(dummy_signature));
++#endif
+
+ #if RBX_LLVM_API_VER > 300
+ DISubprogram subprogram = debug_builder().createFunction(file, "", "",
+diff --git i/vm/llvm/jit_context.cpp w/vm/llvm/jit_context.cpp
+index e555adb..594a63a 100644
+--- i/vm/llvm/jit_context.cpp
++++ w/vm/llvm/jit_context.cpp
+@@ -84,7 +84,9 @@ namespace rubinius {
+ #if RBX_LLVM_API_VER > 300
+ llvm::TargetOptions opts;
+ opts.NoFramePointerElim = true;
++#if RBX_LLVM_API_VER < 304
+ opts.NoFramePointerElimNonLeaf = true;
++#endif
+ opts.JITEmitDebugInfo = true;
+
+ factory.setTargetOptions(opts);
+diff --git i/vm/llvm/jit_memory_manager.hpp w/vm/llvm/jit_memory_manager.hpp
+index 8a58a09..7205f89 100644
+--- i/vm/llvm/jit_memory_manager.hpp
++++ w/vm/llvm/jit_memory_manager.hpp
+@@ -202,7 +202,7 @@ namespace jit {
+
+ public:
+ RubiniusJITMemoryManager();
+- ~RubiniusJITMemoryManager();
++ virtual ~RubiniusJITMemoryManager();
+
+ /// allocateNewSlab - Allocates a new MemoryBlock and remembers it as the
+ /// last slab it allocated, so that subsequent allocations follow it.
+@@ -356,8 +356,13 @@ namespace jit {
+ }
+
+ /// allocateCodeSection - Allocate memory for a code section.
++#if RBX_LLVM_API_VER > 303
++ virtual uint8_t *allocateCodeSection(uintptr_t Size, unsigned Alignment,
++ unsigned SectionID, StringRef SectionName) {
++#else
+ uint8_t *allocateCodeSection(uintptr_t Size, unsigned Alignment,
+ unsigned SectionID) {
++#endif
+ utilities::thread::SpinLock::LockGuard guard(lock_);
+ // Grow the required block size to account for the block header
+ Size += sizeof(*CurBlock);
+@@ -397,11 +402,21 @@ namespace jit {
+ }
+
+ /// allocateDataSection - Allocate memory for a data section.
+- uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment,
+- unsigned SectionID) {
++ /// TODO: currently IsReadOnly is ignored.
++#if RBX_LLVM_API_VER > 303
++ virtual uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment,
++ unsigned SectionID, StringRef SectionName,
++ bool IsReadOnly) {
+ utilities::thread::SpinLock::LockGuard guard(lock_);
+ return (uint8_t*)DataAllocator.Allocate(Size, Alignment);
+ }
++#else
++ uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment,
++ unsigned SectionID, bool IsReadOnly) {
++ utilities::thread::SpinLock::LockGuard guard(lock_);
++ return (uint8_t*)DataAllocator.Allocate(Size, Alignment);
++ }
++#endif
+
+ /// startExceptionTable - Use startFunctionBody to allocate memory for the
+ /// function's exception table.
+@@ -495,7 +510,7 @@ namespace jit {
+ , GOTBase(NULL)
+ {}
+
+- ~RubiniusRequestJITMemoryManager() {
++ virtual ~RubiniusRequestJITMemoryManager() {
+ if(GOTBase) delete[] GOTBase;
+ }
+
+@@ -504,17 +519,32 @@ namespace jit {
+ return mgr_->getPointerToNamedFunction(Name, AbortOnFailure);
+ }
+
++#if RBX_LLVM_API_VER >= 304
++ virtual uint8_t *allocateCodeSection(uintptr_t Size, unsigned Alignment,
++ unsigned SectionID, StringRef SectionName) {
++ return mgr_->allocateCodeSection(Size, Alignment, SectionID,
++ SectionName);
++ }
++#else
+ uint8_t *allocateCodeSection(uintptr_t Size, unsigned Alignment,
+ unsigned SectionID) {
+ return mgr_->allocateCodeSection(Size, Alignment, SectionID);
+ }
++#endif
+
+ /// allocateDataSection - Allocate memory for a data section.
+-#if RBX_LLVM_API_VER >= 303
++#if RBX_LLVM_API_VER >= 304
++ virtual uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment,
++ unsigned SectionID, StringRef SectionName,
++ bool IsReadOnly) {
++ return mgr_->allocateDataSection(Size, Alignment, SectionID,
++ SectionName, IsReadOnly);
++ }
++#elif RBX_LLVM_API_VER >= 303
+ uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment,
+ unsigned SectionID, bool IsReadOnly) {
+- // TODO: currently IsReadOnly is ignored.
+- return mgr_->allocateDataSection(Size, Alignment, SectionID);
++ return mgr_->allocateDataSection(Size, Alignment, SectionID,
++ IsReadOnly);
+ }
+ #else
+ uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment,
+@@ -601,6 +631,12 @@ namespace jit {
+ void resetGeneratedFunction() {
+ GeneratedFunction = NULL;
+ }
++
++#if RBX_LLVM_API_VER > 303
++ virtual bool finalizeMemory(std::string* ErrMsg = 0) {
++ return false;
++ }
++#endif
+ };
+
+
Copied: rubinius/repos/community-staging-x86_64/PKGBUILD (from rev 103551, rubinius/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2014-01-07 21:29:33 UTC (rev 103552)
@@ -0,0 +1,89 @@
+# $Id$
+# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens at gmail.com>
+
+pkgbase=rubinius
+pkgname=(rubinius rubinius-ruby)
+pkgver=2.2.3
+pkgrel=2
+pkgdesc="Ruby runtime written in Ruby, designed for concurrency"
+arch=(i686 x86_64)
+url="http://rubini.us"
+license=(custom)
+depends=(llvm-libs libffi openssl libyaml)
+makedepends=(llvm rubinius-ruby)
+options=(!emptydirs)
+source=(http://releases.rubini.us/${pkgbase}-${pkgver}.tar.bz2
+ gemrc dirs.patch llvm34.patch)
+sha256sums=('b3426aa6996420f1d9d8a7926a94160b84d8bdf725793c64462b27b74f2f2acf'
+ '4bb7eb2fe66e396ed16b589cdb656831407b39ad4e138d88536754c0448ac614'
+ '93f3918dc2a5679e281e724f9b3cb712ffa784c1e52e6fa7ce75f74ce6655a66'
+ 'a24850f34a8a308ce4a4e1da12d75a669095a38b6b5da5082eb4d3bd41770095')
+
+prepare() {
+ export GEM_HOME="$srcdir/gemdir" LANG="en_US.UTF-8"
+ cd $pkgbase-$pkgver
+
+ patch -Np1 -i ../dirs.patch
+ patch -Np1 -i ../llvm34.patch
+
+ mkdir -p "$GEM_HOME"
+ gem install --no-user-install -N vendor/cache/bundler-*.gem
+
+ "$GEM_HOME/bin/bundle" install --local
+}
+
+build() {
+ export GEM_HOME="$srcdir/gemdir" LANG="en_US.UTF-8"
+ cd $pkgbase-$pkgver
+
+ ./configure --prefix=/usr \
+ --mandir=/usr/share/man \
+ --includedir=/usr/include/rubinius \
+ --appdir=/usr/lib/rubinius \
+ --gemsdir=/usr/lib/rubinius/gems \
+ --preserve-prefix \
+ --llvm-shared \
+ --without-rpath
+ rake build
+}
+
+check() {
+ export GEM_HOME="$srcdir/gemdir" LANG="en_US.UTF-8"
+ cd $pkgbase-$pkgver
+
+ rake vm:test || :
+}
+
+package_rubinius() {
+ optdepends=('ruby-docs: Ruby documentation')
+
+ export GEM_HOME="$srcdir/gemdir" LANG="en_US.UTF-8"
+ cd $pkgbase-$pkgver
+
+ DESTDIR="$pkgdir" rake install
+
+ mkdir -p "$pkgdir/usr/share/ri"
+ ln -s 2.0.0 "$pkgdir/usr/share/ri/2.1"
+
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/rubinius/LICENSE"
+
+### Split rubinius-ruby
+ mkdir -p "$srcdir/ruby/usr/bin"
+ for _f in "$pkgdir"/usr/bin/*; do
+ [[ $_f == */rbx ]] && continue
+ mv $_f "$srcdir/ruby/usr/bin"
+ done
+}
+
+package_rubinius-ruby() {
+ pkgdesc="Ruby compat for Rubinius"
+ depends=(rubinius)
+ provides=(ruby)
+ conflicts=(ruby)
+ backup=(etc/gemrc)
+
+ mv ruby/* "$pkgdir"
+ install -Dm644 gemrc "$pkgdir/etc/gemrc"
+ install -d "$pkgdir/usr/share/licenses/rubinius-ruby"
+ ln -s ../rubinius/LICENSE "$pkgdir/usr/share/licenses/rubinius-ruby/LICENSE"
+}
Copied: rubinius/repos/community-staging-x86_64/gemrc (from rev 103551, rubinius/trunk/gemrc)
===================================================================
--- community-staging-x86_64/gemrc (rev 0)
+++ community-staging-x86_64/gemrc 2014-01-07 21:29:33 UTC (rev 103552)
@@ -0,0 +1,5 @@
+# Read about the gemrc format at http://docs.rubygems.org/read/chapter/11
+
+# --user-install is used to install to $HOME/.gem/ by default since we want to separate
+# pacman installed gems and gem installed gems
+gem: --user-install
Copied: rubinius/repos/community-staging-x86_64/llvm34.patch (from rev 103551, rubinius/trunk/llvm34.patch)
===================================================================
--- community-staging-x86_64/llvm34.patch (rev 0)
+++ community-staging-x86_64/llvm34.patch 2014-01-07 21:29:33 UTC (rev 103552)
@@ -0,0 +1,182 @@
+diff --git i/vm/llvm/disassembler.cpp w/vm/llvm/disassembler.cpp
+index 79c74ff..b3ea424 100644
+--- i/vm/llvm/disassembler.cpp
++++ w/vm/llvm/disassembler.cpp
+@@ -46,20 +46,27 @@ namespace rubinius {
+ #if RBX_LLVM_API_VER > 300
+ llvm::TargetOptions options;
+ options.NoFramePointerElim = true;
++#if RBX_LLVM_API_VER < 304
+ options.NoFramePointerElimNonLeaf = true;
++#endif
+ target_machine = target->createTargetMachine(host, llvm::sys::getHostCPUName(), "", options);
+ #else
+ target_machine = target->createTargetMachine(host, llvm::sys::getHostCPUName(), "");
+ #endif
+
+ sub_target = target->createMCSubtargetInfo(host, llvm::sys::getHostCPUName(), "");
+- asm_info = target->createMCAsmInfo(host);
+
+ #if RBX_LLVM_API_VER > 300
+ instr_info = target->createMCInstrInfo();
+ reg_info = target->createMCRegInfo(host);
+ #endif
+
++#if RBX_LLVM_API_VER > 303
++ asm_info = target->createMCAsmInfo(*reg_info, host);
++#else
++ asm_info = target->createMCAsmInfo(host);
++#endif
++
+ if(asm_info) {
+ disassembler = target->createMCDisassembler(*sub_target);
+ memory_object = new JITMemoryObject((const uint8_t*)buffer, (uint64_t) size);
+diff --git i/vm/llvm/jit_builder.cpp w/vm/llvm/jit_builder.cpp
+index 652350f..c479aab 100644
+--- i/vm/llvm/jit_builder.cpp
++++ w/vm/llvm/jit_builder.cpp
+@@ -56,12 +56,21 @@ namespace jit {
+ "", "rubinius", true, "", 0);
+ DIFile file = debug_builder().createFile(file_str, "");
+
++#if RBX_LLVM_API_VER > 303
++ DIType dummy_return_type = debug_builder().createNullPtrType();
++ Value* dummy_signature[] = {
++ &*dummy_return_type,
++ };
++ DICompositeType dummy_subroutine_type = debug_builder().createSubroutineType(file,
++ debug_builder().getOrCreateArray(dummy_signature));
++#else
+ DIType dummy_return_type = debug_builder().createNullPtrType("dummy type");
+ Value* dummy_signature[] = {
+ &*dummy_return_type,
+ };
+ DIType dummy_subroutine_type = debug_builder().createSubroutineType(file,
+ debug_builder().getOrCreateArray(dummy_signature));
++#endif
+
+ #if RBX_LLVM_API_VER > 300
+ DISubprogram subprogram = debug_builder().createFunction(file, "", "",
+diff --git i/vm/llvm/jit_context.cpp w/vm/llvm/jit_context.cpp
+index e555adb..594a63a 100644
+--- i/vm/llvm/jit_context.cpp
++++ w/vm/llvm/jit_context.cpp
+@@ -84,7 +84,9 @@ namespace rubinius {
+ #if RBX_LLVM_API_VER > 300
+ llvm::TargetOptions opts;
+ opts.NoFramePointerElim = true;
++#if RBX_LLVM_API_VER < 304
+ opts.NoFramePointerElimNonLeaf = true;
++#endif
+ opts.JITEmitDebugInfo = true;
+
+ factory.setTargetOptions(opts);
+diff --git i/vm/llvm/jit_memory_manager.hpp w/vm/llvm/jit_memory_manager.hpp
+index 8a58a09..7205f89 100644
+--- i/vm/llvm/jit_memory_manager.hpp
++++ w/vm/llvm/jit_memory_manager.hpp
+@@ -202,7 +202,7 @@ namespace jit {
+
+ public:
+ RubiniusJITMemoryManager();
+- ~RubiniusJITMemoryManager();
++ virtual ~RubiniusJITMemoryManager();
+
+ /// allocateNewSlab - Allocates a new MemoryBlock and remembers it as the
+ /// last slab it allocated, so that subsequent allocations follow it.
+@@ -356,8 +356,13 @@ namespace jit {
+ }
+
+ /// allocateCodeSection - Allocate memory for a code section.
++#if RBX_LLVM_API_VER > 303
++ virtual uint8_t *allocateCodeSection(uintptr_t Size, unsigned Alignment,
++ unsigned SectionID, StringRef SectionName) {
++#else
+ uint8_t *allocateCodeSection(uintptr_t Size, unsigned Alignment,
+ unsigned SectionID) {
++#endif
+ utilities::thread::SpinLock::LockGuard guard(lock_);
+ // Grow the required block size to account for the block header
+ Size += sizeof(*CurBlock);
+@@ -397,11 +402,21 @@ namespace jit {
+ }
+
+ /// allocateDataSection - Allocate memory for a data section.
+- uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment,
+- unsigned SectionID) {
++ /// TODO: currently IsReadOnly is ignored.
++#if RBX_LLVM_API_VER > 303
++ virtual uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment,
++ unsigned SectionID, StringRef SectionName,
++ bool IsReadOnly) {
+ utilities::thread::SpinLock::LockGuard guard(lock_);
+ return (uint8_t*)DataAllocator.Allocate(Size, Alignment);
+ }
++#else
++ uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment,
++ unsigned SectionID, bool IsReadOnly) {
++ utilities::thread::SpinLock::LockGuard guard(lock_);
++ return (uint8_t*)DataAllocator.Allocate(Size, Alignment);
++ }
++#endif
+
+ /// startExceptionTable - Use startFunctionBody to allocate memory for the
+ /// function's exception table.
+@@ -495,7 +510,7 @@ namespace jit {
+ , GOTBase(NULL)
+ {}
+
+- ~RubiniusRequestJITMemoryManager() {
++ virtual ~RubiniusRequestJITMemoryManager() {
+ if(GOTBase) delete[] GOTBase;
+ }
+
+@@ -504,17 +519,32 @@ namespace jit {
+ return mgr_->getPointerToNamedFunction(Name, AbortOnFailure);
+ }
+
++#if RBX_LLVM_API_VER >= 304
++ virtual uint8_t *allocateCodeSection(uintptr_t Size, unsigned Alignment,
++ unsigned SectionID, StringRef SectionName) {
++ return mgr_->allocateCodeSection(Size, Alignment, SectionID,
++ SectionName);
++ }
++#else
+ uint8_t *allocateCodeSection(uintptr_t Size, unsigned Alignment,
+ unsigned SectionID) {
+ return mgr_->allocateCodeSection(Size, Alignment, SectionID);
+ }
++#endif
+
+ /// allocateDataSection - Allocate memory for a data section.
+-#if RBX_LLVM_API_VER >= 303
++#if RBX_LLVM_API_VER >= 304
++ virtual uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment,
++ unsigned SectionID, StringRef SectionName,
++ bool IsReadOnly) {
++ return mgr_->allocateDataSection(Size, Alignment, SectionID,
++ SectionName, IsReadOnly);
++ }
++#elif RBX_LLVM_API_VER >= 303
+ uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment,
+ unsigned SectionID, bool IsReadOnly) {
+- // TODO: currently IsReadOnly is ignored.
+- return mgr_->allocateDataSection(Size, Alignment, SectionID);
++ return mgr_->allocateDataSection(Size, Alignment, SectionID,
++ IsReadOnly);
+ }
+ #else
+ uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment,
+@@ -601,6 +631,12 @@ namespace jit {
+ void resetGeneratedFunction() {
+ GeneratedFunction = NULL;
+ }
++
++#if RBX_LLVM_API_VER > 303
++ virtual bool finalizeMemory(std::string* ErrMsg = 0) {
++ return false;
++ }
++#endif
+ };
+
+
More information about the arch-commits
mailing list