Skip to content

Commit

Permalink
Minor bug fixes for debug build
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaacShelton committed Oct 18, 2021
1 parent 4a27944 commit 6803917
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Whether to include support for built-in adept package manager
# NOTE: Requires libcurl fields to be filled out
# NOTE: Default is 'true'
ENABLE_ADEPT_PACKAGE_MANAGER=true
ENABLE_ADEPT_PACKAGE_MANAGER=false

# --------------------------- Change These Values ---------------------------
# NOTE: For Windows, ensure mingw32-make.exe uses cmd.exe for shell
Expand Down
2 changes: 1 addition & 1 deletion include/IRGEN/ir_gen_expr.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ errorcode_t ir_gen_expr_call_procedure_fill_in_default_arguments(ir_builder_t *b
length_t provided_arity, ast_expr_t **target_defaults, length_t target_arity, source_t source_on_failure);

// Calls the pass management function on arguments for 'CALL'/'CALL METHOD' expression
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,
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,
trait_t target_traits, trait_t *target_arg_type_traits, length_t arity_without_variadic_arguments);

// Packs variadic arguments into single variadic array argument for 'CALL'/'CALL METHOD' expression if required
Expand Down
2 changes: 1 addition & 1 deletion src/AST/ast_expr.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ static strong_cstr_t ast_expr_values_to_str(ast_expr_t **arg_values, length_t ar
}

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

// Now that we now the required capacity,
// Allocate buffer to store resulting string representation of value list
Expand Down
6 changes: 3 additions & 3 deletions src/IRGEN/ir_gen_expr.c
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ errorcode_t ir_gen_expr_call_procedure_fill_in_default_arguments(ir_builder_t *b
return SUCCESS;
}

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,
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,
trait_t target_traits, trait_t *target_arg_type_traits, length_t arity_without_variadic_arguments){

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

// Use padded argument traits for functions with variable arity
if(handle_pass_management(builder, arg_values, arg_types, padded_type_traits, arity)) return FAILURE;
if(handle_pass_management(builder, arg_values, final_arg_types, padded_type_traits, arity)) return FAILURE;
} else {
// Otherwise no padding is required,
if(handle_pass_management(builder, arg_values, arg_types, target_arg_type_traits, arity)) return FAILURE;
if(handle_pass_management(builder, arg_values, final_arg_types, target_arg_type_traits, arity)) return FAILURE;
}

// Successfully called __pass__ for the arguments that needed it
Expand Down
18 changes: 18 additions & 0 deletions todolists/2.5.todolist
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,27 @@ MEDIUM-PRIORITY:
normals /* b2_maxPolygonVertices */ 8 b2Vec2,
count int
)


struct Whatever (
vertices #(b2_maxPolygonVertices) b2Vec2,
normals #(b2_maxPolygonVertices) b2Vec2,
count int,
max_capacity #get max_capacity b2Vec2
)
```
* negate '-' operator
* 'each-in' loops with custom 'idx' name
```
each object Object in objects using object_idx {

}
```
* 'break default' to break to default condition of switch statement
* nodiscard
* __return__ and return POD
* records
* easy and consistent constructors

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

v2.5 COMPLETED:
+ anonymous structures and unions
Expand Down

0 comments on commit 6803917

Please sign in to comment.