Skip to content

Commit

Permalink
style: more consistency in identifiers.
Browse files Browse the repository at this point in the history
  • Loading branch information
plusvic committed Nov 6, 2024
1 parent 0d4a691 commit 4d11eec
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions lib/src/compiler/emit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -634,24 +634,24 @@ fn emit_expr(
}
},

Expr::FuncCall(fn_call) => {
Expr::FuncCall(func_call) => {
// Emit the arguments first.
for expr in fn_call.args.iter() {
for expr in func_call.args.iter() {
emit_expr(ctx, ir, *expr, instr);
}

if let Some(obj) = fn_call.object {
if let Some(obj) = func_call.object {
emit_expr(ctx, ir, obj, instr);
}

if fn_call.signature().result_may_be_undef {
if func_call.signature().result_may_be_undef {
emit_call_and_handle_undef(
ctx,
instr,
ctx.function_id(fn_call.mangled_name()),
ctx.function_id(func_call.mangled_name()),
);
} else {
instr.call(ctx.function_id(fn_call.mangled_name()));
instr.call(ctx.function_id(func_call.mangled_name()));
}
}

Expand Down
8 changes: 4 additions & 4 deletions lib/src/compiler/ir/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1837,10 +1837,10 @@ impl Debug for IR {
Expr::ForIn(_) => write!(f, "FOR_IN -- hash: {:#08x}", expr_hash)?,
Expr::Lookup(_) => write!(f, "LOOKUP -- hash: {:#08x}", expr_hash)?,
Expr::Var(var) => write!(f, "VAR {:?} -- hash: {:#08x}", var, expr_hash)?,
Expr::FuncCall(fn_call) => write!(
Expr::FuncCall(func_call) => write!(
f,
"FN_CALL {} -- hash: {:#08x}",
fn_call.mangled_name(),
func_call.mangled_name(),
expr_hash
)?,
Expr::PatternMatch { pattern, anchor } => write!(
Expand Down Expand Up @@ -2594,7 +2594,7 @@ impl Expr {

Expr::Ident { symbol, .. } => symbol.ty(),
Expr::FieldAccess(field_access) => field_access.type_value.ty(),
Expr::FuncCall(fn_call) => fn_call.type_value.ty(),
Expr::FuncCall(func_call) => func_call.type_value.ty(),
Expr::Lookup(lookup) => lookup.type_value.ty(),
Expr::Var(var) => var.ty(),
}
Expand Down Expand Up @@ -2666,7 +2666,7 @@ impl Expr {

Expr::Ident { symbol, .. } => symbol.type_value().clone(),
Expr::FieldAccess(field_access) => field_access.type_value.clone(),
Expr::FuncCall(fn_call) => fn_call.type_value.clone(),
Expr::FuncCall(func_call) => func_call.type_value.clone(),
Expr::Lookup(lookup) => lookup.type_value.clone(),

Expr::Var(var) => match var.ty() {
Expand Down

0 comments on commit 4d11eec

Please # to comment.