Skip to content

Commit 6803917

Browse files
committed
Minor bug fixes for debug build
1 parent 4a27944 commit 6803917

File tree

5 files changed

+24
-6
lines changed

5 files changed

+24
-6
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Whether to include support for built-in adept package manager
44
# NOTE: Requires libcurl fields to be filled out
55
# NOTE: Default is 'true'
6-
ENABLE_ADEPT_PACKAGE_MANAGER=true
6+
ENABLE_ADEPT_PACKAGE_MANAGER=false
77

88
# --------------------------- Change These Values ---------------------------
99
# NOTE: For Windows, ensure mingw32-make.exe uses cmd.exe for shell

include/IRGEN/ir_gen_expr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ errorcode_t ir_gen_expr_call_procedure_fill_in_default_arguments(ir_builder_t *b
108108
length_t provided_arity, ast_expr_t **target_defaults, length_t target_arity, source_t source_on_failure);
109109

110110
// Calls the pass management function on arguments for 'CALL'/'CALL METHOD' expression
111-
errorcode_t ir_gen_expr_call_procedure_handle_pass_management(ir_builder_t *builder, length_t arity, ir_value_t **arg_values, ast_type_t *arg_types,
111+
errorcode_t ir_gen_expr_call_procedure_handle_pass_management(ir_builder_t *builder, length_t arity, ir_value_t **arg_values, ast_type_t *final_arg_types,
112112
trait_t target_traits, trait_t *target_arg_type_traits, length_t arity_without_variadic_arguments);
113113

114114
// Packs variadic arguments into single variadic array argument for 'CALL'/'CALL METHOD' expression if required

src/AST/ast_expr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ static strong_cstr_t ast_expr_values_to_str(ast_expr_t **arg_values, length_t ar
151151
}
152152

153153
// We also need one character for '\0', and also max(0, arity - 1) ','s
154-
result_buffer_size += 1 + (arity <= 1 ? 0 : arity - 1);
154+
result_buffer_size += 1 + (arity <= 1 ? 0 : 2 * (arity - 1));
155155

156156
// Now that we now the required capacity,
157157
// Allocate buffer to store resulting string representation of value list

src/IRGEN/ir_gen_expr.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,7 @@ errorcode_t ir_gen_expr_call_procedure_fill_in_default_arguments(ir_builder_t *b
745745
return SUCCESS;
746746
}
747747

748-
errorcode_t ir_gen_expr_call_procedure_handle_pass_management(ir_builder_t *builder, length_t arity, ir_value_t **arg_values, ast_type_t *arg_types,
748+
errorcode_t ir_gen_expr_call_procedure_handle_pass_management(ir_builder_t *builder, length_t arity, ir_value_t **arg_values, ast_type_t *final_arg_types,
749749
trait_t target_traits, trait_t *target_arg_type_traits, length_t arity_without_variadic_arguments){
750750

751751
// Handle __pass__ calls for argument values being passed
@@ -762,10 +762,10 @@ errorcode_t ir_gen_expr_call_procedure_handle_pass_management(ir_builder_t *buil
762762
memset(&padded_type_traits[arity_without_variadic_arguments], TRAIT_NONE, sizeof(trait_t) * extra_argument_count);
763763

764764
// Use padded argument traits for functions with variable arity
765-
if(handle_pass_management(builder, arg_values, arg_types, padded_type_traits, arity)) return FAILURE;
765+
if(handle_pass_management(builder, arg_values, final_arg_types, padded_type_traits, arity)) return FAILURE;
766766
} else {
767767
// Otherwise no padding is required,
768-
if(handle_pass_management(builder, arg_values, arg_types, target_arg_type_traits, arity)) return FAILURE;
768+
if(handle_pass_management(builder, arg_values, final_arg_types, target_arg_type_traits, arity)) return FAILURE;
769769
}
770770

771771
// Successfully called __pass__ for the arguments that needed it

todolists/2.5.todolist

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,27 @@ MEDIUM-PRIORITY:
1313
normals /* b2_maxPolygonVertices */ 8 b2Vec2,
1414
count int
1515
)
16+
17+
18+
struct Whatever (
19+
vertices #(b2_maxPolygonVertices) b2Vec2,
20+
normals #(b2_maxPolygonVertices) b2Vec2,
21+
count int,
22+
max_capacity #get max_capacity b2Vec2
23+
)
1624
```
1725
* negate '-' operator
1826
* 'each-in' loops with custom 'idx' name
27+
```
28+
each object Object in objects using object_idx {
29+
30+
}
31+
```
1932
* 'break default' to break to default condition of switch statement
2033
* nodiscard
34+
* __return__ and return POD
35+
* records
36+
* easy and consistent constructors
2137

2238
LOW-PRIORITY:
2339
* Finish 'Any'
@@ -32,6 +48,8 @@ LOW-PRIORITY:
3248
* Unconditional blocks (like: if true {}, except with 'if true' part)
3349
* Specify default value arguments by name (e.g - captLoadTexturesByFieldName(this, assetsFolder: where(), approximateByDefault: true) )
3450
* 'adept install https://github.com/IsaacShelton/Box2D'
51+
* conditionless blocks
52+
* match/when statement or something like that
3553

3654
v2.5 COMPLETED:
3755
+ anonymous structures and unions

0 commit comments

Comments
 (0)