From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id eKSkJQCZ718DTQAAWB0awg (envelope-from ) for ; Fri, 01 Jan 2021 16:49:52 -0500 Received: by simark.ca (Postfix, from userid 112) id 8DB131F0C0; Fri, 1 Jan 2021 16:49:52 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED, MAILING_LIST_MULTI,T_DKIM_INVALID,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 2DA3F1F071 for ; Fri, 1 Jan 2021 16:49:37 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1DE813939C37; Fri, 1 Jan 2021 21:49:05 +0000 (GMT) Received: from gateway33.websitewelcome.com (gateway33.websitewelcome.com [192.185.146.130]) by sourceware.org (Postfix) with ESMTPS id BE25A3939C0D for ; Fri, 1 Jan 2021 21:48:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org BE25A3939C0D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=tom@tromey.com Received: from cm11.websitewelcome.com (cm11.websitewelcome.com [100.42.49.5]) by gateway33.websitewelcome.com (Postfix) with ESMTP id 62C7E2318 for ; Fri, 1 Jan 2021 15:48:59 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id vSI7ka1wznPrxvSI7kleO8; Fri, 01 Jan 2021 15:48:59 -0600 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=JunrVSC25agz6Iei09xoIiXH2UmEfemva2M+GM3Iomo=; b=kLmSSvl9DOm8NJHwz+28DxnASf MrRQ1PEDV9PHhnC3Owoyhv0+xi2+4dedoGJ6JDUG+R8uxXKoDmpoMKjRXjR6+4P/It7uHns6Xpztn 74TpFHlnW+K89XUoTLntT+bx0; Received: from 97-122-81-39.hlrn.qwest.net ([97.122.81.39]:60426 helo=localhost.localdomain) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1kvSI7-0029zC-7M for gdb-patches@sourceware.org; Fri, 01 Jan 2021 14:48:59 -0700 From: Tom Tromey To: gdb-patches@sourceware.org Subject: [PATCH 187/203] Remove now-unused Modula-2 evaluator code Date: Fri, 1 Jan 2021 14:47:07 -0700 Message-Id: <20210101214723.1784144-188-tom@tromey.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210101214723.1784144-1-tom@tromey.com> References: <20210101214723.1784144-1-tom@tromey.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.81.39 X-Source-L: No X-Exim-ID: 1kvSI7-0029zC-7M X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-81-39.hlrn.qwest.net (localhost.localdomain) [97.122.81.39]:60426 X-Source-Auth: tom+tromey.com X-Email-Count: 188 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" Now that the Modula-2 parser has switched to the new style, there is no need for the old Modula-2 evaluation code. gdb/ChangeLog 2021-01-01 Tom Tromey * m2-lang.h (class m2_language) : Remove. * m2-lang.c (evaluate_subexp_modula2) (m2_language::exp_descriptor_modula2): Remove. --- gdb/ChangeLog | 7 +++++++ gdb/m2-lang.c | 34 ---------------------------------- gdb/m2-lang.h | 9 --------- 3 files changed, 7 insertions(+), 43 deletions(-) diff --git a/gdb/m2-lang.c b/gdb/m2-lang.c index 60d373ec2b9..281fa8b9218 100644 --- a/gdb/m2-lang.c +++ b/gdb/m2-lang.c @@ -111,31 +111,6 @@ eval_op_m2_subscript (struct type *expect_type, struct expression *exp, return value_subscript (arg1, value_as_long (arg2)); } -static struct value * -evaluate_subexp_modula2 (struct type *expect_type, struct expression *exp, - int *pos, enum noside noside) -{ - enum exp_opcode op = exp->elts[*pos].opcode; - struct value *arg1; - struct value *arg2; - - switch (op) - { - case UNOP_HIGH: - (*pos)++; - arg1 = evaluate_subexp_with_coercion (exp, pos, noside); - return eval_op_m2_high (expect_type, exp, noside, arg1); - - case BINOP_SUBSCRIPT: - (*pos)++; - arg1 = evaluate_subexp_with_coercion (exp, pos, noside); - arg2 = evaluate_subexp_with_coercion (exp, pos, noside); - return eval_op_m2_subscript (expect_type, exp, noside, arg1, arg2); - - default: - return evaluate_subexp_standard (expect_type, exp, pos, noside); - } -} /* Table of operators and their precedences for printing expressions. */ @@ -175,15 +150,6 @@ const struct op_print m2_language::op_print_tab[] = }; -const struct exp_descriptor m2_language::exp_descriptor_modula2 = -{ - print_subexp_standard, - operator_length_standard, - operator_check_standard, - dump_subexp_body_standard, - evaluate_subexp_modula2 -}; - /* Single instance of the M2 language. */ static m2_language m2_language_defn; diff --git a/gdb/m2-lang.h b/gdb/m2-lang.h index 650942b67b7..20941429ff0 100644 --- a/gdb/m2-lang.h +++ b/gdb/m2-lang.h @@ -150,19 +150,10 @@ class m2_language : public language_defn /* See language.h. */ - const struct exp_descriptor *expression_ops () const override - { return &exp_descriptor_modula2; } - - /* See language.h. */ - const struct op_print *opcode_print_table () const override { return op_print_tab; } private: - /* Table of expression handling functions for use by EXPRESSION_OPS - member function. */ - static const struct exp_descriptor exp_descriptor_modula2; - /* Table of opcode data for use by OPCODE_PRINT_TABLE member function. */ static const struct op_print op_print_tab[]; }; -- 2.26.2