From 70c695016e327bc7c604a177ff6476ba2c6213b4 Mon Sep 17 00:00:00 2001 From: Andrew Morris Date: Thu, 22 Jun 2023 10:50:27 +1000 Subject: [PATCH] Tweaks --- valuescript_compiler/src/function_compiler.rs | 4 ++-- website/src/playground/files/root/examples/quickSort.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/valuescript_compiler/src/function_compiler.rs b/valuescript_compiler/src/function_compiler.rs index fe94a04..4dfa085 100644 --- a/valuescript_compiler/src/function_compiler.rs +++ b/valuescript_compiler/src/function_compiler.rs @@ -465,9 +465,9 @@ impl FunctionCompiler { match &ret_stmt.arg { None => {} Some(expr) => { - let mut expression_compiler = ExpressionCompiler { fnc: self }; + let mut ec = ExpressionCompiler { fnc: self }; - let compiled = expression_compiler.compile(expr, Some(Register::return_())); + let compiled = ec.compile(expr, Some(Register::return_())); self.use_(compiled); } } diff --git a/website/src/playground/files/root/examples/quickSort.ts b/website/src/playground/files/root/examples/quickSort.ts index e6b65ba..1802849 100644 --- a/website/src/playground/files/root/examples/quickSort.ts +++ b/website/src/playground/files/root/examples/quickSort.ts @@ -10,7 +10,7 @@ function quickSort(vals: T[], cmp: (a: T, b: T) => number) { // There's only one reference to `vals`, so we can mutate it in-place // without violating value semantics. (Disclaimer: ValueScript doesn't // yet know that it can drop the reference to `x` from the call site, - // so there is one copy.) + // so there is one copy of the array.) // // More on quickSort: // https://www.youtube.com/watch?v=Hoixgm4-P4M