Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <yao@codesourcery.com>
To: <gdb-patches@sourceware.org>
Subject: [PATCH 2/3] Remove TERNOP_SLICE_COUNT.
Date: Fri, 10 Aug 2012 09:13:00 -0000	[thread overview]
Message-ID: <1344589936-2006-3-git-send-email-yao@codesourcery.com> (raw)
In-Reply-To: <1344589936-2006-1-git-send-email-yao@codesourcery.com>

gdb:

2012-08-10  Yao Qi  <yao@codesourcery.com>

	* std-operator.def: Remove TERNOP_SLICE_COUNT.
	* breakpoint.c (watchpoint_exp_is_const): Remove handling to
	TERNOP_SLICE_COUNT.
	* eval.c (evaluate_subexp_standard): Likewise.
	* expprint.c (print_subexp_standard): Likewise.
	(dump_subexp_body_standard): Likewise.
	* parse.c (operator_length_standard): Likewise.
---
 gdb/breakpoint.c     |    1 -
 gdb/eval.c           |   11 -----------
 gdb/expprint.c       |    2 --
 gdb/parse.c          |    1 -
 gdb/std-operator.def |    5 -----
 5 files changed, 0 insertions(+), 20 deletions(-)

diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 1ba923f..7ea5ba6 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -10160,7 +10160,6 @@ watchpoint_exp_is_const (const struct expression *exp)
 	case BINOP_RANGE:
 	case TERNOP_COND:
 	case TERNOP_SLICE:
-	case TERNOP_SLICE_COUNT:
 
 	case OP_LONG:
 	case OP_DOUBLE:
diff --git a/gdb/eval.c b/gdb/eval.c
index 9bf5401..c0d9354 100644
--- a/gdb/eval.c
+++ b/gdb/eval.c
@@ -1140,17 +1140,6 @@ evaluate_subexp_standard (struct type *expect_type,
 	return value_slice (array, lowbound, upper - lowbound + 1);
       }
 
-    case TERNOP_SLICE_COUNT:
-      {
-	struct value *array = evaluate_subexp (NULL_TYPE, exp, pos, noside);
-	int lowbound
-	  = value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside));
-	int length
-	  = value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside));
-
-	return value_slice (array, lowbound, length);
-      }
-
     case TERNOP_COND:
       /* Skip third and second args to evaluate the first one.  */
       arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
diff --git a/gdb/expprint.c b/gdb/expprint.c
index c74c564..baaa08a 100644
--- a/gdb/expprint.c
+++ b/gdb/expprint.c
@@ -360,7 +360,6 @@ print_subexp_standard (struct expression *exp, int *pos,
       return;
 
     case TERNOP_SLICE:
-    case TERNOP_SLICE_COUNT:
       print_subexp (exp, pos, stream, PREC_SUFFIX);
       fputs_filtered ("(", stream);
       print_subexp (exp, pos, stream, PREC_ABOVE_COMMA);
@@ -787,7 +786,6 @@ dump_subexp_body_standard (struct expression *exp,
     {
     case TERNOP_COND:
     case TERNOP_SLICE:
-    case TERNOP_SLICE_COUNT:
       elt = dump_subexp (exp, stream, elt);
       /* FALL THROUGH */
     case BINOP_ADD:
diff --git a/gdb/parse.c b/gdb/parse.c
index d418aef..3ec1e25 100644
--- a/gdb/parse.c
+++ b/gdb/parse.c
@@ -976,7 +976,6 @@ operator_length_standard (const struct expression *expr, int endpos,
 
     case TERNOP_COND:
     case TERNOP_SLICE:
-    case TERNOP_SLICE_COUNT:
       args = 3;
       break;
 
diff --git a/gdb/std-operator.def b/gdb/std-operator.def
index 173dc1d..dcba39f 100644
--- a/gdb/std-operator.def
+++ b/gdb/std-operator.def
@@ -105,11 +105,6 @@ OP (TERNOP_COND)		/* ?: */
    OP1(OP2:OP3).  Return elements OP2 through OP3 of OP1.  */
 OP (TERNOP_SLICE)
 
-/* A sub-string/sub-array.  (The deleted) Chill syntax: OP1(OP2 UP
-   OP3).  Return OP3 elements of OP1, starting with element
-   OP2.  */
-OP (TERNOP_SLICE_COUNT)
-
 /* Multidimensional subscript operator, such as Modula-2 x[a,b,...].
    The dimensionality is encoded in the operator, like the number of
    function arguments in OP_FUNCALL, I.E. <OP><dimension><OP>.
-- 
1.7.7.6


  reply	other threads:[~2012-08-10  9:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-10  9:13 [RFC 0/3] Remove unused operators OP_BITSTRING TERNOP_SLICE_COUNT and TYPE_CODE_BITSTRING Yao Qi
2012-08-10  9:13 ` Yao Qi [this message]
2012-08-10 16:16   ` [PATCH 2/3] Remove TERNOP_SLICE_COUNT Tom Tromey
2012-08-10  9:13 ` [PATCH 3/3] remove TYPE_CODE_BITSTRING Yao Qi
2012-08-10 16:19   ` Tom Tromey
2012-08-13  1:13     ` Yao Qi
2012-08-15 19:39       ` Tom Tromey
2012-08-10  9:13 ` [PATCH 1/3] Remove OP_BITSTRING Yao Qi
2012-08-10 16:16   ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1344589936-2006-3-git-send-email-yao@codesourcery.com \
    --to=yao@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox