From 8261f8eb698db59828f3e3dd7a1ee82976ab259e Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Tue, 16 Oct 2007 16:02:35 +0000 Subject: PL_AMG_names is only used by gv.c (as far as Google code search can see), so it can easily be a static variable inside gv.c. This allows the implementation to be changed in future Perls within the 5.10.x series. p4raw-id: //depot/perl@32116 --- overload.c | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 overload.c (limited to 'overload.c') diff --git a/overload.c b/overload.c new file mode 100644 index 0000000000..0a220cc4de --- /dev/null +++ b/overload.c @@ -0,0 +1,90 @@ +/* -*- buffer-read-only: t -*- + * + * overload.c + * + * Copyright (C) 1997, 1998, 2000, 2001, 2005, 2006, 2007 by Larry Wall + * and others + * + * You may distribute under the terms of either the GNU General Public + * License or the Artistic License, as specified in the README file. + * + * !!!!!!! DO NOT EDIT THIS FILE !!!!!!! + * This file is built by overload.pl + */ + +#define AMG_id2name(id) (PL_AMG_names[id]+1) + +char * const PL_AMG_names[NofAMmeth] = { + /* Names kept in the symbol table. fallback => "()", the rest has + "(" prepended. The only other place in perl which knows about + this convention is AMG_id2name (used for debugging output and + 'nomethod' only), the only other place which has it hardwired is + overload.pm. */ + "()", + "(${}", + "(@{}", + "(%{}", + "(*{}", + "(&{}", + "(++", + "(--", + "(bool", + "(0+", + "(\"\"", + "(!", + "(=", + "(abs", + "(neg", + "(<>", + "(int", + "(<", + "(<=", + "(>", + "(>=", + "(==", + "(!=", + "(lt", + "(le", + "(gt", + "(ge", + "(eq", + "(ne", + "(nomethod", + "(+", + "(+=", + "(-", + "(-=", + "(*", + "(*=", + "(/", + "(/=", + "(%", + "(%=", + "(**", + "(**=", + "(<<", + "(<<=", + "(>>", + "(>>=", + "(&", + "(&=", + "(|", + "(|=", + "(^", + "(^=", + "(<=>", + "(cmp", + "(~", + "(atan2", + "(cos", + "(sin", + "(exp", + "(log", + "(sqrt", + "(x", + "(x=", + "(.", + "(.=", + "(~~", + "DESTROY" +}; -- cgit v1.2.1