From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by sourceware.org (Postfix) with ESMTPS id 758523939C09 for ; Thu, 18 Jun 2020 22:31:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 758523939C09 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=andrew.burgess@embecosm.com Received: by mail-wr1-x443.google.com with SMTP id x6so7729182wrm.13 for ; Thu, 18 Jun 2020 15:31:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=e9rYRWjgpIPXv4JOWlDeKFUpAU1Oi/Kc7Mrarf/kW3k=; b=HGbFc1dbJ0gtTf/hTWvyDdvhzmq51wp1+cj2jIaM8jMjjTd4bCR7lsY+8UBymEco7C bhLuoVgE5hmNwICIye4Ty0DA8G4qxzamQATY8u7n+8QYWKrhamAjNEf3GmYx1Om4b+j1 wh52jPuX4gBuENB26J+tZDrBew+quxEMOL0AkU9881LTgFS+yy/Mw9tLWH5DHnXJbFyp Xg7OctAq+5R9vPW9SpIiinFZ7JoZNytoC/yMq54D/ZYXJ3OQQgXgYZNf3Q2jnalHzHDl ZcY+pU8r+0O0ARxZRgZFrn4NwZsoGLzQo4UEB50UYg0ZF3FEMvdrXQUd36W5IZ+gsGRe McHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=e9rYRWjgpIPXv4JOWlDeKFUpAU1Oi/Kc7Mrarf/kW3k=; b=EEaVL0xtJkrjVkgo0RiU1+IPgF9NS5PWf4gIcQNAqdVrwbscA9vcpD2R4SSG+Jd/yy Wu8c973jT5NomOYLz5rkVzzJl+ySB4S0rID7ODNCBcUJ9GlLABI0Dd+ssBWTCJctzaD5 ApUzbpBUIYEQV1rHzccKkTi0YjtQzxNt7djhYRxsolZsx0hynNtmGbYLw6iPn0VP/U2B oVzAP3VCdmPz45AMPwpoh7UrslwS+AJ/+IeGL/P6YvLhrTuiWZ8EWTtXJDTQFjRS53z8 ovajhJp7XvVfvsXw9HmSjOrPKKTy5Ng5pejLqfqCHK+iKBb642hx44DwCWPMZ4zbfblw tWBw== X-Gm-Message-State: AOAM531ddO7mzvvRPlFJ7+7HRNvHizPcLRR2d/3GNwKt2bHZyd+yQSIO Kh9TGmPRPUjUkBP4vio38Lb854jS0gg= X-Google-Smtp-Source: ABdhPJyPPDRRJIEbiTZLiVF1RBLjhGV40fSOj+2aML8j95QqKpvq157680v5BpPYen5r8knZ1fzR8w== X-Received: by 2002:a5d:5112:: with SMTP id s18mr690010wrt.160.1592519518395; Thu, 18 Jun 2020 15:31:58 -0700 (PDT) Received: from localhost (host86-128-12-16.range86-128.btcentralplus.com. [86.128.12.16]) by smtp.gmail.com with ESMTPSA id p16sm5639438wru.27.2020.06.18.15.31.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jun 2020 15:31:57 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Subject: [PATCH 0/7] Language Class Hierarchy Conversion (Prt 3) Date: Thu, 18 Jun 2020 23:31:47 +0100 Message-Id: X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org 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: , X-List-Received-Date: Thu, 18 Jun 2020 22:32:01 -0000 In this third patch set I convert the last remaining function pointers in the language_base structure into member function in language_defn. There wasn't anything particularaly tricky in this batch. After this set my plans are (in no particular order): - Convert at least some of the data members in language_base into member function in language_defn. - Move some of the language classes into header files so that member functions can be defined in different .c files. This will allow me to remove most of the member functions that currently just redirect to a function in another file. - Possibly restructure the language class hierarchy to increase the amount of sharing that exists between similar languages. - Make more of the per-language helper functions private functions within the language classes. Thoughts, feedback, or ideas always welcome. Thanks, Andrew --- Andrew Burgess (7): gdb: Convert language la_parser field to a method gdb: Convert language la_post_parser field to a method gdb: Convert language la_emitchar field to a method gdb: Convert language la_printchar field to a method gdb: Convert language la_printstr field to a method gdb: Convert language la_print_typedef field to a method gdb: Convert language la_is_string_type_p field to a method gdb/ChangeLog | 271 ++++++++++++++++++++++++++++++++++++++ gdb/ada-lang.c | 118 ++++++++++------- gdb/c-lang.c | 28 ---- gdb/d-lang.c | 15 +-- gdb/f-lang.c | 132 +++++++++---------- gdb/go-lang.c | 35 +++-- gdb/language.c | 213 ++++++++++++++++++++++-------- gdb/language.h | 103 ++++++++------- gdb/m2-lang.c | 324 +++++++++++++++++++++++----------------------- gdb/objc-lang.c | 7 - gdb/opencl-lang.c | 7 - gdb/p-lang.c | 274 ++++++++++++++++++++------------------- gdb/p-lang.h | 4 - gdb/parse.c | 13 +- gdb/parser-defs.h | 3 - gdb/rust-lang.c | 162 ++++++++++++----------- gdb/typeprint.c | 9 -- gdb/valprint.c | 2 +- 18 files changed, 1033 insertions(+), 687 deletions(-) -- 2.25.4