From 1937183cd195b75eb248b3185a856355bca2aa20 Mon Sep 17 00:00:00 2001 From: JustCallMeRay <57572379+JustCallMeRay@users.noreply.github.com> Date: Sat, 30 Nov 2024 20:57:19 +0000 Subject: [PATCH] More .h -> .hpp conversions and removal of dead code --- CMakeLists.txt | 153 +++++++++--------- codon/app/main.cpp | 4 +- codon/cir/analyze/analysis.cpp | 2 +- .../cir/analyze/{analysis.h => analysis.hpp} | 4 +- codon/cir/analyze/dataflow/capture.cpp | 8 +- .../dataflow/{capture.h => capture.hpp} | 8 +- codon/cir/analyze/dataflow/cfg.cpp | 6 +- codon/cir/analyze/dataflow/{cfg.h => cfg.hpp} | 6 +- codon/cir/analyze/dataflow/dominator.cpp | 2 +- .../dataflow/{dominator.h => dominator.hpp} | 4 +- codon/cir/analyze/dataflow/reaching.cpp | 2 +- .../dataflow/{reaching.h => reaching.hpp} | 4 +- codon/cir/analyze/module/global_vars.cpp | 4 +- .../module/{global_vars.h => global_vars.hpp} | 2 +- codon/cir/analyze/module/side_effect.cpp | 8 +- .../module/{side_effect.h => side_effect.hpp} | 4 +- codon/cir/attribute.cpp | 8 +- codon/cir/{attribute.h => attribute.hpp} | 0 codon/cir/base.cpp | 10 +- codon/cir/{base.h => base.hpp} | 6 +- codon/cir/cir.h | 13 -- codon/cir/cir.hpp | 13 ++ codon/cir/const.cpp | 2 +- codon/cir/{const.h => const.hpp} | 4 +- codon/cir/dsl/{codegen.h => codegen.hpp} | 4 +- codon/cir/dsl/nodes.cpp | 2 +- codon/cir/dsl/{nodes.h => nodes.hpp} | 8 +- codon/cir/flow.cpp | 6 +- codon/cir/{flow.h => flow.hpp} | 8 +- codon/cir/func.cpp | 12 +- codon/cir/{func.h => func.hpp} | 6 +- codon/cir/instr.cpp | 6 +- codon/cir/{instr.h => instr.hpp} | 10 +- codon/cir/llvm/gpu.cpp | 2 +- codon/cir/llvm/{gpu.h => gpu.hpp} | 2 +- codon/cir/llvm/llvisitor.cpp | 12 +- codon/cir/llvm/{llvisitor.h => llvisitor.hpp} | 8 +- codon/cir/llvm/{llvm.h => llvm.hpp} | 0 codon/cir/llvm/optimize.cpp | 4 +- codon/cir/llvm/{optimize.h => optimize.hpp} | 4 +- codon/cir/module.cpp | 4 +- codon/cir/{module.h => module.hpp} | 8 +- codon/cir/{pyextension.h => pyextension.hpp} | 4 +- codon/cir/transform/cleanup/canonical.cpp | 10 +- .../cleanup/{canonical.h => canonical.hpp} | 4 +- codon/cir/transform/cleanup/dead_code.cpp | 6 +- .../cleanup/{dead_code.h => dead_code.hpp} | 2 +- codon/cir/transform/cleanup/global_demote.cpp | 2 +- .../{global_demote.h => global_demote.hpp} | 2 +- codon/cir/transform/cleanup/replacer.cpp | 8 +- .../cleanup/{replacer.h => replacer.hpp} | 2 +- codon/cir/transform/folding/const_fold.cpp | 6 +- .../folding/{const_fold.h => const_fold.hpp} | 4 +- codon/cir/transform/folding/const_prop.cpp | 8 +- .../folding/{const_prop.h => const_prop.hpp} | 2 +- codon/cir/transform/folding/folding.cpp | 6 +- .../folding/{folding.h => folding.hpp} | 8 +- .../transform/folding/{rule.h => rule.hpp} | 6 +- codon/cir/transform/lowering/imperative.cpp | 8 +- .../lowering/{imperative.h => imperative.hpp} | 2 +- codon/cir/transform/lowering/pipeline.cpp | 8 +- .../lowering/{pipeline.h => pipeline.hpp} | 2 +- codon/cir/transform/manager.cpp | 34 ++-- codon/cir/transform/manager.h | 6 +- codon/cir/transform/parallel/openmp.cpp | 10 +- .../parallel/{openmp.h => openmp.hpp} | 2 +- codon/cir/transform/parallel/schedule.cpp | 6 +- .../parallel/{schedule.h => schedule.hpp} | 2 +- codon/cir/transform/pass.cpp | 2 +- codon/cir/transform/{pass.h => pass.hpp} | 4 +- codon/cir/transform/pythonic/dict.cpp | 8 +- .../transform/pythonic/{dict.h => dict.hpp} | 2 +- codon/cir/transform/pythonic/generator.cpp | 8 +- .../pythonic/{generator.h => generator.hpp} | 2 +- codon/cir/transform/pythonic/io.cpp | 6 +- codon/cir/transform/pythonic/{io.h => io.hpp} | 2 +- codon/cir/transform/pythonic/list.cpp | 6 +- .../transform/pythonic/{list.h => list.hpp} | 2 +- codon/cir/transform/pythonic/str.cpp | 6 +- .../cir/transform/pythonic/{str.h => str.hpp} | 2 +- .../cir/transform/{rewrite.h => rewrite.hpp} | 4 +- codon/cir/types/types.cpp | 12 +- codon/cir/types/{types.h => types.hpp} | 6 +- codon/cir/util/cloning.cpp | 4 +- codon/cir/util/{cloning.h => cloning.hpp} | 4 +- codon/cir/util/context.h | 38 ----- codon/cir/util/format.cpp | 4 +- codon/cir/util/{format.h => format.hpp} | 2 +- codon/cir/util/inlining.cpp | 8 +- codon/cir/util/{inlining.h => inlining.hpp} | 2 +- codon/cir/util/irtools.cpp | 2 +- codon/cir/util/{irtools.h => irtools.hpp} | 2 +- codon/cir/util/{iterators.h => iterators.hpp} | 0 codon/cir/util/matching.cpp | 6 +- codon/cir/util/{matching.h => matching.hpp} | 2 +- codon/cir/util/{operator.h => operator.hpp} | 4 +- codon/cir/util/outlining.cpp | 8 +- codon/cir/util/{outlining.h => outlining.hpp} | 2 +- codon/cir/util/{packs.h => packs.hpp} | 0 codon/cir/util/side_effect.cpp | 2 +- .../util/{side_effect.h => side_effect.hpp} | 0 codon/cir/util/visitor.cpp | 4 +- codon/cir/util/{visitor.h => visitor.hpp} | 0 codon/cir/value.cpp | 6 +- codon/cir/{value.h => value.hpp} | 6 +- codon/cir/var.cpp | 4 +- codon/cir/{var.h => var.hpp} | 4 +- codon/compiler/compiler.cpp | 10 +- codon/compiler/{compiler.h => compiler.hpp} | 6 +- codon/compiler/debug_listener.cpp | 2 +- .../{debug_listener.h => debug_listener.hpp} | 2 +- codon/compiler/engine.cpp | 6 +- codon/compiler/{engine.h => engine.hpp} | 4 +- codon/compiler/jit.cpp | 10 +- codon/compiler/{jit.h => jit.hpp} | 8 +- codon/compiler/memory_manager.cpp | 2 +- .../{memory_manager.h => memory_manager.hpp} | 2 +- codon/dsl/{dsl.h => dsl.hpp} | 4 +- codon/dsl/plugins.cpp | 2 +- codon/dsl/{plugins.h => plugins.hpp} | 4 +- codon/parser/ast.hpp | 4 +- codon/parser/ast/expr.cpp | 2 +- codon/parser/ast/{expr.h => expr.hpp} | 0 codon/parser/ast/stmt.cpp | 2 +- codon/parser/ast/{stmt.h => stmt.hpp} | 2 +- codon/parser/ast/types.h | 14 +- codon/parser/ast/types/class.cpp | 4 +- codon/parser/ast/types/{class.h => class.hpp} | 2 +- codon/parser/ast/types/function.cpp | 4 +- .../ast/types/{function.h => function.hpp} | 4 +- codon/parser/ast/types/link.cpp | 4 +- codon/parser/ast/types/{link.h => link.hpp} | 4 +- codon/parser/ast/types/static.cpp | 4 +- .../parser/ast/types/{static.h => static.hpp} | 2 +- .../parser/ast/types/{traits.h => traits.hpp} | 2 +- codon/parser/ast/types/type.cpp | 4 +- codon/parser/ast/types/{type.h => type.hpp} | 0 codon/parser/ast/types/{union.h => union.hpp} | 2 +- codon/parser/cache.cpp | 8 +- codon/parser/cache.hpp | 4 +- codon/parser/peg/grammar.peg | 2 +- codon/parser/peg/openmp.peg | 2 +- codon/parser/peg/peg.cpp | 6 +- codon/parser/peg/{peg.h => peg.hpp} | 0 codon/parser/peg/{rules.h => rules.hpp} | 0 codon/parser/visitors/doc/doc.cpp | 6 +- codon/parser/visitors/doc/{doc.h => doc.hpp} | 0 codon/parser/visitors/format/format.cpp | 2 +- .../visitors/format/{format.h => format.hpp} | 0 codon/parser/visitors/simplify/access.cpp | 2 +- codon/parser/visitors/simplify/assign.cpp | 2 +- codon/parser/visitors/simplify/basic.cpp | 4 +- codon/parser/visitors/simplify/call.cpp | 2 +- codon/parser/visitors/simplify/class.cpp | 2 +- .../parser/visitors/simplify/collections.cpp | 2 +- codon/parser/visitors/simplify/cond.cpp | 2 +- codon/parser/visitors/simplify/ctx.cpp | 2 +- codon/parser/visitors/simplify/error.cpp | 2 +- codon/parser/visitors/simplify/function.cpp | 4 +- codon/parser/visitors/simplify/import.cpp | 4 +- codon/parser/visitors/simplify/loops.cpp | 4 +- codon/parser/visitors/simplify/op.cpp | 2 +- codon/parser/visitors/simplify/simplify.cpp | 4 +- .../simplify/{simplify.h => simplify.hpp} | 0 codon/parser/visitors/translate/translate.cpp | 4 +- codon/parser/visitors/translate/translate.h | 2 +- .../visitors/translate/translate_ctx.hpp | 4 +- codon/parser/visitors/typecheck/access.cpp | 2 +- codon/parser/visitors/typecheck/assign.cpp | 2 +- codon/parser/visitors/typecheck/basic.cpp | 2 +- codon/parser/visitors/typecheck/call.cpp | 2 +- codon/parser/visitors/typecheck/class.cpp | 2 +- .../parser/visitors/typecheck/collections.cpp | 2 +- codon/parser/visitors/typecheck/cond.cpp | 2 +- codon/parser/visitors/typecheck/ctx.cpp | 2 +- codon/parser/visitors/typecheck/error.cpp | 2 +- codon/parser/visitors/typecheck/function.cpp | 2 +- codon/parser/visitors/typecheck/infer.cpp | 4 +- codon/parser/visitors/typecheck/loops.cpp | 2 +- codon/parser/visitors/typecheck/op.cpp | 2 +- codon/parser/visitors/typecheck/typecheck.h | 2 +- docs/advanced/ir.md | 10 +- jupyter/jupyter.cpp | 4 +- jupyter/jupyter.h | 2 +- test/cir/analyze/dominator.cpp | 4 +- test/cir/analyze/reaching.cpp | 4 +- test/cir/flow.cpp | 2 +- test/cir/func.cpp | 2 +- test/cir/instr.cpp | 2 +- test/cir/module.cpp | 2 +- test/cir/test.h | 4 +- test/cir/transform/manager.cpp | 2 +- test/cir/util/matching.cpp | 2 +- test/main.cpp | 14 +- 194 files changed, 487 insertions(+), 526 deletions(-) rename codon/cir/analyze/{analysis.h => analysis.hpp} (93%) rename codon/cir/analyze/dataflow/{capture.h => capture.hpp} (93%) rename codon/cir/analyze/dataflow/{cfg.h => cfg.hpp} (99%) rename codon/cir/analyze/dataflow/{dominator.h => dominator.hpp} (94%) rename codon/cir/analyze/dataflow/{reaching.h => reaching.hpp} (95%) rename codon/cir/analyze/module/{global_vars.h => global_vars.hpp} (94%) rename codon/cir/analyze/module/{side_effect.h => side_effect.hpp} (94%) rename codon/cir/{attribute.h => attribute.hpp} (100%) rename codon/cir/{base.h => base.hpp} (98%) delete mode 100644 codon/cir/cir.h create mode 100644 codon/cir/cir.hpp rename codon/cir/{const.h => const.hpp} (97%) rename codon/cir/dsl/{codegen.h => codegen.hpp} (94%) rename codon/cir/dsl/{nodes.h => nodes.hpp} (97%) rename codon/cir/{flow.h => flow.hpp} (99%) rename codon/cir/{func.h => func.hpp} (98%) rename codon/cir/{instr.h => instr.hpp} (99%) rename codon/cir/llvm/{gpu.h => gpu.hpp} (94%) rename codon/cir/llvm/{llvisitor.h => llvisitor.hpp} (99%) rename codon/cir/llvm/{llvm.h => llvm.hpp} (100%) rename codon/cir/llvm/{optimize.h => optimize.hpp} (90%) rename codon/cir/{module.h => module.hpp} (99%) rename codon/cir/{pyextension.h => pyextension.hpp} (97%) rename codon/cir/transform/cleanup/{canonical.h => canonical.hpp} (91%) rename codon/cir/transform/cleanup/{dead_code.h => dead_code.hpp} (96%) rename codon/cir/transform/cleanup/{global_demote.h => global_demote.hpp} (95%) rename codon/cir/transform/cleanup/{replacer.h => replacer.hpp} (92%) rename codon/cir/transform/folding/{const_fold.h => const_fold.hpp} (89%) rename codon/cir/transform/folding/{const_prop.h => const_prop.hpp} (95%) rename codon/cir/transform/folding/{folding.h => folding.hpp} (86%) rename codon/cir/transform/folding/{rule.h => rule.hpp} (98%) rename codon/cir/transform/lowering/{imperative.h => imperative.hpp} (91%) rename codon/cir/transform/lowering/{pipeline.h => pipeline.hpp} (92%) rename codon/cir/transform/parallel/{openmp.h => openmp.hpp} (93%) rename codon/cir/transform/parallel/{schedule.h => schedule.hpp} (97%) rename codon/cir/transform/{pass.h => pass.hpp} (97%) rename codon/cir/transform/pythonic/{dict.h => dict.hpp} (93%) rename codon/cir/transform/pythonic/{generator.h => generator.hpp} (93%) rename codon/cir/transform/pythonic/{io.h => io.hpp} (92%) rename codon/cir/transform/pythonic/{list.h => list.hpp} (93%) rename codon/cir/transform/pythonic/{str.h => str.hpp} (92%) rename codon/cir/transform/{rewrite.h => rewrite.hpp} (95%) rename codon/cir/types/{types.h => types.hpp} (99%) rename codon/cir/util/{cloning.h => cloning.hpp} (98%) delete mode 100644 codon/cir/util/context.h rename codon/cir/util/{format.h => format.hpp} (94%) rename codon/cir/util/{inlining.h => inlining.hpp} (97%) rename codon/cir/util/{irtools.h => irtools.hpp} (99%) rename codon/cir/util/{iterators.h => iterators.hpp} (100%) rename codon/cir/util/{matching.h => matching.hpp} (97%) rename codon/cir/util/{operator.h => operator.hpp} (98%) rename codon/cir/util/{outlining.h => outlining.hpp} (99%) rename codon/cir/util/{packs.h => packs.hpp} (100%) rename codon/cir/util/{side_effect.h => side_effect.hpp} (100%) rename codon/cir/util/{visitor.h => visitor.hpp} (100%) rename codon/cir/{value.h => value.hpp} (97%) rename codon/cir/{var.h => var.hpp} (98%) rename codon/compiler/{compiler.h => compiler.hpp} (95%) rename codon/compiler/{debug_listener.h => debug_listener.hpp} (98%) rename codon/compiler/{engine.h => engine.hpp} (90%) rename codon/compiler/{jit.h => jit.hpp} (93%) rename codon/compiler/{memory_manager.h => memory_manager.hpp} (98%) rename codon/dsl/{dsl.h => dsl.hpp} (97%) rename codon/dsl/{plugins.h => plugins.hpp} (96%) rename codon/parser/ast/{expr.h => expr.hpp} (100%) rename codon/parser/ast/{stmt.h => stmt.hpp} (99%) rename codon/parser/ast/types/{class.h => class.hpp} (98%) rename codon/parser/ast/types/{function.h => function.hpp} (97%) rename codon/parser/ast/types/{link.h => link.hpp} (96%) rename codon/parser/ast/types/{static.h => static.hpp} (97%) rename codon/parser/ast/types/{traits.h => traits.hpp} (97%) rename codon/parser/ast/types/{type.h => type.hpp} (100%) rename codon/parser/ast/types/{union.h => union.hpp} (96%) rename codon/parser/peg/{peg.h => peg.hpp} (100%) rename codon/parser/peg/{rules.h => rules.hpp} (100%) rename codon/parser/visitors/doc/{doc.h => doc.hpp} (100%) rename codon/parser/visitors/format/{format.h => format.hpp} (100%) rename codon/parser/visitors/simplify/{simplify.h => simplify.hpp} (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 50f1efab..45e9b9f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 ) diff --git a/codon/app/main.cpp b/codon/app/main.cpp index b1a6c828..7a143534 100644 --- a/codon/app/main.cpp +++ b/codon/app/main.cpp @@ -11,9 +11,9 @@ #include #include -#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" diff --git a/codon/cir/analyze/analysis.cpp b/codon/cir/analyze/analysis.cpp index f62f2807..98db7df3 100644 --- a/codon/cir/analyze/analysis.cpp +++ b/codon/cir/analyze/analysis.cpp @@ -1,6 +1,6 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "analysis.h" +#include "analysis.hpp" #include "codon/cir/transform/manager.h" diff --git a/codon/cir/analyze/analysis.h b/codon/cir/analyze/analysis.hpp similarity index 93% rename from codon/cir/analyze/analysis.h rename to codon/cir/analyze/analysis.hpp index e51114ee..e0851f04 100644 --- a/codon/cir/analyze/analysis.h +++ b/codon/cir/analyze/analysis.hpp @@ -4,8 +4,8 @@ #include -#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 { diff --git a/codon/cir/analyze/dataflow/capture.cpp b/codon/cir/analyze/dataflow/capture.cpp index 3f8ed2a8..a52dd1e4 100644 --- a/codon/cir/analyze/dataflow/capture.cpp +++ b/codon/cir/analyze/dataflow/capture.cpp @@ -1,14 +1,14 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "capture.h" +#include "capture.hpp" #include #include #include -#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 { diff --git a/codon/cir/analyze/dataflow/capture.h b/codon/cir/analyze/dataflow/capture.hpp similarity index 93% rename from codon/cir/analyze/dataflow/capture.h rename to codon/cir/analyze/dataflow/capture.hpp index e08ed2fd..b5423a86 100644 --- a/codon/cir/analyze/dataflow/capture.h +++ b/codon/cir/analyze/dataflow/capture.hpp @@ -6,10 +6,10 @@ #include #include -#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 { diff --git a/codon/cir/analyze/dataflow/cfg.cpp b/codon/cir/analyze/dataflow/cfg.cpp index b3345038..1dfb0b8f 100644 --- a/codon/cir/analyze/dataflow/cfg.cpp +++ b/codon/cir/analyze/dataflow/cfg.cpp @@ -1,11 +1,11 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "cfg.h" +#include "cfg.hpp" #include -#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 { diff --git a/codon/cir/analyze/dataflow/cfg.h b/codon/cir/analyze/dataflow/cfg.hpp similarity index 99% rename from codon/cir/analyze/dataflow/cfg.h rename to codon/cir/analyze/dataflow/cfg.hpp index 9f30c30b..01eb5478 100644 --- a/codon/cir/analyze/dataflow/cfg.h +++ b/codon/cir/analyze/dataflow/cfg.hpp @@ -8,9 +8,9 @@ #include #include -#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); } diff --git a/codon/cir/analyze/dataflow/dominator.cpp b/codon/cir/analyze/dataflow/dominator.cpp index ee874b0e..9773709c 100644 --- a/codon/cir/analyze/dataflow/dominator.cpp +++ b/codon/cir/analyze/dataflow/dominator.cpp @@ -1,6 +1,6 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "dominator.h" +#include "dominator.hpp" namespace codon { namespace ir { diff --git a/codon/cir/analyze/dataflow/dominator.h b/codon/cir/analyze/dataflow/dominator.hpp similarity index 94% rename from codon/cir/analyze/dataflow/dominator.h rename to codon/cir/analyze/dataflow/dominator.hpp index 39b407d3..4c1b1e1e 100644 --- a/codon/cir/analyze/dataflow/dominator.h +++ b/codon/cir/analyze/dataflow/dominator.hpp @@ -6,8 +6,8 @@ #include #include -#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 { diff --git a/codon/cir/analyze/dataflow/reaching.cpp b/codon/cir/analyze/dataflow/reaching.cpp index c21821ed..d6a6ea8e 100644 --- a/codon/cir/analyze/dataflow/reaching.cpp +++ b/codon/cir/analyze/dataflow/reaching.cpp @@ -1,6 +1,6 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "reaching.h" +#include "reaching.hpp" #include #include diff --git a/codon/cir/analyze/dataflow/reaching.h b/codon/cir/analyze/dataflow/reaching.hpp similarity index 95% rename from codon/cir/analyze/dataflow/reaching.h rename to codon/cir/analyze/dataflow/reaching.hpp index efb5b713..dbfc3039 100644 --- a/codon/cir/analyze/dataflow/reaching.h +++ b/codon/cir/analyze/dataflow/reaching.hpp @@ -4,8 +4,8 @@ #include -#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 { diff --git a/codon/cir/analyze/module/global_vars.cpp b/codon/cir/analyze/module/global_vars.cpp index cb94e783..904c2278 100644 --- a/codon/cir/analyze/module/global_vars.cpp +++ b/codon/cir/analyze/module/global_vars.cpp @@ -1,8 +1,8 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "global_vars.h" +#include "global_vars.hpp" -#include "codon/cir/util/operator.h" +#include "codon/cir/util/operator.hpp" namespace codon { namespace ir { diff --git a/codon/cir/analyze/module/global_vars.h b/codon/cir/analyze/module/global_vars.hpp similarity index 94% rename from codon/cir/analyze/module/global_vars.h rename to codon/cir/analyze/module/global_vars.hpp index 917e6743..6cbf87e5 100644 --- a/codon/cir/analyze/module/global_vars.h +++ b/codon/cir/analyze/module/global_vars.hpp @@ -4,7 +4,7 @@ #include -#include "codon/cir/analyze/analysis.h" +#include "codon/cir/analyze/analysis.hpp" namespace codon { namespace ir { diff --git a/codon/cir/analyze/module/side_effect.cpp b/codon/cir/analyze/module/side_effect.cpp index 5688de5b..de0ffe14 100644 --- a/codon/cir/analyze/module/side_effect.cpp +++ b/codon/cir/analyze/module/side_effect.cpp @@ -1,13 +1,13 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "side_effect.h" +#include "side_effect.hpp" #include #include -#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 { diff --git a/codon/cir/analyze/module/side_effect.h b/codon/cir/analyze/module/side_effect.hpp similarity index 94% rename from codon/cir/analyze/module/side_effect.h rename to codon/cir/analyze/module/side_effect.hpp index aba9f134..99b9e750 100644 --- a/codon/cir/analyze/module/side_effect.h +++ b/codon/cir/analyze/module/side_effect.hpp @@ -4,8 +4,8 @@ #include -#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 { diff --git a/codon/cir/attribute.cpp b/codon/cir/attribute.cpp index 64e7ba87..92735009 100644 --- a/codon/cir/attribute.cpp +++ b/codon/cir/attribute.cpp @@ -1,10 +1,10 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#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 namespace codon { diff --git a/codon/cir/attribute.h b/codon/cir/attribute.hpp similarity index 100% rename from codon/cir/attribute.h rename to codon/cir/attribute.hpp diff --git a/codon/cir/base.cpp b/codon/cir/base.cpp index e61a0676..457b5702 100644 --- a/codon/cir/base.cpp +++ b/codon/cir/base.cpp @@ -1,11 +1,11 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#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 { diff --git a/codon/cir/base.h b/codon/cir/base.hpp similarity index 98% rename from codon/cir/base.h rename to codon/cir/base.hpp index cfad0e9a..cca6e282 100644 --- a/codon/cir/base.h +++ b/codon/cir/base.hpp @@ -8,9 +8,9 @@ #include #include -#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 #include diff --git a/codon/cir/cir.h b/codon/cir/cir.h deleted file mode 100644 index 8f8d22cb..00000000 --- a/codon/cir/cir.h +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (C) 2022-2024 Exaloop Inc. - -#pragma once - -#include "codon/cir/const.h" -#include "codon/cir/dsl/nodes.h" -#include "codon/cir/flow.h" -#include "codon/cir/func.h" -#include "codon/cir/instr.h" -#include "codon/cir/module.h" -#include "codon/cir/types/types.h" -#include "codon/cir/value.h" -#include "codon/cir/var.h" diff --git a/codon/cir/cir.hpp b/codon/cir/cir.hpp new file mode 100644 index 00000000..8102808b --- /dev/null +++ b/codon/cir/cir.hpp @@ -0,0 +1,13 @@ +// Copyright (C) 2022-2024 Exaloop Inc. + +#pragma once + +#include "codon/cir/const.hpp" +#include "codon/cir/dsl/nodes.hpp" +#include "codon/cir/flow.hpp" +#include "codon/cir/func.hpp" +#include "codon/cir/instr.hpp" +#include "codon/cir/module.hpp" +#include "codon/cir/types/types.hpp" +#include "codon/cir/value.hpp" +#include "codon/cir/var.hpp" diff --git a/codon/cir/const.cpp b/codon/cir/const.cpp index efe104a6..eeed37c6 100644 --- a/codon/cir/const.cpp +++ b/codon/cir/const.cpp @@ -1,6 +1,6 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "const.h" +#include "const.hpp" namespace codon { namespace ir { diff --git a/codon/cir/const.h b/codon/cir/const.hpp similarity index 97% rename from codon/cir/const.h rename to codon/cir/const.hpp index 71b2d15a..be5eaf8a 100644 --- a/codon/cir/const.h +++ b/codon/cir/const.hpp @@ -2,8 +2,8 @@ #pragma once -#include "codon/cir/module.h" -#include "codon/cir/value.h" +#include "codon/cir/module.hpp" +#include "codon/cir/value.hpp" namespace codon { namespace ir { diff --git a/codon/cir/dsl/codegen.h b/codon/cir/dsl/codegen.hpp similarity index 94% rename from codon/cir/dsl/codegen.h rename to codon/cir/dsl/codegen.hpp index 2aeb7c25..a1dd090c 100644 --- a/codon/cir/dsl/codegen.h +++ b/codon/cir/dsl/codegen.hpp @@ -4,8 +4,8 @@ #include -#include "codon/cir/llvm/llvm.h" -#include "codon/cir/types/types.h" +#include "codon/cir/llvm/llvm.hpp" +#include "codon/cir/types/types.hpp" namespace codon { namespace ir { diff --git a/codon/cir/dsl/nodes.cpp b/codon/cir/dsl/nodes.cpp index 7f36fd62..36319d16 100644 --- a/codon/cir/dsl/nodes.cpp +++ b/codon/cir/dsl/nodes.cpp @@ -1,6 +1,6 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "nodes.h" +#include "nodes.hpp" namespace codon { namespace ir { diff --git a/codon/cir/dsl/nodes.h b/codon/cir/dsl/nodes.hpp similarity index 97% rename from codon/cir/dsl/nodes.h rename to codon/cir/dsl/nodes.hpp index e0bb1c09..f4fc87cb 100644 --- a/codon/cir/dsl/nodes.h +++ b/codon/cir/dsl/nodes.hpp @@ -4,10 +4,10 @@ #include -#include "codon/cir/base.h" -#include "codon/cir/const.h" -#include "codon/cir/instr.h" -#include "codon/cir/util/side_effect.h" +#include "codon/cir/base.hpp" +#include "codon/cir/const.hpp" +#include "codon/cir/instr.hpp" +#include "codon/cir/util/side_effect.hpp" namespace codon { namespace ir { diff --git a/codon/cir/flow.cpp b/codon/cir/flow.cpp index 0e90530d..2c4fe7e5 100644 --- a/codon/cir/flow.cpp +++ b/codon/cir/flow.cpp @@ -1,9 +1,9 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "flow.h" +#include "flow.hpp" -#include "codon/cir/module.h" -#include "codon/cir/util/iterators.h" +#include "codon/cir/module.hpp" +#include "codon/cir/util/iterators.hpp" #include namespace codon { diff --git a/codon/cir/flow.h b/codon/cir/flow.hpp similarity index 99% rename from codon/cir/flow.h rename to codon/cir/flow.hpp index 75621d9a..dc63af8c 100644 --- a/codon/cir/flow.h +++ b/codon/cir/flow.hpp @@ -5,10 +5,10 @@ #include #include -#include "codon/cir/base.h" -#include "codon/cir/transform/parallel/schedule.h" -#include "codon/cir/value.h" -#include "codon/cir/var.h" +#include "codon/cir/base.hpp" +#include "codon/cir/transform/parallel/schedule.hpp" +#include "codon/cir/value.hpp" +#include "codon/cir/var.hpp" namespace codon { namespace ir { diff --git a/codon/cir/func.cpp b/codon/cir/func.cpp index d510d6f1..5f72a306 100644 --- a/codon/cir/func.cpp +++ b/codon/cir/func.cpp @@ -1,14 +1,14 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "func.h" +#include "func.hpp" #include -#include "codon/cir/module.h" -#include "codon/cir/util/iterators.h" -#include "codon/cir/util/operator.h" -#include "codon/cir/util/visitor.h" -#include "codon/cir/var.h" +#include "codon/cir/module.hpp" +#include "codon/cir/util/iterators.hpp" +#include "codon/cir/util/operator.hpp" +#include "codon/cir/util/visitor.hpp" +#include "codon/cir/var.hpp" #include "codon/parser/common.hpp" namespace codon { diff --git a/codon/cir/func.h b/codon/cir/func.hpp similarity index 98% rename from codon/cir/func.h rename to codon/cir/func.hpp index f14ac8f6..0dfa9193 100644 --- a/codon/cir/func.h +++ b/codon/cir/func.hpp @@ -2,9 +2,9 @@ #pragma once -#include "codon/cir/flow.h" -#include "codon/cir/util/iterators.h" -#include "codon/cir/var.h" +#include "codon/cir/flow.hpp" +#include "codon/cir/util/iterators.hpp" +#include "codon/cir/var.hpp" namespace codon { namespace ir { diff --git a/codon/cir/instr.cpp b/codon/cir/instr.cpp index 0781f58e..3d789e99 100644 --- a/codon/cir/instr.cpp +++ b/codon/cir/instr.cpp @@ -1,9 +1,9 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "instr.h" +#include "instr.hpp" -#include "codon/cir/module.h" -#include "codon/cir/util/iterators.h" +#include "codon/cir/module.hpp" +#include "codon/cir/util/iterators.hpp" namespace codon { namespace ir { diff --git a/codon/cir/instr.h b/codon/cir/instr.hpp similarity index 99% rename from codon/cir/instr.h rename to codon/cir/instr.hpp index dcc97559..5d467e26 100644 --- a/codon/cir/instr.h +++ b/codon/cir/instr.hpp @@ -5,11 +5,11 @@ #include #include -#include "codon/cir/flow.h" -#include "codon/cir/types/types.h" -#include "codon/cir/util/iterators.h" -#include "codon/cir/value.h" -#include "codon/cir/var.h" +#include "codon/cir/flow.hpp" +#include "codon/cir/types/types.hpp" +#include "codon/cir/util/iterators.hpp" +#include "codon/cir/value.hpp" +#include "codon/cir/var.hpp" namespace codon { namespace ir { diff --git a/codon/cir/llvm/gpu.cpp b/codon/cir/llvm/gpu.cpp index 464b6da0..1bad7f3e 100644 --- a/codon/cir/llvm/gpu.cpp +++ b/codon/cir/llvm/gpu.cpp @@ -1,6 +1,6 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "gpu.h" +#include "gpu.hpp" #include #include diff --git a/codon/cir/llvm/gpu.h b/codon/cir/llvm/gpu.hpp similarity index 94% rename from codon/cir/llvm/gpu.h rename to codon/cir/llvm/gpu.hpp index 889accc9..b9916195 100644 --- a/codon/cir/llvm/gpu.h +++ b/codon/cir/llvm/gpu.hpp @@ -4,7 +4,7 @@ #include -#include "codon/cir/llvm/llvm.h" +#include "codon/cir/llvm/llvm.hpp" namespace codon { namespace ir { diff --git a/codon/cir/llvm/llvisitor.cpp b/codon/cir/llvm/llvisitor.cpp index 27bedb0e..7590da36 100644 --- a/codon/cir/llvm/llvisitor.cpp +++ b/codon/cir/llvm/llvisitor.cpp @@ -1,6 +1,6 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "llvisitor.h" +#include "llvisitor.hpp" #include #include @@ -10,11 +10,11 @@ #include #include -#include "codon/cir/dsl/codegen.h" -#include "codon/cir/llvm/optimize.h" -#include "codon/cir/util/irtools.h" -#include "codon/compiler/debug_listener.h" -#include "codon/compiler/memory_manager.h" +#include "codon/cir/dsl/codegen.hpp" +#include "codon/cir/llvm/optimize.hpp" +#include "codon/cir/util/irtools.hpp" +#include "codon/compiler/debug_listener.hpp" +#include "codon/compiler/memory_manager.hpp" #include "codon/parser/common.hpp" #include "codon/runtime/lib.hpp" #include "codon/util/common.hpp" diff --git a/codon/cir/llvm/llvisitor.h b/codon/cir/llvm/llvisitor.hpp similarity index 99% rename from codon/cir/llvm/llvisitor.h rename to codon/cir/llvm/llvisitor.hpp index 772b13b1..9a5c8fbf 100644 --- a/codon/cir/llvm/llvisitor.h +++ b/codon/cir/llvm/llvisitor.hpp @@ -2,10 +2,10 @@ #pragma once -#include "codon/cir/cir.h" -#include "codon/cir/llvm/llvm.h" -#include "codon/cir/pyextension.h" -#include "codon/dsl/plugins.h" +#include "codon/cir/cir.hpp" +#include "codon/cir/llvm/llvm.hpp" +#include "codon/cir/pyextension.hpp" +#include "codon/dsl/plugins.hpp" #include "codon/util/common.hpp" #include diff --git a/codon/cir/llvm/llvm.h b/codon/cir/llvm/llvm.hpp similarity index 100% rename from codon/cir/llvm/llvm.h rename to codon/cir/llvm/llvm.hpp diff --git a/codon/cir/llvm/optimize.cpp b/codon/cir/llvm/optimize.cpp index 61aa71a4..1a1d01ae 100644 --- a/codon/cir/llvm/optimize.cpp +++ b/codon/cir/llvm/optimize.cpp @@ -1,11 +1,11 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "optimize.h" +#include "optimize.hpp" #include #include -#include "codon/cir/llvm/gpu.h" +#include "codon/cir/llvm/gpu.hpp" #include "codon/util/common.hpp" static llvm::codegen::RegisterCodeGenFlags CFG; diff --git a/codon/cir/llvm/optimize.h b/codon/cir/llvm/optimize.hpp similarity index 90% rename from codon/cir/llvm/optimize.h rename to codon/cir/llvm/optimize.hpp index 093e11dc..92e4bae4 100644 --- a/codon/cir/llvm/optimize.h +++ b/codon/cir/llvm/optimize.hpp @@ -4,8 +4,8 @@ #include -#include "codon/cir/llvm/llvm.h" -#include "codon/dsl/plugins.h" +#include "codon/cir/llvm/llvm.hpp" +#include "codon/dsl/plugins.hpp" namespace codon { namespace ir { diff --git a/codon/cir/module.cpp b/codon/cir/module.cpp index 49821f40..8cd8e860 100644 --- a/codon/cir/module.cpp +++ b/codon/cir/module.cpp @@ -1,11 +1,11 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "module.h" +#include "module.hpp" #include #include -#include "codon/cir/func.h" +#include "codon/cir/func.hpp" #include "codon/parser/cache.hpp" namespace codon { diff --git a/codon/cir/module.h b/codon/cir/module.hpp similarity index 99% rename from codon/cir/module.h rename to codon/cir/module.hpp index e5713a3d..021315cc 100644 --- a/codon/cir/module.h +++ b/codon/cir/module.hpp @@ -7,10 +7,10 @@ #include #include -#include "codon/cir/func.h" -#include "codon/cir/util/iterators.h" -#include "codon/cir/value.h" -#include "codon/cir/var.h" +#include "codon/cir/func.hpp" +#include "codon/cir/util/iterators.hpp" +#include "codon/cir/value.hpp" +#include "codon/cir/var.hpp" #include "codon/util/common.hpp" #include #include diff --git a/codon/cir/pyextension.h b/codon/cir/pyextension.hpp similarity index 97% rename from codon/cir/pyextension.h rename to codon/cir/pyextension.hpp index e075c822..f9cf8698 100644 --- a/codon/cir/pyextension.h +++ b/codon/cir/pyextension.hpp @@ -5,8 +5,8 @@ #include #include -#include "codon/cir/func.h" -#include "codon/cir/types/types.h" +#include "codon/cir/func.hpp" +#include "codon/cir/types/types.hpp" namespace codon { namespace ir { diff --git a/codon/cir/transform/cleanup/canonical.cpp b/codon/cir/transform/cleanup/canonical.cpp index 2a9aadaa..26c13c63 100644 --- a/codon/cir/transform/cleanup/canonical.cpp +++ b/codon/cir/transform/cleanup/canonical.cpp @@ -1,6 +1,6 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "canonical.h" +#include "canonical.hpp" #include #include @@ -8,10 +8,10 @@ #include #include -#include "codon/cir/analyze/module/side_effect.h" -#include "codon/cir/transform/rewrite.h" -#include "codon/cir/util/irtools.h" -#include "codon/cir/util/matching.h" +#include "codon/cir/analyze/module/side_effect.hpp" +#include "codon/cir/transform/rewrite.hpp" +#include "codon/cir/util/irtools.hpp" +#include "codon/cir/util/matching.hpp" namespace codon { namespace ir { diff --git a/codon/cir/transform/cleanup/canonical.h b/codon/cir/transform/cleanup/canonical.hpp similarity index 91% rename from codon/cir/transform/cleanup/canonical.h rename to codon/cir/transform/cleanup/canonical.hpp index c3d5ca22..dd2c5f94 100644 --- a/codon/cir/transform/cleanup/canonical.h +++ b/codon/cir/transform/cleanup/canonical.hpp @@ -2,8 +2,8 @@ #pragma once -#include "codon/cir/transform/pass.h" -#include "codon/cir/transform/rewrite.h" +#include "codon/cir/transform/pass.hpp" +#include "codon/cir/transform/rewrite.hpp" namespace codon { namespace ir { diff --git a/codon/cir/transform/cleanup/dead_code.cpp b/codon/cir/transform/cleanup/dead_code.cpp index 6d7c2818..1acab0bc 100644 --- a/codon/cir/transform/cleanup/dead_code.cpp +++ b/codon/cir/transform/cleanup/dead_code.cpp @@ -1,9 +1,9 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "dead_code.h" +#include "dead_code.hpp" -#include "codon/cir/analyze/module/side_effect.h" -#include "codon/cir/util/cloning.h" +#include "codon/cir/analyze/module/side_effect.hpp" +#include "codon/cir/util/cloning.hpp" namespace codon { namespace ir { diff --git a/codon/cir/transform/cleanup/dead_code.h b/codon/cir/transform/cleanup/dead_code.hpp similarity index 96% rename from codon/cir/transform/cleanup/dead_code.h rename to codon/cir/transform/cleanup/dead_code.hpp index 1da42798..95d871a7 100644 --- a/codon/cir/transform/cleanup/dead_code.h +++ b/codon/cir/transform/cleanup/dead_code.hpp @@ -2,7 +2,7 @@ #pragma once -#include "codon/cir/transform/pass.h" +#include "codon/cir/transform/pass.hpp" namespace codon { namespace ir { diff --git a/codon/cir/transform/cleanup/global_demote.cpp b/codon/cir/transform/cleanup/global_demote.cpp index 280b5581..302bb6df 100644 --- a/codon/cir/transform/cleanup/global_demote.cpp +++ b/codon/cir/transform/cleanup/global_demote.cpp @@ -1,6 +1,6 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "global_demote.h" +#include "global_demote.hpp" namespace codon { namespace ir { diff --git a/codon/cir/transform/cleanup/global_demote.h b/codon/cir/transform/cleanup/global_demote.hpp similarity index 95% rename from codon/cir/transform/cleanup/global_demote.h rename to codon/cir/transform/cleanup/global_demote.hpp index 73725270..0d86b205 100644 --- a/codon/cir/transform/cleanup/global_demote.h +++ b/codon/cir/transform/cleanup/global_demote.hpp @@ -2,7 +2,7 @@ #pragma once -#include "codon/cir/transform/pass.h" +#include "codon/cir/transform/pass.hpp" namespace codon { namespace ir { diff --git a/codon/cir/transform/cleanup/replacer.cpp b/codon/cir/transform/cleanup/replacer.cpp index d210645a..be138f82 100644 --- a/codon/cir/transform/cleanup/replacer.cpp +++ b/codon/cir/transform/cleanup/replacer.cpp @@ -1,12 +1,12 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "replacer.h" +#include "replacer.hpp" #include -#include "codon/cir/types/types.h" -#include "codon/cir/value.h" -#include "codon/cir/var.h" +#include "codon/cir/types/types.hpp" +#include "codon/cir/value.hpp" +#include "codon/cir/var.hpp" namespace codon { namespace ir { diff --git a/codon/cir/transform/cleanup/replacer.h b/codon/cir/transform/cleanup/replacer.hpp similarity index 92% rename from codon/cir/transform/cleanup/replacer.h rename to codon/cir/transform/cleanup/replacer.hpp index 999b7f74..4cadec68 100644 --- a/codon/cir/transform/cleanup/replacer.h +++ b/codon/cir/transform/cleanup/replacer.hpp @@ -2,7 +2,7 @@ #pragma once -#include "codon/cir/transform/pass.h" +#include "codon/cir/transform/pass.hpp" namespace codon { namespace ir { diff --git a/codon/cir/transform/folding/const_fold.cpp b/codon/cir/transform/folding/const_fold.cpp index d2aeb3ac..76d25e68 100644 --- a/codon/cir/transform/folding/const_fold.cpp +++ b/codon/cir/transform/folding/const_fold.cpp @@ -1,12 +1,12 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "const_fold.h" +#include "const_fold.hpp" #include #include -#include "codon/cir/util/cloning.h" -#include "codon/cir/util/irtools.h" +#include "codon/cir/util/cloning.hpp" +#include "codon/cir/util/irtools.hpp" #define BINOP(o) [](auto x, auto y) -> auto { return x o y; } #define UNOP(o) [](auto x) -> auto { return o x; } diff --git a/codon/cir/transform/folding/const_fold.h b/codon/cir/transform/folding/const_fold.hpp similarity index 89% rename from codon/cir/transform/folding/const_fold.h rename to codon/cir/transform/folding/const_fold.hpp index 3c27d06d..4331e945 100644 --- a/codon/cir/transform/folding/const_fold.h +++ b/codon/cir/transform/folding/const_fold.hpp @@ -5,8 +5,8 @@ #include #include -#include "codon/cir/transform/folding/rule.h" -#include "codon/cir/transform/pass.h" +#include "codon/cir/transform/folding/rule.hpp" +#include "codon/cir/transform/pass.hpp" namespace codon { namespace ir { diff --git a/codon/cir/transform/folding/const_prop.cpp b/codon/cir/transform/folding/const_prop.cpp index 085f9a90..e8e6ef3f 100644 --- a/codon/cir/transform/folding/const_prop.cpp +++ b/codon/cir/transform/folding/const_prop.cpp @@ -1,10 +1,10 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "const_prop.h" +#include "const_prop.hpp" -#include "codon/cir/analyze/dataflow/reaching.h" -#include "codon/cir/analyze/module/global_vars.h" -#include "codon/cir/util/cloning.h" +#include "codon/cir/analyze/dataflow/reaching.hpp" +#include "codon/cir/analyze/module/global_vars.hpp" +#include "codon/cir/util/cloning.hpp" namespace codon { namespace ir { diff --git a/codon/cir/transform/folding/const_prop.h b/codon/cir/transform/folding/const_prop.hpp similarity index 95% rename from codon/cir/transform/folding/const_prop.h rename to codon/cir/transform/folding/const_prop.hpp index 3cd624d4..e2a6429e 100644 --- a/codon/cir/transform/folding/const_prop.h +++ b/codon/cir/transform/folding/const_prop.hpp @@ -2,7 +2,7 @@ #pragma once -#include "codon/cir/transform/pass.h" +#include "codon/cir/transform/pass.hpp" namespace codon { namespace ir { diff --git a/codon/cir/transform/folding/folding.cpp b/codon/cir/transform/folding/folding.cpp index d65d089a..e86a30e2 100644 --- a/codon/cir/transform/folding/folding.cpp +++ b/codon/cir/transform/folding/folding.cpp @@ -1,9 +1,9 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "folding.h" +#include "folding.hpp" -#include "codon/cir/transform/folding/const_fold.h" -#include "codon/cir/transform/folding/const_prop.h" +#include "codon/cir/transform/folding/const_fold.hpp" +#include "codon/cir/transform/folding/const_prop.hpp" namespace codon { namespace ir { diff --git a/codon/cir/transform/folding/folding.h b/codon/cir/transform/folding/folding.hpp similarity index 86% rename from codon/cir/transform/folding/folding.h rename to codon/cir/transform/folding/folding.hpp index d68feafb..2b6a15cd 100644 --- a/codon/cir/transform/folding/folding.h +++ b/codon/cir/transform/folding/folding.hpp @@ -2,10 +2,10 @@ #pragma once -#include "codon/cir/transform/cleanup/canonical.h" -#include "codon/cir/transform/cleanup/dead_code.h" -#include "codon/cir/transform/cleanup/global_demote.h" -#include "codon/cir/transform/pass.h" +#include "codon/cir/transform/cleanup/canonical.hpp" +#include "codon/cir/transform/cleanup/dead_code.hpp" +#include "codon/cir/transform/cleanup/global_demote.hpp" +#include "codon/cir/transform/pass.hpp" namespace codon { namespace ir { diff --git a/codon/cir/transform/folding/rule.h b/codon/cir/transform/folding/rule.hpp similarity index 98% rename from codon/cir/transform/folding/rule.h rename to codon/cir/transform/folding/rule.hpp index 9305594f..633cb8c2 100644 --- a/codon/cir/transform/folding/rule.h +++ b/codon/cir/transform/folding/rule.hpp @@ -5,9 +5,9 @@ #include #include -#include "codon/cir/transform/pass.h" -#include "codon/cir/transform/rewrite.h" -#include "codon/cir/util/irtools.h" +#include "codon/cir/transform/pass.hpp" +#include "codon/cir/transform/rewrite.hpp" +#include "codon/cir/util/irtools.hpp" namespace codon { namespace ir { diff --git a/codon/cir/transform/lowering/imperative.cpp b/codon/cir/transform/lowering/imperative.cpp index 8b34f1d4..0498bafe 100644 --- a/codon/cir/transform/lowering/imperative.cpp +++ b/codon/cir/transform/lowering/imperative.cpp @@ -1,12 +1,12 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "imperative.h" +#include "imperative.hpp" #include -#include "codon/cir/util/cloning.h" -#include "codon/cir/util/irtools.h" -#include "codon/cir/util/matching.h" +#include "codon/cir/util/cloning.hpp" +#include "codon/cir/util/irtools.hpp" +#include "codon/cir/util/matching.hpp" namespace codon { namespace ir { diff --git a/codon/cir/transform/lowering/imperative.h b/codon/cir/transform/lowering/imperative.hpp similarity index 91% rename from codon/cir/transform/lowering/imperative.h rename to codon/cir/transform/lowering/imperative.hpp index 25a7b613..1ecb0239 100644 --- a/codon/cir/transform/lowering/imperative.h +++ b/codon/cir/transform/lowering/imperative.hpp @@ -2,7 +2,7 @@ #pragma once -#include "codon/cir/transform/pass.h" +#include "codon/cir/transform/pass.hpp" namespace codon { namespace ir { diff --git a/codon/cir/transform/lowering/pipeline.cpp b/codon/cir/transform/lowering/pipeline.cpp index 6a7a6002..4a1731af 100644 --- a/codon/cir/transform/lowering/pipeline.cpp +++ b/codon/cir/transform/lowering/pipeline.cpp @@ -1,12 +1,12 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "pipeline.h" +#include "pipeline.hpp" #include -#include "codon/cir/util/cloning.h" -#include "codon/cir/util/irtools.h" -#include "codon/cir/util/matching.h" +#include "codon/cir/util/cloning.hpp" +#include "codon/cir/util/irtools.hpp" +#include "codon/cir/util/matching.hpp" namespace codon { namespace ir { diff --git a/codon/cir/transform/lowering/pipeline.h b/codon/cir/transform/lowering/pipeline.hpp similarity index 92% rename from codon/cir/transform/lowering/pipeline.h rename to codon/cir/transform/lowering/pipeline.hpp index 9d0d6abc..4caf1b04 100644 --- a/codon/cir/transform/lowering/pipeline.h +++ b/codon/cir/transform/lowering/pipeline.hpp @@ -2,7 +2,7 @@ #pragma once -#include "codon/cir/transform/pass.h" +#include "codon/cir/transform/pass.hpp" namespace codon { namespace ir { diff --git a/codon/cir/transform/manager.cpp b/codon/cir/transform/manager.cpp index 2e9a395f..993364e5 100644 --- a/codon/cir/transform/manager.cpp +++ b/codon/cir/transform/manager.cpp @@ -4,24 +4,24 @@ #include -#include "codon/cir/analyze/analysis.h" -#include "codon/cir/analyze/dataflow/capture.h" -#include "codon/cir/analyze/dataflow/cfg.h" -#include "codon/cir/analyze/dataflow/dominator.h" -#include "codon/cir/analyze/dataflow/reaching.h" -#include "codon/cir/analyze/module/global_vars.h" -#include "codon/cir/analyze/module/side_effect.h" -#include "codon/cir/transform/folding/folding.h" -#include "codon/cir/transform/lowering/imperative.h" -#include "codon/cir/transform/lowering/pipeline.h" +#include "codon/cir/analyze/analysis.hpp" +#include "codon/cir/analyze/dataflow/capture.hpp" +#include "codon/cir/analyze/dataflow/cfg.hpp" +#include "codon/cir/analyze/dataflow/dominator.hpp" +#include "codon/cir/analyze/dataflow/reaching.hpp" +#include "codon/cir/analyze/module/global_vars.hpp" +#include "codon/cir/analyze/module/side_effect.hpp" +#include "codon/cir/transform/folding/folding.hpp" +#include "codon/cir/transform/lowering/imperative.hpp" +#include "codon/cir/transform/lowering/pipeline.hpp" #include "codon/cir/transform/manager.h" -#include "codon/cir/transform/parallel/openmp.h" -#include "codon/cir/transform/pass.h" -#include "codon/cir/transform/pythonic/dict.h" -#include "codon/cir/transform/pythonic/generator.h" -#include "codon/cir/transform/pythonic/io.h" -#include "codon/cir/transform/pythonic/list.h" -#include "codon/cir/transform/pythonic/str.h" +#include "codon/cir/transform/parallel/openmp.hpp" +#include "codon/cir/transform/pass.hpp" +#include "codon/cir/transform/pythonic/dict.hpp" +#include "codon/cir/transform/pythonic/generator.hpp" +#include "codon/cir/transform/pythonic/io.hpp" +#include "codon/cir/transform/pythonic/list.hpp" +#include "codon/cir/transform/pythonic/str.hpp" #include "codon/util/common.hpp" namespace codon { diff --git a/codon/cir/transform/manager.h b/codon/cir/transform/manager.h index c0306837..97af3a7a 100644 --- a/codon/cir/transform/manager.h +++ b/codon/cir/transform/manager.h @@ -9,9 +9,9 @@ #include #include -#include "codon/cir/analyze/analysis.h" -#include "codon/cir/module.h" -#include "codon/cir/transform/pass.h" +#include "codon/cir/analyze/analysis.hpp" +#include "codon/cir/module.hpp" +#include "codon/cir/transform/pass.hpp" namespace codon { namespace ir { diff --git a/codon/cir/transform/parallel/openmp.cpp b/codon/cir/transform/parallel/openmp.cpp index 77b7373d..2c174ed5 100644 --- a/codon/cir/transform/parallel/openmp.cpp +++ b/codon/cir/transform/parallel/openmp.cpp @@ -1,16 +1,16 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "openmp.h" +#include "openmp.hpp" #include #include #include #include -#include "codon/cir/transform/parallel/schedule.h" -#include "codon/cir/util/cloning.h" -#include "codon/cir/util/irtools.h" -#include "codon/cir/util/outlining.h" +#include "codon/cir/transform/parallel/schedule.hpp" +#include "codon/cir/util/cloning.hpp" +#include "codon/cir/util/irtools.hpp" +#include "codon/cir/util/outlining.hpp" namespace codon { namespace ir { diff --git a/codon/cir/transform/parallel/openmp.h b/codon/cir/transform/parallel/openmp.hpp similarity index 93% rename from codon/cir/transform/parallel/openmp.h rename to codon/cir/transform/parallel/openmp.hpp index 610afa01..c5f5be0f 100644 --- a/codon/cir/transform/parallel/openmp.h +++ b/codon/cir/transform/parallel/openmp.hpp @@ -2,7 +2,7 @@ #pragma once -#include "codon/cir/transform/pass.h" +#include "codon/cir/transform/pass.hpp" namespace codon { namespace ir { diff --git a/codon/cir/transform/parallel/schedule.cpp b/codon/cir/transform/parallel/schedule.cpp index fb0ba28b..545666d9 100644 --- a/codon/cir/transform/parallel/schedule.cpp +++ b/codon/cir/transform/parallel/schedule.cpp @@ -1,9 +1,9 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "schedule.h" +#include "schedule.hpp" -#include "codon/cir/cir.h" -#include "codon/cir/util/irtools.h" +#include "codon/cir/cir.hpp" +#include "codon/cir/util/irtools.hpp" #include #include diff --git a/codon/cir/transform/parallel/schedule.h b/codon/cir/transform/parallel/schedule.hpp similarity index 97% rename from codon/cir/transform/parallel/schedule.h rename to codon/cir/transform/parallel/schedule.hpp index 10ed803f..f4a07e2e 100644 --- a/codon/cir/transform/parallel/schedule.h +++ b/codon/cir/transform/parallel/schedule.hpp @@ -2,7 +2,7 @@ #pragma once -#include "codon/cir/value.h" +#include "codon/cir/value.hpp" namespace codon { namespace ir { diff --git a/codon/cir/transform/pass.cpp b/codon/cir/transform/pass.cpp index e9e1d20e..66a7a356 100644 --- a/codon/cir/transform/pass.cpp +++ b/codon/cir/transform/pass.cpp @@ -1,6 +1,6 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "pass.h" +#include "pass.hpp" #include "codon/cir/transform/manager.h" diff --git a/codon/cir/transform/pass.h b/codon/cir/transform/pass.hpp similarity index 97% rename from codon/cir/transform/pass.h rename to codon/cir/transform/pass.hpp index 2431de64..deb615b2 100644 --- a/codon/cir/transform/pass.h +++ b/codon/cir/transform/pass.hpp @@ -2,8 +2,8 @@ #pragma once -#include "codon/cir/module.h" -#include "codon/cir/util/operator.h" +#include "codon/cir/module.hpp" +#include "codon/cir/util/operator.hpp" namespace codon { namespace ir { diff --git a/codon/cir/transform/pythonic/dict.cpp b/codon/cir/transform/pythonic/dict.cpp index 8767d789..b022410d 100644 --- a/codon/cir/transform/pythonic/dict.cpp +++ b/codon/cir/transform/pythonic/dict.cpp @@ -1,12 +1,12 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "dict.h" +#include "dict.hpp" #include -#include "codon/cir/util/cloning.h" -#include "codon/cir/util/irtools.h" -#include "codon/cir/util/matching.h" +#include "codon/cir/util/cloning.hpp" +#include "codon/cir/util/irtools.hpp" +#include "codon/cir/util/matching.hpp" namespace codon { namespace ir { diff --git a/codon/cir/transform/pythonic/dict.h b/codon/cir/transform/pythonic/dict.hpp similarity index 93% rename from codon/cir/transform/pythonic/dict.h rename to codon/cir/transform/pythonic/dict.hpp index 95725c20..38f1e1e6 100644 --- a/codon/cir/transform/pythonic/dict.h +++ b/codon/cir/transform/pythonic/dict.hpp @@ -2,7 +2,7 @@ #pragma once -#include "codon/cir/transform/pass.h" +#include "codon/cir/transform/pass.hpp" namespace codon { namespace ir { diff --git a/codon/cir/transform/pythonic/generator.cpp b/codon/cir/transform/pythonic/generator.cpp index a37a4662..d79cac1d 100644 --- a/codon/cir/transform/pythonic/generator.cpp +++ b/codon/cir/transform/pythonic/generator.cpp @@ -1,12 +1,12 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "generator.h" +#include "generator.hpp" #include -#include "codon/cir/util/cloning.h" -#include "codon/cir/util/irtools.h" -#include "codon/cir/util/matching.h" +#include "codon/cir/util/cloning.hpp" +#include "codon/cir/util/irtools.hpp" +#include "codon/cir/util/matching.hpp" namespace codon { namespace ir { diff --git a/codon/cir/transform/pythonic/generator.h b/codon/cir/transform/pythonic/generator.hpp similarity index 93% rename from codon/cir/transform/pythonic/generator.h rename to codon/cir/transform/pythonic/generator.hpp index 9e416bbe..5d042238 100644 --- a/codon/cir/transform/pythonic/generator.h +++ b/codon/cir/transform/pythonic/generator.hpp @@ -2,7 +2,7 @@ #pragma once -#include "codon/cir/transform/pass.h" +#include "codon/cir/transform/pass.hpp" namespace codon { namespace ir { diff --git a/codon/cir/transform/pythonic/io.cpp b/codon/cir/transform/pythonic/io.cpp index a9195064..4b40e90a 100644 --- a/codon/cir/transform/pythonic/io.cpp +++ b/codon/cir/transform/pythonic/io.cpp @@ -1,11 +1,11 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "io.h" +#include "io.hpp" #include -#include "codon/cir/util/cloning.h" -#include "codon/cir/util/irtools.h" +#include "codon/cir/util/cloning.hpp" +#include "codon/cir/util/irtools.hpp" namespace codon { namespace ir { diff --git a/codon/cir/transform/pythonic/io.h b/codon/cir/transform/pythonic/io.hpp similarity index 92% rename from codon/cir/transform/pythonic/io.h rename to codon/cir/transform/pythonic/io.hpp index ae7ffe26..7a41cce7 100644 --- a/codon/cir/transform/pythonic/io.h +++ b/codon/cir/transform/pythonic/io.hpp @@ -2,7 +2,7 @@ #pragma once -#include "codon/cir/transform/pass.h" +#include "codon/cir/transform/pass.hpp" namespace codon { namespace ir { diff --git a/codon/cir/transform/pythonic/list.cpp b/codon/cir/transform/pythonic/list.cpp index dcf462c6..19db7c3f 100644 --- a/codon/cir/transform/pythonic/list.cpp +++ b/codon/cir/transform/pythonic/list.cpp @@ -1,11 +1,11 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "list.h" +#include "list.hpp" #include -#include "codon/cir/util/cloning.h" -#include "codon/cir/util/irtools.h" +#include "codon/cir/util/cloning.hpp" +#include "codon/cir/util/irtools.hpp" namespace codon { namespace ir { diff --git a/codon/cir/transform/pythonic/list.h b/codon/cir/transform/pythonic/list.hpp similarity index 93% rename from codon/cir/transform/pythonic/list.h rename to codon/cir/transform/pythonic/list.hpp index 16cd8770..ff48375e 100644 --- a/codon/cir/transform/pythonic/list.h +++ b/codon/cir/transform/pythonic/list.hpp @@ -2,7 +2,7 @@ #pragma once -#include "codon/cir/transform/pass.h" +#include "codon/cir/transform/pass.hpp" namespace codon { namespace ir { diff --git a/codon/cir/transform/pythonic/str.cpp b/codon/cir/transform/pythonic/str.cpp index ead700db..1e4fbd1a 100644 --- a/codon/cir/transform/pythonic/str.cpp +++ b/codon/cir/transform/pythonic/str.cpp @@ -1,11 +1,11 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "str.h" +#include "str.hpp" #include -#include "codon/cir/util/cloning.h" -#include "codon/cir/util/irtools.h" +#include "codon/cir/util/cloning.hpp" +#include "codon/cir/util/irtools.hpp" namespace codon { namespace ir { diff --git a/codon/cir/transform/pythonic/str.h b/codon/cir/transform/pythonic/str.hpp similarity index 92% rename from codon/cir/transform/pythonic/str.h rename to codon/cir/transform/pythonic/str.hpp index af4c368b..5a7fa13f 100644 --- a/codon/cir/transform/pythonic/str.h +++ b/codon/cir/transform/pythonic/str.hpp @@ -2,7 +2,7 @@ #pragma once -#include "codon/cir/transform/pass.h" +#include "codon/cir/transform/pass.hpp" namespace codon { namespace ir { diff --git a/codon/cir/transform/rewrite.h b/codon/cir/transform/rewrite.hpp similarity index 95% rename from codon/cir/transform/rewrite.h rename to codon/cir/transform/rewrite.hpp index 055c549b..d7f8af3b 100644 --- a/codon/cir/transform/rewrite.h +++ b/codon/cir/transform/rewrite.hpp @@ -2,8 +2,8 @@ #pragma once -#include "codon/cir/transform/pass.h" -#include "codon/cir/util/visitor.h" +#include "codon/cir/transform/pass.hpp" +#include "codon/cir/util/visitor.hpp" namespace codon { namespace ir { diff --git a/codon/cir/types/types.cpp b/codon/cir/types/types.cpp index a96cf746..7ef7f5c4 100644 --- a/codon/cir/types/types.cpp +++ b/codon/cir/types/types.cpp @@ -1,16 +1,16 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "types.h" +#include "types.hpp" #include #include #include -#include "codon/cir/module.h" -#include "codon/cir/util/irtools.h" -#include "codon/cir/util/iterators.h" -#include "codon/cir/util/visitor.h" -#include "codon/cir/value.h" +#include "codon/cir/module.hpp" +#include "codon/cir/util/irtools.hpp" +#include "codon/cir/util/iterators.hpp" +#include "codon/cir/util/visitor.hpp" +#include "codon/cir/value.hpp" #include "codon/parser/cache.hpp" #include diff --git a/codon/cir/types/types.h b/codon/cir/types/types.hpp similarity index 99% rename from codon/cir/types/types.h rename to codon/cir/types/types.hpp index 3f09e9e8..213892b4 100644 --- a/codon/cir/types/types.h +++ b/codon/cir/types/types.hpp @@ -8,9 +8,9 @@ #include #include -#include "codon/cir/base.h" -#include "codon/cir/util/packs.h" -#include "codon/cir/util/visitor.h" +#include "codon/cir/base.hpp" +#include "codon/cir/util/packs.hpp" +#include "codon/cir/util/visitor.hpp" #include "codon/parser/ast.hpp" #include #include diff --git a/codon/cir/util/cloning.cpp b/codon/cir/util/cloning.cpp index e44fef38..141b7f11 100644 --- a/codon/cir/util/cloning.cpp +++ b/codon/cir/util/cloning.cpp @@ -1,8 +1,8 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "cloning.h" +#include "cloning.hpp" -#include "codon/cir/util/operator.h" +#include "codon/cir/util/operator.hpp" namespace codon { namespace ir { diff --git a/codon/cir/util/cloning.h b/codon/cir/util/cloning.hpp similarity index 98% rename from codon/cir/util/cloning.h rename to codon/cir/util/cloning.hpp index a8e72033..a4334889 100644 --- a/codon/cir/util/cloning.h +++ b/codon/cir/util/cloning.hpp @@ -4,8 +4,8 @@ #include -#include "codon/cir/cir.h" -#include "codon/cir/util/visitor.h" +#include "codon/cir/cir.hpp" +#include "codon/cir/util/visitor.hpp" namespace codon { namespace ir { diff --git a/codon/cir/util/context.h b/codon/cir/util/context.h deleted file mode 100644 index b3461049..00000000 --- a/codon/cir/util/context.h +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (C) 2022-2024 Exaloop Inc. - -#pragma once - -#include - -namespace codon { -namespace ir { -namespace util { - -/// Base for CIR visitor contexts. -template class CIRContext { -private: - std::vector frames; - -public: - /// Emplaces a frame onto the stack. - /// @param args a parameter pack of the arguments - template void emplaceFrame(Args... args) { - frames.emplace_back(args...); - } - /// Replaces a frame. - /// @param newFrame the new frame - void replaceFrame(Frame newFrame) { - frames.pop_back(); - frames.push_back(newFrame); - } - /// @return all frames - std::vector &getFrames() { return frames; } - /// @return the current frame - Frame &getFrame() { return frames.back(); } - /// Pops a frame. - void popFrame() { return frames.pop_back(); } -}; - -} // namespace util -} // namespace ir -} // namespace codon diff --git a/codon/cir/util/format.cpp b/codon/cir/util/format.cpp index a0ca7db0..4555887f 100644 --- a/codon/cir/util/format.cpp +++ b/codon/cir/util/format.cpp @@ -6,8 +6,8 @@ #include #include -#include "codon/cir/util/format.h" -#include "codon/cir/util/visitor.h" +#include "codon/cir/util/format.hpp" +#include "codon/cir/util/visitor.hpp" namespace codon { namespace ir { diff --git a/codon/cir/util/format.h b/codon/cir/util/format.hpp similarity index 94% rename from codon/cir/util/format.h rename to codon/cir/util/format.hpp index ab268a63..fc5f6813 100644 --- a/codon/cir/util/format.h +++ b/codon/cir/util/format.hpp @@ -4,7 +4,7 @@ #include -#include "codon/cir/cir.h" +#include "codon/cir/cir.hpp" namespace codon { namespace ir { diff --git a/codon/cir/util/inlining.cpp b/codon/cir/util/inlining.cpp index 1e507551..ed68e7cc 100644 --- a/codon/cir/util/inlining.cpp +++ b/codon/cir/util/inlining.cpp @@ -1,12 +1,12 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "inlining.h" +#include "inlining.hpp" #include -#include "codon/cir/util/cloning.h" -#include "codon/cir/util/irtools.h" -#include "codon/cir/util/operator.h" +#include "codon/cir/util/cloning.hpp" +#include "codon/cir/util/irtools.hpp" +#include "codon/cir/util/operator.hpp" namespace codon { namespace ir { diff --git a/codon/cir/util/inlining.h b/codon/cir/util/inlining.hpp similarity index 97% rename from codon/cir/util/inlining.h rename to codon/cir/util/inlining.hpp index f52c966f..06341e40 100644 --- a/codon/cir/util/inlining.h +++ b/codon/cir/util/inlining.hpp @@ -2,7 +2,7 @@ #pragma once -#include "codon/cir/cir.h" +#include "codon/cir/cir.hpp" namespace codon { namespace ir { diff --git a/codon/cir/util/irtools.cpp b/codon/cir/util/irtools.cpp index e1ca43ec..a09799a8 100644 --- a/codon/cir/util/irtools.cpp +++ b/codon/cir/util/irtools.cpp @@ -1,6 +1,6 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "irtools.h" +#include "irtools.hpp" #include diff --git a/codon/cir/util/irtools.h b/codon/cir/util/irtools.hpp similarity index 99% rename from codon/cir/util/irtools.h rename to codon/cir/util/irtools.hpp index 8323255b..64fc4f57 100644 --- a/codon/cir/util/irtools.h +++ b/codon/cir/util/irtools.hpp @@ -2,7 +2,7 @@ #pragma once -#include "codon/cir/cir.h" +#include "codon/cir/cir.hpp" namespace codon { namespace ir { diff --git a/codon/cir/util/iterators.h b/codon/cir/util/iterators.hpp similarity index 100% rename from codon/cir/util/iterators.h rename to codon/cir/util/iterators.hpp diff --git a/codon/cir/util/matching.cpp b/codon/cir/util/matching.cpp index bb159e34..aa693424 100644 --- a/codon/cir/util/matching.cpp +++ b/codon/cir/util/matching.cpp @@ -1,11 +1,11 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "matching.h" +#include "matching.hpp" #include -#include "codon/cir/cir.h" -#include "codon/cir/util/visitor.h" +#include "codon/cir/cir.hpp" +#include "codon/cir/util/visitor.hpp" #define VISIT(x) \ void visit(const x *v) override { \ diff --git a/codon/cir/util/matching.h b/codon/cir/util/matching.hpp similarity index 97% rename from codon/cir/util/matching.h rename to codon/cir/util/matching.hpp index aa2b3152..7e29dad5 100644 --- a/codon/cir/util/matching.h +++ b/codon/cir/util/matching.hpp @@ -2,7 +2,7 @@ #pragma once -#include "codon/cir/cir.h" +#include "codon/cir/cir.hpp" namespace codon { namespace ir { diff --git a/codon/cir/util/operator.h b/codon/cir/util/operator.hpp similarity index 98% rename from codon/cir/util/operator.h rename to codon/cir/util/operator.hpp index d798ddd6..22abc7c6 100644 --- a/codon/cir/util/operator.h +++ b/codon/cir/util/operator.hpp @@ -4,8 +4,8 @@ #include -#include "codon/cir/cir.h" -#include "codon/cir/util/visitor.h" +#include "codon/cir/cir.hpp" +#include "codon/cir/util/visitor.hpp" #define LAMBDA_VISIT(x) \ virtual void handle(codon::ir::x *v) {} \ diff --git a/codon/cir/util/outlining.cpp b/codon/cir/util/outlining.cpp index 69fa4525..6b61305d 100644 --- a/codon/cir/util/outlining.cpp +++ b/codon/cir/util/outlining.cpp @@ -1,14 +1,14 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "outlining.h" +#include "outlining.hpp" #include #include #include -#include "codon/cir/util/cloning.h" -#include "codon/cir/util/irtools.h" -#include "codon/cir/util/operator.h" +#include "codon/cir/util/cloning.hpp" +#include "codon/cir/util/irtools.hpp" +#include "codon/cir/util/operator.hpp" namespace codon { namespace ir { diff --git a/codon/cir/util/outlining.h b/codon/cir/util/outlining.hpp similarity index 99% rename from codon/cir/util/outlining.h rename to codon/cir/util/outlining.hpp index bb8674fb..272554ed 100644 --- a/codon/cir/util/outlining.h +++ b/codon/cir/util/outlining.hpp @@ -2,7 +2,7 @@ #pragma once -#include "codon/cir/cir.h" +#include "codon/cir/cir.hpp" namespace codon { namespace ir { diff --git a/codon/cir/util/packs.h b/codon/cir/util/packs.hpp similarity index 100% rename from codon/cir/util/packs.h rename to codon/cir/util/packs.hpp diff --git a/codon/cir/util/side_effect.cpp b/codon/cir/util/side_effect.cpp index 6248a3a3..80f2dfe7 100644 --- a/codon/cir/util/side_effect.cpp +++ b/codon/cir/util/side_effect.cpp @@ -1,6 +1,6 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "side_effect.h" +#include "side_effect.hpp" namespace codon { namespace ir { diff --git a/codon/cir/util/side_effect.h b/codon/cir/util/side_effect.hpp similarity index 100% rename from codon/cir/util/side_effect.h rename to codon/cir/util/side_effect.hpp diff --git a/codon/cir/util/visitor.cpp b/codon/cir/util/visitor.cpp index dc0b2f5e..0b52ad88 100644 --- a/codon/cir/util/visitor.cpp +++ b/codon/cir/util/visitor.cpp @@ -1,8 +1,8 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "visitor.h" +#include "visitor.hpp" -#include "codon/cir/cir.h" +#include "codon/cir/cir.hpp" namespace codon { namespace ir { diff --git a/codon/cir/util/visitor.h b/codon/cir/util/visitor.hpp similarity index 100% rename from codon/cir/util/visitor.h rename to codon/cir/util/visitor.hpp diff --git a/codon/cir/value.cpp b/codon/cir/value.cpp index 0e5e3ca2..1cc9391d 100644 --- a/codon/cir/value.cpp +++ b/codon/cir/value.cpp @@ -1,9 +1,9 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "value.h" +#include "value.hpp" -#include "codon/cir/instr.h" -#include "codon/cir/module.h" +#include "codon/cir/instr.hpp" +#include "codon/cir/module.hpp" namespace codon { namespace ir { diff --git a/codon/cir/value.h b/codon/cir/value.hpp similarity index 97% rename from codon/cir/value.h rename to codon/cir/value.hpp index 0bb0e9ae..0d1d90d4 100644 --- a/codon/cir/value.h +++ b/codon/cir/value.hpp @@ -2,9 +2,9 @@ #pragma once -#include "codon/cir/base.h" -#include "codon/cir/types/types.h" -#include "codon/cir/util/packs.h" +#include "codon/cir/base.hpp" +#include "codon/cir/types/types.hpp" +#include "codon/cir/util/packs.hpp" namespace codon { namespace ir { diff --git a/codon/cir/var.cpp b/codon/cir/var.cpp index 9ed1f3f9..802c615d 100644 --- a/codon/cir/var.cpp +++ b/codon/cir/var.cpp @@ -1,8 +1,8 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "var.h" +#include "var.hpp" -#include "codon/cir/module.h" +#include "codon/cir/module.hpp" namespace codon { namespace ir { diff --git a/codon/cir/var.h b/codon/cir/var.hpp similarity index 98% rename from codon/cir/var.h rename to codon/cir/var.hpp index fff7fc2e..b54f0338 100644 --- a/codon/cir/var.h +++ b/codon/cir/var.hpp @@ -7,8 +7,8 @@ #include #include -#include "codon/cir/types/types.h" -#include "codon/cir/value.h" +#include "codon/cir/types/types.hpp" +#include "codon/cir/value.hpp" #include "codon/util/common.hpp" #include #include diff --git a/codon/compiler/compiler.cpp b/codon/compiler/compiler.cpp index d7290cb1..6425111e 100644 --- a/codon/compiler/compiler.cpp +++ b/codon/compiler/compiler.cpp @@ -1,13 +1,13 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "compiler.h" +#include "compiler.hpp" #include "codon/compiler/error.hpp" #include "codon/parser/cache.hpp" -#include "codon/parser/peg/peg.h" -#include "codon/parser/visitors/doc/doc.h" -#include "codon/parser/visitors/format/format.h" -#include "codon/parser/visitors/simplify/simplify.h" +#include "codon/parser/peg/peg.hpp" +#include "codon/parser/visitors/doc/doc.hpp" +#include "codon/parser/visitors/format/format.hpp" +#include "codon/parser/visitors/simplify/simplify.hpp" #include "codon/parser/visitors/translate/translate.h" #include "codon/parser/visitors/typecheck/typecheck.h" diff --git a/codon/compiler/compiler.h b/codon/compiler/compiler.hpp similarity index 95% rename from codon/compiler/compiler.h rename to codon/compiler/compiler.hpp index 468f7c83..2b841a40 100644 --- a/codon/compiler/compiler.h +++ b/codon/compiler/compiler.hpp @@ -7,11 +7,11 @@ #include #include -#include "codon/cir/llvm/llvisitor.h" -#include "codon/cir/module.h" +#include "codon/cir/llvm/llvisitor.hpp" +#include "codon/cir/module.hpp" #include "codon/cir/transform/manager.h" #include "codon/compiler/error.hpp" -#include "codon/dsl/plugins.h" +#include "codon/dsl/plugins.hpp" #include "codon/parser/cache.hpp" namespace codon { diff --git a/codon/compiler/debug_listener.cpp b/codon/compiler/debug_listener.cpp index 2d6f5108..857839e7 100644 --- a/codon/compiler/debug_listener.cpp +++ b/codon/compiler/debug_listener.cpp @@ -1,6 +1,6 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "debug_listener.h" +#include "debug_listener.hpp" #include #include diff --git a/codon/compiler/debug_listener.h b/codon/compiler/debug_listener.hpp similarity index 98% rename from codon/compiler/debug_listener.h rename to codon/compiler/debug_listener.hpp index bb558aee..60412343 100644 --- a/codon/compiler/debug_listener.h +++ b/codon/compiler/debug_listener.hpp @@ -7,7 +7,7 @@ #include #include -#include "codon/cir/llvm/llvm.h" +#include "codon/cir/llvm/llvm.hpp" namespace codon { diff --git a/codon/compiler/engine.cpp b/codon/compiler/engine.cpp index fefc0572..66faf5bb 100644 --- a/codon/compiler/engine.cpp +++ b/codon/compiler/engine.cpp @@ -1,9 +1,9 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "engine.h" +#include "engine.hpp" -#include "codon/cir/llvm/optimize.h" -#include "codon/compiler/memory_manager.h" +#include "codon/cir/llvm/optimize.hpp" +#include "codon/compiler/memory_manager.hpp" namespace codon { namespace jit { diff --git a/codon/compiler/engine.h b/codon/compiler/engine.hpp similarity index 90% rename from codon/compiler/engine.h rename to codon/compiler/engine.hpp index 6b3c3217..3f8cef51 100644 --- a/codon/compiler/engine.h +++ b/codon/compiler/engine.hpp @@ -5,8 +5,8 @@ #include #include -#include "codon/cir/llvm/llvm.h" -#include "codon/compiler/debug_listener.h" +#include "codon/cir/llvm/llvm.hpp" +#include "codon/compiler/debug_listener.hpp" namespace codon { namespace jit { diff --git a/codon/compiler/jit.cpp b/codon/compiler/jit.cpp index 02c53df5..5683a14a 100644 --- a/codon/compiler/jit.cpp +++ b/codon/compiler/jit.cpp @@ -1,14 +1,14 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "jit.h" +#include "jit.hpp" #include #include "codon/parser/common.hpp" -#include "codon/parser/peg/peg.h" -#include "codon/parser/visitors/doc/doc.h" -#include "codon/parser/visitors/format/format.h" -#include "codon/parser/visitors/simplify/simplify.h" +#include "codon/parser/peg/peg.hpp" +#include "codon/parser/visitors/doc/doc.hpp" +#include "codon/parser/visitors/format/format.hpp" +#include "codon/parser/visitors/simplify/simplify.hpp" #include "codon/parser/visitors/translate/translate.h" #include "codon/parser/visitors/typecheck/typecheck.h" diff --git a/codon/compiler/jit.h b/codon/compiler/jit.hpp similarity index 93% rename from codon/compiler/jit.h rename to codon/compiler/jit.hpp index 9f93b10d..e9d881b1 100644 --- a/codon/compiler/jit.h +++ b/codon/compiler/jit.hpp @@ -7,11 +7,11 @@ #include #include -#include "codon/cir/llvm/llvisitor.h" +#include "codon/cir/llvm/llvisitor.hpp" #include "codon/cir/transform/manager.h" -#include "codon/cir/var.h" -#include "codon/compiler/compiler.h" -#include "codon/compiler/engine.h" +#include "codon/cir/var.hpp" +#include "codon/compiler/compiler.hpp" +#include "codon/compiler/engine.hpp" #include "codon/compiler/error.hpp" #include "codon/parser/cache.hpp" #include "codon/runtime/lib.hpp" diff --git a/codon/compiler/memory_manager.cpp b/codon/compiler/memory_manager.cpp index 09f41a7f..8ec11ed2 100644 --- a/codon/compiler/memory_manager.cpp +++ b/codon/compiler/memory_manager.cpp @@ -1,6 +1,6 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "memory_manager.h" +#include "memory_manager.hpp" #include "codon/runtime/lib.hpp" diff --git a/codon/compiler/memory_manager.h b/codon/compiler/memory_manager.hpp similarity index 98% rename from codon/compiler/memory_manager.h rename to codon/compiler/memory_manager.hpp index c54f04d4..6791a8f8 100644 --- a/codon/compiler/memory_manager.h +++ b/codon/compiler/memory_manager.hpp @@ -6,7 +6,7 @@ #include #include -#include "codon/cir/llvm/llvm.h" +#include "codon/cir/llvm/llvm.hpp" namespace codon { diff --git a/codon/dsl/dsl.h b/codon/dsl/dsl.hpp similarity index 97% rename from codon/dsl/dsl.h rename to codon/dsl/dsl.hpp index b22e752c..0c17bfe0 100644 --- a/codon/dsl/dsl.h +++ b/codon/dsl/dsl.hpp @@ -2,9 +2,9 @@ #pragma once -#include "codon/cir/cir.h" +#include "codon/cir/cir.hpp" #include "codon/cir/transform/manager.h" -#include "codon/cir/transform/pass.h" +#include "codon/cir/transform/pass.hpp" #include "codon/parser/cache.hpp" #include "llvm/Passes/PassBuilder.h" #include diff --git a/codon/dsl/plugins.cpp b/codon/dsl/plugins.cpp index 21a35df7..644f6dfa 100644 --- a/codon/dsl/plugins.cpp +++ b/codon/dsl/plugins.cpp @@ -1,6 +1,6 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "plugins.h" +#include "plugins.hpp" #include #include diff --git a/codon/dsl/plugins.h b/codon/dsl/plugins.hpp similarity index 96% rename from codon/dsl/plugins.h rename to codon/dsl/plugins.hpp index 66a66b92..d8c8abda 100644 --- a/codon/dsl/plugins.h +++ b/codon/dsl/plugins.hpp @@ -7,9 +7,9 @@ #include #include -#include "codon/cir/util/iterators.h" +#include "codon/cir/util/iterators.hpp" #include "codon/compiler/error.hpp" -#include "codon/dsl/dsl.h" +#include "codon/dsl/dsl.hpp" #include "llvm/Support/DynamicLibrary.h" namespace codon { diff --git a/codon/parser/ast.hpp b/codon/parser/ast.hpp index 112175b5..9660bc57 100644 --- a/codon/parser/ast.hpp +++ b/codon/parser/ast.hpp @@ -3,6 +3,6 @@ #pragma once #include "codon/parser/ast/error.hpp" -#include "codon/parser/ast/expr.h" -#include "codon/parser/ast/stmt.h" +#include "codon/parser/ast/expr.hpp" +#include "codon/parser/ast/stmt.hpp" #include "codon/parser/ast/types.h" diff --git a/codon/parser/ast/expr.cpp b/codon/parser/ast/expr.cpp index 69975230..9be8ecac 100644 --- a/codon/parser/ast/expr.cpp +++ b/codon/parser/ast/expr.cpp @@ -1,6 +1,6 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "expr.h" +#include "expr.hpp" #include #include diff --git a/codon/parser/ast/expr.h b/codon/parser/ast/expr.hpp similarity index 100% rename from codon/parser/ast/expr.h rename to codon/parser/ast/expr.hpp diff --git a/codon/parser/ast/stmt.cpp b/codon/parser/ast/stmt.cpp index 6278c7d5..25147297 100644 --- a/codon/parser/ast/stmt.cpp +++ b/codon/parser/ast/stmt.cpp @@ -1,6 +1,6 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "stmt.h" +#include "stmt.hpp" #include #include diff --git a/codon/parser/ast/stmt.h b/codon/parser/ast/stmt.hpp similarity index 99% rename from codon/parser/ast/stmt.h rename to codon/parser/ast/stmt.hpp index f0678eed..97d4e09e 100644 --- a/codon/parser/ast/stmt.h +++ b/codon/parser/ast/stmt.hpp @@ -7,7 +7,7 @@ #include #include -#include "codon/parser/ast/expr.h" +#include "codon/parser/ast/expr.hpp" #include "codon/parser/ast/types.h" #include "codon/parser/common.hpp" diff --git a/codon/parser/ast/types.h b/codon/parser/ast/types.h index 93d89961..25b96cc0 100644 --- a/codon/parser/ast/types.h +++ b/codon/parser/ast/types.h @@ -2,10 +2,10 @@ #pragma once -#include "codon/parser/ast/types/class.h" -#include "codon/parser/ast/types/function.h" -#include "codon/parser/ast/types/link.h" -#include "codon/parser/ast/types/static.h" -#include "codon/parser/ast/types/traits.h" -#include "codon/parser/ast/types/type.h" -#include "codon/parser/ast/types/union.h" +#include "codon/parser/ast/types/class.hpp" +#include "codon/parser/ast/types/function.hpp" +#include "codon/parser/ast/types/link.hpp" +#include "codon/parser/ast/types/static.hpp" +#include "codon/parser/ast/types/traits.hpp" +#include "codon/parser/ast/types/type.hpp" +#include "codon/parser/ast/types/union.hpp" diff --git a/codon/parser/ast/types/class.cpp b/codon/parser/ast/types/class.cpp index 9f2ebbd1..37f41db3 100644 --- a/codon/parser/ast/types/class.cpp +++ b/codon/parser/ast/types/class.cpp @@ -4,8 +4,8 @@ #include #include -#include "codon/parser/ast/types/class.h" -#include "codon/parser/visitors/format/format.h" +#include "codon/parser/ast/types/class.hpp" +#include "codon/parser/visitors/format/format.hpp" #include "codon/parser/visitors/typecheck/typecheck.h" namespace codon::ast::types { diff --git a/codon/parser/ast/types/class.h b/codon/parser/ast/types/class.hpp similarity index 98% rename from codon/parser/ast/types/class.h rename to codon/parser/ast/types/class.hpp index 69255dad..3f41c0b6 100644 --- a/codon/parser/ast/types/class.h +++ b/codon/parser/ast/types/class.hpp @@ -7,7 +7,7 @@ #include #include -#include "codon/parser/ast/types/type.h" +#include "codon/parser/ast/types/type.hpp" namespace codon::ast::types { diff --git a/codon/parser/ast/types/function.cpp b/codon/parser/ast/types/function.cpp index 68ffcc9f..467b3028 100644 --- a/codon/parser/ast/types/function.cpp +++ b/codon/parser/ast/types/function.cpp @@ -4,8 +4,8 @@ #include #include -#include "codon/parser/ast/types/class.h" -#include "codon/parser/visitors/format/format.h" +#include "codon/parser/ast/types/class.hpp" +#include "codon/parser/visitors/format/format.hpp" #include "codon/parser/visitors/typecheck/typecheck.h" namespace codon::ast::types { diff --git a/codon/parser/ast/types/function.h b/codon/parser/ast/types/function.hpp similarity index 97% rename from codon/parser/ast/types/function.h rename to codon/parser/ast/types/function.hpp index 16c267de..5f0cd69d 100644 --- a/codon/parser/ast/types/function.h +++ b/codon/parser/ast/types/function.hpp @@ -7,8 +7,8 @@ #include #include -#include "codon/parser/ast/types/class.h" -#include "codon/parser/ast/types/type.h" +#include "codon/parser/ast/types/class.hpp" +#include "codon/parser/ast/types/type.hpp" namespace codon::ast { struct FunctionStmt; diff --git a/codon/parser/ast/types/link.cpp b/codon/parser/ast/types/link.cpp index d601588b..26acf966 100644 --- a/codon/parser/ast/types/link.cpp +++ b/codon/parser/ast/types/link.cpp @@ -4,8 +4,8 @@ #include #include -#include "codon/parser/ast/types/link.h" -#include "codon/parser/visitors/format/format.h" +#include "codon/parser/ast/types/link.hpp" +#include "codon/parser/visitors/format/format.hpp" #include "codon/parser/visitors/typecheck/typecheck.h" namespace codon::ast::types { diff --git a/codon/parser/ast/types/link.h b/codon/parser/ast/types/link.hpp similarity index 96% rename from codon/parser/ast/types/link.h rename to codon/parser/ast/types/link.hpp index 2fe10aa0..2de4d7d5 100644 --- a/codon/parser/ast/types/link.h +++ b/codon/parser/ast/types/link.hpp @@ -7,8 +7,8 @@ #include #include -#include "codon/parser/ast/types/traits.h" -#include "codon/parser/ast/types/type.h" +#include "codon/parser/ast/types/traits.hpp" +#include "codon/parser/ast/types/type.hpp" namespace codon::ast::types { diff --git a/codon/parser/ast/types/static.cpp b/codon/parser/ast/types/static.cpp index 3abb54c5..6e561611 100644 --- a/codon/parser/ast/types/static.cpp +++ b/codon/parser/ast/types/static.cpp @@ -5,10 +5,10 @@ #include #include "codon/parser/ast.hpp" -#include "codon/parser/ast/types/static.h" +#include "codon/parser/ast/types/static.hpp" #include "codon/parser/cache.hpp" #include "codon/parser/common.hpp" -#include "codon/parser/visitors/format/format.h" +#include "codon/parser/visitors/format/format.hpp" #include "codon/parser/visitors/typecheck/typecheck.h" namespace codon::ast::types { diff --git a/codon/parser/ast/types/static.h b/codon/parser/ast/types/static.hpp similarity index 97% rename from codon/parser/ast/types/static.h rename to codon/parser/ast/types/static.hpp index 79654f8e..37fd1136 100644 --- a/codon/parser/ast/types/static.h +++ b/codon/parser/ast/types/static.hpp @@ -7,7 +7,7 @@ #include #include -#include "codon/parser/ast/types/class.h" +#include "codon/parser/ast/types/class.hpp" namespace codon::ast { struct StaticValue; diff --git a/codon/parser/ast/types/traits.h b/codon/parser/ast/types/traits.hpp similarity index 97% rename from codon/parser/ast/types/traits.h rename to codon/parser/ast/types/traits.hpp index 9131c65a..2853b977 100644 --- a/codon/parser/ast/types/traits.h +++ b/codon/parser/ast/types/traits.hpp @@ -8,7 +8,7 @@ #include #include -#include "codon/parser/ast/types/type.h" +#include "codon/parser/ast/types/type.hpp" namespace codon::ast::types { diff --git a/codon/parser/ast/types/type.cpp b/codon/parser/ast/types/type.cpp index e793a454..5e82d78e 100644 --- a/codon/parser/ast/types/type.cpp +++ b/codon/parser/ast/types/type.cpp @@ -4,8 +4,8 @@ #include #include -#include "codon/parser/ast/types/type.h" -#include "codon/parser/visitors/format/format.h" +#include "codon/parser/ast/types/type.hpp" +#include "codon/parser/visitors/format/format.hpp" #include "codon/parser/visitors/typecheck/typecheck.h" namespace codon::ast::types { diff --git a/codon/parser/ast/types/type.h b/codon/parser/ast/types/type.hpp similarity index 100% rename from codon/parser/ast/types/type.h rename to codon/parser/ast/types/type.hpp diff --git a/codon/parser/ast/types/union.h b/codon/parser/ast/types/union.hpp similarity index 96% rename from codon/parser/ast/types/union.h rename to codon/parser/ast/types/union.hpp index dabef74a..56fe12d8 100644 --- a/codon/parser/ast/types/union.h +++ b/codon/parser/ast/types/union.hpp @@ -7,7 +7,7 @@ #include #include -#include "codon/parser/ast/types/class.h" +#include "codon/parser/ast/types/class.hpp" namespace codon::ast::types { diff --git a/codon/parser/cache.cpp b/codon/parser/cache.cpp index ba73ac37..5add3a71 100644 --- a/codon/parser/cache.cpp +++ b/codon/parser/cache.cpp @@ -6,11 +6,11 @@ #include #include -#include "codon/cir/pyextension.h" -#include "codon/cir/util/irtools.h" +#include "codon/cir/pyextension.hpp" +#include "codon/cir/util/irtools.hpp" #include "codon/parser/common.hpp" -#include "codon/parser/peg/peg.h" -#include "codon/parser/visitors/simplify/simplify.h" +#include "codon/parser/peg/peg.hpp" +#include "codon/parser/visitors/simplify/simplify.hpp" #include "codon/parser/visitors/translate/translate.h" #include "codon/parser/visitors/typecheck/ctx.hpp" #include "codon/parser/visitors/typecheck/typecheck.h" diff --git a/codon/parser/cache.hpp b/codon/parser/cache.hpp index 983f23cd..41f6d94a 100644 --- a/codon/parser/cache.hpp +++ b/codon/parser/cache.hpp @@ -8,8 +8,8 @@ #include #include -#include "codon/cir/cir.h" -#include "codon/cir/pyextension.h" +#include "codon/cir/cir.hpp" +#include "codon/cir/pyextension.hpp" #include "codon/parser/ast.hpp" #include "codon/parser/common.hpp" #include "codon/parser/ctx.hpp" diff --git a/codon/parser/peg/grammar.peg b/codon/parser/peg/grammar.peg index 176248bd..247fd1a3 100644 --- a/codon/parser/peg/grammar.peg +++ b/codon/parser/peg/grammar.peg @@ -5,7 +5,7 @@ # TODO: nice docstrs PREAMBLE { - #include "codon/parser/peg/rules.h" + #include "codon/parser/peg/rules.hpp" #include using namespace std; using namespace codon::ast; diff --git a/codon/parser/peg/openmp.peg b/codon/parser/peg/openmp.peg index fb0a31cf..79ba4c55 100644 --- a/codon/parser/peg/openmp.peg +++ b/codon/parser/peg/openmp.peg @@ -2,7 +2,7 @@ # OpenMP PEG grammar PREAMBLE { - #include "codon/parser/peg/rules.h" + #include "codon/parser/peg/rules.hpp" #include using namespace std; using namespace codon::ast; diff --git a/codon/parser/peg/peg.cpp b/codon/parser/peg/peg.cpp index bc5c76aa..c1193bcc 100644 --- a/codon/parser/peg/peg.cpp +++ b/codon/parser/peg/peg.cpp @@ -1,6 +1,6 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "peg.h" +#include "peg.hpp" #include #include @@ -11,8 +11,8 @@ #include "codon/parser/ast.hpp" #include "codon/parser/common.hpp" -#include "codon/parser/peg/rules.h" -#include "codon/parser/visitors/format/format.h" +#include "codon/parser/peg/rules.hpp" +#include "codon/parser/visitors/format/format.hpp" double totalPeg = 0.0; diff --git a/codon/parser/peg/peg.h b/codon/parser/peg/peg.hpp similarity index 100% rename from codon/parser/peg/peg.h rename to codon/parser/peg/peg.hpp diff --git a/codon/parser/peg/rules.h b/codon/parser/peg/rules.hpp similarity index 100% rename from codon/parser/peg/rules.h rename to codon/parser/peg/rules.hpp diff --git a/codon/parser/visitors/doc/doc.cpp b/codon/parser/visitors/doc/doc.cpp index 5e63c13e..c5ca1745 100644 --- a/codon/parser/visitors/doc/doc.cpp +++ b/codon/parser/visitors/doc/doc.cpp @@ -1,6 +1,6 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "doc.h" +#include "doc.hpp" #include #include @@ -9,8 +9,8 @@ #include "codon/parser/ast.hpp" #include "codon/parser/common.hpp" -#include "codon/parser/peg/peg.h" -#include "codon/parser/visitors/format/format.h" +#include "codon/parser/peg/peg.hpp" +#include "codon/parser/visitors/format/format.hpp" using fmt::format; diff --git a/codon/parser/visitors/doc/doc.h b/codon/parser/visitors/doc/doc.hpp similarity index 100% rename from codon/parser/visitors/doc/doc.h rename to codon/parser/visitors/doc/doc.hpp diff --git a/codon/parser/visitors/format/format.cpp b/codon/parser/visitors/format/format.cpp index 369d295a..daca6991 100644 --- a/codon/parser/visitors/format/format.cpp +++ b/codon/parser/visitors/format/format.cpp @@ -3,7 +3,7 @@ #include #include -#include "codon/parser/visitors/format/format.h" +#include "codon/parser/visitors/format/format.hpp" using fmt::format; diff --git a/codon/parser/visitors/format/format.h b/codon/parser/visitors/format/format.hpp similarity index 100% rename from codon/parser/visitors/format/format.h rename to codon/parser/visitors/format/format.hpp diff --git a/codon/parser/visitors/simplify/access.cpp b/codon/parser/visitors/simplify/access.cpp index 135428b8..323afdc9 100644 --- a/codon/parser/visitors/simplify/access.cpp +++ b/codon/parser/visitors/simplify/access.cpp @@ -6,7 +6,7 @@ #include "codon/parser/ast.hpp" #include "codon/parser/cache.hpp" #include "codon/parser/common.hpp" -#include "codon/parser/visitors/simplify/simplify.h" +#include "codon/parser/visitors/simplify/simplify.hpp" using fmt::format; using namespace codon::error; diff --git a/codon/parser/visitors/simplify/assign.cpp b/codon/parser/visitors/simplify/assign.cpp index 8be9fc70..1917c7a1 100644 --- a/codon/parser/visitors/simplify/assign.cpp +++ b/codon/parser/visitors/simplify/assign.cpp @@ -5,7 +5,7 @@ #include "codon/parser/ast.hpp" #include "codon/parser/common.hpp" -#include "codon/parser/visitors/simplify/simplify.h" +#include "codon/parser/visitors/simplify/simplify.hpp" using fmt::format; using namespace codon::error; diff --git a/codon/parser/visitors/simplify/basic.cpp b/codon/parser/visitors/simplify/basic.cpp index ca56c97e..e10f3e17 100644 --- a/codon/parser/visitors/simplify/basic.cpp +++ b/codon/parser/visitors/simplify/basic.cpp @@ -8,8 +8,8 @@ #include "codon/parser/ast.hpp" #include "codon/parser/cache.hpp" #include "codon/parser/common.hpp" -#include "codon/parser/peg/peg.h" -#include "codon/parser/visitors/simplify/simplify.h" +#include "codon/parser/peg/peg.hpp" +#include "codon/parser/visitors/simplify/simplify.hpp" using fmt::format; using namespace codon::error; diff --git a/codon/parser/visitors/simplify/call.cpp b/codon/parser/visitors/simplify/call.cpp index f1971bfa..4f9437c6 100644 --- a/codon/parser/visitors/simplify/call.cpp +++ b/codon/parser/visitors/simplify/call.cpp @@ -5,7 +5,7 @@ #include "codon/parser/ast.hpp" #include "codon/parser/common.hpp" -#include "codon/parser/visitors/simplify/simplify.h" +#include "codon/parser/visitors/simplify/simplify.hpp" using fmt::format; using namespace codon::error; diff --git a/codon/parser/visitors/simplify/class.cpp b/codon/parser/visitors/simplify/class.cpp index 10078e43..d9c49a39 100644 --- a/codon/parser/visitors/simplify/class.cpp +++ b/codon/parser/visitors/simplify/class.cpp @@ -8,7 +8,7 @@ #include "codon/parser/ast.hpp" #include "codon/parser/cache.hpp" #include "codon/parser/common.hpp" -#include "codon/parser/visitors/simplify/simplify.h" +#include "codon/parser/visitors/simplify/simplify.hpp" using fmt::format; using namespace codon::error; diff --git a/codon/parser/visitors/simplify/collections.cpp b/codon/parser/visitors/simplify/collections.cpp index 65a4b9b0..2916fff7 100644 --- a/codon/parser/visitors/simplify/collections.cpp +++ b/codon/parser/visitors/simplify/collections.cpp @@ -5,7 +5,7 @@ #include "codon/parser/ast.hpp" #include "codon/parser/common.hpp" -#include "codon/parser/visitors/simplify/simplify.h" +#include "codon/parser/visitors/simplify/simplify.hpp" using fmt::format; diff --git a/codon/parser/visitors/simplify/cond.cpp b/codon/parser/visitors/simplify/cond.cpp index bb020f70..224aa084 100644 --- a/codon/parser/visitors/simplify/cond.cpp +++ b/codon/parser/visitors/simplify/cond.cpp @@ -6,7 +6,7 @@ #include "codon/parser/ast.hpp" #include "codon/parser/common.hpp" -#include "codon/parser/visitors/simplify/simplify.h" +#include "codon/parser/visitors/simplify/simplify.hpp" using fmt::format; using namespace codon::error; diff --git a/codon/parser/visitors/simplify/ctx.cpp b/codon/parser/visitors/simplify/ctx.cpp index 9245e03f..881ff3f1 100644 --- a/codon/parser/visitors/simplify/ctx.cpp +++ b/codon/parser/visitors/simplify/ctx.cpp @@ -8,7 +8,7 @@ #include #include "codon/parser/common.hpp" -#include "codon/parser/visitors/simplify/simplify.h" +#include "codon/parser/visitors/simplify/simplify.hpp" using fmt::format; using namespace codon::error; diff --git a/codon/parser/visitors/simplify/error.cpp b/codon/parser/visitors/simplify/error.cpp index 68af745e..a4cfeb7e 100644 --- a/codon/parser/visitors/simplify/error.cpp +++ b/codon/parser/visitors/simplify/error.cpp @@ -5,7 +5,7 @@ #include "codon/parser/ast.hpp" #include "codon/parser/common.hpp" -#include "codon/parser/visitors/simplify/simplify.h" +#include "codon/parser/visitors/simplify/simplify.hpp" using fmt::format; diff --git a/codon/parser/visitors/simplify/function.cpp b/codon/parser/visitors/simplify/function.cpp index eb5c6c88..1ab70091 100644 --- a/codon/parser/visitors/simplify/function.cpp +++ b/codon/parser/visitors/simplify/function.cpp @@ -8,8 +8,8 @@ #include "codon/parser/ast.hpp" #include "codon/parser/cache.hpp" #include "codon/parser/common.hpp" -#include "codon/parser/peg/peg.h" -#include "codon/parser/visitors/simplify/simplify.h" +#include "codon/parser/peg/peg.hpp" +#include "codon/parser/visitors/simplify/simplify.hpp" using fmt::format; using namespace codon::error; diff --git a/codon/parser/visitors/simplify/import.cpp b/codon/parser/visitors/simplify/import.cpp index 46c5d87c..2af89ea1 100644 --- a/codon/parser/visitors/simplify/import.cpp +++ b/codon/parser/visitors/simplify/import.cpp @@ -7,8 +7,8 @@ #include "codon/parser/ast.hpp" #include "codon/parser/common.hpp" -#include "codon/parser/peg/peg.h" -#include "codon/parser/visitors/simplify/simplify.h" +#include "codon/parser/peg/peg.hpp" +#include "codon/parser/visitors/simplify/simplify.hpp" using fmt::format; using namespace codon::error; diff --git a/codon/parser/visitors/simplify/loops.cpp b/codon/parser/visitors/simplify/loops.cpp index 17e657e7..2a07a187 100644 --- a/codon/parser/visitors/simplify/loops.cpp +++ b/codon/parser/visitors/simplify/loops.cpp @@ -6,8 +6,8 @@ #include "codon/parser/ast.hpp" #include "codon/parser/common.hpp" -#include "codon/parser/peg/peg.h" -#include "codon/parser/visitors/simplify/simplify.h" +#include "codon/parser/peg/peg.hpp" +#include "codon/parser/visitors/simplify/simplify.hpp" using fmt::format; using namespace codon::error; diff --git a/codon/parser/visitors/simplify/op.cpp b/codon/parser/visitors/simplify/op.cpp index fd53349a..123e2fac 100644 --- a/codon/parser/visitors/simplify/op.cpp +++ b/codon/parser/visitors/simplify/op.cpp @@ -7,7 +7,7 @@ #include "codon/parser/ast.hpp" #include "codon/parser/cache.hpp" #include "codon/parser/common.hpp" -#include "codon/parser/visitors/simplify/simplify.h" +#include "codon/parser/visitors/simplify/simplify.hpp" using fmt::format; using namespace codon::error; diff --git a/codon/parser/visitors/simplify/simplify.cpp b/codon/parser/visitors/simplify/simplify.cpp index baec23a6..c8d93e50 100644 --- a/codon/parser/visitors/simplify/simplify.cpp +++ b/codon/parser/visitors/simplify/simplify.cpp @@ -1,6 +1,6 @@ // Copyright (C) 2022-2024 Exaloop Inc. -#include "simplify.h" +#include "simplify.hpp" #include #include @@ -9,7 +9,7 @@ #include "codon/parser/ast.hpp" #include "codon/parser/common.hpp" -#include "codon/parser/peg/peg.h" +#include "codon/parser/peg/peg.hpp" #include "codon/parser/visitors/simplify/ctx.hpp" using fmt::format; diff --git a/codon/parser/visitors/simplify/simplify.h b/codon/parser/visitors/simplify/simplify.hpp similarity index 100% rename from codon/parser/visitors/simplify/simplify.h rename to codon/parser/visitors/simplify/simplify.hpp diff --git a/codon/parser/visitors/translate/translate.cpp b/codon/parser/visitors/translate/translate.cpp index 5951dd60..e6c23a06 100644 --- a/codon/parser/visitors/translate/translate.cpp +++ b/codon/parser/visitors/translate/translate.cpp @@ -7,8 +7,8 @@ #include #include -#include "codon/cir/transform/parallel/schedule.h" -#include "codon/cir/util/cloning.h" +#include "codon/cir/transform/parallel/schedule.hpp" +#include "codon/cir/util/cloning.hpp" #include "codon/parser/ast.hpp" #include "codon/parser/common.hpp" #include "codon/parser/visitors/translate/translate_ctx.hpp" diff --git a/codon/parser/visitors/translate/translate.h b/codon/parser/visitors/translate/translate.h index 21aca713..55b8a5c6 100644 --- a/codon/parser/visitors/translate/translate.h +++ b/codon/parser/visitors/translate/translate.h @@ -8,7 +8,7 @@ #include #include -#include "codon/cir/cir.h" +#include "codon/cir/cir.hpp" #include "codon/parser/ast.hpp" #include "codon/parser/cache.hpp" #include "codon/parser/common.hpp" diff --git a/codon/parser/visitors/translate/translate_ctx.hpp b/codon/parser/visitors/translate/translate_ctx.hpp index a85f030a..6396dd04 100644 --- a/codon/parser/visitors/translate/translate_ctx.hpp +++ b/codon/parser/visitors/translate/translate_ctx.hpp @@ -7,8 +7,8 @@ #include #include -#include "codon/cir/cir.h" -#include "codon/cir/types/types.h" +#include "codon/cir/cir.hpp" +#include "codon/cir/types/types.hpp" #include "codon/parser/cache.hpp" #include "codon/parser/common.hpp" #include "codon/parser/ctx.hpp" diff --git a/codon/parser/visitors/typecheck/access.cpp b/codon/parser/visitors/typecheck/access.cpp index 5f998503..34cbea32 100644 --- a/codon/parser/visitors/typecheck/access.cpp +++ b/codon/parser/visitors/typecheck/access.cpp @@ -6,7 +6,7 @@ #include "codon/parser/ast.hpp" #include "codon/parser/cache.hpp" #include "codon/parser/common.hpp" -#include "codon/parser/visitors/simplify/simplify.h" +#include "codon/parser/visitors/simplify/simplify.hpp" #include "codon/parser/visitors/typecheck/typecheck.h" using fmt::format; diff --git a/codon/parser/visitors/typecheck/assign.cpp b/codon/parser/visitors/typecheck/assign.cpp index c3a9dc72..c362efc4 100644 --- a/codon/parser/visitors/typecheck/assign.cpp +++ b/codon/parser/visitors/typecheck/assign.cpp @@ -6,7 +6,7 @@ #include "codon/parser/ast.hpp" #include "codon/parser/cache.hpp" #include "codon/parser/common.hpp" -#include "codon/parser/visitors/simplify/simplify.h" +#include "codon/parser/visitors/simplify/simplify.hpp" #include "codon/parser/visitors/typecheck/typecheck.h" using fmt::format; diff --git a/codon/parser/visitors/typecheck/basic.cpp b/codon/parser/visitors/typecheck/basic.cpp index f4ceaff1..02639b4f 100644 --- a/codon/parser/visitors/typecheck/basic.cpp +++ b/codon/parser/visitors/typecheck/basic.cpp @@ -3,7 +3,7 @@ #include "codon/parser/ast.hpp" #include "codon/parser/cache.hpp" #include "codon/parser/common.hpp" -#include "codon/parser/visitors/simplify/simplify.h" +#include "codon/parser/visitors/simplify/simplify.hpp" #include "codon/parser/visitors/typecheck/typecheck.h" using fmt::format; diff --git a/codon/parser/visitors/typecheck/call.cpp b/codon/parser/visitors/typecheck/call.cpp index 9bb85661..0cfce1b1 100644 --- a/codon/parser/visitors/typecheck/call.cpp +++ b/codon/parser/visitors/typecheck/call.cpp @@ -6,7 +6,7 @@ #include "codon/parser/ast.hpp" #include "codon/parser/cache.hpp" #include "codon/parser/common.hpp" -#include "codon/parser/visitors/simplify/simplify.h" +#include "codon/parser/visitors/simplify/simplify.hpp" #include "codon/parser/visitors/typecheck/typecheck.h" using fmt::format; diff --git a/codon/parser/visitors/typecheck/class.cpp b/codon/parser/visitors/typecheck/class.cpp index b98e63c2..e0d880ec 100644 --- a/codon/parser/visitors/typecheck/class.cpp +++ b/codon/parser/visitors/typecheck/class.cpp @@ -6,7 +6,7 @@ #include "codon/parser/ast.hpp" #include "codon/parser/cache.hpp" #include "codon/parser/common.hpp" -#include "codon/parser/visitors/simplify/simplify.h" +#include "codon/parser/visitors/simplify/simplify.hpp" #include "codon/parser/visitors/typecheck/typecheck.h" using fmt::format; diff --git a/codon/parser/visitors/typecheck/collections.cpp b/codon/parser/visitors/typecheck/collections.cpp index 55fffd8f..5f807508 100644 --- a/codon/parser/visitors/typecheck/collections.cpp +++ b/codon/parser/visitors/typecheck/collections.cpp @@ -3,7 +3,7 @@ #include "codon/parser/ast.hpp" #include "codon/parser/cache.hpp" #include "codon/parser/common.hpp" -#include "codon/parser/visitors/simplify/simplify.h" +#include "codon/parser/visitors/simplify/simplify.hpp" #include "codon/parser/visitors/typecheck/typecheck.h" using fmt::format; diff --git a/codon/parser/visitors/typecheck/cond.cpp b/codon/parser/visitors/typecheck/cond.cpp index fced7b88..24d17023 100644 --- a/codon/parser/visitors/typecheck/cond.cpp +++ b/codon/parser/visitors/typecheck/cond.cpp @@ -2,7 +2,7 @@ #include "codon/parser/ast.hpp" #include "codon/parser/common.hpp" -#include "codon/parser/visitors/simplify/simplify.h" +#include "codon/parser/visitors/simplify/simplify.hpp" #include "codon/parser/visitors/typecheck/typecheck.h" using fmt::format; diff --git a/codon/parser/visitors/typecheck/ctx.cpp b/codon/parser/visitors/typecheck/ctx.cpp index 2f0cb1d6..d6d260ae 100644 --- a/codon/parser/visitors/typecheck/ctx.cpp +++ b/codon/parser/visitors/typecheck/ctx.cpp @@ -9,7 +9,7 @@ #include "codon/parser/ast.hpp" #include "codon/parser/common.hpp" -#include "codon/parser/visitors/format/format.h" +#include "codon/parser/visitors/format/format.hpp" #include "codon/parser/visitors/simplify/ctx.hpp" #include "codon/parser/visitors/typecheck/typecheck.h" diff --git a/codon/parser/visitors/typecheck/error.cpp b/codon/parser/visitors/typecheck/error.cpp index dd9bf3d0..0e5753f9 100644 --- a/codon/parser/visitors/typecheck/error.cpp +++ b/codon/parser/visitors/typecheck/error.cpp @@ -2,7 +2,7 @@ #include "codon/parser/ast.hpp" #include "codon/parser/common.hpp" -#include "codon/parser/visitors/simplify/simplify.h" +#include "codon/parser/visitors/simplify/simplify.hpp" #include "codon/parser/visitors/typecheck/typecheck.h" using fmt::format; diff --git a/codon/parser/visitors/typecheck/function.cpp b/codon/parser/visitors/typecheck/function.cpp index 5453967a..3446327e 100644 --- a/codon/parser/visitors/typecheck/function.cpp +++ b/codon/parser/visitors/typecheck/function.cpp @@ -5,7 +5,7 @@ #include "codon/parser/ast.hpp" #include "codon/parser/common.hpp" -#include "codon/parser/visitors/simplify/simplify.h" +#include "codon/parser/visitors/simplify/simplify.hpp" #include "codon/parser/visitors/typecheck/typecheck.h" using fmt::format; diff --git a/codon/parser/visitors/typecheck/infer.cpp b/codon/parser/visitors/typecheck/infer.cpp index f1521243..88620330 100644 --- a/codon/parser/visitors/typecheck/infer.cpp +++ b/codon/parser/visitors/typecheck/infer.cpp @@ -7,10 +7,10 @@ #include #include -#include "codon/cir/types/types.h" +#include "codon/cir/types/types.hpp" #include "codon/parser/ast.hpp" #include "codon/parser/common.hpp" -#include "codon/parser/visitors/simplify/simplify.h" +#include "codon/parser/visitors/simplify/simplify.hpp" #include "codon/parser/visitors/typecheck/typecheck.h" using fmt::format; diff --git a/codon/parser/visitors/typecheck/loops.cpp b/codon/parser/visitors/typecheck/loops.cpp index 8b0e5d73..1205d379 100644 --- a/codon/parser/visitors/typecheck/loops.cpp +++ b/codon/parser/visitors/typecheck/loops.cpp @@ -5,7 +5,7 @@ #include "codon/parser/ast.hpp" #include "codon/parser/common.hpp" -#include "codon/parser/visitors/simplify/simplify.h" +#include "codon/parser/visitors/simplify/simplify.hpp" #include "codon/parser/visitors/typecheck/typecheck.h" using fmt::format; diff --git a/codon/parser/visitors/typecheck/op.cpp b/codon/parser/visitors/typecheck/op.cpp index 2b1aa5cd..facc8404 100644 --- a/codon/parser/visitors/typecheck/op.cpp +++ b/codon/parser/visitors/typecheck/op.cpp @@ -6,7 +6,7 @@ #include "codon/parser/ast.hpp" #include "codon/parser/cache.hpp" #include "codon/parser/common.hpp" -#include "codon/parser/visitors/simplify/simplify.h" +#include "codon/parser/visitors/simplify/simplify.hpp" #include "codon/parser/visitors/typecheck/typecheck.h" using fmt::format; diff --git a/codon/parser/visitors/typecheck/typecheck.h b/codon/parser/visitors/typecheck/typecheck.h index ece909f0..31665063 100644 --- a/codon/parser/visitors/typecheck/typecheck.h +++ b/codon/parser/visitors/typecheck/typecheck.h @@ -11,7 +11,7 @@ #include "codon/parser/ast.hpp" #include "codon/parser/common.hpp" -#include "codon/parser/visitors/format/format.h" +#include "codon/parser/visitors/format/format.hpp" #include "codon/parser/visitors/typecheck/ctx.hpp" #include "codon/parser/visitors/visitor.h" diff --git a/docs/advanced/ir.md b/docs/advanced/ir.md index 6eb07659..a2cca84b 100644 --- a/docs/advanced/ir.md +++ b/docs/advanced/ir.md @@ -100,7 +100,7 @@ In other words, a simple form of constant folding that only looks at addition on The resulting pass would like this: ``` cpp -#include "codon/cir/transform/pass.h" +#include "codon/cir/transform/pass.hpp" using namespace codon::ir; @@ -206,7 +206,7 @@ Assume we want our pass to insert a call to `validate()` after each assignment t and the argument passed to `foo()`. We would do something like the following: ``` cpp -#include "codon/cir/transform/pass.h" +#include "codon/cir/transform/pass.hpp" using namespace codon::ir; @@ -267,8 +267,8 @@ would subclass `CustomType`. Let's look at an example where we extend CIR to add ``` cpp using namespace codon::ir; -#include "codon/cir/dsl/nodes.h" -#include "codon/cir/llvm/llvisitor.h" +#include "codon/cir/dsl/nodes.hpp" +#include "codon/cir/llvm/llvisitor.hpp" class Builder : public dsl::codegen::TypeBuilder { public: @@ -310,7 +310,7 @@ When subclassing nodes other than types (e.g. instructions, flows, etc.), be sur # Utilities The `codon/cir/util/` directory has a number of utility and generally helpful functions, for things like -cloning IR, inlining/outlining, matching and more. `codon/cir/util/irtools.h` in particular has many helpful +cloning IR, inlining/outlining, matching and more. `codon/cir/util/irtools.hpp` in particular has many helpful functions for performing various common tasks. If you're working with CIR, be sure to take a look at these functions to make your life easier! diff --git a/jupyter/jupyter.cpp b/jupyter/jupyter.cpp index d24b11aa..6e4be79c 100644 --- a/jupyter/jupyter.cpp +++ b/jupyter/jupyter.cpp @@ -13,9 +13,9 @@ #include #include -#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/config/config.h" #include "codon/parser/common.hpp" #include "codon/util/common.hpp" diff --git a/jupyter/jupyter.h b/jupyter/jupyter.h index a6832ed1..1a4f591b 100644 --- a/jupyter/jupyter.h +++ b/jupyter/jupyter.h @@ -1,7 +1,7 @@ // Copyright (C) 2022-2024 Exaloop Inc. #pragma once -#include +#include #include #include diff --git a/test/cir/analyze/dominator.cpp b/test/cir/analyze/dominator.cpp index 7f62163f..0853471e 100644 --- a/test/cir/analyze/dominator.cpp +++ b/test/cir/analyze/dominator.cpp @@ -1,7 +1,7 @@ #include "test.h" -#include "codon/cir/analyze/dataflow/cfg.h" -#include "codon/cir/analyze/dataflow/dominator.h" +#include "codon/cir/analyze/dataflow/cfg.hpp" +#include "codon/cir/analyze/dataflow/dominator.hpp" using namespace codon::ir; diff --git a/test/cir/analyze/reaching.cpp b/test/cir/analyze/reaching.cpp index e02df0d0..a6be7685 100644 --- a/test/cir/analyze/reaching.cpp +++ b/test/cir/analyze/reaching.cpp @@ -1,7 +1,7 @@ #include "test.h" -#include "codon/cir/analyze/dataflow/cfg.h" -#include "codon/cir/analyze/dataflow/reaching.h" +#include "codon/cir/analyze/dataflow/cfg.hpp" +#include "codon/cir/analyze/dataflow/reaching.hpp" using namespace codon::ir; diff --git a/test/cir/flow.cpp b/test/cir/flow.cpp index 4af7e7aa..9b346371 100644 --- a/test/cir/flow.cpp +++ b/test/cir/flow.cpp @@ -3,7 +3,7 @@ #include #include -#include "codon/cir/util/matching.h" +#include "codon/cir/util/matching.hpp" using namespace codon::ir; diff --git a/test/cir/func.cpp b/test/cir/func.cpp index 35e20f9c..e2b2c8ee 100644 --- a/test/cir/func.cpp +++ b/test/cir/func.cpp @@ -2,7 +2,7 @@ #include -#include "codon/cir/util/matching.h" +#include "codon/cir/util/matching.hpp" using namespace codon::ir; diff --git a/test/cir/instr.cpp b/test/cir/instr.cpp index 15db37f5..d4dc89dd 100644 --- a/test/cir/instr.cpp +++ b/test/cir/instr.cpp @@ -1,6 +1,6 @@ #include "test.h" -#include "codon/cir/util/matching.h" +#include "codon/cir/util/matching.hpp" using namespace codon::ir; diff --git a/test/cir/module.cpp b/test/cir/module.cpp index e416d5c9..a53690a3 100644 --- a/test/cir/module.cpp +++ b/test/cir/module.cpp @@ -1,6 +1,6 @@ #include "test.h" -#include "codon/cir/util/matching.h" +#include "codon/cir/util/matching.hpp" using namespace codon::ir; diff --git a/test/cir/test.h b/test/cir/test.h index 9bb66433..0722c987 100644 --- a/test/cir/test.h +++ b/test/cir/test.h @@ -1,7 +1,7 @@ #include -#include "codon/cir/cir.h" -#include "codon/cir/util/cloning.h" +#include "codon/cir/cir.hpp" +#include "codon/cir/util/cloning.hpp" #include "gtest/gtest.h" class CIRCoreTest : public testing::Test { diff --git a/test/cir/transform/manager.cpp b/test/cir/transform/manager.cpp index 34276098..9ee1bccd 100644 --- a/test/cir/transform/manager.cpp +++ b/test/cir/transform/manager.cpp @@ -1,7 +1,7 @@ #include "test.h" #include "codon/cir/transform/manager.h" -#include "codon/cir/transform/pass.h" +#include "codon/cir/transform/pass.hpp" using namespace codon::ir; diff --git a/test/cir/util/matching.cpp b/test/cir/util/matching.cpp index fdc036e0..6486b80c 100644 --- a/test/cir/util/matching.cpp +++ b/test/cir/util/matching.cpp @@ -1,6 +1,6 @@ #include "test.h" -#include "codon/cir/util/matching.h" +#include "codon/cir/util/matching.hpp" using namespace codon::ir; diff --git a/test/main.cpp b/test/main.cpp index 83095e03..e6df5632 100644 --- a/test/main.cpp +++ b/test/main.cpp @@ -15,13 +15,13 @@ #include #include -#include "codon/cir/analyze/dataflow/capture.h" -#include "codon/cir/analyze/dataflow/reaching.h" -#include "codon/cir/util/inlining.h" -#include "codon/cir/util/irtools.h" -#include "codon/cir/util/operator.h" -#include "codon/cir/util/outlining.h" -#include "codon/compiler/compiler.h" +#include "codon/cir/analyze/dataflow/capture.hpp" +#include "codon/cir/analyze/dataflow/reaching.hpp" +#include "codon/cir/util/inlining.hpp" +#include "codon/cir/util/irtools.hpp" +#include "codon/cir/util/operator.hpp" +#include "codon/cir/util/outlining.hpp" +#include "codon/compiler/compiler.hpp" #include "codon/compiler/error.hpp" #include "codon/parser/common.hpp" #include "codon/util/common.hpp"