summaryrefslogtreecommitdiff
path: root/overload.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2007-10-16 16:02:35 +0000
committerNicholas Clark <nick@ccl4.org>2007-10-16 16:02:35 +0000
commit8261f8eb698db59828f3e3dd7a1ee82976ab259e (patch)
tree3ea5346f672c31284bdb8657b4e964ff2a29eb4b /overload.c
parent20773dcda05c239bb7300f7eed1a0ff4ef022a0a (diff)
downloadperl-8261f8eb698db59828f3e3dd7a1ee82976ab259e.tar.gz
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
Diffstat (limited to 'overload.c')
-rw-r--r--overload.c90
1 files changed, 90 insertions, 0 deletions
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"
+};