Repository navigation
Patch v0.12.2 - #3177
Merged
Merged
Patch v0.12.2#3177
Conversation
| for (int i = 0; i < reference_function_signature->parameter_count; i++) { | ||
| if (i > 0) position += snprintf(signature_text + position, sizeof(signature_text) - position, ","); | ||
| position += snprintf(signature_text + position, sizeof(signature_text) - position, "%s", type_name(reference_function_signature->parameter_types[i])); | ||
| if (i > 0) position += (size_t)snprintf(signature_text + position, signature_length - position, ","); |
| if (i > 0) position += snprintf(signature_text + position, sizeof(signature_text) - position, ","); | ||
| position += snprintf(signature_text + position, sizeof(signature_text) - position, "%s", type_name(reference_function_signature->parameter_types[i])); | ||
| if (i > 0) position += (size_t)snprintf(signature_text + position, signature_length - position, ","); | ||
| position += (size_t)snprintf(signature_text + position, signature_length - position, "%s", type_name(reference_function_signature->parameter_types[i])); |
| for (int j = 0; j < type_name_deep_copy_depth; j++) { | ||
| if (strcmp(type_name_deep_copy_visiting[j], gray_type_name) == 0) return false; | ||
| } | ||
| if (type_name_deep_copy_depth < CYCLE_GUARD_DEPTH) type_name_deep_copy_visiting[type_name_deep_copy_depth++] = gray_type_name; |
Comment on lines
+10741
to
+10747
| return left->kind != TYPE_KIND_UNKNOWN && right->kind != TYPE_KIND_UNKNOWN && | ||
| left->kind != right->kind && left->kind != TYPE_KIND_NIL && right->kind != TYPE_KIND_NIL && | ||
| !(is_integer_kind(left->kind) && is_integer_kind(right->kind)) && | ||
| !(left->kind == TYPE_KIND_STRUCT && is_integer_kind(right->kind)) && | ||
| !(is_integer_kind(left->kind) && right->kind == TYPE_KIND_STRUCT) && | ||
| !(left->kind == TYPE_KIND_ENUM && is_integer_kind(right->kind)) && | ||
| !(is_integer_kind(left->kind) && right->kind == TYPE_KIND_ENUM); |
Comment on lines
+11603
to
+11618
| return value_type->kind != TYPE_KIND_UNKNOWN && | ||
| expected_type->kind != TYPE_KIND_UNKNOWN && | ||
| (!types_assignable(checker, expected_type, value_type) || | ||
| (expected_type->kind == TYPE_KIND_POINTER && | ||
| expected_type->name && value_type->name && | ||
| strcmp(expected_type->name, value_type->name) != 0) || | ||
| (expected_type->kind == TYPE_KIND_STRUCT && value_type->kind == TYPE_KIND_STRUCT && | ||
| expected_type->name && value_type->name && | ||
| !typechecker_same_struct_type(checker, expected_type->name, value_type->name)) || | ||
| (expected_type->kind == TYPE_KIND_ENUM && value_type->kind == TYPE_KIND_ENUM && | ||
| expected_type->name && value_type->name && | ||
| !typechecker_same_enum_type(checker, expected_type->name, value_type->name))) && | ||
| !(expected_type->kind == TYPE_KIND_ENUM && is_integer_kind(value_type->kind)) && | ||
| !(is_integer_kind(expected_type->kind) && value_type->kind == TYPE_KIND_STRUCT) && | ||
| !(value_type->kind == TYPE_KIND_NIL && | ||
| (expected_type->kind == TYPE_KIND_POINTER || expected_type->kind == TYPE_KIND_ERROR)); |
Comment on lines
+14927
to
+14936
| return field_type->kind != TYPE_KIND_UNKNOWN && assigned_value_type->kind != TYPE_KIND_UNKNOWN && | ||
| (!types_assignable(checker, field_type, assigned_value_type) || | ||
| (field_type->kind == TYPE_KIND_POINTER && | ||
| field_type->name && assigned_value_type->name && | ||
| strcmp(field_type->name, assigned_value_type->name) != 0) || | ||
| (field_type->kind == TYPE_KIND_STRUCT && assigned_value_type->kind == TYPE_KIND_STRUCT && | ||
| field_type->name && assigned_value_type->name && | ||
| strcmp(field_type->name, assigned_value_type->name) != 0)) && | ||
| !(assigned_value_type->kind == TYPE_KIND_NIL && | ||
| (field_type->kind == TYPE_KIND_POINTER || field_type->kind == TYPE_KIND_ERROR)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR mostly covers much needed security improvements along with some bug fixes and a couple performance improvements. Also fixes a bug in CI that wasnt building the Grayscale binary on macOS intel chips