Skip to content

Commit

Permalink
bootstrap: Update stage0 snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
awesomekling committed Feb 18, 2023
1 parent ba0c036 commit 6124409
Show file tree
Hide file tree
Showing 46 changed files with 42,321 additions and 42,335 deletions.
662 changes: 331 additions & 331 deletions bootstrap/stage0/__unified_forward.h

Large diffs are not rendered by default.

50 changes: 25 additions & 25 deletions bootstrap/stage0/build.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ TRY(JaktInternal::PrettyPrint::output_indentation(builder));TRY(builder.appendff
TRY(JaktInternal::PrettyPrint::output_indentation(builder));TRY(builder.appendff("pool: {}", pool));
}
TRY(builder.append(")"sv));return builder.to_string(); }
ErrorOr<void> build::Builder::link_into_archive(DeprecatedString const archiver,DeprecatedString const archive_filename) {
ErrorOr<void> build::Builder::link_into_executable(DeprecatedString const cxx_compiler_path,DeprecatedString const output_filename,JaktInternal::DynamicArray<DeprecatedString> const extra_arguments) {
{
JaktInternal::DynamicArray<DeprecatedString> args = (TRY((DynamicArray<DeprecatedString>::create_with({archiver, Jakt::DeprecatedString("cr"sv), archive_filename}))));
JaktInternal::DynamicArray<DeprecatedString> args = (TRY((DynamicArray<DeprecatedString>::create_with({cxx_compiler_path, Jakt::DeprecatedString("-o"sv), output_filename}))));
{
JaktInternal::ArrayIterator<DeprecatedString> _magic = ((((*this).linked_files)).iterator());
for (;;){
Expand All @@ -26,6 +26,21 @@ TRY((((args).push(file))));
}
}

{
JaktInternal::ArrayIterator<DeprecatedString> _magic = ((extra_arguments).iterator());
for (;;){
JaktInternal::Optional<DeprecatedString> const _magic_value = ((_magic).next());
if ((!(((_magic_value).has_value())))){
break;
}
DeprecatedString arg = (_magic_value.value());
{
TRY((((args).push(arg))));
}

}
}

size_t const id = TRY((((((*this).pool)).run(args))));
TRY((((((*this).pool)).wait_for_all_jobs_to_complete())));
if (((((((((*this).pool)).status(id)).value())).exit_code) != static_cast<i32>(0))){
Expand All @@ -36,11 +51,15 @@ return Error::from_errno(static_cast<i32>(1));
return {};
}

build::Builder::Builder(JaktInternal::DynamicArray<DeprecatedString> a_linked_files, JaktInternal::DynamicArray<DeprecatedString> a_files_to_compile, build::ParallelExecutionPool a_pool) :linked_files(move(a_linked_files)), files_to_compile(move(a_files_to_compile)), pool(move(a_pool)){}
ErrorOr<build::Builder> build::Builder::for_building(JaktInternal::DynamicArray<DeprecatedString> const files,size_t const max_concurrent) {
{
return (build::Builder((TRY((DynamicArray<DeprecatedString>::create_with({})))),files,TRY((build::ParallelExecutionPool::create(max_concurrent)))));
}
}

ErrorOr<void> build::Builder::link_into_executable(DeprecatedString const cxx_compiler_path,DeprecatedString const output_filename,JaktInternal::DynamicArray<DeprecatedString> const extra_arguments) {
ErrorOr<void> build::Builder::link_into_archive(DeprecatedString const archiver,DeprecatedString const archive_filename) {
{
JaktInternal::DynamicArray<DeprecatedString> args = (TRY((DynamicArray<DeprecatedString>::create_with({cxx_compiler_path, Jakt::DeprecatedString("-o"sv), output_filename}))));
JaktInternal::DynamicArray<DeprecatedString> args = (TRY((DynamicArray<DeprecatedString>::create_with({archiver, Jakt::DeprecatedString("cr"sv), archive_filename}))));
{
JaktInternal::ArrayIterator<DeprecatedString> _magic = ((((*this).linked_files)).iterator());
for (;;){
Expand All @@ -56,21 +75,6 @@ TRY((((args).push(file))));
}
}

{
JaktInternal::ArrayIterator<DeprecatedString> _magic = ((extra_arguments).iterator());
for (;;){
JaktInternal::Optional<DeprecatedString> const _magic_value = ((_magic).next());
if ((!(((_magic_value).has_value())))){
break;
}
DeprecatedString arg = (_magic_value.value());
{
TRY((((args).push(arg))));
}

}
}

size_t const id = TRY((((((*this).pool)).run(args))));
TRY((((((*this).pool)).wait_for_all_jobs_to_complete())));
if (((((((((*this).pool)).status(id)).value())).exit_code) != static_cast<i32>(0))){
Expand All @@ -81,11 +85,7 @@ return Error::from_errno(static_cast<i32>(1));
return {};
}

ErrorOr<build::Builder> build::Builder::for_building(JaktInternal::DynamicArray<DeprecatedString> const files,size_t const max_concurrent) {
{
return (build::Builder((TRY((DynamicArray<DeprecatedString>::create_with({})))),files,TRY((build::ParallelExecutionPool::create(max_concurrent)))));
}
}
build::Builder::Builder(JaktInternal::DynamicArray<DeprecatedString> a_linked_files, JaktInternal::DynamicArray<DeprecatedString> a_files_to_compile, build::ParallelExecutionPool a_pool) :linked_files(move(a_linked_files)), files_to_compile(move(a_files_to_compile)), pool(move(a_pool)){}

ErrorOr<void> build::Builder::build_all(jakt__path::Path const binary_dir,Function<ErrorOr<JaktInternal::DynamicArray<DeprecatedString>>(DeprecatedString, DeprecatedString)> const& compiler_invocation) {
{
Expand Down
6 changes: 3 additions & 3 deletions bootstrap/stage0/build.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ ErrorOr<void> wait_for_all_jobs_to_complete();
ErrorOr<DeprecatedString> debug_description() const;
};struct Builder {
public:
JaktInternal::DynamicArray<DeprecatedString> linked_files;JaktInternal::DynamicArray<DeprecatedString> files_to_compile;build::ParallelExecutionPool pool;ErrorOr<void> link_into_archive(DeprecatedString const archiver, DeprecatedString const archive_filename);
JaktInternal::DynamicArray<DeprecatedString> linked_files;JaktInternal::DynamicArray<DeprecatedString> files_to_compile;build::ParallelExecutionPool pool;ErrorOr<void> link_into_executable(DeprecatedString const cxx_compiler_path, DeprecatedString const output_filename, JaktInternal::DynamicArray<DeprecatedString> const extra_arguments);
static ErrorOr<build::Builder> for_building(JaktInternal::DynamicArray<DeprecatedString> const files, size_t const max_concurrent);
ErrorOr<void> link_into_archive(DeprecatedString const archiver, DeprecatedString const archive_filename);
Builder(JaktInternal::DynamicArray<DeprecatedString> a_linked_files, JaktInternal::DynamicArray<DeprecatedString> a_files_to_compile, build::ParallelExecutionPool a_pool);

ErrorOr<void> link_into_executable(DeprecatedString const cxx_compiler_path, DeprecatedString const output_filename, JaktInternal::DynamicArray<DeprecatedString> const extra_arguments);
static ErrorOr<build::Builder> for_building(JaktInternal::DynamicArray<DeprecatedString> const files, size_t const max_concurrent);
ErrorOr<void> build_all(jakt__path::Path const binary_dir, Function<ErrorOr<JaktInternal::DynamicArray<DeprecatedString>>(DeprecatedString, DeprecatedString)> const& compiler_invocation);
ErrorOr<DeprecatedString> debug_description() const;
};}
Expand Down
Loading

0 comments on commit 6124409

Please sign in to comment.