Skip to content

Commit

Permalink
bootstrap: Update stage0 snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
alimpfard committed Apr 30, 2023
1 parent 9fec39c commit 8db94af
Show file tree
Hide file tree
Showing 72 changed files with 26,695 additions and 10,566 deletions.
1 change: 1 addition & 0 deletions bootstrap/stage0/__prelude___specializations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "jakt__platform.h"
#include "jakt__arguments.h"
#include "jakt__prelude__prelude.h"
#include "jakt__prelude__operators.h"
#include "jakt__prelude__string.h"
#include "jakt__prelude__iteration.h"
namespace Jakt {
Expand Down
83 changes: 55 additions & 28 deletions bootstrap/stage0/__unified_forward.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ namespace jakt__prelude__iteration {
}
namespace jakt__prelude__string {
}
namespace jakt__prelude__operators {
enum class Ordering: u8;
}
namespace jakt__prelude__prelude {
}
namespace jakt__arguments {
Expand Down Expand Up @@ -309,11 +312,11 @@ struct ValueEnumVariant;
struct ParsedRecord;
struct ParsedAttribute;
struct ParsedBlock;
namespace ImportName_Details {
struct Literal;
struct Comptime;
namespace ExternalName_Details {
struct Plain;
struct Operator;
}
struct ImportName;
struct ExternalName;

namespace ParsedMatchPattern_Details {
struct EnumVariant;
Expand All @@ -323,6 +326,12 @@ struct Invalid;
}
struct ParsedMatchPattern;

namespace ImportName_Details {
struct Literal;
struct Comptime;
}
struct ImportName;

namespace Visibility_Details {
struct Public;
struct Private;
Expand Down Expand Up @@ -369,6 +378,13 @@ struct Empty;
}
struct ParsedType;

namespace ParsedTraitRequirements_Details {
struct Nothing;
struct Methods;
struct ComptimeExpression;
}
struct ParsedTraitRequirements;

namespace TypeCast_Details {
struct Fallible;
struct Infallible;
Expand Down Expand Up @@ -556,39 +572,42 @@ f32 f64_to_f32(f64 const number);

}
namespace types {
class FunctionGenerics;
struct StructId;
struct CheckedStringLiteral;
struct CheckedNamespace;
class Module;
struct GenericInferences;
class CheckedFunction;
struct ScopeId;
struct LoadedModule;
class CheckedVariable;
class CheckedTrait;
struct Value;
class TypecheckFunctions;
class CheckedProgram;
struct FunctionGenericParameter;
struct ResolvedNamespace;
class TypecheckFunctions;
struct CheckedStruct;
struct CheckedParameter;
struct VarId;
struct FieldRecord;
struct ScopeId;
struct CheckedCall;
struct CheckedVarDecl;
struct FunctionGenericParameter;
struct CheckedNamespace;
struct CheckedField;
struct CheckedGenericParameter;
struct CheckedBlock;
struct OperatorTraitImplementation;
struct LoadedModule;
struct ResolvedForallChunk;
class Scope;
struct TypeId;
struct FieldRecord;
struct CheckedVarDecl;
struct FunctionId;
struct CheckedEnum;
struct CheckedBlock;
struct CheckedStruct;
struct CheckedField;
struct CheckedParameter;
struct TraitId;
struct FunctionId;
class Module;
struct VarId;
struct CheckedBinaryOperator;
struct StructId;
struct Value;
struct ModuleId;
struct EnumId;
class CheckedFunction;
class FunctionGenerics;
struct CheckedGenericParameter;
struct CheckedEnumVariantBinding;
class CheckedTrait;
struct CheckedStringLiteral;
class CheckedVariable;
struct TypeId;
struct EnumId;
namespace CheckedUnaryOperator_Details {
struct PreIncrement;
struct PostIncrement;
Expand Down Expand Up @@ -876,6 +895,13 @@ struct Never;
}
struct BuiltinType;

namespace CheckedTraitRequirements_Details {
struct Nothing;
struct Methods;
struct ComptimeExpression;
}
struct CheckedTraitRequirements;

types::TypeId builtin(types::BuiltinType const builtin);

types::TypeId void_type_id();
Expand Down Expand Up @@ -925,6 +951,7 @@ ErrorOr<DeprecatedString> comptime_format_impl(DeprecatedString const format_str

}
namespace typechecker {
template <typename K,typename V>struct InternalDictionaryProduct;
struct TraitImplementationDescriptor;
struct TraitImplCheck;
struct AlreadyImplementedFor;
Expand Down
20 changes: 15 additions & 5 deletions bootstrap/stage0/build.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ 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))){
if ((((((((((*this).pool)).status(id)).value())).exit_code)) != (static_cast<i32>(0)))){
warnln((StringView::from_string_literal("Error: Linking failed"sv)));
return Error::from_errno(static_cast<i32>(1));
}
Expand Down Expand Up @@ -77,7 +77,7 @@ TRY((((args).push(file))));

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))){
if ((((((((((*this).pool)).status(id)).value())).exit_code)) != (static_cast<i32>(0)))){
warnln((StringView::from_string_literal("Error: Linking failed"sv)));
return Error::from_errno(static_cast<i32>(1));
}
Expand Down Expand Up @@ -112,7 +112,7 @@ JaktInternal::Tuple<size_t,jakt__platform__unknown_process::ExitPollResult> cons
size_t const id = ((jakt__id__exit_result__).template get<0>());
jakt__platform__unknown_process::ExitPollResult const exit_result = ((jakt__id__exit_result__).template get<1>());

if ((((exit_result).exit_code) != static_cast<i32>(0))){
if (((((exit_result).exit_code)) != (static_cast<i32>(0)))){
warnln((StringView::from_string_literal("Error: Compilation failed"sv)));
TRY((((((*this).pool)).kill_all())));
return Error::from_errno(static_cast<i32>(1));
Expand Down Expand Up @@ -146,7 +146,7 @@ JaktInternal::Tuple<size_t,jakt__platform__unknown_process::ExitPollResult> cons
size_t const id = ((jakt__id__exit_result__).template get<0>());
jakt__platform__unknown_process::ExitPollResult const exit_result = ((jakt__id__exit_result__).template get<1>());

if ((((exit_result).exit_code) != static_cast<i32>(0))){
if (((((exit_result).exit_code)) != (static_cast<i32>(0)))){
warnln((StringView::from_string_literal("Error: Compilation failed"sv)));
return Error::from_errno(static_cast<i32>(1));
}
Expand Down Expand Up @@ -251,7 +251,17 @@ return {};

ErrorOr<size_t> build::ParallelExecutionPool::run(JaktInternal::DynamicArray<DeprecatedString> const args) {
{
if ((((((*this).pids)).size()) >= ((*this).max_concurrent))){
if ([](size_t const& self, size_t rhs) -> bool {
{
return (((infallible_integer_cast<u8>(([](size_t const& self, size_t rhs) -> jakt__prelude__operators::Ordering {
{
return (infallible_enum_cast<jakt__prelude__operators::Ordering>((JaktInternal::compare(self,rhs))));
}
}
(self,rhs))))) != (static_cast<u8>(0)));
}
}
(((((*this).pids)).size()),((*this).max_concurrent))){
TRY((((*this).wait_for_any_job_to_complete())));
}
jakt__platform__unknown_process::Process const process = TRY((jakt__platform__unknown_process::start_background_process(args)));
Expand Down
1 change: 1 addition & 0 deletions bootstrap/stage0/build_specializations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "jakt__platform.h"
#include "jakt__arguments.h"
#include "jakt__prelude__prelude.h"
#include "jakt__prelude__operators.h"
#include "jakt__prelude__string.h"
#include "jakt__prelude__iteration.h"
namespace Jakt {
Expand Down
Loading

0 comments on commit 8db94af

Please sign in to comment.