This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
oops, left some debugging code
[perl5.git] / overload.c
CommitLineData
8261f8eb
NC
1/* -*- buffer-read-only: t -*-
2 *
3 * overload.c
4 *
c4ac9b44
DM
5 * Copyright (C) 1997, 1998, 2000, 2001, 2005, 2006, 2007, 2011
6 * by Larry Wall and others
8261f8eb
NC
7 *
8 * You may distribute under the terms of either the GNU General Public
9 * License or the Artistic License, as specified in the README file.
10 *
78102347
NC
11 * !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
12 * This file is built by regen/overload.pl.
13 * Any changes made here will be lost!
8261f8eb
NC
14 */
15
16#define AMG_id2name(id) (PL_AMG_names[id]+1)
82af6593 17#define AMG_id2namelen(id) (PL_AMG_namelens[id]-1)
8261f8eb 18
2e1c5ef0 19static const U8 PL_AMG_namelens[NofAMmeth] = {
d279ab82
NC
20 2,
21 4,
22 4,
23 4,
24 4,
25 4,
26 3,
27 3,
28 5,
29 3,
30 3,
31 2,
32 2,
33 4,
34 4,
35 3,
36 4,
37 2,
38 3,
39 2,
40 3,
41 3,
42 3,
43 3,
44 3,
45 3,
46 3,
47 3,
48 3,
49 9,
50 2,
51 3,
52 2,
53 3,
54 2,
55 3,
56 2,
57 3,
58 2,
59 3,
60 3,
61 4,
62 3,
63 4,
64 3,
65 4,
66 2,
67 3,
68 2,
69 3,
70 2,
71 3,
72 4,
73 4,
74 2,
75 6,
76 4,
77 4,
78 4,
79 4,
80 5,
81 2,
82 3,
83 2,
84 3,
85 3,
9846fe22 86 3,
d9151963 87 3,
d279ab82
NC
88 7
89};
90
2e1c5ef0 91static const char * const PL_AMG_names[NofAMmeth] = {
8261f8eb
NC
92 /* Names kept in the symbol table. fallback => "()", the rest has
93 "(" prepended. The only other place in perl which knows about
94 this convention is AMG_id2name (used for debugging output and
95 'nomethod' only), the only other place which has it hardwired is
96 overload.pm. */
c4ac9b44
DM
97 "()", /* fallback */
98 "(${}", /* to_sv */
99 "(@{}", /* to_av */
100 "(%{}", /* to_hv */
101 "(*{}", /* to_gv */
102 "(&{}", /* to_cv */
103 "(++", /* inc */
104 "(--", /* dec */
105 "(bool", /* bool_ */
106 "(0+", /* numer */
107 "(\"\"", /* string */
108 "(!", /* not */
109 "(=", /* copy */
110 "(abs", /* abs */
111 "(neg", /* neg */
112 "(<>", /* iter */
113 "(int", /* int */
114 "(<", /* lt */
115 "(<=", /* le */
116 "(>", /* gt */
117 "(>=", /* ge */
118 "(==", /* eq */
119 "(!=", /* ne */
120 "(lt", /* slt */
121 "(le", /* sle */
122 "(gt", /* sgt */
123 "(ge", /* sge */
124 "(eq", /* seq */
125 "(ne", /* sne */
126 "(nomethod", /* nomethod */
127 "(+", /* add */
128 "(+=", /* add_ass */
129 "(-", /* subtr */
130 "(-=", /* subtr_ass */
131 "(*", /* mult */
132 "(*=", /* mult_ass */
133 "(/", /* div */
134 "(/=", /* div_ass */
135 "(%", /* modulo */
136 "(%=", /* modulo_ass */
137 "(**", /* pow */
138 "(**=", /* pow_ass */
139 "(<<", /* lshift */
140 "(<<=", /* lshift_ass */
141 "(>>", /* rshift */
142 "(>>=", /* rshift_ass */
143 "(&", /* band */
144 "(&=", /* band_ass */
145 "(|", /* bor */
146 "(|=", /* bor_ass */
147 "(^", /* bxor */
148 "(^=", /* bxor_ass */
149 "(<=>", /* ncmp */
150 "(cmp", /* scmp */
151 "(~", /* compl */
152 "(atan2", /* atan2 */
153 "(cos", /* cos */
154 "(sin", /* sin */
155 "(exp", /* exp */
156 "(log", /* log */
157 "(sqrt", /* sqrt */
158 "(x", /* repeat */
159 "(x=", /* repeat_ass */
160 "(.", /* concat */
161 "(.=", /* concat_ass */
162 "(~~", /* smart */
163 "(-X", /* ftest */
164 "(qr", /* regexp */
8261f8eb
NC
165 "DESTROY"
166};
ce716c52
NC
167
168/* ex: set ro: */