[src] Tidied PIC file to make the code somewhat easier to follow; no functional
[parrot.git] / DEPRECATED.pod
blob5ab5864d7f2e42a1639183edf7c504f6165651a0
1 # $Id$
3 =head1 Deprecation in Parrot
5 This is a list of currently deprecated features of Parrot.  Every deprecation
6 has an associated RT ticket.  Each item indicates the last release it's
7 guaranteed to appear in.  Items marked with a release of ??? are still
8 deprecated, but a firm deadline for their removal has not yet been established.
10 When deprecated items are removed, all usage of the feature in the
11 repository should be updated or removed; including documentation.
13 When deprecating opcodes, in addition to the ticket, be sure to mark the
14 opcode with the :deprecated flag; this will allow users to enable deprecation
15 warnings selectively with:
17  .include 'include/warnings.pasm'
18  warningson .PARROT_WARNINGS_DEPRECATED_FLAG
20 And then receive runtime warnings if they are using any deprecated opcodes.
21 The C<-w> command line option for parrot can also be used to enable all
22 warnings.
24 =head1 vtable entries
26 =over 4
28 =item * C<type_keyed> [post 0.5.2]
30 See RT #48577.
32 =item * C<type_keyed_int> [post 0.5.2]
34 See RT #48579.
36 =item * C<type_keyed_str> [post 0.5.2]
38 See RT #48581.
40 =item * C<type> [post 0.5.2]
42 See RT #48567.
44 =item * C<new_from_string> [post 0.5.0]
46 See RT #47011.
48 =item * C<cmodulus> and variants [post 0.7.0]
50 See RT #58550.
52 =back
54 =head1 Opcodes
56 =over 4
58 =item * C<pioctl> [post 0.5.1]
60 See RT #48589.
62 =item * C<store_global> [post 0.5.0]
64 See RT #48016. Replace usage with set_[hll,root]_global variants.
66 =item * C<find_global> [post 0.5.0]
68 See RT #48018. Replace usage with get_[hll,root]_global variants.
70 =item * C<new>(out PMC, in INT, in STR) [post 0.5.0]
72 See RT #47011.
74 =item * C<get_mro> [post 0.5.0]
76 See RT #47976.
78 =item * C<n_*> math opcode variants [post 0.7.1]
80 See RT #58410.
82 =back
84 =head1 Class Features
86 =over 4
88 =item * Integer Type IDs [post 0.5.0]
90 See RT #48024. Instead of C<$P0 = new Integer> or C<$P0 = new .Integer>,
91 use the following syntax, which works for both PMCs and objects.
93   $P0 = new 'Integer'
95 =item * PMC union struct [post 0.5.0]
97 See RT #48014. This will be removed once all core PMCs have been updated.
99 =back
101 =head1 PIR syntax
103 =over 4
105 =item * old-style PASM registers [post 0.6.4]
107 Old-style PASM registers without the C<$> character are deprecated; use
108 PIR-style registers only.
110 See RT #57638.
112 =item * C<global> keyword [post 0.6.4]
114 See RT #48016
115 and RT #48018.
117 =item * bare method names [post 0.6.4]
119 C<foo.bar()>, where C<bar> is not a local identifier (thus indicating
120 a method name) is no longer supported.
122 See RT #45859.
124 =item * C<#line> [post 0.6.4]
126 Will be replaced by C<.line> to be more consistent with other PIR syntax.
128 See [RT#45857], [RT#43269], and [RT#47141].
130 =item * C<.pragma n_operators> [post 0.6.4]
132 See RT #57438.
134 =item * C<<.namespace <identifier> >> syntax [post 0.5.1]
136 See RT #48737.
138 =item * Use of C<::> in identifiers [post 0.5.1]
140 See RT #48735.
142 =item * C<.namespace [ "a" .. "b" ]> [post 0.5.0]
144 See RT #46715.
146 =item * C<.namespace> (without brackets) [post 0.6.2]
148 All should C<.namespace> directives without brackets should take
149 empty brackets to indicate the root namespace.
150 See RT #48549.
152 =item * C<.HLL_map> <string> ',' <string> [post 0.6.4]
154 This will be replaced by C<.HLL_map> <string> '=' <string>
156 See RT #57430.
158 =item * C<.HLL> <string> ',' <string> [post 0.6.4]
160 This will be replaced by C<.HLL> <string>; the second string (and
161 comma to separate them) will no longer be accepted. Use C<.loadlib>
162 for specifying the library name.
164 See RT #57428.
166 =item * vtable name .constants and __vtable overrides [post 0.5.2]
168 See RT #48877.
170 =item * Assignment syntax with opcodes [post ???]
172 See RT #36283.  When the first argument of an opcode is C<OUT>, then
173 the assignment syntax will be allowed, as it is today.
175 In any other case (i.e. C<INOUT>, C<IN>), this will become
176 a syntax error. For example:
178     $S0 = print
179     $P0 = substr 1, 2, "x"
181 Will have to be:
183     print $S0
184     substr $P0, 1, 2, "x"
186 =item * C<.return> in tailcall context [post 0.7.2]
188 The C<.return> directive in a tailcall context will be replaced by the more
189 explicit C<.tailcall> directive.
191 See RT #58974.
193 =item * C<.return> in C<.begin_return> / C<.end_return> [post 0.7.2]
195 The C<.return> directive in a C<.begin_return> sequence will be replaced by
196 the C<.set_return> directive. Likewise, C<.yield> in a C<.begin_yield>
197 sequence will be replaced by C<.set_yield>.
199 See RT #58980.
201 =item * C<.arg> will become C<.set_arg> [post 0.7.2]
203 In a C<.begin_call> sequence, the C<.arg> directive will be replaced by
204 C<.set_arg>.
206 See RT #58976.
208 =item * C<.result> will become C<.get_result> [post 0.7.2]
210 In a C<.begin_call> sequence, the C<.result> direcive will be replaced by
211 the more descriptive C<.get_result>.
213 See RT #58978.
215 =back
217 =head1 Parrot Compiler tools
219 =head2 Capture-based objects
221 =over 4
223 =item get_array, get_hash, get_scalar deprecations [post 0.6.2]
225 See RT#54000.  The 'get_array', 'get_hash', and 'get_scalar'
226 methods are now called 'list', 'hash', and 'item' respectively.
228 =back
230 =head2 Functions
232 =over 4
234 =item Old-style MMD functions [post 0.7.1]
236 Parrot_mmd_deref, Parrot_mmd_ensure_writeable, Parrot_mmd_add_function,
237 mmd_expand_x, mmd_expand_y, Parrot_mmd_add_by_class, Parrot_mmd_register,
238 Parrot_mmd_register_sub, Parrot_mmd_destroy, Parrot_MMD_search_default_infix,
239 mmd_arg_tuple_inline, Parrot_mmd_search_default, mmd_cvt_to_types,
240 Parrot_mmd_rebuild_table.
242 =back
244 =cut