From df258c1773adef59994da2e010f74610eb81a1b2 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 27 Oct 2024 19:39:34 -0400 Subject: Remove an unnecessary ARRAY_COPY() --- compile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'compile.c') diff --git a/compile.c b/compile.c index 3f8a8d3a..c88e2a7f 100644 --- a/compile.c +++ b/compile.c @@ -2671,7 +2671,8 @@ CORD compile(env_t *env, ast_t *ast) } else if (streq(call->name, "sort") || streq(call->name, "sorted")) { CORD self = streq(call->name, "sort") ? compile_to_pointer_depth(env, call->self, 1, false) - : compile_to_pointer_depth(env, call->self, 0, call->args != NULL); + // No need to do an ARRAY_COPY() here because it happens inside Array$sorted(): + : compile_to_pointer_depth(env, call->self, 0, false); CORD comparison; if (call->args) { type_t *item_ptr = Type(PointerType, .pointed=item_t, .is_stack=true); -- cgit v1.2.3