Make fast operators the default.

This commit is contained in:
Stephen Chung
2022-09-03 22:07:36 +08:00
parent defdc2a5bc
commit 702bb9030a
11 changed files with 73 additions and 56 deletions

View File

@@ -190,8 +190,8 @@ pub struct FnCallExpr {
pub args: StaticVec<Expr>,
/// Does this function call capture the parent scope?
pub capture_parent_scope: bool,
/// Is this function call a simple symbol-based operator?
pub is_standard_operator: bool,
/// Is this function call a native operator?
pub is_native_operator: bool,
/// [Position] of the function name.
pub pos: Position,
}
@@ -206,8 +206,8 @@ impl fmt::Debug for FnCallExpr {
if self.capture_parent_scope {
ff.field("capture_parent_scope", &self.capture_parent_scope);
}
if self.is_standard_operator {
ff.field("is_standard_operator", &self.is_standard_operator);
if self.is_native_operator {
ff.field("is_native_operator", &self.is_native_operator);
}
ff.field("hash", &self.hashes)
.field("name", &self.name)
@@ -667,7 +667,7 @@ impl Expr {
hashes: calc_fn_hash(f.fn_name(), 1).into(),
args: once(Self::StringConstant(f.fn_name().into(), pos)).collect(),
capture_parent_scope: false,
is_standard_operator: false,
is_native_operator: false,
pos,
}
.into(),