Refine immutable strings.

This commit is contained in:
Stephen Chung
2020-05-25 17:01:39 +08:00
parent 99ea2b33c9
commit fca140ef55
6 changed files with 119 additions and 39 deletions

View File

@@ -1512,8 +1512,9 @@ impl Engine {
let mut args: StaticVec<_> = arg_values.iter_mut().collect();
if name == KEYWORD_EVAL && args.len() == 1 && args.get(0).is::<String>() {
let hash_fn = calc_fn_hash(empty(), name, 1, once(TypeId::of::<String>()));
if name == KEYWORD_EVAL && args.len() == 1 && args.get(0).is::<ImmutableString>() {
let hash_fn =
calc_fn_hash(empty(), name, 1, once(TypeId::of::<ImmutableString>()));
if !self.has_override(lib, (hash_fn, *hash)) {
// eval - only in function call style