[svn:parrot] r47048 - in branches/ops_massacre: . compilers/imcc compilers/opsc compilers/opsc/src/Ops compilers/opsc/src/Ops/Compiler config/gen/makefiles docs/pdds examples/languages/squaak/doc include/parrot include/parrot/oplib lib/Parrot lib/Parrot/Configure/Options lib/Parrot/Configure/Options/Conf lib/Parrot/Configure/Options/Test lib/Parrot/Docs/Section lib/Parrot/OpTrans lib/Parrot/Ops2c lib/Parrot/Ops2pm runtime/parrot/library/LWP src src/dynoplibs src/interp src/ops src/pmc src/runcore src/string src/string/encoding t/compilers/opsc t/native_pbc t/op t/pmc t/src t/tools/ops2cutils t/tools/ops2pm tools/build tools/dev
plobsing at svn.parrot.org
plobsing at svn.parrot.org
Thu May 27 06:10:23 UTC 2010
Author: plobsing
Date: Thu May 27 06:10:21 2010
New Revision: 47048
URL: https://trac.parrot.org/parrot/changeset/47048
Log:
sync with trunk
Added:
branches/ops_massacre/src/string/encoding/ucs4.c
- copied unchanged from r47047, trunk/src/string/encoding/ucs4.c
branches/ops_massacre/src/string/encoding/ucs4.h
- copied unchanged from r47047, trunk/src/string/encoding/ucs4.h
Deleted:
branches/ops_massacre/lib/Parrot/Op.pm
branches/ops_massacre/lib/Parrot/OpTrans/
branches/ops_massacre/lib/Parrot/OpTrans.pm
branches/ops_massacre/lib/Parrot/Ops2c/
branches/ops_massacre/lib/Parrot/Ops2pm/
branches/ops_massacre/lib/Parrot/Ops2pm.pm
branches/ops_massacre/lib/Parrot/OpsFile.pm
branches/ops_massacre/lib/Parrot/OpsRenumber.pm
branches/ops_massacre/src/ops/ops.num
branches/ops_massacre/t/tools/ops2cutils/
branches/ops_massacre/t/tools/ops2pm/
branches/ops_massacre/tools/build/ops2pm.pl
branches/ops_massacre/tools/dev/opsrenumber.pl
Modified:
branches/ops_massacre/ (props changed)
branches/ops_massacre/DEPRECATED.pod
branches/ops_massacre/MANIFEST
branches/ops_massacre/PBC_COMPAT
branches/ops_massacre/compilers/imcc/pbc.c
branches/ops_massacre/compilers/opsc/ops2c.nqp
branches/ops_massacre/compilers/opsc/opsc.pir
branches/ops_massacre/compilers/opsc/src/Ops/Compiler/Actions.pm
branches/ops_massacre/compilers/opsc/src/Ops/Compiler/Grammar.pm
branches/ops_massacre/compilers/opsc/src/Ops/Emitter.pm
branches/ops_massacre/compilers/opsc/src/Ops/File.pm
branches/ops_massacre/compilers/opsc/src/Ops/Op.pm
branches/ops_massacre/compilers/opsc/src/Ops/OpLib.pm
branches/ops_massacre/config/gen/makefiles/root.in
branches/ops_massacre/docs/pdds/pdd28_strings.pod
branches/ops_massacre/examples/languages/squaak/doc/tutorial_episode_1.pod
branches/ops_massacre/include/parrot/encoding.h
branches/ops_massacre/include/parrot/oplib/core_ops.h
branches/ops_massacre/include/parrot/oplib/ops.h
branches/ops_massacre/include/parrot/pmc.h
branches/ops_massacre/include/parrot/runcore_trace.h (props changed)
branches/ops_massacre/lib/Parrot/Configure/Options/Conf.pm
branches/ops_massacre/lib/Parrot/Configure/Options/Conf/Shared.pm
branches/ops_massacre/lib/Parrot/Configure/Options/Reconf.pm
branches/ops_massacre/lib/Parrot/Configure/Options/Test/Prepare.pm
branches/ops_massacre/lib/Parrot/Docs/Section/Ops.pm
branches/ops_massacre/lib/Parrot/Docs/Section/Tools.pm
branches/ops_massacre/runtime/parrot/library/LWP/Protocol.pir
branches/ops_massacre/src/dynoplibs/Rules.in
branches/ops_massacre/src/interp/inter_create.c (props changed)
branches/ops_massacre/src/oo.c
branches/ops_massacre/src/ops/core_ops.c
branches/ops_massacre/src/ops/experimental.ops
branches/ops_massacre/src/pmc.c
branches/ops_massacre/src/pmc/callcontext.pmc
branches/ops_massacre/src/pmc/coroutine.pmc
branches/ops_massacre/src/pmc/exception.pmc
branches/ops_massacre/src/pmc/string.pmc
branches/ops_massacre/src/pmc/sub.pmc
branches/ops_massacre/src/runcore/cores.c (props changed)
branches/ops_massacre/src/runcore/trace.c (props changed)
branches/ops_massacre/src/string/api.c
branches/ops_massacre/src/string/charset.c
branches/ops_massacre/src/string/encoding.c
branches/ops_massacre/t/compilers/opsc/05-oplib.t
branches/ops_massacre/t/native_pbc/annotations.pbc
branches/ops_massacre/t/native_pbc/integer_1.pbc
branches/ops_massacre/t/native_pbc/number_1.pbc
branches/ops_massacre/t/native_pbc/string_1.pbc
branches/ops_massacre/t/op/inf_nan.t
branches/ops_massacre/t/pmc/exception-old.t
branches/ops_massacre/t/src/embed.t (props changed)
branches/ops_massacre/tools/dev/mk_gitignore.pl (props changed)
Modified: branches/ops_massacre/DEPRECATED.pod
==============================================================================
--- branches/ops_massacre/DEPRECATED.pod Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/DEPRECATED.pod Thu May 27 06:10:21 2010 (r47048)
@@ -233,9 +233,9 @@
L<https://trac.parrot.org/parrot/ticket/1643>
-=item unroll [experimental]
+=item finalize [experimental]
-Unroll inner runloops from exception handlers.
+Finalize exception handler, unrolling inner runloops if needed.
L<https://trac.parrot.org/parrot/ticket/1635>
Modified: branches/ops_massacre/MANIFEST
==============================================================================
--- branches/ops_massacre/MANIFEST Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/MANIFEST Thu May 27 06:10:21 2010 (r47048)
@@ -1,7 +1,7 @@
# ex: set ro:
# $Id$
#
-# generated by tools/dev/mk_manifest_and_skip.pl Thu May 27 02:06:52 2010 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Thu May 27 06:07:27 2010 UT
#
# See below for documentation on the format of this file.
#
@@ -1064,16 +1064,6 @@
lib/Parrot/IO/Path.pm [devel]lib
lib/Parrot/Install.pm [devel]lib
lib/Parrot/Manifest.pm [devel]lib
-lib/Parrot/Op.pm [devel]lib
-lib/Parrot/OpTrans.pm [devel]lib
-lib/Parrot/OpTrans/C.pm [devel]lib
-lib/Parrot/Ops2c/Auxiliary.pm [devel]lib
-lib/Parrot/Ops2c/Utils.pm [devel]lib
-lib/Parrot/Ops2pm.pm [devel]lib
-lib/Parrot/Ops2pm/Auxiliary.pm [devel]lib
-lib/Parrot/Ops2pm/Base.pm [devel]lib
-lib/Parrot/OpsFile.pm [devel]lib
-lib/Parrot/OpsRenumber.pm [devel]lib
lib/Parrot/Pmc2c/Attribute.pm [devel]lib
lib/Parrot/Pmc2c/ComposedMethod.pm [devel]lib
lib/Parrot/Pmc2c/Dumper.pm [devel]lib
@@ -1142,6 +1132,7 @@
lib/Pod/Simple/TranscodeSmart.pm []
lib/Pod/Simple/XHTML.pm []
lib/Pod/Simple/XMLOutStream.pm []
+merge []
parrotbug []
runtime/parrot/bin/prove.pir [library]
runtime/parrot/dynext/README []doc
@@ -1342,7 +1333,6 @@
src/ops/io.ops []
src/ops/math.ops []
src/ops/object.ops []
-src/ops/ops.num [devel]src
src/ops/ops.skip []
src/ops/pmc.ops []
src/ops/set.ops []
@@ -1468,6 +1458,8 @@
src/string/encoding/fixed_8.h []
src/string/encoding/ucs2.c []
src/string/encoding/ucs2.h []
+src/string/encoding/ucs4.c []
+src/string/encoding/ucs4.h []
src/string/encoding/utf16.c []
src/string/encoding/utf16.h []
src/string/encoding/utf8.c []
@@ -2088,7 +2080,6 @@
tools/build/h2inc.pl []
tools/build/headerizer.pl []
tools/build/ops2c.pl [devel]
-tools/build/ops2pm.pl []
tools/build/parrot_config_c.pl []
tools/build/pbcversion_h.pl []
tools/build/pmc2c.pl [devel]
@@ -2126,7 +2117,6 @@
tools/dev/nm.pl []
tools/dev/nopaste.pl []
tools/dev/ops_not_tested.pl []
-tools/dev/opsrenumber.pl []
tools/dev/parrot-fuzzer []
tools/dev/parrot.supp []
tools/dev/parrot_api.pl []
Modified: branches/ops_massacre/PBC_COMPAT
==============================================================================
--- branches/ops_massacre/PBC_COMPAT Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/PBC_COMPAT Thu May 27 06:10:21 2010 (r47048)
@@ -27,6 +27,7 @@
# please insert tab separated entries at the top of the list
+6.18 2010.05.25 cotto removed ops.num
6.17 2010.05.20 NotFound store encoding of string constants
6.16 2010.05.18 plobsing move freeze/thaw adjacent to visit
6.15 2010.05.06 bacek add StringBuilder PMC
Modified: branches/ops_massacre/compilers/imcc/pbc.c
==============================================================================
--- branches/ops_massacre/compilers/imcc/pbc.c Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/compilers/imcc/pbc.c Thu May 27 06:10:21 2010 (r47048)
@@ -913,13 +913,25 @@
charset_name[p- p2 - 2] = '\0';
/*fprintf(stderr, "%s:%s\n", charset_name, encoding_name);*/
s_charset = Parrot_find_charset(interp, charset_name);
+ if (s_charset == NULL)
+ Parrot_ex_throw_from_c_args(interp, NULL,
+ EXCEPTION_INVALID_STRING_REPRESENTATION,
+ "Unknown charset '%s'", charset_name);
s_encoding = Parrot_find_encoding(interp, encoding_name);
+ if (s_encoding == NULL)
+ Parrot_ex_throw_from_c_args(interp, NULL,
+ EXCEPTION_INVALID_STRING_REPRESENTATION,
+ "Unknown encoding '%s'", encoding_name);
}
else {
strncpy(charset_name, buf, p - buf - 1);
charset_name[p - buf - 1] = '\0';
/*fprintf(stderr, "%s\n", charset_name);*/
s_charset = Parrot_find_charset(interp, charset_name);
+ if (s_charset == NULL)
+ Parrot_ex_throw_from_c_args(interp, NULL,
+ EXCEPTION_INVALID_STRING_REPRESENTATION,
+ "Unknown charset '%s'", charset_name);
}
if (strcmp(charset_name, "unicode") == 0)
src_encoding = Parrot_utf8_encoding_ptr;
Modified: branches/ops_massacre/compilers/opsc/ops2c.nqp
==============================================================================
--- branches/ops_massacre/compilers/opsc/ops2c.nqp Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/compilers/opsc/ops2c.nqp Thu May 27 06:10:21 2010 (r47048)
@@ -11,31 +11,43 @@
my $getopts := Q:PIR{ %r = new ['Getopt';'Obj'] };
$getopts.notOptStop();
+
+# build core ops
my $arg := $getopts.add();
$arg.long('core');
$arg.short('c');
+# build the dynops in one .ops file
$arg := $getopts.add();
$arg.long('dynamic');
$arg.short('d');
$arg.type('String');
+# don't write to any files
$arg := $getopts.add();
$arg.long('debug');
$arg.short('g');
+# don't add line numbers to generated files (not implemented)
$arg := $getopts.add();
$arg.long('no-lines');
$arg.short('n');
+# print anemic usage information and exit
$arg := $getopts.add();
$arg.long('help');
$arg.short('h');
+# regenerate ops.num et. al. even if it's not necessary
$arg := $getopts.add();
$arg.long('force-regen');
$arg.short('f');
+# suppress timing and debug output on stdout
+$arg := $getopts.add();
+$arg.long('quiet');
+$arg.short('q');
+
my $opts := $getopts.get_options(pir::getinterp__p()[2]);
if $opts<core> {
@@ -77,32 +89,33 @@
my $trans := Ops::Trans::C.new();
my $start_time := pir::time__N();
-my $debug := ?$opts<debug>;
+my $debug := ?$opts<debug>;
+my $quiet := ?$opts<quiet>;
my $f;
my $renum;
if $core {
my $lib := Ops::OpLib.new(
- :num_file('src/ops/ops.num'),
:skip_file('src/ops/ops.skip'),
+ :quiet($quiet)
);
- $f := Ops::File.new(|@files, :oplib($lib), :core(1));
+ $f := Ops::File.new(|@files, :oplib($lib), :core(1), :quiet($quiet));
}
else {
- $f := Ops::File.new(|@files, :core(0));
+ $f := Ops::File.new(|@files, :core(0), :quiet($quiet));
}
pir::sprintf(my $time, "%.3f", [pir::time__N() - $start_time] );
-#say("# Ops parsed in $time seconds.");
+$quiet || say("# Ops parsed in $time seconds.");
my $emitter := Ops::Emitter.new(
:ops_file($f), :trans($trans),
:script('ops2c.nqp'), :file(@files[0]),
- :flags( hash( core => $core ) ),
+ :flags( hash( core => $core, quiet => $quiet ) ),
);
unless $debug {
- if $force_regen || $f<renum>.need_regeneration {
+ if $core {
$emitter.print_ops_num_files();
}
$emitter.print_c_header_files();
Modified: branches/ops_massacre/compilers/opsc/opsc.pir
==============================================================================
--- branches/ops_massacre/compilers/opsc/opsc.pir Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/compilers/opsc/opsc.pir Thu May 27 06:10:21 2010 (r47048)
@@ -18,6 +18,18 @@
.include 'compilers/opsc/gen/Ops/File.pir'
.include 'compilers/opsc/gen/Ops/Renumberer.pir'
+
+.namespace []
+.sub 'main' :main
+ .param pmc args
+
+ $P0 = compreg 'Ops'
+ $P0.'command_line'(args)
+ exit 0
+.end
+
+
+
# Local Variables:
# mode: pir
# fill-column: 100
Modified: branches/ops_massacre/compilers/opsc/src/Ops/Compiler/Actions.pm
==============================================================================
--- branches/ops_massacre/compilers/opsc/src/Ops/Compiler/Actions.pm Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/compilers/opsc/src/Ops/Compiler/Actions.pm Thu May 27 06:10:21 2010 (r47048)
@@ -63,10 +63,7 @@
%flags{~$_<identifier>} := 1;
}
- my @args := list();
- if ($<op_params>) {
- @args := @($<op_params>[0].ast);
- }
+ my @args := @($<signature>.ast);
my @norm_args := normalize_args(@args);
# We have to clone @norm_args. Otherwise it will be destroyed...
@@ -224,7 +221,7 @@
}
-method op_params($/) {
+method signature($/) {
my $past := PAST::Stmts.new(
:node($/)
);
Modified: branches/ops_massacre/compilers/opsc/src/Ops/Compiler/Grammar.pm
==============================================================================
--- branches/ops_massacre/compilers/opsc/src/Ops/Compiler/Grammar.pm Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/compilers/opsc/src/Ops/Compiler/Grammar.pm Thu May 27 06:10:21 2010 (r47048)
@@ -8,18 +8,17 @@
rule TOP {
<body>
- [ $ || <panic: 'Syntax error'> ]
- {*}
+ [ $ || <.panic: 'Syntax error'> ]
}
rule body {
- [ <preamble> | <op> ]* {*}
+ [ <preamble> | <op> ]*
}
token preamble {
<begin_preamble>
<preamble_guts>
- <end_preamble> {*}
+ <end_preamble>
}
regex preamble_guts {
@@ -35,10 +34,10 @@
}
rule op {
- <op_type>? 'op' <op_name=identifier> '('
- [ <op_params>? || <panic: "Fail to parse params"> ]
- ')' <op_flag>*
- [ <op_body> || <panic: "Fail to parse op body"> ]
+ <op_type>? 'op' <op_name=identifier>
+ [ '(' <signature> ')' || <.panic: "Fail to parse signature"> ]
+ <op_flag>*
+ [ <op_body> || <.panic: "Fail to parse op body"> ]
{*}
}
@@ -46,18 +45,14 @@
[ 'inline' | 'function' ]
}
-rule op_params {
- <op_param> [ ',' <op_param> ]*
- {*}
-}
+rule signature { [ [<.ws><op_param><.ws>] ** ',' ]? }
rule op_param {
<op_param_direction> <op_param_type>
- {*}
}
token op_param_direction {
- # Order is crucial. PGE doesn't support LTM yet.
+ # Order is crucial. NQP doesn't support LTM yet.
[
| 'inout'
| 'inconst'
@@ -68,7 +63,7 @@
}
token op_param_type {
- # Order is crucial. PGE doesn't support LTM yet.
+ # Order is crucial. NQP doesn't support LTM yet.
[
| 'INTKEY'
| 'INT'
@@ -94,23 +89,32 @@
#Process op body by breaking it into "words" consisting entirely of whitespace,
#alnums or a single punctuation, then checking for interesting macros (e.g $1
#or goto NEXT() ) in the midst of the words.
-regex body_word {
+token body_word {
[
- | <macro_param>
- | <op_macro>
- | $<word>=[<alnum>+|<punct>|<space>+]
+ || <macro_param>
+ || <op_macro>
+ || <word>
]
- {*}
}
+token word {
+ || <quote>
+ || <ident>
+ || <alnum>
+ || <punct>
+ || <ws>
+}
+
+proto token quote { <...> }
+token quote:sym<apos> { <?[']> <quote_EXPR: ':q'> }
+token quote:sym<dblq> { <?["]> <quote_EXPR: ':q'> }
+
token macro_param {
- '$' $<num>=[<digit>+]
- {*}
+ '$' $<num>=<integer> # Up to nine params.
}
-regex op_macro {
- <macro_type> <space>* <macro_destination> <space>* '(' <space>* <body_word>*? ')'
- {*}
+rule op_macro {
+ <macro_type> <macro_destination> '(' <body_word>*? ')'
}
token macro_type {
Modified: branches/ops_massacre/compilers/opsc/src/Ops/Emitter.pm
==============================================================================
--- branches/ops_massacre/compilers/opsc/src/Ops/Emitter.pm Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/compilers/opsc/src/Ops/Emitter.pm Thu May 27 06:10:21 2010 (r47048)
@@ -16,6 +16,7 @@
self<script> := $script;
self<file> := $file;
self<flags> := %flags;
+ self<quiet> := %flags<quiet> // 0;
# Preparing various bits.
my $suffix := $trans.suffix();
@@ -119,49 +120,16 @@
method print_ops_num_files() {
- my $file := ~self<dir> ~ ~self<ops_file>.oplib.num_file;
+ my $file := ~self<dir> ~ "include/parrot/opsenum.h";
my $fh := pir::new__Ps('FileHandle');
$fh.open($file, 'w')
|| die("Can't open $file for writing: " ~ ~pir::err__s());
- self.emit_ops_num_file($fh);
- $fh.close();
-
- $file := ~self<dir> ~ "include/parrot/opsenum.h";
- $fh := pir::new__Ps('FileHandle');
- $fh.open($file, 'w')
- || die("Can't open $file for writing: " ~ ~pir::err__s());
self.emit_c_opsenum_header($fh, $file);
$fh.close();
}
-method emit_ops_num_file($fh) {
-
- if !self.exists('max_fixed_op_num') {
- self._prepare_ops_num();
- }
-
- $fh.print( join('', |self<ops_num_start>) );
- my $max_op_num := self<max_fixed_op_num> + 0; #+ 0 to force cloning
-
- for self.ops_file.ops -> $op {
- if self<numbered_ops>.exists( $op.full_name ) {
-
- $max_op_num++;
-
- my $space := pir::repeat__SsI(' ',
- 35 - pir::length__Is($op.full_name) - pir::length__Is(~$max_op_num));
- $fh.print($op.full_name ~ $space ~ $max_op_num ~ "\n");
- }
- }
-
-}
-
method emit_c_opsenum_header($fh, $file) {
- if !self.exists('max_fixed_op_num') {
- self._prepare_ops_num();
- }
-
self._emit_guard_prefix($fh, $file);
self._emit_preamble($fh);
@@ -177,54 +145,20 @@
$fh.print("enum OPS_ENUM \{\n");
- my $max_op_num := self<max_fixed_op_num> + 0;
+ my $max_op_num := 0;
for self.ops_file.ops -> $op {
- if self<numbered_ops>.exists( $op.full_name ) {
- $max_op_num++;
-
+ if !self.ops_file<core> || !self.ops_file.oplib.op_skip_table.exists( $op.full_name ) {
my $space := pir::repeat__SsI(' ', 30 - pir::length__Is($op.full_name));
$fh.print(" enum_ops_" ~ $op.full_name ~ $space ~ "=");
$space := pir::repeat__SsI(' ', 5 - pir::length__Is(~$max_op_num));
$fh.print($space ~ $max_op_num ~ ",\n");
+ $max_op_num++;
}
}
$fh.print("};\n");
}
-method _prepare_ops_num() {
-
- #grab all ops in ops.num
- self<numbered_ops> := hash();
- my $found_dynamic := 0;
- self<max_fixed_op_num> := 0;
- self<ops_num_start> := list();
-
- #record which ones have fixed numbers and which just need to be somewhere in ops.num
- for self.ops_file.oplib.num_file_lines -> $line {
-
- #copy all lines through ###DYNAMIC### into the new ops.num verbatim
- unless $found_dynamic {
- self<ops_num_start>.push(~$line);
- }
-
- if $line<op> {
- if $found_dynamic {
- self<numbered_ops>{ $line<op><name> } := 1;
- #say("# added '"~$line<op><name> ~" to numered ops");
- }
- else {
- #don't need to keep track of fixed ops
- self<max_fixed_op_num> := +$line<op><number>;
- #say("# added '"~$line<op><name> ~" to fixed ops");
- }
- }
- elsif $line<dynamic> {
- $found_dynamic := 1;
- }
- }
-}
-
method print_c_source_file() {
# Build file in memeory
my $fh := pir::new__Ps('StringHandle');
Modified: branches/ops_massacre/compilers/opsc/src/Ops/File.pm
==============================================================================
--- branches/ops_massacre/compilers/opsc/src/Ops/File.pm Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/compilers/opsc/src/Ops/File.pm Thu May 27 06:10:21 2010 (r47048)
@@ -19,8 +19,7 @@
C<Ops::File> takes one or more files of op functions and
creates real C code for them.
-This class is used by F<tools/build/ops2c.pl>,
-F<tools/build/ops2pm.pl> and F<tools/build/pbc2c.pl>.
+This class is used by F<tools/build/ops2c.pl>.
=head2 Op Functions
@@ -183,14 +182,14 @@
=end
-method new(*@files, :$oplib, :$core!, :$nolines) {
+method new(*@files, :$oplib, :$core!, :$nolines, :$quiet? = 0) {
self<files> := @files;
self<core> := $core;
self<ops> := list(); # Ops
self<preamble>:= '';
self<compiler>:= pir::compreg__Ps('Ops');
self<op_order>:= 0;
- self<renum> := Ops::Renumberer.new( :ops_file(self) );
+ self<quiet> := $quiet;
if $core {
self<oplib> := $oplib;
@@ -244,12 +243,12 @@
method read_ops($file, $nolines) {
$Ops::Compiler::Actions::OPLIB := self<oplib>;
- say("# Parsing $file...");
+ self<quiet> || say("# Parsing $file...");
my $start_time := pir::time__N();
my $buffer := slurp($file);
self.compile_ops($buffer, :experimental( $file ~~ /experimental\.ops/));
pir::sprintf(my $time, "%.3f", [pir::time__N() - $start_time] );
- say("# Parsed $file in $time seconds.");
+ self<quiet> || say("# Parsed $file in $time seconds.");
}
method compile_ops($str, :$experimental? = 0) {
@@ -285,30 +284,10 @@
method _calculate_op_codes() {
- my $code := self<oplib> ??
- self<oplib>.max_op_num + 1 !!
- 0;
+ my $code := 0;
for self<ops> -> $op {
- #ops listed in ops.num are non-experimental
- if self<oplib> {
- my $full_name := $op.full_name;
- if self<oplib>.op_num_table.exists($full_name) {
- $op<code> := self<oplib>.op_num_table{$full_name};
- }
- elsif !$op<experimental> && !self<oplib>.op_skip_table.exists($full_name) {
- die("Non-experimental op " ~ $op.full_name ~ " is not in ops.num.");
- }
- #ops not explicitly listed but not skipped are experimental
- else {
- $op<code> := $code++;
- say("# Experimental op " ~ $op.full_name ~ " is not in ops.num.");
- }
- }
- #if there's no oplib, we're compiling dynops and ops aren't experimental
- else {
- $op<code> := $code++;
- }
+ $op<code> := $code++;
}
}
Modified: branches/ops_massacre/compilers/opsc/src/Ops/Op.pm
==============================================================================
--- branches/ops_massacre/compilers/opsc/src/Ops/Op.pm Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/compilers/opsc/src/Ops/Op.pm Thu May 27 06:10:21 2010 (r47048)
@@ -367,10 +367,6 @@
=item F<tools/build/ops2c.pl>
-=item F<tools/build/ops2pm.pl>
-
-=item F<tools/build/pbc2c.pl>
-
=back
=head1 HISTORY
Modified: branches/ops_massacre/compilers/opsc/src/Ops/OpLib.pm
==============================================================================
--- branches/ops_massacre/compilers/opsc/src/Ops/OpLib.pm Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/compilers/opsc/src/Ops/OpLib.pm Thu May 27 06:10:21 2010 (r47048)
@@ -16,8 +16,8 @@
=begin DESCRIPTION
-Responsible for loading F<src/ops/ops.num> and F<src/ops/ops.skip> files,
-parse F<.ops> files, sort them, etc.
+Responsible for loading F<src/ops/ops.skip> files, parse F<.ops> files, sort
+them, etc.
Heavily inspired by Perl5 Parrot::Ops2pm.
@@ -26,7 +26,6 @@
=begin SYNOPSIS
my $oplib := Ops::OpLib.new(
- :num_file('../../src/ops/ops.num'),
:skip_file('../../src/ops/ops.skip'),
));
@@ -36,32 +35,6 @@
=over 4
-=item * C<$.max_op_num>
-
-Scalar holding number of highest non-experimental op. Example:
-
- 'max_op_num' => 1246,
-
-=item * C<%.op_num_table>
-
-Hash holding mapping of opcode names ops to their numbers.
-Example:
-
- 'op_num_table' => {
- 'pow_p_p_i' => 650,
- 'say_s' => 463,
- 'lsr_p_p_i' => 207,
- 'lt_s_sc_ic' => 289,
- # ...
- 'debug_init' => 429,
- 'iseq_i_nc_n' => 397,
- 'eq_addr_sc_s_ic' => 254
- },
-
-Per F<src/ops/ops.num>, this mapping exists so that we can nail down
-the op numbers for the core opcodes in a particular version of the
-bytecode and provide backward-compatibility for bytecode.
-
=item * C<%.op_skip_table>
Reference to a 'seen-hash' of skipped opcodes.
@@ -93,15 +66,12 @@
=end METHODS
-method new(:$num_file, :$skip_file) {
- self<num_file> := $num_file // './src/ops/ops.num';
+method new(:$skip_file, :$quiet? = 0) {
self<skip_file> := $skip_file // './src/ops/ops.skip';
+ self<quiet> := $quiet;
# Initialize self.
- self<max_op_num> := 0;
- self<op_num_table> := hash();
self<op_skip_table> := hash();
- self<num_file_lines>:= list();
self<ops_past> := list();
self<regen_ops_num> := 0;
@@ -119,61 +89,9 @@
=end METHODS
method load_op_map_files() {
- self._load_num_file;
self._load_skip_file;
}
-my method _load_num_file() {
- # slurp isn't very efficient. But extending NQP beyond bare minimum is not in scope.
- my $buf := slurp(self<num_file>);
- grammar NUM {
- rule TOP { <line>+ }
-
- rule line {
- [
- | <op>
- | <dynamic>
- | <comment>
- ]
- }
- rule op { $<name>=(\w+) $<number>=(\d+) }
- rule dynamic { '###DYNAMIC###' \N* }
- rule comment { '#' \N* }
- }
-
- #say("Parsing NUM");
- my $ops := NUM.parse($buf);
- #_dumper($ops);
- #pir::exit(0);
-
- my $prev := -1;
- for $ops<line> {
- self<num_file_lines>.push($_);
- if $_<op> {
- my $name := ~$_<op><name>;
- my $number := +$_<op><number>;
- if (+$number) eq $number {
- if ($prev + 1 != $number) {
- self<regen_ops_num> := 1;
- say("# hole in ops.num before #$number: will regenerate ops.num");
- }
- if self<op_num_table>.exists($name) {
- self<regen_ops_num> := 1;
- say("# duplicate opcode $name and $number: will regenerate ops.num");
- }
-
- $prev := $number;
- self<op_num_table>{$name} := $number;
- if ( $number > self<max_op_num> ) {
- self<max_op_num> := $number;
- }
- }
- }
- }
-
- #_dumper(self<op_num_table>);
-}
-
method _load_skip_file() {
my $buf := slurp(self<skip_file>);
grammar SKIP {
@@ -191,9 +109,6 @@
my $lines := SKIP.parse($buf);
for $lines<op> {
- if self<op_num_table> && self<op_num_table>.exists($_<name>) {
- die("skipped opcode '$_' is also in num_file");
- }
self<op_skip_table>{$_<name>} := 1;
}
}
@@ -205,28 +120,12 @@
=over 4
-=item * C<max_op_num>
-
-=item * C<op_num_table>
-
=item * C<op_skip_table>
-=item * C<num_file>
-
-=item * C<num_file_lines>
-
=end ACCESSORS
-method max_op_num() { self<max_op_num>; }
-
-method op_num_table() { self<op_num_table>; }
-
method op_skip_table() { self<op_skip_table>; }
-method num_file() { self<num_file>; }
-
-method num_file_lines() { self<num_file_lines>; }
-
# Local Variables:
# mode: perl6
# fill-column: 100
Modified: branches/ops_massacre/config/gen/makefiles/root.in
==============================================================================
--- branches/ops_massacre/config/gen/makefiles/root.in Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/config/gen/makefiles/root.in Thu May 27 06:10:21 2010 (r47048)
@@ -820,7 +820,7 @@
installable: all $(INSTALLABLEPARROT) $(INSTALLABLEPDUMP) $(INSTALLABLEDIS) $(INSTALLABLEPDB) $(INSTALLABLEPBC_MERGE) $(INSTALLABLEPBCTOEXE) $(INSTALLABLECONFIG) $(INSTALLABLENQP) $(INSTALLABLENCITHUNKGEN) $(INSTALLABLEPROVE) $(INSTALLABLEOPS2C)
bootstrap-ops : $(OPS2C)
- $(OPS2C) --core
+ $(OPS2C) --core --quiet
$(MAKE) .
runtime/parrot/include/parrotlib.pbc: runtime/parrot/library/parrotlib.pir $(PARROT) $(GEN_PASM_INCLUDES)
@@ -1526,6 +1526,7 @@
src/string/encoding/utf8.h \
src/string/encoding/utf16.h \
src/string/encoding/ucs2.h \
+ src/string/encoding/ucs4.h \
src/string/charset/ascii.h \
src/string/charset/binary.h \
src/string/charset/iso-8859-1.h \
Modified: branches/ops_massacre/docs/pdds/pdd28_strings.pod
==============================================================================
--- branches/ops_massacre/docs/pdds/pdd28_strings.pod Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/docs/pdds/pdd28_strings.pod Thu May 27 06:10:21 2010 (r47048)
@@ -161,7 +161,7 @@
code must always assume a variable-byte encoding, and use expensive
lookaheads. The cost is incurred on every operation, though the particular
string operated on might not contain combining characters. It's particularly
-noticeable in parsing and regular expression matches, where backtracking
+noticeable in parsing and regular expres699sion matches, where backtracking
operations may re-traverse the characters of a simple string hundreds of
times.
@@ -296,7 +296,7 @@
may be variably sized.}}
=item hashval
-
+699
A cache of the hash value of the string, for rapid lookups when the string is
used as a hash key.
Modified: branches/ops_massacre/examples/languages/squaak/doc/tutorial_episode_1.pod
==============================================================================
--- branches/ops_massacre/examples/languages/squaak/doc/tutorial_episode_1.pod Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/examples/languages/squaak/doc/tutorial_episode_1.pod Thu May 27 06:10:21 2010 (r47048)
@@ -9,7 +9,7 @@
Parrot Compiler Tools. If you're interested in virtual machines, you've
probably heard of the Parrot virtual machine. Parrot is a generic virtual
machine designed for dynamic languages. This is in contrast with the Java
-virtual machine (JVM) and Microsoft's Common Language Runtime (CLR), both of
+virtual machine (JVM) and Microsoft's B<C>ommon B<L>anguage B<R>untime (CLR), both of
which were designed to run static languages. Both the JVM and Microsoft
(through the Dynamic Language Runtime -- DLR) are adding support for dynamic
languages, but their primary focus is still static languages.
@@ -17,7 +17,7 @@
=head2 High Level Languages
The main purpose of a virtual machine is to run programs. These programs are
-typically written in some High Level Language (HLL). Some well-known dynamic
+typically written in some B<H>igh B<L>evel B<L>anguage (HLL). Some well-known dynamic
languages (sometimes referred to as scripting languages) are Lua, Perl, PHP,
Python, Ruby, and Tcl. Parrot is designed to be able to run all these languages.
Each language that Parrot hosts, needs a compiler to parse the syntax of the
@@ -34,7 +34,7 @@
=head2 The Parrot Compiler Toolkit
-Enter the Parrot Compiler Toolkit (PCT). In order to make Parrot an interesting
+Enter the B<P>arrot B<C>ompiler B<T>oolkit (PCT). In order to make Parrot an interesting
target for language developers, the process of constructing a compiler should be
supported by the right tools. Just as any construction task becomes much easier
if you have the right tools (you wouldn't build a house using only your bare
@@ -99,13 +99,13 @@
=over 4
-=item Parrot Grammar Engine (PGE).
+=item B<P>arrot B<G>rammar B<E>ngine (PGE).
The PGE is an advanced engine for regular expressions. Besides regexes as found
in Perl 5, it can also be used to define language grammars, using Perl 6 syntax.
(Check the references for the specification.)
-=item Parrot Abstract Syntax Tree (PAST).
+=item B<P>arrot B<A>bstract B<S>yntax B<T>ree (PAST).
The PAST nodes are a set of classes defining generic abstract syntax tree nodes
that represent common language constructs.
@@ -114,7 +114,7 @@
This class is the compiler driver for any PCT-based compiler.
-=item Not Quite Perl (6) (NQP).
+=item B<N>ot B<Q>uite B<P>erl (6) (NQP).
NQP is a lightweight language inspired by Perl 6 and can be used to write the
methods that must be executed during the parsing phase, just as you can write
@@ -140,18 +140,18 @@
$ perl tools/dev/mk_language_shell.pl Squaak languages/squaak
(Note: if you're on Windows, you should use backslashes.) This will generate the
-files in a directory languages/squaak, and use the name Squaak as the language's
-name. The last config step is to create the Makefile for your new language:
+files in a directory F<languages/squaak>, and use the name Squaak as the language's
+name.
- $ perl Configure.pl --languages=squaak
+After this, go to the directory F<languages/squaak> and type:
-After this, go to the directory languages/squaak and type:
-
- $ make test
+ $ parrot setup.pir test
This will compile the generated files and run the test suite. If you want more
information on what files are being generated, please check out the references
-at the end of this episode.
+at the end of this episode or read the documentation included in the file
+F<mk_language_shell.pl>. For that you can use an installed parrot executable
+from your distribution or one you have just compiled.
Note that we didn't write a single line of code, and already we have the basic
infrastructure in place to get us started. Of course, the generated compiler
@@ -163,7 +163,7 @@
say "Squaak!";
-Save the file (for instance as test.sq) and type:
+Save it the as file F<test.sq> and type:
$ ../../parrot squaak.pbc test.sq
Modified: branches/ops_massacre/include/parrot/encoding.h
==============================================================================
--- branches/ops_massacre/include/parrot/encoding.h Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/include/parrot/encoding.h Thu May 27 06:10:21 2010 (r47048)
@@ -56,6 +56,7 @@
PARROT_DATA ENCODING *Parrot_utf8_encoding_ptr;
PARROT_DATA ENCODING *Parrot_utf16_encoding_ptr;
PARROT_DATA ENCODING *Parrot_ucs2_encoding_ptr;
+PARROT_DATA ENCODING *Parrot_ucs4_encoding_ptr;
PARROT_DATA ENCODING *Parrot_default_encoding_ptr;
#endif
Modified: branches/ops_massacre/include/parrot/oplib/core_ops.h
==============================================================================
--- branches/ops_massacre/include/parrot/oplib/core_ops.h Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/include/parrot/oplib/core_ops.h Thu May 27 06:10:21 2010 (r47048)
@@ -1099,8 +1099,8 @@
opcode_t * Parrot_root_new_p_pc_ic(opcode_t *, PARROT_INTERP);
opcode_t * Parrot_find_codepoint_i_s(opcode_t *, PARROT_INTERP);
opcode_t * Parrot_find_codepoint_i_sc(opcode_t *, PARROT_INTERP);
- opcode_t * Parrot_unroll_p(opcode_t *, PARROT_INTERP);
- opcode_t * Parrot_unroll_pc(opcode_t *, PARROT_INTERP);
+ opcode_t * Parrot_finalize_p(opcode_t *, PARROT_INTERP);
+ opcode_t * Parrot_finalize_pc(opcode_t *, PARROT_INTERP);
#endif /* PARROT_OPLIB_CORE_OPS_H_GUARD */
Modified: branches/ops_massacre/include/parrot/oplib/ops.h
==============================================================================
--- branches/ops_massacre/include/parrot/oplib/ops.h Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/include/parrot/oplib/ops.h Thu May 27 06:10:21 2010 (r47048)
@@ -1094,8 +1094,8 @@
PARROT_OP_root_new_p_pc_ic, /* 1075 */
PARROT_OP_find_codepoint_i_s, /* 1076 */
PARROT_OP_find_codepoint_i_sc, /* 1077 */
- PARROT_OP_unroll_p, /* 1078 */
- PARROT_OP_unroll_pc /* 1079 */
+ PARROT_OP_finalize_p, /* 1078 */
+ PARROT_OP_finalize_pc /* 1079 */
} parrot_opcode_enums;
Modified: branches/ops_massacre/include/parrot/pmc.h
==============================================================================
--- branches/ops_massacre/include/parrot/pmc.h Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/include/parrot/pmc.h Thu May 27 06:10:21 2010 (r47048)
@@ -245,6 +245,9 @@
#define pmc_type Parrot_pmc_get_type_str
#define pmc_type_p Parrot_pmc_get_type
+#define PMC_IS_TYPE(p, t) ((p)->vtable->base_type == enum_class_ ## t)
+#define PMC_IS_TYPE_ENUM(p, e) ((p)->vtable->base_type == (e))
+
#endif /* PARROT_PMC_H_GUARD */
/*
Modified: branches/ops_massacre/lib/Parrot/Configure/Options/Conf.pm
==============================================================================
--- branches/ops_massacre/lib/Parrot/Configure/Options/Conf.pm Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/lib/Parrot/Configure/Options/Conf.pm Thu May 27 06:10:21 2010 (r47048)
@@ -44,8 +44,6 @@
which upon failure cause Configure.pl to halt
--silent Don't be verbose, interactive or fatal
--nomanicheck Don't check the MANIFEST
- --languages="list of languages"
- Specify a list of languages to process
--ask Have Configure ask for commonly-changed info
--test=configure Run tests of configuration tools before configuring
Modified: branches/ops_massacre/lib/Parrot/Configure/Options/Conf/Shared.pm
==============================================================================
--- branches/ops_massacre/lib/Parrot/Configure/Options/Conf/Shared.pm Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/lib/Parrot/Configure/Options/Conf/Shared.pm Thu May 27 06:10:21 2010 (r47048)
@@ -39,7 +39,6 @@
intval
jitcapable
buildframes
- languages
ld
ldflags
lex
Modified: branches/ops_massacre/lib/Parrot/Configure/Options/Reconf.pm
==============================================================================
--- branches/ops_massacre/lib/Parrot/Configure/Options/Reconf.pm Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/lib/Parrot/Configure/Options/Reconf.pm Thu May 27 06:10:21 2010 (r47048)
@@ -1,4 +1,4 @@
-# Copyright (C) 2007, Parrot Foundation.
+# Copyright (C) 2007-2010, Parrot Foundation.
# $Id$
package Parrot::Configure::Options::Reconf;
@@ -16,7 +16,6 @@
ask
debugging
help
- languages
lex
maintainer
step
@@ -57,8 +56,6 @@
--step=(gen::makefiles)
Execute a single configure step
--target=(Makefile) Regenerate a specific makefile
- --languages="list of languages"
- Specify a list of languages to process
--ask Have Configure ask for commonly-changed info
Modified: branches/ops_massacre/lib/Parrot/Configure/Options/Test/Prepare.pm
==============================================================================
--- branches/ops_massacre/lib/Parrot/Configure/Options/Test/Prepare.pm Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/lib/Parrot/Configure/Options/Test/Prepare.pm Thu May 27 06:10:21 2010 (r47048)
@@ -161,8 +161,6 @@
t/postconfigure/
t/tools/pmc2cutils/
- t/tools/ops2cutils/
- t/tools/ops2pm/
t/pharness/
=back
Modified: branches/ops_massacre/lib/Parrot/Docs/Section/Ops.pm
==============================================================================
--- branches/ops_massacre/lib/Parrot/Docs/Section/Ops.pm Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/lib/Parrot/Docs/Section/Ops.pm Thu May 27 06:10:21 2010 (r47048)
@@ -53,12 +53,6 @@
'Opcodes',
'ops.html',
'',
- $self->new_group(
- 'Tools',
- '',
- $self->new_item( '', 'tools/build/ops2c.pl' ),
- $self->new_item( '', 'tools/build/ops2pm.pl' ),
- ),
$self->new_group( 'Opcode Libraries', '', @core_ops ),
$self->new_group( 'Dynamic Opcode Libraries', '', @dynamic_ops ),
);
Modified: branches/ops_massacre/lib/Parrot/Docs/Section/Tools.pm
==============================================================================
--- branches/ops_massacre/lib/Parrot/Docs/Section/Tools.pm Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/lib/Parrot/Docs/Section/Tools.pm Thu May 27 06:10:21 2010 (r47048)
@@ -53,8 +53,6 @@
'',
$self->new_item( '', 'docs/configuration.pod' ),
$self->new_item( '', 'tools/build/c2str.pl' ),
- $self->new_item( '', 'tools/build/ops2c.pl' ),
- $self->new_item( '', 'tools/build/ops2pm.pl' ),
$self->new_item( '', 'tools/build/parrot_config_c.pl' ),
$self->new_item( '', 'tools/build/pmc2c.pl' ),
$self->new_item( '', 'tools/dev/install_files.pl' ),
Deleted: branches/ops_massacre/lib/Parrot/Op.pm
==============================================================================
--- branches/ops_massacre/lib/Parrot/Op.pm Thu May 27 06:10:21 2010 (r47047)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,423 +0,0 @@
-#! perl
-# Copyright (C) 2001-2009, Parrot Foundation.
-# $Id$
-
-=head1 NAME
-
-Parrot::Op - Parrot Operation
-
-=head1 SYNOPSIS
-
- use Parrot::Op;
-
-=head1 DESCRIPTION
-
-C<Parrot::Op> represents a Parrot operation (op, for short), as read
-from an ops file via C<Parrot::OpsFile>, or perhaps even generated by
-some other means. It is the Perl equivalent of the C<op_info_t> C
-C<struct> defined in F<include/parrot/op.h>.
-
-=head2 Op Type
-
-Ops are either I<auto> or I<manual>. Manual ops are responsible for
-having explicit next-op C<RETURN()> statements, while auto ops can count
-on an automatically generated next-op to be appended to the op body.
-
-Note that F<tools/build/ops2c.pl> supplies either 'inline' or 'function'
-as the op's type, depending on whether the C<inline> keyword is present
-in the op definition. This has the effect of causing all ops to be
-considered manual.
-
-=head2 Op Arguments
-
-Note that argument 0 is considered to be the op itself, with arguments
-1..9 being the arguments passed to the op.
-
-Op argument direction and type are represented by short one or two letter
-descriptors.
-
-Op Direction:
-
- i The argument is incoming
- o The argument is outgoing
- io The argument is both incoming and outgoing
-
-Op Type:
-
- i The argument is an integer register index.
- n The argument is a number register index.
- p The argument is a PMC register index.
- s The argument is a string register index.
- ic The argument is an integer constant (in-line).
- nc The argument is a number constant index.
- pc The argument is a PMC constant index.
- sc The argument is a string constant index.
- kc The argument is a key constant index.
- ki The argument is a key integer register index.
- kic The argument is a key integer constant (in-line).
-
-=head2 Class Methods
-
-=over 4
-
-=cut
-
-package Parrot::Op;
-
-use strict;
-use warnings;
-
-=item C<new($code, $type, $name, $args, $argdirs, $labels, $flags)>
-
-Allocates a new bodyless op. A body must be provided eventually for the
-op to be usable.
-
-C<$code> is the integer identifier for the op.
-
-C<$type> is the type of op (see the note on op types above).
-
-C<$name> is the name of the op.
-
-C<$args> is a reference to an array of argument type descriptors.
-
-C<$argdirs> is a reference to an array of argument direction
-descriptors. Element I<x> is the direction of argument C<< $args->[I<x>]
->>.
-
-C<$labels> is a reference to an array of boolean values indicating
-whether each argument direction was prefixed by 'C<label>'.
-
-C<$flags> is a hash reference containing zero or more I<hints> or
-I<directives>.
-
-=cut
-
-sub new {
- my $class = shift;
- my ( $code, $type, $name, $args, $argdirs, $labels, $flags ) = @_;
-
- my $self = {
- CODE => $code,
- TYPE => $type,
- NAME => $name,
- ARGS => [@$args],
- ARGDIRS => [@$argdirs],
- LABELS => [@$labels],
- FLAGS => $flags,
- BODY => '',
- JUMP => 0,
- };
-
- return bless $self, $class;
-}
-
-=back
-
-=head2 Instance Methods
-
-=over 4
-
-=item C<code()>
-
-Returns the op code.
-
-=cut
-
-sub code {
- my $self = shift;
-
- return $self->{CODE};
-}
-
-=item C<type()>
-
-The type of the op, either 'inline' or 'function'.
-
-=cut
-
-sub type {
- my $self = shift;
-
- return $self->{TYPE};
-}
-
-=item C<name()>
-
-The (short or root) name of the op.
-
-=cut
-
-sub name {
- my $self = shift;
-
- return $self->{NAME};
-}
-
-=item C<full_name()>
-
-For argumentless ops, it's the same as C<name()>. For ops with
-arguments, an underscore followed by underscore-separated argument types
-are appended to the name.
-
-=cut
-
-sub full_name {
- my $self = shift;
- my $name = $self->name;
- my @arg_types = $self->arg_types;
-
- $name .= "_" . join( "_", @arg_types ) if @arg_types;
-
- return $name;
-}
-
-=item C<func_name()>
-
-The same as C<full_name()>, but with 'C<Parrot_>' prefixed.
-
-=cut
-
-sub func_name {
- my ( $self, $trans ) = @_;
-
- return $trans->prefix . $self->full_name;
-}
-
-=item C<arg_types()>
-
-Returns the types of the op's arguments.
-
-=cut
-
-sub arg_types {
- my $self = shift;
-
- return @{ $self->{ARGS} };
-}
-
-=item C<arg_type($index)>
-
-Returns the type of the op's argument at C<$index>.
-
-=cut
-
-sub arg_type {
- my $self = shift;
-
- return $self->{ARGS}[shift];
-}
-
-=item C<arg_dirs()>
-
-Returns the directions of the op's arguments.
-
-=cut
-
-sub arg_dirs {
- my $self = shift;
-
- return @{ $self->{ARGDIRS} };
-}
-
-=item C<labels()>
-
-Returns the labels.
-
-=cut
-
-sub labels {
- my $self = shift;
-
- return @{ $self->{LABELS} };
-}
-
-=item C<flags(@flags)>
-
-=item C<flags()>
-
-Sets/gets the op's flags. This returns a hash reference, whose keys are any
-flags (passed as ":flag") specified for the op.
-
-=cut
-
-sub flags {
- my $self = shift;
-
- if (@_) {
- $self->{FLAGS} = shift;
- }
-
- return $self->{FLAGS};
-}
-
-=item C<arg_dir($index)>
-
-Returns the direction of the op's argument at C<$index>.
-
-=cut
-
-sub arg_dir {
- my $self = shift;
-
- return $self->{ARGDIRS}[shift];
-}
-
-=item C<body($body)>
-
-=item C<body()>
-
-Sets/gets the op's code body.
-
-=cut
-
-sub body {
- my $self = shift;
-
- if (@_) {
- $self->{BODY} = shift;
- }
-
- return $self->{BODY};
-}
-
-=item C<jump($jump)>
-
-=item C<jump()>
-
-Sets/gets a string containing one or more C<op_jump_t> values joined with
-C<|> (see F<include/parrot/op.h>). This indicates if and how an op
-may jump.
-
-=cut
-
-sub jump {
- my $self = shift;
-
- if (@_) {
- $self->{JUMP} = shift;
- }
-
- return $self->{JUMP};
-}
-
-# Called from rewrite_body() to perform the actual substitutions.
-sub _substitute {
- my $self = shift;
- local $_ = shift;
- my $trans = shift;
- my $preamble_only = shift;
-
- my $rewrote_access =
- s/{{\@([^{]*?)}}/ $trans->access_arg($self->arg_type($1 - 1), $1, $self); /me;
-
- die "Argument access not allowed in preamble\n"
- if $preamble_only && $rewrote_access;
-
- s/{{=0,=([^{]*?)}}/ $trans->restart_address($1) . "; {{=0}}"; /me;
- s/{{=0,\+=([^{]*?)}}/ $trans->restart_offset($1) . "; {{=0}}"; /me;
-
- s/{{\+=([^{]*?)}}/ $trans->goto_offset($1); /me;
- s/{{=([^*][^{]*?)}}/ $trans->goto_address($1); /me;
-
- s/{{\^(\d+)}}/ $1 /me;
- s/{{\^\+([^{]*?)}}/ $trans->expr_offset($1); /me;
- s/{{\^([^{]*?)}}/ $trans->expr_address($1); /me;
-
- return $_;
-}
-
-=item C<rewrite_body($body, $trans, [$preamble])>
-
-Performs the various macro substitutions using the specified transform,
-correctly handling nested substitions, and repeating over the whole string
-until no more substitutions can be made.
-
-C<VTABLE_> macros are enforced by converting C<<< I<< x >>->vtable->I<<
-method >> >>> to C<VTABLE_I<method>>.
-
-=cut
-
-sub rewrite_body {
- my ( $self, $body, $trans, $preamble_only ) = @_;
-
- while (1) {
- my $new_body = $self->_substitute( $body, $trans, !!$preamble_only );
-
- last if $body eq $new_body;
-
- $body = $new_body;
- }
-
- return $body;
-}
-
-=item C<source($trans)>
-
-Returns the L<C<body()>> of the op with substitutions made by
-C<$trans> (a subclass of C<Parrot::OpTrans>).
-
-=cut
-
-sub source {
- my ( $self, $trans ) = @_;
-
- my $flags = $self->flags;
-
- if (exists($$flags{pic})
- && !( ref($trans) eq 'Parrot::OpTrans::CGP' || ref($trans) eq 'Parrot::OpTrans::CSwitch' ) )
- {
- return qq{PANIC(interp, "How did you do that");\n};
- }
-
- my $prelude = $trans->can( 'add_body_prelude' )
- ? $trans->add_body_prelude()
- : '';
-
- return $self->rewrite_body( $prelude . $self->body, $trans );
-}
-
-=item C<size()>
-
-Returns the op's number of arguments. Note that this also includes
-the op itself as one argument.
-
-=cut
-
-sub size {
- my $self = shift;
-
- return scalar( $self->arg_types + 1 );
-}
-
-=back
-
-=head1 SEE ALSO
-
-=over 4
-
-=item C<Parrot::OpsFile>
-
-=item C<Parrot::OpTrans>
-
-=item F<tools/build/ops2c.pl>
-
-=item F<tools/build/ops2pm.pl>
-
-=item F<tools/build/pbc2c.pl>
-
-=back
-
-=head1 HISTORY
-
-Author: Gregor N. Purdy E<lt>gregor at focusresearch.comE<gt>
-
-=cut
-
-1;
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
Deleted: branches/ops_massacre/lib/Parrot/OpTrans.pm
==============================================================================
--- branches/ops_massacre/lib/Parrot/OpTrans.pm Thu May 27 06:10:21 2010 (r47047)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,225 +0,0 @@
-# Copyright (C) 2002-2007, Parrot Foundation.
-# $Id$
-
-=head1 NAME
-
-Parrot::OpTrans - Transform Ops to C Code
-
-=head1 DESCRIPTION
-
-C<Parrot::OpTrans> is the abstract superclass for the Parrot op to C
-transforms. Each transform contains various bits of information needed
-to generate the C code, and creates a different type of run loop. The
-methods defined here supply various default values and behaviour common
-to all transforms.
-
-The subclass hierarchy is as follows:
-
- OpTrans
- |
- |
- C
-
-=head2 Class Methods
-
-=over 4
-
-=cut
-
-package Parrot::OpTrans;
-
-use strict;
-use warnings;
-
-=item C<new()>
-
-Returns a new instance.
-
-=cut
-
-sub new {
- return bless {}, shift;
-}
-
-=back
-
-=head2 Instance Methods
-
-=over 4
-
-=item C<prefix()>
-
-Returns the default 'C<Parrot_>' prefix.
-
-Used by C<Parrot::Op>'s C<func_name()> to individuate op function names.
-
-=cut
-
-sub prefix {
- return 'Parrot_';
-}
-
-=item C<suffix()>
-
-Implemented in subclasses to return a suffix with which to individuate
-variable names. This default implementation returns an empty string.
-
-=cut
-
-sub suffix {
- return '';
-}
-
-=item C<core_type()>
-
-Implemented in subclasses to return the type of core created by the
-transform. This default implementation raises an exception indicating
-that the core type is missing. See the C<Parrot_Run_core_t> C<enum> in
-F<include/parrot/interpreter.h> for a list of the core types.
-
-=cut
-
-sub core_type {
- my $self = shift;
-
- die ref($self) . " doesn't have core_type()";
-}
-
-=item C<run_core_func_decl($base)>
-
-Optionally implemented in subclasses to return the C code for the run
-core function declaration. C<$base> is the name of the main ops file minus
-the .ops extension.
-
-=item C<ops_addr_decl($base_suffix)>
-
-Optionally implemented in subclasses to return the C code for the ops
-address declaration. C<$base_suffix> is the name of the main ops file minus
-the .ops extension with C<suffix()> and an underscore appended.
-
-=item C<run_core_func_decl($base)>
-
-Optionally implemented in subclasses to return the C code for the run
-core function declaration. C<$base> is the same as for
-C<run_core_func_decl()>.
-
-=item C<run_core_func_start()>
-
-Implemented in subclasses, if C<run_core_func_decl()> is implemented, to
-return the C code prior to the run core function.
-
-=item C<run_core_after_addr_table($base_suffix)>
-
-Optionally implemented in subclasses to return the run core C code for
-section after the address table. C<$base_suffix> is the same as for
-C<ops_addr_decl()>.
-
-=item C<run_core_finish($base)>
-
-Implemented in subclasses to return the C code following the run core
-function. C<$base> is the same as for C<run_core_func_decl()>.
-
-=item C<init_func_init1($base)>
-
-Optionally implemented in subclasses to return the C code for the core's
-init function. C<$base> is the same as for C<run_core_func_decl()>.
-
-=item C<init_set_dispatch($base_suffix)>
-
-Optionally implemented in subclasses to return the C code for
-initializing the dispatch mechanism within the core's init function.
-C<$base_suffix> is the same as for C<ops_addr_decl()>.
-
-=back
-
-B<Macro Substitutions>
-
-The following methods are called by C<Parrot::OpFile> to perform ops
-file macro substitutions.
-
-=over
-
-=item C<access_arg($type, $value, $op)>
-
-Implemented in subclasses to return the C code for the specified op
-argument type and value. C<$op> is an instance of C<Parrot::Op>.
-
-=item C<gen_goto($where)>
-
-The various C<goto_I<X>> methods below call this method with the return
-value of an C<expr_I<X>> method (implemented in subclass).
-
-=cut
-
-sub gen_goto {
- my ( $self, $where_str ) = @_;
-
- return "return $where_str";
-}
-
-=item C<restart_address($address)>
-
-Implemented in subclasses to return the C code for C<restart
-ADDRESS($address)>.
-
-=item C<restart_offset($offset)>
-
-Implemented in subclasses to return the C code for C<restart
-OFFSET($offset)>.
-
-=item C<goto_address($address)>
-
-Transforms the C<goto ADDRESS($address)> macro in an ops file into the
-relevant C code.
-
-=cut
-
-sub goto_address {
- my $self = shift;
-
- return $self->gen_goto( $self->expr_address(@_) );
-}
-
-=item C<goto_offset($offset)>
-
-Transforms the C<goto OFFSET($offset)> macro in an ops file into the
-relevant C code.
-
-=cut
-
-sub goto_offset {
- my $self = shift;
-
- return $self->gen_goto( $self->expr_offset(@_) );
-}
-
-=item C<expr_offset($offset)>
-
-Implemented in subclasses to return the C code for C<OFFSET($offset)>.
-Called by C<goto_offset()>.
-
-=item C<expr_address($address)>
-
-Implemented in subclasses to return the C code for C<ADDRESS($address)>.
-Called by C<goto_address()>.
-
-=back
-
-=head1 SEE ALSO
-
-=over 4
-
-=item C<Parrot::OpTrans::C>
-
-=back
-
-=cut
-
-1;
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
Deleted: branches/ops_massacre/lib/Parrot/Ops2pm.pm
==============================================================================
--- branches/ops_massacre/lib/Parrot/Ops2pm.pm Thu May 27 06:10:21 2010 (r47047)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,537 +0,0 @@
-# Copyright (C) 2007, Parrot Foundation.
-# $Id$
-package Parrot::Ops2pm;
-use strict;
-use warnings;
-use Cwd;
-use Data::Dumper ();
-use File::Path ();
-use File::Spec;
-use lib qw ( lib );
-use base qw( Parrot::Ops2pm::Base );
-use Parrot::OpsFile;
-
-=head1 NAME
-
-Parrot::Ops2pm - Methods holding functionality for F<tools/build/ops2pm.pl>.
-
-=head1 SYNOPSIS
-
- use Parrot::Ops2pm;
-
- $self = Parrot::Ops2pm->new( {
- argv => [ @ARGV ],
- nolines => $nolines_flag,
- moddir => "lib/Parrot/OpLib",
- module => "core.pm",
- inc_dir => "include/parrot/oplib",
- inc_f => "ops.h",
- script => "tools/build/ops2pm.pl",
- } );
-
- $self->prepare_ops();
- $self->load_op_map_files();
- $self->sort_ops();
- $self->prepare_real_ops();
- $self->print_module();
- $self->print_h();
- exit 0;
-
-=cut
-
-=head1 DESCRIPTION
-
-Parrot::Ops2pm provides methods called by F<tools/build/ops2pm.pl>, a
-program which is called at the very beginning of the Parrot F<make> process.
-The program's function is to build two files:
-
-=over 4
-
-=item * F<lib/Parrot/OpLib/core.pm>
-
-=item * F<include/parrot/oplib/ops.h>
-
-=back
-
-The functionality once (pre-April 2007) found in F<tools/build/ops2pm.pl> has
-been extracted into this package's methods in order to support
-component-focused testing and future refactoring.
-
-=head1 METHODS
-
-=head2 C<new()>
-
-Inherited from Parrot::Ops2pm::Base and documented in
-F<lib/Parrot/Ops2pm/Base.pm>.
-
-=head2 C<prepare_ops()>
-
-Inherited from Parrot::Ops2pm::Base and documented in
-F<lib/Parrot/Ops2pm/Base.pm>.
-
-=head2 C<load_op_map_files()>
-
-=over 4
-
-=item * Purpose
-
-When F<tools/build/ops2pm.pl> is called by F<make>, this method
-checks the number of ops strictly against F<src/ops/ops.num> and
-F<src/ops/ops.skip>.
-
-=item * Arguments
-
-None. (Implicitly requires that the C<argv> and C<script> keys
-have been provided to the constructor.)
-
-=item * Return Value and Side Effects
-
-Returns true value upon success. Internally, sets these
-values in these elements in the object's data structure:
-
-=over 4
-
-=item * C<max_op_num>
-
-Scalar holding number of highest non-experimental op. Example:
-
- 'max_op_num' => 1246,
-
-=item * C<optable>
-
-Reference to hash holding mapping of opcode names ops to their numbers.
-Example:
-
- 'optable' => {
- 'pow_p_p_i' => 650,
- 'say_s' => 463,
- 'lsr_p_p_i' => 207,
- 'lt_s_sc_ic' => 289,
- # ...
- 'debug_init' => 429,
- 'iseq_i_nc_n' => 397,
- 'eq_addr_sc_s_ic' => 254
- },
-
-Per F<src/ops/ops.num>, this mapping exists so that we can nail down
-the op numbers for the core opcodes in a particular version of the
-bytecode and provide backward-compatibility for bytecode.
-
-=item * C<skiptable>
-
-Reference to a 'seen-hash' of skipped opcodes.
-
- 'skiptable' => {
- 'bor_i_ic_ic' => 1,
- 'xor_i_ic_ic' => 1,
- 'tanh_n_nc' => 1,
- # ...
- },
-
-As F<src/ops/ops.skip> states, these are "... opcodes that could be listed in
-F<[src/ops/]ops.num> but aren't ever to be generated or implemented because
-they are useless and/or silly."
-
-=back
-
-=back
-
-=cut
-
-sub load_op_map_files {
- my $self = shift;
- my $num_file = $self->{num_file};
- my $skip_file = $self->{skip_file};
-
- my ( $op, $name, $number, $prev );
-
- $self->{max_op_num} ||= 0;
-
- open $op, '<', $num_file
- or die "Can't open $num_file: $!";
- $prev = -1;
- while (<$op>) {
- chomp;
- s/#.*$//;
- s/\s*$//;
- s/^\s*//;
- next unless $_;
- ( $name, $number ) = split( /\s+/, $_ );
- if ( $prev + 1 != $number ) {
- die "hole in ops.num before #$number";
- }
- if ( exists $self->{optable}{$name} ) {
- die "duplicate opcode $name and $number";
- }
- $prev = $number;
- $self->{optable}{$name} = $number;
- if ( $number > $self->{max_op_num} ) {
- $self->{max_op_num} = $number;
- }
- }
- undef $op;
-
- open $op, '<', $skip_file
- or die "Can't open $skip_file: $!";
- while (<$op>) {
- chomp;
- s/#.*$//;
- s/\s*$//;
- s/^\s*//;
- next unless $_;
- ($name) = split( /\s+/, $_ );
- if ( exists $self->{optable}{$name} ) {
- die "skipped opcode is also in $num_file:$.";
- }
- $self->{skiptable}{$name} = 1;
- }
- undef $op;
- return 1;
-}
-
-=head2 C<sort_ops()>
-
-=over 4
-
-=item * Purpose
-
-Internal manipulation of the Parrot::Ops2pm object: sorting by number of the
-list of op codes found in the object's C<{ops}-E<gt>{OPS}> element.
-
-=item * Arguments
-
-None.
-
-=item * Return Value and Side Effects
-
-No return value. Internally, re-sets the C<ops> key of the object's data
-structure.
-
-=item * Comment
-
-It is at this point that warnings about experimental opcodes will be
-emitted if you are working in a checkout from the Parrot repository. Example:
-
- trap 1247 experimental, not in ops.num
-
-=back
-
-=cut
-
-sub sort_ops {
- my $self = shift;
- for my $el ( @{ $self->{ops}{OPS} } ) {
- if ( exists $self->{optable}{ $el->full_name } ) {
- $el->{CODE} = $self->{optable}{ $el->full_name };
- }
- elsif ( exists $self->{skiptable}{ $el->full_name } ) {
- $el->{CODE} = -1;
- }
- elsif ( $el->{experimental} ) {
- my $n = $self->{optable}{ $el->full_name } = ++$self->{max_op_num};
- warn sprintf(
- "%-25s %-10s experimental, not in ops.num\n",
- $el->full_name, $n
- ) if -e "DEVELOPING";
- $el->{CODE} = $n;
- }
- else {
- die sprintf(
- "%-25s %-10s FATAL: not in ops.num nor ops.skip\n",
- $el->full_name, ""
- ) if -e "DEVELOPING";
- $el->{CODE} = -1;
- }
- }
- @{ $self->{ops}{OPS} } =
- sort { $a->{CODE} <=> $b->{CODE} } ( @{ $self->{ops}{OPS} } );
-}
-
-=head2 C<prepare_real_ops()>
-
-=over 4
-
-=item * Purpose
-
-Final stage of preparation of ops.
-
-=item * Arguments
-
-None. (Same implicit requirements for the constructor as
-C<load_op_map_files()> above.)
-
-=item * Return Value and Side Effects
-
-No return value. Internally, adds the C<real_ops> key of the object's
-data structure. Its value is a Parrot::OpsFile object.
-
-=back
-
-=cut
-
-sub prepare_real_ops {
- my $self = shift;
-
- my $real_ops = Parrot::OpsFile->new( [], $self->{nolines} );
- $real_ops->{PREAMBLE} = $self->{ops}{PREAMBLE};
- $real_ops->version( $self->{ops}->version );
-
- # verify opcode numbers
- my $seq = 0;
- for my $el ( @{ $self->{ops}{OPS} } ) {
- next if $el->{CODE} < 0; # skip
- my $opname = $el->full_name;
- my $n = $self->{optable}{$opname}; # former global
- if ( $n != $el->{CODE} ) {
- die "op $opname: number mismatch: ops.num $n vs. core.ops $el->{CODE}";
- }
- if ( $seq != $el->{CODE} ) {
- die "op $opname: sequence mismatch: ops.num $seq vs. core.ops $el->{CODE}";
- }
- push @{ $real_ops->{OPS} }, $el;
- ++$seq;
- }
- $self->{real_ops} = $real_ops;
-}
-
-=head2 C<print_module()>
-
-=over 4
-
-=item * Purpose
-
-Uses information in the object's data structure -- principally
-the C<real_ops> element -- to create F<lib/Parrot/OpLib/core.pm>.
-
-=item * Arguments
-
-None. (Implicitly requires that the constructor have the
-following keys defined: C<argv>, C<script>, C<moddir> and C<module>.)
-
-=item * Return Value
-
-Returns true value upon success.
-
-=item * Comment
-
-=back
-
-=cut
-
-sub print_module {
- my $self = shift;
- my $cwd = cwd();
- my $fulldir = File::Spec->catdir( $cwd, $self->{moddir} );
- if ( !-d $fulldir ) {
- if ( !File::Path::mkpath( [ $fulldir ], 0, 0755 ) ) {
- -d $fulldir
- or die "$self->{script}: Could not mkdir $fulldir: $!!\n";
- }
- }
- my $fullpath = File::Spec->catfile( ($fulldir), $self->{module} );
- open my $MODULE, '>', $fullpath
- or die "$self->{script}: Could not open module file '$fullpath' for writing: $!!\n";
-
- my $version = $self->{real_ops}->version();
- ( my $pod = <<"END_POD") =~ s/^ //osmg;
- =head1 NAME
-
- Parrot::OpLib::core - Parrot Op Info
-
- =head1 DESCRIPTION
-
- This is an autogenerated file, created by F<$self->{script}>.
-
- It contains Parrot version info, a preamble for inclusion in C code,
- and an array of C<Parrot::Op> instances representing the Parrot ops.
-
- =cut
-END_POD
-
- my $preamble = <<END_C;
-#! perl -w
-#
-# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-#
-# This file is generated automatically from '$self->{file}'.
-# Any changes made here will be lost!
-#
-
-$pod
-
-use strict;
-
-package Parrot::OpLib::core;
-
-use vars qw(\$VERSION \$ops \$preamble);
-
-\$VERSION = "$version";
-
-END_C
-
- print {$MODULE} $preamble;
- print {$MODULE} Data::Dumper->Dump( [ $self->{real_ops}->preamble, [ $self->{real_ops}->ops ] ],
- [qw($preamble $ops)] );
-
- print {$MODULE} <<END_C;
-
-1;
-END_C
-
- close $MODULE or die;
-
- return 1;
-}
-
-=head2 C<print_h()>
-
-=over 4
-
-=item * Purpose
-
-Uses information in the object's data structure -- principally
-the C<real_ops> key -- to create F<include/parrot/oplib/ops.h>.
-
-=item * Arguments
-
-None. (Implicitly requires that the constructor have the
-following keys defined: C<argv>, C<script>, C<inc_dir> and C<inc_f>.)
-
-=item * Return Value
-
-Returns true value upon success.
-
-=item * Comment
-
-=back
-
-=cut
-
-sub print_h {
- my $self = shift;
- my $cwd = cwd();
- my $fulldir = File::Spec->catdir( $cwd, $self->{inc_dir} );
- if ( !-d $fulldir ) {
- if ( !File::Path::mkpath( [ $fulldir ], 0, 0755 ) ) {
- -d $fulldir
- or die "$self->{script}: Could not mkdir $fulldir: $!!\n";
- }
- }
-
- my $fullpath = File::Spec->catfile( ($fulldir), $self->{inc_f} );
- open my $OUT, '>', $fullpath
- or die "$self->{script}: Could not open module file '$fullpath' for writing: $!!\n";
-
- print $OUT <<END_C;
-/* ex: set ro:
- * !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
- *
- * This file is generated automatically from '$self->{file}'
- * by $self->{script}.
- *
- * Any changes made here will be lost!
- */
-
-#ifndef PARROT_OPS_H_GUARD
-#define PARROT_OPS_H_GUARD
-
-typedef enum {
-END_C
-
- my @OPS = @{ $self->{real_ops}->{OPS} };
- for my $el (@OPS) {
- my $opname = $el->full_name;
- my $n = $el->{CODE};
- my $comma = $n < @OPS - 1 ? "," : "";
- $opname = "PARROT_OP_$opname$comma";
-
- printf $OUT " %-30s\t/* %4d */\n", $opname, $n;
- }
-
- print $OUT <<END_C;
-} parrot_opcode_enums;
-
-#endif /* PARROT_OPS_H_GUARD */
-
-END_C
-
- # append the C code coda
- print $OUT <<END_C;
-/*
- * Local variables:
- * c-file-style: "parrot"
- * End:
- * vim: expandtab shiftwidth=4:
- */
-END_C
- close $OUT;
- return 1;
-}
-
-=head1 NOTE ON TESTING
-
-A suite of test files to accompany this package is found in
-F<t/tools/ops2pm>. This suite has been developed to maximize its
-coverage of the code of Parrot::Ops2pm (as measured by Perl module
-Devel::Cover). Should you wish to refactor this package, it is recommended
-that you do so in a B<test-driven> manner:
-
-=over 4
-
-=item 1
-
-Write the specification for any additions or modifications to
-Parrot::Ops2pm' interface.
-
-=item 2
-
-Write tests that reflect any such modifications.
-
-=item 3
-
-Write the additional or modified code that reflects the new specification.
-
-=item 4
-
-Test the new code and debug. The tests in the suite should be run B<after>
-Parrot's F<Configure.pl> has run but B<before> F<make> has run. Example:
-
- $> perl Configure.pl
- $> prove -v t/tools/ops2pm/*.t
- $> make
-
-=item 5
-
-Use Devel::Cover to measure the extent to which the existing and new tests
-cover the existing and revised code.
-
-=item 6
-
-Refactor and retest to ensure high test coverage.
-
-=back
-
-This package's methods are called by F<tools/build/ops2pm.pl>, which in turn
-is invoked by F<make> in the Parrot build process. Successful execution of
-F<make> proves that the functionality in this package achieved its overall
-objective but does not necessarily invoke many of the individual code
-statements in the package. That is the rationale for the component-focused
-testing provided by the test suite.
-
-=head1 AUTHOR
-
-See F<tools/build/ops2pm.pl> for a list of the Parrot hackers who, over a
-period of several years, developed the functionality now found in the methods
-of Parrot::Ops2pm. Jim Keenan extracted that functionality and placed
-it in this package's methods.
-
-=cut
-
-1;
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
Deleted: branches/ops_massacre/lib/Parrot/OpsFile.pm
==============================================================================
--- branches/ops_massacre/lib/Parrot/OpsFile.pm Thu May 27 06:10:21 2010 (r47047)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,750 +0,0 @@
-#! perl
-# Copyright (C) 2001-2009, Parrot Foundation.
-# $Id$
-
-=head1 NAME
-
-Parrot::OpsFile - Ops To C Code Generation
-
-=head1 SYNOPSIS
-
- use Parrot::OpsFile;
-
-=head1 DESCRIPTION
-
-C<Parrot::OpsFile> takes one or more files of op functions and
-creates real C code for them.
-
-This class is used by F<tools/build/ops2c.pl>,
-F<tools/build/ops2pm.pl> and F<tools/build/pbc2c.pl>.
-
-=head2 Op Functions
-
-For ops that have trivial bodies (such as just a call to some other
-function and a C<return> statement), opcode functions are in the format:
-
- inline op opname (args) :flags {
- ... body of function ...
- }
-
-Note that currently the C<inline> op type is ignored.
-
-Alternately, for opcode functions that have more internal complexity the
-format is:
-
- op opname (args) :flags {
- ... body of function ...
- }
-
-There may be more than one C<return>.
-
-In both cases the closing brace B<must> be on its own line.
-
-When specifying multiple flags, each flag gets its own prefixing colon.
-
-=head2 Op Arguments
-
-Op arguments are a comma-separated list of direction and type pairs.
-
-Argument direction is one of:
-
- in the argument passes a value into the op
- out the argument passes a value out of the op
- inout the argument passes a value into and out of the op
- inconst the argument passes a constant value into the op
- invar the argument passes a variable value into the op
-
-Argument direction is used to determine the life times of symbols and
-their related register allocations. When an argument is passed into an
-op a register is read from, when it's passed out of an op a register is
-written to.
-
-Argument type is one of:
-
- INT the argument is an integer
- NUM the argument is an numeric
- STR the argument is an string
- PMC the argument is an PMC
- KEY the argument is an aggregate PMC key
- INTKEY the argument is an aggregate PMC integer key
- LABEL the argument is an integer branch offset or address
-
-The size of the return offset is determined from the op function's
-signature.
-
-=head2 Op Flags
-
-The flags are of two types:
-
-=over 4
-
-=item 1 class
-
-The classification of ops is intended to facilitate the selection of
-suitable ops for a Parrot safe mode.
-
-=item 2 behavior
-
-The presence (or absence) of certain flags will change how the op behaves. For
-example, the lack of the C<flow> flag will cause the op to be implicitly
-terminated with C<goto NEXT()>. (See next section).
-
-The :deprecated flag will generate a diagnostic to standard error at
-runtime when a deprecated opcode is invoked and
-C<PARROT_WARNINGS_DEPRECATED_FLAG> has been set.
-
-=back
-
-=head2 Op Body (Macro Substitutions)
-
-In the following macro descriptions, C<PC> and C<PC'> are the current
-and next position within the Parrot code.
-
-=over 4
-
-=item C<goto OFFSET(X)>
-
-Transforms to C<PC' = PC + X>. This is used for branches.
-
-=item C<goto NEXT()>
-
-Transforms to C<PC' = PC + S>, where C<S> is the size of an op.
-
-=item C<goto ADDRESS(X)>
-
-Transforms to C<PC' = X>. This is used for absolute jumps.
-
-=item C<expr OFFSET(X)>
-
-Transforms to C<PC + X>. This is used to give a relative address.
-
-=item C<expr NEXT()>
-
-Transforms to C<PC + S>, the position of the next op.
-
-=item C<expr ADDRESS(X)>
-
-Transforms to C<X>, an absolute address.
-
-=item C<restart OFFSET(X)>
-
-Transforms to C<PC' = 0> and restarts at C<PC + X>.
-
-=item C<restart NEXT()>
-
-Transforms to C<PC' = 0> and restarts at C<PC + S>.
-
-=item C<$n>
-
-Transforms to the op function's nth argument. C<$0> is the opcode itself.
-
-=back
-
-Note that, for ease of parsing, if the argument to one of the above
-notations in a ops file contains parentheses, then double the enclosing
-parentheses and add a space around the argument, like so:
-
- goto OFFSET(( (void*)interp->happy_place ))
-
-=head2 Class Methods
-
-=over 4
-
-=cut
-
-package Parrot::OpsFile;
-
-use strict;
-use warnings;
-
-use base qw( Exporter );
-
-use Parrot::Op;
-use Parrot::Config;
-
-our %op_body;
-our @EXPORT = qw( %op_body );
-
-# private sub _trim()
-#
-# Trim leading and trailing spaces.
-
-sub _trim {
- my $value = shift;
-
- $value =~ s/^\s+//;
- $value =~ s/\s+$//;
-
- return $value;
-}
-
-=item C<new(@files)>
-
-Returns a new instance initialized by calling C<read_ops()> on each of
-the specified op files.
-
-=cut
-
-sub new {
- my ( $class, $files, $nolines ) = @_;
-
- my $self = bless { PREAMBLE => '' }, $class;
-
- $self->read_ops( $_, $nolines ) for @{$files};
-
- # FILE holds a space separated list of opsfile name
- if ( $self->{FILE} ) {
- $self->{FILE} =~ s/, $//;
- $self->{FILE} =~ s/, $//;
- }
-
- return $self;
-}
-
-=back
-
-=head2 Instance Methods
-
-=over 4
-
-=item C<read_ops($file,$nolines)>
-
-Reads in the specified .ops file, gathering information about the ops.
-
-=cut
-
-sub read_ops {
- my ( $self, $file, $nolines ) = @_;
-
- my $ops_file = "src/" . $file;
-
- die "Parrot::OpFunc::init(): No file specified!\n" unless defined $file;
-
- $self->{FILE} .= $file . ', ';
-
- my $orig = $file;
-
- open my $OPS, '<', $file or die "Can't open $file, $!/$^E";
-
- $self->version( $PConfig{VERSION} );
-
- if ( !( $file =~ s/\.ops$/.c/ ) ) {
- $file .= ".c";
- }
-
- #
- # Read through the file, creating and storing Parrot::Op objects:
- #
-
- my $count = 0;
- my ( $name, $footer );
- my $type;
- my $body;
- my $short_name;
- my $args;
- my @args;
- my @argdirs;
- my $seen_pod;
- my $seen_op;
- my $in_preamble;
- my $line;
- my $flags;
- my @labels;
-
- while (<$OPS>) {
- $seen_pod = 1 if m|^=|;
- $in_preamble = 1 if s|^BEGIN_OPS_PREAMBLE||;
-
- unless ( $seen_op or m|^(inline\s+)?op\s+| ) {
-
- if (m|^END_OPS_PREAMBLE|) {
- $_ = '';
- $in_preamble = 0;
- }
- elsif ($in_preamble) {
- $self->{PREAMBLE} .= $_;
- }
-
- next;
- }
-
- die "No 'VERSION = ...;' line found before beginning of ops in file '$orig'!\n"
- unless defined $self->version;
-
- #
- # Handle start-of-op:
- #
- # We create a new Parrot::Op instance based on the type, name and args.
- # We query the Parrot::Op for the op size, etc., which we use later.
- #
- # Either of these two forms work:
- #
- # inline op name (args) {
- # op name (args) {
- #
- # The args are a comma-separated list of items from this table of argument
- # types (even if no formal args are specified, there will be a single 'o'
- # entry):
- #
- # op The opcode
- #
- # i Integer register index
- # n Number register index
- # p PMC register index
- # s String register index
- #
- # ic Integer constant (in-line)
- # nc Number constant index
- # pc PMC constant index
- # sc String constant index
- # kc Key constant index
- # kic Integer Key constant index (in-line)
- #
-
- my $op_sig_RE = qr/
- ^
- (inline\s+)? # optional keywords
- op
- \s+
- ([a-zA-Z]\w*) # op name
- \s*
- \((.*)\) # argument signature
- \s*
- ((?: \:\w+\s*)*) # :flags
- \s*
- {
- $
- /x;
-
- if ($_ =~ $op_sig_RE) {
- if ($seen_op) {
- die "$ops_file [$.]: Cannot define an op within an op definition!\n";
- }
-
- $type = defined($1) ? 'inline' : 'function';
- $short_name = $2;
- $args = _trim( lc $3 );
- $flags = $4 ? _trim( lc $4 ) : "";
- @args = split( /\s*,\s*/, $args );
- @argdirs = ();
- @labels = ();
- $body = '';
- $seen_op = 1;
- $line = $. + 1;
-
- $flags = { map { $_ => undef } (split(/[ :]+/, $flags)) };
-
- my @temp;
-
- for my $arg (@args) {
- my ( $use, $type ) =
- $arg =~ m/^(in|out|inout|inconst|invar)
- \s+
- (INT|NUM|STR|PMC|KEY|INTKEY|LABEL)$/ix;
-
- die "Unrecognized arg format '$arg' in '$_'!"
- unless defined($use) and defined($type);
-
- # remember it's a label, then turn it to an int
- if ( $type =~ /^LABEL$/i ) {
- $type = 'i';
- push @labels, 1;
- }
- else {
- push @labels, 0;
- }
-
- if ( $type =~ /^INTKEY$/i ) {
- $type = 'ki';
- }
- else {
- $type = lc substr( $type, 0, 1 );
- }
-
- if ( $use eq 'in' ) {
- push @temp, "$type|${type}c";
- push @argdirs, 'i';
- }
- elsif ( $use eq 'invar' ) {
- push @temp, $type;
- push @argdirs, 'i';
- }
- elsif ( $use eq 'inconst' ) {
- push @temp, "${type}c";
- push @argdirs, 'i';
- }
- elsif ( $use eq 'inout' ) {
- push @temp, $type;
- push @argdirs, 'io';
- }
- else {
- push @temp, $type;
- push @argdirs, 'o';
- }
- }
-
- @args = @temp;
-
- next;
- }
-
- #
- # Handle end-of-op:
- #
- # We stash the accumulated body of source code in the Parrot::Op, push the
- # Parrot::Op onto our op array, and forget the op so we can start the next
- # one.
- #
-
- if (/^}\s*$/) {
- $count += $self->make_op(
- $count, $type, $short_name, $body, \@args, \@argdirs,
- $line, $orig, \@labels, $flags, $nolines
- );
-
- $seen_op = 0;
-
- next;
- }
-
- #
- # Accumulate the code into the op's body:
- #
-
- if ($seen_op) {
- $body .= $_;
- }
- else {
- die "Parrot::OpsFile: Unrecognized line: '$_'!\n";
- }
- }
-
- if ($seen_op) {
- die "Parrot::OpsFile: File ended with incomplete op definition!\n";
- }
-
- close $OPS or die "Could not close ops file '$file' ($!)!";
-
- return;
-}
-
-# Extends a string containing an or expression "0" .. "A" .. "A|B" etc.
-sub or_flag {
- my ( $flag, $value ) = @_;
-
- if ( $$flag eq '0' ) {
- $$flag = $value;
- }
- else {
- $$flag .= "|$value";
- }
-}
-
-=item C<make_op($code,
-$type, $short_name, $body, $args, $argdirs, $line, $file, $labels, $flags, $nolines)>
-
-Returns a new C<Parrot::Op> instance for the specified arguments.
-
-=cut
-
-sub make_op {
- my (
- $self, $code, $type, $short_name, $body, $args,
- $argdirs, $line, $file, $labels, $flags, $nolines
- ) = @_;
- my $counter = 0;
- my $branch = 0;
- my $pop = 0;
-
- if (exists($$flags{deprecated})) {
- $body = <<"END_CODE" . $body;
-INTVAL unused = PARROT_WARNINGS_test(interp,PARROT_WARNINGS_DEPRECATED_FLAG) &&
- fprintf(stderr,"Warning: instruction '$short_name' is deprecated\\n");
-END_CODE
-}
- unless (exists($$flags{flow})) {
- $body .= "\ngoto NEXT();";
- }
-
- foreach my $variant ( expand_args(@$args) ) {
- my (@fixedargs) = split( /,/, $variant );
- my $op =
- Parrot::Op->new( $code++, $type, $short_name, [@fixedargs], [@$argdirs], [@$labels],
- $flags );
- my $op_size = $op->size;
- my $jumps = "0";
-
- #
- # Macro substitutions:
- #
- # We convert the following notations:
- #
- # .ops file Op body Meaning Comment
- # ----------------- ------- ------------ ----------------------------------
- # goto OFFSET(X) {{+=X}} PC' = PC + X Used for branches
- # goto NEXT() {{+=S}} PC' = PC + S Where S is op size
- # goto ADDRESS(X) {{=X}} PC' = X Used for absolute jumps
- # expr OFFSET(X) {{^+X}} PC + X Relative address
- # expr NEXT() {{^+S}} PC + S Where S is op size
- # expr ADDRESS(X) {{^X}} X Absolute address
- #
- # restart OFFSET(X) {{=0,+=X}} PC' = 0 Restarts at PC + X
- # restart NEXT() {{=0,+=S}} PC' = 0 Restarts at PC + S
- #
- # $X {{@X}} Argument X $0 is opcode, $1 is first arg
- #
- # For ease of parsing, if the argument to one of the above
- # notations in a .ops file contains parentheses, then double the
- # enclosing parentheses and add a space around the argument,
- # like so:
- #
- # goto OFFSET(( (void*)interp->happy_place ))
- #
- # Later transformations turn the Op body notations into C code, based
- # on the mode of operation (function calls, switch statements, gotos
- # with labels, etc.).
- #
- if ($body =~ /(goto|restart)\s+OFFSET\(.*?\)/ || $short_name =~ /runinterp/) {
- $branch = 1;
- }
-
- $body =~ s/\bgoto\s+ADDRESS\(\( (.*?) \)\)/{{=$1}}/mg;
- $body =~ s/\bexpr\s+ADDRESS\(\( (.*?) \)\)/{{^$1}}/mg;
- $body =~ s/\bgoto\s+ADDRESS\((.*?)\)/{{=$1}}/mg;
- $body =~ s/\bexpr\s+ADDRESS\((.*?)\)/{{^$1}}/mg;
-
- $body =~ s/\bgoto\s+OFFSET\(\( (.*?) \)\)/{{+=$1}}/mg;
- $body =~ s/\bexpr\s+OFFSET\(\( (.*?) \)\)/{{^+$1}}/mg;
- $body =~ s/\bgoto\s+OFFSET\((.*?)\)/{{+=$1}}/mg;
- $body =~ s/\bexpr\s+OFFSET\((.*?)\)/{{^+$1}}/mg;
-
- $body =~ s/\bexpr\s+NEXT\(\)/{{^+$op_size}}/mg;
- $body =~ s/\bgoto\s+NEXT\(\)/{{+=$op_size}}/mg;
-
- $body =~ s/\brestart\s+OFFSET\((.*?)\)/{{=0,+=$1}}/mg;
- $body =~ s/\brestart\s+NEXT\(\)/{{=0,+=$op_size}}/mg;
- $body =~ s/\brestart\s+ADDRESS\((.*?)\)/{{=$1}}/mg;
-
- $body =~ s/\$(\d+)/{{\@$1}}/mg;
-
- # We can only reference as many parameters as we declare
- my $max_arg_num = @$args;
- my @found_args = ($body =~ m/{{@(\d+)}}/g);
- foreach my $arg (@found_args) {
- die "opcode '$short_name' uses '\$$arg' but only has $max_arg_num parameters.\n" if $arg > $max_arg_num;
- }
-
-
- my $file_escaped = $file;
- $file_escaped =~ s|(\\)|$1$1|g; # escape backslashes
- $op->body( $nolines ? $body : qq{#line $line "$file_escaped"\n$body} );
-
- # Constants here are defined in include/parrot/op.h
- or_flag( \$jumps, "PARROT_JUMP_RELATIVE" ) if $branch;
-
- $op->jump($jumps);
- $self->push_op($op);
- $counter++;
- }
-
- return $counter;
-}
-
-=item C<expand_args(@args)>
-
-Given an argument list, returns a list of all the possible argument
-combinations.
-
-=cut
-
-sub expand_args {
- my (@args) = @_;
-
- return "" if ( !scalar(@args) );
-
- my $arg = shift(@args);
- my @var = split( /\|/, $arg );
-
- if ( !scalar(@args) ) {
- return @var;
- }
- else {
- my @list = expand_args(@args);
- my @results;
-
- foreach my $l (@list) {
- foreach my $v (@var) {
- push( @results, "$v,$l" );
- }
- }
-
- return @results;
- }
-}
-
-=item C<ops()>
-
-Returns the C<Parrot::Op> instances found in the file(s).
-
-=cut
-
-sub ops {
- my ($self) = @_;
-
- return @{ $self->{OPS} };
-}
-
-=item C<op($index)>
-
-Returns the op at C<$index>.
-
-=cut
-
-sub op {
- my ( $self, $index ) = @_;
-
- return $self->{OPS}[$index];
-}
-
-=item C<preamble()>
-
-=item C<preamble($trans)>
-
-Returns any lines found prior to first op definition.
-
-If C<$trans> (an C<Parrot::OpTrans> subclass) is supplied then
-substitutions are made.
-
-=cut
-
-sub preamble {
- my ( $self, $trans ) = @_;
-
- local $_ = $self->{PREAMBLE};
-
- if ($trans) {
- s/goto\s+OFFSET\((.*)\)/{{+=$1}}/mg;
-
- #s/goto\s+NEXT\(\)/{{+=$op_size}}/mg; #not supported--dependent on op size
- s/goto\s+ADDRESS\((.*)\)/{{=$1}}/mg;
-
- $_ = Parrot::Op->rewrite_body( $_, $trans, 'preamble' );
- }
-
- return $_;
-}
-
-=item C<version($major, $minor, $patch)>
-
-=item C<version($version)>
-
-=item C<version()>
-
-Sets/gets the version number.
-
-=cut
-
-sub version {
- my $self = shift;
-
- if ( @_ == 1 ) {
- $self->{VERSION} = shift;
- }
- elsif ( @_ == 3 ) {
- $self->{VERSION} = join( '.', @_ );
- }
- elsif ( @_ == 0 ) {
- if (wantarray) {
- return split( /\./, $self->{VERSION} );
- }
- else {
- return $self->{VERSION};
- }
- }
- else {
- die "Parrot::OpsFile::version(): Illegal argument count" . scalar(@_) . "!";
- }
-}
-
-=item C<major_version()>
-
-Returns the major version number.
-
-=cut
-
-sub major_version {
- my $self = shift;
-
- $self->{VERSION} =~ m/^(\d+)\./;
-
- return $1;
-}
-
-=item C<minor_version()>
-
-Returns the minor version number.
-
-=cut
-
-sub minor_version {
- my $self = shift;
-
- $self->{VERSION} =~ m/^\d+\.(\d+)\./;
-
- return $1;
-}
-
-=item C<patch_version()>
-
-Returns the patch version number.
-
-=cut
-
-sub patch_version {
- my $self = shift;
-
- $self->{VERSION} =~ m/^\d+\.\d+\.(\d+)/;
-
- return $1;
-}
-
-=item C<push_op($op)>
-
-Adds C<$op> to the end of the op list.
-
-=cut
-
-sub push_op {
- my ( $self, $op ) = @_;
-
- push @{ $self->{OPS} }, $op;
-}
-
-=back
-
-=head1 SEE ALSO
-
-=over 4
-
-=item C<Parrot::Op>
-
-=item C<Parrot::OpTrans>
-
-=item F<tools/build/ops2c.pl>
-
-=item F<tools/build/ops2pm.pl>
-
-=item F<tools/build/pbc2c.pl>
-
-=back
-
-=cut
-
-1;
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
Deleted: branches/ops_massacre/lib/Parrot/OpsRenumber.pm
==============================================================================
--- branches/ops_massacre/lib/Parrot/OpsRenumber.pm Thu May 27 06:10:21 2010 (r47047)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,190 +0,0 @@
-# Copyright (C) 2007, Parrot Foundation.
-# $Id$
-package Parrot::OpsRenumber;
-use strict;
-use warnings;
-use lib qw ( lib );
-use base qw( Parrot::Ops2pm::Base );
-
-=head1 NAME
-
-Parrot::OpsRenumber - Methods holding functionality for F<tools/dev/opsrenumber.pl>.
-
-=head1 SYNOPSIS
-
- use Parrot::OpsRenumber;
-
- $self = Parrot::OpsRenumber->new( {
- argv => [ @ARGV ],
- moddir => "lib/Parrot/OpLib",
- module => "core.pm",
- inc_dir => "include/parrot/oplib",
- inc_f => "ops.h",
- script => "tools/dev/opsrenumber.pl",
- } );
-
- $self->prepare_ops();
- $self->renum_op_map_file();
-
-=cut
-
-=head1 DESCRIPTION
-
-Parrot::OpsRenumber provides methods called by F<tools/dev/opsrenumber.pl>.
-
-=head1 METHODS
-
-=head2 C<new()>
-
-Inherited from Parrot::Ops2pm::Base and documented in
-F<lib/Parrot/Ops2pm/Base.pm>.
-
-=head2 C<prepare_ops()>
-
-Inherited from Parrot::Ops2pm::Base and documented in
-F<lib/Parrot/Ops2pm/Base.pm>.
-
-=head2 C<renum_op_map_file()>
-
-=over 4
-
-=item * Purpose
-
-This method renumbers F<src/ops/ops.num> based on the already
-existing file of that name and additional F<.ops> files.
-
-=item * Arguments
-
-Two scalars. First is Parrot major version number. Second is optional:
-string holding name of an F<.ops> file; defaults to F<src/ops/ops.num>.
-(Implicitly requires that the C<argv> and C<script> elements were provided to
-the constructor.)
-
-=item * Return Value
-
-Returns true value upon success.
-
-=back
-
-=cut
-
-
-my $OPSENUM_PREAMBLE =<<END;
-/* ex: set ro ft=c:
- * !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
- *
- * This file is generated automatically from 'lib/Parrot/OpsRenumber.pm'.
- *
- * Any changes made here will be lost!
- *
- */
-#ifndef OPSENUM_H_GUARD
-#define OPSENUM_H_GUARD
-enum OPS_ENUM {
-END
-
-my $OPSENUM_POSTAMBLE =<<END;
-};
-#endif /* OPSENUM_H_GUARD */
-/* GENERATED BY lib/Parrot/OpsRenumber.pm */
-/*
- * Local variables:
- * c-file-style: "parrot"
- * End:
- * vim: expandtab shiftwidth=4:
- */
-END
-
-sub renum_op_map_file {
- my $self = shift;
-
- my $file = $self->{num_file};
-
- # We open up the currently existing ops.num and file and read it
- # line-by-line. That file is basically divided into two halves
- # separated by the ###DYNAMIC### line. Above that line are found
- # (a) # inline comments and
- # (b) the first 7, never-to-be-altered opcodes.
- # Below that line are all the remaining opcodes. All opcode lines
- # match the pattern /^(\w+)\s+(\d+)$/. Everything above the line gets
- # pushed into @lines and, if it's an opcode line, gets split and
- # pushed into %fixed as well. Nothing happens to the (opcode) lines
- # below the DYNAMIC line.
-
- my ( $name, $number, @lines, %seen, %fixed, $fix );
- $fix = 1;
- open my $OP, '<', $file
- or die "Can't open $file, error $!";
- while (<$OP>) {
- push @lines, $_ if $fix;
- chomp;
- $fix = 0 if /^###DYNAMIC###/;
- s/#.*$//;
- s/\s*$//;
- s/^\s*//;
- next unless $_;
- ( $name, $number ) = split( /\s+/, $_ );
- $seen{$name} = 1;
- $fixed{$name} = $number if $fix;
- }
- close $OP;
-
- # Now we re-open the very same file we just read -- this time for
- # writing. We directly print all the lines in @lines, i.e., those
- # above the DYNAMIC line. For the purpose of renumbering, we create
- # an index $n.
-
- my $opsenumfn = $self->{opsenum_file};
- open my $OPSENUM, '>', $opsenumfn or die "Can't open $opsenumfn, error $!";
- print $OPSENUM $OPSENUM_PREAMBLE;
- open $OP, '>', $file
- or die "Can't open $file, error $!";
- print $OP @lines;
- my ($n);
-
- # We can't use all autogenerated ops from oplib/core
- # there are unwanted permutations like 'add_i_ic_ic
- # which aren't opcodes but calculated at compile-time.
-
- # The ops element is set by prepare_ops(), which is inherited from
- # Parrot::Ops2pm::Base. prepare_ops(), in turn, works off
- # Parrot::OpsFile.
-
- # So whether a particular opcode will continue to appear in ops.num
- # depends entirely on whether or not it's found in
- # @{ $self->{ops}->{OPS} }. If a particular opcode has been deleted or
- # gone missing from that array, then it won't appear in the new
- # ops.num.
-
- for ( @{ $self->{ops}->{OPS} } ) {
-
- # To account for the number of opcodes above the line, we'll
- # increment the index by one for every element in %fixed.
-
- if ( defined $fixed{ $_->full_name } ) {
- $n = $fixed{ $_->full_name };
- }
-
- # For all other opcodes, we'll print the opcode, increment the
- # index, then print the index on that same line.
-
- elsif ( $seen{ $_->full_name } ) {
- printf $OP "%-31s%4d\n", $_->full_name, ++$n;
- printf $OPSENUM " enum_ops_%-31s= %4d,\n", $_->full_name, $n;
- }
- }
- close $OP;
- print $OPSENUM $OPSENUM_POSTAMBLE;
- close $OPSENUM;
-
- return 1;
-}
-
-1;
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
Modified: branches/ops_massacre/runtime/parrot/library/LWP/Protocol.pir
==============================================================================
--- branches/ops_massacre/runtime/parrot/library/LWP/Protocol.pir Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/runtime/parrot/library/LWP/Protocol.pir Thu May 27 06:10:21 2010 (r47048)
@@ -425,18 +425,16 @@
$I0 = index str, "\r\n\r\n"
if $I0 < 0 goto L1
$I0 += 4
- $S0 = substr str, $I0
- $P0 = box $S0
- setattribute response, 'content', $P0
goto L2
L1:
$I0 = index str, "\n\n"
- if $I0 < 0 goto L1
+ if $I0 < 0 goto L3
$I0 += 2
+ L2:
$S0 = substr str, $I0
$P0 = box $S0
setattribute response, 'content', $P0
- L2:
+ L3:
.end
=item request
Modified: branches/ops_massacre/src/dynoplibs/Rules.in
==============================================================================
--- branches/ops_massacre/src/dynoplibs/Rules.in Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/src/dynoplibs/Rules.in Thu May 27 06:10:21 2010 (r47048)
@@ -20,7 +20,7 @@
src/dynoplibs/obscure_ops.h: src/dynoplibs/obscure_ops.c
src/dynoplibs/obscure_ops.c: src/dynoplibs/obscure.ops $(OPS2C)
- $(OPS2C) --dynamic src/dynoplibs/obscure.ops
+ $(OPS2C) --dynamic src/dynoplibs/obscure.ops --quiet
#########################
@@ -30,7 +30,7 @@
#IF(cygwin or hpux): $(CHMOD) 0775 $@
src/dynoplibs/math_ops.c: src/dynoplibs/math.ops $(OPS2C)
- $(OPS2C) --dynamic src/dynoplibs/math.ops
+ $(OPS2C) --dynamic src/dynoplibs/math.ops --quiet
src/dynoplibs/math_ops$(O): $(DYNOP_O_DEPS) \
src/dynoplibs/math_ops.c src/dynoplibs/math_ops.h
@@ -50,7 +50,7 @@
src/dynoplibs/deprecated_ops.h: src/dynoplibs/deprecated_ops.c
src/dynoplibs/deprecated_ops.c: src/dynoplibs/deprecated.ops $(OPS2C)
- $(OPS2C) --dynamic src/dynoplibs/deprecated.ops
+ $(OPS2C) --dynamic src/dynoplibs/deprecated.ops --quiet
#########################
@@ -65,7 +65,7 @@
src/dynoplibs/trans_ops.h: src/dynoplibs/trans_ops.c
src/dynoplibs/trans_ops.c: src/dynoplibs/trans.ops $(OPS2C)
- $(OPS2C) --dynamic src/dynoplibs/trans.ops
+ $(OPS2C) --dynamic src/dynoplibs/trans.ops --quiet
#########################
@@ -80,7 +80,7 @@
src/dynoplibs/bit_ops.h: src/dynoplibs/bit_ops.c
src/dynoplibs/bit_ops.c: src/dynoplibs/bit.ops $(OPS2C)
- $(OPS2C) --dynamic src/dynoplibs/bit.ops
+ $(OPS2C) --dynamic src/dynoplibs/bit.ops --quiet
#########################
@@ -95,7 +95,7 @@
src/dynoplibs/debug_ops.h: src/dynoplibs/debug_ops.c
src/dynoplibs/debug_ops.c: src/dynoplibs/debug.ops $(OPS2C)
- $(OPS2C) --dynamic src/dynoplibs/debug.ops
+ $(OPS2C) --dynamic src/dynoplibs/debug.ops --quiet
#########################
@@ -110,7 +110,7 @@
src/dynoplibs/sys_ops.h: src/dynoplibs/sys_ops.c
src/dynoplibs/sys_ops.c: src/dynoplibs/sys.ops $(OPS2C)
- $(OPS2C) --dynamic src/dynoplibs/sys.ops
+ $(OPS2C) --dynamic src/dynoplibs/sys.ops --quiet
#########################
@@ -125,5 +125,5 @@
src/dynoplibs/io_ops.h: src/dynoplibs/io_ops.c
src/dynoplibs/io_ops.c: src/dynoplibs/io.ops $(OPS2C)
- $(OPS2C) --dynamic src/dynoplibs/io.ops
+ $(OPS2C) --dynamic src/dynoplibs/io.ops --quiet
Modified: branches/ops_massacre/src/oo.c
==============================================================================
--- branches/ops_massacre/src/oo.c Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/src/oo.c Thu May 27 06:10:21 2010 (r47048)
@@ -156,6 +156,9 @@
Lookup a class object from a namespace, string, or key PMC.
+TODO: This function is terribly inefficient. It needs to be refactored in a
+major way
+
=cut
*/
@@ -169,51 +172,52 @@
ASSERT_ARGS(Parrot_oo_get_class)
PMC *classobj = PMCNULL;
- if (!PMC_IS_NULL(key)) {
- if (PObj_is_class_TEST(key))
- classobj = key;
- else {
- /* Fast select of behavior based on type of the lookup key */
- switch (key->vtable->base_type) {
- case enum_class_NameSpace:
- classobj = VTABLE_get_class(interp, key);
- break;
- case enum_class_String:
- case enum_class_Key:
- case enum_class_ResizableStringArray:
- {
- PMC * const hll_ns = VTABLE_get_pmc_keyed_int(interp,
- interp->HLL_namespace,
- Parrot_pcc_get_HLL(interp, CURRENT_CONTEXT(interp)));
- PMC * const ns = Parrot_get_namespace_keyed(interp,
- hll_ns, key);
+ if (PMC_IS_NULL(key))
+ return PMCNULL;
- if (!PMC_IS_NULL(ns))
- classobj = VTABLE_get_class(interp, ns);
- }
- default:
- break;
+ if (PObj_is_class_TEST(key))
+ classobj = key;
+ else {
+ /* Fast select of behavior based on type of the lookup key */
+ switch (key->vtable->base_type) {
+ case enum_class_NameSpace:
+ classobj = VTABLE_get_class(interp, key);
+ break;
+ case enum_class_String:
+ case enum_class_Key:
+ case enum_class_ResizableStringArray:
+ {
+ PMC * const hll_ns = VTABLE_get_pmc_keyed_int(interp,
+ interp->HLL_namespace,
+ Parrot_pcc_get_HLL(interp, CURRENT_CONTEXT(interp)));
+ PMC * const ns = Parrot_get_namespace_keyed(interp,
+ hll_ns, key);
+
+ if (!PMC_IS_NULL(ns))
+ classobj = VTABLE_get_class(interp, ns);
}
+ default:
+ break;
}
+ }
- /* If the PMCProxy doesn't exist yet for the given key, we look up the
- type ID here and create a new one */
- if (PMC_IS_NULL(classobj)) {
- INTVAL type;
- const INTVAL base_type = key->vtable->base_type;
-
- /* This is a hack! All PMCs should be able to be handled through
- a single codepath, and all of them should be able to avoid
- stringification because it's so imprecise. */
- if (base_type == enum_class_Key
- || base_type == enum_class_ResizableStringArray
- || base_type == enum_class_String)
- type = Parrot_pmc_get_type(interp, key);
- else
- type = Parrot_pmc_get_type_str(interp, VTABLE_get_string(interp, key));
+ /* If the PMCProxy doesn't exist yet for the given key, we look up the
+ type ID here and create a new one */
+ if (PMC_IS_NULL(classobj)) {
+ INTVAL type;
+ const INTVAL base_type = key->vtable->base_type;
+
+ /* This is a hack! All PMCs should be able to be handled through
+ a single codepath, and all of them should be able to avoid
+ stringification because it's so imprecise. */
+ if (base_type == enum_class_Key
+ || base_type == enum_class_ResizableStringArray
+ || base_type == enum_class_String)
+ type = Parrot_pmc_get_type(interp, key);
+ else
+ type = Parrot_pmc_get_type_str(interp, VTABLE_get_string(interp, key));
- classobj = get_pmc_proxy(interp, type);
- }
+ classobj = get_pmc_proxy(interp, type);
}
return classobj;
@@ -350,7 +354,8 @@
=item C<PMC * Parrot_oo_get_class_str(PARROT_INTERP, STRING *name)>
-Lookup a class object from a builtin string.
+Lookup a class object from the string C<name>. If the metaobject is found,
+return it. Otherwise, create a new PMCProxy for the type ID number.
=cut
@@ -388,7 +393,7 @@
=item C<PMC * Parrot_oo_newclass_from_str(PARROT_INTERP, STRING *name)>
-Create a new class object from a string name.
+Create a new Class PMC for a new type of the given C<name>.
=cut
@@ -419,7 +424,8 @@
=item C<PMC * Parrot_oo_find_vtable_override_for_class(PARROT_INTERP, PMC
*classobj, STRING *name)>
-Lookup a vtable override in a specific class object.
+Find the vtable override with the specified C<name> in the given C<classobj>
+metaobject.
=cut
Modified: branches/ops_massacre/src/ops/core_ops.c
==============================================================================
--- branches/ops_massacre/src/ops/core_ops.c Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/src/ops/core_ops.c Thu May 27 06:10:21 2010 (r47048)
@@ -1145,8 +1145,8 @@
Parrot_root_new_p_pc_ic, /* 1075 */
Parrot_find_codepoint_i_s, /* 1076 */
Parrot_find_codepoint_i_sc, /* 1077 */
- Parrot_unroll_p, /* 1078 */
- Parrot_unroll_pc, /* 1079 */
+ Parrot_finalize_p, /* 1078 */
+ Parrot_finalize_pc, /* 1079 */
NULL /* NULL function pointer */
};
@@ -14096,9 +14096,9 @@
},
{ /* 1078 */
/* type PARROT_FUNCTION_OP, */
- "unroll",
- "unroll_p",
- "Parrot_unroll_p",
+ "finalize",
+ "finalize_p",
+ "Parrot_finalize_p",
/* "", body */
0,
2,
@@ -14108,9 +14108,9 @@
},
{ /* 1079 */
/* type PARROT_FUNCTION_OP, */
- "unroll",
- "unroll_pc",
- "Parrot_unroll_pc",
+ "finalize",
+ "finalize_pc",
+ "Parrot_finalize_pc",
/* "", body */
0,
2,
@@ -14128,8 +14128,7 @@
opcode_t *
Parrot_end(opcode_t *cur_opcode, PARROT_INTERP) {
- const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- return (opcode_t *)0;
+ const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);return (opcode_t *)0;
}
opcode_t *
@@ -14141,9 +14140,8 @@
opcode_t *
Parrot_check_events(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- opcode_t * const next = cur_opcode + 1;
- Parrot_cx_check_tasks(interp, interp->scheduler);
- return (opcode_t *)next; /* force this being a branch op */
+ opcode_t * const next =cur_opcode + 1;
+ Parrot_cx_check_tasks(interp, interp->scheduler);return (opcode_t *)next; /* force this being a branch op */
}
opcode_t *
@@ -14152,16 +14150,14 @@
opcode_t * const _this = CUR_OPCODE;
/* Restore op_func_table. */
disable_event_checking(interp);
- Parrot_cx_handle_tasks(interp, interp->scheduler);
- return (opcode_t *)_this; /* force this being a branch op */
+ Parrot_cx_handle_tasks(interp, interp->scheduler);return (opcode_t *)_this; /* force this being a branch op */
}
opcode_t *
Parrot_wrapper__(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
opcode_t *pc = CUR_OPCODE;
- DO_OP(pc, interp);
- return (opcode_t *)pc;
+ DO_OP(pc, interp);return (opcode_t *)pc;
}
opcode_t *
@@ -14194,52 +14190,44 @@
opcode_t *
Parrot_branch_i(opcode_t *cur_opcode, PARROT_INTERP) {
- const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- return (opcode_t *)cur_opcode + IREG(1);
+ const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);return (opcode_t *)cur_opcode + IREG(1);
}
opcode_t *
Parrot_branch_ic(opcode_t *cur_opcode, PARROT_INTERP) {
- const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- return (opcode_t *)cur_opcode + cur_opcode[1];
+ const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);return (opcode_t *)cur_opcode + cur_opcode[1];
}
opcode_t *
Parrot_local_branch_p_i(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
INTVAL return_addr;
- opcode_t * const dest = cur_opcode + 3;
+ opcode_t * const dest =cur_opcode + 3;
if (PMC_IS_NULL(PREG(1)) || PREG(1)->vtable->base_type != enum_class_ResizableIntegerArray) {
opcode_t * const handler = Parrot_ex_throw_from_op_args(interp, dest,
EXCEPTION_INVALID_OPERATION,
- "Must pass a valid integer array to 'local_branch'");
- return (opcode_t *)handler;
+ "Must pass a valid integer array to 'local_branch'");return (opcode_t *)handler;
}
return_addr = PTR2INTVAL(dest);
- VTABLE_push_integer(interp, PREG(1), return_addr);
-
- return (opcode_t *)cur_opcode + IREG(2);
+ VTABLE_push_integer(interp, PREG(1), return_addr);return (opcode_t *)cur_opcode + IREG(2);
}
opcode_t *
Parrot_local_branch_p_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
INTVAL return_addr;
- opcode_t * const dest = cur_opcode + 3;
+ opcode_t * const dest =cur_opcode + 3;
if (PMC_IS_NULL(PREG(1)) || PREG(1)->vtable->base_type != enum_class_ResizableIntegerArray) {
opcode_t * const handler = Parrot_ex_throw_from_op_args(interp, dest,
EXCEPTION_INVALID_OPERATION,
- "Must pass a valid integer array to 'local_branch'");
- return (opcode_t *)handler;
+ "Must pass a valid integer array to 'local_branch'");return (opcode_t *)handler;
}
return_addr = PTR2INTVAL(dest);
- VTABLE_push_integer(interp, PREG(1), return_addr);
-
- return (opcode_t *)cur_opcode + cur_opcode[2];
+ VTABLE_push_integer(interp, PREG(1), return_addr);return (opcode_t *)cur_opcode + cur_opcode[2];
}
opcode_t *
@@ -14247,13 +14235,12 @@
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
INTVAL return_addr;
opcode_t *next;
- opcode_t * const dest = cur_opcode + 2;
+ opcode_t * const dest =cur_opcode + 2;
if (PMC_IS_NULL(PREG(1)) || PREG(1)->vtable->base_type != enum_class_ResizableIntegerArray) {
opcode_t * const handler = Parrot_ex_throw_from_op_args(interp, dest,
EXCEPTION_INVALID_OPERATION,
- "Must pass a valid integer array to 'local_return'");
- return (opcode_t *)handler;
+ "Must pass a valid integer array to 'local_return'");return (opcode_t *)handler;
}
return_addr = VTABLE_pop_integer(interp, PREG(1));
@@ -14264,96 +14251,82 @@
&& next < (interp->code->base.data + interp->code->base.size))) {
opcode_t * const handler = Parrot_ex_throw_from_op_args(interp, dest,
EXCEPTION_INVALID_OPERATION,
- "Address for 'local_return' must be within the current code segment");
- return (opcode_t *)handler;
- }
-
- return (opcode_t *)next;
+ "Address for 'local_return' must be within the current code segment");return (opcode_t *)handler;
+ }return (opcode_t *)next;
}
opcode_t *
Parrot_jump_i(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- opcode_t * const loc = INTVAL2PTR(opcode_t *, IREG(1));
- return (opcode_t *)loc;
+ opcode_t * const loc = INTVAL2PTR(opcode_t *, IREG(1));return (opcode_t *)loc;
}
opcode_t *
Parrot_jump_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- opcode_t * const loc = INTVAL2PTR(opcode_t *, cur_opcode[1]);
- return (opcode_t *)loc;
+ opcode_t * const loc = INTVAL2PTR(opcode_t *, cur_opcode[1]);return (opcode_t *)loc;
}
opcode_t *
Parrot_enternative(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
opcode_t * const addr = run_native(interp, CUR_OPCODE,
- interp->code->base.data);
- return (opcode_t *)addr;
+ interp->code->base.data);return (opcode_t *)addr;
}
opcode_t *
Parrot_if_i_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (IREG(1) != 0)
- return (opcode_t *)cur_opcode + cur_opcode[2];
+ if (IREG(1) != 0)return (opcode_t *)cur_opcode + cur_opcode[2];
return (opcode_t *)cur_opcode + 3;}
opcode_t *
Parrot_if_n_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (!FLOAT_IS_ZERO(NREG(1)))
- return (opcode_t *)cur_opcode + cur_opcode[2];
+ if (!FLOAT_IS_ZERO(NREG(1)))return (opcode_t *)cur_opcode + cur_opcode[2];
return (opcode_t *)cur_opcode + 3;}
opcode_t *
Parrot_if_s_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (Parrot_str_boolean(interp, SREG(1)))
- return (opcode_t *)cur_opcode + cur_opcode[2];
+ if (Parrot_str_boolean(interp, SREG(1)))return (opcode_t *)cur_opcode + cur_opcode[2];
return (opcode_t *)cur_opcode + 3;}
opcode_t *
Parrot_if_p_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (VTABLE_get_bool(interp, PREG(1)))
- return (opcode_t *)cur_opcode + cur_opcode[2];
+ if (VTABLE_get_bool(interp, PREG(1)))return (opcode_t *)cur_opcode + cur_opcode[2];
return (opcode_t *)cur_opcode + 3;}
opcode_t *
Parrot_unless_i_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (IREG(1) == 0)
- return (opcode_t *)cur_opcode + cur_opcode[2];
+ if (IREG(1) == 0)return (opcode_t *)cur_opcode + cur_opcode[2];
return (opcode_t *)cur_opcode + 3;}
opcode_t *
Parrot_unless_n_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (FLOAT_IS_ZERO(NREG(1)))
- return (opcode_t *)cur_opcode + cur_opcode[2];
+ if (FLOAT_IS_ZERO(NREG(1)))return (opcode_t *)cur_opcode + cur_opcode[2];
return (opcode_t *)cur_opcode + 3;}
opcode_t *
Parrot_unless_s_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (!Parrot_str_boolean(interp, SREG(1)))
- return (opcode_t *)cur_opcode + cur_opcode[2];
+ if (!Parrot_str_boolean(interp, SREG(1)))return (opcode_t *)cur_opcode + cur_opcode[2];
return (opcode_t *)cur_opcode + 3;}
opcode_t *
Parrot_unless_p_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (!VTABLE_get_bool(interp, PREG(1)))
- return (opcode_t *)cur_opcode + cur_opcode[2];
+ if (!VTABLE_get_bool(interp, PREG(1)))return (opcode_t *)cur_opcode + cur_opcode[2];
return (opcode_t *)cur_opcode + 3;}
@@ -14361,22 +14334,20 @@
Parrot_invokecc_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const p = PREG(1);
- opcode_t *dest = cur_opcode + 2;
+ opcode_t *dest =cur_opcode + 2;
PMC * const signature = Parrot_pcc_get_signature(interp,
CURRENT_CONTEXT(interp));
if (!PMC_IS_NULL(signature))
Parrot_pcc_set_object(interp, signature, NULL);
interp->current_cont = NEED_CONTINUATION;
- dest = VTABLE_invoke(interp, p, dest);
-
- return (opcode_t *)dest;
+ dest = VTABLE_invoke(interp, p, dest);return (opcode_t *)dest;
}
opcode_t *
Parrot_invoke_p_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- opcode_t *dest = cur_opcode + 3;
+ opcode_t *dest =cur_opcode + 3;
PMC * const p = PREG(1);
PMC * const signature = Parrot_pcc_get_signature(interp,
CURRENT_CONTEXT(interp));
@@ -14385,27 +14356,24 @@
Parrot_pcc_set_object(interp, signature, NULL);
interp->current_cont = PREG(2);
- dest = VTABLE_invoke(interp, p, dest);
- return (opcode_t *)dest;
+ dest = VTABLE_invoke(interp, p, dest);return (opcode_t *)dest;
}
opcode_t *
Parrot_yield(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- opcode_t *dest = cur_opcode + 1;
+ opcode_t *dest =cur_opcode + 1;
PMC * const p = Parrot_pcc_get_sub(interp, CURRENT_CONTEXT(interp));
VTABLE_increment(interp, p);
- dest = VTABLE_invoke(interp, p, dest);
-
- return (opcode_t *)dest;
+ dest = VTABLE_invoke(interp, p, dest);return (opcode_t *)dest;
}
opcode_t *
Parrot_tailcall_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const p = PREG(1);
- opcode_t *dest = cur_opcode + 2;
+ opcode_t *dest =cur_opcode + 2;
PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const parent_ctx = Parrot_pcc_get_caller_ctx(interp, ctx);
PMC * const this_call_sig = Parrot_pcc_get_signature(interp, ctx);
@@ -14415,16 +14383,14 @@
Parrot_pcc_merge_signature_for_tailcall(interp, parent_call_sig, this_call_sig);
SUB_FLAG_TAILCALL_SET(interp->current_cont);
- dest = VTABLE_invoke(interp, p, dest);
- return (opcode_t *)dest;
+ dest = VTABLE_invoke(interp, p, dest);return (opcode_t *)dest;
}
opcode_t *
Parrot_returncc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const p = Parrot_pcc_get_continuation(interp, CURRENT_CONTEXT(interp));
- opcode_t * const dest = VTABLE_invoke(interp, p, cur_opcode + 1);
- return (opcode_t *)dest;
+ opcode_t * const dest = VTABLE_invoke(interp, p,cur_opcode + 1);return (opcode_t *)dest;
}
opcode_t *
@@ -14449,8 +14415,7 @@
PMC * const call_sig = Parrot_pcc_build_sig_object_from_op(interp,
PMCNULL, signature, raw_args);
const INTVAL argc = VTABLE_elements(interp, signature);
- Parrot_pcc_set_signature(interp, CURRENT_CONTEXT(interp), call_sig);
- return (opcode_t *)cur_opcode + argc + 2;
+ Parrot_pcc_set_signature(interp, CURRENT_CONTEXT(interp), call_sig);return (opcode_t *)cur_opcode + argc + 2;
}
opcode_t *
@@ -14473,8 +14438,7 @@
Parrot_pcc_dec_recursion_depth(interp, ctx);
Parrot_pcc_set_caller_ctx(interp, ctx, Parrot_pcc_get_caller_ctx(interp, caller_ctx));
}
- argc = VTABLE_elements(interp, signature);
- return (opcode_t *)cur_opcode + argc + 2;
+ argc = VTABLE_elements(interp, signature);return (opcode_t *)cur_opcode + argc + 2;
}
opcode_t *
@@ -14490,8 +14454,7 @@
Parrot_pcc_set_signature(interp, CURRENT_CONTEXT(interp), call_sig);
- argc = VTABLE_elements(interp, signature);
- return (opcode_t *)cur_opcode + argc + 2;
+ argc = VTABLE_elements(interp, signature);return (opcode_t *)cur_opcode + argc + 2;
}
opcode_t *
@@ -14508,8 +14471,7 @@
Parrot_pcc_fill_params_from_op(interp, call_object, signature, raw_params,
PARROT_ERRORS_RESULT_COUNT_FLAG);
- argc = VTABLE_elements(interp, signature);
- return (opcode_t *)cur_opcode + argc + 2;
+ argc = VTABLE_elements(interp, signature);return (opcode_t *)cur_opcode + argc + 2;
}
opcode_t *
@@ -14621,7 +14583,7 @@
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * except = PREG(1);
opcode_t *dest;
- opcode_t * const ret = cur_opcode + 2;
+ opcode_t * const ret =cur_opcode + 2;
PMC * const resume = pmc_new(interp, enum_class_Continuation);
VTABLE_set_pointer(interp, resume, ret);
@@ -14632,8 +14594,7 @@
Parrot_str_new_constant(interp, "Not a throwable object"));
VTABLE_set_attr_str(interp, except, Parrot_str_new_constant(interp, "resume"), resume);
- dest = Parrot_ex_throw_from_op(interp, except, ret);
- return (opcode_t *)dest;
+ dest = Parrot_ex_throw_from_op(interp, except, ret);return (opcode_t *)dest;
}
opcode_t *
@@ -14646,8 +14607,7 @@
EXCEPTION_UNIMPLEMENTED,
Parrot_str_new_constant(interp, "Not a throwable object"));
dest = Parrot_ex_throw_from_op(interp, PREG(1),
- VTABLE_get_pointer(interp, PREG(2)));
- return (opcode_t *)dest;
+ VTABLE_get_pointer(interp, PREG(2)));return (opcode_t *)dest;
}
opcode_t *
@@ -14655,15 +14615,13 @@
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
opcode_t * dest;
if (PMC_IS_NULL(PREG(1)) || PREG(1)->vtable->base_type != enum_class_Exception) {
- opcode_t * const ret = cur_opcode + 2;
+ opcode_t * const ret =cur_opcode + 2;
PMC * const except = Parrot_ex_build_exception(interp, EXCEPT_fatal,
EXCEPTION_UNIMPLEMENTED,
Parrot_str_new_constant(interp, "Not a throwable object"));
- dest = Parrot_ex_throw_from_op(interp, except, ret);
- return (opcode_t *)dest;
+ dest = Parrot_ex_throw_from_op(interp, except, ret);return (opcode_t *)dest;
}
- dest = Parrot_ex_rethrow_from_op(interp, PREG(1));
- return (opcode_t *)dest;
+ dest = Parrot_ex_rethrow_from_op(interp, PREG(1));return (opcode_t *)dest;
}
opcode_t *
@@ -14678,7 +14636,7 @@
Parrot_die_s(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
opcode_t *dest;
- opcode_t * const ret = cur_opcode + 2;
+ opcode_t * const ret =cur_opcode + 2;
PMC * const resume = pmc_new(interp, enum_class_Continuation);
PMC * const exception = Parrot_ex_build_exception(interp, EXCEPT_error,
CONTROL_ERROR, SREG(1));
@@ -14687,15 +14645,14 @@
VTABLE_set_attr_str(interp, exception,
Parrot_str_new_constant(interp, "resume"), resume);
- dest = Parrot_ex_throw_from_op(interp, exception, ret);
- return (opcode_t *)dest;
+ dest = Parrot_ex_throw_from_op(interp, exception, ret);return (opcode_t *)dest;
}
opcode_t *
Parrot_die_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
opcode_t *dest;
- opcode_t * const ret = cur_opcode + 2;
+ opcode_t * const ret =cur_opcode + 2;
PMC * const resume = pmc_new(interp, enum_class_Continuation);
PMC * const exception = Parrot_ex_build_exception(interp, EXCEPT_error,
CONTROL_ERROR, CONST(1)->u.string);
@@ -14704,15 +14661,14 @@
VTABLE_set_attr_str(interp, exception,
Parrot_str_new_constant(interp, "resume"), resume);
- dest = Parrot_ex_throw_from_op(interp, exception, ret);
- return (opcode_t *)dest;
+ dest = Parrot_ex_throw_from_op(interp, exception, ret);return (opcode_t *)dest;
}
opcode_t *
Parrot_die_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
opcode_t *dest;
- opcode_t * const ret = cur_opcode + 2;
+ opcode_t * const ret =cur_opcode + 2;
PMC * const resume = pmc_new(interp, enum_class_Continuation);
STRING * const msg = PMC_IS_NULL(PREG(1)) ? NULL : VTABLE_get_string(interp, PREG(1));
PMC * const exception =
@@ -14722,15 +14678,14 @@
VTABLE_set_attr_str(interp, exception,
Parrot_str_new_constant(interp, "resume"), resume);
- dest = Parrot_ex_throw_from_op(interp, exception, ret);
- return (opcode_t *)dest;
+ dest = Parrot_ex_throw_from_op(interp, exception, ret);return (opcode_t *)dest;
}
opcode_t *
Parrot_die_pc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
opcode_t *dest;
- opcode_t * const ret = cur_opcode + 2;
+ opcode_t * const ret =cur_opcode + 2;
PMC * const resume = pmc_new(interp, enum_class_Continuation);
STRING * const msg = PMC_IS_NULL(CONST(1)->u.key) ? NULL : VTABLE_get_string(interp, CONST(1)->u.key);
PMC * const exception =
@@ -14740,8 +14695,7 @@
VTABLE_set_attr_str(interp, exception,
Parrot_str_new_constant(interp, "resume"), resume);
- dest = Parrot_ex_throw_from_op(interp, exception, ret);
- return (opcode_t *)dest;
+ dest = Parrot_ex_throw_from_op(interp, exception, ret);return (opcode_t *)dest;
}
opcode_t *
@@ -14750,11 +14704,9 @@
if (IREG(1) == EXCEPT_doomed)
_exit(IREG(2));
else {
- opcode_t * const ret = cur_opcode + 3;
+ opcode_t * const ret =cur_opcode + 3;
PMC * const exception = Parrot_ex_build_exception(interp, IREG(1), IREG(2), NULL);
- opcode_t * const dest = Parrot_ex_throw_from_op(interp, exception, ret);
-
- return (opcode_t *)dest;
+ opcode_t * const dest = Parrot_ex_throw_from_op(interp, exception, ret);return (opcode_t *)dest;
}
}
@@ -14764,11 +14716,9 @@
if (cur_opcode[1] == EXCEPT_doomed)
_exit(IREG(2));
else {
- opcode_t * const ret = cur_opcode + 3;
+ opcode_t * const ret =cur_opcode + 3;
PMC * const exception = Parrot_ex_build_exception(interp, cur_opcode[1], IREG(2), NULL);
- opcode_t * const dest = Parrot_ex_throw_from_op(interp, exception, ret);
-
- return (opcode_t *)dest;
+ opcode_t * const dest = Parrot_ex_throw_from_op(interp, exception, ret);return (opcode_t *)dest;
}
}
@@ -14778,11 +14728,9 @@
if (IREG(1) == EXCEPT_doomed)
_exit(cur_opcode[2]);
else {
- opcode_t * const ret = cur_opcode + 3;
+ opcode_t * const ret =cur_opcode + 3;
PMC * const exception = Parrot_ex_build_exception(interp, IREG(1), cur_opcode[2], NULL);
- opcode_t * const dest = Parrot_ex_throw_from_op(interp, exception, ret);
-
- return (opcode_t *)dest;
+ opcode_t * const dest = Parrot_ex_throw_from_op(interp, exception, ret);return (opcode_t *)dest;
}
}
@@ -14792,11 +14740,9 @@
if (cur_opcode[1] == EXCEPT_doomed)
_exit(cur_opcode[2]);
else {
- opcode_t * const ret = cur_opcode + 3;
+ opcode_t * const ret =cur_opcode + 3;
PMC * const exception = Parrot_ex_build_exception(interp, cur_opcode[1], cur_opcode[2], NULL);
- opcode_t * const dest = Parrot_ex_throw_from_op(interp, exception, ret);
-
- return (opcode_t *)dest;
+ opcode_t * const dest = Parrot_ex_throw_from_op(interp, exception, ret);return (opcode_t *)dest;
}
}
@@ -14804,7 +14750,7 @@
Parrot_exit_i(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
opcode_t *dest;
- opcode_t * const ret = cur_opcode + 2;
+ opcode_t * const ret =cur_opcode + 2;
PMC * const resume = pmc_new(interp, enum_class_Continuation);
PMC * const exception = Parrot_ex_build_exception(interp, EXCEPT_exit, IREG(1), NULL);
@@ -14814,15 +14760,14 @@
Parrot_str_new_constant(interp, "resume"), resume);
VTABLE_set_integer_keyed_str(interp, exception,
Parrot_str_new_constant(interp, "exit_code"), IREG(1));
- dest = Parrot_ex_throw_from_op(interp, exception, ret);
- return (opcode_t *)dest;
+ dest = Parrot_ex_throw_from_op(interp, exception, ret);return (opcode_t *)dest;
}
opcode_t *
Parrot_exit_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
opcode_t *dest;
- opcode_t * const ret = cur_opcode + 2;
+ opcode_t * const ret =cur_opcode + 2;
PMC * const resume = pmc_new(interp, enum_class_Continuation);
PMC * const exception = Parrot_ex_build_exception(interp, EXCEPT_exit, cur_opcode[1], NULL);
@@ -14832,72 +14777,63 @@
Parrot_str_new_constant(interp, "resume"), resume);
VTABLE_set_integer_keyed_str(interp, exception,
Parrot_str_new_constant(interp, "exit_code"), cur_opcode[1]);
- dest = Parrot_ex_throw_from_op(interp, exception, ret);
- return (opcode_t *)dest;
+ dest = Parrot_ex_throw_from_op(interp, exception, ret);return (opcode_t *)dest;
}
opcode_t *
Parrot_debug_i(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
if (IREG(1) != 0) { Interp_debug_SET(interp, IREG(1)); }
- else { Interp_debug_CLEAR(interp, PARROT_ALL_DEBUG_FLAGS); }
- interp->resume_offset = REL_PC + 2; interp->resume_flag = 1;return (opcode_t *)0;
+ else { Interp_debug_CLEAR(interp, PARROT_ALL_DEBUG_FLAGS); }interp->resume_offset = REL_PC + 2; interp->resume_flag = 1;return (opcode_t *)0;
}
opcode_t *
Parrot_debug_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
if (cur_opcode[1] != 0) { Interp_debug_SET(interp, cur_opcode[1]); }
- else { Interp_debug_CLEAR(interp, PARROT_ALL_DEBUG_FLAGS); }
- interp->resume_offset = REL_PC + 2; interp->resume_flag = 1;return (opcode_t *)0;
+ else { Interp_debug_CLEAR(interp, PARROT_ALL_DEBUG_FLAGS); }interp->resume_offset = REL_PC + 2; interp->resume_flag = 1;return (opcode_t *)0;
}
opcode_t *
Parrot_bounds_i(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
if (IREG(1) != 0) { Parrot_set_flag(interp, PARROT_BOUNDS_FLAG); }
- else { Interp_flags_CLEAR(interp, PARROT_BOUNDS_FLAG); }
- interp->resume_offset = REL_PC + 2; interp->resume_flag = 1;return (opcode_t *)0;
+ else { Interp_flags_CLEAR(interp, PARROT_BOUNDS_FLAG); }interp->resume_offset = REL_PC + 2; interp->resume_flag = 1;return (opcode_t *)0;
}
opcode_t *
Parrot_bounds_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
if (cur_opcode[1] != 0) { Parrot_set_flag(interp, PARROT_BOUNDS_FLAG); }
- else { Interp_flags_CLEAR(interp, PARROT_BOUNDS_FLAG); }
- interp->resume_offset = REL_PC + 2; interp->resume_flag = 1;return (opcode_t *)0;
+ else { Interp_flags_CLEAR(interp, PARROT_BOUNDS_FLAG); }interp->resume_offset = REL_PC + 2; interp->resume_flag = 1;return (opcode_t *)0;
}
opcode_t *
Parrot_profile_i(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
if (IREG(1) != 0) { Parrot_set_flag(interp, PARROT_PROFILE_FLAG); }
- else { Interp_flags_CLEAR(interp, PARROT_PROFILE_FLAG); }
- interp->resume_offset = REL_PC + 2; interp->resume_flag = 1;return (opcode_t *)0;
+ else { Interp_flags_CLEAR(interp, PARROT_PROFILE_FLAG); }interp->resume_offset = REL_PC + 2; interp->resume_flag = 1;return (opcode_t *)0;
}
opcode_t *
Parrot_profile_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
if (cur_opcode[1] != 0) { Parrot_set_flag(interp, PARROT_PROFILE_FLAG); }
- else { Interp_flags_CLEAR(interp, PARROT_PROFILE_FLAG); }
- interp->resume_offset = REL_PC + 2; interp->resume_flag = 1;return (opcode_t *)0;
+ else { Interp_flags_CLEAR(interp, PARROT_PROFILE_FLAG); }interp->resume_offset = REL_PC + 2; interp->resume_flag = 1;return (opcode_t *)0;
}
opcode_t *
Parrot_trace_i(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
if (IREG(1) != 0) { Parrot_set_trace(interp, IREG(1)); }
- else { Parrot_clear_trace(interp, PARROT_ALL_TRACE_FLAGS); }
- interp->resume_offset = REL_PC + 2; interp->resume_flag = 1;return (opcode_t *)0;
+ else { Parrot_clear_trace(interp, PARROT_ALL_TRACE_FLAGS); }interp->resume_offset = REL_PC + 2; interp->resume_flag = 1;return (opcode_t *)0;
}
opcode_t *
Parrot_trace_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
if (cur_opcode[1] != 0) { Parrot_set_trace(interp, cur_opcode[1]); }
- else { Parrot_clear_trace(interp, PARROT_ALL_TRACE_FLAGS); }
- interp->resume_offset = REL_PC + 2; interp->resume_flag = 1;return (opcode_t *)0;
+ else { Parrot_clear_trace(interp, PARROT_ALL_TRACE_FLAGS); }interp->resume_offset = REL_PC + 2; interp->resume_flag = 1;return (opcode_t *)0;
}
opcode_t *
@@ -15639,8 +15575,7 @@
opcode_t *
Parrot_eq_i_i_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (IREG(1) == IREG(2)) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (IREG(1) == IREG(2)) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -15648,8 +15583,7 @@
opcode_t *
Parrot_eq_ic_i_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (cur_opcode[1] == IREG(2)) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (cur_opcode[1] == IREG(2)) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -15657,8 +15591,7 @@
opcode_t *
Parrot_eq_i_ic_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (IREG(1) == cur_opcode[2]) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (IREG(1) == cur_opcode[2]) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -15666,8 +15599,7 @@
opcode_t *
Parrot_eq_n_n_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (NREG(1) == NREG(2)) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (NREG(1) == NREG(2)) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -15675,8 +15607,7 @@
opcode_t *
Parrot_eq_nc_n_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (CONST(1)->u.number == NREG(2)) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (CONST(1)->u.number == NREG(2)) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -15684,8 +15615,7 @@
opcode_t *
Parrot_eq_n_nc_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (NREG(1) == CONST(2)->u.number) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (NREG(1) == CONST(2)->u.number) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -15693,8 +15623,7 @@
opcode_t *
Parrot_eq_s_s_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (Parrot_str_equal(interp, SREG(1), SREG(2))) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (Parrot_str_equal(interp, SREG(1), SREG(2))) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -15702,8 +15631,7 @@
opcode_t *
Parrot_eq_sc_s_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (Parrot_str_equal(interp, CONST(1)->u.string, SREG(2))) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (Parrot_str_equal(interp, CONST(1)->u.string, SREG(2))) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -15711,8 +15639,7 @@
opcode_t *
Parrot_eq_s_sc_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (Parrot_str_equal(interp, SREG(1), CONST(2)->u.string)) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (Parrot_str_equal(interp, SREG(1), CONST(2)->u.string)) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -15720,8 +15647,7 @@
opcode_t *
Parrot_eq_p_p_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (VTABLE_is_equal(interp, PREG(1), PREG(2))) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (VTABLE_is_equal(interp, PREG(1), PREG(2))) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -15733,8 +15659,7 @@
VTABLE_set_integer_native(interp, temp, IREG(2));
if (VTABLE_is_equal(interp, PREG(1), temp)) {
- Parrot_pmc_free_temporary(interp, temp);
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ Parrot_pmc_free_temporary(interp, temp);return (opcode_t *)cur_opcode + cur_opcode[3];
}
Parrot_pmc_free_temporary(interp, temp);
@@ -15748,8 +15673,7 @@
VTABLE_set_integer_native(interp, temp, cur_opcode[2]);
if (VTABLE_is_equal(interp, PREG(1), temp)) {
- Parrot_pmc_free_temporary(interp, temp);
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ Parrot_pmc_free_temporary(interp, temp);return (opcode_t *)cur_opcode + cur_opcode[3];
}
Parrot_pmc_free_temporary(interp, temp);
@@ -15765,8 +15689,7 @@
* overriding the compare multi subs wouldn't
* have any effect with the current code
*/
- if (VTABLE_get_number(interp, PREG(1)) == NREG(2)) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (VTABLE_get_number(interp, PREG(1)) == NREG(2)) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -15780,8 +15703,7 @@
* overriding the compare multi subs wouldn't
* have any effect with the current code
*/
- if (VTABLE_get_number(interp, PREG(1)) == CONST(2)->u.number) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (VTABLE_get_number(interp, PREG(1)) == CONST(2)->u.number) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -15789,8 +15711,7 @@
opcode_t *
Parrot_eq_p_s_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (Parrot_str_equal(interp, VTABLE_get_string(interp, PREG(1)), SREG(2))) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (Parrot_str_equal(interp, VTABLE_get_string(interp, PREG(1)), SREG(2))) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -15798,8 +15719,7 @@
opcode_t *
Parrot_eq_p_sc_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (Parrot_str_equal(interp, VTABLE_get_string(interp, PREG(1)), CONST(2)->u.string)) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (Parrot_str_equal(interp, VTABLE_get_string(interp, PREG(1)), CONST(2)->u.string)) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -15807,8 +15727,7 @@
opcode_t *
Parrot_eq_str_p_p_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (VTABLE_is_equal_string(interp, PREG(1), PREG(2))) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (VTABLE_is_equal_string(interp, PREG(1), PREG(2))) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -15816,8 +15735,7 @@
opcode_t *
Parrot_eq_num_p_p_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (VTABLE_is_equal_num(interp, PREG(1), PREG(2))) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (VTABLE_is_equal_num(interp, PREG(1), PREG(2))) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -15825,8 +15743,7 @@
opcode_t *
Parrot_eq_addr_s_s_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (SREG(1) == SREG(2)) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (SREG(1) == SREG(2)) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -15834,8 +15751,7 @@
opcode_t *
Parrot_eq_addr_sc_s_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (CONST(1)->u.string == SREG(2)) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (CONST(1)->u.string == SREG(2)) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -15843,8 +15759,7 @@
opcode_t *
Parrot_eq_addr_s_sc_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (SREG(1) == CONST(2)->u.string) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (SREG(1) == CONST(2)->u.string) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -15852,8 +15767,7 @@
opcode_t *
Parrot_eq_addr_sc_sc_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (CONST(1)->u.string == CONST(2)->u.string) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (CONST(1)->u.string == CONST(2)->u.string) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -15861,8 +15775,7 @@
opcode_t *
Parrot_eq_addr_p_p_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (PREG(1) == PREG(2)) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (PREG(1) == PREG(2)) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -15870,8 +15783,7 @@
opcode_t *
Parrot_ne_i_i_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (IREG(1) != IREG(2)) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (IREG(1) != IREG(2)) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -15879,8 +15791,7 @@
opcode_t *
Parrot_ne_ic_i_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (cur_opcode[1] != IREG(2)) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (cur_opcode[1] != IREG(2)) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -15888,8 +15799,7 @@
opcode_t *
Parrot_ne_i_ic_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (IREG(1) != cur_opcode[2]) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (IREG(1) != cur_opcode[2]) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -15897,8 +15807,7 @@
opcode_t *
Parrot_ne_n_n_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (NREG(1) != NREG(2)) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (NREG(1) != NREG(2)) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -15906,8 +15815,7 @@
opcode_t *
Parrot_ne_nc_n_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (CONST(1)->u.number != NREG(2)) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (CONST(1)->u.number != NREG(2)) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -15915,8 +15823,7 @@
opcode_t *
Parrot_ne_n_nc_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (NREG(1) != CONST(2)->u.number) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (NREG(1) != CONST(2)->u.number) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -15924,8 +15831,7 @@
opcode_t *
Parrot_ne_s_s_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (Parrot_str_not_equal(interp, SREG(1), SREG(2))) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (Parrot_str_not_equal(interp, SREG(1), SREG(2))) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -15933,8 +15839,7 @@
opcode_t *
Parrot_ne_sc_s_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (Parrot_str_not_equal(interp, CONST(1)->u.string, SREG(2))) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (Parrot_str_not_equal(interp, CONST(1)->u.string, SREG(2))) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -15942,8 +15847,7 @@
opcode_t *
Parrot_ne_s_sc_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (Parrot_str_not_equal(interp, SREG(1), CONST(2)->u.string)) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (Parrot_str_not_equal(interp, SREG(1), CONST(2)->u.string)) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -15951,8 +15855,7 @@
opcode_t *
Parrot_ne_p_p_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (!VTABLE_is_equal(interp, PREG(1), PREG(2))) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (!VTABLE_is_equal(interp, PREG(1), PREG(2))) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -15964,8 +15867,7 @@
VTABLE_set_integer_native(interp, temp, IREG(2));
if (!VTABLE_is_equal(interp, PREG(1), temp)) {
- Parrot_pmc_free_temporary(interp, temp);
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ Parrot_pmc_free_temporary(interp, temp);return (opcode_t *)cur_opcode + cur_opcode[3];
}
Parrot_pmc_free_temporary(interp, temp);
@@ -15979,8 +15881,7 @@
VTABLE_set_integer_native(interp, temp, cur_opcode[2]);
if (!VTABLE_is_equal(interp, PREG(1), temp)) {
- Parrot_pmc_free_temporary(interp, temp);
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ Parrot_pmc_free_temporary(interp, temp);return (opcode_t *)cur_opcode + cur_opcode[3];
}
Parrot_pmc_free_temporary(interp, temp);
@@ -15990,8 +15891,7 @@
opcode_t *
Parrot_ne_p_n_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (VTABLE_get_number(interp, PREG(1)) != NREG(2)) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (VTABLE_get_number(interp, PREG(1)) != NREG(2)) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -15999,8 +15899,7 @@
opcode_t *
Parrot_ne_p_nc_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (VTABLE_get_number(interp, PREG(1)) != CONST(2)->u.number) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (VTABLE_get_number(interp, PREG(1)) != CONST(2)->u.number) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16008,8 +15907,7 @@
opcode_t *
Parrot_ne_p_s_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (Parrot_str_not_equal(interp, VTABLE_get_string(interp, PREG(1)), SREG(2))) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (Parrot_str_not_equal(interp, VTABLE_get_string(interp, PREG(1)), SREG(2))) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16017,8 +15915,7 @@
opcode_t *
Parrot_ne_p_sc_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (Parrot_str_not_equal(interp, VTABLE_get_string(interp, PREG(1)), CONST(2)->u.string)) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (Parrot_str_not_equal(interp, VTABLE_get_string(interp, PREG(1)), CONST(2)->u.string)) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16026,8 +15923,7 @@
opcode_t *
Parrot_ne_str_p_p_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (VTABLE_cmp_string(interp, PREG(1), PREG(2)) != 0) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (VTABLE_cmp_string(interp, PREG(1), PREG(2)) != 0) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16035,8 +15931,7 @@
opcode_t *
Parrot_ne_num_p_p_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (VTABLE_cmp_num(interp, PREG(1), PREG(2)) != 0) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (VTABLE_cmp_num(interp, PREG(1), PREG(2)) != 0) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16044,8 +15939,7 @@
opcode_t *
Parrot_ne_addr_s_s_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (SREG(1) != SREG(2)) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (SREG(1) != SREG(2)) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16053,8 +15947,7 @@
opcode_t *
Parrot_ne_addr_sc_s_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (CONST(1)->u.string != SREG(2)) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (CONST(1)->u.string != SREG(2)) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16062,8 +15955,7 @@
opcode_t *
Parrot_ne_addr_s_sc_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (SREG(1) != CONST(2)->u.string) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (SREG(1) != CONST(2)->u.string) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16071,8 +15963,7 @@
opcode_t *
Parrot_ne_addr_sc_sc_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (CONST(1)->u.string != CONST(2)->u.string) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (CONST(1)->u.string != CONST(2)->u.string) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16080,8 +15971,7 @@
opcode_t *
Parrot_ne_addr_p_p_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (PREG(1) != PREG(2)) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (PREG(1) != PREG(2)) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16089,8 +15979,7 @@
opcode_t *
Parrot_lt_i_i_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (IREG(1) < IREG(2)) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (IREG(1) < IREG(2)) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16098,8 +15987,7 @@
opcode_t *
Parrot_lt_ic_i_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (cur_opcode[1] < IREG(2)) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (cur_opcode[1] < IREG(2)) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16107,8 +15995,7 @@
opcode_t *
Parrot_lt_i_ic_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (IREG(1) < cur_opcode[2]) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (IREG(1) < cur_opcode[2]) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16116,8 +16003,7 @@
opcode_t *
Parrot_lt_n_n_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (NREG(1) < NREG(2)) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (NREG(1) < NREG(2)) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16125,8 +16011,7 @@
opcode_t *
Parrot_lt_nc_n_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (CONST(1)->u.number < NREG(2)) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (CONST(1)->u.number < NREG(2)) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16134,8 +16019,7 @@
opcode_t *
Parrot_lt_n_nc_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (NREG(1) < CONST(2)->u.number) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (NREG(1) < CONST(2)->u.number) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16143,8 +16027,7 @@
opcode_t *
Parrot_lt_s_s_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (Parrot_str_compare(interp, SREG(1), SREG(2)) < 0) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (Parrot_str_compare(interp, SREG(1), SREG(2)) < 0) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16152,8 +16035,7 @@
opcode_t *
Parrot_lt_sc_s_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (Parrot_str_compare(interp, CONST(1)->u.string, SREG(2)) < 0) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (Parrot_str_compare(interp, CONST(1)->u.string, SREG(2)) < 0) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16161,8 +16043,7 @@
opcode_t *
Parrot_lt_s_sc_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (Parrot_str_compare(interp, SREG(1), CONST(2)->u.string) < 0) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (Parrot_str_compare(interp, SREG(1), CONST(2)->u.string) < 0) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16170,8 +16051,7 @@
opcode_t *
Parrot_lt_p_p_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (VTABLE_cmp(interp, PREG(1), PREG(2)) < 0) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (VTABLE_cmp(interp, PREG(1), PREG(2)) < 0) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16183,8 +16063,7 @@
VTABLE_set_integer_native(interp, temp, IREG(2));
if (VTABLE_cmp(interp, PREG(1), temp) < 0) {
- Parrot_pmc_free_temporary(interp, temp);
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ Parrot_pmc_free_temporary(interp, temp);return (opcode_t *)cur_opcode + cur_opcode[3];
}
Parrot_pmc_free_temporary(interp, temp);
@@ -16198,8 +16077,7 @@
VTABLE_set_integer_native(interp, temp, cur_opcode[2]);
if (VTABLE_cmp(interp, PREG(1), temp) < 0) {
- Parrot_pmc_free_temporary(interp, temp);
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ Parrot_pmc_free_temporary(interp, temp);return (opcode_t *)cur_opcode + cur_opcode[3];
}
Parrot_pmc_free_temporary(interp, temp);
@@ -16209,8 +16087,7 @@
opcode_t *
Parrot_lt_p_n_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (VTABLE_get_number(interp, PREG(1)) < NREG(2)) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (VTABLE_get_number(interp, PREG(1)) < NREG(2)) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16218,8 +16095,7 @@
opcode_t *
Parrot_lt_p_nc_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (VTABLE_get_number(interp, PREG(1)) < CONST(2)->u.number) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (VTABLE_get_number(interp, PREG(1)) < CONST(2)->u.number) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16227,8 +16103,7 @@
opcode_t *
Parrot_lt_p_s_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (Parrot_str_compare(interp, VTABLE_get_string(interp, PREG(1)), SREG(2)) < 0) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (Parrot_str_compare(interp, VTABLE_get_string(interp, PREG(1)), SREG(2)) < 0) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16236,8 +16111,7 @@
opcode_t *
Parrot_lt_p_sc_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (Parrot_str_compare(interp, VTABLE_get_string(interp, PREG(1)), CONST(2)->u.string) < 0) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (Parrot_str_compare(interp, VTABLE_get_string(interp, PREG(1)), CONST(2)->u.string) < 0) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16245,8 +16119,7 @@
opcode_t *
Parrot_lt_str_p_p_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (VTABLE_cmp_string(interp, PREG(1), PREG(2)) < 0) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (VTABLE_cmp_string(interp, PREG(1), PREG(2)) < 0) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16254,8 +16127,7 @@
opcode_t *
Parrot_lt_num_p_p_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (VTABLE_cmp_num(interp, PREG(1), PREG(2)) < 0) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (VTABLE_cmp_num(interp, PREG(1), PREG(2)) < 0) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16263,8 +16135,7 @@
opcode_t *
Parrot_le_i_i_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (IREG(1) <= IREG(2)) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (IREG(1) <= IREG(2)) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16272,8 +16143,7 @@
opcode_t *
Parrot_le_ic_i_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (cur_opcode[1] <= IREG(2)) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (cur_opcode[1] <= IREG(2)) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16281,8 +16151,7 @@
opcode_t *
Parrot_le_i_ic_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (IREG(1) <= cur_opcode[2]) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (IREG(1) <= cur_opcode[2]) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16290,8 +16159,7 @@
opcode_t *
Parrot_le_n_n_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (NREG(1) <= NREG(2)) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (NREG(1) <= NREG(2)) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16299,8 +16167,7 @@
opcode_t *
Parrot_le_nc_n_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (CONST(1)->u.number <= NREG(2)) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (CONST(1)->u.number <= NREG(2)) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16308,8 +16175,7 @@
opcode_t *
Parrot_le_n_nc_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (NREG(1) <= CONST(2)->u.number) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (NREG(1) <= CONST(2)->u.number) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16317,8 +16183,7 @@
opcode_t *
Parrot_le_s_s_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (Parrot_str_compare(interp, SREG(1), SREG(2)) <= 0) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (Parrot_str_compare(interp, SREG(1), SREG(2)) <= 0) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16326,8 +16191,7 @@
opcode_t *
Parrot_le_sc_s_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (Parrot_str_compare(interp, CONST(1)->u.string, SREG(2)) <= 0) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (Parrot_str_compare(interp, CONST(1)->u.string, SREG(2)) <= 0) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16335,8 +16199,7 @@
opcode_t *
Parrot_le_s_sc_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (Parrot_str_compare(interp, SREG(1), CONST(2)->u.string) <= 0) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (Parrot_str_compare(interp, SREG(1), CONST(2)->u.string) <= 0) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16344,8 +16207,7 @@
opcode_t *
Parrot_le_p_p_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (VTABLE_cmp(interp, PREG(1), PREG(2)) <= 0) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (VTABLE_cmp(interp, PREG(1), PREG(2)) <= 0) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16357,8 +16219,7 @@
VTABLE_set_integer_native(interp, temp, IREG(2));
if (VTABLE_cmp(interp, PREG(1), temp) <= 0) {
- Parrot_pmc_free_temporary(interp, temp);
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ Parrot_pmc_free_temporary(interp, temp);return (opcode_t *)cur_opcode + cur_opcode[3];
}
Parrot_pmc_free_temporary(interp, temp);
@@ -16372,8 +16233,7 @@
VTABLE_set_integer_native(interp, temp, cur_opcode[2]);
if (VTABLE_cmp(interp, PREG(1), temp) <= 0) {
- Parrot_pmc_free_temporary(interp, temp);
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ Parrot_pmc_free_temporary(interp, temp);return (opcode_t *)cur_opcode + cur_opcode[3];
}
Parrot_pmc_free_temporary(interp, temp);
@@ -16383,8 +16243,7 @@
opcode_t *
Parrot_le_p_n_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (VTABLE_get_number(interp, PREG(1)) <= NREG(2)) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (VTABLE_get_number(interp, PREG(1)) <= NREG(2)) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16392,8 +16251,7 @@
opcode_t *
Parrot_le_p_nc_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (VTABLE_get_number(interp, PREG(1)) <= CONST(2)->u.number) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (VTABLE_get_number(interp, PREG(1)) <= CONST(2)->u.number) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16401,8 +16259,7 @@
opcode_t *
Parrot_le_p_s_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (Parrot_str_compare(interp, VTABLE_get_string(interp, PREG(1)), SREG(2)) <= 0) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (Parrot_str_compare(interp, VTABLE_get_string(interp, PREG(1)), SREG(2)) <= 0) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16410,8 +16267,7 @@
opcode_t *
Parrot_le_p_sc_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (Parrot_str_compare(interp, VTABLE_get_string(interp, PREG(1)), CONST(2)->u.string) <= 0) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (Parrot_str_compare(interp, VTABLE_get_string(interp, PREG(1)), CONST(2)->u.string) <= 0) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16419,8 +16275,7 @@
opcode_t *
Parrot_le_str_p_p_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (VTABLE_cmp_string(interp, PREG(1), PREG(2)) <= 0) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (VTABLE_cmp_string(interp, PREG(1), PREG(2)) <= 0) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16428,8 +16283,7 @@
opcode_t *
Parrot_le_num_p_p_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (VTABLE_cmp_num(interp, PREG(1), PREG(2)) <= 0) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (VTABLE_cmp_num(interp, PREG(1), PREG(2)) <= 0) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16437,8 +16291,7 @@
opcode_t *
Parrot_gt_p_p_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (VTABLE_cmp(interp, PREG(1), PREG(2)) > 0) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (VTABLE_cmp(interp, PREG(1), PREG(2)) > 0) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16450,8 +16303,7 @@
VTABLE_set_integer_native(interp, temp, IREG(2));
if (VTABLE_cmp(interp, PREG(1), temp) > 0) {
- Parrot_pmc_free_temporary(interp, temp);
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ Parrot_pmc_free_temporary(interp, temp);return (opcode_t *)cur_opcode + cur_opcode[3];
}
Parrot_pmc_free_temporary(interp, temp);
@@ -16465,8 +16317,7 @@
VTABLE_set_integer_native(interp, temp, cur_opcode[2]);
if (VTABLE_cmp(interp, PREG(1), temp) > 0) {
- Parrot_pmc_free_temporary(interp, temp);
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ Parrot_pmc_free_temporary(interp, temp);return (opcode_t *)cur_opcode + cur_opcode[3];
}
Parrot_pmc_free_temporary(interp, temp);
@@ -16476,8 +16327,7 @@
opcode_t *
Parrot_gt_p_n_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (VTABLE_get_number(interp, PREG(1)) > NREG(2)) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (VTABLE_get_number(interp, PREG(1)) > NREG(2)) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16485,8 +16335,7 @@
opcode_t *
Parrot_gt_p_nc_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (VTABLE_get_number(interp, PREG(1)) > CONST(2)->u.number) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (VTABLE_get_number(interp, PREG(1)) > CONST(2)->u.number) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16494,8 +16343,7 @@
opcode_t *
Parrot_gt_p_s_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (Parrot_str_compare(interp, VTABLE_get_string(interp, PREG(1)), SREG(2)) > 0) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (Parrot_str_compare(interp, VTABLE_get_string(interp, PREG(1)), SREG(2)) > 0) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16503,8 +16351,7 @@
opcode_t *
Parrot_gt_p_sc_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (Parrot_str_compare(interp, VTABLE_get_string(interp, PREG(1)), CONST(2)->u.string) > 0) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (Parrot_str_compare(interp, VTABLE_get_string(interp, PREG(1)), CONST(2)->u.string) > 0) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16512,8 +16359,7 @@
opcode_t *
Parrot_gt_str_p_p_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (VTABLE_cmp_string(interp, PREG(1), PREG(2)) > 0) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (VTABLE_cmp_string(interp, PREG(1), PREG(2)) > 0) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16521,8 +16367,7 @@
opcode_t *
Parrot_gt_num_p_p_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (VTABLE_cmp_num(interp, PREG(1), PREG(2)) > 0) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (VTABLE_cmp_num(interp, PREG(1), PREG(2)) > 0) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16530,8 +16375,7 @@
opcode_t *
Parrot_ge_p_p_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (VTABLE_cmp(interp, PREG(1), PREG(2)) >= 0) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (VTABLE_cmp(interp, PREG(1), PREG(2)) >= 0) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16543,8 +16387,7 @@
VTABLE_set_integer_native(interp, temp, IREG(2));
if (VTABLE_cmp(interp, PREG(1), temp) >= 0) {
- Parrot_pmc_free_temporary(interp, temp);
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ Parrot_pmc_free_temporary(interp, temp);return (opcode_t *)cur_opcode + cur_opcode[3];
}
Parrot_pmc_free_temporary(interp, temp);
@@ -16558,8 +16401,7 @@
VTABLE_set_integer_native(interp, temp, cur_opcode[2]);
if (VTABLE_cmp(interp, PREG(1), temp) >= 0) {
- Parrot_pmc_free_temporary(interp, temp);
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ Parrot_pmc_free_temporary(interp, temp);return (opcode_t *)cur_opcode + cur_opcode[3];
}
Parrot_pmc_free_temporary(interp, temp);
@@ -16569,8 +16411,7 @@
opcode_t *
Parrot_ge_p_n_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (VTABLE_get_number(interp, PREG(1)) >= NREG(2)) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (VTABLE_get_number(interp, PREG(1)) >= NREG(2)) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16578,8 +16419,7 @@
opcode_t *
Parrot_ge_p_nc_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (VTABLE_get_number(interp, PREG(1)) >= CONST(2)->u.number) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (VTABLE_get_number(interp, PREG(1)) >= CONST(2)->u.number) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16587,8 +16427,7 @@
opcode_t *
Parrot_ge_p_s_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (Parrot_str_compare(interp, VTABLE_get_string(interp, PREG(1)), SREG(2)) >= 0) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (Parrot_str_compare(interp, VTABLE_get_string(interp, PREG(1)), SREG(2)) >= 0) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16596,8 +16435,7 @@
opcode_t *
Parrot_ge_p_sc_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (Parrot_str_compare(interp, VTABLE_get_string(interp, PREG(1)), CONST(2)->u.string) >= 0) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (Parrot_str_compare(interp, VTABLE_get_string(interp, PREG(1)), CONST(2)->u.string) >= 0) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16605,8 +16443,7 @@
opcode_t *
Parrot_ge_str_p_p_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (VTABLE_cmp_string(interp, PREG(1), PREG(2)) >= 0) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (VTABLE_cmp_string(interp, PREG(1), PREG(2)) >= 0) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16614,8 +16451,7 @@
opcode_t *
Parrot_ge_num_p_p_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (VTABLE_cmp_num(interp, PREG(1), PREG(2)) >= 0) {
- return (opcode_t *)cur_opcode + cur_opcode[3];
+ if (VTABLE_cmp_num(interp, PREG(1), PREG(2)) >= 0) {return (opcode_t *)cur_opcode + cur_opcode[3];
}
return (opcode_t *)cur_opcode + 4;}
@@ -16623,8 +16459,7 @@
opcode_t *
Parrot_if_null_p_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (PMC_IS_NULL(PREG(1))) {
- return (opcode_t *)cur_opcode + cur_opcode[2];
+ if (PMC_IS_NULL(PREG(1))) {return (opcode_t *)cur_opcode + cur_opcode[2];
}
return (opcode_t *)cur_opcode + 3;}
@@ -16632,8 +16467,7 @@
opcode_t *
Parrot_if_null_s_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (STRING_IS_NULL(SREG(1))) {
- return (opcode_t *)cur_opcode + cur_opcode[2];
+ if (STRING_IS_NULL(SREG(1))) {return (opcode_t *)cur_opcode + cur_opcode[2];
}
return (opcode_t *)cur_opcode + 3;}
@@ -16641,8 +16475,7 @@
opcode_t *
Parrot_unless_null_p_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (!PMC_IS_NULL(PREG(1))) {
- return (opcode_t *)cur_opcode + cur_opcode[2];
+ if (!PMC_IS_NULL(PREG(1))) {return (opcode_t *)cur_opcode + cur_opcode[2];
}
return (opcode_t *)cur_opcode + 3;}
@@ -16650,8 +16483,7 @@
opcode_t *
Parrot_unless_null_s_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (!STRING_IS_NULL(SREG(1))) {
- return (opcode_t *)cur_opcode + cur_opcode[2];
+ if (!STRING_IS_NULL(SREG(1))) {return (opcode_t *)cur_opcode + cur_opcode[2];
}
return (opcode_t *)cur_opcode + 3;}
@@ -17495,10 +17327,9 @@
PMC * const p = PREG(1);
if (PMC_IS_NULL(p)) {
- opcode_t *handler = Parrot_ex_throw_from_op_args(interp, cur_opcode + 2,
+ opcode_t *handler = Parrot_ex_throw_from_op_args(interp,cur_opcode + 2,
EXCEPTION_UNEXPECTED_NULL,
- "Null PMC in say");
- return (opcode_t *)handler;
+ "Null PMC in say");return (opcode_t *)handler;
}
else {
STRING * const s = VTABLE_get_string(interp, p);
@@ -17785,10 +17616,9 @@
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
INTVAL den = IREG(2);
if (den == 0) {
- opcode_t *handler = Parrot_ex_throw_from_op_args(interp, cur_opcode + 3,
+ opcode_t *handler = Parrot_ex_throw_from_op_args(interp,cur_opcode + 3,
EXCEPTION_DIV_BY_ZERO,
- "Divide by zero");
- return (opcode_t *)handler;
+ "Divide by zero");return (opcode_t *)handler;
}
IREG(1) /= den;
@@ -17799,10 +17629,9 @@
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
INTVAL den = cur_opcode[2];
if (den == 0) {
- opcode_t *handler = Parrot_ex_throw_from_op_args(interp, cur_opcode + 3,
+ opcode_t *handler = Parrot_ex_throw_from_op_args(interp,cur_opcode + 3,
EXCEPTION_DIV_BY_ZERO,
- "Divide by zero");
- return (opcode_t *)handler;
+ "Divide by zero");return (opcode_t *)handler;
}
IREG(1) /= den;
@@ -17813,10 +17642,9 @@
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
FLOATVAL den = NREG(2);
if (FLOAT_IS_ZERO(den)) {
- opcode_t *handler = Parrot_ex_throw_from_op_args(interp, cur_opcode + 3,
+ opcode_t *handler = Parrot_ex_throw_from_op_args(interp,cur_opcode + 3,
EXCEPTION_DIV_BY_ZERO,
- "Divide by zero");
- return (opcode_t *)handler;
+ "Divide by zero");return (opcode_t *)handler;
}
NREG(1) /= den;
@@ -17827,10 +17655,9 @@
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
FLOATVAL den = CONST(2)->u.number;
if (FLOAT_IS_ZERO(den)) {
- opcode_t *handler = Parrot_ex_throw_from_op_args(interp, cur_opcode + 3,
+ opcode_t *handler = Parrot_ex_throw_from_op_args(interp,cur_opcode + 3,
EXCEPTION_DIV_BY_ZERO,
- "Divide by zero");
- return (opcode_t *)handler;
+ "Divide by zero");return (opcode_t *)handler;
}
NREG(1) /= den;
@@ -17876,10 +17703,9 @@
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
INTVAL den = IREG(3);
if (den == 0) {
- opcode_t *handler = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4,
+ opcode_t *handler = Parrot_ex_throw_from_op_args(interp,cur_opcode + 4,
EXCEPTION_DIV_BY_ZERO,
- "Divide by zero");
- return (opcode_t *)handler;
+ "Divide by zero");return (opcode_t *)handler;
}
IREG(1) = IREG(2) / den;
@@ -17890,10 +17716,9 @@
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
INTVAL den = IREG(3);
if (den == 0) {
- opcode_t *handler = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4,
+ opcode_t *handler = Parrot_ex_throw_from_op_args(interp,cur_opcode + 4,
EXCEPTION_DIV_BY_ZERO,
- "Divide by zero");
- return (opcode_t *)handler;
+ "Divide by zero");return (opcode_t *)handler;
}
IREG(1) = cur_opcode[2] / den;
@@ -17904,10 +17729,9 @@
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
INTVAL den = cur_opcode[3];
if (den == 0) {
- opcode_t *handler = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4,
+ opcode_t *handler = Parrot_ex_throw_from_op_args(interp,cur_opcode + 4,
EXCEPTION_DIV_BY_ZERO,
- "Divide by zero");
- return (opcode_t *)handler;
+ "Divide by zero");return (opcode_t *)handler;
}
IREG(1) = IREG(2) / den;
@@ -17918,10 +17742,9 @@
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
INTVAL den = cur_opcode[3];
if (den == 0) {
- opcode_t *handler = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4,
+ opcode_t *handler = Parrot_ex_throw_from_op_args(interp,cur_opcode + 4,
EXCEPTION_DIV_BY_ZERO,
- "Divide by zero");
- return (opcode_t *)handler;
+ "Divide by zero");return (opcode_t *)handler;
}
IREG(1) = cur_opcode[2] / den;
@@ -17932,10 +17755,9 @@
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
FLOATVAL den = NREG(3);
if (FLOAT_IS_ZERO(den)) {
- opcode_t *handler = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4,
+ opcode_t *handler = Parrot_ex_throw_from_op_args(interp,cur_opcode + 4,
EXCEPTION_DIV_BY_ZERO,
- "Divide by zero");
- return (opcode_t *)handler;
+ "Divide by zero");return (opcode_t *)handler;
}
NREG(1) = NREG(2) / den;
@@ -17946,10 +17768,9 @@
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
FLOATVAL den = NREG(3);
if (FLOAT_IS_ZERO(den)) {
- opcode_t *handler = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4,
+ opcode_t *handler = Parrot_ex_throw_from_op_args(interp,cur_opcode + 4,
EXCEPTION_DIV_BY_ZERO,
- "Divide by zero");
- return (opcode_t *)handler;
+ "Divide by zero");return (opcode_t *)handler;
}
NREG(1) = CONST(2)->u.number / den;
@@ -17960,10 +17781,9 @@
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
FLOATVAL den = CONST(3)->u.number;
if (FLOAT_IS_ZERO(den)) {
- opcode_t *handler = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4,
+ opcode_t *handler = Parrot_ex_throw_from_op_args(interp,cur_opcode + 4,
EXCEPTION_DIV_BY_ZERO,
- "Divide by zero");
- return (opcode_t *)handler;
+ "Divide by zero");return (opcode_t *)handler;
}
NREG(1) = NREG(2) / den;
@@ -17974,10 +17794,9 @@
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
FLOATVAL den = CONST(3)->u.number;
if (FLOAT_IS_ZERO(den)) {
- opcode_t *handler = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4,
+ opcode_t *handler = Parrot_ex_throw_from_op_args(interp,cur_opcode + 4,
EXCEPTION_DIV_BY_ZERO,
- "Divide by zero");
- return (opcode_t *)handler;
+ "Divide by zero");return (opcode_t *)handler;
}
NREG(1) = CONST(2)->u.number / den;
@@ -18025,10 +17844,9 @@
FLOATVAL f;
if (den == 0) {
- opcode_t *handler = Parrot_ex_throw_from_op_args(interp, cur_opcode + 3,
+ opcode_t *handler = Parrot_ex_throw_from_op_args(interp,cur_opcode + 3,
EXCEPTION_DIV_BY_ZERO,
- "Divide by zero");
- return (opcode_t *)handler;
+ "Divide by zero");return (opcode_t *)handler;
}
f = floor(IREG(1) / den);
@@ -18043,10 +17861,9 @@
FLOATVAL f;
if (den == 0) {
- opcode_t *handler = Parrot_ex_throw_from_op_args(interp, cur_opcode + 3,
+ opcode_t *handler = Parrot_ex_throw_from_op_args(interp,cur_opcode + 3,
EXCEPTION_DIV_BY_ZERO,
- "Divide by zero");
- return (opcode_t *)handler;
+ "Divide by zero");return (opcode_t *)handler;
}
f = floor(IREG(1) / den);
@@ -18059,10 +17876,9 @@
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
FLOATVAL den = NREG(2);
if (FLOAT_IS_ZERO(den)) {
- opcode_t *handler = Parrot_ex_throw_from_op_args(interp, cur_opcode + 3,
+ opcode_t *handler = Parrot_ex_throw_from_op_args(interp,cur_opcode + 3,
EXCEPTION_DIV_BY_ZERO,
- "Divide by zero");
- return (opcode_t *)handler;
+ "Divide by zero");return (opcode_t *)handler;
}
NREG(1) = floor(NREG(1) / den);
@@ -18073,10 +17889,9 @@
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
FLOATVAL den = CONST(2)->u.number;
if (FLOAT_IS_ZERO(den)) {
- opcode_t *handler = Parrot_ex_throw_from_op_args(interp, cur_opcode + 3,
+ opcode_t *handler = Parrot_ex_throw_from_op_args(interp,cur_opcode + 3,
EXCEPTION_DIV_BY_ZERO,
- "Divide by zero");
- return (opcode_t *)handler;
+ "Divide by zero");return (opcode_t *)handler;
}
NREG(1) = floor(NREG(1) / den);
@@ -18124,10 +17939,9 @@
FLOATVAL f;
if (den == 0) {
- opcode_t *handler = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4,
+ opcode_t *handler = Parrot_ex_throw_from_op_args(interp,cur_opcode + 4,
EXCEPTION_DIV_BY_ZERO,
- "Divide by zero");
- return (opcode_t *)handler;
+ "Divide by zero");return (opcode_t *)handler;
}
f = floor(IREG(2) / den);
@@ -18142,10 +17956,9 @@
FLOATVAL f;
if (den == 0) {
- opcode_t *handler = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4,
+ opcode_t *handler = Parrot_ex_throw_from_op_args(interp,cur_opcode + 4,
EXCEPTION_DIV_BY_ZERO,
- "Divide by zero");
- return (opcode_t *)handler;
+ "Divide by zero");return (opcode_t *)handler;
}
f = floor(cur_opcode[2] / den);
@@ -18160,10 +17973,9 @@
FLOATVAL f;
if (den == 0) {
- opcode_t *handler = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4,
+ opcode_t *handler = Parrot_ex_throw_from_op_args(interp,cur_opcode + 4,
EXCEPTION_DIV_BY_ZERO,
- "Divide by zero");
- return (opcode_t *)handler;
+ "Divide by zero");return (opcode_t *)handler;
}
f = floor(IREG(2) / den);
@@ -18176,10 +17988,9 @@
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
FLOATVAL den = NREG(3);
if (FLOAT_IS_ZERO(den)) {
- opcode_t *handler = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4,
+ opcode_t *handler = Parrot_ex_throw_from_op_args(interp,cur_opcode + 4,
EXCEPTION_DIV_BY_ZERO,
- "Divide by zero");
- return (opcode_t *)handler;
+ "Divide by zero");return (opcode_t *)handler;
}
NREG(1) = floor(NREG(2) / den);
@@ -18190,10 +18001,9 @@
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
FLOATVAL den = NREG(3);
if (FLOAT_IS_ZERO(den)) {
- opcode_t *handler = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4,
+ opcode_t *handler = Parrot_ex_throw_from_op_args(interp,cur_opcode + 4,
EXCEPTION_DIV_BY_ZERO,
- "Divide by zero");
- return (opcode_t *)handler;
+ "Divide by zero");return (opcode_t *)handler;
}
NREG(1) = floor(CONST(2)->u.number / den);
@@ -18204,10 +18014,9 @@
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
FLOATVAL den = CONST(3)->u.number;
if (FLOAT_IS_ZERO(den)) {
- opcode_t *handler = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4,
+ opcode_t *handler = Parrot_ex_throw_from_op_args(interp,cur_opcode + 4,
EXCEPTION_DIV_BY_ZERO,
- "Divide by zero");
- return (opcode_t *)handler;
+ "Divide by zero");return (opcode_t *)handler;
}
NREG(1) = floor(NREG(2) / den);
@@ -18787,7 +18596,7 @@
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const object = PREG(1);
STRING * const meth = SREG(2);
- opcode_t * const next = cur_opcode + 3;
+ opcode_t * const next =cur_opcode + 3;
PMC * const method_pmc = VTABLE_find_method(interp, object, meth);
opcode_t *dest = NULL;
@@ -18813,8 +18622,7 @@
Parrot_pcc_set_object(interp, signature, object);
interp->current_cont = NEED_CONTINUATION;
dest = VTABLE_invoke(interp, method_pmc, next);
- }
- return (opcode_t *)dest;
+ }return (opcode_t *)dest;
}
opcode_t *
@@ -18822,7 +18630,7 @@
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const object = PREG(1);
STRING * const meth = CONST(2)->u.string;
- opcode_t * const next = cur_opcode + 3;
+ opcode_t * const next =cur_opcode + 3;
PMC * const method_pmc = VTABLE_find_method(interp, object, meth);
opcode_t *dest = NULL;
@@ -18848,24 +18656,21 @@
Parrot_pcc_set_object(interp, signature, object);
interp->current_cont = NEED_CONTINUATION;
dest = VTABLE_invoke(interp, method_pmc, next);
- }
- return (opcode_t *)dest;
+ }return (opcode_t *)dest;
}
opcode_t *
Parrot_callmethodcc_p_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
opcode_t *dest;
- opcode_t * const next = cur_opcode + 3;
+ opcode_t * const next =cur_opcode + 3;
PMC * signature = Parrot_pcc_get_signature(interp,
CURRENT_CONTEXT(interp));
if (!PMC_IS_NULL(signature))
Parrot_pcc_set_object(interp, signature, PREG(1));
interp->current_cont = NEED_CONTINUATION;
- dest = VTABLE_invoke(interp, PREG(2), next);
-
- return (opcode_t *)dest;
+ dest = VTABLE_invoke(interp, PREG(2), next);return (opcode_t *)dest;
}
opcode_t *
@@ -18873,7 +18678,7 @@
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const object = PREG(1);
STRING * const meth = SREG(2);
- opcode_t * const next = cur_opcode + 4;
+ opcode_t * const next =cur_opcode + 4;
PMC * const method_pmc = VTABLE_find_method(interp, object, meth);
opcode_t *dest = NULL;
@@ -18891,8 +18696,7 @@
Parrot_pcc_set_object(interp, signature, object);
interp->current_cont = PREG(3);
dest = (opcode_t *)VTABLE_invoke(interp, method_pmc, next);
- }
- return (opcode_t *)dest;
+ }return (opcode_t *)dest;
}
opcode_t *
@@ -18900,7 +18704,7 @@
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const object = PREG(1);
STRING * const meth = CONST(2)->u.string;
- opcode_t * const next = cur_opcode + 4;
+ opcode_t * const next =cur_opcode + 4;
PMC * const method_pmc = VTABLE_find_method(interp, object, meth);
opcode_t *dest = NULL;
@@ -18918,8 +18722,7 @@
Parrot_pcc_set_object(interp, signature, object);
interp->current_cont = PREG(3);
dest = (opcode_t *)VTABLE_invoke(interp, method_pmc, next);
- }
- return (opcode_t *)dest;
+ }return (opcode_t *)dest;
}
opcode_t *
@@ -18927,7 +18730,7 @@
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const object = PREG(1);
PMC * const method_pmc = PREG(2);
- opcode_t * const next = cur_opcode + 4;
+ opcode_t * const next =cur_opcode + 4;
opcode_t *dest;
PMC * signature = Parrot_pcc_get_signature(interp,
@@ -18936,14 +18739,13 @@
if (!PMC_IS_NULL(signature))
Parrot_pcc_set_object(interp, signature, object);
interp->current_cont = PREG(3);
- dest = (opcode_t *)VTABLE_invoke(interp, method_pmc, next);
- return (opcode_t *)dest;
+ dest = (opcode_t *)VTABLE_invoke(interp, method_pmc, next);return (opcode_t *)dest;
}
opcode_t *
Parrot_tailcallmethod_p_s(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- opcode_t * const next = cur_opcode + 3;
+ opcode_t * const next =cur_opcode + 3;
PMC * const object = PREG(1);
STRING * const meth = SREG(2);
PMC * const method_pmc = VTABLE_find_method(interp, object, meth);
@@ -18963,14 +18765,13 @@
if (!PMC_IS_NULL(signature))
Parrot_pcc_set_object(interp, signature, object);
dest = (opcode_t *)VTABLE_invoke(interp, method_pmc, next);
- }
- return (opcode_t *)dest;
+ }return (opcode_t *)dest;
}
opcode_t *
Parrot_tailcallmethod_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- opcode_t * const next = cur_opcode + 3;
+ opcode_t * const next =cur_opcode + 3;
PMC * const object = PREG(1);
STRING * const meth = CONST(2)->u.string;
PMC * const method_pmc = VTABLE_find_method(interp, object, meth);
@@ -18990,14 +18791,13 @@
if (!PMC_IS_NULL(signature))
Parrot_pcc_set_object(interp, signature, object);
dest = (opcode_t *)VTABLE_invoke(interp, method_pmc, next);
- }
- return (opcode_t *)dest;
+ }return (opcode_t *)dest;
}
opcode_t *
Parrot_tailcallmethod_p_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- opcode_t * const next = cur_opcode + 3;
+ opcode_t * const next =cur_opcode + 3;
PMC * const object = PREG(1);
PMC * const method_pmc = PREG(2);
@@ -19010,8 +18810,7 @@
if (!PMC_IS_NULL(signature))
Parrot_pcc_set_object(interp, signature, object);
- dest = (opcode_t *)VTABLE_invoke(interp, method_pmc, next);
- return (opcode_t *)dest;
+ dest = (opcode_t *)VTABLE_invoke(interp, method_pmc, next);return (opcode_t *)dest;
}
opcode_t *
@@ -19134,350 +18933,310 @@
Parrot_subclass_p_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const parent_class = Parrot_oo_get_class(interp, PREG(2));
- opcode_t * const next = cur_opcode + 3;
+ opcode_t * const next =cur_opcode + 3;
if (PMC_IS_NULL(parent_class)) {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, next,
EXCEPTION_NO_CLASS,
- "Class '%Ss' doesn't exist", VTABLE_get_string(interp, PREG(2)));
- return (opcode_t *)handler;
+ "Class '%Ss' doesn't exist", VTABLE_get_string(interp, PREG(2)));return (opcode_t *)handler;
}
PREG(1) = Parrot_pmc_new(interp, enum_class_Class);
- VTABLE_add_parent(interp, PREG(1), parent_class);
- return (opcode_t *)next;
+ VTABLE_add_parent(interp, PREG(1), parent_class);return (opcode_t *)next;
}
opcode_t *
Parrot_subclass_p_pc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const parent_class = Parrot_oo_get_class(interp, CONST(2)->u.key);
- opcode_t * const next = cur_opcode + 3;
+ opcode_t * const next =cur_opcode + 3;
if (PMC_IS_NULL(parent_class)) {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, next,
EXCEPTION_NO_CLASS,
- "Class '%Ss' doesn't exist", VTABLE_get_string(interp, CONST(2)->u.key));
- return (opcode_t *)handler;
+ "Class '%Ss' doesn't exist", VTABLE_get_string(interp, CONST(2)->u.key));return (opcode_t *)handler;
}
PREG(1) = Parrot_pmc_new(interp, enum_class_Class);
- VTABLE_add_parent(interp, PREG(1), parent_class);
- return (opcode_t *)next;
+ VTABLE_add_parent(interp, PREG(1), parent_class);return (opcode_t *)next;
}
opcode_t *
Parrot_subclass_p_p_s(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const parent_class = Parrot_oo_get_class(interp, PREG(2));
- opcode_t * const next = cur_opcode + 4;
+ opcode_t * const next =cur_opcode + 4;
if (PMC_IS_NULL(parent_class)) {
opcode_t * handler = Parrot_ex_throw_from_op_args(interp, next,
EXCEPTION_NO_CLASS,
- "Class '%Ss' doesn't exist", VTABLE_get_string(interp, PREG(2)));
- return (opcode_t *)handler;
+ "Class '%Ss' doesn't exist", VTABLE_get_string(interp, PREG(2)));return (opcode_t *)handler;
}
PREG(1) = Parrot_oo_newclass_from_str(interp, SREG(3));
- VTABLE_add_parent(interp, PREG(1), parent_class);
- return (opcode_t *)next;
+ VTABLE_add_parent(interp, PREG(1), parent_class);return (opcode_t *)next;
}
opcode_t *
Parrot_subclass_p_pc_s(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const parent_class = Parrot_oo_get_class(interp, CONST(2)->u.key);
- opcode_t * const next = cur_opcode + 4;
+ opcode_t * const next =cur_opcode + 4;
if (PMC_IS_NULL(parent_class)) {
opcode_t * handler = Parrot_ex_throw_from_op_args(interp, next,
EXCEPTION_NO_CLASS,
- "Class '%Ss' doesn't exist", VTABLE_get_string(interp, CONST(2)->u.key));
- return (opcode_t *)handler;
+ "Class '%Ss' doesn't exist", VTABLE_get_string(interp, CONST(2)->u.key));return (opcode_t *)handler;
}
PREG(1) = Parrot_oo_newclass_from_str(interp, SREG(3));
- VTABLE_add_parent(interp, PREG(1), parent_class);
- return (opcode_t *)next;
+ VTABLE_add_parent(interp, PREG(1), parent_class);return (opcode_t *)next;
}
opcode_t *
Parrot_subclass_p_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const parent_class = Parrot_oo_get_class(interp, PREG(2));
- opcode_t * const next = cur_opcode + 4;
+ opcode_t * const next =cur_opcode + 4;
if (PMC_IS_NULL(parent_class)) {
opcode_t * handler = Parrot_ex_throw_from_op_args(interp, next,
EXCEPTION_NO_CLASS,
- "Class '%Ss' doesn't exist", VTABLE_get_string(interp, PREG(2)));
- return (opcode_t *)handler;
+ "Class '%Ss' doesn't exist", VTABLE_get_string(interp, PREG(2)));return (opcode_t *)handler;
}
PREG(1) = Parrot_oo_newclass_from_str(interp, CONST(3)->u.string);
- VTABLE_add_parent(interp, PREG(1), parent_class);
- return (opcode_t *)next;
+ VTABLE_add_parent(interp, PREG(1), parent_class);return (opcode_t *)next;
}
opcode_t *
Parrot_subclass_p_pc_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const parent_class = Parrot_oo_get_class(interp, CONST(2)->u.key);
- opcode_t * const next = cur_opcode + 4;
+ opcode_t * const next =cur_opcode + 4;
if (PMC_IS_NULL(parent_class)) {
opcode_t * handler = Parrot_ex_throw_from_op_args(interp, next,
EXCEPTION_NO_CLASS,
- "Class '%Ss' doesn't exist", VTABLE_get_string(interp, CONST(2)->u.key));
- return (opcode_t *)handler;
+ "Class '%Ss' doesn't exist", VTABLE_get_string(interp, CONST(2)->u.key));return (opcode_t *)handler;
}
PREG(1) = Parrot_oo_newclass_from_str(interp, CONST(3)->u.string);
- VTABLE_add_parent(interp, PREG(1), parent_class);
- return (opcode_t *)next;
+ VTABLE_add_parent(interp, PREG(1), parent_class);return (opcode_t *)next;
}
opcode_t *
Parrot_subclass_p_p_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const parent_class = Parrot_oo_get_class(interp, PREG(2));
- opcode_t * const next = cur_opcode + 4;
+ opcode_t * const next =cur_opcode + 4;
if (PMC_IS_NULL(parent_class)) {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, next,
EXCEPTION_NO_CLASS,
- "Class '%Ss' doesn't exist", VTABLE_get_string(interp, PREG(2)));
- return (opcode_t *)handler;
+ "Class '%Ss' doesn't exist", VTABLE_get_string(interp, PREG(2)));return (opcode_t *)handler;
}
PREG(1) = Parrot_pmc_new_init(interp, enum_class_Class, PREG(3));
- VTABLE_add_parent(interp, PREG(1), parent_class);
- return (opcode_t *)next;
+ VTABLE_add_parent(interp, PREG(1), parent_class);return (opcode_t *)next;
}
opcode_t *
Parrot_subclass_p_pc_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const parent_class = Parrot_oo_get_class(interp, CONST(2)->u.key);
- opcode_t * const next = cur_opcode + 4;
+ opcode_t * const next =cur_opcode + 4;
if (PMC_IS_NULL(parent_class)) {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, next,
EXCEPTION_NO_CLASS,
- "Class '%Ss' doesn't exist", VTABLE_get_string(interp, CONST(2)->u.key));
- return (opcode_t *)handler;
+ "Class '%Ss' doesn't exist", VTABLE_get_string(interp, CONST(2)->u.key));return (opcode_t *)handler;
}
PREG(1) = Parrot_pmc_new_init(interp, enum_class_Class, PREG(3));
- VTABLE_add_parent(interp, PREG(1), parent_class);
- return (opcode_t *)next;
+ VTABLE_add_parent(interp, PREG(1), parent_class);return (opcode_t *)next;
}
opcode_t *
Parrot_subclass_p_p_pc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const parent_class = Parrot_oo_get_class(interp, PREG(2));
- opcode_t * const next = cur_opcode + 4;
+ opcode_t * const next =cur_opcode + 4;
if (PMC_IS_NULL(parent_class)) {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, next,
EXCEPTION_NO_CLASS,
- "Class '%Ss' doesn't exist", VTABLE_get_string(interp, PREG(2)));
- return (opcode_t *)handler;
+ "Class '%Ss' doesn't exist", VTABLE_get_string(interp, PREG(2)));return (opcode_t *)handler;
}
PREG(1) = Parrot_pmc_new_init(interp, enum_class_Class, CONST(3)->u.key);
- VTABLE_add_parent(interp, PREG(1), parent_class);
- return (opcode_t *)next;
+ VTABLE_add_parent(interp, PREG(1), parent_class);return (opcode_t *)next;
}
opcode_t *
Parrot_subclass_p_pc_pc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const parent_class = Parrot_oo_get_class(interp, CONST(2)->u.key);
- opcode_t * const next = cur_opcode + 4;
+ opcode_t * const next =cur_opcode + 4;
if (PMC_IS_NULL(parent_class)) {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, next,
EXCEPTION_NO_CLASS,
- "Class '%Ss' doesn't exist", VTABLE_get_string(interp, CONST(2)->u.key));
- return (opcode_t *)handler;
+ "Class '%Ss' doesn't exist", VTABLE_get_string(interp, CONST(2)->u.key));return (opcode_t *)handler;
}
PREG(1) = Parrot_pmc_new_init(interp, enum_class_Class, CONST(3)->u.key);
- VTABLE_add_parent(interp, PREG(1), parent_class);
- return (opcode_t *)next;
+ VTABLE_add_parent(interp, PREG(1), parent_class);return (opcode_t *)next;
}
opcode_t *
Parrot_subclass_p_s(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const parent_class = Parrot_oo_get_class_str(interp, SREG(2));
- opcode_t * const next = cur_opcode + 3;
+ opcode_t * const next =cur_opcode + 3;
if (PMC_IS_NULL(parent_class)) {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, next,
EXCEPTION_NO_CLASS,
- "Class '%Ss' doesn't exist", SREG(2));
- return (opcode_t *)handler;
+ "Class '%Ss' doesn't exist", SREG(2));return (opcode_t *)handler;
}
PREG(1) = Parrot_pmc_new(interp, enum_class_Class);
- VTABLE_add_parent(interp, PREG(1), parent_class);
- return (opcode_t *)next;
+ VTABLE_add_parent(interp, PREG(1), parent_class);return (opcode_t *)next;
}
opcode_t *
Parrot_subclass_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const parent_class = Parrot_oo_get_class_str(interp, CONST(2)->u.string);
- opcode_t * const next = cur_opcode + 3;
+ opcode_t * const next =cur_opcode + 3;
if (PMC_IS_NULL(parent_class)) {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, next,
EXCEPTION_NO_CLASS,
- "Class '%Ss' doesn't exist", CONST(2)->u.string);
- return (opcode_t *)handler;
+ "Class '%Ss' doesn't exist", CONST(2)->u.string);return (opcode_t *)handler;
}
PREG(1) = Parrot_pmc_new(interp, enum_class_Class);
- VTABLE_add_parent(interp, PREG(1), parent_class);
- return (opcode_t *)next;
+ VTABLE_add_parent(interp, PREG(1), parent_class);return (opcode_t *)next;
}
opcode_t *
Parrot_subclass_p_s_s(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const parent_class = Parrot_oo_get_class_str(interp, SREG(2));
- opcode_t * const next = cur_opcode + 4;
+ opcode_t * const next =cur_opcode + 4;
if (PMC_IS_NULL(parent_class)) {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, next,
EXCEPTION_NO_CLASS,
- "Class '%Ss' doesn't exist", SREG(2));
- return (opcode_t *)handler;
+ "Class '%Ss' doesn't exist", SREG(2));return (opcode_t *)handler;
}
PREG(1) = Parrot_oo_newclass_from_str(interp, SREG(3));
- VTABLE_add_parent(interp, PREG(1), parent_class);
- return (opcode_t *)next;
+ VTABLE_add_parent(interp, PREG(1), parent_class);return (opcode_t *)next;
}
opcode_t *
Parrot_subclass_p_sc_s(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const parent_class = Parrot_oo_get_class_str(interp, CONST(2)->u.string);
- opcode_t * const next = cur_opcode + 4;
+ opcode_t * const next =cur_opcode + 4;
if (PMC_IS_NULL(parent_class)) {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, next,
EXCEPTION_NO_CLASS,
- "Class '%Ss' doesn't exist", CONST(2)->u.string);
- return (opcode_t *)handler;
+ "Class '%Ss' doesn't exist", CONST(2)->u.string);return (opcode_t *)handler;
}
PREG(1) = Parrot_oo_newclass_from_str(interp, SREG(3));
- VTABLE_add_parent(interp, PREG(1), parent_class);
- return (opcode_t *)next;
+ VTABLE_add_parent(interp, PREG(1), parent_class);return (opcode_t *)next;
}
opcode_t *
Parrot_subclass_p_s_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const parent_class = Parrot_oo_get_class_str(interp, SREG(2));
- opcode_t * const next = cur_opcode + 4;
+ opcode_t * const next =cur_opcode + 4;
if (PMC_IS_NULL(parent_class)) {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, next,
EXCEPTION_NO_CLASS,
- "Class '%Ss' doesn't exist", SREG(2));
- return (opcode_t *)handler;
+ "Class '%Ss' doesn't exist", SREG(2));return (opcode_t *)handler;
}
PREG(1) = Parrot_oo_newclass_from_str(interp, CONST(3)->u.string);
- VTABLE_add_parent(interp, PREG(1), parent_class);
- return (opcode_t *)next;
+ VTABLE_add_parent(interp, PREG(1), parent_class);return (opcode_t *)next;
}
opcode_t *
Parrot_subclass_p_sc_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const parent_class = Parrot_oo_get_class_str(interp, CONST(2)->u.string);
- opcode_t * const next = cur_opcode + 4;
+ opcode_t * const next =cur_opcode + 4;
if (PMC_IS_NULL(parent_class)) {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, next,
EXCEPTION_NO_CLASS,
- "Class '%Ss' doesn't exist", CONST(2)->u.string);
- return (opcode_t *)handler;
+ "Class '%Ss' doesn't exist", CONST(2)->u.string);return (opcode_t *)handler;
}
PREG(1) = Parrot_oo_newclass_from_str(interp, CONST(3)->u.string);
- VTABLE_add_parent(interp, PREG(1), parent_class);
- return (opcode_t *)next;
+ VTABLE_add_parent(interp, PREG(1), parent_class);return (opcode_t *)next;
}
opcode_t *
Parrot_subclass_p_s_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const parent_class = Parrot_oo_get_class_str(interp, SREG(2));
- opcode_t * const next = cur_opcode + 4;
+ opcode_t * const next =cur_opcode + 4;
if (PMC_IS_NULL(parent_class)) {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, next,
EXCEPTION_NO_CLASS,
- "Class '%Ss' doesn't exist", SREG(2));
- return (opcode_t *)handler;
+ "Class '%Ss' doesn't exist", SREG(2));return (opcode_t *)handler;
}
PREG(1) = Parrot_pmc_new_init(interp, enum_class_Class, PREG(3));
- VTABLE_add_parent(interp, PREG(1), parent_class);
- return (opcode_t *)next;
+ VTABLE_add_parent(interp, PREG(1), parent_class);return (opcode_t *)next;
}
opcode_t *
Parrot_subclass_p_sc_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const parent_class = Parrot_oo_get_class_str(interp, CONST(2)->u.string);
- opcode_t * const next = cur_opcode + 4;
+ opcode_t * const next =cur_opcode + 4;
if (PMC_IS_NULL(parent_class)) {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, next,
EXCEPTION_NO_CLASS,
- "Class '%Ss' doesn't exist", CONST(2)->u.string);
- return (opcode_t *)handler;
+ "Class '%Ss' doesn't exist", CONST(2)->u.string);return (opcode_t *)handler;
}
PREG(1) = Parrot_pmc_new_init(interp, enum_class_Class, PREG(3));
- VTABLE_add_parent(interp, PREG(1), parent_class);
- return (opcode_t *)next;
+ VTABLE_add_parent(interp, PREG(1), parent_class);return (opcode_t *)next;
}
opcode_t *
Parrot_subclass_p_s_pc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const parent_class = Parrot_oo_get_class_str(interp, SREG(2));
- opcode_t * const next = cur_opcode + 4;
+ opcode_t * const next =cur_opcode + 4;
if (PMC_IS_NULL(parent_class)) {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, next,
EXCEPTION_NO_CLASS,
- "Class '%Ss' doesn't exist", SREG(2));
- return (opcode_t *)handler;
+ "Class '%Ss' doesn't exist", SREG(2));return (opcode_t *)handler;
}
PREG(1) = Parrot_pmc_new_init(interp, enum_class_Class, CONST(3)->u.key);
- VTABLE_add_parent(interp, PREG(1), parent_class);
- return (opcode_t *)next;
+ VTABLE_add_parent(interp, PREG(1), parent_class);return (opcode_t *)next;
}
opcode_t *
Parrot_subclass_p_sc_pc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const parent_class = Parrot_oo_get_class_str(interp, CONST(2)->u.string);
- opcode_t * const next = cur_opcode + 4;
+ opcode_t * const next =cur_opcode + 4;
if (PMC_IS_NULL(parent_class)) {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, next,
EXCEPTION_NO_CLASS,
- "Class '%Ss' doesn't exist", CONST(2)->u.string);
- return (opcode_t *)handler;
+ "Class '%Ss' doesn't exist", CONST(2)->u.string);return (opcode_t *)handler;
}
PREG(1) = Parrot_pmc_new_init(interp, enum_class_Class, CONST(3)->u.key);
- VTABLE_add_parent(interp, PREG(1), parent_class);
- return (opcode_t *)next;
+ VTABLE_add_parent(interp, PREG(1), parent_class);return (opcode_t *)next;
}
opcode_t *
@@ -19547,8 +19306,7 @@
else {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, NULL,
EXCEPTION_INVALID_OPERATION,
- "Cannot add attribute to non-class");
- return (opcode_t *)handler;
+ "Cannot add attribute to non-class");return (opcode_t *)handler;
}
return (opcode_t *)cur_opcode + 3;}
@@ -19564,8 +19322,7 @@
else {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, NULL,
EXCEPTION_INVALID_OPERATION,
- "Cannot add attribute to non-class");
- return (opcode_t *)handler;
+ "Cannot add attribute to non-class");return (opcode_t *)handler;
}
return (opcode_t *)cur_opcode + 3;}
@@ -19723,10 +19480,9 @@
else {
const INTVAL type = Parrot_pmc_get_type_str(interp, name);
if (type <= 0) {
- opcode_t * const dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 3,
+ opcode_t * const dest = Parrot_ex_throw_from_op_args(interp,cur_opcode + 3,
EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", name);
- return (opcode_t *)dest;
+ "Class '%Ss' not found", name);return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
}
@@ -19746,10 +19502,9 @@
else {
const INTVAL type = Parrot_pmc_get_type_str(interp, name);
if (type <= 0) {
- opcode_t * const dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 3,
+ opcode_t * const dest = Parrot_ex_throw_from_op_args(interp,cur_opcode + 3,
EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", name);
- return (opcode_t *)dest;
+ "Class '%Ss' not found", name);return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
}
@@ -19769,10 +19524,9 @@
else {
const INTVAL type = Parrot_pmc_get_type_str(interp, name);
if (type <= 0) {
- opcode_t * const dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4,
+ opcode_t * const dest = Parrot_ex_throw_from_op_args(interp,cur_opcode + 4,
EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", name);
- return (opcode_t *)dest;
+ "Class '%Ss' not found", name);return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new_init(interp, type, PREG(3));
}
@@ -19792,10 +19546,9 @@
else {
const INTVAL type = Parrot_pmc_get_type_str(interp, name);
if (type <= 0) {
- opcode_t * const dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4,
+ opcode_t * const dest = Parrot_ex_throw_from_op_args(interp,cur_opcode + 4,
EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", name);
- return (opcode_t *)dest;
+ "Class '%Ss' not found", name);return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new_init(interp, type, PREG(3));
}
@@ -19815,10 +19568,9 @@
else {
const INTVAL type = Parrot_pmc_get_type_str(interp, name);
if (type <= 0) {
- opcode_t * const dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4,
+ opcode_t * const dest = Parrot_ex_throw_from_op_args(interp,cur_opcode + 4,
EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", name);
- return (opcode_t *)dest;
+ "Class '%Ss' not found", name);return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new_init(interp, type, CONST(3)->u.key);
}
@@ -19838,10 +19590,9 @@
else {
const INTVAL type = Parrot_pmc_get_type_str(interp, name);
if (type <= 0) {
- opcode_t * const dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4,
+ opcode_t * const dest = Parrot_ex_throw_from_op_args(interp,cur_opcode + 4,
EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", name);
- return (opcode_t *)dest;
+ "Class '%Ss' not found", name);return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new_init(interp, type, CONST(3)->u.key);
}
@@ -19859,10 +19610,9 @@
else {
const INTVAL type = Parrot_pmc_get_type(interp, name_key);
if (type <= 0) {
- opcode_t * const dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 3,
+ opcode_t * const dest = Parrot_ex_throw_from_op_args(interp,cur_opcode + 3,
EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, name_key));
- return (opcode_t *)dest;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, name_key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
}
@@ -19880,10 +19630,9 @@
else {
const INTVAL type = Parrot_pmc_get_type(interp, name_key);
if (type <= 0) {
- opcode_t * const dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 3,
+ opcode_t * const dest = Parrot_ex_throw_from_op_args(interp,cur_opcode + 3,
EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, name_key));
- return (opcode_t *)dest;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, name_key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
}
@@ -19901,10 +19650,9 @@
else {
const INTVAL type = Parrot_pmc_get_type(interp, name_key);
if (type <= 0) {
- opcode_t * const dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4,
+ opcode_t * const dest = Parrot_ex_throw_from_op_args(interp,cur_opcode + 4,
EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, name_key));
- return (opcode_t *)dest;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, name_key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new_init(interp, type, PREG(3));
}
@@ -19922,10 +19670,9 @@
else {
const INTVAL type = Parrot_pmc_get_type(interp, name_key);
if (type <= 0) {
- opcode_t * const dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4,
+ opcode_t * const dest = Parrot_ex_throw_from_op_args(interp,cur_opcode + 4,
EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, name_key));
- return (opcode_t *)dest;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, name_key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new_init(interp, type, PREG(3));
}
@@ -19943,10 +19690,9 @@
else {
const INTVAL type = Parrot_pmc_get_type(interp, name_key);
if (type <= 0) {
- opcode_t * const dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4,
+ opcode_t * const dest = Parrot_ex_throw_from_op_args(interp,cur_opcode + 4,
EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, name_key));
- return (opcode_t *)dest;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, name_key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new_init(interp, type, CONST(3)->u.key);
}
@@ -19964,10 +19710,9 @@
else {
const INTVAL type = Parrot_pmc_get_type(interp, name_key);
if (type <= 0) {
- opcode_t * const dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4,
+ opcode_t * const dest = Parrot_ex_throw_from_op_args(interp,cur_opcode + 4,
EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, name_key));
- return (opcode_t *)dest;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, name_key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new_init(interp, type, CONST(3)->u.key);
}
@@ -19987,10 +19732,9 @@
if (!PMC_IS_NULL(classobj))
PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL);
else {
- opcode_t * const dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 3,
+ opcode_t * const dest = Parrot_ex_throw_from_op_args(interp,cur_opcode + 3,
EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, key));
- return (opcode_t *)dest;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, key));return (opcode_t *)dest;
}
return (opcode_t *)cur_opcode + 3;}
@@ -20008,10 +19752,9 @@
if (!PMC_IS_NULL(classobj))
PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL);
else {
- opcode_t * const dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 3,
+ opcode_t * const dest = Parrot_ex_throw_from_op_args(interp,cur_opcode + 3,
EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, key));
- return (opcode_t *)dest;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, key));return (opcode_t *)dest;
}
return (opcode_t *)cur_opcode + 3;}
@@ -20029,10 +19772,9 @@
if (!PMC_IS_NULL(classobj))
PREG(1) = VTABLE_instantiate(interp, classobj, PREG(3));
else {
- opcode_t * const dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4,
+ opcode_t * const dest = Parrot_ex_throw_from_op_args(interp,cur_opcode + 4,
EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, key));
- return (opcode_t *)dest;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, key));return (opcode_t *)dest;
}
return (opcode_t *)cur_opcode + 4;}
@@ -20050,10 +19792,9 @@
if (!PMC_IS_NULL(classobj))
PREG(1) = VTABLE_instantiate(interp, classobj, PREG(3));
else {
- opcode_t * const dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4,
+ opcode_t * const dest = Parrot_ex_throw_from_op_args(interp,cur_opcode + 4,
EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, key));
- return (opcode_t *)dest;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, key));return (opcode_t *)dest;
}
return (opcode_t *)cur_opcode + 4;}
@@ -20071,10 +19812,9 @@
if (!PMC_IS_NULL(classobj))
PREG(1) = VTABLE_instantiate(interp, classobj, CONST(3)->u.key);
else {
- opcode_t * const dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4,
+ opcode_t * const dest = Parrot_ex_throw_from_op_args(interp,cur_opcode + 4,
EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, key));
- return (opcode_t *)dest;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, key));return (opcode_t *)dest;
}
return (opcode_t *)cur_opcode + 4;}
@@ -20092,10 +19832,9 @@
if (!PMC_IS_NULL(classobj))
PREG(1) = VTABLE_instantiate(interp, classobj, CONST(3)->u.key);
else {
- opcode_t * const dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4,
+ opcode_t * const dest = Parrot_ex_throw_from_op_args(interp,cur_opcode + 4,
EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, key));
- return (opcode_t *)dest;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, key));return (opcode_t *)dest;
}
return (opcode_t *)cur_opcode + 4;}
@@ -20124,31 +19863,27 @@
opcode_t *
Parrot_find_method_p_p_s(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- opcode_t * const resume = cur_opcode + 4;
+ opcode_t * const resume =cur_opcode + 4;
PREG(1) = VTABLE_find_method(interp, PREG(2), SREG(3));
if (PMC_IS_NULL(PREG(1)) || !VTABLE_defined(interp, PREG(1))) {
opcode_t * const dest = Parrot_ex_throw_from_op_args(interp, resume,
EXCEPTION_METHOD_NOT_FOUND,
"Method '%Ss' not found for invocant of class '%Ss'", SREG(3),
- VTABLE_get_string(interp, VTABLE_get_class(interp, PREG(2))));
- return (opcode_t *)dest;
- }
- return (opcode_t *)resume;
+ VTABLE_get_string(interp, VTABLE_get_class(interp, PREG(2))));return (opcode_t *)dest;
+ }return (opcode_t *)resume;
}
opcode_t *
Parrot_find_method_p_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- opcode_t * const resume = cur_opcode + 4;
+ opcode_t * const resume =cur_opcode + 4;
PREG(1) = VTABLE_find_method(interp, PREG(2), CONST(3)->u.string);
if (PMC_IS_NULL(PREG(1)) || !VTABLE_defined(interp, PREG(1))) {
opcode_t * const dest = Parrot_ex_throw_from_op_args(interp, resume,
EXCEPTION_METHOD_NOT_FOUND,
"Method '%Ss' not found for invocant of class '%Ss'", CONST(3)->u.string,
- VTABLE_get_string(interp, VTABLE_get_class(interp, PREG(2))));
- return (opcode_t *)dest;
- }
- return (opcode_t *)resume;
+ VTABLE_get_string(interp, VTABLE_get_class(interp, PREG(2))));return (opcode_t *)dest;
+ }return (opcode_t *)resume;
}
opcode_t *
@@ -21273,10 +21008,9 @@
Parrot_copy_p_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
if (PMC_IS_NULL(PREG(1))) {
- opcode_t * const dest = cur_opcode + 3;
+ opcode_t * const dest =cur_opcode + 3;
opcode_t * const handler = Parrot_ex_throw_from_op_args(interp, dest,
- EXCEPTION_NULL_REG_ACCESS, "Null PMC in copy");
- return (opcode_t *)handler;
+ EXCEPTION_NULL_REG_ACCESS, "Null PMC in copy");return (opcode_t *)handler;
}
else {
PMC * const clone = VTABLE_clone(interp, PREG(2));
@@ -21505,8 +21239,7 @@
if (IREG(3) < 0) {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, NULL,
EXCEPTION_NEG_REPEAT,
- "Cannot repeat with negative arg");
- return (opcode_t *)handler;
+ "Cannot repeat with negative arg");return (opcode_t *)handler;
}
SREG(1) = Parrot_str_repeat(interp, SREG(2), (UINTVAL)IREG(3));
@@ -21518,8 +21251,7 @@
if (IREG(3) < 0) {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, NULL,
EXCEPTION_NEG_REPEAT,
- "Cannot repeat with negative arg");
- return (opcode_t *)handler;
+ "Cannot repeat with negative arg");return (opcode_t *)handler;
}
SREG(1) = Parrot_str_repeat(interp, CONST(2)->u.string, (UINTVAL)IREG(3));
@@ -21531,8 +21263,7 @@
if (cur_opcode[3] < 0) {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, NULL,
EXCEPTION_NEG_REPEAT,
- "Cannot repeat with negative arg");
- return (opcode_t *)handler;
+ "Cannot repeat with negative arg");return (opcode_t *)handler;
}
SREG(1) = Parrot_str_repeat(interp, SREG(2), (UINTVAL)cur_opcode[3]);
@@ -21544,8 +21275,7 @@
if (cur_opcode[3] < 0) {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, NULL,
EXCEPTION_NEG_REPEAT,
- "Cannot repeat with negative arg");
- return (opcode_t *)handler;
+ "Cannot repeat with negative arg");return (opcode_t *)handler;
}
SREG(1) = Parrot_str_repeat(interp, CONST(2)->u.string, (UINTVAL)cur_opcode[3]);
@@ -21557,8 +21287,7 @@
if (IREG(3) < 0) {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, NULL,
EXCEPTION_NEG_REPEAT,
- "Cannot repeat with negative arg");
- return (opcode_t *)handler;
+ "Cannot repeat with negative arg");return (opcode_t *)handler;
}
PREG(1) = VTABLE_repeat_int(interp, PREG(2), IREG(3), PREG(1));
@@ -21570,8 +21299,7 @@
if (cur_opcode[3] < 0) {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, NULL,
EXCEPTION_NEG_REPEAT,
- "Cannot repeat with negative arg");
- return (opcode_t *)handler;
+ "Cannot repeat with negative arg");return (opcode_t *)handler;
}
PREG(1) = VTABLE_repeat_int(interp, PREG(2), cur_opcode[3], PREG(1));
@@ -21583,8 +21311,7 @@
if (VTABLE_get_integer(interp, PREG(3)) < 0) {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, NULL,
EXCEPTION_NEG_REPEAT,
- "Cannot repeat with negative arg");
- return (opcode_t *)handler;
+ "Cannot repeat with negative arg");return (opcode_t *)handler;
}
PREG(1) = VTABLE_repeat(interp, PREG(2), PREG(3), PREG(1));
@@ -22037,8 +21764,7 @@
{
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, NULL,
EXCEPTION_INVALID_OPERATION,
- "stringinfo: unknown info type: %d", IREG(3));
- return (opcode_t *)handler;
+ "stringinfo: unknown info type: %d", IREG(3));return (opcode_t *)handler;
}
}
}
@@ -22074,8 +21800,7 @@
{
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, NULL,
EXCEPTION_INVALID_OPERATION,
- "stringinfo: unknown info type: %d", IREG(3));
- return (opcode_t *)handler;
+ "stringinfo: unknown info type: %d", IREG(3));return (opcode_t *)handler;
}
}
}
@@ -22111,8 +21836,7 @@
{
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, NULL,
EXCEPTION_INVALID_OPERATION,
- "stringinfo: unknown info type: %d", cur_opcode[3]);
- return (opcode_t *)handler;
+ "stringinfo: unknown info type: %d", cur_opcode[3]);return (opcode_t *)handler;
}
}
}
@@ -22148,8 +21872,7 @@
{
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, NULL,
EXCEPTION_INVALID_OPERATION,
- "stringinfo: unknown info type: %d", cur_opcode[3]);
- return (opcode_t *)handler;
+ "stringinfo: unknown info type: %d", cur_opcode[3]);return (opcode_t *)handler;
}
}
}
@@ -22275,8 +21998,7 @@
if (n < 0) {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, NULL,
EXCEPTION_INVALID_CHARTYPE,
- "charset '%Ss' not found", SREG(2));
- return (opcode_t *)handler;
+ "charset '%Ss' not found", SREG(2));return (opcode_t *)handler;
}
IREG(1) = n;
@@ -22289,8 +22011,7 @@
if (n < 0) {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, NULL,
EXCEPTION_INVALID_CHARTYPE,
- "charset '%Ss' not found", CONST(2)->u.string);
- return (opcode_t *)handler;
+ "charset '%Ss' not found", CONST(2)->u.string);return (opcode_t *)handler;
}
IREG(1) = n;
@@ -22359,8 +22080,7 @@
if (n < 0) {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, NULL,
EXCEPTION_INVALID_ENCODING,
- "encoding '%Ss' not found", SREG(2));
- return (opcode_t *)handler;
+ "encoding '%Ss' not found", SREG(2));return (opcode_t *)handler;
}
IREG(1) = n;
@@ -22373,8 +22093,7 @@
if (n < 0) {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, NULL,
EXCEPTION_INVALID_ENCODING,
- "encoding '%Ss' not found", CONST(2)->u.string);
- return (opcode_t *)handler;
+ "encoding '%Ss' not found", CONST(2)->u.string);return (opcode_t *)handler;
}
IREG(1) = n;
@@ -22778,57 +22497,49 @@
opcode_t *
Parrot_sleep_i(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- opcode_t *next = cur_opcode + 2;
+ opcode_t *next =cur_opcode + 2;
if (IREG(1) < 0) {
opcode_t * const handler = Parrot_ex_throw_from_op_args(interp, next,
EXCEPTION_NEG_SLEEP,
- "Cannot go back in time");
- return (opcode_t *)handler;
+ "Cannot go back in time");return (opcode_t *)handler;
}
- next = (opcode_t *)Parrot_cx_schedule_sleep(interp, (FLOATVAL) IREG(1), next);
- return (opcode_t *)next;
+ next = (opcode_t *)Parrot_cx_schedule_sleep(interp, (FLOATVAL) IREG(1), next);return (opcode_t *)next;
}
opcode_t *
Parrot_sleep_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- opcode_t *next = cur_opcode + 2;
+ opcode_t *next =cur_opcode + 2;
if (cur_opcode[1] < 0) {
opcode_t * const handler = Parrot_ex_throw_from_op_args(interp, next,
EXCEPTION_NEG_SLEEP,
- "Cannot go back in time");
- return (opcode_t *)handler;
+ "Cannot go back in time");return (opcode_t *)handler;
}
- next = (opcode_t *)Parrot_cx_schedule_sleep(interp, (FLOATVAL) cur_opcode[1], next);
- return (opcode_t *)next;
+ next = (opcode_t *)Parrot_cx_schedule_sleep(interp, (FLOATVAL) cur_opcode[1], next);return (opcode_t *)next;
}
opcode_t *
Parrot_sleep_n(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- opcode_t *next = cur_opcode + 2;
+ opcode_t *next =cur_opcode + 2;
if (NREG(1) < 0.0) {
opcode_t * const handler = Parrot_ex_throw_from_op_args(interp, next,
EXCEPTION_NEG_SLEEP,
- "Cannot go back in time");
- return (opcode_t *)handler;
+ "Cannot go back in time");return (opcode_t *)handler;
}
- next = (opcode_t *)Parrot_cx_schedule_sleep(interp, NREG(1), next);
- return (opcode_t *)next;
+ next = (opcode_t *)Parrot_cx_schedule_sleep(interp, NREG(1), next);return (opcode_t *)next;
}
opcode_t *
Parrot_sleep_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- opcode_t *next = cur_opcode + 2;
+ opcode_t *next =cur_opcode + 2;
if (CONST(1)->u.number < 0.0) {
opcode_t * const handler = Parrot_ex_throw_from_op_args(interp, next,
EXCEPTION_NEG_SLEEP,
- "Cannot go back in time");
- return (opcode_t *)handler;
+ "Cannot go back in time");return (opcode_t *)handler;
}
- next = (opcode_t *)Parrot_cx_schedule_sleep(interp, CONST(1)->u.number, next);
- return (opcode_t *)next;
+ next = (opcode_t *)Parrot_cx_schedule_sleep(interp, CONST(1)->u.number, next);return (opcode_t *)next;
}
opcode_t *
@@ -22841,8 +22552,7 @@
if (PMC_IS_NULL(lex_pad)) {
opcode_t * const handler = Parrot_ex_throw_from_op_args(interp, NULL,
EXCEPTION_LEX_NOT_FOUND,
- "Lexical '%Ss' not found", lex_name);
- return (opcode_t *)handler;
+ "Lexical '%Ss' not found", lex_name);return (opcode_t *)handler;
}
VTABLE_set_pmc_keyed_str(interp, lex_pad, lex_name, PREG(2));
@@ -22858,8 +22568,7 @@
if (PMC_IS_NULL(lex_pad)) {
opcode_t * const handler = Parrot_ex_throw_from_op_args(interp, NULL,
EXCEPTION_LEX_NOT_FOUND,
- "Lexical '%Ss' not found", lex_name);
- return (opcode_t *)handler;
+ "Lexical '%Ss' not found", lex_name);return (opcode_t *)handler;
}
VTABLE_set_pmc_keyed_str(interp, lex_pad, lex_name, PREG(2));
@@ -22879,8 +22588,7 @@
if (PMC_IS_NULL(lex_pad)) {
opcode_t * const handler = Parrot_ex_throw_from_op_args(interp, NULL,
EXCEPTION_LEX_NOT_FOUND,
- "Lexical '%Ss' not found in dynamic scope", lex_name);
- return (opcode_t *)handler;
+ "Lexical '%Ss' not found in dynamic scope", lex_name);return (opcode_t *)handler;
}
VTABLE_set_pmc_keyed_str(interp, lex_pad, lex_name, PREG(2));
@@ -22900,8 +22608,7 @@
if (PMC_IS_NULL(lex_pad)) {
opcode_t * const handler = Parrot_ex_throw_from_op_args(interp, NULL,
EXCEPTION_LEX_NOT_FOUND,
- "Lexical '%Ss' not found in dynamic scope", lex_name);
- return (opcode_t *)handler;
+ "Lexical '%Ss' not found in dynamic scope", lex_name);return (opcode_t *)handler;
}
VTABLE_set_pmc_keyed_str(interp, lex_pad, lex_name, PREG(2));
@@ -22921,8 +22628,7 @@
if (!result) {
opcode_t * const handler = Parrot_ex_throw_from_op_args(interp, NULL,
EXCEPTION_LEX_NOT_FOUND,
- "Lexical '%Ss' not found", lex_name);
- return (opcode_t *)handler;
+ "Lexical '%Ss' not found", lex_name);return (opcode_t *)handler;
}
PREG(1) = result;
@@ -22942,8 +22648,7 @@
if (!result) {
opcode_t * const handler = Parrot_ex_throw_from_op_args(interp, NULL,
EXCEPTION_LEX_NOT_FOUND,
- "Lexical '%Ss' not found", lex_name);
- return (opcode_t *)handler;
+ "Lexical '%Ss' not found", lex_name);return (opcode_t *)handler;
}
PREG(1) = result;
@@ -23127,7 +22832,7 @@
Parrot_get_global_p_s(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const cur_ns = Parrot_pcc_get_namespace(interp, CURRENT_CONTEXT(interp));
- PREG(1) = Parrot_find_global_op(interp, cur_ns, SREG(2), cur_opcode + 3);
+ PREG(1) = Parrot_find_global_op(interp, cur_ns, SREG(2),cur_opcode + 3);
return (opcode_t *)cur_opcode + 3;}
@@ -23135,7 +22840,7 @@
Parrot_get_global_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const cur_ns = Parrot_pcc_get_namespace(interp, CURRENT_CONTEXT(interp));
- PREG(1) = Parrot_find_global_op(interp, cur_ns, CONST(2)->u.string, cur_opcode + 3);
+ PREG(1) = Parrot_find_global_op(interp, cur_ns, CONST(2)->u.string,cur_opcode + 3);
return (opcode_t *)cur_opcode + 3;}
@@ -23151,7 +22856,7 @@
if (PMC_IS_NULL(ns))
PREG(1) = PMCNULL;
else
- PREG(1) = Parrot_find_global_op(interp, ns, SREG(3), cur_opcode + 4);
+ PREG(1) = Parrot_find_global_op(interp, ns, SREG(3),cur_opcode + 4);
}
return (opcode_t *)cur_opcode + 4;}
@@ -23168,7 +22873,7 @@
if (PMC_IS_NULL(ns))
PREG(1) = PMCNULL;
else
- PREG(1) = Parrot_find_global_op(interp, ns, SREG(3), cur_opcode + 4);
+ PREG(1) = Parrot_find_global_op(interp, ns, SREG(3),cur_opcode + 4);
}
return (opcode_t *)cur_opcode + 4;}
@@ -23185,7 +22890,7 @@
if (PMC_IS_NULL(ns))
PREG(1) = PMCNULL;
else
- PREG(1) = Parrot_find_global_op(interp, ns, CONST(3)->u.string, cur_opcode + 4);
+ PREG(1) = Parrot_find_global_op(interp, ns, CONST(3)->u.string,cur_opcode + 4);
}
return (opcode_t *)cur_opcode + 4;}
@@ -23202,7 +22907,7 @@
if (PMC_IS_NULL(ns))
PREG(1) = PMCNULL;
else
- PREG(1) = Parrot_find_global_op(interp, ns, CONST(3)->u.string, cur_opcode + 4);
+ PREG(1) = Parrot_find_global_op(interp, ns, CONST(3)->u.string,cur_opcode + 4);
}
return (opcode_t *)cur_opcode + 4;}
@@ -23211,7 +22916,7 @@
Parrot_get_hll_global_p_s(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const hll_ns = Parrot_get_ctx_HLL_namespace(interp);
- PREG(1) = Parrot_find_global_op(interp, hll_ns, SREG(2), cur_opcode + 3);
+ PREG(1) = Parrot_find_global_op(interp, hll_ns, SREG(2),cur_opcode + 3);
return (opcode_t *)cur_opcode + 3;}
@@ -23219,7 +22924,7 @@
Parrot_get_hll_global_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const hll_ns = Parrot_get_ctx_HLL_namespace(interp);
- PREG(1) = Parrot_find_global_op(interp, hll_ns, CONST(2)->u.string, cur_opcode + 3);
+ PREG(1) = Parrot_find_global_op(interp, hll_ns, CONST(2)->u.string,cur_opcode + 3);
return (opcode_t *)cur_opcode + 3;}
@@ -23235,7 +22940,7 @@
if (PMC_IS_NULL(ns))
PREG(1) = PMCNULL;
else
- PREG(1) = Parrot_find_global_op(interp, ns, SREG(3), cur_opcode + 4);
+ PREG(1) = Parrot_find_global_op(interp, ns, SREG(3),cur_opcode + 4);
}
return (opcode_t *)cur_opcode + 4;}
@@ -23252,7 +22957,7 @@
if (PMC_IS_NULL(ns))
PREG(1) = PMCNULL;
else
- PREG(1) = Parrot_find_global_op(interp, ns, SREG(3), cur_opcode + 4);
+ PREG(1) = Parrot_find_global_op(interp, ns, SREG(3),cur_opcode + 4);
}
return (opcode_t *)cur_opcode + 4;}
@@ -23269,7 +22974,7 @@
if (PMC_IS_NULL(ns))
PREG(1) = PMCNULL;
else
- PREG(1) = Parrot_find_global_op(interp, ns, CONST(3)->u.string, cur_opcode + 4);
+ PREG(1) = Parrot_find_global_op(interp, ns, CONST(3)->u.string,cur_opcode + 4);
}
return (opcode_t *)cur_opcode + 4;}
@@ -23286,7 +22991,7 @@
if (PMC_IS_NULL(ns))
PREG(1) = PMCNULL;
else
- PREG(1) = Parrot_find_global_op(interp, ns, CONST(3)->u.string, cur_opcode + 4);
+ PREG(1) = Parrot_find_global_op(interp, ns, CONST(3)->u.string,cur_opcode + 4);
}
return (opcode_t *)cur_opcode + 4;}
@@ -23295,7 +23000,7 @@
Parrot_get_root_global_p_s(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const root_ns = interp->root_namespace;
- PREG(1) = Parrot_find_global_op(interp, root_ns, SREG(2), cur_opcode + 3);
+ PREG(1) = Parrot_find_global_op(interp, root_ns, SREG(2),cur_opcode + 3);
return (opcode_t *)cur_opcode + 3;}
@@ -23303,7 +23008,7 @@
Parrot_get_root_global_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const root_ns = interp->root_namespace;
- PREG(1) = Parrot_find_global_op(interp, root_ns, CONST(2)->u.string, cur_opcode + 3);
+ PREG(1) = Parrot_find_global_op(interp, root_ns, CONST(2)->u.string,cur_opcode + 3);
return (opcode_t *)cur_opcode + 3;}
@@ -23318,7 +23023,7 @@
if (PMC_IS_NULL(ns))
PREG(1) = PMCNULL;
else
- PREG(1) = Parrot_find_global_op(interp, ns, SREG(3), cur_opcode + 4);
+ PREG(1) = Parrot_find_global_op(interp, ns, SREG(3),cur_opcode + 4);
}
return (opcode_t *)cur_opcode + 4;}
@@ -23334,7 +23039,7 @@
if (PMC_IS_NULL(ns))
PREG(1) = PMCNULL;
else
- PREG(1) = Parrot_find_global_op(interp, ns, SREG(3), cur_opcode + 4);
+ PREG(1) = Parrot_find_global_op(interp, ns, SREG(3),cur_opcode + 4);
}
return (opcode_t *)cur_opcode + 4;}
@@ -23350,7 +23055,7 @@
if (PMC_IS_NULL(ns))
PREG(1) = PMCNULL;
else
- PREG(1) = Parrot_find_global_op(interp, ns, CONST(3)->u.string, cur_opcode + 4);
+ PREG(1) = Parrot_find_global_op(interp, ns, CONST(3)->u.string,cur_opcode + 4);
}
return (opcode_t *)cur_opcode + 4;}
@@ -23366,7 +23071,7 @@
if (PMC_IS_NULL(ns))
PREG(1) = PMCNULL;
else
- PREG(1) = Parrot_find_global_op(interp, ns, CONST(3)->u.string, cur_opcode + 4);
+ PREG(1) = Parrot_find_global_op(interp, ns, CONST(3)->u.string,cur_opcode + 4);
}
return (opcode_t *)cur_opcode + 4;}
@@ -23545,11 +23250,10 @@
if (!SREG(2)) {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, NULL,
EXCEPTION_INVALID_OPERATION,
- "Tried to find null name");
- return (opcode_t *)handler;
+ "Tried to find null name");return (opcode_t *)handler;
}
- PREG(1) = Parrot_find_name_op(interp, SREG(2), cur_opcode + 3);
+ PREG(1) = Parrot_find_name_op(interp, SREG(2),cur_opcode + 3);
return (opcode_t *)cur_opcode + 3;}
@@ -23559,25 +23263,23 @@
if (!CONST(2)->u.string) {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, NULL,
EXCEPTION_INVALID_OPERATION,
- "Tried to find null name");
- return (opcode_t *)handler;
+ "Tried to find null name");return (opcode_t *)handler;
}
- PREG(1) = Parrot_find_name_op(interp, CONST(2)->u.string, cur_opcode + 3);
+ PREG(1) = Parrot_find_name_op(interp, CONST(2)->u.string,cur_opcode + 3);
return (opcode_t *)cur_opcode + 3;}
opcode_t *
Parrot_find_sub_not_null_p_s(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- opcode_t *dest = cur_opcode + 3;
+ opcode_t *dest =cur_opcode + 3;
PMC *sub = Parrot_find_name_op(interp, SREG(2), dest);
if (PMC_IS_NULL(sub)) {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, dest,
EXCEPTION_GLOBAL_NOT_FOUND,
- "Could not find sub %Ss", SREG(2));
- return (opcode_t *)handler;
+ "Could not find sub %Ss", SREG(2));return (opcode_t *)handler;
}
PREG(1) = sub;
@@ -23587,14 +23289,13 @@
opcode_t *
Parrot_find_sub_not_null_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- opcode_t *dest = cur_opcode + 3;
+ opcode_t *dest =cur_opcode + 3;
PMC *sub = Parrot_find_name_op(interp, CONST(2)->u.string, dest);
if (PMC_IS_NULL(sub)) {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, dest,
EXCEPTION_GLOBAL_NOT_FOUND,
- "Could not find sub %Ss", CONST(2)->u.string);
- return (opcode_t *)handler;
+ "Could not find sub %Ss", CONST(2)->u.string);return (opcode_t *)handler;
}
PREG(1) = sub;
@@ -23640,9 +23341,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, PREG(4));
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -23663,9 +23363,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, PREG(4));
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -23686,9 +23385,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, PREG(4));
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -23709,9 +23407,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, PREG(4));
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -23732,9 +23429,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -23755,9 +23451,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -23778,9 +23473,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -23801,9 +23495,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -23824,9 +23517,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, PREG(4));
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -23847,9 +23539,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, PREG(4));
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -23870,9 +23561,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, PREG(4));
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -23893,9 +23583,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, PREG(4));
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -23916,9 +23605,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -23939,9 +23627,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -23962,9 +23649,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -23985,9 +23671,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24008,9 +23693,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, PREG(4));
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24031,9 +23715,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, PREG(4));
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24054,9 +23737,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, PREG(4));
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24077,9 +23759,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, PREG(4));
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24100,9 +23781,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24123,9 +23803,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24146,9 +23825,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24169,9 +23847,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24194,9 +23871,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, PREG(4));
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24220,9 +23896,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, PREG(4));
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24246,9 +23921,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, PREG(4));
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24272,9 +23946,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, PREG(4));
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24298,9 +23971,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24324,9 +23996,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24350,9 +24021,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24376,9 +24046,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24401,9 +24070,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, PREG(4));
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24427,9 +24095,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, PREG(4));
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24453,9 +24120,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, PREG(4));
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24479,9 +24145,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, PREG(4));
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24505,9 +24170,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24531,9 +24195,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24557,9 +24220,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24583,9 +24245,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24609,9 +24270,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, PREG(4));
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24635,9 +24295,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, PREG(4));
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24661,9 +24320,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, PREG(4));
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24687,9 +24345,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, PREG(4));
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, PREG(4)));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24713,9 +24370,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24739,9 +24395,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24765,9 +24420,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24791,9 +24445,8 @@
const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
- interp, cur_opcode + 5, EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));
- return (opcode_t *)dest;
+ interp,cur_opcode + 5, EXCEPTION_NO_CLASS,
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4)->u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24820,10 +24473,9 @@
else {
const INTVAL type = Parrot_pmc_get_type_str(interp, name);
if (type <= 0) {
- opcode_t *dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4,
+ opcode_t *dest = Parrot_ex_throw_from_op_args(interp,cur_opcode + 4,
EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", name);
- return (opcode_t *)dest;
+ "Class '%Ss' not found", name);return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new_init_int(interp, type, IREG(3));
}
@@ -24846,10 +24498,9 @@
else {
const INTVAL type = Parrot_pmc_get_type_str(interp, name);
if (type <= 0) {
- opcode_t *dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4,
+ opcode_t *dest = Parrot_ex_throw_from_op_args(interp,cur_opcode + 4,
EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", name);
- return (opcode_t *)dest;
+ "Class '%Ss' not found", name);return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new_init_int(interp, type, IREG(3));
}
@@ -24872,10 +24523,9 @@
else {
const INTVAL type = Parrot_pmc_get_type_str(interp, name);
if (type <= 0) {
- opcode_t *dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4,
+ opcode_t *dest = Parrot_ex_throw_from_op_args(interp,cur_opcode + 4,
EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", name);
- return (opcode_t *)dest;
+ "Class '%Ss' not found", name);return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new_init_int(interp, type, cur_opcode[3]);
}
@@ -24898,10 +24548,9 @@
else {
const INTVAL type = Parrot_pmc_get_type_str(interp, name);
if (type <= 0) {
- opcode_t *dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4,
+ opcode_t *dest = Parrot_ex_throw_from_op_args(interp,cur_opcode + 4,
EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", name);
- return (opcode_t *)dest;
+ "Class '%Ss' not found", name);return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new_init_int(interp, type, cur_opcode[3]);
}
@@ -24933,10 +24582,9 @@
/* it's a typo */
else {
- opcode_t *dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4,
+ opcode_t *dest = Parrot_ex_throw_from_op_args(interp,cur_opcode + 4,
EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, name_key));
- return (opcode_t *)dest;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, name_key));return (opcode_t *)dest;
}
return (opcode_t *)cur_opcode + 4;}
@@ -24966,10 +24614,9 @@
/* it's a typo */
else {
- opcode_t *dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4,
+ opcode_t *dest = Parrot_ex_throw_from_op_args(interp,cur_opcode + 4,
EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, name_key));
- return (opcode_t *)dest;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, name_key));return (opcode_t *)dest;
}
return (opcode_t *)cur_opcode + 4;}
@@ -24999,10 +24646,9 @@
/* it's a typo */
else {
- opcode_t *dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4,
+ opcode_t *dest = Parrot_ex_throw_from_op_args(interp,cur_opcode + 4,
EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, name_key));
- return (opcode_t *)dest;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, name_key));return (opcode_t *)dest;
}
return (opcode_t *)cur_opcode + 4;}
@@ -25032,10 +24678,9 @@
/* it's a typo */
else {
- opcode_t *dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4,
+ opcode_t *dest = Parrot_ex_throw_from_op_args(interp,cur_opcode + 4,
EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, name_key));
- return (opcode_t *)dest;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, name_key));return (opcode_t *)dest;
}
return (opcode_t *)cur_opcode + 4;}
@@ -25067,10 +24712,9 @@
/* it's a typo */
else {
- opcode_t *dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4,
+ opcode_t *dest = Parrot_ex_throw_from_op_args(interp,cur_opcode + 4,
EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, name_key));
- return (opcode_t *)dest;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, name_key));return (opcode_t *)dest;
}
return (opcode_t *)cur_opcode + 4;}
@@ -25102,10 +24746,9 @@
/* it's a typo */
else {
- opcode_t *dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4,
+ opcode_t *dest = Parrot_ex_throw_from_op_args(interp,cur_opcode + 4,
EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, name_key));
- return (opcode_t *)dest;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, name_key));return (opcode_t *)dest;
}
return (opcode_t *)cur_opcode + 4;}
@@ -25137,10 +24780,9 @@
/* it's a typo */
else {
- opcode_t *dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4,
+ opcode_t *dest = Parrot_ex_throw_from_op_args(interp,cur_opcode + 4,
EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, name_key));
- return (opcode_t *)dest;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, name_key));return (opcode_t *)dest;
}
return (opcode_t *)cur_opcode + 4;}
@@ -25172,10 +24814,9 @@
/* it's a typo */
else {
- opcode_t *dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4,
+ opcode_t *dest = Parrot_ex_throw_from_op_args(interp,cur_opcode + 4,
EXCEPTION_NO_CLASS,
- "Class '%Ss' not found", VTABLE_get_repr(interp, name_key));
- return (opcode_t *)dest;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, name_key));return (opcode_t *)dest;
}
return (opcode_t *)cur_opcode + 4;}
@@ -25190,7 +24831,7 @@
Parrot_str_free_cstring(cstr);
IREG(1) = U_SUCCESS(err) ? (INTVAL) codepoint : -1;
#else
- opcode_t * const dest = cur_opcode + 3;
+ opcode_t * const dest =cur_opcode + 3;
Parrot_ex_throw_from_op_args(interp, dest, EXCEPTION_LIBRARY_ERROR,
"no ICU lib loaded");
#endif
@@ -25207,7 +24848,7 @@
Parrot_str_free_cstring(cstr);
IREG(1) = U_SUCCESS(err) ? (INTVAL) codepoint : -1;
#else
- opcode_t * const dest = cur_opcode + 3;
+ opcode_t * const dest =cur_opcode + 3;
Parrot_ex_throw_from_op_args(interp, dest, EXCEPTION_LIBRARY_ERROR,
"no ICU lib loaded");
#endif
@@ -25215,10 +24856,10 @@
return (opcode_t *)cur_opcode + 3;}
opcode_t *
-Parrot_unroll_p(opcode_t *cur_opcode, PARROT_INTERP) {
+Parrot_finalize_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
/* Go to the next op after loop unrolling */
- opcode_t * const dest = cur_opcode + 2;
+ opcode_t * const dest =cur_opcode + 2;
PMC *eh = PMCNULL;
if (!PMC_IS_NULL(PREG(1))) {
/* If isa ExceptionHandler, use it. If isa Exception, get its active handler */
@@ -25254,10 +24895,10 @@
return (opcode_t *)cur_opcode + 2;}
opcode_t *
-Parrot_unroll_pc(opcode_t *cur_opcode, PARROT_INTERP) {
+Parrot_finalize_pc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
/* Go to the next op after loop unrolling */
- opcode_t * const dest = cur_opcode + 2;
+ opcode_t * const dest =cur_opcode + 2;
PMC *eh = PMCNULL;
if (!PMC_IS_NULL(CONST(1)->u.key)) {
/* If isa ExceptionHandler, use it. If isa Exception, get its active handler */
Modified: branches/ops_massacre/src/ops/experimental.ops
==============================================================================
--- branches/ops_massacre/src/ops/experimental.ops Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/src/ops/experimental.ops Thu May 27 06:10:21 2010 (r47048)
@@ -367,15 +367,16 @@
#endif
}
-=item B<unroll>(in PMC)
+=item B<finalize>(in PMC)
-Exception handling done, unroll possible inner runloops left. $1 is the
-Exception handled or the ExceptionHandler that is handling it.
+Finalize exception handling, freeing any information needed to resume
+the handled exception, like inner runloops.
+$1 is the Exception handled or the ExceptionHandler that is handling it.
EXPERIMENTAL. Handle with care.
=cut
-op unroll(in PMC) {
+op finalize(in PMC) {
/* Go to the next op after loop unrolling */
opcode_t * const dest = expr NEXT();
PMC *eh = PMCNULL;
Deleted: branches/ops_massacre/src/ops/ops.num
==============================================================================
--- branches/ops_massacre/src/ops/ops.num Thu May 27 06:10:21 2010 (r47047)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,1036 +0,0 @@
-# This file provides opcode name->number mapping, so we can nail down
-# the op numbers for the core opcodes in a particular version of the
-# bytecode and provide backward-compatibility for bytecode.
-#
-# The format of this file is simple:
-#
-# opcode_name (whitespace) opcode_number
-#
-# The opcode name is the full and complete name of the
-# opcode--i.e. for the "add N1, N2, N3" op the name is add_n_n_n, not
-# add.
-#
-# The numbering of opcodes whose names are *not* in this file begins
-# immediately after the highest-numbered opcode in this file,
-# regardless of what order it is found in. There should be *no* holes
-# in the numbering!
-
-# Please note that only opcodes from experimental.ops are included
-# in the core.pm, if they are missing here.
-
-# Note that end must always be op 0.
-end 0
-# the following ops are enums in oplib.h
-noop 1
-check_events 2
-check_events__ 3
-wrapper__ 4
-###DYNAMIC### other ops
-load_bytecode_s 5
-load_bytecode_sc 6
-load_language_s 7
-load_language_sc 8
-branch_i 9
-branch_ic 10
-local_branch_p_i 11
-local_branch_p_ic 12
-local_return_p 13
-jump_i 14
-jump_ic 15
-enternative 16
-if_i_ic 17
-if_n_ic 18
-if_s_ic 19
-if_p_ic 20
-unless_i_ic 21
-unless_n_ic 22
-unless_s_ic 23
-unless_p_ic 24
-invokecc_p 25
-invoke_p_p 26
-yield 27
-tailcall_p 28
-returncc 29
-capture_lex_p 30
-newclosure_p_p 31
-set_args_pc 32
-get_params_pc 33
-set_returns_pc 34
-get_results_pc 35
-set_result_info_p 36
-set_result_info_pc 37
-result_info_p 38
-set_addr_i_ic 39
-set_addr_p_ic 40
-set_addr_p_i 41
-get_addr_i_p 42
-schedule_p 43
-addhandler_p 44
-push_eh_ic 45
-push_eh_p 46
-pop_eh 47
-throw_p 48
-throw_p_p 49
-rethrow_p 50
-count_eh_i 51
-die_s 52
-die_sc 53
-die_p 54
-die_pc 55
-die_i_i 56
-die_ic_i 57
-die_i_ic 58
-die_ic_ic 59
-exit_i 60
-exit_ic 61
-debug_i 62
-debug_ic 63
-bounds_i 64
-bounds_ic 65
-profile_i 66
-profile_ic 67
-trace_i 68
-trace_ic 69
-gc_debug_i 70
-gc_debug_ic 71
-interpinfo_i_i 72
-interpinfo_i_ic 73
-interpinfo_p_i 74
-interpinfo_p_ic 75
-interpinfo_s_i 76
-interpinfo_s_ic 77
-warningson_i 78
-warningson_ic 79
-warningsoff_i 80
-warningsoff_ic 81
-errorson_i 82
-errorson_ic 83
-errorsoff_i 84
-errorsoff_ic 85
-runinterp_p_i 86
-runinterp_p_ic 87
-getinterp_p 88
-sweep_ic 89
-collect 90
-sweepoff 91
-sweepon 92
-collectoff 93
-collecton 94
-needs_destroy_p 95
-loadlib_p_s 96
-loadlib_p_sc 97
-loadlib_p_s_p 98
-loadlib_p_sc_p 99
-loadlib_p_s_pc 100
-loadlib_p_sc_pc 101
-dlfunc_p_p_s_s 102
-dlfunc_p_p_sc_s 103
-dlfunc_p_p_s_sc 104
-dlfunc_p_p_sc_sc 105
-dlvar_p_p_s 106
-dlvar_p_p_sc 107
-compreg_s_p 108
-compreg_sc_p 109
-compreg_p_s 110
-compreg_p_sc 111
-new_callback_p_p_p_s 112
-new_callback_p_p_p_sc 113
-annotations_p 114
-annotations_p_s 115
-annotations_p_sc 116
-band_i_i 117
-band_i_ic 118
-band_i_i_i 119
-band_i_ic_i 120
-band_i_i_ic 121
-bor_i_i 122
-bor_i_ic 123
-bor_i_i_i 124
-bor_i_ic_i 125
-bor_i_i_ic 126
-shl_i_i 127
-shl_i_ic 128
-shl_i_i_i 129
-shl_i_ic_i 130
-shl_i_i_ic 131
-shr_i_i 132
-shr_i_ic 133
-shr_i_i_i 134
-shr_i_ic_i 135
-shr_i_i_ic 136
-lsr_i_i 137
-lsr_i_ic 138
-lsr_i_i_i 139
-lsr_i_ic_i 140
-lsr_i_i_ic 141
-bxor_i_i 142
-bxor_i_ic 143
-bxor_i_i_i 144
-bxor_i_ic_i 145
-bxor_i_i_ic 146
-eq_i_i_ic 147
-eq_ic_i_ic 148
-eq_i_ic_ic 149
-eq_n_n_ic 150
-eq_nc_n_ic 151
-eq_n_nc_ic 152
-eq_s_s_ic 153
-eq_sc_s_ic 154
-eq_s_sc_ic 155
-eq_p_p_ic 156
-eq_p_i_ic 157
-eq_p_ic_ic 158
-eq_p_n_ic 159
-eq_p_nc_ic 160
-eq_p_s_ic 161
-eq_p_sc_ic 162
-eq_str_p_p_ic 163
-eq_num_p_p_ic 164
-eq_addr_s_s_ic 165
-eq_addr_sc_s_ic 166
-eq_addr_s_sc_ic 167
-eq_addr_sc_sc_ic 168
-eq_addr_p_p_ic 169
-ne_i_i_ic 170
-ne_ic_i_ic 171
-ne_i_ic_ic 172
-ne_n_n_ic 173
-ne_nc_n_ic 174
-ne_n_nc_ic 175
-ne_s_s_ic 176
-ne_sc_s_ic 177
-ne_s_sc_ic 178
-ne_p_p_ic 179
-ne_p_i_ic 180
-ne_p_ic_ic 181
-ne_p_n_ic 182
-ne_p_nc_ic 183
-ne_p_s_ic 184
-ne_p_sc_ic 185
-ne_str_p_p_ic 186
-ne_num_p_p_ic 187
-ne_addr_s_s_ic 188
-ne_addr_sc_s_ic 189
-ne_addr_s_sc_ic 190
-ne_addr_sc_sc_ic 191
-ne_addr_p_p_ic 192
-lt_i_i_ic 193
-lt_ic_i_ic 194
-lt_i_ic_ic 195
-lt_n_n_ic 196
-lt_nc_n_ic 197
-lt_n_nc_ic 198
-lt_s_s_ic 199
-lt_sc_s_ic 200
-lt_s_sc_ic 201
-lt_p_p_ic 202
-lt_p_i_ic 203
-lt_p_ic_ic 204
-lt_p_n_ic 205
-lt_p_nc_ic 206
-lt_p_s_ic 207
-lt_p_sc_ic 208
-lt_str_p_p_ic 209
-lt_num_p_p_ic 210
-le_i_i_ic 211
-le_ic_i_ic 212
-le_i_ic_ic 213
-le_n_n_ic 214
-le_nc_n_ic 215
-le_n_nc_ic 216
-le_s_s_ic 217
-le_sc_s_ic 218
-le_s_sc_ic 219
-le_p_p_ic 220
-le_p_i_ic 221
-le_p_ic_ic 222
-le_p_n_ic 223
-le_p_nc_ic 224
-le_p_s_ic 225
-le_p_sc_ic 226
-le_str_p_p_ic 227
-le_num_p_p_ic 228
-gt_p_p_ic 229
-gt_p_i_ic 230
-gt_p_ic_ic 231
-gt_p_n_ic 232
-gt_p_nc_ic 233
-gt_p_s_ic 234
-gt_p_sc_ic 235
-gt_str_p_p_ic 236
-gt_num_p_p_ic 237
-ge_p_p_ic 238
-ge_p_i_ic 239
-ge_p_ic_ic 240
-ge_p_n_ic 241
-ge_p_nc_ic 242
-ge_p_s_ic 243
-ge_p_sc_ic 244
-ge_str_p_p_ic 245
-ge_num_p_p_ic 246
-if_null_p_ic 247
-if_null_s_ic 248
-unless_null_p_ic 249
-unless_null_s_ic 250
-cmp_i_i_i 251
-cmp_i_ic_i 252
-cmp_i_i_ic 253
-cmp_i_n_n 254
-cmp_i_nc_n 255
-cmp_i_n_nc 256
-cmp_i_s_s 257
-cmp_i_sc_s 258
-cmp_i_s_sc 259
-cmp_i_p_p 260
-cmp_i_p_i 261
-cmp_i_p_ic 262
-cmp_i_p_n 263
-cmp_i_p_nc 264
-cmp_i_p_s 265
-cmp_i_p_sc 266
-cmp_str_i_p_p 267
-cmp_num_i_p_p 268
-cmp_pmc_p_p_p 269
-issame_i_p_p 270
-issame_i_s_s 271
-issame_i_sc_s 272
-issame_i_s_sc 273
-issame_i_sc_sc 274
-isntsame_i_p_p 275
-isntsame_i_s_s 276
-isntsame_i_sc_s 277
-isntsame_i_s_sc 278
-isntsame_i_sc_sc 279
-istrue_i_p 280
-isfalse_i_p 281
-isnull_i_p 282
-isnull_i_pc 283
-isnull_i_s 284
-isnull_i_sc 285
-isgt_i_p_p 286
-isge_i_p_p 287
-isle_i_i_i 288
-isle_i_ic_i 289
-isle_i_i_ic 290
-isle_i_n_n 291
-isle_i_nc_n 292
-isle_i_n_nc 293
-isle_i_s_s 294
-isle_i_sc_s 295
-isle_i_s_sc 296
-isle_i_p_p 297
-islt_i_i_i 298
-islt_i_ic_i 299
-islt_i_i_ic 300
-islt_i_n_n 301
-islt_i_nc_n 302
-islt_i_n_nc 303
-islt_i_s_s 304
-islt_i_sc_s 305
-islt_i_s_sc 306
-islt_i_p_p 307
-iseq_i_i_i 308
-iseq_i_ic_i 309
-iseq_i_i_ic 310
-iseq_i_n_n 311
-iseq_i_nc_n 312
-iseq_i_n_nc 313
-iseq_i_s_s 314
-iseq_i_sc_s 315
-iseq_i_s_sc 316
-iseq_i_p_p 317
-isne_i_i_i 318
-isne_i_ic_i 319
-isne_i_i_ic 320
-isne_i_n_n 321
-isne_i_nc_n 322
-isne_i_n_nc 323
-isne_i_s_s 324
-isne_i_sc_s 325
-isne_i_s_sc 326
-isne_i_p_p 327
-and_i_i_i 328
-and_i_ic_i 329
-and_i_i_ic 330
-and_p_p_p 331
-not_i 332
-not_i_i 333
-not_p 334
-not_p_p 335
-or_i_i_i 336
-or_i_ic_i 337
-or_i_i_ic 338
-or_p_p_p 339
-xor_i_i_i 340
-xor_i_ic_i 341
-xor_i_i_ic 342
-xor_p_p_p 343
-print_i 344
-print_ic 345
-print_n 346
-print_nc 347
-print_s 348
-print_sc 349
-print_p 350
-say_i 351
-say_ic 352
-say_n 353
-say_nc 354
-say_s 355
-say_sc 356
-say_p 357
-print_p_i 358
-print_p_ic 359
-print_p_n 360
-print_p_nc 361
-print_p_s 362
-print_p_sc 363
-print_p_p 364
-abs_i 365
-abs_n 366
-abs_i_i 367
-abs_n_n 368
-abs_p 369
-abs_p_p 370
-add_i_i 371
-add_i_ic 372
-add_n_n 373
-add_n_nc 374
-add_p_p 375
-add_p_i 376
-add_p_ic 377
-add_p_n 378
-add_p_nc 379
-add_i_i_i 380
-add_i_ic_i 381
-add_i_i_ic 382
-add_n_n_n 383
-add_n_nc_n 384
-add_n_n_nc 385
-add_p_p_p 386
-add_p_p_i 387
-add_p_p_ic 388
-add_p_p_n 389
-add_p_p_nc 390
-dec_i 391
-dec_n 392
-dec_p 393
-div_i_i 394
-div_i_ic 395
-div_n_n 396
-div_n_nc 397
-div_p_p 398
-div_p_i 399
-div_p_ic 400
-div_p_n 401
-div_p_nc 402
-div_i_i_i 403
-div_i_ic_i 404
-div_i_i_ic 405
-div_i_ic_ic 406
-div_n_n_n 407
-div_n_nc_n 408
-div_n_n_nc 409
-div_n_nc_nc 410
-div_p_p_p 411
-div_p_p_i 412
-div_p_p_ic 413
-div_p_p_n 414
-div_p_p_nc 415
-fdiv_i_i 416
-fdiv_i_ic 417
-fdiv_n_n 418
-fdiv_n_nc 419
-fdiv_p_p 420
-fdiv_p_i 421
-fdiv_p_ic 422
-fdiv_p_n 423
-fdiv_p_nc 424
-fdiv_i_i_i 425
-fdiv_i_ic_i 426
-fdiv_i_i_ic 427
-fdiv_n_n_n 428
-fdiv_n_nc_n 429
-fdiv_n_n_nc 430
-fdiv_p_p_p 431
-fdiv_p_p_i 432
-fdiv_p_p_ic 433
-fdiv_p_p_n 434
-fdiv_p_p_nc 435
-ceil_n 436
-ceil_i_n 437
-ceil_n_n 438
-floor_n 439
-floor_i_n 440
-floor_n_n 441
-inc_i 442
-inc_n 443
-inc_p 444
-mod_i_i 445
-mod_i_ic 446
-mod_n_n 447
-mod_n_nc 448
-mod_p_p 449
-mod_p_i 450
-mod_p_ic 451
-mod_p_n 452
-mod_p_nc 453
-mod_i_i_i 454
-mod_i_ic_i 455
-mod_i_i_ic 456
-mod_n_n_n 457
-mod_n_nc_n 458
-mod_n_n_nc 459
-mod_p_p_p 460
-mod_p_p_i 461
-mod_p_p_ic 462
-mod_p_p_n 463
-mod_p_p_nc 464
-mul_i_i 465
-mul_i_ic 466
-mul_n_n 467
-mul_n_nc 468
-mul_p_p 469
-mul_p_i 470
-mul_p_ic 471
-mul_p_n 472
-mul_p_nc 473
-mul_i_i_i 474
-mul_i_ic_i 475
-mul_i_i_ic 476
-mul_n_n_n 477
-mul_n_nc_n 478
-mul_n_n_nc 479
-mul_p_p_p 480
-mul_p_p_i 481
-mul_p_p_ic 482
-mul_p_p_n 483
-mul_p_p_nc 484
-neg_i 485
-neg_n 486
-neg_p 487
-neg_i_i 488
-neg_n_n 489
-neg_p_p 490
-sub_i_i 491
-sub_i_ic 492
-sub_n_n 493
-sub_n_nc 494
-sub_p_p 495
-sub_p_i 496
-sub_p_ic 497
-sub_p_n 498
-sub_p_nc 499
-sub_i_i_i 500
-sub_i_ic_i 501
-sub_i_i_ic 502
-sub_n_n_n 503
-sub_n_nc_n 504
-sub_n_n_nc 505
-sub_p_p_p 506
-sub_p_p_i 507
-sub_p_p_ic 508
-sub_p_p_n 509
-sub_p_p_nc 510
-sqrt_n_n 511
-callmethodcc_p_s 512
-callmethodcc_p_sc 513
-callmethodcc_p_p 514
-callmethod_p_s_p 515
-callmethod_p_sc_p 516
-callmethod_p_p_p 517
-tailcallmethod_p_s 518
-tailcallmethod_p_sc 519
-tailcallmethod_p_p 520
-addmethod_p_s_p 521
-addmethod_p_sc_p 522
-can_i_p_s 523
-can_i_p_sc 524
-does_i_p_s 525
-does_i_p_sc 526
-does_i_p_p 527
-does_i_p_pc 528
-isa_i_p_s 529
-isa_i_p_sc 530
-isa_i_p_p 531
-isa_i_p_pc 532
-newclass_p_s 533
-newclass_p_sc 534
-newclass_p_p 535
-newclass_p_pc 536
-subclass_p_p 537
-subclass_p_pc 538
-subclass_p_p_s 539
-subclass_p_pc_s 540
-subclass_p_p_sc 541
-subclass_p_pc_sc 542
-subclass_p_p_p 543
-subclass_p_pc_p 544
-subclass_p_p_pc 545
-subclass_p_pc_pc 546
-subclass_p_s 547
-subclass_p_sc 548
-subclass_p_s_s 549
-subclass_p_sc_s 550
-subclass_p_s_sc 551
-subclass_p_sc_sc 552
-subclass_p_s_p 553
-subclass_p_sc_p 554
-subclass_p_s_pc 555
-subclass_p_sc_pc 556
-get_class_p_s 557
-get_class_p_sc 558
-get_class_p_p 559
-get_class_p_pc 560
-class_p_p 561
-addparent_p_p 562
-removeparent_p_p 563
-addrole_p_p 564
-addattribute_p_s 565
-addattribute_p_sc 566
-removeattribute_p_s 567
-removeattribute_p_sc 568
-getattribute_p_p_s 569
-getattribute_p_p_sc 570
-getattribute_p_p_p_s 571
-getattribute_p_p_pc_s 572
-getattribute_p_p_p_sc 573
-getattribute_p_p_pc_sc 574
-setattribute_p_s_p 575
-setattribute_p_sc_p 576
-setattribute_p_p_s_p 577
-setattribute_p_pc_s_p 578
-setattribute_p_p_sc_p 579
-setattribute_p_pc_sc_p 580
-inspect_p_p 581
-inspect_p_pc 582
-inspect_p_p_s 583
-inspect_p_pc_s 584
-inspect_p_p_sc 585
-inspect_p_pc_sc 586
-new_p_s 587
-new_p_sc 588
-new_p_s_p 589
-new_p_sc_p 590
-new_p_s_pc 591
-new_p_sc_pc 592
-new_p_p 593
-new_p_pc 594
-new_p_p_p 595
-new_p_pc_p 596
-new_p_p_pc 597
-new_p_pc_pc 598
-root_new_p_p 599
-root_new_p_pc 600
-root_new_p_p_p 601
-root_new_p_pc_p 602
-root_new_p_p_pc 603
-root_new_p_pc_pc 604
-typeof_s_p 605
-typeof_p_p 606
-get_repr_s_p 607
-find_method_p_p_s 608
-find_method_p_p_sc 609
-defined_i_p 610
-defined_i_p_ki 611
-defined_i_p_kic 612
-defined_i_p_k 613
-defined_i_p_kc 614
-exists_i_p_ki 615
-exists_i_p_kic 616
-exists_i_p_k 617
-exists_i_p_kc 618
-delete_p_k 619
-delete_p_kc 620
-delete_p_ki 621
-delete_p_kic 622
-elements_i_p 623
-push_p_i 624
-push_p_ic 625
-push_p_n 626
-push_p_nc 627
-push_p_s 628
-push_p_sc 629
-push_p_p 630
-pop_i_p 631
-pop_n_p 632
-pop_s_p 633
-pop_p_p 634
-unshift_p_i 635
-unshift_p_ic 636
-unshift_p_n 637
-unshift_p_nc 638
-unshift_p_s 639
-unshift_p_sc 640
-unshift_p_p 641
-shift_i_p 642
-shift_n_p 643
-shift_s_p 644
-shift_p_p 645
-splice_p_p_i_i 646
-splice_p_p_ic_i 647
-splice_p_p_i_ic 648
-splice_p_p_ic_ic 649
-setprop_p_s_p 650
-setprop_p_sc_p 651
-getprop_p_s_p 652
-getprop_p_sc_p 653
-delprop_p_s 654
-delprop_p_sc 655
-prophash_p_p 656
-freeze_s_p 657
-thaw_p_s 658
-thaw_p_sc 659
-add_multi_s_s_p 660
-add_multi_sc_s_p 661
-add_multi_s_sc_p 662
-add_multi_sc_sc_p 663
-find_multi_p_s_s 664
-find_multi_p_sc_s 665
-find_multi_p_s_sc 666
-find_multi_p_sc_sc 667
-register_p 668
-unregister_p 669
-box_p_i 670
-box_p_ic 671
-box_p_n 672
-box_p_nc 673
-box_p_s 674
-box_p_sc 675
-iter_p_p 676
-morph_p_p 677
-morph_p_pc 678
-clone_s_s 679
-clone_s_sc 680
-set_i_i 681
-set_i_ic 682
-set_i_n 683
-set_i_nc 684
-set_i_s 685
-set_i_sc 686
-set_n_n 687
-set_n_nc 688
-set_n_i 689
-set_n_ic 690
-set_n_s 691
-set_n_sc 692
-set_n_p 693
-set_s_p 694
-set_s_s 695
-set_s_sc 696
-set_s_i 697
-set_s_ic 698
-set_s_n 699
-set_s_nc 700
-set_p_pc 701
-set_p_p 702
-set_p_i 703
-set_p_ic 704
-set_p_n 705
-set_p_nc 706
-set_p_s 707
-set_p_sc 708
-set_i_p 709
-assign_p_p 710
-assign_p_i 711
-assign_p_ic 712
-assign_p_n 713
-assign_p_nc 714
-assign_p_s 715
-assign_p_sc 716
-assign_s_s 717
-assign_s_sc 718
-setref_p_p 719
-deref_p_p 720
-set_p_ki_i 721
-set_p_kic_i 722
-set_p_ki_ic 723
-set_p_kic_ic 724
-set_p_ki_n 725
-set_p_kic_n 726
-set_p_ki_nc 727
-set_p_kic_nc 728
-set_p_ki_s 729
-set_p_kic_s 730
-set_p_ki_sc 731
-set_p_kic_sc 732
-set_p_ki_p 733
-set_p_kic_p 734
-set_i_p_ki 735
-set_i_p_kic 736
-set_n_p_ki 737
-set_n_p_kic 738
-set_s_p_ki 739
-set_s_p_kic 740
-set_p_p_ki 741
-set_p_p_kic 742
-set_p_k_i 743
-set_p_kc_i 744
-set_p_k_ic 745
-set_p_kc_ic 746
-set_p_k_n 747
-set_p_kc_n 748
-set_p_k_nc 749
-set_p_kc_nc 750
-set_p_k_s 751
-set_p_kc_s 752
-set_p_k_sc 753
-set_p_kc_sc 754
-set_p_k_p 755
-set_p_kc_p 756
-set_i_p_k 757
-set_i_p_kc 758
-set_n_p_k 759
-set_n_p_kc 760
-set_s_p_k 761
-set_s_p_kc 762
-set_p_p_k 763
-set_p_p_kc 764
-clone_p_p 765
-clone_p_p_p 766
-clone_p_p_pc 767
-copy_p_p 768
-null_s 769
-null_i 770
-null_p 771
-null_n 772
-ord_i_s 773
-ord_i_sc 774
-ord_i_s_i 775
-ord_i_sc_i 776
-ord_i_s_ic 777
-ord_i_sc_ic 778
-chr_s_i 779
-chr_s_ic 780
-chopn_s_s_i 781
-chopn_s_sc_i 782
-chopn_s_s_ic 783
-chopn_s_sc_ic 784
-concat_s_s 785
-concat_s_sc 786
-concat_p_p 787
-concat_p_s 788
-concat_p_sc 789
-concat_s_s_s 790
-concat_s_sc_s 791
-concat_s_s_sc 792
-concat_p_p_s 793
-concat_p_p_sc 794
-concat_p_p_p 795
-repeat_s_s_i 796
-repeat_s_sc_i 797
-repeat_s_s_ic 798
-repeat_s_sc_ic 799
-repeat_p_p_i 800
-repeat_p_p_ic 801
-repeat_p_p_p 802
-repeat_p_i 803
-repeat_p_ic 804
-repeat_p_p 805
-length_i_s 806
-length_i_sc 807
-bytelength_i_s 808
-bytelength_i_sc 809
-pin_s 810
-unpin_s 811
-substr_s_s_i 812
-substr_s_sc_i 813
-substr_s_s_ic 814
-substr_s_sc_ic 815
-substr_s_s_i_i 816
-substr_s_sc_i_i 817
-substr_s_s_ic_i 818
-substr_s_sc_ic_i 819
-substr_s_s_i_ic 820
-substr_s_sc_i_ic 821
-substr_s_s_ic_ic 822
-substr_s_sc_ic_ic 823
-substr_s_p_i_i 824
-substr_s_p_ic_i 825
-substr_s_p_i_ic 826
-substr_s_p_ic_ic 827
-replace_s_s_i_i_s 828
-replace_s_sc_i_i_s 829
-replace_s_s_ic_i_s 830
-replace_s_sc_ic_i_s 831
-replace_s_s_i_ic_s 832
-replace_s_sc_i_ic_s 833
-replace_s_s_ic_ic_s 834
-replace_s_sc_ic_ic_s 835
-replace_s_s_i_i_sc 836
-replace_s_sc_i_i_sc 837
-replace_s_s_ic_i_sc 838
-replace_s_sc_ic_i_sc 839
-replace_s_s_i_ic_sc 840
-replace_s_sc_i_ic_sc 841
-replace_s_s_ic_ic_sc 842
-replace_s_sc_ic_ic_sc 843
-index_i_s_s 844
-index_i_sc_s 845
-index_i_s_sc 846
-index_i_sc_sc 847
-index_i_s_s_i 848
-index_i_sc_s_i 849
-index_i_s_sc_i 850
-index_i_sc_sc_i 851
-index_i_s_s_ic 852
-index_i_sc_s_ic 853
-index_i_s_sc_ic 854
-index_i_sc_sc_ic 855
-sprintf_s_s_p 856
-sprintf_s_sc_p 857
-sprintf_p_p_p 858
-new_s 859
-new_s_i 860
-new_s_ic 861
-stringinfo_i_s_i 862
-stringinfo_i_sc_i 863
-stringinfo_i_s_ic 864
-stringinfo_i_sc_ic 865
-upcase_s_s 866
-upcase_s_sc 867
-downcase_s_s 868
-downcase_s_sc 869
-titlecase_s_s 870
-titlecase_s_sc 871
-join_s_s_p 872
-join_s_sc_p 873
-split_p_s_s 874
-split_p_sc_s 875
-split_p_s_sc 876
-split_p_sc_sc 877
-charset_i_s 878
-charset_i_sc 879
-charsetname_s_i 880
-charsetname_s_ic 881
-find_charset_i_s 882
-find_charset_i_sc 883
-trans_charset_s_s_i 884
-trans_charset_s_sc_i 885
-trans_charset_s_s_ic 886
-trans_charset_s_sc_ic 887
-encoding_i_s 888
-encoding_i_sc 889
-encodingname_s_i 890
-encodingname_s_ic 891
-find_encoding_i_s 892
-find_encoding_i_sc 893
-trans_encoding_s_s_i 894
-trans_encoding_s_sc_i 895
-trans_encoding_s_s_ic 896
-trans_encoding_s_sc_ic 897
-is_cclass_i_i_s_i 898
-is_cclass_i_ic_s_i 899
-is_cclass_i_i_sc_i 900
-is_cclass_i_ic_sc_i 901
-is_cclass_i_i_s_ic 902
-is_cclass_i_ic_s_ic 903
-is_cclass_i_i_sc_ic 904
-is_cclass_i_ic_sc_ic 905
-find_cclass_i_i_s_i_i 906
-find_cclass_i_ic_s_i_i 907
-find_cclass_i_i_sc_i_i 908
-find_cclass_i_ic_sc_i_i 909
-find_cclass_i_i_s_ic_i 910
-find_cclass_i_ic_s_ic_i 911
-find_cclass_i_i_sc_ic_i 912
-find_cclass_i_ic_sc_ic_i 913
-find_cclass_i_i_s_i_ic 914
-find_cclass_i_ic_s_i_ic 915
-find_cclass_i_i_sc_i_ic 916
-find_cclass_i_ic_sc_i_ic 917
-find_cclass_i_i_s_ic_ic 918
-find_cclass_i_ic_s_ic_ic 919
-find_cclass_i_i_sc_ic_ic 920
-find_cclass_i_ic_sc_ic_ic 921
-find_not_cclass_i_i_s_i_i 922
-find_not_cclass_i_ic_s_i_i 923
-find_not_cclass_i_i_sc_i_i 924
-find_not_cclass_i_ic_sc_i_i 925
-find_not_cclass_i_i_s_ic_i 926
-find_not_cclass_i_ic_s_ic_i 927
-find_not_cclass_i_i_sc_ic_i 928
-find_not_cclass_i_ic_sc_ic_i 929
-find_not_cclass_i_i_s_i_ic 930
-find_not_cclass_i_ic_s_i_ic 931
-find_not_cclass_i_i_sc_i_ic 932
-find_not_cclass_i_ic_sc_i_ic 933
-find_not_cclass_i_i_s_ic_ic 934
-find_not_cclass_i_ic_s_ic_ic 935
-find_not_cclass_i_i_sc_ic_ic 936
-find_not_cclass_i_ic_sc_ic_ic 937
-escape_s_s 938
-compose_s_s 939
-compose_s_sc 940
-spawnw_i_s 941
-spawnw_i_sc 942
-spawnw_i_p 943
-err_i 944
-err_s 945
-err_s_i 946
-err_s_ic 947
-time_i 948
-time_n 949
-sleep_i 950
-sleep_ic 951
-sleep_n 952
-sleep_nc 953
-store_lex_s_p 954
-store_lex_sc_p 955
-store_dynamic_lex_s_p 956
-store_dynamic_lex_sc_p 957
-find_lex_p_s 958
-find_lex_p_sc 959
-find_dynamic_lex_p_s 960
-find_dynamic_lex_p_sc 961
-find_caller_lex_p_s 962
-find_caller_lex_p_sc 963
-get_namespace_p 964
-get_namespace_p_p 965
-get_namespace_p_pc 966
-get_hll_namespace_p 967
-get_hll_namespace_p_p 968
-get_hll_namespace_p_pc 969
-get_root_namespace_p 970
-get_root_namespace_p_p 971
-get_root_namespace_p_pc 972
-get_global_p_s 973
-get_global_p_sc 974
-get_global_p_p_s 975
-get_global_p_pc_s 976
-get_global_p_p_sc 977
-get_global_p_pc_sc 978
-get_hll_global_p_s 979
-get_hll_global_p_sc 980
-get_hll_global_p_p_s 981
-get_hll_global_p_pc_s 982
-get_hll_global_p_p_sc 983
-get_hll_global_p_pc_sc 984
-get_root_global_p_s 985
-get_root_global_p_sc 986
-get_root_global_p_p_s 987
-get_root_global_p_pc_s 988
-get_root_global_p_p_sc 989
-get_root_global_p_pc_sc 990
-set_global_s_p 991
-set_global_sc_p 992
-set_global_p_s_p 993
-set_global_pc_s_p 994
-set_global_p_sc_p 995
-set_global_pc_sc_p 996
-set_hll_global_s_p 997
-set_hll_global_sc_p 998
-set_hll_global_p_s_p 999
-set_hll_global_pc_s_p 1000
-set_hll_global_p_sc_p 1001
-set_hll_global_pc_sc_p 1002
-set_root_global_s_p 1003
-set_root_global_sc_p 1004
-set_root_global_p_s_p 1005
-set_root_global_pc_s_p 1006
-set_root_global_p_sc_p 1007
-set_root_global_pc_sc_p 1008
-find_name_p_s 1009
-find_name_p_sc 1010
-find_sub_not_null_p_s 1011
-find_sub_not_null_p_sc 1012
Modified: branches/ops_massacre/src/pmc.c
==============================================================================
--- branches/ops_massacre/src/pmc.c Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/src/pmc.c Thu May 27 06:10:21 2010 (r47048)
@@ -771,7 +771,7 @@
Parrot_pmc_get_type_str(PARROT_INTERP, ARGIN_NULLOK(STRING *name))
{
ASSERT_ARGS(Parrot_pmc_get_type_str)
- if (!name)
+ if (STRING_IS_NULL(name))
return enum_type_undef;
else {
PMC * const classname_hash = interp->class_hash;
@@ -780,7 +780,7 @@
if (!PMC_IS_NULL(item)) {
/* nested namespace with same name */
- if (item->vtable->base_type == enum_class_NameSpace)
+ if (PMC_IS_TYPE(item, NameSpace))
return enum_type_undef;
else
return VTABLE_get_integer(interp, item);
Modified: branches/ops_massacre/src/pmc/callcontext.pmc
==============================================================================
--- branches/ops_massacre/src/pmc/callcontext.pmc Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/src/pmc/callcontext.pmc Thu May 27 06:10:21 2010 (r47048)
@@ -79,6 +79,13 @@
__attribute__nonnull__(1)
__attribute__nonnull__(2);
+static void ensure_positionals_storage_ap(PARROT_INTERP,
+ ARGIN(PMC *self),
+ INTVAL size,
+ INTVAL allocated_positionals)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
PARROT_CANNOT_RETURN_NULL
static Pcc_cell* get_cell_at(PARROT_INTERP, ARGIN(PMC *self), INTVAL key)
__attribute__nonnull__(1)
@@ -121,6 +128,9 @@
#define ASSERT_ARGS_ensure_positionals_storage __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(self))
+#define ASSERT_ARGS_ensure_positionals_storage_ap __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(self))
#define ASSERT_ARGS_get_cell_at __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(self))
@@ -146,14 +156,24 @@
ensure_positionals_storage(PARROT_INTERP, ARGIN(PMC *self), INTVAL size)
{
ASSERT_ARGS(ensure_positionals_storage)
- INTVAL num_positionals, allocated_positionals;
- Pcc_cell *array, *new_array;
+ INTVAL allocated_positionals;
GETATTR_CallContext_allocated_positionals(interp, self, allocated_positionals);
if (size <= allocated_positionals)
return;
+ ensure_positionals_storage_ap(interp, self, size, allocated_positionals);
+}
+
+static void
+ensure_positionals_storage_ap(PARROT_INTERP,
+ ARGIN(PMC *self), INTVAL size, INTVAL allocated_positionals)
+{
+ ASSERT_ARGS(ensure_positionals_storage_ap)
+ INTVAL num_positionals;
+ Pcc_cell *array, *new_array;
+
if (size < 8)
size = 8;
@@ -934,7 +954,7 @@
GET_ATTR_allocated_positionals(INTERP, SELF, allocated_positionals);
if (num_pos + 1 > allocated_positionals)
- ensure_positionals_storage(INTERP, SELF, num_pos + 1);
+ ensure_positionals_storage_ap(INTERP, SELF, num_pos + 1, allocated_positionals);
GET_ATTR_positionals(INTERP, SELF, cells);
cells[num_pos].u.i = value;
@@ -976,7 +996,7 @@
GET_ATTR_allocated_positionals(INTERP, SELF, allocated_positionals);
if (num_pos + 1 > allocated_positionals)
- ensure_positionals_storage(INTERP, SELF, num_pos + 1);
+ ensure_positionals_storage_ap(INTERP, SELF, num_pos + 1, allocated_positionals);
GET_ATTR_positionals(INTERP, SELF, cells);
cells[num_pos].u.p = value;
Modified: branches/ops_massacre/src/pmc/coroutine.pmc
==============================================================================
--- branches/ops_massacre/src/pmc/coroutine.pmc Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/src/pmc/coroutine.pmc Thu May 27 06:10:21 2010 (r47048)
@@ -111,7 +111,6 @@
*/
VTABLE PMC *clone() {
- STRING *name;
PMC * const ret = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
PObj_custom_mark_destroy_SETALL(ret);
Modified: branches/ops_massacre/src/pmc/exception.pmc
==============================================================================
--- branches/ops_massacre/src/pmc/exception.pmc Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/src/pmc/exception.pmc Thu May 27 06:10:21 2010 (r47048)
@@ -52,10 +52,38 @@
#include "parrot/exceptions.h"
#include "pmc/pmc_sub.h"
+typedef enum {
+ attr_id,
+ attr_birthtime,
+ attr_message,
+ attr_payload,
+ attr_resume,
+ attr_severity,
+ attr_type,
+ attr_exit_code,
+ attr_backtrace,
+ attr_handled,
+ attr_handler_iter,
+ attr_handler_ctx,
+ attr_thrower,
+ attr_NONE = -1
+} AttrEnum;
+
/* HEADERIZER HFILE: none */
/* HEADERIZER BEGIN: static */
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+
+static AttrEnum getAttrEnum(PARROT_INTERP, ARGIN(const STRING *name))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+#define ASSERT_ARGS_getAttrEnum __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(name))
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: static */
+
pmclass Exception auto_attrs {
ATTR INTVAL id; /* The task ID in the scheduler. */
@@ -87,16 +115,18 @@
*/
VTABLE void init() {
- /* Set flags for custom GC mark and destroy. */
+ /* Use custom mark */
PObj_custom_mark_SET(SELF);
- SET_ATTR_severity(INTERP, SELF, EXCEPT_error);
- SET_ATTR_handled(INTERP, SELF, 0);
- SET_ATTR_message(INTERP, SELF, NULL);
+ /* Set default values */
+ SET_ATTR_message(INTERP, SELF, STRINGNULL);
SET_ATTR_payload(INTERP, SELF, PMCNULL);
SET_ATTR_resume(INTERP, SELF, PMCNULL);
+ SET_ATTR_severity(INTERP, SELF, EXCEPT_error);
SET_ATTR_backtrace(INTERP, SELF, PMCNULL);
SET_ATTR_handler_iter(INTERP, SELF, PMCNULL);
+ SET_ATTR_handler_ctx(INTERP, SELF, PMCNULL);
+ SET_ATTR_thrower(INTERP, SELF, PMCNULL);
}
/*
@@ -110,34 +140,27 @@
*/
VTABLE void init_pmc(PMC *values) {
- INTVAL severity_val;
- STRING *message_val;
+ INTVAL severity_val = EXCEPT_error;
+ STRING *message_val = NULL;
const INTVAL ishash = VTABLE_isa(INTERP, values, CONST_STRING(INTERP, 'Hash'));
+ STATICSELF.init();
+
if (ishash) {
STRING * const severity = CONST_STRING(INTERP, "severity");
STRING * const message = CONST_STRING(INTERP, "message");
severity_val = VTABLE_get_integer_keyed_str(INTERP, values, severity);
message_val = VTABLE_get_string_keyed_str(INTERP, values, message);
}
- else {
- severity_val = EXCEPT_error;
+ else
message_val = VTABLE_get_string(INTERP, values);
- }
- /* Set flags for custom GC mark. */
- PObj_custom_mark_SET(SELF);
-
- /* Set up the core struct and default values for the exception object. */
+ /* Set up the values for the exception object. */
SET_ATTR_severity(INTERP, SELF, severity_val);
- SET_ATTR_handled(INTERP, SELF, 0);
- SET_ATTR_message(INTERP, SELF, message_val);
- SET_ATTR_payload(INTERP, SELF, PMCNULL);
- SET_ATTR_resume(INTERP, SELF, PMCNULL);
- SET_ATTR_backtrace(INTERP, SELF, PMCNULL);
- SET_ATTR_handler_iter(INTERP, SELF, PMCNULL);
+ if (! STRING_IS_NULL(message_val))
+ SET_ATTR_message(INTERP, SELF, message_val);
}
@@ -250,19 +273,20 @@
STRING * const name = VTABLE_get_string(INTERP, key);
INTVAL result = 0;
- if (Parrot_str_equal(INTERP, name, CONST_STRING(INTERP, "type"))) {
+ switch (getAttrEnum(INTERP, name)) {
+ case attr_type:
GET_ATTR_type(INTERP, SELF, result);
- }
- else if (Parrot_str_equal(INTERP, name, CONST_STRING(INTERP, "severity"))) {
+ break;
+ case attr_severity:
GET_ATTR_severity(INTERP, SELF, result);
- }
- else if (Parrot_str_equal(INTERP, name, CONST_STRING(INTERP, "exit_code"))) {
+ break;
+ case attr_exit_code:
GET_ATTR_exit_code(INTERP, SELF, result);
- }
- else if (Parrot_str_equal(INTERP, name, CONST_STRING(INTERP, "handled"))) {
+ break;
+ case attr_handled:
GET_ATTR_handled(INTERP, SELF, result);
- }
- else {
+ break;
+ default:
/* If unknown attribute name, throw an exception. */
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_ATTRIB_NOT_FOUND,
"No such integer attribute '%S'", name);
@@ -283,20 +307,20 @@
VTABLE INTVAL get_integer_keyed_str(STRING *key) {
INTVAL result = 0;
-
- if (Parrot_str_equal(INTERP, key, CONST_STRING(INTERP, "type"))) {
+ switch (getAttrEnum(INTERP, key)) {
+ case attr_type:
GET_ATTR_type(INTERP, SELF, result);
- }
- else if (Parrot_str_equal(INTERP, key, CONST_STRING(INTERP, "severity"))) {
+ break;
+ case attr_severity:
GET_ATTR_severity(INTERP, SELF, result);
- }
- else if (Parrot_str_equal(INTERP, key, CONST_STRING(INTERP, "exit_code"))) {
+ break;
+ case attr_exit_code:
GET_ATTR_exit_code(INTERP, SELF, result);
- }
- else if (Parrot_str_equal(INTERP, key, CONST_STRING(INTERP, "handled"))) {
+ break;
+ case attr_handled:
GET_ATTR_handled(INTERP, SELF, result);
- }
- else {
+ break;
+ default:
/* If unknown attribute name, throw an exception. */
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_ATTRIB_NOT_FOUND,
"No such integer attribute '%S'", key);
@@ -400,20 +424,20 @@
VTABLE void set_integer_keyed(PMC *key, INTVAL value) {
STRING * const name = VTABLE_get_string(INTERP, key);
-
- if (Parrot_str_equal(INTERP, name, CONST_STRING(INTERP, "type"))) {
+ switch (getAttrEnum(INTERP, name)) {
+ case attr_type:
SET_ATTR_type(INTERP, SELF, value);
- }
- else if (Parrot_str_equal(INTERP, name, CONST_STRING(INTERP, "severity"))) {
+ break;
+ case attr_severity:
SET_ATTR_severity(INTERP, SELF, value);
- }
- else if (Parrot_str_equal(INTERP, name, CONST_STRING(INTERP, "exit_code"))) {
+ break;
+ case attr_exit_code:
SET_ATTR_exit_code(INTERP, SELF, value);
- }
- else if (Parrot_str_equal(INTERP, name, CONST_STRING(INTERP, "handled"))) {
+ break;
+ case attr_handled:
SET_ATTR_handled(INTERP, SELF, value);
- }
- else {
+ break;
+ default:
/* If unknown attribute name, throw an exception. */
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_ATTRIB_NOT_FOUND,
"No such integer attribute '%S'", name);
@@ -431,19 +455,20 @@
*/
VTABLE void set_integer_keyed_str(STRING *key, INTVAL value) {
- if (Parrot_str_equal(INTERP, key, CONST_STRING(INTERP, "type"))) {
+ switch (getAttrEnum(INTERP, key)) {
+ case attr_type:
SET_ATTR_type(INTERP, SELF, value);
- }
- else if (Parrot_str_equal(INTERP, key, CONST_STRING(INTERP, "severity"))) {
+ break;
+ case attr_severity:
SET_ATTR_severity(INTERP, SELF, value);
- }
- else if (Parrot_str_equal(INTERP, key, CONST_STRING(INTERP, "exit_code"))) {
+ break;
+ case attr_exit_code:
SET_ATTR_exit_code(INTERP, SELF, value);
- }
- else if (Parrot_str_equal(INTERP, key, CONST_STRING(INTERP, "handled"))) {
+ break;
+ case attr_handled:
SET_ATTR_handled(INTERP, SELF, value);
- }
- else {
+ break;
+ default:
/* If unknown attribute name, throw an exception. */
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_ATTRIB_NOT_FOUND,
"No such integer attribute '%S'", key);
@@ -542,47 +567,68 @@
VTABLE PMC *get_attr_str(STRING *name) {
PMC *value = PMCNULL;
- if (Parrot_str_equal(INTERP, name, CONST_STRING(INTERP, "type"))) {
- INTVAL type;
- GET_ATTR_type(INTERP, SELF, type);
- value = Parrot_pmc_new_init_int(INTERP, enum_class_Integer, type);
- }
- else if (Parrot_str_equal(INTERP, name, CONST_STRING(INTERP, "severity"))) {
- INTVAL severity;
- GET_ATTR_severity(INTERP, SELF, severity);
- value = Parrot_pmc_new_init_int(INTERP, enum_class_Integer, severity);
- }
- else if (Parrot_str_equal(INTERP, name, CONST_STRING(INTERP, "exit_code"))) {
- INTVAL exit_code;
- GET_ATTR_exit_code(INTERP, SELF, exit_code);
- value = Parrot_pmc_new_init_int(INTERP, enum_class_Integer, exit_code);
- }
- else if (Parrot_str_equal(INTERP, name, CONST_STRING(INTERP, "handled"))) {
- INTVAL handled;
- GET_ATTR_handled(INTERP, SELF, handled);
- value = Parrot_pmc_new_init_int(INTERP, enum_class_Integer, handled);
- }
- else if (Parrot_str_equal(INTERP, name, CONST_STRING(INTERP, "message"))) {
- STRING *message = SELF.get_string();
- value = Parrot_pmc_new(INTERP, enum_class_String);
- VTABLE_set_string_native(INTERP, value, message);
- }
- else if (Parrot_str_equal(INTERP, name, CONST_STRING(INTERP, "payload"))) {
- GET_ATTR_payload(INTERP, SELF, value);
- }
- else if (Parrot_str_equal(INTERP, name, CONST_STRING(INTERP, "resume"))) {
- GET_ATTR_resume(INTERP, SELF, value);
- }
- else if (Parrot_str_equal(INTERP, name, CONST_STRING(INTERP, "backtrace"))) {
- GET_ATTR_backtrace(INTERP, SELF, value);
- }
- else if (Parrot_str_equal(INTERP, name, CONST_STRING(INTERP, "handler_iter"))) {
- GET_ATTR_handler_iter(INTERP, SELF, value);
- }
- else {
+ switch (getAttrEnum(INTERP, name)) {
+ case attr_type:
+ {
+ INTVAL type;
+ GET_ATTR_type(INTERP, SELF, type);
+ value = Parrot_pmc_new_init_int(INTERP, enum_class_Integer, type);
+ }
+ break;
+ case attr_severity:
+ {
+ INTVAL severity;
+ GET_ATTR_severity(INTERP, SELF, severity);
+ value = Parrot_pmc_new_init_int(INTERP, enum_class_Integer, severity);
+ }
+ break;
+ case attr_exit_code:
+ {
+ INTVAL exit_code;
+ GET_ATTR_exit_code(INTERP, SELF, exit_code);
+ value = Parrot_pmc_new_init_int(INTERP, enum_class_Integer, exit_code);
+ }
+ case attr_handled:
+ {
+ INTVAL handled;
+ GET_ATTR_handled(INTERP, SELF, handled);
+ value = Parrot_pmc_new_init_int(INTERP, enum_class_Integer, handled);
+ }
+ break;
+ case attr_message:
+ {
+ STRING *message = SELF.get_string();
+ value = Parrot_pmc_new(INTERP, enum_class_String);
+ VTABLE_set_string_native(INTERP, value, message);
+ }
+ break;
+ case attr_birthtime:
+ {
+ FLOATVAL birthtime;
+ GET_ATTR_birthtime(INTERP, SELF, birthtime);
+ value = Parrot_pmc_new(INTERP, enum_class_Float);
+ VTABLE_set_number_native(INTERP, value, birthtime);
+ }
+ break;
+ case attr_payload:
+ GET_ATTR_payload(INTERP, SELF, value);
+ break;
+ case attr_resume:
+ GET_ATTR_resume(INTERP, SELF, value);
+ break;
+ case attr_backtrace:
+ GET_ATTR_backtrace(INTERP, SELF, value);
+ break;
+ case attr_handler_iter:
+ GET_ATTR_handler_iter(INTERP, SELF, value);
+ break;
+ case attr_NONE:
/* If unknown attribute name, throw an exception. */
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_ATTRIB_NOT_FOUND,
"No such attribute '%S'", name);
+ default:
+ Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_INVALID_OPERATION,
+ "Can't get attribute '%S'", name);
}
return value;
@@ -599,39 +645,50 @@
*/
VTABLE void set_attr_str(STRING *name, PMC *value) {
- if (Parrot_str_equal(INTERP, name, CONST_STRING(INTERP, "type"))) {
+ switch (getAttrEnum(INTERP, name)) {
+ case attr_type:
+ {
const INTVAL type = VTABLE_get_integer(INTERP, value);
SET_ATTR_type(INTERP, SELF, type);
- }
- else if (Parrot_str_equal(INTERP, name, CONST_STRING(INTERP, "severity"))) {
+ }
+ break;
+ case attr_severity:
+ {
const INTVAL severity = VTABLE_get_integer(INTERP, value);
SET_ATTR_severity(INTERP, SELF, severity);
- }
- else if (Parrot_str_equal(INTERP, name, CONST_STRING(INTERP, "exit_code"))) {
+ }
+ break;
+ case attr_exit_code:
+ {
const INTVAL exit_code = VTABLE_get_integer(INTERP, value);
SET_ATTR_exit_code(INTERP, SELF, exit_code);
- }
- else if (Parrot_str_equal(INTERP, name, CONST_STRING(INTERP, "handled"))) {
+ }
+ break;
+ case attr_handled:
+ {
const INTVAL handled = VTABLE_get_integer(INTERP, value);
SET_ATTR_handled(INTERP, SELF, handled);
- }
- else if (Parrot_str_equal(INTERP, name, CONST_STRING(INTERP, "message"))) {
+ }
+ break;
+ case attr_message:
+ {
STRING * const message = VTABLE_get_string(INTERP, value);
SELF.set_string_native(message);
- }
- else if (Parrot_str_equal(INTERP, name, CONST_STRING(INTERP, "payload"))) {
+ }
+ break;
+ case attr_payload:
SET_ATTR_payload(INTERP, SELF, value);
- }
- else if (Parrot_str_equal(INTERP, name, CONST_STRING(INTERP, "resume"))) {
+ break;
+ case attr_resume:
SET_ATTR_resume(INTERP, SELF, value);
- }
- else if (Parrot_str_equal(INTERP, name, CONST_STRING(INTERP, "backtrace"))) {
+ break;
+ case attr_backtrace:
SET_ATTR_backtrace(INTERP, SELF, value);
- }
- else if (Parrot_str_equal(INTERP, name, CONST_STRING(INTERP, "handler_iter"))) {
+ break;
+ case attr_handler_iter:
SET_ATTR_handler_iter(INTERP, SELF, value);
- }
- else if (Parrot_str_equal(INTERP, name, CONST_STRING(INTERP, "thrower"))) {
+ break;
+ case attr_thrower:
/* Ensure it's a ret cont, and extract the from_ctx.
* XXX TT #596 - when we have Context PMCs, just take and set that. */
if (!PMC_IS_NULL(value) && VTABLE_isa(INTERP, value, CONST_STRING(INTERP, "Continuation"))) {
@@ -639,13 +696,15 @@
if (!PMC_IS_NULL(ctx))
SET_ATTR_thrower(INTERP, SELF, ctx);
}
- }
- else {
+ break;
+ case attr_NONE:
/* If unknown attribute name, throw an exception. */
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_ATTRIB_NOT_FOUND,
"No such attribute '%S'", name);
+ default:
+ Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_INVALID_OPERATION,
+ "Can't set attribute '%S'", name);
}
-
}
/*
@@ -763,6 +822,63 @@
}
/*
+
+=head2 Auxliary functions
+
+=over 4
+
+=item C<static AttrEnum getAttrEnum(PARROT_INTERP, const STRING *name)>
+
+Gets an enumerated value corresponding to the attribute with that name.
+
+=cut
+
+*/
+
+static AttrEnum
+getAttrEnum(PARROT_INTERP, ARGIN(const STRING *name))
+{
+ ASSERT_ARGS(getAttrEnum)
+
+ AttrEnum r;
+ if (Parrot_str_equal(interp, name, CONST_STRING(interp, "birthtime")))
+ r = attr_birthtime;
+ else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "message")))
+ r = attr_message;
+ else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "payload")))
+ r = attr_payload;
+ else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "resume")))
+ r = attr_resume;
+ else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "severity")))
+ r = attr_severity;
+ else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "type")))
+ r = attr_type;
+ else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "exit_code")))
+ r = attr_exit_code;
+ else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "backtrace")))
+ r = attr_backtrace;
+ else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "handled")))
+ r = attr_handled;
+ else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "handler_iter")))
+ r = attr_handler_iter;
+ else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "handler_ctx")))
+ r = attr_handler_ctx;
+ else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "thrower")))
+ r = attr_thrower;
+ else
+ r = attr_NONE;
+ return r;
+}
+
+/*
+
+=back
+
+=cut
+
+*/
+
+/*
* Local variables:
* c-file-style: "parrot"
* End:
Modified: branches/ops_massacre/src/pmc/string.pmc
==============================================================================
--- branches/ops_massacre/src/pmc/string.pmc Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/src/pmc/string.pmc Thu May 27 06:10:21 2010 (r47048)
@@ -406,7 +406,7 @@
const INTVAL k = VTABLE_get_integer(INTERP, key);
GET_ATTR_str_val(INTERP, SELF, str_val);
- n = Parrot_str_byte_length(INTERP, str_val);
+ n = Parrot_str_length(INTERP, str_val);
return (INTVAL)((k >= 0 && k <= n) || (k < 0 && -k <= n));
}
@@ -470,7 +470,7 @@
VTABLE void set_string_keyed_int(INTVAL pos, STRING * const value) {
STRING *str_val;
- const INTVAL len = Parrot_str_byte_length(INTERP, value);
+ const INTVAL len = Parrot_str_length(INTERP, value);
GET_ATTR_str_val(INTERP, SELF, str_val);
str_val = Parrot_str_replace(INTERP, str_val, pos, len, value);
SET_ATTR_str_val(INTERP, SELF, str_val);
@@ -506,8 +506,8 @@
*/
METHOD replace(STRING *orig, STRING *_new) {
- const INTVAL old_len = Parrot_str_byte_length(INTERP, orig);
- const INTVAL new_len = Parrot_str_byte_length(INTERP, _new);
+ const INTVAL old_len = Parrot_str_length(INTERP, orig);
+ const INTVAL new_len = Parrot_str_length(INTERP, _new);
STRING * s = VTABLE_get_string(INTERP, SELF);
INTVAL i = 0;
@@ -607,7 +607,7 @@
VTABLE INTVAL elements() {
STRING *str_val;
GET_ATTR_str_val(INTERP, SELF, str_val);
- return Parrot_str_byte_length(INTERP, str_val);
+ return Parrot_str_length(INTERP, str_val);
}
VTABLE PMC *get_iter() {
@@ -691,7 +691,7 @@
INTVAL i;
STRING *dest;
- const INTVAL len = Parrot_str_byte_length(INTERP, src);
+ const INTVAL len = Parrot_str_length(INTERP, src);
if (!len)
RETURN(STRING src);
@@ -729,7 +729,7 @@
METHOD is_integer(STRING *src) {
INTVAL i;
unsigned char *p;
- const INTVAL len = Parrot_str_byte_length(INTERP, src);
+ const INTVAL len = Parrot_str_length(INTERP, src);
if (!len)
RETURN(INTVAL 0);
@@ -787,7 +787,7 @@
if (start < 0)
RETURN(INTVAL res);
- len = Parrot_str_byte_length(INTERP, src);
+ len = Parrot_str_length(INTERP, src);
if (!len)
RETURN(INTVAL res);
@@ -795,7 +795,7 @@
if (start >= (INTVAL)len)
RETURN(INTVAL res);
- if (!Parrot_str_byte_length(INTERP, substring))
+ if (!Parrot_str_length(INTERP, substring))
RETURN(INTVAL res);
res = CHARSET_RINDEX(INTERP, src, substring, (UINTVAL)start);
Modified: branches/ops_massacre/src/pmc/sub.pmc
==============================================================================
--- branches/ops_massacre/src/pmc/sub.pmc Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/src/pmc/sub.pmc Thu May 27 06:10:21 2010 (r47048)
@@ -954,6 +954,10 @@
Sets the sub that is the outer of this one.
+=item C<void set_outer_ctx(PMC *outer_ctx)>
+
+Set the outer context to be used on the next invocation of this sub.
+
=item C<INTVAL arity()>
Returns the arity of the Sub (the number of arguments, excluding optional and
@@ -1091,6 +1095,13 @@
}
+ METHOD set_outer_ctx(PMC *outer_ctx) {
+ Parrot_Sub_attributes *sub;
+ PMC_get_sub(INTERP, SELF, sub);
+ sub->outer_ctx = outer_ctx;
+ }
+
+
METHOD get_multisig() {
PMC *multisig;
Parrot_Sub_attributes *sub;
Modified: branches/ops_massacre/src/string/api.c
==============================================================================
--- branches/ops_massacre/src/string/api.c Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/src/string/api.c Thu May 27 06:10:21 2010 (r47048)
@@ -450,12 +450,16 @@
if (!cs) {
/* upgrade strings for concatenation */
cs = Parrot_unicode_charset_ptr;
- enc = (a->encoding == Parrot_utf16_encoding_ptr
- || b->encoding == Parrot_utf16_encoding_ptr
- || a->encoding == Parrot_ucs2_encoding_ptr
- || b->encoding == Parrot_ucs2_encoding_ptr)
- ? Parrot_utf16_encoding_ptr
- : Parrot_utf8_encoding_ptr;
+ if (a->encoding == Parrot_ucs4_encoding_ptr
+ || b->encoding == Parrot_ucs4_encoding_ptr)
+ enc = Parrot_ucs4_encoding_ptr;
+ else if (a->encoding == Parrot_utf16_encoding_ptr
+ || b->encoding == Parrot_utf16_encoding_ptr
+ || a->encoding == Parrot_ucs2_encoding_ptr
+ || b->encoding == Parrot_ucs2_encoding_ptr)
+ enc = Parrot_utf16_encoding_ptr;
+ else
+ enc = Parrot_utf8_encoding_ptr;
a = Parrot_unicode_charset_ptr->to_charset(interp, a);
b = Parrot_unicode_charset_ptr->to_charset(interp, b);
@@ -3242,7 +3246,8 @@
mem_sys_memcopy(pos, next->strstart, next->bufused);
pos += next->bufused;
- PARROT_ASSERT(pos <= res->strstart + Buffer_buflen(res));
+ /* We can consume all buffer and pos will be next-after-end of buffer */
+ PARROT_ASSERT(pos <= res->strstart + Buffer_buflen(res) + 1);
}
res->bufused = pos - res->strstart;
Modified: branches/ops_massacre/src/string/charset.c
==============================================================================
--- branches/ops_massacre/src/string/charset.c Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/src/string/charset.c Thu May 27 06:10:21 2010 (r47048)
@@ -23,6 +23,7 @@
#include "encoding/utf8.h"
#include "encoding/utf16.h"
#include "encoding/ucs2.h"
+#include "encoding/ucs4.h"
#include "charset/ascii.h"
#include "charset/binary.h"
@@ -497,6 +498,7 @@
Parrot_encoding_utf8_init(interp);
Parrot_encoding_ucs2_init(interp);
Parrot_encoding_utf16_init(interp);
+ Parrot_encoding_ucs4_init(interp);
Parrot_charset_ascii_init(interp);
Parrot_charset_iso_8859_1_init(interp);
Modified: branches/ops_massacre/src/string/encoding.c
==============================================================================
--- branches/ops_massacre/src/string/encoding.c Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/src/string/encoding.c Thu May 27 06:10:21 2010 (r47048)
@@ -43,6 +43,7 @@
ENCODING *Parrot_utf8_encoding_ptr = NULL;
ENCODING *Parrot_ucs2_encoding_ptr = NULL;
ENCODING *Parrot_utf16_encoding_ptr = NULL;
+ENCODING *Parrot_ucs4_encoding_ptr = NULL;
typedef struct One_encoding {
NOTNULL(ENCODING *encoding);
@@ -362,7 +363,7 @@
ENCODING *encoding)>
Registers a character encoding C<encoding> with name C<encodingname>.
-Only allows one of 4 possibilities: fixed_8, utf8, utf16, and ucs2.
+Only allows one of 5 possibilities: fixed_8, utf8, utf16, ucs2 and ucs4.
=cut
@@ -399,6 +400,10 @@
Parrot_ucs2_encoding_ptr = encoding;
return register_encoding(interp, encodingname, encoding);
}
+ if (STREQ("ucs4", encodingname)) {
+ Parrot_ucs4_encoding_ptr = encoding;
+ return register_encoding(interp, encodingname, encoding);
+ }
return 0;
}
Copied: branches/ops_massacre/src/string/encoding/ucs4.c (from r47047, trunk/src/string/encoding/ucs4.c)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/ops_massacre/src/string/encoding/ucs4.c Thu May 27 06:10:21 2010 (r47048, copy of r47047, trunk/src/string/encoding/ucs4.c)
@@ -0,0 +1,618 @@
+/*
+Copyright (C) 2010, Parrot Foundation.
+$Id$
+
+=head1 NAME
+
+src/string/encoding/ucs4.c - UCS-4 encoding
+
+=head1 DESCRIPTION
+
+UCS-4 encoding with the help of the ICU library.
+
+=head2 Functions
+
+=over 4
+
+=cut
+
+*/
+
+#include "parrot/parrot.h"
+#include "../unicode.h"
+
+#if !PARROT_HAS_ICU
+PARROT_DOES_NOT_RETURN
+static void no_ICU_lib(PARROT_INTERP) /* HEADERIZER SKIP */
+{
+ Parrot_ex_throw_from_c_args(interp, NULL,
+ EXCEPTION_LIBRARY_ERROR,
+ "no ICU lib loaded");
+}
+#endif
+
+/* HEADERIZER HFILE: src/string/encoding/ucs4.h */
+
+/* HEADERIZER BEGIN: static */
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+
+PARROT_WARN_UNUSED_RESULT
+static UINTVAL bytes(SHIM_INTERP, ARGIN(const STRING *src))
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+static UINTVAL codepoints(PARROT_INTERP, ARGIN(const STRING *src))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+static UINTVAL find_cclass(PARROT_INTERP,
+ ARGIN(const STRING *s),
+ ARGIN(const INTVAL *typetable),
+ INTVAL flags,
+ UINTVAL pos,
+ UINTVAL end)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3);
+
+static UINTVAL get_byte(PARROT_INTERP,
+ SHIM(const STRING *src),
+ SHIM(UINTVAL offset))
+ __attribute__nonnull__(1);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+static STRING * get_bytes(PARROT_INTERP,
+ SHIM(const STRING *src),
+ SHIM(UINTVAL offset),
+ SHIM(UINTVAL count))
+ __attribute__nonnull__(1);
+
+static UINTVAL get_codepoint(PARROT_INTERP,
+ ARGIN(const STRING *src),
+ UINTVAL offset)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+static STRING * get_codepoints(PARROT_INTERP,
+ ARGIN(const STRING *src),
+ UINTVAL offset,
+ UINTVAL count)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+static void iter_init(PARROT_INTERP,
+ ARGIN(const STRING *src),
+ ARGOUT(String_iter *iter))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3)
+ FUNC_MODIFIES(*iter);
+
+static void set_byte(PARROT_INTERP,
+ SHIM(const STRING *src),
+ SHIM(UINTVAL offset),
+ SHIM(UINTVAL byte))
+ __attribute__nonnull__(1);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+static STRING * to_encoding(PARROT_INTERP, ARGIN(const STRING *src))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+static UINTVAL ucs4_decode_and_advance(PARROT_INTERP,
+ ARGMOD(String_iter *i))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ FUNC_MODIFIES(*i);
+
+static void ucs4_encode_and_advance(PARROT_INTERP,
+ ARGMOD(String_iter *i),
+ UINTVAL c)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ FUNC_MODIFIES(*i);
+
+static size_t ucs4_hash(PARROT_INTERP,
+ ARGIN(const STRING *s),
+ size_t hashval)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+static void ucs4_set_position(PARROT_INTERP,
+ ARGMOD(String_iter *i),
+ UINTVAL n)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ FUNC_MODIFIES(*i);
+
+#define ASSERT_ARGS_bytes __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_codepoints __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_find_cclass __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(s) \
+ , PARROT_ASSERT_ARG(typetable))
+#define ASSERT_ARGS_get_byte __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_get_bytes __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_get_codepoint __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_get_codepoints __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_iter_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src) \
+ , PARROT_ASSERT_ARG(iter))
+#define ASSERT_ARGS_set_byte __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_to_encoding __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_ucs4_decode_and_advance __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(i))
+#define ASSERT_ARGS_ucs4_encode_and_advance __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(i))
+#define ASSERT_ARGS_ucs4_hash __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(s))
+#define ASSERT_ARGS_ucs4_set_position __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(i))
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+/* HEADERIZER END: static */
+
+#include "ucs4.h"
+
+#if PARROT_HAS_ICU
+# include <unicode/ustring.h>
+#endif
+
+/*
+
+=item C<static STRING * to_encoding(PARROT_INTERP, const STRING *src)>
+
+Converts the string C<src> to this particular encoding.
+
+=cut
+
+*/
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+static STRING *
+to_encoding(PARROT_INTERP, ARGIN(const STRING *src))
+{
+ ASSERT_ARGS(to_encoding)
+#if PARROT_HAS_ICU
+ if (src->encoding == Parrot_ucs4_encoding_ptr) {
+ return Parrot_str_clone(interp, src);
+ }
+ else {
+ UINTVAL len = Parrot_str_length(interp, src);
+ STRING *res = Parrot_str_new_init(interp, NULL, len * sizeof (UChar32),
+ Parrot_ucs4_encoding_ptr, Parrot_unicode_charset_ptr, 0);
+ UChar32 *buf = (UChar32 *) res->strstart;
+ UINTVAL offs;
+ for (offs = 0; offs < len; offs++){
+ buf[offs] = src->encoding->get_codepoint(interp, src, offs);
+ };
+ res->strlen = len;
+ res->bufused = len * sizeof (UChar32);
+
+ return res;
+ }
+#else
+ UNUSED(src);
+ no_ICU_lib(interp);
+#endif
+
+}
+
+/*
+
+=item C<static UINTVAL get_codepoint(PARROT_INTERP, const STRING *src, UINTVAL
+offset)>
+
+Returns the codepoint in string C<src> at position C<offset>.
+
+=cut
+
+*/
+
+static UINTVAL
+get_codepoint(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset)
+{
+ ASSERT_ARGS(get_codepoint)
+#if PARROT_HAS_ICU
+ const UChar32 * const s = (const UChar32*) src->strstart;
+ UNUSED(interp);
+ return s[offset];
+#else
+ UNUSED(offset);
+ UNUSED(src);
+ no_ICU_lib(interp);
+#endif
+}
+
+
+/*
+
+=item C<static UINTVAL find_cclass(PARROT_INTERP, const STRING *s, const INTVAL
+*typetable, INTVAL flags, UINTVAL pos, UINTVAL end)>
+
+Stub, the charset level handles this for unicode strings.
+
+=cut
+
+*/
+
+PARROT_WARN_UNUSED_RESULT
+static UINTVAL
+find_cclass(PARROT_INTERP, ARGIN(const STRING *s), ARGIN(const INTVAL *typetable),
+INTVAL flags, UINTVAL pos, UINTVAL end)
+{
+ ASSERT_ARGS(find_cclass)
+
+ UNUSED(s);
+ UNUSED(typetable);
+ UNUSED(flags);
+ UNUSED(pos);
+ UNUSED(end);
+
+ Parrot_ex_throw_from_c_args(interp, NULL,
+ EXCEPTION_UNIMPLEMENTED,
+ "No find_cclass support in unicode encoding plugins");
+}
+
+/*
+
+=item C<static UINTVAL get_byte(PARROT_INTERP, const STRING *src, UINTVAL
+offset)>
+
+Returns the byte in string C<src> at position C<offset>.
+
+=cut
+
+*/
+
+static UINTVAL
+get_byte(PARROT_INTERP, SHIM(const STRING *src), SHIM(UINTVAL offset))
+{
+ ASSERT_ARGS(get_byte)
+ Parrot_ex_throw_from_c_args(interp, NULL,
+ EXCEPTION_UNIMPLEMENTED,
+ "No get_byte for UCS-4");
+}
+
+/*
+
+=item C<static void set_byte(PARROT_INTERP, const STRING *src, UINTVAL offset,
+UINTVAL byte)>
+
+Sets, in string C<src> at position C<offset>, the byte C<byte>.
+
+=cut
+
+*/
+
+static void
+set_byte(PARROT_INTERP, SHIM(const STRING *src), SHIM(UINTVAL offset),
+ SHIM(UINTVAL byte))
+{
+ ASSERT_ARGS(set_byte)
+ Parrot_ex_throw_from_c_args(interp, NULL,
+ EXCEPTION_UNIMPLEMENTED,
+ "No set_byte for UCS-4");
+}
+
+/*
+
+=item C<static STRING * get_codepoints(PARROT_INTERP, const STRING *src, UINTVAL
+offset, UINTVAL count)>
+
+Returns the C<count> codepoints stored at position C<offset> in string
+C<src> as a new string.
+
+=cut
+
+*/
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+static STRING *
+get_codepoints(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count)
+{
+ ASSERT_ARGS(get_codepoints)
+#if PARROT_HAS_ICU
+ return Parrot_str_new_init(interp, (char*)src->strstart + offset * sizeof (UChar32),
+ count * sizeof (UChar32), src->encoding, src->charset, 0);
+#else
+ UNUSED(src);
+ UNUSED(offset);
+ UNUSED(count);
+ no_ICU_lib(interp);
+#endif
+}
+
+/*
+
+=item C<static STRING * get_bytes(PARROT_INTERP, const STRING *src, UINTVAL
+offset, UINTVAL count)>
+
+Returns the bytes in string C<src> at position C<offset> and length C<count>.
+
+=cut
+
+*/
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+static STRING *
+get_bytes(PARROT_INTERP, SHIM(const STRING *src), SHIM(UINTVAL offset),
+ SHIM(UINTVAL count))
+{
+ ASSERT_ARGS(get_bytes)
+ Parrot_ex_throw_from_c_args(interp, NULL,
+ EXCEPTION_UNIMPLEMENTED,
+ "No get_bytes for UCS-4");
+}
+
+
+/*
+
+=item C<static UINTVAL codepoints(PARROT_INTERP, const STRING *src)>
+
+Returns the number of codepoints in string C<src>.
+
+=cut
+
+*/
+
+PARROT_WARN_UNUSED_RESULT
+static UINTVAL
+codepoints(PARROT_INTERP, ARGIN(const STRING *src))
+{
+ ASSERT_ARGS(codepoints)
+#if PARROT_HAS_ICU
+ UNUSED(interp);
+ return src->bufused / sizeof (UChar32);
+#else
+ UNUSED(src);
+ no_ICU_lib(interp);
+#endif
+}
+
+/*
+
+=item C<static UINTVAL bytes(PARROT_INTERP, const STRING *src)>
+
+Returns the number of bytes in string C<src>.
+
+=cut
+
+*/
+
+PARROT_WARN_UNUSED_RESULT
+static UINTVAL
+bytes(SHIM_INTERP, ARGIN(const STRING *src))
+{
+ ASSERT_ARGS(bytes)
+ return src->bufused;
+}
+
+/*
+
+=item C<static UINTVAL ucs4_decode_and_advance(PARROT_INTERP, String_iter *i)>
+
+Moves the string iterator C<i> to the next UCS-4 codepoint.
+
+=cut
+
+*/
+
+static UINTVAL
+ucs4_decode_and_advance(PARROT_INTERP, ARGMOD(String_iter *i))
+{
+ ASSERT_ARGS(ucs4_decode_and_advance)
+#if PARROT_HAS_ICU
+ const UChar32 * const s = (const UChar32 *) i->str->strstart;
+ size_t pos = i->bytepos / sizeof (UChar32);
+ const UChar32 c = s[pos++];
+ ++i->charpos;
+ i->bytepos = pos * sizeof (UChar32);
+ return c;
+#else
+ UNUSED(i);
+ no_ICU_lib(interp);
+#endif
+}
+
+/*
+
+=item C<static void ucs4_encode_and_advance(PARROT_INTERP, String_iter *i,
+UINTVAL c)>
+
+With the string iterator C<i>, appends the codepoint C<c> and advances to the
+next position in the string.
+
+=cut
+
+*/
+
+static void
+ucs4_encode_and_advance(PARROT_INTERP, ARGMOD(String_iter *i), UINTVAL c)
+{
+ ASSERT_ARGS(ucs4_encode_and_advance)
+#if PARROT_HAS_ICU
+ UChar32 *s = (UChar32 *) i->str->strstart;
+ size_t pos = i->bytepos / sizeof (UChar32);
+ s[pos++] = (UChar32) c;
+ ++i->charpos;
+ i->bytepos = pos * sizeof (UChar32);
+#else
+ UNUSED(i);
+ no_ICU_lib(interp);
+#endif
+}
+
+#if PARROT_HAS_ICU
+/*
+
+=item C<static size_t ucs4_hash(PARROT_INTERP, const STRING *s, size_t hashval)>
+
+Returns the hashed value of the string, given a seed in hashval.
+
+=cut
+
+*/
+
+static size_t
+ucs4_hash(PARROT_INTERP, ARGIN(const STRING *s), size_t hashval)
+{
+ ASSERT_ARGS(ucs4_hash)
+ const UChar32 *pos = (const UChar32*) s->strstart;
+ UINTVAL len = s->strlen;
+ UNUSED(interp);
+
+ while (len--) {
+ hashval += hashval << 5;
+ hashval += *(pos++);
+ }
+
+ return hashval;
+}
+#endif
+
+/*
+
+=item C<static void ucs4_set_position(PARROT_INTERP, String_iter *i, UINTVAL n)>
+
+Moves the string iterator C<i> to the position C<n> in the string.
+
+=cut
+
+*/
+
+static void
+ucs4_set_position(PARROT_INTERP, ARGMOD(String_iter *i), UINTVAL n)
+{
+ ASSERT_ARGS(ucs4_set_position)
+#if PARROT_HAS_ICU
+ i->charpos = n;
+ i->bytepos = n * sizeof (UChar32);
+#else
+ UNUSED(i);
+ UNUSED(n);
+ no_ICU_lib(interp);
+#endif
+}
+
+
+/*
+
+=item C<static void iter_init(PARROT_INTERP, const STRING *src, String_iter
+*iter)>
+
+Initializes for string C<src> the string iterator C<iter>.
+
+=cut
+
+*/
+
+static void
+iter_init(PARROT_INTERP, ARGIN(const STRING *src), ARGOUT(String_iter *iter))
+{
+ ASSERT_ARGS(iter_init)
+#if PARROT_HAS_ICU
+ UNUSED(interp);
+ iter->str = src;
+ iter->bytepos = 0;
+ iter->charpos = 0;
+ iter->get_and_advance = ucs4_decode_and_advance;
+ iter->set_and_advance = ucs4_encode_and_advance;
+ iter->set_position = ucs4_set_position;
+#else
+ UNUSED(src);
+ UNUSED(iter);
+ no_ICU_lib(interp);
+#endif
+}
+
+/*
+
+=item C<void Parrot_encoding_ucs4_init(PARROT_INTERP)>
+
+Initializes the UCS-4 encoding.
+
+=cut
+
+*/
+
+void
+Parrot_encoding_ucs4_init(PARROT_INTERP)
+{
+ ASSERT_ARGS(Parrot_encoding_ucs4_init)
+ ENCODING * const return_encoding = Parrot_new_encoding(interp);
+
+ static const ENCODING base_encoding = {
+ "ucs4",
+ 4, /* Max bytes per codepoint */
+ to_encoding,
+ get_codepoint,
+ get_byte,
+ set_byte,
+ get_codepoints,
+ get_bytes,
+ codepoints,
+ bytes,
+ iter_init,
+ find_cclass,
+#if PARROT_HAS_ICU
+ ucs4_hash
+#else
+ NULL
+#endif
+ };
+ STRUCT_COPY_FROM_STRUCT(return_encoding, base_encoding);
+ Parrot_register_encoding(interp, "ucs4", return_encoding);
+
+ return;
+}
+
+/*
+
+=back
+
+=head1 SEE ALSO
+
+F<src/string/encoding/fixed_8.c>,
+F<src/string/encoding/utf8.c>,
+F<src/string/encoding/utf16.c>,
+F<src/string/encoding/ucs2.c>,
+F<src/string.c>,
+F<include/parrot/string.h>,
+F<docs/string.pod>.
+
+=cut
+
+*/
+
+
+/*
+ * Local variables:
+ * c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */
Copied: branches/ops_massacre/src/string/encoding/ucs4.h (from r47047, trunk/src/string/encoding/ucs4.h)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/ops_massacre/src/string/encoding/ucs4.h Thu May 27 06:10:21 2010 (r47048, copy of r47047, trunk/src/string/encoding/ucs4.h)
@@ -0,0 +1,27 @@
+/*
+Copyright (C) 2010, Parrot Foundation.
+$Id$
+*/
+
+#ifndef PARROT_ENCODING_UCS4_H_GUARD
+#define PARROT_ENCODING_UCS4_H_GUARD
+
+/* HEADERIZER BEGIN: src/string/encoding/ucs4.c */
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+
+void Parrot_encoding_ucs4_init(PARROT_INTERP)
+ __attribute__nonnull__(1);
+
+#define ASSERT_ARGS_Parrot_encoding_ucs4_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+/* HEADERIZER END: src/string/encoding/ucs4.c */
+
+#endif /* PARROT_ENCODING_UCS4_H_GUARD */
+
+/*
+ * Local variables:
+ * c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */
Modified: branches/ops_massacre/t/compilers/opsc/05-oplib.t
==============================================================================
--- branches/ops_massacre/t/compilers/opsc/05-oplib.t Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/t/compilers/opsc/05-oplib.t Thu May 27 06:10:21 2010 (r47048)
@@ -6,21 +6,12 @@
pir::load_bytecode("opsc.pbc");
-plan(5);
+plan(2);
my $lib := Ops::OpLib.new(
- :num_file('src/ops/ops.num'),
:skip_file('src/ops/ops.skip'),
);
-# It's 1200 currently. But testing for exact match isn't nessary.
-ok( $lib.max_op_num > 1000, "ops.num file parsed");
-say('# ' ~ $lib.max_op_num);
-
-# Check couple random ops.
-ok( $lib.op_num_table<end> == 0, "'end' has code 0");
-ok( $lib.op_num_table<set_addr_p_i> != 42, "'set_addr_p_i' have non 0 code");
-
ok( $lib.op_skip_table<abs_i_ic>, "'abs_i_ic' in skiptable");
ok( $lib.op_skip_table<ne_nc_nc_ic>, "'ne_nc_nc_ic' in skiptable");
#_dumper($lib.skiptable);
Modified: branches/ops_massacre/t/native_pbc/annotations.pbc
==============================================================================
Binary file (source and/or target). No diff available.
Modified: branches/ops_massacre/t/native_pbc/integer_1.pbc
==============================================================================
Binary file (source and/or target). No diff available.
Modified: branches/ops_massacre/t/native_pbc/number_1.pbc
==============================================================================
Binary file (source and/or target). No diff available.
Modified: branches/ops_massacre/t/native_pbc/string_1.pbc
==============================================================================
Binary file (source and/or target). No diff available.
Modified: branches/ops_massacre/t/op/inf_nan.t
==============================================================================
--- branches/ops_massacre/t/op/inf_nan.t Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/t/op/inf_nan.t Thu May 27 06:10:21 2010 (r47048)
@@ -124,19 +124,19 @@
$N0 = 'Inf'
$I0 = floor $N0
#is($I0, 'Inf', 'floor Inf')
- todo(0, 'floor Inf', 'rounding nan/inf gives something like -2147483648')
+ skip(1, 'rounding nan/inf gives something like -2147483648')
$N0 = 'NaN'
$I0 = floor $N0
#is($I0, 'NaN', 'floor Inf')
- todo(0, 'floor NaN', 'rounding nan/inf gives something like -2147483648')
+ skip(1, 'rounding nan/inf gives something like -2147483648')
$N0 = 'Inf'
$I0 = ceil $N0
#is($I0, 'Inf', 'floor Inf')
- todo(0, 'ceil Inf', 'rounding nan/inf gives something like -2147483648')
+ skip(1, 'rounding nan/inf gives something like -2147483648')
$N0 = 'NaN'
$I0 = ceil $N0
#is($I0, 'NaN', 'floor Inf')
- todo(0, 'ceil NaN', 'rounding nan/inf gives something like -2147483648')
+ skip(1, 'rounding nan/inf gives something like -2147483648')
.end
.sub test_nan_complex
@@ -145,7 +145,7 @@
set $P1, "1 + i"
$P1 += $N0
#is($P1, 'NaN', '1+i + NaN')
- todo(0, '1+i + NaN should be NaN')
+ skip(1, '1+i + NaN should be NaN')
.end
.sub test_fdiv_integer_pmc_nan
@@ -155,7 +155,7 @@
$N0 = 'NaN'
fdiv $P1, $P2, $N0
#is($P1, 'NaN', 'fdiv with Integer PMCs and NaN')
- todo(0, 'fdiv with Integer PMCs and NaN', 'fdiv/mod do not play nicely with PMCs and NaN')
+ skip(1, 'fdiv with Integer PMCs and NaN', 'fdiv/mod do not play nicely with PMCs and NaN')
.end
.sub test_fdiv_float_pmc_nan
@@ -165,7 +165,7 @@
$N0 = 'NaN'
fdiv $P1, $P2, $N0
#is($P1, 'NaN','fdiv with Float PMCs and NaN')
- todo(0,'fdiv with Float PMCs and NaN', 'fdiv/mod do not play nicely with PMCs and NaN')
+ skip(1,'fdiv with Float PMCs and NaN', 'fdiv/mod do not play nicely with PMCs and NaN')
.end
.sub test_fdiv_float_integer_pmc_nan
@@ -175,7 +175,7 @@
$N0 = 'NaN'
fdiv $P1, $P2, $N0
#is($P1, 'NaN', 'fdiv with Float and Integer PMCs and NaN')
- todo(0, 'fdiv with Float and Integer PMCs and NaN', 'fdiv/mod do not play nicely with PMCs and NaN')
+ skip(1, 'fdiv with Float and Integer PMCs and NaN', 'fdiv/mod do not play nicely with PMCs and NaN')
.end
.sub test_mod_float_integer_pmc_nan
@@ -185,7 +185,7 @@
$N0 = 'NaN'
mod $P1, $P2, $N0
#is($P1, 'NaN', 'mod with Float and Integer PMCs and NaN')
- todo(0, 'mod with Float and Integer PMCs and NaN', 'fdiv/mod do not play nicely with PMCs and NaN')
+ skip(1, 'mod with Float and Integer PMCs and NaN', 'fdiv/mod do not play nicely with PMCs and NaN')
.end
# Local Variables:
Modified: branches/ops_massacre/t/pmc/exception-old.t
==============================================================================
--- branches/ops_massacre/t/pmc/exception-old.t Thu May 27 05:33:51 2010 (r47047)
+++ branches/ops_massacre/t/pmc/exception-old.t Thu May 27 06:10:21 2010 (r47048)
@@ -342,7 +342,7 @@
catch:
.get_results($P1)
say "caught"
- unroll $P1
+ finalize $P1
.return()
.end
Deleted: branches/ops_massacre/tools/build/ops2pm.pl
==============================================================================
--- branches/ops_massacre/tools/build/ops2pm.pl Thu May 27 06:10:21 2010 (r47047)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,164 +0,0 @@
-#! perl
-# Copyright (C) 2001-2007, Parrot Foundation.
-# $Id$
-
-use strict;
-use warnings;
-
-use lib 'lib';
-use Parrot::Ops2pm;
-use Parrot::Ops2pm::Auxiliary qw( Usage getoptions );
-
-my $flagref = getoptions();
-
-if ( $flagref->{help} or !@ARGV ) {
- Usage();
- exit;
-}
-
-my $self = Parrot::Ops2pm->new(
- {
- argv => [@ARGV],
- nolines => $flagref->{nolines},
- renum => $flagref->{renum},
- moddir => "lib/Parrot/OpLib",
- module => "core.pm",
- inc_dir => "include/parrot/oplib",
- inc_f => "ops.h",
- script => "tools/build/ops2pm.pl",
- }
-);
-
-$self->prepare_ops();
-$self->load_op_map_files();
-$self->sort_ops();
-$self->prepare_real_ops();
-$self->print_module();
-$self->print_h();
-
-exit 0;
-
-################### DOCUMENTATION ####################
-
-=head1 NAME
-
-tools/build/ops2pm.pl - Generate Perl module from operation definitions
-
-=head1 SYNOPSIS
-
- $ perl tools/build/ops2pm.pl [--help] [--no-lines] input.ops [input2.ops ...]
- $ perl tools/build/ops2pm.pl [--renum] input.ops [input2.ops ...]
-
-=head1 DESCRIPTION
-
-Reads the ops files listed on the command line and outputs a
-F<Parrot::OpLib::core> module containing information about the ops.
-Also outputs F<include/parrot/oplib/ops.h>. This program is called by Parrot's
-F<make>.
-
-If called with the C<--renum> flag, renumbers the file F<src/ops/ops.num>.
-This is mandatory when adding or removing opcodes.
-
-=head1 OPTIONS
-
-=over 4
-
-=item C<--help>
-
-Print synopsis.
-
-=item C<--no-lines>
-
-Do not generate C<#line> directives in the generated C code.
-
-=item C<--renum>
-
-Renumber opcodes according to existing ops in ops/num and natural
-order in the given ops files. See also F<tools/dev/ops_renum.mak>.
-
-=back
-
-Most of the functionality in this program is now held in Parrot::Ops2pm::Util
-methods and a small number of Parrot::Ops2pm::Auxiliary subroutines.
-See those modules' documentation for discussion of those functions.
-Revisions to the functionality should be made in those packages and tested
-against tests found in F<t/tools/ops2pm/>.
-
-=head1 WARNING
-
-Generating a C<Parrot::OpLib::core> module for a set of ops files that
-you do not later turn into C code (see F<tools/build/ops2c.pl>) with the
-same op content and order is a recipe for disaster. But as long as you
-just run these tools in the standard build process via C<make> there
-shouldn't be a problem.
-
-=head1 TODO
-
-The original design of the ops processing code was intended to be
-a read-only representation of what was in a particular ops file. It was
-not originally intended that it was a mechanism for building a bigger
-virtual ops file from multiple physical ops files.
-
-This code does half of that job (the other half is getting them to
-compile together instead of separately in a F<*_ops.c> file).
-
-You can see evidence of this by the way this code reaches in to the
-internal C<OPS> hash key to do its concatenation, and the way it
-twiddles each op's C<CODE> hash key after that.
-
-If the op and oplib Perl modules are going to be used for modifying
-information read from ops files in addition to reading it, they should
-be changed to make the above operations explicitly supported.
-
-Otherwise, the Parrot build and interpreter start-up logic should be
-modified so that it doesn't need to concatenate separate ops files.
-
-=head1 SEE ALSO
-
-=over 4
-
-=item F<tools/build/ops2c.pl>.
-
-=item F<lib/Parrot/Ops2pm.pm>.
-
-=item F<lib/Parrot/Ops2pm/Auxiliary.pm>.
-
-=item F<tools/dev/ops_renum.mak>.
-
-=back
-
-=head1 AUTHOR
-
-Over the years, F<tools/build/ops2pm.pl> has been worked on by the following Parrot hackers:
-
- bernhard
- brentdax
- chip
- chromatic
- coke
- dan
- gregor
- jkeenan
- leo
- mikescott
- particle
- paultcochrane
- petdance
- robert
- simon
- tewk
-
-Others who provided code cited in the version control logs include:
-
- Andy Dougherty
- Jeff Gof
- Steve Fink
-
-=cut
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
Deleted: branches/ops_massacre/tools/dev/opsrenumber.pl
==============================================================================
--- branches/ops_massacre/tools/dev/opsrenumber.pl Thu May 27 06:10:21 2010 (r47047)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,77 +0,0 @@
-#! perl
-# Copyright (C) 2001-2007, Parrot Foundation.
-# $Id$
-
-use strict;
-use warnings;
-
-use lib 'lib';
-use Parrot::OpsRenumber;
-
-my $self = Parrot::OpsRenumber->new(
- {
- argv => [@ARGV],
- moddir => "lib/Parrot/OpLib",
- module => "core.pm",
- inc_dir => "include/parrot/oplib",
- inc_f => "ops.h",
- script => "tools/dev/opsrenumber.pl",
- }
-);
-
-$self->prepare_ops();
-$self->renum_op_map_file();
-
-exit 0;
-
-################### DOCUMENTATION ####################
-
-=head1 NAME
-
-tools/dev/opsrenumber.pl - Renumber F<src/ops/ops.num>.
-
-=head1 SYNOPSIS
-
- $ perl tools/dev/opsrenumber.pl input.ops [input2.ops ...]
-
-=head1 DESCRIPTION
-
-This program should be used when adding or removing opcodes.
-
-All opcodes except the first seven are potentially deletable and the opcodes'
-order may be rearranged. However, in and after Parrot 1.0.0, deletion of
-opcodes should be a rare event. The program will automatically detect which
-opcodes have been deleted and will renumber the remaining codes appropriately.
-
-The program, however, will B<not> automatically detect new opcodes. This is
-a feature, not a bug, as it is intended to require someone to think about why
-new opcodes should be added. Once a decision to add new opcodes has been
-made, those opcodes should be entered manually at the endc of
-F<src/ops/ops.num>, then F<tools/dev/opsrenumber.pl> (or F<make opsrenumber>)
-should be run.
-
-=head1 SEE ALSO
-
-=over 4
-
-=item F<lib/Parrot/Ops2pm/Base.pm>.
-
-=item F<lib/Parrot/OpsRenumber.pm>.
-
-=back
-
-=head1 AUTHOR
-
-This code was refactored out of F<tools/build/ops2pm.pl>. That file contains
-a list of the contributors to this code over the years.
-
-The refactoring of this file was done by James E Keenan.
-
-=cut
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
More information about the parrot-commits
mailing list