From 8499901a200ec0a5b9cb952c50cdddc42cbad2a9 Mon Sep 17 00:00:00 2001 From: Jianling Zhong Date: Mon, 21 Oct 2024 12:39:05 -0700 Subject: [PATCH] Fix format --- .../include/cpp/jank/runtime/behavior/comparable.hpp | 4 ++-- .../include/cpp/jank/runtime/core/make_box.hpp | 1 + compiler+runtime/src/cpp/jank/analyze/processor.cpp | 9 +++------ 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/compiler+runtime/include/cpp/jank/runtime/behavior/comparable.hpp b/compiler+runtime/include/cpp/jank/runtime/behavior/comparable.hpp index 7254ecda..659796dc 100644 --- a/compiler+runtime/include/cpp/jank/runtime/behavior/comparable.hpp +++ b/compiler+runtime/include/cpp/jank/runtime/behavior/comparable.hpp @@ -4,7 +4,7 @@ namespace jank::runtime::behavior { template 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: * @@ -14,6 +14,6 @@ namespace jank::runtime::behavior * * For sequences, all values need to be considered for comparison. */ - { t->compare(std::declval()) } -> std::convertible_to; + { t->compare(std::declval()) } -> std::convertible_to; }; } diff --git a/compiler+runtime/include/cpp/jank/runtime/core/make_box.hpp b/compiler+runtime/include/cpp/jank/runtime/core/make_box.hpp index dc9deb3b..8a4217dd 100644 --- a/compiler+runtime/include/cpp/jank/runtime/core/make_box.hpp +++ b/compiler+runtime/include/cpp/jank/runtime/core/make_box.hpp @@ -35,6 +35,7 @@ namespace jank::runtime { return make_box(static_cast(i)); } + [[gnu::always_inline, gnu::flatten, gnu::hot]] inline auto make_box(native_integer const i) { diff --git a/compiler+runtime/src/cpp/jank/analyze/processor.cpp b/compiler+runtime/src/cpp/jank/analyze/processor.cpp index 339b6233..c8972694 100644 --- a/compiler+runtime/src/cpp/jank/analyze/processor.cpp +++ b/compiler+runtime/src/cpp/jank/analyze/processor.cpp @@ -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(); @@ -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; @@ -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;