Skip to content

Commit

Permalink
Fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
jianlingzhong committed Oct 22, 2024
1 parent d4cb335 commit bf46ffd
Show file tree
Hide file tree
Showing 4 changed files with 745 additions and 748 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace jank::runtime::behavior
{
template <typename T>
concept comparable = requires(T * const t) {
/* Returns how this object compares to the specified object. Comparison, unlike equality,
/* Returns how this object compares to the specified object. Comparison, unlike equality,
* can only be done for objects of the same type. If there's a type mismatch, this function
* is expected to throw. There are three cases to handle:
*
Expand All @@ -14,6 +14,6 @@ namespace jank::runtime::behavior
*
* For sequences, all values need to be considered for comparison.
*/
{ t->compare(std::declval<object const &>()) } -> std::convertible_to<native_integer>;
{ t->compare(std::declval<object const &>()) } -> std::convertible_to<native_integer>;
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ namespace jank::runtime
{
return make_box<runtime::obj::integer>(static_cast<native_integer>(i));
}

[[gnu::always_inline, gnu::flatten, gnu::hot]]
inline auto make_box(native_integer const i)
{
Expand Down
9 changes: 3 additions & 6 deletions compiler+runtime/src/cpp/jank/analyze/processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -837,8 +837,7 @@ namespace jank::analyze
}

auto const condition(o->data.rest().first().unwrap());
auto condition_expr(
analyze(condition, current_frame, expression_type::nested, fn_ctx, false));
auto condition_expr(analyze(condition, current_frame, expression_type::nested, fn_ctx, false));
if(condition_expr.is_err())
{
return condition_expr.expect_err_move();
Expand Down Expand Up @@ -1402,8 +1401,7 @@ namespace jank::analyze
return found_special->second(o, current_frame, expr_type, fn_ctx, needs_box);
}

auto sym_result(
analyze_symbol(sym, current_frame, expression_type::nested, fn_ctx, true));
auto sym_result(analyze_symbol(sym, current_frame, expression_type::nested, fn_ctx, true));
if(sym_result.is_err())
{
return sym_result;
Expand Down Expand Up @@ -1466,8 +1464,7 @@ namespace jank::analyze
}
else
{
auto callable_expr(
analyze(first, current_frame, expression_type::nested, fn_ctx, needs_box));
auto callable_expr(analyze(first, current_frame, expression_type::nested, fn_ctx, needs_box));
if(callable_expr.is_err())
{
return callable_expr;
Expand Down
Loading

0 comments on commit bf46ffd

Please sign in to comment.