diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-10-27 19:39:34 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-10-27 19:39:34 -0400 |
| commit | df258c1773adef59994da2e010f74610eb81a1b2 (patch) | |
| tree | abd0e0c898ddb5702b854f1822f1fd3a4a4faa53 | |
| parent | 71d6787541e829781e17d90f6b57eabcb17fb8a9 (diff) | |
Remove an unnecessary ARRAY_COPY()
| -rw-r--r-- | compile.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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); |
