Skip to content

Commit

Permalink
Compiler code cleanup: simplify array of strings (#715)
Browse files Browse the repository at this point in the history
  • Loading branch information
Akuli authored Jan 28, 2025
1 parent 2b33658 commit 4bb8e34
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
1 change: 1 addition & 0 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ commits=(
b339b1b300ba98a2245b493a58dd7fab4c465020 # "match ... with ..." syntax
874d1978044a080173fcdcc4e92736136c97dd61 # "match some_integer:" support
8a0bb4b50ef77932243f4f65ae90be84e763ec45 # evaluating "if WINDOWS:" and such inside functions
2b33658b17239c68c84b034c33c2a7c145da43dd # bidirectional type inference for arrays of strings
)

for commit in ${commits[@]}; do
Expand Down
7 changes: 1 addition & 6 deletions compiler/builders/ast_to_builder.jou
Original file line number Diff line number Diff line change
Expand Up @@ -497,12 +497,7 @@ class AstToBuilder:

self->builder->set_current_block(error_block)

# TODO: https://github.com/Akuli/jou/issues/683
argnames: byte[100][3]
strcpy(argnames[0], "assertion")
strcpy(argnames[1], "path")
strcpy(argnames[2], "lineno")

argnames: byte[100][3] = ["assertion", "path", "lineno"]
argtypes: Type*[3] = [byteType->pointer_type(), byteType->pointer_type(), intType]
sig = Signature{
name = "_jou_assert_fail",
Expand Down

0 comments on commit 4bb8e34

Please sign in to comment.