Skip to content

Commit

Permalink
More .h -> .hpp conversions and removal of dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
JustCallMeRay committed Dec 1, 2024
1 parent db1dd72 commit 1937183
Show file tree
Hide file tree
Showing 194 changed files with 487 additions and 526 deletions.
153 changes: 76 additions & 77 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -122,96 +122,95 @@ add_custom_command(
include_directories(${LLVM_INCLUDE_DIRS})
add_definitions(${LLVM_DEFINITIONS})
set(CODON_HPPFILES
codon/compiler/compiler.h
codon/compiler/debug_listener.h
codon/compiler/engine.h
codon/compiler/compiler.hpp
codon/compiler/debug_listener.hpp
codon/compiler/engine.hpp
codon/compiler/error.hpp
codon/compiler/jit.h
codon/compiler/memory_manager.h
codon/dsl/dsl.h
codon/dsl/plugins.h
codon/compiler/jit.hpp
codon/compiler/memory_manager.hpp
codon/dsl/dsl.hpp
codon/dsl/plugins.hpp
codon/parser/ast.hpp
codon/parser/ast/expr.h
codon/parser/ast/stmt.h
codon/parser/ast/expr.hpp
codon/parser/ast/stmt.hpp
codon/parser/ast/types.h
codon/parser/ast/types/type.h
codon/parser/ast/types/link.h
codon/parser/ast/types/class.h
codon/parser/ast/types/function.h
codon/parser/ast/types/union.h
codon/parser/ast/types/static.h
codon/parser/ast/types/traits.h
codon/parser/ast/types/type.hpp
codon/parser/ast/types/link.hpp
codon/parser/ast/types/class.hpp
codon/parser/ast/types/function.hpp
codon/parser/ast/types/union.hpp
codon/parser/ast/types/static.hpp
codon/parser/ast/types/traits.hpp
codon/parser/cache.hpp
codon/parser/common.hpp
codon/parser/ctx.hpp
codon/parser/peg/peg.h
codon/parser/peg/rules.h
codon/parser/visitors/doc/doc.h
codon/parser/visitors/format/format.h
codon/parser/visitors/simplify/simplify.h
codon/parser/peg/peg.hpp
codon/parser/peg/rules.hpp
codon/parser/visitors/doc/doc.hpp
codon/parser/visitors/format/format.hpp
codon/parser/visitors/simplify/simplify.hpp
codon/parser/visitors/simplify/ctx.hpp
codon/parser/visitors/translate/translate.h
codon/parser/visitors/translate/translate_ctx.hpp
codon/parser/visitors/typecheck/typecheck.h
codon/parser/visitors/typecheck/ctx.hpp
codon/parser/visitors/visitor.h
codon/cir/analyze/analysis.h
codon/cir/analyze/dataflow/capture.h
codon/cir/analyze/dataflow/cfg.h
codon/cir/analyze/dataflow/dominator.h
codon/cir/analyze/dataflow/reaching.h
codon/cir/analyze/module/global_vars.h
codon/cir/analyze/module/side_effect.h
codon/cir/attribute.h
codon/cir/base.h
codon/cir/const.h
codon/cir/dsl/codegen.h
codon/cir/dsl/nodes.h
codon/cir/flow.h
codon/cir/func.h
codon/cir/instr.h
codon/cir/llvm/gpu.h
codon/cir/llvm/llvisitor.h
codon/cir/llvm/llvm.h
codon/cir/llvm/optimize.h
codon/cir/module.h
codon/cir/pyextension.h
codon/cir/cir.h
codon/cir/transform/cleanup/canonical.h
codon/cir/transform/cleanup/dead_code.h
codon/cir/transform/cleanup/global_demote.h
codon/cir/transform/cleanup/replacer.h
codon/cir/transform/folding/const_fold.h
codon/cir/transform/folding/const_prop.h
codon/cir/transform/folding/folding.h
codon/cir/transform/folding/rule.h
codon/cir/transform/lowering/imperative.h
codon/cir/transform/lowering/pipeline.h
codon/cir/analyze/analysis.hpp
codon/cir/analyze/dataflow/capture.hpp
codon/cir/analyze/dataflow/cfg.hpp
codon/cir/analyze/dataflow/dominator.hpp
codon/cir/analyze/dataflow/reaching.hpp
codon/cir/analyze/module/global_vars.hpp
codon/cir/analyze/module/side_effect.hpp
codon/cir/attribute.hpp
codon/cir/base.hpp
codon/cir/const.hpp
codon/cir/dsl/codegen.hpp
codon/cir/dsl/nodes.hpp
codon/cir/flow.hpp
codon/cir/func.hpp
codon/cir/instr.hpp
codon/cir/llvm/gpu.hpp
codon/cir/llvm/llvisitor.hpp
codon/cir/llvm/llvm.hpp
codon/cir/llvm/optimize.hpp
codon/cir/module.hpp
codon/cir/pyextension.hpp
codon/cir/cir.hpp
codon/cir/transform/cleanup/canonical.hpp
codon/cir/transform/cleanup/dead_code.hpp
codon/cir/transform/cleanup/global_demote.hpp
codon/cir/transform/cleanup/replacer.hpp
codon/cir/transform/folding/const_fold.hpp
codon/cir/transform/folding/const_prop.hpp
codon/cir/transform/folding/folding.hpp
codon/cir/transform/folding/rule.hpp
codon/cir/transform/lowering/imperative.hpp
codon/cir/transform/lowering/pipeline.hpp
codon/cir/transform/manager.h
codon/cir/transform/parallel/openmp.h
codon/cir/transform/parallel/schedule.h
codon/cir/transform/pass.h
codon/cir/transform/pythonic/dict.h
codon/cir/transform/pythonic/generator.h
codon/cir/transform/pythonic/io.h
codon/cir/transform/pythonic/list.h
codon/cir/transform/pythonic/str.h
codon/cir/transform/rewrite.h
codon/cir/types/types.h
codon/cir/util/cloning.h
codon/cir/util/context.h
codon/cir/util/format.h
codon/cir/util/inlining.h
codon/cir/util/irtools.h
codon/cir/util/iterators.h
codon/cir/util/matching.h
codon/cir/util/operator.h
codon/cir/util/outlining.h
codon/cir/util/packs.h
codon/cir/util/side_effect.h
codon/cir/util/visitor.h
codon/cir/value.h
codon/cir/var.h
codon/cir/transform/parallel/openmp.hpp
codon/cir/transform/parallel/schedule.hpp
codon/cir/transform/pass.hpp
codon/cir/transform/pythonic/dict.hpp
codon/cir/transform/pythonic/generator.hpp
codon/cir/transform/pythonic/io.hpp
codon/cir/transform/pythonic/list.hpp
codon/cir/transform/pythonic/str.hpp
codon/cir/transform/rewrite.hpp
codon/cir/types/types.hpp
codon/cir/util/cloning.hpp
codon/cir/util/format.hpp
codon/cir/util/inlining.hpp
codon/cir/util/irtools.hpp
codon/cir/util/iterators.hpp
codon/cir/util/matching.hpp
codon/cir/util/operator.hpp
codon/cir/util/outlining.hpp
codon/cir/util/packs.hpp
codon/cir/util/side_effect.hpp
codon/cir/util/visitor.hpp
codon/cir/value.hpp
codon/cir/var.hpp
codon/util/common.hpp
codon/compiler/jit_extern.h
)
Expand Down
4 changes: 2 additions & 2 deletions codon/app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
#include <unordered_map>
#include <vector>

#include "codon/compiler/compiler.h"
#include "codon/compiler/compiler.hpp"
#include "codon/compiler/error.hpp"
#include "codon/compiler/jit.h"
#include "codon/compiler/jit.hpp"
#include "codon/parser/common.hpp"
#include "codon/util/common.hpp"
#include "codon/util/jupyter.h"
Expand Down
2 changes: 1 addition & 1 deletion codon/cir/analyze/analysis.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (C) 2022-2024 Exaloop Inc. <https://exaloop.io>

#include "analysis.h"
#include "analysis.hpp"

#include "codon/cir/transform/manager.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

#include <memory>

#include "codon/cir/module.h"
#include "codon/cir/transform/pass.h"
#include "codon/cir/module.hpp"
#include "codon/cir/transform/pass.hpp"

namespace codon {
namespace ir {
Expand Down
8 changes: 4 additions & 4 deletions codon/cir/analyze/dataflow/capture.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// Copyright (C) 2022-2024 Exaloop Inc. <https://exaloop.io>

#include "capture.h"
#include "capture.hpp"

#include <algorithm>
#include <iterator>
#include <utility>

#include "codon/cir/analyze/dataflow/reaching.h"
#include "codon/cir/util/irtools.h"
#include "codon/cir/util/side_effect.h"
#include "codon/cir/analyze/dataflow/reaching.hpp"
#include "codon/cir/util/irtools.hpp"
#include "codon/cir/util/side_effect.hpp"

namespace codon {
namespace ir {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
#include <unordered_map>
#include <vector>

#include "codon/cir/analyze/analysis.h"
#include "codon/cir/analyze/dataflow/dominator.h"
#include "codon/cir/analyze/dataflow/reaching.h"
#include "codon/cir/cir.h"
#include "codon/cir/analyze/analysis.hpp"
#include "codon/cir/analyze/dataflow/dominator.hpp"
#include "codon/cir/analyze/dataflow/reaching.hpp"
#include "codon/cir/cir.hpp"

namespace codon {
namespace ir {
Expand Down
6 changes: 3 additions & 3 deletions codon/cir/analyze/dataflow/cfg.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Copyright (C) 2022-2024 Exaloop Inc. <https://exaloop.io>

#include "cfg.h"
#include "cfg.hpp"

#include <vector>

#include "codon/cir/dsl/codegen.h"
#include "codon/cir/dsl/nodes.h"
#include "codon/cir/dsl/codegen.hpp"
#include "codon/cir/dsl/nodes.hpp"

namespace codon {
namespace ir {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#include <unordered_map>
#include <unordered_set>

#include "codon/cir/analyze/analysis.h"
#include "codon/cir/cir.h"
#include "codon/cir/util/iterators.h"
#include "codon/cir/analyze/analysis.hpp"
#include "codon/cir/cir.hpp"
#include "codon/cir/util/iterators.hpp"

#define DEFAULT_VISIT(x) \
void visit(const x *v) override { defaultInsert(v); }
Expand Down
2 changes: 1 addition & 1 deletion codon/cir/analyze/dataflow/dominator.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (C) 2022-2024 Exaloop Inc. <https://exaloop.io>

#include "dominator.h"
#include "dominator.hpp"

namespace codon {
namespace ir {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#include <unordered_map>
#include <utility>

#include "codon/cir/analyze/analysis.h"
#include "codon/cir/analyze/dataflow/cfg.h"
#include "codon/cir/analyze/analysis.hpp"
#include "codon/cir/analyze/dataflow/cfg.hpp"

namespace codon {
namespace ir {
Expand Down
2 changes: 1 addition & 1 deletion codon/cir/analyze/dataflow/reaching.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (C) 2022-2024 Exaloop Inc. <https://exaloop.io>

#include "reaching.h"
#include "reaching.hpp"

#include <deque>
#include <tuple>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

#include <utility>

#include "codon/cir/analyze/analysis.h"
#include "codon/cir/analyze/dataflow/cfg.h"
#include "codon/cir/analyze/analysis.hpp"
#include "codon/cir/analyze/dataflow/cfg.hpp"

namespace codon {
namespace ir {
Expand Down
4 changes: 2 additions & 2 deletions codon/cir/analyze/module/global_vars.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (C) 2022-2024 Exaloop Inc. <https://exaloop.io>

#include "global_vars.h"
#include "global_vars.hpp"

#include "codon/cir/util/operator.h"
#include "codon/cir/util/operator.hpp"

namespace codon {
namespace ir {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <unordered_map>

#include "codon/cir/analyze/analysis.h"
#include "codon/cir/analyze/analysis.hpp"

namespace codon {
namespace ir {
Expand Down
8 changes: 4 additions & 4 deletions codon/cir/analyze/module/side_effect.cpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// Copyright (C) 2022-2024 Exaloop Inc. <https://exaloop.io>

#include "side_effect.h"
#include "side_effect.hpp"

#include <type_traits>
#include <utility>

#include "codon/cir/analyze/dataflow/capture.h"
#include "codon/cir/util/irtools.h"
#include "codon/cir/util/operator.h"
#include "codon/cir/analyze/dataflow/capture.hpp"
#include "codon/cir/util/irtools.hpp"
#include "codon/cir/util/operator.hpp"

namespace codon {
namespace ir {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

#include <unordered_map>

#include "codon/cir/analyze/analysis.h"
#include "codon/cir/util/side_effect.h"
#include "codon/cir/analyze/analysis.hpp"
#include "codon/cir/util/side_effect.hpp"

namespace codon {
namespace ir {
Expand Down
8 changes: 4 additions & 4 deletions codon/cir/attribute.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Copyright (C) 2022-2024 Exaloop Inc. <https://exaloop.io>

#include "attribute.h"
#include "attribute.hpp"

#include "codon/cir/func.h"
#include "codon/cir/util/cloning.h"
#include "codon/cir/value.h"
#include "codon/cir/func.hpp"
#include "codon/cir/util/cloning.hpp"
#include "codon/cir/value.hpp"
#include <fmt/ostream.h>

namespace codon {
Expand Down
File renamed without changes.
10 changes: 5 additions & 5 deletions codon/cir/base.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Copyright (C) 2022-2024 Exaloop Inc. <https://exaloop.io>

#include "base.h"
#include "base.hpp"

#include "codon/cir/types/types.h"
#include "codon/cir/util/format.h"
#include "codon/cir/value.h"
#include "codon/cir/var.h"
#include "codon/cir/types/types.hpp"
#include "codon/cir/util/format.hpp"
#include "codon/cir/value.hpp"
#include "codon/cir/var.hpp"

namespace codon {
namespace ir {
Expand Down
6 changes: 3 additions & 3 deletions codon/cir/base.h → codon/cir/base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#include <unordered_map>
#include <utility>

#include "codon/cir/attribute.h"
#include "codon/cir/util/iterators.h"
#include "codon/cir/util/visitor.h"
#include "codon/cir/attribute.hpp"
#include "codon/cir/util/iterators.hpp"
#include "codon/cir/util/visitor.hpp"
#include "codon/util/common.hpp"
#include <fmt/format.h>
#include <fmt/ostream.h>
Expand Down
Loading

0 comments on commit 1937183

Please sign in to comment.