[macruby-changes] [3408] MacRuby/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Mon Feb 1 19:23:01 PST 2010
Revision: 3408
http://trac.macosforge.org/projects/ruby/changeset/3408
Author: lsansonetti at apple.com
Date: 2010-02-01 19:23:01 -0800 (Mon, 01 Feb 2010)
Log Message:
-----------
we now require LLVM revision 89156, everyone to your compiler stations!
Revision Links:
--------------
http://trac.macosforge.org/projects/ruby/changeset/89156
Modified Paths:
--------------
MacRuby/trunk/README.rdoc
MacRuby/trunk/compiler.cpp
MacRuby/trunk/compiler.h
MacRuby/trunk/vm.cpp
Modified: MacRuby/trunk/README.rdoc
===================================================================
--- MacRuby/trunk/README.rdoc 2010-02-02 02:49:43 UTC (rev 3407)
+++ MacRuby/trunk/README.rdoc 2010-02-02 03:23:01 UTC (rev 3408)
@@ -24,9 +24,9 @@
* LLVM ToT, compiled for both i386 and x86_64.
LLVM is a moving target and breaks periodically. We recommend to install
- revision 82747.
+ revision 89156.
- $ svn co -r 82747 https://llvm.org/svn/llvm-project/llvm/trunk llvm-trunk
+ $ svn co -r 89156 https://llvm.org/svn/llvm-project/llvm/trunk llvm-trunk
$ cd llvm-trunk
$ ./configure --enable-bindings=none
$ UNIVERSAL=1 UNIVERSAL_ARCH="i386 x86_64" ENABLE_OPTIMIZED=1 make
Modified: MacRuby/trunk/compiler.cpp
===================================================================
--- MacRuby/trunk/compiler.cpp 2010-02-02 02:49:43 UTC (rev 3407)
+++ MacRuby/trunk/compiler.cpp 2010-02-02 03:23:01 UTC (rev 3408)
@@ -12,9 +12,7 @@
# define DW_LANG_Ruby 0x15 // TODO: Python is 0x14, request a real number
#endif
-#if LLVM_TOT
-# include <llvm/LLVMContext.h>
-#endif
+#include <llvm/LLVMContext.h>
#include "llvm.h"
#include "ruby/ruby.h"
@@ -187,13 +185,11 @@
level = 0;
#endif
-#if LLVM_TOT
dbg_mdkind = context.getMetadata().getMDKind("dbg");
if (dbg_mdkind == 0) {
dbg_mdkind = context.getMetadata().registerMDKind("dbg");
}
assert(dbg_mdkind != 0);
-#endif
}
RoxorAOTCompiler::RoxorAOTCompiler(void)
@@ -764,13 +760,9 @@
Instruction *insn = compile_protected_call(dispatcherFunc, params);
if (fname != NULL) {
-#if LLVM_TOT
DILocation loc = debug_info->CreateLocation(current_line, 0,
debug_compile_unit, DILocation(NULL));
context.getMetadata().addMD(dbg_mdkind, loc.getNode(), insn);
-#else
- debug_info->InsertStopPoint(debug_compile_unit, current_line, 0, bb);
-#endif
}
return insn;
}
@@ -1148,11 +1140,7 @@
Instruction *slot_insn = dyn_cast<Instruction>(slot);
if (slot_insn != NULL) {
-#if LLVM_TOT
Instruction *insn = slot_insn->clone();
-#else
- Instruction *insn = slot_insn->clone(context);
-#endif
BasicBlock::InstListType &list = bb->getInstList();
list.insert(list.end(), insn);
return insn;
@@ -1886,18 +1874,8 @@
Intrinsic::eh_exception);
Value *eh_ptr = CallInst::Create(eh_exception_f, "", bb);
-#if LLVM_TOT
Function *eh_selector_f = Intrinsic::getDeclaration(module,
Intrinsic::eh_selector);
-#else
-# if __LP64__
- Function *eh_selector_f = Intrinsic::getDeclaration(module,
- Intrinsic::eh_selector_i64);
-# else
- Function *eh_selector_f = Intrinsic::getDeclaration(module,
- Intrinsic::eh_selector_i32);
-# endif
-#endif
std::vector<Value *> params;
params.push_back(eh_ptr);
@@ -1924,18 +1902,8 @@
if (eh_type != typeid(void)) {
// TODO: this doesn't work yet, the type id must be a GlobalVariable...
-#if LLVM_TOT
Function *eh_typeid_for_f = Intrinsic::getDeclaration(module,
Intrinsic::eh_typeid_for);
-#else
-# if __LP64__
- Function *eh_typeid_for_f = Intrinsic::getDeclaration(module,
- Intrinsic::eh_typeid_for_i64);
-# else
- Function *eh_typeid_for_f = Intrinsic::getDeclaration(module,
- Intrinsic::eh_typeid_for_i32);
-# endif
-#endif
std::vector<Value *> params;
params.push_back(compile_const_pointer((void *)&eh_type));
@@ -2994,11 +2962,7 @@
Instruction *slot_insn = dyn_cast<Instruction>(ivar_slot);
if (slot_insn != NULL) {
-#if LLVM_TOT
Instruction *insn = slot_insn->clone();
-#else
- Instruction *insn = slot_insn->clone(context);
-#endif
list.insert(list_iter, insn);
params.push_back(insn);
}
Modified: MacRuby/trunk/compiler.h
===================================================================
--- MacRuby/trunk/compiler.h 2010-02-02 02:49:43 UTC (rev 3407)
+++ MacRuby/trunk/compiler.h 2010-02-02 03:23:01 UTC (rev 3408)
@@ -222,9 +222,7 @@
const Type *IntTy;
const PointerType *Int32PtrTy;
-#if LLVM_TOT
unsigned dbg_mdkind;
-#endif
void compile_node_error(const char *msg, NODE *node);
Modified: MacRuby/trunk/vm.cpp
===================================================================
--- MacRuby/trunk/vm.cpp 2010-02-02 02:49:43 UTC (rev 3407)
+++ MacRuby/trunk/vm.cpp 2010-02-02 03:23:01 UTC (rev 3408)
@@ -33,9 +33,7 @@
#include <llvm/Support/PrettyStackTrace.h> // Including PST to disable it
#include <llvm/Intrinsics.h>
#include <llvm/Bitcode/ReaderWriter.h>
-#if LLVM_TOT
-# include <llvm/LLVMContext.h>
-#endif
+#include <llvm/LLVMContext.h>
using namespace llvm;
#if ROXOR_COMPILER_DEBUG
@@ -176,17 +174,6 @@
return mm->getGOTBase();
}
-#if LLVM_TOT
-#else
- void SetDlsymTable(void *ptr) {
- mm->SetDlsymTable(ptr);
- }
-
- void *getDlsymTable() const {
- return mm->getDlsymTable();
- }
-#endif
-
uint8_t *startFunctionBody(const Function *F,
uintptr_t &ActualSize) {
return mm->startFunctionBody(F, ActualSize);
@@ -206,7 +193,6 @@
FunctionEnd));
}
-#if LLVM_TOT
void deallocateFunctionBody(void *data) {
mm->deallocateFunctionBody(data);
}
@@ -214,11 +200,6 @@
void deallocateExceptionTable(void *data) {
mm->deallocateExceptionTable(data);
}
-#else
- void deallocateMemForFunction(const Function *F) {
- mm->deallocateMemForFunction(F);
- }
-#endif
uint8_t* startExceptionTable(const Function* F,
uintptr_t &ActualSize) {
@@ -247,20 +228,10 @@
for (std::vector<EmittedFunctionDetails::LineStart>::const_iterator iter = Details.LineStarts.begin(); iter != Details.LineStarts.end(); ++iter) {
DebugLocTuple dlt = Details.MF->getDebugLocTuple(iter->Loc);
if (path.size() == 0) {
-#if LLVM_TOT
DICompileUnit unit(dlt.Scope);
path.append(unit.getDirectory());
path.append("/");
path.append(unit.getFilename());
-#else
- DICompileUnit unit(dlt.CompileUnit);
- std::string dir, file;
- unit.getDirectory(dir);
- unit.getFilename(file);
- path.append(dir);
- path.append("/");
- path.append(file);
-#endif
}
RoxorFunction::Line line(iter->Address, dlt.Line);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100201/64e5fd66/attachment-0001.html>
More information about the macruby-changes
mailing list