mirror of https://github.com/exaloop/codon.git
Rename
parent
3e72453f82
commit
50bd57fed6
compiler
runtime
|
@ -25,8 +25,8 @@ PluginManager::Error PluginManager::load(const std::string &path) {
|
|||
}
|
||||
|
||||
PluginManager::Error PluginManager::load(DSL *dsl) {
|
||||
if (!dsl ||
|
||||
!dsl->isVersionSupported(SEQ_VERSION_MAJOR, SEQ_VERSION_MINOR, SEQ_VERSION_PATCH))
|
||||
if (!dsl || !dsl->isVersionSupported(CODON_VERSION_MAJOR, CODON_VERSION_MINOR,
|
||||
CODON_VERSION_PATCH))
|
||||
return Error::UNSUPPORTED_VERSION;
|
||||
|
||||
dsl->addIRPasses(pm, debug);
|
||||
|
|
|
@ -38,7 +38,7 @@ ir::Module *parse(const string &argv0, const string &file, const string &code,
|
|||
bool isCode, int isTest, int startLine,
|
||||
const std::unordered_map<std::string, std::string> &defines) {
|
||||
try {
|
||||
auto d = getenv("SEQ_DEBUG");
|
||||
auto d = getenv("CODON_DEBUG");
|
||||
if (d) {
|
||||
auto s = string(d);
|
||||
_dbg_level |= s.find('t') != string::npos ? (1 << 0) : 0; // time
|
||||
|
|
|
@ -13,9 +13,9 @@
|
|||
|
||||
#define STR_HELPER(x) #x
|
||||
#define STR(x) STR_HELPER(x)
|
||||
#define SEQ_VERSION_STRING() \
|
||||
("codon version " STR(SEQ_VERSION_MAJOR) "." STR(SEQ_VERSION_MINOR) "." STR( \
|
||||
SEQ_VERSION_PATCH))
|
||||
#define CODON_VERSION_STRING() \
|
||||
("codon version " STR(CODON_VERSION_MAJOR) "." STR(CODON_VERSION_MINOR) "." STR( \
|
||||
CODON_VERSION_PATCH))
|
||||
|
||||
extern "C" void seq_gc_add_roots(void *start, void *end);
|
||||
extern "C" void seq_gc_remove_roots(void *start, void *end);
|
||||
|
@ -481,7 +481,7 @@ void LLVMVisitor::writeToExecutable(const std::string &filename,
|
|||
addEnvVarPathsToLinkerArgs(command, "LIBRARY_PATH");
|
||||
addEnvVarPathsToLinkerArgs(command, "LD_LIBRARY_PATH");
|
||||
addEnvVarPathsToLinkerArgs(command, "DYLD_LIBRARY_PATH");
|
||||
addEnvVarPathsToLinkerArgs(command, "SEQ_LIBRARY_PATH");
|
||||
addEnvVarPathsToLinkerArgs(command, "CODON_LIBRARY_PATH");
|
||||
for (const auto &lib : libs) {
|
||||
command.push_back("-l" + lib);
|
||||
}
|
||||
|
@ -606,7 +606,7 @@ int typeIdxLookup(const std::string &name) {
|
|||
|
||||
llvm::GlobalVariable *LLVMVisitor::getTypeIdxVar(const std::string &name) {
|
||||
auto *typeInfoType = getTypeInfoType();
|
||||
const std::string typeVarName = "seq.typeidx." + (name.empty() ? "<all>" : name);
|
||||
const std::string typeVarName = "codon.typeidx." + (name.empty() ? "<all>" : name);
|
||||
llvm::GlobalVariable *tidx = module->getGlobalVariable(typeVarName);
|
||||
int idx = typeIdxLookup(name);
|
||||
if (!tidx) {
|
||||
|
@ -687,9 +687,9 @@ void LLVMVisitor::visit(const Module *x) {
|
|||
// debug info setup
|
||||
db.builder = std::make_unique<llvm::DIBuilder>(*module);
|
||||
llvm::DIFile *file = db.getFile(srcInfo->file);
|
||||
db.unit =
|
||||
db.builder->createCompileUnit(llvm::dwarf::DW_LANG_C, file, SEQ_VERSION_STRING(),
|
||||
!db.debug, db.flags, /*RV=*/0);
|
||||
db.unit = db.builder->createCompileUnit(llvm::dwarf::DW_LANG_C, file,
|
||||
CODON_VERSION_STRING(), !db.debug, db.flags,
|
||||
/*RV=*/0);
|
||||
module->addModuleFlag(llvm::Module::Warning, "Debug Info Version",
|
||||
llvm::DEBUG_METADATA_VERSION);
|
||||
// darwin only supports dwarf2
|
||||
|
@ -2021,7 +2021,7 @@ void LLVMVisitor::visit(const TryCatchFlow *x) {
|
|||
for (auto *catchType : catchTypesFull) {
|
||||
seqassert(!catchType || cast<types::RefType>(catchType), "invalid catch type");
|
||||
const std::string typeVarName =
|
||||
"seq.typeidx." + (catchType ? catchType->getName() : "<all>");
|
||||
"codon.typeidx." + (catchType ? catchType->getName() : "<all>");
|
||||
llvm::GlobalVariable *tidx = getTypeIdxVar(catchType);
|
||||
typeIndices.push_back(tidx);
|
||||
caughtResult->addClause(tidx);
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#define SEQ_VERSION_MAJOR 0
|
||||
#define SEQ_VERSION_MINOR 11
|
||||
#define SEQ_VERSION_PATCH 0
|
||||
#define CODON_VERSION_MAJOR 0
|
||||
#define CODON_VERSION_MINOR 11
|
||||
#define CODON_VERSION_PATCH 0
|
||||
|
||||
#include <cassert>
|
||||
#include <climits>
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
|
||||
namespace {
|
||||
void versMsg(llvm::raw_ostream &out) {
|
||||
out << "Seq " << SEQ_VERSION_MAJOR << "." << SEQ_VERSION_MINOR << "."
|
||||
<< SEQ_VERSION_PATCH << "\n";
|
||||
out << CODON_VERSION_MAJOR << "." << CODON_VERSION_MINOR << "." << CODON_VERSION_PATCH
|
||||
<< "\n";
|
||||
}
|
||||
|
||||
const std::vector<std::string> &supportedExtensions() {
|
||||
|
|
Loading…
Reference in New Issue