-no-bounds-check

This commit is contained in:
gingerBill
2018-01-18 12:22:27 +00:00
parent d90008cc52
commit add53228b2
5 changed files with 24 additions and 22 deletions
-10
View File
@@ -691,13 +691,6 @@ __dynamic_array_expr_error :: proc "contextless" (file: string, line, column: in
__debug_trap();
}
__substring_expr_error :: proc "contextless" (file: string, line, column: int, low, high: int) {
if 0 <= low && low <= high do return;
fmt.fprintf(os.stderr, "%s(%d:%d) Invalid substring indices: %d..%d\n",
file, line, column, low, high);
__debug_trap();
}
__type_assertion_check :: proc "contextless" (ok: bool, file: string, line, column: int, from, to: ^Type_Info) {
if ok do return;
fmt.fprintf(os.stderr, "%s(%d:%d) Invalid type_assertion from %T to %T\n",
@@ -715,9 +708,6 @@ __bounds_check_error_loc :: inline proc "contextless" (using loc := #caller_loca
__slice_expr_error_loc :: inline proc "contextless" (using loc := #caller_location, low, high: int) {
__slice_expr_error(file_path, int(line), int(column), low, high);
}
__substring_expr_error_loc :: inline proc "contextless" (using loc := #caller_location, low, high: int) {
__substring_expr_error(file_path, int(line), int(column), low, high);
}
__mem_set :: proc "contextless" (data: rawptr, value: i32, len: int) -> rawptr {
if data == nil do return nil;