Perform slightly faster type checking for vector and bytevector access functions.

This commit is contained in:
Justin Ethier 2018-08-21 16:06:37 -04:00
parent bb4b136b00
commit 3261eee05a
2 changed files with 4 additions and 3 deletions

View file

@ -7,6 +7,7 @@ Features
- During CPS optimization allow inlining of operations on global variables that are mutated in other top-level functions. - During CPS optimization allow inlining of operations on global variables that are mutated in other top-level functions.
- Improved loop detection during CPS optimization phase. - Improved loop detection during CPS optimization phase.
- Allow optimizing-out of basic `if` expressions of the form `(if (pred? ...) #t #f)` into `(pred? ...)`. - Allow optimizing-out of basic `if` expressions of the form `(if (pred? ...) #t #f)` into `(pred? ...)`.
- Perform slightly faster type checking for vector and bytevector access functions.
Bug Fixes Bug Fixes

View file

@ -2858,7 +2858,7 @@ object Cyc_bytevector_u8_ref(void *data, object bv, object k)
int val; int val;
Cyc_check_bvec(data, bv); Cyc_check_bvec(data, bv);
Cyc_check_num(data, k); Cyc_check_fixnum(data, k);
buf = ((bytevector) bv)->data; buf = ((bytevector) bv)->data;
idx = unbox_number(k); idx = unbox_number(k);
@ -2877,8 +2877,8 @@ object Cyc_bytevector_u8_set(void *data, object bv, object k, object b)
int idx, len, val; int idx, len, val;
Cyc_check_bvec(data, bv); Cyc_check_bvec(data, bv);
Cyc_check_num(data, k); Cyc_check_fixnum(data, k);
Cyc_check_num(data, b); Cyc_check_fixnum(data, b);
buf = ((bytevector) bv)->data; buf = ((bytevector) bv)->data;
idx = unbox_number(k); idx = unbox_number(k);