Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/parse once #185

Merged
merged 57 commits into from
Mar 27, 2023
Merged
Changes from 1 commit
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
de079ec
clean up that we actually parse everything only once
leissa Mar 8, 2023
4b22d89
clang-format
leissa Mar 8, 2023
09e20ae
Merge branch 'master' into bugfix/parse_once
leissa Mar 9, 2023
93996cd
using stack of lexers for imports
leissa Mar 9, 2023
e4a9560
clang-format
leissa Mar 9, 2023
4650e83
only output in Bootstrapper if from main input
leissa Mar 9, 2023
e35e4b0
bug fixes
leissa Mar 9, 2023
f308a33
clang-format
leissa Mar 9, 2023
2ca5d63
doxygen fix
leissa Mar 9, 2023
2bb57a8
polish
leissa Mar 10, 2023
88983bc
clang-format
leissa Mar 10, 2023
8ece6c9
Merge branch 'refactor/driver' into bugfix/parse_once
leissa Mar 10, 2023
dd97647
Merge branch 'refactor/driver' into bugfix/parse_once
leissa Mar 13, 2023
8bbee84
Merge branch 'refactor/driver' into bugfix/parse_once
leissa Mar 15, 2023
215e809
Merge branch 'master' into bugfix/parse_once
leissa Mar 16, 2023
9f1fc61
consitently use fs::path when sth is a file
leissa Mar 16, 2023
3371ac2
Merge branch 'refactor/fs' into bugfix/parse_once
leissa Mar 16, 2023
952e484
cleanup
leissa Mar 16, 2023
9cf2229
wip: sort Bootstrapper::axioms by dialect
leissa Mar 17, 2023
7474024
first working version
leissa Mar 18, 2023
f9a250d
clang-format
leissa Mar 18, 2023
f22f8e7
fixed test cases
leissa Mar 20, 2023
aabc163
clang-format
leissa Mar 20, 2023
8d4bbe9
simplified bootstrap
leissa Mar 20, 2023
570af99
fixed various issues regarging search paths
leissa Mar 20, 2023
32180f6
print: check if operator<<(std::ostream&, T) is available
leissa Mar 20, 2023
5600ac4
clang-format
leissa Mar 20, 2023
aef7304
hopefully these compile fixes make CI happy
leissa Mar 20, 2023
fd8fd24
fighting path madness
leissa Mar 20, 2023
5b11281
clang-format
leissa Mar 20, 2023
ced5820
cli/main: only import opt if not bootstrapping
leissa Mar 20, 2023
805c8df
make use of assert_emplace
leissa Mar 20, 2023
4a71829
clang-format
leissa Mar 20, 2023
71af3c9
make use of lookup
leissa Mar 20, 2023
b5b0a15
clang-format
leissa Mar 20, 2023
066d274
fighting path madness
leissa Mar 21, 2023
c37f836
refactoring:
leissa Mar 22, 2023
66a91fd
compile fix
leissa Mar 22, 2023
4672633
compile fix
leissa Mar 22, 2023
e864999
docs + small refactoring
leissa Mar 22, 2023
236515c
directly load plugin from thorin file
leissa Mar 22, 2023
152f3fb
fix test case for now
leissa Mar 22, 2023
e322a15
clang-format
leissa Mar 22, 2023
0b7b0f8
better infer that can cope with test case
leissa Mar 22, 2023
dad2b9d
clang-format
leissa Mar 22, 2023
1fc2cb6
make msvc happy
leissa Mar 22, 2023
a8ecf39
clang-format
leissa Mar 22, 2023
69a498f
docs
leissa Mar 23, 2023
9bf6ee2
clang-format
leissa Mar 23, 2023
9b8595b
better capsulation
leissa Mar 23, 2023
577a1d8
compile fix
leissa Mar 23, 2023
8b3b4ca
only load `.plugin XXX` if not in bootstrap mode
leissa Mar 23, 2023
f4ae20d
docs
leissa Mar 23, 2023
6e9a6f3
renaming
leissa Mar 23, 2023
0e82b48
cleanup
leissa Mar 23, 2023
8f3d0c4
cleanup
leissa Mar 23, 2023
c255aac
distinguish between plugin/import in output
leissa Mar 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
distinguish between plugin/import in output
There was also a bug that the name was replaced.
leissa committed Mar 27, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit c255aace5e7a64ea5c5cc5f8f7aadd342d2fdaef
3 changes: 2 additions & 1 deletion thorin/dump.cpp
Original file line number Diff line number Diff line change
@@ -382,7 +382,8 @@ void World::dump(std::ostream& os) {
auto dep = DepTree(*this);
auto dumper = Dumper(os, &dep);

for (auto [_, name] : driver().imports()) print(os, ".import {};\n", name);
for (auto [_, name] : driver().imports())
print(os, ".{} {};\n", driver().is_loaded(name) ? "plugin" : "import", name);
dumper.recurse(dep.root());
}

3 changes: 2 additions & 1 deletion thorin/fe/parser.cpp
Original file line number Diff line number Diff line change
@@ -80,7 +80,8 @@ void Parser::parse_module() {

void Parser::import(fs::path name, std::ostream* md) {
world().VLOG("import: {}", name);
auto filename = name.replace_extension("thorin"); // TODO error cases
auto filename = name;
filename.replace_extension("thorin"); // TODO error cases

fs::path rel_path;
for (const auto& path : driver().search_paths()) {