From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) by sourceware.org (Postfix) with ESMTPS id 754553858C5F for ; Mon, 28 Aug 2023 19:59:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 754553858C5F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-io1-xd2b.google.com with SMTP id ca18e2360f4ac-7923483bb68so128693839f.3 for ; Mon, 28 Aug 2023 12:59:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1693252771; x=1693857571; h=to:content-transfer-encoding:mime-version:message-id:date:subject :from:from:to:cc:subject:date:message-id:reply-to; bh=ckHnBQa5ra19fBxlJl/fcSpAqu0q9XhFkPqYGJstRRo=; b=MIps9mxDIN6yGP7JM9i0FApwbwKUD6n7x4KEm7VvxAnsUrihEN2RLIlVHOKqARs8xy okhdMP21GRh2BVWl8IDIOFWJ0vl0w6M3hqgI2HjHRCWehb3Xgvs/CEUUjt/2GTbUxW1t GR9xtLb+U3TW+r/EZCQQtWHInlwTGZPZqVXm5I0bCmpKdcj499VzVvbEG868dCZp9F0x KINZvg2qvBowUgYR09+AZf5QPZ2wOsidA/Hb6b5wny0YqLASs5358x+M3hbs375yhARJ xXLgHWwvxjsEE+mtlHjcq3RrtjjvZaKkCmmFXqvbiApa3y4LnXJhJSOPRQhiwdSoVpQ1 pZ/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693252771; x=1693857571; h=to:content-transfer-encoding:mime-version:message-id:date:subject :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ckHnBQa5ra19fBxlJl/fcSpAqu0q9XhFkPqYGJstRRo=; b=e759+Mz5ivUSXhyylWeOej5OPq24HEs1eBu7id2QcjvFJCd8+XDAuQiPnUV7LXQdwr qktt9QA7NRsyCa0uScVsGBrmMZnMvZiHQYvsNuUiAmSnzg2+Amu3PAtEyLr79GeCb6R+ eyumDm/g4NrZyO3P4VW8drq190P5Hj8EAo1+rHtLmpFgfOoM1wOInZ377Mlp4tofDDD0 OGKDEtuFXxvrpIMyX8badmSQvd1d+taIGBT15n0CmYhuRrSYSruaCubRCjOM+sTiKDCR NJmvOie/k5R3r/GP/MouEoquAyZq8i9IMjPV3JKDCV8dq2UrdExK7ZR2z+I9/n9+hiID 7SOA== X-Gm-Message-State: AOJu0Yzi9lI8n52Z/C2xpa6CsqMCEKSGx4MNpTQiHYVSFEvuS3gg9Vbe BqLLsQSVchG7t4TKG64ogaf17/+19iD9y203W9FfRA== X-Google-Smtp-Source: AGHT+IGHLooEOZytyfrabU6po7X4S5OJiWxvL6zpmHGHgomldqyi4+yIA1nxUjvNc0nlcN7uoDMIZg== X-Received: by 2002:a5e:d90a:0:b0:783:49ec:8115 with SMTP id n10-20020a5ed90a000000b0078349ec8115mr17721250iop.5.1693252771662; Mon, 28 Aug 2023 12:59:31 -0700 (PDT) Received: from localhost.localdomain (75-166-150-212.hlrn.qwest.net. [75.166.150.212]) by smtp.gmail.com with ESMTPSA id z24-20020a056602205800b00777b7fdbbffsm2769063iod.8.2023.08.28.12.59.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Aug 2023 12:59:31 -0700 (PDT) From: Tom Tromey Subject: [PATCH 0/5] Small cleanups in array_operation::evaluate Date: Mon, 28 Aug 2023 13:59:30 -0600 Message-Id: <20230828-cleanup-array-op-v1-0-12ca00f20917@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAKL87GQC/x3MwQqDMAyA4VeRnBdwraDuVcYOaY0acLUk25iI7 26343f4/x2MVdjgVu2g/BGTNRVcLxXEmdLEKEMxuNr5unMdxoUpvTOSKm24Zmx69jT6MLSNh5J l5VG+/+X9URzIGINSivNv9CR7scJxnIjMs+97AAAA To: gdb-patches@sourceware.org X-Mailer: b4 0.12.3 X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: While working on another, larger, series, I found a few small cleanups to do in array_operation::evaluate. I've made each one a separate patch to try to keep each one reasonably obvious. Regression tested on x86-64 Fedora 36. --- Tom Tromey (5): Use gdb::array_view for value_array Declare 'tem' in loop header in array_operation::evaluate Hoist array bounds check in array_operation::evaluate Remove redundant variable from array_operation::evaluate Remove another redundant variable from array_operation::evaluate gdb/eval.c | 29 +++++++++++------------------ gdb/rust-lang.c | 2 +- gdb/valops.c | 3 ++- gdb/value.h | 2 +- 4 files changed, 15 insertions(+), 21 deletions(-) --- base-commit: b8a175b415454df6a039ba0b5d2ff13c3c180275 change-id: 20230828-cleanup-array-op-49e3af3bd743 Best regards, -- Tom Tromey