[svn:parrot] r48356 - in branches/dynop_mapping: . compilers/imcc compilers/opsc/src/Ops/Trans compilers/pct/src/PAST compilers/pct/src/PCT config/gen/makefiles include/parrot runtime/parrot/library/Digest src src/call src/interp src/ops src/packfile src/pmc src/runcore t/native_pbc t/pmc t/src tools/dev
plobsing at svn.parrot.org
plobsing at svn.parrot.org
Mon Aug 9 05:50:29 UTC 2010
Author: plobsing
Date: Mon Aug 9 05:50:26 2010
New Revision: 48356
URL: https://trac.parrot.org/parrot/changeset/48356
Log:
sync with trunk
Deleted:
branches/dynop_mapping/tools/dev/pprof2cg.nqp
Modified:
branches/dynop_mapping/ (props changed)
branches/dynop_mapping/MANIFEST
branches/dynop_mapping/compilers/imcc/pbc.c
branches/dynop_mapping/compilers/opsc/src/Ops/Trans/C.pm
branches/dynop_mapping/compilers/pct/src/PAST/Compiler.pir
branches/dynop_mapping/compilers/pct/src/PCT/HLLCompiler.pir
branches/dynop_mapping/config/gen/makefiles/root.in
branches/dynop_mapping/include/parrot/call.h
branches/dynop_mapping/include/parrot/context.h
branches/dynop_mapping/include/parrot/hash.h
branches/dynop_mapping/include/parrot/packfile.h
branches/dynop_mapping/include/parrot/pmc_freeze.h
branches/dynop_mapping/include/parrot/runcore_trace.h (props changed)
branches/dynop_mapping/runtime/parrot/library/Digest/MD5.pir
branches/dynop_mapping/src/call/args.c
branches/dynop_mapping/src/call/context_accessors.c
branches/dynop_mapping/src/debug.c
branches/dynop_mapping/src/embed.c
branches/dynop_mapping/src/hash.c
branches/dynop_mapping/src/interp/inter_create.c (props changed)
branches/dynop_mapping/src/ops/core_ops.c
branches/dynop_mapping/src/packdump.c
branches/dynop_mapping/src/packfile.c
branches/dynop_mapping/src/packfile/pf_items.c
branches/dynop_mapping/src/packout.c
branches/dynop_mapping/src/pbc_merge.c
branches/dynop_mapping/src/pmc.c
branches/dynop_mapping/src/pmc/callcontext.pmc
branches/dynop_mapping/src/pmc/default.pmc
branches/dynop_mapping/src/pmc/env.pmc
branches/dynop_mapping/src/pmc/eval.pmc
branches/dynop_mapping/src/pmc/imageio.pmc
branches/dynop_mapping/src/pmc/packfileconstanttable.pmc
branches/dynop_mapping/src/pmc/sub.pmc
branches/dynop_mapping/src/pmc_freeze.c
branches/dynop_mapping/src/runcore/cores.c (props changed)
branches/dynop_mapping/src/runcore/trace.c (contents, props changed)
branches/dynop_mapping/t/native_pbc/annotations.pbc
branches/dynop_mapping/t/native_pbc/integer.pbc
branches/dynop_mapping/t/native_pbc/integer_1.pbc
branches/dynop_mapping/t/native_pbc/number.pbc
branches/dynop_mapping/t/native_pbc/number_1.pbc
branches/dynop_mapping/t/native_pbc/string.pbc
branches/dynop_mapping/t/native_pbc/string_1.pbc
branches/dynop_mapping/t/pmc/capture.t
branches/dynop_mapping/t/pmc/oplib.t
branches/dynop_mapping/t/pmc/packfile.t
branches/dynop_mapping/t/src/embed.t (props changed)
branches/dynop_mapping/tools/dev/mk_gitignore.pl (props changed)
branches/dynop_mapping/tools/dev/pbc_to_exe.pir
Modified: branches/dynop_mapping/MANIFEST
==============================================================================
--- branches/dynop_mapping/MANIFEST Mon Aug 9 04:23:47 2010 (r48355)
+++ branches/dynop_mapping/MANIFEST Mon Aug 9 05:50:26 2010 (r48356)
@@ -1,7 +1,7 @@
# ex: set ro:
# $Id$
#
-# generated by tools/dev/mk_manifest_and_skip.pl Sat Jul 31 17:37:19 2010 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Tue Aug 3 18:21:50 2010 UT
#
# See below for documentation on the format of this file.
#
@@ -2140,7 +2140,6 @@
tools/dev/pbc_to_exe.pir [devel]
tools/dev/pmcrenumber.pl []
tools/dev/pmctree.pl []
-tools/dev/pprof2cg.nqp []
tools/dev/pprof2cg.pl [devel]
tools/dev/reconfigure.pl [devel]
tools/dev/search-ops.pl []
Modified: branches/dynop_mapping/compilers/imcc/pbc.c
==============================================================================
--- branches/dynop_mapping/compilers/imcc/pbc.c Mon Aug 9 04:23:47 2010 (r48355)
+++ branches/dynop_mapping/compilers/imcc/pbc.c Mon Aug 9 05:50:26 2010 (r48356)
@@ -352,14 +352,11 @@
const size_t oldcount = interp->code->const_table->const_count;
const size_t newcount = oldcount + 1;
- /* Allocate a new constant */
- PackFile_Constant *new_constant = PackFile_Constant_new(interp);
-
/* Update the constant count and reallocate */
if (interp->code->const_table->constants) {
interp->code->const_table->constants =
mem_gc_realloc_n_typed_zeroed(interp, interp->code->const_table->constants,
- newcount, oldcount, PackFile_Constant *);
+ newcount, oldcount, PackFile_Constant);
}
else {
/* initialize rlookup cache */
@@ -369,10 +366,9 @@
(hash_comp_fn)STRING_compare_distinct_cs_enc;
interp->code->const_table->constants =
- mem_gc_allocate_n_zeroed_typed(interp, newcount, PackFile_Constant *);
+ mem_gc_allocate_n_zeroed_typed(interp, newcount, PackFile_Constant);
}
- interp->code->const_table->constants[oldcount] = new_constant;
interp->code->const_table->const_count = newcount;
return oldcount;
@@ -394,7 +390,7 @@
{
ASSERT_ARGS(add_const_table_pmc)
const int newitem = add_const_table(interp);
- PackFile_Constant * const constant = interp->code->const_table->constants[newitem];
+ PackFile_Constant * const constant = &interp->code->const_table->constants[newitem];
constant->type = PFC_PMC;
constant->u.key = pmc;
@@ -418,7 +414,7 @@
{
ASSERT_ARGS(add_const_table_key)
const int newitem = add_const_table(interp);
- PackFile_Constant * const constant = interp->code->const_table->constants[newitem];
+ PackFile_Constant * const constant = &interp->code->const_table->constants[newitem];
constant->type = PFC_KEY;
constant->u.key = key;
@@ -1141,7 +1137,7 @@
/* otherwise... */
{
int k = add_const_table(interp);
- PackFile_Constant *constant = table->constants[k];
+ PackFile_Constant *constant = &table->constants[k];
constant->type = PFC_STRING;
constant->u.string = s;
@@ -1170,7 +1166,7 @@
const int k = add_const_table(interp);
STRING * const s = Parrot_str_new(interp, buf, 0);
- PackFile_Constant * const constant = interp->code->const_table->constants[k];
+ PackFile_Constant * const constant = &interp->code->const_table->constants[k];
constant->type = PFC_NUMBER;
constant->u.number = Parrot_str_to_num(interp, s);
@@ -1215,7 +1211,7 @@
r = pcc_sub->multi[i];
if (r->set == 'S') {
- STRING * const type_name = ct->constants[r->color]->u.string;
+ STRING * const type_name = ct->constants[r->color].u.string;
const INTVAL type_num = Parrot_pmc_get_type_str(interp, type_name);
if (type_num == enum_type_undef) {
@@ -1228,7 +1224,7 @@
}
else {
PARROT_ASSERT(r->set == 'K');
- sig_pmc = ct->constants[r->color]->u.key;
+ sig_pmc = ct->constants[r->color].u.key;
}
VTABLE_set_pmc_keyed_int(interp, multi_sig, i, sig_pmc);
@@ -1259,10 +1255,10 @@
int need_lex)
{
ASSERT_ARGS(create_lexinfo)
- PMC *lex_info = NULL;
- SymHash *hsh = &unit->hash;
- PackFile_Constant **constants = interp->code->const_table->constants;
- const INTVAL lex_info_id = Parrot_get_ctx_HLL_type(interp,
+ PMC *lex_info = NULL;
+ SymHash *hsh = &unit->hash;
+ PackFile_Constant *constants = interp->code->const_table->constants;
+ const INTVAL lex_info_id = Parrot_get_ctx_HLL_type(interp,
enum_class_LexInfo);
unsigned int i;
@@ -1287,7 +1283,7 @@
Parrot_Sub_attributes *sub;
PARROT_ASSERT(k >= 0);
- lex_name = constants[k]->u.string;
+ lex_name = constants[k].u.string;
PARROT_ASSERT(PObj_is_string_TEST(lex_name));
PMC_get_sub(interp, sub_pmc, sub);
@@ -1482,7 +1478,7 @@
Sub_comp_get_FLAGS(sub) |= (r->pcc_sub->pragma & SUB_COMP_FLAG_MASK);
r->color = add_const_str(interp, IMCC_string_from_reg(interp, r));
- sub->name = ct->constants[r->color]->u.string;
+ sub->name = ct->constants[r->color].u.string;
/* If the unit has no subid, set the subid to match the name. */
if (!unit->subid)
@@ -1499,18 +1495,18 @@
IMCC_string_from_reg(interp, unit->subid));
}
- sub->subid = ct->constants[unit->subid->color]->u.string;
+ sub->subid = ct->constants[unit->subid->color].u.string;
ns_pmc = NULL;
if (ns_const >= 0 && ns_const < ct->const_count) {
- switch (ct->constants[ns_const]->type) {
+ switch (ct->constants[ns_const].type) {
case PFC_KEY:
- ns_pmc = ct->constants[ns_const]->u.key;
+ ns_pmc = ct->constants[ns_const].u.key;
break;
case PFC_STRING:
ns_pmc = Parrot_pmc_new_constant(interp, enum_class_String);
VTABLE_set_string_native(interp, ns_pmc,
- ct->constants[ns_const]->u.string);
+ ct->constants[ns_const].u.string);
break;
default:
break;
@@ -1603,8 +1599,8 @@
/* store the sub */
{
- const int k = add_const_table(interp);
- PackFile_Constant * const pfc = ct->constants[k];
+ const int k = add_const_table(interp);
+ PackFile_Constant * const pfc = &ct->constants[k];
pfc->type = PFC_PMC;
pfc->u.key = sub_pmc;
@@ -2229,7 +2225,7 @@
{
ASSERT_ARGS(verify_signature)
PMC *changed_sig = NULL;
- PMC * const sig_arr = interp->code->const_table->constants[pc[-1]]->u.key;
+ PMC * const sig_arr = interp->code->const_table->constants[pc[-1]].u.key;
int needed = 0;
int no_consts = (ins->opnum == PARROT_OP_get_results_pc
|| ins->opnum == PARROT_OP_get_params_pc);
Modified: branches/dynop_mapping/compilers/opsc/src/Ops/Trans/C.pm
==============================================================================
--- branches/dynop_mapping/compilers/opsc/src/Ops/Trans/C.pm Mon Aug 9 04:23:47 2010 (r48355)
+++ branches/dynop_mapping/compilers/opsc/src/Ops/Trans/C.pm Mon Aug 9 05:50:26 2010 (r48356)
@@ -25,10 +25,10 @@
:ki("IREG(NUM)"),
:ic("cur_opcode[NUM]"),
- :nc("CONST(NUM)->u.number"),
- :pc("CONST(NUM)->u.key"),
- :sc("CONST(NUM)->u.string"),
- :kc("CONST(NUM)->u.key"),
+ :nc("CONST(NUM).u.number"),
+ :pc("CONST(NUM).u.key"),
+ :sc("CONST(NUM).u.string"),
+ :kc("CONST(NUM).u.key"),
:kic("cur_opcode[NUM]")
);
Modified: branches/dynop_mapping/compilers/pct/src/PAST/Compiler.pir
==============================================================================
--- branches/dynop_mapping/compilers/pct/src/PAST/Compiler.pir Mon Aug 9 04:23:47 2010 (r48355)
+++ branches/dynop_mapping/compilers/pct/src/PAST/Compiler.pir Mon Aug 9 05:50:26 2010 (r48356)
@@ -81,7 +81,11 @@
piropsig['find_codepoint'] = 'Is'
piropsig['find_dynamic_lex'] = 'Ps'
piropsig['find_name'] = 'Ps'
+ piropsig['getinterp'] = 'P'
piropsig['getprop'] = 'P~P'
+ piropsig['getstderr'] = 'P'
+ piropsig['getstdin'] = 'P'
+ piropsig['getstdout'] = 'P'
piropsig['index'] = 'Issi'
piropsig['isa'] = 'IP~'
piropsig['isfalse'] = 'IP'
@@ -92,9 +96,11 @@
piropsig['length'] = 'Is'
piropsig['load_bytecode'] = 'vs'
piropsig['load_language'] = 'vs'
+ piropsig['loadlib'] = 'P~'
piropsig['mod'] = 'PP+'
piropsig['mul'] = 'PP+'
piropsig['neg'] = 'PP'
+ piropsig['new'] = 'P~'
piropsig['newclosure'] = 'PP'
piropsig['not'] = 'PP'
piropsig['ord'] = 'Isi'
@@ -117,7 +123,9 @@
piropsig['split'] = 'Pss'
piropsig['sub'] = 'PP+'
piropsig['substr'] = 'Ssii'
+ piropsig['titlecase'] = 'Ss'
piropsig['trace'] = 'vi'
+ piropsig['typeof'] = 'SP'
piropsig['unshift'] = '0P*'
piropsig['upcase'] = 'Ss'
set_global '%piropsig', piropsig
Modified: branches/dynop_mapping/compilers/pct/src/PCT/HLLCompiler.pir
==============================================================================
--- branches/dynop_mapping/compilers/pct/src/PCT/HLLCompiler.pir Mon Aug 9 04:23:47 2010 (r48355)
+++ branches/dynop_mapping/compilers/pct/src/PCT/HLLCompiler.pir Mon Aug 9 05:50:26 2010 (r48356)
@@ -335,7 +335,10 @@
$P1.'print'("Stage '")
$P1.'print'(stagename)
$P1.'print'("': ")
- $P1.'print'($N2)
+ $P2 = new ['ResizablePMCArray']
+ push $P2, $N2
+ $S0 = sprintf "%.3f", $P2
+ $P1.'print'($S0)
$P1.'print'(" sec\n")
if target == stagename goto have_result
goto stagestats_loop
Modified: branches/dynop_mapping/config/gen/makefiles/root.in
==============================================================================
--- branches/dynop_mapping/config/gen/makefiles/root.in Mon Aug 9 04:23:47 2010 (r48355)
+++ branches/dynop_mapping/config/gen/makefiles/root.in Mon Aug 9 05:50:26 2010 (r48356)
@@ -2515,6 +2515,11 @@
tags.vi.dummy:
+tags: tags.dummy
+ @echo 'There is no "tags" target. You want tags-vi or tags-emacs.'
+
+tags.dummy:
+
CRITIC_FILES = 'lib/Parrot'
perlcritic:
Modified: branches/dynop_mapping/include/parrot/call.h
==============================================================================
--- branches/dynop_mapping/include/parrot/call.h Mon Aug 9 04:23:47 2010 (r48355)
+++ branches/dynop_mapping/include/parrot/call.h Mon Aug 9 05:50:26 2010 (r48356)
@@ -306,7 +306,7 @@
|| OPCODE_IS((interp), (seg), *(pc), PARROT_OP_get_results_pc) \
|| OPCODE_IS((interp), (seg), *(pc), PARROT_OP_get_params_pc) \
|| OPCODE_IS((interp), (seg), *(pc), PARROT_OP_set_returns_pc)) { \
- PMC * const sig = (seg)->const_table->constants[(pc)[1]]->u.key; \
+ PMC * const sig = (seg)->const_table->constants[(pc)[1]].u.key; \
(n) += VTABLE_elements((interp), sig); \
} \
} while (0)
Modified: branches/dynop_mapping/include/parrot/context.h
==============================================================================
--- branches/dynop_mapping/include/parrot/context.h Mon Aug 9 04:23:47 2010 (r48355)
+++ branches/dynop_mapping/include/parrot/context.h Mon Aug 9 05:50:26 2010 (r48356)
@@ -105,7 +105,7 @@
PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
PARROT_PURE_FUNCTION
-struct PackFile_Constant ** Parrot_pcc_get_constants_func(SHIM_INTERP,
+struct PackFile_Constant * Parrot_pcc_get_constants_func(SHIM_INTERP,
ARGIN(PMC *ctx))
__attribute__nonnull__(2);
@@ -220,7 +220,7 @@
PARROT_CAN_RETURN_NULL
void Parrot_pcc_set_constants_func(SHIM_INTERP,
ARGIN(PMC *ctx),
- ARGIN_NULLOK(struct PackFile_Constant **constants))
+ ARGIN_NULLOK(struct PackFile_Constant *constants))
__attribute__nonnull__(2);
PARROT_EXPORT
@@ -452,10 +452,10 @@
# define Parrot_pcc_get_signature(i, c) (CONTEXT_STRUCT(c)->current_sig)
# define Parrot_pcc_set_signature(i, c, value) (CONTEXT_STRUCT(c)->current_sig = (value))
-# define Parrot_pcc_get_int_constant(i, c, idx) (CONTEXT_STRUCT(c)->constants[(idx)]->u.integer)
-# define Parrot_pcc_get_num_constant(i, c, idx) (CONTEXT_STRUCT(c)->constants[(idx)]->u.number)
-# define Parrot_pcc_get_string_constant(i, c, idx) (CONTEXT_STRUCT(c)->constants[(idx)]->u.string)
-# define Parrot_pcc_get_pmc_constant(i, c, idx) (CONTEXT_STRUCT(c)->constants[(idx)]->u.key)
+# define Parrot_pcc_get_int_constant(i, c, idx) (CONTEXT_STRUCT(c)->constants[(idx)].u.integer)
+# define Parrot_pcc_get_num_constant(i, c, idx) (CONTEXT_STRUCT(c)->constants[(idx)].u.number)
+# define Parrot_pcc_get_string_constant(i, c, idx) (CONTEXT_STRUCT(c)->constants[(idx)].u.string)
+# define Parrot_pcc_get_pmc_constant(i, c, idx) (CONTEXT_STRUCT(c)->constants[(idx)].u.key)
# define Parrot_pcc_get_recursion_depth(i, c) (CONTEXT_STRUCT(c)->recursion_depth)
# define Parrot_pcc_dec_recursion_depth(i, c) (--CONTEXT_STRUCT(c)->recursion_depth)
Modified: branches/dynop_mapping/include/parrot/hash.h
==============================================================================
--- branches/dynop_mapping/include/parrot/hash.h Mon Aug 9 04:23:47 2010 (r48355)
+++ branches/dynop_mapping/include/parrot/hash.h Mon Aug 9 05:50:26 2010 (r48356)
@@ -11,11 +11,11 @@
typedef enum {
enum_hash_undef,
- enum_hash_int = enum_type_INTVAL,
- enum_hash_num = enum_type_FLOATVAL,
+ enum_hash_int = enum_type_INTVAL,
+ enum_hash_num = enum_type_FLOATVAL,
enum_hash_string = enum_type_STRING,
- enum_hash_pmc = enum_type_PMC,
- enum_hash_ptr = enum_type_ptr
+ enum_hash_pmc = enum_type_PMC,
+ enum_hash_ptr = enum_type_ptr
} HashEntryType;
@@ -23,7 +23,7 @@
typedef UINTVAL BucketIndex;
#define INITBucketIndex ((BucketIndex)-2)
-#define N_BUCKETS(n) ((n) - (n)/4)
+#define N_BUCKETS(n) ((n))
#define HASH_ALLOC_SIZE(n) (N_BUCKETS(n) * sizeof (HashBucket) + \
(n) * sizeof (HashBucket *))
Modified: branches/dynop_mapping/include/parrot/packfile.h
==============================================================================
--- branches/dynop_mapping/include/parrot/packfile.h Mon Aug 9 04:23:47 2010 (r48355)
+++ branches/dynop_mapping/include/parrot/packfile.h Mon Aug 9 05:50:26 2010 (r48356)
@@ -261,7 +261,7 @@
typedef struct PackFile_ConstTable {
PackFile_Segment base;
opcode_t const_count;
- PackFile_Constant **constants;
+ PackFile_Constant *constants;
PackFile_ByteCode *code; /* where this segment belongs to */
PMC *string_hash; /* Hash for lookup strings and numbers */
} PackFile_ConstTable;
@@ -530,18 +530,6 @@
__attribute__nonnull__(1);
PARROT_EXPORT
-void PackFile_Constant_destroy(PARROT_INTERP,
- ARGMOD_NULLOK(PackFile_Constant *self))
- __attribute__nonnull__(1)
- FUNC_MODIFIES(*self);
-
-PARROT_EXPORT
-PARROT_MALLOC
-PARROT_CANNOT_RETURN_NULL
-PackFile_Constant * PackFile_Constant_new(PARROT_INTERP)
- __attribute__nonnull__(1);
-
-PARROT_EXPORT
PARROT_WARN_UNUSED_RESULT
size_t PackFile_Constant_pack_size(PARROT_INTERP,
ARGIN(const PackFile_Constant *self),
@@ -896,10 +884,6 @@
, PARROT_ASSERT_ARG(self))
#define ASSERT_ARGS_PackFile_Annotations_new __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_PackFile_Constant_destroy __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_PackFile_Constant_new __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_PackFile_Constant_pack_size __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(self) \
@@ -1070,6 +1054,14 @@
__attribute__nonnull__(1)
FUNC_MODIFIES(*pf);
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+STRING * PF_fetch_buf(PARROT_INTERP,
+ ARGIN_NULLOK(PackFile *pf),
+ ARGIN(const opcode_t **cursor))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(3);
+
PARROT_MALLOC
PARROT_CANNOT_RETURN_NULL
char * PF_fetch_cstring(PARROT_INTERP,
@@ -1080,9 +1072,8 @@
__attribute__nonnull__(3);
PARROT_WARN_UNUSED_RESULT
-INTVAL PF_fetch_integer(
- ARGIN_NULLOK(PackFile *pf),
- ARGIN(const opcode_t **stream))
+INTVAL PF_fetch_integer(ARGIN(PackFile *pf), ARGIN(const opcode_t **stream))
+ __attribute__nonnull__(1)
__attribute__nonnull__(2);
PARROT_WARN_UNUSED_RESULT
@@ -1108,6 +1099,10 @@
__attribute__nonnull__(3);
PARROT_PURE_FUNCTION
+size_t PF_size_buf(ARGIN(const STRING *s))
+ __attribute__nonnull__(1);
+
+PARROT_PURE_FUNCTION
size_t PF_size_cstring(ARGIN(const char *s))
__attribute__nonnull__(1);
@@ -1130,6 +1125,13 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
+opcode_t* PF_store_buf(ARGOUT(opcode_t *cursor), ARGIN(const STRING *s))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ FUNC_MODIFIES(*cursor);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
opcode_t* PF_store_cstring(ARGOUT(opcode_t *cursor), ARGIN(const char *s))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
@@ -1165,12 +1167,16 @@
#define ASSERT_ARGS_PackFile_assign_transforms __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(pf))
+#define ASSERT_ARGS_PF_fetch_buf __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(cursor))
#define ASSERT_ARGS_PF_fetch_cstring __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(pf) \
, PARROT_ASSERT_ARG(cursor))
#define ASSERT_ARGS_PF_fetch_integer __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(stream))
+ PARROT_ASSERT_ARG(pf) \
+ , PARROT_ASSERT_ARG(stream))
#define ASSERT_ARGS_PF_fetch_number __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(stream))
#define ASSERT_ARGS_PF_fetch_opcode __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
@@ -1178,6 +1184,8 @@
#define ASSERT_ARGS_PF_fetch_string __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(cursor))
+#define ASSERT_ARGS_PF_size_buf __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(s))
#define ASSERT_ARGS_PF_size_cstring __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(s))
#define ASSERT_ARGS_PF_size_integer __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
@@ -1186,6 +1194,9 @@
#define ASSERT_ARGS_PF_size_string __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(s))
#define ASSERT_ARGS_PF_size_strlen __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_PF_store_buf __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(cursor) \
+ , PARROT_ASSERT_ARG(s))
#define ASSERT_ARGS_PF_store_cstring __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(cursor) \
, PARROT_ASSERT_ARG(s))
Modified: branches/dynop_mapping/include/parrot/pmc_freeze.h
==============================================================================
--- branches/dynop_mapping/include/parrot/pmc_freeze.h Mon Aug 9 04:23:47 2010 (r48355)
+++ branches/dynop_mapping/include/parrot/pmc_freeze.h Mon Aug 9 05:50:26 2010 (r48356)
@@ -155,7 +155,7 @@
PARROT_EXPORT
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
-PMC* Parrot_thaw(PARROT_INTERP, ARGIN(STRING *image))
+PMC * Parrot_thaw(PARROT_INTERP, ARGIN(STRING *image))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
Modified: branches/dynop_mapping/runtime/parrot/library/Digest/MD5.pir
==============================================================================
--- branches/dynop_mapping/runtime/parrot/library/Digest/MD5.pir Mon Aug 9 04:23:47 2010 (r48355)
+++ branches/dynop_mapping/runtime/parrot/library/Digest/MD5.pir Mon Aug 9 05:50:26 2010 (r48356)
@@ -49,6 +49,8 @@
=cut
+.HLL 'parrot'
+
.loadlib 'bit_ops'
###########################################################################
Modified: branches/dynop_mapping/src/call/args.c
==============================================================================
--- branches/dynop_mapping/src/call/args.c Mon Aug 9 04:23:47 2010 (r48355)
+++ branches/dynop_mapping/src/call/args.c Mon Aug 9 05:50:26 2010 (r48356)
@@ -758,7 +758,6 @@
GETATTR_FixedIntegerArray_size(interp, raw_sig, param_count);
-
/* A null call object is fine if there are no arguments and no returns. */
if (PMC_IS_NULL(call_object)) {
if (param_count > 0 && err_check)
@@ -818,6 +817,7 @@
* arguments into an array.*/
if (param_flags & PARROT_ARG_SLURPY_ARRAY) {
PMC *collect_positional;
+ int j;
/* Can't handle named slurpy here, go to named argument handling */
if (param_flags & PARROT_ARG_NAME)
@@ -828,11 +828,12 @@
EXCEPTION_INVALID_OPERATION,
"named parameters must follow all positional parameters");
- collect_positional = Parrot_pmc_new(interp,
- Parrot_get_ctx_HLL_type(interp, enum_class_ResizablePMCArray));
+ collect_positional = Parrot_pmc_new_init_int(interp,
+ Parrot_get_ctx_HLL_type(interp, enum_class_ResizablePMCArray),
+ positional_args - arg_index);
- for (; arg_index < positional_args; ++arg_index) {
- VTABLE_push_pmc(interp, collect_positional,
+ for (j = 0; arg_index < positional_args; ++arg_index) {
+ VTABLE_set_pmc_keyed_int(interp, collect_positional, j++,
VTABLE_get_pmc_keyed_int(interp, call_object, arg_index));
}
Modified: branches/dynop_mapping/src/call/context_accessors.c
==============================================================================
--- branches/dynop_mapping/src/call/context_accessors.c Mon Aug 9 04:23:47 2010 (r48355)
+++ branches/dynop_mapping/src/call/context_accessors.c Mon Aug 9 05:50:26 2010 (r48356)
@@ -49,11 +49,11 @@
/*
-=item C<struct PackFile_Constant ** Parrot_pcc_get_constants_func(PARROT_INTERP,
+=item C<struct PackFile_Constant * Parrot_pcc_get_constants_func(PARROT_INTERP,
PMC *ctx)>
=item C<void Parrot_pcc_set_constants_func(PARROT_INTERP, PMC *ctx, struct
-PackFile_Constant **constants)>
+PackFile_Constant *constants)>
Get/set constants from context.
@@ -64,7 +64,7 @@
PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
PARROT_PURE_FUNCTION
-struct PackFile_Constant **
+struct PackFile_Constant *
Parrot_pcc_get_constants_func(SHIM_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_constants_func)
@@ -75,7 +75,7 @@
PARROT_CAN_RETURN_NULL
void
Parrot_pcc_set_constants_func(SHIM_INTERP, ARGIN(PMC *ctx),
- ARGIN_NULLOK(struct PackFile_Constant **constants))
+ ARGIN_NULLOK(struct PackFile_Constant *constants))
{
ASSERT_ARGS(Parrot_pcc_set_constants_func)
Parrot_Context * const c = CONTEXT_STRUCT(ctx);
@@ -681,8 +681,8 @@
{
ASSERT_ARGS(Parrot_pcc_get_int_constant_func)
const Parrot_Context * const c = CONTEXT_STRUCT(ctx);
- PARROT_ASSERT(c->constants[idx]->type == 'i');
- return c->constants[idx]->u.integer;
+ PARROT_ASSERT(c->constants[idx].type == 'i');
+ return c->constants[idx].u.integer;
}
PARROT_EXPORT
@@ -693,8 +693,8 @@
{
ASSERT_ARGS(Parrot_pcc_get_num_constant_func)
const Parrot_Context * const c = CONTEXT_STRUCT(ctx);
- PARROT_ASSERT(c->constants[idx]->type == 'n');
- return c->constants[idx]->u.number;
+ PARROT_ASSERT(c->constants[idx].type == 'n');
+ return c->constants[idx].u.number;
}
PARROT_EXPORT
@@ -705,8 +705,8 @@
{
ASSERT_ARGS(Parrot_pcc_get_string_constant_func)
const Parrot_Context * const c = CONTEXT_STRUCT(ctx);
- PARROT_ASSERT(c->constants[idx]->type == 's');
- return c->constants[idx]->u.string;
+ PARROT_ASSERT(c->constants[idx].type == 's');
+ return c->constants[idx].u.string;
}
PARROT_EXPORT
@@ -717,9 +717,9 @@
{
ASSERT_ARGS(Parrot_pcc_get_pmc_constant_func)
const Parrot_Context * const c = CONTEXT_STRUCT(ctx);
- PARROT_ASSERT((c->constants[idx]->type == 'k')
- || (c->constants[idx]->type == 'p'));
- return c->constants[idx]->u.key;
+ PARROT_ASSERT((c->constants[idx].type == 'k')
+ || (c->constants[idx].type == 'p'));
+ return c->constants[idx].u.key;
}
/*
Modified: branches/dynop_mapping/src/debug.c
==============================================================================
--- branches/dynop_mapping/src/debug.c Mon Aug 9 04:23:47 2010 (r48355)
+++ branches/dynop_mapping/src/debug.c Mon Aug 9 05:50:26 2010 (r48356)
@@ -2323,7 +2323,7 @@
case PARROT_ARG_NC:
{
/* Convert the float to a string */
- const FLOATVAL f = interp->code->const_table->constants[op[j]]->u.number;
+ const FLOATVAL f = interp->code->const_table->constants[op[j]].u.number;
Parrot_snprintf(interp, buf, sizeof (buf), FLOATVAL_FMT, f);
strcpy(&dest[size], buf);
size += strlen(buf);
@@ -2331,13 +2331,13 @@
break;
case PARROT_ARG_SC:
dest[size++] = '"';
- if (interp->code->const_table->constants[op[j]]-> u.string->strlen) {
+ if (interp->code->const_table->constants[op[j]].u.string->strlen) {
char * const unescaped =
Parrot_str_to_cstring(interp, interp->code->
- const_table->constants[op[j]]->u.string);
+ const_table->constants[op[j]].u.string);
char * const escaped =
PDB_escape(interp, unescaped, interp->code->const_table->
- constants[op[j]]->u.string->strlen);
+ constants[op[j]].u.string->strlen);
if (escaped) {
strcpy(&dest[size], escaped);
size += strlen(escaped);
@@ -2361,7 +2361,7 @@
break;
case PARROT_ARG_KC:
{
- PMC * k = interp->code->const_table->constants[op[j]]->u.key;
+ PMC * k = interp->code->const_table->constants[op[j]].u.key;
dest[size - 1] = '[';
while (k) {
switch (PObj_get_FLAGS(k)) {
@@ -2465,7 +2465,7 @@
if (specialop > 0) {
char buf[1000];
- PMC * const sig = interp->code->const_table->constants[op[1]]->u.key;
+ PMC * const sig = interp->code->const_table->constants[op[1]].u.key;
const int n_values = VTABLE_elements(interp, sig);
/* The flag_names strings come from Call_bits_enum_t (with which it
should probably be colocated); they name the bits from LSB to MSB.
Modified: branches/dynop_mapping/src/embed.c
==============================================================================
--- branches/dynop_mapping/src/embed.c Mon Aug 9 04:23:47 2010 (r48355)
+++ branches/dynop_mapping/src/embed.c Mon Aug 9 05:50:26 2010 (r48356)
@@ -730,7 +730,7 @@
for (i = 0; i < ft->fixup_count; ++i) {
if (ft->fixups[i].type == enum_fixup_sub) {
const opcode_t ci = ft->fixups[i].offset;
- PMC * const sub_pmc = ct->constants[ci]->u.key;
+ PMC * const sub_pmc = ct->constants[ci].u.key;
Parrot_Sub_attributes *sub;
PMC_get_sub(interp, sub_pmc, sub);
@@ -877,7 +877,7 @@
Parrot_io_fprintf(interp, output, "=head1 Constant-table\n\n");
for (i = 0; i < numconstants; ++i) {
- const PackFile_Constant * const c = interp->code->const_table->constants[i];
+ const PackFile_Constant * const c = &interp->code->const_table->constants[i];
switch (c->type) {
case PFC_NUMBER:
@@ -1024,7 +1024,7 @@
const int filename_const_offset =
interp->code->debugs->mappings[curr_mapping].filename;
Parrot_io_fprintf(interp, output, "# Current Source Filename '%Ss'\n",
- interp->code->const_table->constants[filename_const_offset]->u.string);
+ interp->code->const_table->constants[filename_const_offset].u.string);
++curr_mapping;
}
}
Modified: branches/dynop_mapping/src/hash.c
==============================================================================
--- branches/dynop_mapping/src/hash.c Mon Aug 9 04:23:47 2010 (r48355)
+++ branches/dynop_mapping/src/hash.c Mon Aug 9 05:50:26 2010 (r48356)
@@ -29,8 +29,7 @@
/* the number of entries above which it's faster to hash the hashval instead of
* looping over the used HashBuckets directly */
-#define SMALL_HASH_SIZE 4
-#define INITIAL_BUCKETS 4
+#define INITIAL_BUCKETS 8
/* HEADERIZER HFILE: include/parrot/hash.h */
@@ -50,6 +49,12 @@
__attribute__nonnull__(2)
FUNC_MODIFIES(*hash);
+static UINTVAL get_hash_val(PARROT_INTERP,
+ ARGIN(const Hash *hash),
+ ARGIN_NULLOK(const void *key))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
static void hash_freeze(PARROT_INTERP,
ARGIN(const Hash *hash),
ARGMOD(PMC *info))
@@ -103,6 +108,9 @@
#define ASSERT_ARGS_expand_hash __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(hash))
+#define ASSERT_ARGS_get_hash_val __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(hash))
#define ASSERT_ARGS_hash_freeze __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(hash) \
@@ -156,6 +164,32 @@
/*
+=item C<static UINTVAL get_hash_val(PARROT_INTERP, const Hash *hash, const void
+*key)>
+
+An inlinable helper function to avoid the overhead of calling key_hash_STRING()
+when there's already a calculated hash value for the STRING key.
+
+=cut
+
+*/
+
+static UINTVAL
+get_hash_val(PARROT_INTERP, ARGIN(const Hash *hash), ARGIN_NULLOK(const void *key))
+{
+ ASSERT_ARGS(get_hash_val)
+ if (hash->hash_val == (hash_hash_key_fn)key_hash_STRING) {
+ const STRING * const s = (const STRING *)key;
+ if (s->hashval)
+ return s->hashval;
+ }
+
+ return (hash->hash_val)(interp, key, hash->seed);
+}
+
+
+/*
+
=item C<int STRING_compare(PARROT_INTERP, const void *search_key, const void
*bucket_key)>
@@ -595,8 +629,19 @@
hash->entries = 0;
+ /* special case for great speed */
+ if (key_type == Hash_key_type_STRING
+ && entry_type == enum_hash_int) {
+ for (entry_index = 0; entry_index < num_entries; ++entry_index) {
+ STRING * const key = VTABLE_shift_string(interp, info);
+ const INTVAL i = VTABLE_shift_integer(interp, info);
+ parrot_hash_put(interp, hash, (void *)key, (void *)i);
+ }
+
+ return;
+ }
+
for (entry_index = 0; entry_index < num_entries; ++entry_index) {
- HashBucket *b;
void *key;
switch (key_type) {
@@ -671,12 +716,15 @@
hash_freeze(PARROT_INTERP, ARGIN(const Hash *hash), ARGMOD(PMC *info))
{
ASSERT_ARGS(hash_freeze)
- size_t i;
+ const Hash_key_type key_type = hash->key_type;
+ const PARROT_DATA_TYPE entry_type = hash->entry_type;
+ const size_t entries = hash->entries;
+ size_t i;
- for (i = 0; i < hash->entries; ++i) {
+ for (i = 0; i < entries; ++i) {
HashBucket * const b = hash->buckets + i;
- switch (hash->key_type) {
+ switch (key_type) {
case Hash_key_type_int:
VTABLE_push_integer(interp, info, (INTVAL)b->key);
break;
@@ -692,7 +740,7 @@
break;
}
- switch (hash->entry_type) {
+ switch (entry_type) {
case enum_hash_int:
VTABLE_push_integer(interp, info, (INTVAL)b->value);
break;
@@ -864,7 +912,7 @@
while ((b = *next_p) != NULL) {
/* rehash the bucket */
const size_t new_loc =
- (hash->hash_val)(interp, b->key, hash->seed) & (new_size - 1);
+ get_hash_val(interp, hash, b->key) & (new_size - 1);
if (i != new_loc) {
*next_p = b->next;
@@ -1242,31 +1290,18 @@
if (hash->entries <= 0)
return NULL;
- /* a very fast search for very small hashes */
- if (hash->entries <= SMALL_HASH_SIZE) {
- const UINTVAL entries = hash->entries;
- UINTVAL i;
-
- for (i = 0; i < entries; ++i) {
- HashBucket * const bucket = hash->buckets + i;
-
- /* the hash->compare cost is too high for this fast path */
- if (bucket->key == key)
- return bucket;
- }
- }
-
/* if the fast search didn't work, try the normal hashing search */
{
- const UINTVAL hashval = (hash->hash_val)(interp, key, hash->seed);
+ const UINTVAL hashval = get_hash_val(interp, hash, key);
HashBucket *bucket = hash->bucket_indices[hashval & hash->mask];
+ const hash_comp_fn compare = hash->compare;
while (bucket) {
/* key equality is always a match, so it's worth checking */
if (bucket->key == key
/* ... but the slower comparison is more accurate */
- || ((hash->compare)(interp, key, bucket->key) == 0))
+ || ((compare)(interp, key, bucket->key) == 0))
return bucket;
bucket = bucket->next;
}
@@ -1339,8 +1374,9 @@
ARGIN_NULLOK(void *key), ARGIN_NULLOK(void *value))
{
ASSERT_ARGS(parrot_hash_put)
- const UINTVAL hashval = (hash->hash_val)(interp, key, hash->seed);
+ const UINTVAL hashval = get_hash_val(interp, hash, key);
HashBucket *bucket = hash->bucket_indices[hashval & hash->mask];
+ const hash_comp_fn compare = hash->compare;
/* When the hash is constant, check that the key and value are also
* constant. */
@@ -1360,7 +1396,7 @@
/* See if we have an existing value for this key */
while (bucket) {
/* store hash_val or not */
- if ((hash->compare)(interp, key, bucket->key) == 0)
+ if ((compare)(interp, key, bucket->key) == 0)
break;
bucket = bucket->next;
}
@@ -1406,27 +1442,21 @@
parrot_hash_delete(PARROT_INTERP, ARGMOD(Hash *hash), ARGIN(void *key))
{
ASSERT_ARGS(parrot_hash_delete)
- HashBucket *bucket;
- HashBucket *prev = NULL;
const UINTVAL hashval = (hash->hash_val)(interp, key, hash->seed) & hash->mask;
-
- for (bucket = hash->bucket_indices[hashval]; bucket; bucket = bucket->next) {
- if ((hash->compare)(interp, key, bucket->key) == 0) {
-
- if (prev)
- prev->next = bucket->next;
- else
- hash->bucket_indices[hashval] = bucket->next;
-
- --hash->entries;
- bucket->next = hash->free_list;
- bucket->key = NULL;
- hash->free_list = bucket;
-
- return;
+ HashBucket **prev = &hash->bucket_indices[hashval];
+ if (*prev) {
+ const hash_comp_fn compare = hash->compare;
+ for (; *prev; prev = &(*prev)->next) {
+ HashBucket *current = *prev;
+ if ((compare)(interp, key, current->key) == 0) {
+ *prev = current->next;
+ --hash->entries;
+ current->next = hash->free_list;
+ current->key = NULL;
+ hash->free_list = current;
+ return;
+ }
}
-
- prev = bucket;
}
}
Modified: branches/dynop_mapping/src/ops/core_ops.c
==============================================================================
--- branches/dynop_mapping/src/ops/core_ops.c Mon Aug 9 04:23:47 2010 (r48355)
+++ branches/dynop_mapping/src/ops/core_ops.c Mon Aug 9 05:50:26 2010 (r48356)
@@ -15296,7 +15296,7 @@
opcode_t *
Parrot_load_bytecode_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- Parrot_load_bytecode(interp, CONST(1)->u.string);
+ Parrot_load_bytecode(interp, CONST(1).u.string);
return (opcode_t *)cur_opcode + 2;}
@@ -15310,7 +15310,7 @@
opcode_t *
Parrot_load_language_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- Parrot_load_language(interp, CONST(1)->u.string);
+ Parrot_load_language(interp, CONST(1).u.string);
return (opcode_t *)cur_opcode + 2;}
@@ -15541,7 +15541,7 @@
Parrot_set_args_pc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
opcode_t * const raw_args = CUR_OPCODE;
- PMC * const signature = CONST(1)->u.key;
+ PMC * const signature = CONST(1).u.key;
PMC * const call_sig = Parrot_pcc_build_sig_object_from_op(interp,
PMCNULL, signature, raw_args);
const INTVAL argc = VTABLE_elements(interp, signature);
@@ -15552,7 +15552,7 @@
Parrot_get_params_pc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
opcode_t * const raw_params = CUR_OPCODE;
- PMC * const signature = CONST(1)->u.key;
+ PMC * const signature = CONST(1).u.key;
PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const ccont = Parrot_pcc_get_continuation(interp, ctx);
PMC * const caller_ctx = Parrot_pcc_get_caller_ctx(interp, ctx);
@@ -15575,7 +15575,7 @@
Parrot_set_returns_pc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
opcode_t * const raw_args = CUR_OPCODE;
- PMC * const signature = CONST(1)->u.key;
+ PMC * const signature = CONST(1).u.key;
PMC * const call_sig = Parrot_pcc_build_sig_object_from_op(interp,
Parrot_pcc_get_signature(interp,
Parrot_pcc_get_caller_ctx(interp, CURRENT_CONTEXT(interp))),
@@ -15591,7 +15591,7 @@
Parrot_get_results_pc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
opcode_t * const raw_params = CUR_OPCODE;
- PMC * const signature = CONST(1)->u.key;
+ PMC * const signature = CONST(1).u.key;
PMC *ctx = CURRENT_CONTEXT(interp);
PMC *ccont = Parrot_pcc_get_continuation(interp, ctx);
PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
@@ -15623,7 +15623,7 @@
VTABLE_set_attr_str(interp, ctx,
Parrot_str_new_constant(interp, "return_flags"),
- CONST(1)->u.key);
+ CONST(1).u.key);
return (opcode_t *)cur_opcode + 2;}
@@ -15786,7 +15786,7 @@
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);
+ CONTROL_ERROR, CONST(1).u.string);
VTABLE_set_pointer(interp, resume, ret);
@@ -15818,7 +15818,7 @@
opcode_t *dest;
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);
+ STRING * const msg = PMC_IS_NULL(CONST(1).u.key) ? NULL : VTABLE_get_string(interp, CONST(1).u.key);
PMC * const exception =
Parrot_ex_build_exception(interp, EXCEPT_error, CONTROL_ERROR, msg);
@@ -16176,7 +16176,7 @@
opcode_t *
Parrot_loadlib_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = Parrot_load_lib(interp, CONST(2)->u.string, NULL);
+ PREG(1) = Parrot_load_lib(interp, CONST(2).u.string, NULL);
return (opcode_t *)cur_opcode + 3;}
@@ -16190,21 +16190,21 @@
opcode_t *
Parrot_loadlib_p_sc_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = Parrot_load_lib(interp, CONST(2)->u.string, PREG(3));
+ PREG(1) = Parrot_load_lib(interp, CONST(2).u.string, PREG(3));
return (opcode_t *)cur_opcode + 4;}
opcode_t *
Parrot_loadlib_p_s_pc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = Parrot_load_lib(interp, SREG(2), CONST(3)->u.key);
+ PREG(1) = Parrot_load_lib(interp, SREG(2), CONST(3).u.key);
return (opcode_t *)cur_opcode + 4;}
opcode_t *
Parrot_loadlib_p_sc_pc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = Parrot_load_lib(interp, CONST(2)->u.string, CONST(3)->u.key);
+ PREG(1) = Parrot_load_lib(interp, CONST(2).u.string, CONST(3).u.key);
return (opcode_t *)cur_opcode + 4;}
@@ -16250,13 +16250,13 @@
dl_handle = ((Parrot_ParrotLibrary_attributes*)PMC_data(PREG(2)))->dl_handle;
}
- ptr = Parrot_dlsym_str(interp, dl_handle, CONST(3)->u.string);
+ ptr = Parrot_dlsym_str(interp, dl_handle, CONST(3).u.string);
p = D2FPTR(ptr);
if (p == NULLfunc) {
const char * err = Parrot_dlerror();
Parrot_warn(interp, PARROT_WARNINGS_UNDEF_FLAG,
- "Symbol '%Ss' not found: %s\n", CONST(3)->u.string, err ? err : "unknown reason");
+ "Symbol '%Ss' not found: %s\n", CONST(3).u.string, err ? err : "unknown reason");
PREG(1) = Parrot_pmc_new(interp, enum_class_Undef);
}
else {
@@ -16290,7 +16290,7 @@
}
else {
PREG(1) = Parrot_pmc_new(interp, enum_class_NCI);
- VTABLE_set_pointer_keyed_str(interp, PREG(1), CONST(4)->u.string, F2DPTR(p));
+ VTABLE_set_pointer_keyed_str(interp, PREG(1), CONST(4).u.string, F2DPTR(p));
}
return (opcode_t *)cur_opcode + 5;}
@@ -16308,18 +16308,18 @@
dl_handle = ((Parrot_ParrotLibrary_attributes*)PMC_data(PREG(2)))->dl_handle;
}
- ptr = Parrot_dlsym_str(interp, dl_handle, CONST(3)->u.string);
+ ptr = Parrot_dlsym_str(interp, dl_handle, CONST(3).u.string);
p = D2FPTR(ptr);
if (p == NULLfunc) {
const char * err = Parrot_dlerror();
Parrot_warn(interp, PARROT_WARNINGS_UNDEF_FLAG,
- "Symbol '%Ss' not found: %s\n", CONST(3)->u.string, err ? err : "unknown reason");
+ "Symbol '%Ss' not found: %s\n", CONST(3).u.string, err ? err : "unknown reason");
PREG(1) = Parrot_pmc_new(interp, enum_class_Undef);
}
else {
PREG(1) = Parrot_pmc_new(interp, enum_class_NCI);
- VTABLE_set_pointer_keyed_str(interp, PREG(1), CONST(4)->u.string, F2DPTR(p));
+ VTABLE_set_pointer_keyed_str(interp, PREG(1), CONST(4).u.string, F2DPTR(p));
}
return (opcode_t *)cur_opcode + 5;}
@@ -16365,12 +16365,12 @@
dl_handle = ((Parrot_ParrotLibrary_attributes*)PMC_data(PREG(2)))->dl_handle;
}
- p = Parrot_dlsym_str(interp, dl_handle, CONST(3)->u.string);
+ p = Parrot_dlsym_str(interp, dl_handle, CONST(3).u.string);
if (p == NULL) {
const char * const err = Parrot_dlerror();
Parrot_warn(interp, PARROT_WARNINGS_UNDEF_FLAG,
- "Symbol '%Ss' not found: %s\n", CONST(3)->u.string, err ? err : "unknown reason");
+ "Symbol '%Ss' not found: %s\n", CONST(3).u.string, err ? err : "unknown reason");
PREG(1) = Parrot_pmc_new(interp, enum_class_Undef);
}
else {
@@ -16396,7 +16396,7 @@
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const compreg_hash = VTABLE_get_pmc_keyed_int(interp,
interp->iglobals, IGLOBALS_COMPREG_HASH);
- VTABLE_set_pmc_keyed_str(interp, compreg_hash, CONST(1)->u.string, PREG(2));
+ VTABLE_set_pmc_keyed_str(interp, compreg_hash, CONST(1).u.string, PREG(2));
return (opcode_t *)cur_opcode + 3;}
@@ -16414,7 +16414,7 @@
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const compreg_hash = VTABLE_get_pmc_keyed_int(interp,
interp->iglobals, IGLOBALS_COMPREG_HASH);
- PREG(1) = VTABLE_get_pmc_keyed_str(interp, compreg_hash, CONST(2)->u.string);
+ PREG(1) = VTABLE_get_pmc_keyed_str(interp, compreg_hash, CONST(2).u.string);
return (opcode_t *)cur_opcode + 3;}
@@ -16428,7 +16428,7 @@
opcode_t *
Parrot_new_callback_p_p_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = Parrot_make_cb(interp, PREG(2), PREG(3), CONST(4)->u.string);
+ PREG(1) = Parrot_make_cb(interp, PREG(2), PREG(3), CONST(4).u.string);
return (opcode_t *)cur_opcode + 5;}
@@ -16466,7 +16466,7 @@
if (interp->code->annotations) {
const opcode_t cur_pos = ( cur_opcode + 3) - interp->code->base.data;
PREG(1) = PackFile_Annotations_lookup(interp, interp->code->annotations,
- cur_pos, CONST(2)->u.string);
+ cur_pos, CONST(2).u.string);
}
else {
PREG(1) = PMCNULL;
@@ -16728,7 +16728,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;}
@@ -16736,7 +16736,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;}
@@ -16752,7 +16752,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;}
@@ -16760,7 +16760,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;}
@@ -16824,7 +16824,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;}
@@ -16840,7 +16840,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;}
@@ -16872,7 +16872,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;}
@@ -16880,7 +16880,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;}
@@ -16888,7 +16888,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;}
@@ -16936,7 +16936,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;}
@@ -16944,7 +16944,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;}
@@ -16960,7 +16960,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;}
@@ -16968,7 +16968,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;}
@@ -17020,7 +17020,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;}
@@ -17036,7 +17036,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;}
@@ -17068,7 +17068,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;}
@@ -17076,7 +17076,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;}
@@ -17084,7 +17084,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;}
@@ -17132,7 +17132,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;}
@@ -17140,7 +17140,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;}
@@ -17156,7 +17156,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;}
@@ -17164,7 +17164,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;}
@@ -17216,7 +17216,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;}
@@ -17232,7 +17232,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;}
@@ -17288,7 +17288,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;}
@@ -17296,7 +17296,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;}
@@ -17312,7 +17312,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;}
@@ -17320,7 +17320,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;}
@@ -17372,7 +17372,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;}
@@ -17388,7 +17388,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;}
@@ -17456,7 +17456,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;}
@@ -17472,7 +17472,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;}
@@ -17540,7 +17540,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;}
@@ -17556,7 +17556,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;}
@@ -17648,8 +17648,8 @@
opcode_t *
Parrot_cmp_i_nc_n(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = CONST(2)->u.number < NREG(3) ? -1 :
- CONST(2)->u.number > NREG(3) ? +1 :
+ IREG(1) = CONST(2).u.number < NREG(3) ? -1 :
+ CONST(2).u.number > NREG(3) ? +1 :
0;
return (opcode_t *)cur_opcode + 4;}
@@ -17657,8 +17657,8 @@
opcode_t *
Parrot_cmp_i_n_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = NREG(2) < CONST(3)->u.number ? -1 :
- NREG(2) > CONST(3)->u.number ? +1 :
+ IREG(1) = NREG(2) < CONST(3).u.number ? -1 :
+ NREG(2) > CONST(3).u.number ? +1 :
0;
return (opcode_t *)cur_opcode + 4;}
@@ -17673,14 +17673,14 @@
opcode_t *
Parrot_cmp_i_sc_s(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = Parrot_str_compare(interp, CONST(2)->u.string, SREG(3));
+ IREG(1) = Parrot_str_compare(interp, CONST(2).u.string, SREG(3));
return (opcode_t *)cur_opcode + 4;}
opcode_t *
Parrot_cmp_i_s_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = Parrot_str_compare(interp, SREG(2), CONST(3)->u.string);
+ IREG(1) = Parrot_str_compare(interp, SREG(2), CONST(3).u.string);
return (opcode_t *)cur_opcode + 4;}
@@ -17725,8 +17725,8 @@
Parrot_cmp_i_p_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
const FLOATVAL l = VTABLE_get_number(interp, PREG(2));
- IREG(1) = l < CONST(3)->u.number ? -1 :
- l > CONST(3)->u.number ? +1 :
+ IREG(1) = l < CONST(3).u.number ? -1 :
+ l > CONST(3).u.number ? +1 :
0;
return (opcode_t *)cur_opcode + 4;}
@@ -17743,7 +17743,7 @@
Parrot_cmp_i_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
STRING* const l = VTABLE_get_string(interp, PREG(2));
- IREG(1) = Parrot_str_compare(interp, l, CONST(3)->u.string);
+ IREG(1) = Parrot_str_compare(interp, l, CONST(3).u.string);
return (opcode_t *)cur_opcode + 4;}
@@ -17788,21 +17788,21 @@
opcode_t *
Parrot_issame_i_sc_s(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = CONST(2)->u.string == SREG(3);
+ IREG(1) = CONST(2).u.string == SREG(3);
return (opcode_t *)cur_opcode + 4;}
opcode_t *
Parrot_issame_i_s_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = SREG(2) == CONST(3)->u.string;
+ IREG(1) = SREG(2) == CONST(3).u.string;
return (opcode_t *)cur_opcode + 4;}
opcode_t *
Parrot_issame_i_sc_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = CONST(2)->u.string == CONST(3)->u.string;
+ IREG(1) = CONST(2).u.string == CONST(3).u.string;
return (opcode_t *)cur_opcode + 4;}
@@ -17826,21 +17826,21 @@
opcode_t *
Parrot_isntsame_i_sc_s(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = CONST(2)->u.string != SREG(3);
+ IREG(1) = CONST(2).u.string != SREG(3);
return (opcode_t *)cur_opcode + 4;}
opcode_t *
Parrot_isntsame_i_s_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = SREG(2) != CONST(3)->u.string;
+ IREG(1) = SREG(2) != CONST(3).u.string;
return (opcode_t *)cur_opcode + 4;}
opcode_t *
Parrot_isntsame_i_sc_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = CONST(2)->u.string != CONST(3)->u.string;
+ IREG(1) = CONST(2).u.string != CONST(3).u.string;
return (opcode_t *)cur_opcode + 4;}
@@ -17868,7 +17868,7 @@
opcode_t *
Parrot_isnull_i_pc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = PMC_IS_NULL(CONST(2)->u.key);
+ IREG(1) = PMC_IS_NULL(CONST(2).u.key);
return (opcode_t *)cur_opcode + 3;}
@@ -17882,7 +17882,7 @@
opcode_t *
Parrot_isnull_i_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = STRING_IS_NULL(CONST(2)->u.string);
+ IREG(1) = STRING_IS_NULL(CONST(2).u.string);
return (opcode_t *)cur_opcode + 3;}
@@ -17931,14 +17931,14 @@
opcode_t *
Parrot_isle_i_nc_n(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = CONST(2)->u.number <= NREG(3);
+ IREG(1) = CONST(2).u.number <= NREG(3);
return (opcode_t *)cur_opcode + 4;}
opcode_t *
Parrot_isle_i_n_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = NREG(2) <= CONST(3)->u.number;
+ IREG(1) = NREG(2) <= CONST(3).u.number;
return (opcode_t *)cur_opcode + 4;}
@@ -17952,14 +17952,14 @@
opcode_t *
Parrot_isle_i_sc_s(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = Parrot_str_compare(interp, CONST(2)->u.string, SREG(3)) <= 0;
+ IREG(1) = Parrot_str_compare(interp, CONST(2).u.string, SREG(3)) <= 0;
return (opcode_t *)cur_opcode + 4;}
opcode_t *
Parrot_isle_i_s_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = Parrot_str_compare(interp, SREG(2), CONST(3)->u.string) <= 0;
+ IREG(1) = Parrot_str_compare(interp, SREG(2), CONST(3).u.string) <= 0;
return (opcode_t *)cur_opcode + 4;}
@@ -18001,14 +18001,14 @@
opcode_t *
Parrot_islt_i_nc_n(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = CONST(2)->u.number < NREG(3);
+ IREG(1) = CONST(2).u.number < NREG(3);
return (opcode_t *)cur_opcode + 4;}
opcode_t *
Parrot_islt_i_n_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = NREG(2) < CONST(3)->u.number;
+ IREG(1) = NREG(2) < CONST(3).u.number;
return (opcode_t *)cur_opcode + 4;}
@@ -18022,14 +18022,14 @@
opcode_t *
Parrot_islt_i_sc_s(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = Parrot_str_compare(interp, CONST(2)->u.string, SREG(3)) < 0;
+ IREG(1) = Parrot_str_compare(interp, CONST(2).u.string, SREG(3)) < 0;
return (opcode_t *)cur_opcode + 4;}
opcode_t *
Parrot_islt_i_s_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = Parrot_str_compare(interp, SREG(2), CONST(3)->u.string) < 0;
+ IREG(1) = Parrot_str_compare(interp, SREG(2), CONST(3).u.string) < 0;
return (opcode_t *)cur_opcode + 4;}
@@ -18071,14 +18071,14 @@
opcode_t *
Parrot_iseq_i_nc_n(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = CONST(2)->u.number == NREG(3);
+ IREG(1) = CONST(2).u.number == NREG(3);
return (opcode_t *)cur_opcode + 4;}
opcode_t *
Parrot_iseq_i_n_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = NREG(2) == CONST(3)->u.number;
+ IREG(1) = NREG(2) == CONST(3).u.number;
return (opcode_t *)cur_opcode + 4;}
@@ -18092,14 +18092,14 @@
opcode_t *
Parrot_iseq_i_sc_s(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = (Parrot_str_equal(interp, CONST(2)->u.string, SREG(3)) ? 1 : 0);
+ IREG(1) = (Parrot_str_equal(interp, CONST(2).u.string, SREG(3)) ? 1 : 0);
return (opcode_t *)cur_opcode + 4;}
opcode_t *
Parrot_iseq_i_s_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = (Parrot_str_equal(interp, SREG(2), CONST(3)->u.string) ? 1 : 0);
+ IREG(1) = (Parrot_str_equal(interp, SREG(2), CONST(3).u.string) ? 1 : 0);
return (opcode_t *)cur_opcode + 4;}
@@ -18144,14 +18144,14 @@
opcode_t *
Parrot_isne_i_nc_n(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = CONST(2)->u.number != NREG(3);
+ IREG(1) = CONST(2).u.number != NREG(3);
return (opcode_t *)cur_opcode + 4;}
opcode_t *
Parrot_isne_i_n_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = NREG(2) != CONST(3)->u.number;
+ IREG(1) = NREG(2) != CONST(3).u.number;
return (opcode_t *)cur_opcode + 4;}
@@ -18165,14 +18165,14 @@
opcode_t *
Parrot_isne_i_sc_s(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = (Parrot_str_not_equal(interp, CONST(2)->u.string, SREG(3)) ? 1 : 0);
+ IREG(1) = (Parrot_str_not_equal(interp, CONST(2).u.string, SREG(3)) ? 1 : 0);
return (opcode_t *)cur_opcode + 4;}
opcode_t *
Parrot_isne_i_s_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = (Parrot_str_not_equal(interp, SREG(2), CONST(3)->u.string) ? 1 : 0);
+ IREG(1) = (Parrot_str_not_equal(interp, SREG(2), CONST(3).u.string) ? 1 : 0);
return (opcode_t *)cur_opcode + 4;}
@@ -18333,14 +18333,14 @@
Parrot_print_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
#ifdef PARROT_HAS_NEGATIVE_ZERO
- Parrot_io_printf(interp, FLOATVAL_FMT, CONST(1)->u.number);
+ Parrot_io_printf(interp, FLOATVAL_FMT, CONST(1).u.number);
#else
/* Workaround for older msvcrt and openbsd. TT #313 */
- if (Parrot_is_nzero(CONST(1)->u.number)) {
+ if (Parrot_is_nzero(CONST(1).u.number)) {
Parrot_io_printf(interp, "-0");
}
else {
- Parrot_io_printf(interp, FLOATVAL_FMT, CONST(1)->u.number);
+ Parrot_io_printf(interp, FLOATVAL_FMT, CONST(1).u.number);
}
#endif
@@ -18358,7 +18358,7 @@
opcode_t *
Parrot_print_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- STRING * const s = CONST(1)->u.string;
+ STRING * const s = CONST(1).u.string;
if (s && Parrot_str_byte_length(interp, s))
Parrot_io_putps(interp, _PIO_STDOUT(interp), s);
@@ -18409,14 +18409,14 @@
Parrot_say_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
#ifdef PARROT_HAS_NEGATIVE_ZERO
- Parrot_io_printf(interp, FLOATVAL_FMT "\n", CONST(1)->u.number);
+ Parrot_io_printf(interp, FLOATVAL_FMT "\n", CONST(1).u.number);
#else
/* Workaround for older msvcrt and openbsd. TT #313 */
- if (Parrot_is_nzero(CONST(1)->u.number)) {
+ if (Parrot_is_nzero(CONST(1).u.number)) {
Parrot_io_printf(interp, "-0\n");
}
else {
- Parrot_io_printf(interp, FLOATVAL_FMT "\n", CONST(1)->u.number);
+ Parrot_io_printf(interp, FLOATVAL_FMT "\n", CONST(1).u.number);
}
#endif
@@ -18435,7 +18435,7 @@
opcode_t *
Parrot_say_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- STRING * const s = CONST(1)->u.string;
+ STRING * const s = CONST(1).u.string;
if (s && Parrot_str_byte_length(interp, s))
Parrot_io_putps(interp, _PIO_STDOUT(interp), s);
Parrot_io_putps(interp, _PIO_STDOUT(interp), Parrot_str_new_constant(interp, "\n"));
@@ -18495,7 +18495,7 @@
Parrot_print_p_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
if (PREG(1)) {
- STRING * const s = Parrot_sprintf_c(interp, FLOATVAL_FMT, CONST(2)->u.number);
+ STRING * const s = Parrot_sprintf_c(interp, FLOATVAL_FMT, CONST(2).u.number);
Parrot_io_putps(interp, PREG(1), s);
}
@@ -18513,8 +18513,8 @@
opcode_t *
Parrot_print_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (CONST(2)->u.string && PREG(1)) {
- Parrot_io_putps(interp, PREG(1), CONST(2)->u.string);
+ if (CONST(2).u.string && PREG(1)) {
+ Parrot_io_putps(interp, PREG(1), CONST(2).u.string);
}
return (opcode_t *)cur_opcode + 3;}
@@ -18616,7 +18616,7 @@
opcode_t *
Parrot_add_n_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- NREG(1) += CONST(2)->u.number;
+ NREG(1) += CONST(2).u.number;
return (opcode_t *)cur_opcode + 3;}
@@ -18651,7 +18651,7 @@
opcode_t *
Parrot_add_p_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- VTABLE_i_add_float(interp, PREG(1), CONST(2)->u.number);
+ VTABLE_i_add_float(interp, PREG(1), CONST(2).u.number);
return (opcode_t *)cur_opcode + 3;}
@@ -18686,14 +18686,14 @@
opcode_t *
Parrot_add_n_nc_n(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- NREG(1) = CONST(2)->u.number + NREG(3);
+ NREG(1) = CONST(2).u.number + NREG(3);
return (opcode_t *)cur_opcode + 4;}
opcode_t *
Parrot_add_n_n_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- NREG(1) = NREG(2) + CONST(3)->u.number;
+ NREG(1) = NREG(2) + CONST(3).u.number;
return (opcode_t *)cur_opcode + 4;}
@@ -18728,7 +18728,7 @@
opcode_t *
Parrot_add_p_p_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_add_float(interp, PREG(2), CONST(3)->u.number, PREG(1));
+ PREG(1) = VTABLE_add_float(interp, PREG(2), CONST(3).u.number, PREG(1));
return (opcode_t *)cur_opcode + 4;}
@@ -18795,7 +18795,7 @@
opcode_t *
Parrot_div_n_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- FLOATVAL den = CONST(2)->u.number;
+ FLOATVAL den = CONST(2).u.number;
if (FLOAT_IS_ZERO(den)) {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, cur_opcode + 3,
EXCEPTION_DIV_BY_ZERO,
@@ -18836,7 +18836,7 @@
opcode_t *
Parrot_div_p_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- VTABLE_i_divide_float(interp, PREG(1), CONST(2)->u.number);
+ VTABLE_i_divide_float(interp, PREG(1), CONST(2).u.number);
return (opcode_t *)cur_opcode + 3;}
@@ -18914,14 +18914,14 @@
EXCEPTION_DIV_BY_ZERO,
"Divide by zero");return (opcode_t *)handler;
}
- NREG(1) = CONST(2)->u.number / den;
+ NREG(1) = CONST(2).u.number / den;
return (opcode_t *)cur_opcode + 4;}
opcode_t *
Parrot_div_n_n_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- FLOATVAL den = CONST(3)->u.number;
+ FLOATVAL den = CONST(3).u.number;
if (FLOAT_IS_ZERO(den)) {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4,
EXCEPTION_DIV_BY_ZERO,
@@ -18934,13 +18934,13 @@
opcode_t *
Parrot_div_n_nc_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- FLOATVAL den = CONST(3)->u.number;
+ FLOATVAL den = CONST(3).u.number;
if (FLOAT_IS_ZERO(den)) {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4,
EXCEPTION_DIV_BY_ZERO,
"Divide by zero");return (opcode_t *)handler;
}
- NREG(1) = CONST(2)->u.number / den;
+ NREG(1) = CONST(2).u.number / den;
return (opcode_t *)cur_opcode + 4;}
@@ -18975,7 +18975,7 @@
opcode_t *
Parrot_div_p_p_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_divide_float(interp, PREG(2), CONST(3)->u.number, PREG(1));
+ PREG(1) = VTABLE_divide_float(interp, PREG(2), CONST(3).u.number, PREG(1));
return (opcode_t *)cur_opcode + 4;}
@@ -19029,7 +19029,7 @@
opcode_t *
Parrot_fdiv_n_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- FLOATVAL den = CONST(2)->u.number;
+ FLOATVAL den = CONST(2).u.number;
if (FLOAT_IS_ZERO(den)) {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, cur_opcode + 3,
EXCEPTION_DIV_BY_ZERO,
@@ -19070,7 +19070,7 @@
opcode_t *
Parrot_fdiv_p_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- VTABLE_i_floor_divide_float(interp, PREG(1), CONST(2)->u.number);
+ VTABLE_i_floor_divide_float(interp, PREG(1), CONST(2).u.number);
return (opcode_t *)cur_opcode + 3;}
@@ -19147,14 +19147,14 @@
EXCEPTION_DIV_BY_ZERO,
"Divide by zero");return (opcode_t *)handler;
}
- NREG(1) = floor(CONST(2)->u.number / den);
+ NREG(1) = floor(CONST(2).u.number / den);
return (opcode_t *)cur_opcode + 4;}
opcode_t *
Parrot_fdiv_n_n_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- FLOATVAL den = CONST(3)->u.number;
+ FLOATVAL den = CONST(3).u.number;
if (FLOAT_IS_ZERO(den)) {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4,
EXCEPTION_DIV_BY_ZERO,
@@ -19195,7 +19195,7 @@
opcode_t *
Parrot_fdiv_p_p_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_floor_divide_float(interp, PREG(2), CONST(3)->u.number, PREG(1));
+ PREG(1) = VTABLE_floor_divide_float(interp, PREG(2), CONST(3).u.number, PREG(1));
return (opcode_t *)cur_opcode + 4;}
@@ -19288,7 +19288,7 @@
opcode_t *
Parrot_mod_n_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- NREG(1) = floatval_mod(NREG(1), CONST(2)->u.number);
+ NREG(1) = floatval_mod(NREG(1), CONST(2).u.number);
return (opcode_t *)cur_opcode + 3;}
@@ -19323,7 +19323,7 @@
opcode_t *
Parrot_mod_p_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- VTABLE_i_modulus_float(interp, PREG(1), CONST(2)->u.number);
+ VTABLE_i_modulus_float(interp, PREG(1), CONST(2).u.number);
return (opcode_t *)cur_opcode + 3;}
@@ -19358,14 +19358,14 @@
opcode_t *
Parrot_mod_n_nc_n(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- NREG(1) = floatval_mod(CONST(2)->u.number, NREG(3));
+ NREG(1) = floatval_mod(CONST(2).u.number, NREG(3));
return (opcode_t *)cur_opcode + 4;}
opcode_t *
Parrot_mod_n_n_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- NREG(1) = floatval_mod(NREG(2), CONST(3)->u.number);
+ NREG(1) = floatval_mod(NREG(2), CONST(3).u.number);
return (opcode_t *)cur_opcode + 4;}
@@ -19400,7 +19400,7 @@
opcode_t *
Parrot_mod_p_p_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_modulus_float(interp, PREG(2), CONST(3)->u.number, PREG(1));
+ PREG(1) = VTABLE_modulus_float(interp, PREG(2), CONST(3).u.number, PREG(1));
return (opcode_t *)cur_opcode + 4;}
@@ -19428,7 +19428,7 @@
opcode_t *
Parrot_mul_n_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- NREG(1) *= CONST(2)->u.number;
+ NREG(1) *= CONST(2).u.number;
return (opcode_t *)cur_opcode + 3;}
@@ -19463,7 +19463,7 @@
opcode_t *
Parrot_mul_p_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- VTABLE_i_multiply_float(interp, PREG(1), CONST(2)->u.number);
+ VTABLE_i_multiply_float(interp, PREG(1), CONST(2).u.number);
return (opcode_t *)cur_opcode + 3;}
@@ -19498,14 +19498,14 @@
opcode_t *
Parrot_mul_n_nc_n(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- NREG(1) = CONST(2)->u.number * NREG(3);
+ NREG(1) = CONST(2).u.number * NREG(3);
return (opcode_t *)cur_opcode + 4;}
opcode_t *
Parrot_mul_n_n_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- NREG(1) = NREG(2) * CONST(3)->u.number;
+ NREG(1) = NREG(2) * CONST(3).u.number;
return (opcode_t *)cur_opcode + 4;}
@@ -19540,7 +19540,7 @@
opcode_t *
Parrot_mul_p_p_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_multiply_float(interp, PREG(2), CONST(3)->u.number, PREG(1));
+ PREG(1) = VTABLE_multiply_float(interp, PREG(2), CONST(3).u.number, PREG(1));
return (opcode_t *)cur_opcode + 4;}
@@ -19610,7 +19610,7 @@
opcode_t *
Parrot_sub_n_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- NREG(1) -= CONST(2)->u.number;
+ NREG(1) -= CONST(2).u.number;
return (opcode_t *)cur_opcode + 3;}
@@ -19645,7 +19645,7 @@
opcode_t *
Parrot_sub_p_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- VTABLE_i_subtract_float(interp, PREG(1), CONST(2)->u.number);
+ VTABLE_i_subtract_float(interp, PREG(1), CONST(2).u.number);
return (opcode_t *)cur_opcode + 3;}
@@ -19680,14 +19680,14 @@
opcode_t *
Parrot_sub_n_nc_n(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- NREG(1) = CONST(2)->u.number - NREG(3);
+ NREG(1) = CONST(2).u.number - NREG(3);
return (opcode_t *)cur_opcode + 4;}
opcode_t *
Parrot_sub_n_n_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- NREG(1) = NREG(2) - CONST(3)->u.number;
+ NREG(1) = NREG(2) - CONST(3).u.number;
return (opcode_t *)cur_opcode + 4;}
@@ -19722,7 +19722,7 @@
opcode_t *
Parrot_sub_p_p_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_subtract_float(interp, PREG(2), CONST(3)->u.number, PREG(1));
+ PREG(1) = VTABLE_subtract_float(interp, PREG(2), CONST(3).u.number, PREG(1));
return (opcode_t *)cur_opcode + 4;}
@@ -19774,7 +19774,7 @@
Parrot_callmethodcc_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
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;
+ STRING * const meth = CONST(2).u.string;
opcode_t * const next = cur_opcode + 3;
PMC * const method_pmc = VTABLE_find_method(interp, object, meth);
@@ -19854,7 +19854,7 @@
Parrot_callmethod_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 object = PREG(1);
- STRING * const meth = CONST(2)->u.string;
+ STRING * const meth = CONST(2).u.string;
opcode_t * const next = cur_opcode + 4;
PMC * const method_pmc = VTABLE_find_method(interp, object, meth);
@@ -19927,7 +19927,7 @@
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
opcode_t * const next = cur_opcode + 3;
PMC * const object = PREG(1);
- STRING * const meth = CONST(2)->u.string;
+ STRING * const meth = CONST(2).u.string;
PMC * const method_pmc = VTABLE_find_method(interp, object, meth);
opcode_t *dest;
@@ -19977,7 +19977,7 @@
opcode_t *
Parrot_addmethod_p_sc_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- VTABLE_add_method(interp, PREG(1), CONST(2)->u.string, PREG(3));
+ VTABLE_add_method(interp, PREG(1), CONST(2).u.string, PREG(3));
return (opcode_t *)cur_opcode + 4;}
@@ -19991,7 +19991,7 @@
opcode_t *
Parrot_can_i_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = VTABLE_can(interp, PREG(2), CONST(3)->u.string);
+ IREG(1) = VTABLE_can(interp, PREG(2), CONST(3).u.string);
return (opcode_t *)cur_opcode + 4;}
@@ -20005,7 +20005,7 @@
opcode_t *
Parrot_does_i_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = CONST(3)->u.string ? VTABLE_does(interp, PREG(2), CONST(3)->u.string) : 0;
+ IREG(1) = CONST(3).u.string ? VTABLE_does(interp, PREG(2), CONST(3).u.string) : 0;
return (opcode_t *)cur_opcode + 4;}
@@ -20019,7 +20019,7 @@
opcode_t *
Parrot_does_i_p_pc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = CONST(3)->u.key ? VTABLE_does_pmc(interp, PREG(2), CONST(3)->u.key) : 0;
+ IREG(1) = CONST(3).u.key ? VTABLE_does_pmc(interp, PREG(2), CONST(3).u.key) : 0;
return (opcode_t *)cur_opcode + 4;}
@@ -20033,7 +20033,7 @@
opcode_t *
Parrot_isa_i_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = CONST(3)->u.string ? VTABLE_isa(interp, PREG(2), CONST(3)->u.string) : 0;
+ IREG(1) = CONST(3).u.string ? VTABLE_isa(interp, PREG(2), CONST(3).u.string) : 0;
return (opcode_t *)cur_opcode + 4;}
@@ -20047,7 +20047,7 @@
opcode_t *
Parrot_isa_i_p_pc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = CONST(3)->u.key ? VTABLE_isa_pmc(interp, PREG(2), CONST(3)->u.key) : 0;
+ IREG(1) = CONST(3).u.key ? VTABLE_isa_pmc(interp, PREG(2), CONST(3).u.key) : 0;
return (opcode_t *)cur_opcode + 4;}
@@ -20064,7 +20064,7 @@
Parrot_newclass_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const name = Parrot_pmc_new(interp, enum_class_String);
- VTABLE_set_string_native(interp, name, CONST(2)->u.string);
+ VTABLE_set_string_native(interp, name, CONST(2).u.string);
PREG(1) = Parrot_pmc_new_init(interp, enum_class_Class, name);
return (opcode_t *)cur_opcode + 3;}
@@ -20079,7 +20079,7 @@
opcode_t *
Parrot_newclass_p_pc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = Parrot_pmc_new_init(interp, enum_class_Class, CONST(2)->u.key);
+ PREG(1) = Parrot_pmc_new_init(interp, enum_class_Class, CONST(2).u.key);
return (opcode_t *)cur_opcode + 3;}
@@ -20101,13 +20101,13 @@
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);
+ PMC * const parent_class = Parrot_oo_get_class(interp, CONST(2).u.key);
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;
@@ -20131,13 +20131,13 @@
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);
+ PMC * const parent_class = Parrot_oo_get_class(interp, CONST(2).u.key);
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;
@@ -20154,22 +20154,22 @@
EXCEPTION_NO_CLASS,
"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);
+ PREG(1) = Parrot_oo_newclass_from_str(interp, CONST(3).u.string);
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);
+ PMC * const parent_class = Parrot_oo_get_class(interp, CONST(2).u.key);
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);
+ PREG(1) = Parrot_oo_newclass_from_str(interp, CONST(3).u.string);
VTABLE_add_parent(interp, PREG(1), parent_class);return (opcode_t *)next;
}
@@ -20191,13 +20191,13 @@
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);
+ PMC * const parent_class = Parrot_oo_get_class(interp, CONST(2).u.key);
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;
@@ -20214,22 +20214,22 @@
EXCEPTION_NO_CLASS,
"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);
+ 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;
}
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);
+ PMC * const parent_class = Parrot_oo_get_class(interp, CONST(2).u.key);
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);
+ 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;
}
@@ -20252,13 +20252,13 @@
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);
+ PMC * const parent_class = Parrot_oo_get_class_str(interp, CONST(2).u.string);
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);
@@ -20284,13 +20284,13 @@
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);
+ PMC * const parent_class = Parrot_oo_get_class_str(interp, CONST(2).u.string);
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));
@@ -20309,23 +20309,23 @@
"Class '%Ss' doesn't exist", SREG(2));return (opcode_t *)handler;
}
- PREG(1) = Parrot_oo_newclass_from_str(interp, CONST(3)->u.string);
+ PREG(1) = Parrot_oo_newclass_from_str(interp, CONST(3).u.string);
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);
+ PMC * const parent_class = Parrot_oo_get_class_str(interp, CONST(2).u.string);
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);
+ PREG(1) = Parrot_oo_newclass_from_str(interp, CONST(3).u.string);
VTABLE_add_parent(interp, PREG(1), parent_class);return (opcode_t *)next;
}
@@ -20348,13 +20348,13 @@
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);
+ PMC * const parent_class = Parrot_oo_get_class_str(interp, CONST(2).u.string);
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));
@@ -20373,23 +20373,23 @@
"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);
+ 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;
}
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);
+ PMC * const parent_class = Parrot_oo_get_class_str(interp, CONST(2).u.string);
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);
+ 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;
}
@@ -20403,7 +20403,7 @@
opcode_t *
Parrot_get_class_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = Parrot_oo_get_class_str(interp, CONST(2)->u.string);
+ PREG(1) = Parrot_oo_get_class_str(interp, CONST(2).u.string);
return (opcode_t *)cur_opcode + 3;}
@@ -20417,7 +20417,7 @@
opcode_t *
Parrot_get_class_p_pc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = Parrot_oo_get_class(interp, CONST(2)->u.key);
+ PREG(1) = Parrot_oo_get_class(interp, CONST(2).u.key);
return (opcode_t *)cur_opcode + 3;}
@@ -20472,7 +20472,7 @@
STRING * const role_name = string_from_literal(interp, "Role");
if (VTABLE_isa(interp, PREG(1), class_name) || VTABLE_isa(interp, PREG(1), role_name))
- VTABLE_add_attribute(interp, PREG(1), CONST(2)->u.string, PMCNULL);
+ VTABLE_add_attribute(interp, PREG(1), CONST(2).u.string, PMCNULL);
else {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, NULL,
EXCEPTION_INVALID_OPERATION,
@@ -20491,7 +20491,7 @@
opcode_t *
Parrot_removeattribute_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- VTABLE_remove_attribute(interp, PREG(1), CONST(2)->u.string);
+ VTABLE_remove_attribute(interp, PREG(1), CONST(2).u.string);
return (opcode_t *)cur_opcode + 3;}
@@ -20505,7 +20505,7 @@
opcode_t *
Parrot_getattribute_p_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_get_attr_str(interp, PREG(2), CONST(3)->u.string);
+ PREG(1) = VTABLE_get_attr_str(interp, PREG(2), CONST(3).u.string);
return (opcode_t *)cur_opcode + 4;}
@@ -20519,21 +20519,21 @@
opcode_t *
Parrot_getattribute_p_p_pc_s(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_get_attr_keyed(interp, PREG(2), CONST(3)->u.key, SREG(4));
+ PREG(1) = VTABLE_get_attr_keyed(interp, PREG(2), CONST(3).u.key, SREG(4));
return (opcode_t *)cur_opcode + 5;}
opcode_t *
Parrot_getattribute_p_p_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_get_attr_keyed(interp, PREG(2), PREG(3), CONST(4)->u.string);
+ PREG(1) = VTABLE_get_attr_keyed(interp, PREG(2), PREG(3), CONST(4).u.string);
return (opcode_t *)cur_opcode + 5;}
opcode_t *
Parrot_getattribute_p_p_pc_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_get_attr_keyed(interp, PREG(2), CONST(3)->u.key, CONST(4)->u.string);
+ PREG(1) = VTABLE_get_attr_keyed(interp, PREG(2), CONST(3).u.key, CONST(4).u.string);
return (opcode_t *)cur_opcode + 5;}
@@ -20547,7 +20547,7 @@
opcode_t *
Parrot_setattribute_p_sc_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- VTABLE_set_attr_str(interp, PREG(1), CONST(2)->u.string, PREG(3));
+ VTABLE_set_attr_str(interp, PREG(1), CONST(2).u.string, PREG(3));
return (opcode_t *)cur_opcode + 4;}
@@ -20561,21 +20561,21 @@
opcode_t *
Parrot_setattribute_p_pc_s_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- VTABLE_set_attr_keyed(interp, PREG(1), CONST(2)->u.key, SREG(3), PREG(4));
+ VTABLE_set_attr_keyed(interp, PREG(1), CONST(2).u.key, SREG(3), PREG(4));
return (opcode_t *)cur_opcode + 5;}
opcode_t *
Parrot_setattribute_p_p_sc_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- VTABLE_set_attr_keyed(interp, PREG(1), PREG(2), CONST(3)->u.string, PREG(4));
+ VTABLE_set_attr_keyed(interp, PREG(1), PREG(2), CONST(3).u.string, PREG(4));
return (opcode_t *)cur_opcode + 5;}
opcode_t *
Parrot_setattribute_p_pc_sc_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- VTABLE_set_attr_keyed(interp, PREG(1), CONST(2)->u.key, CONST(3)->u.string, PREG(4));
+ VTABLE_set_attr_keyed(interp, PREG(1), CONST(2).u.key, CONST(3).u.string, PREG(4));
return (opcode_t *)cur_opcode + 5;}
@@ -20589,7 +20589,7 @@
opcode_t *
Parrot_inspect_p_pc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_inspect(interp, CONST(2)->u.key);
+ PREG(1) = VTABLE_inspect(interp, CONST(2).u.key);
return (opcode_t *)cur_opcode + 3;}
@@ -20603,21 +20603,21 @@
opcode_t *
Parrot_inspect_p_pc_s(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_inspect_str(interp, CONST(2)->u.key, SREG(3));
+ PREG(1) = VTABLE_inspect_str(interp, CONST(2).u.key, SREG(3));
return (opcode_t *)cur_opcode + 4;}
opcode_t *
Parrot_inspect_p_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_inspect_str(interp, PREG(2), CONST(3)->u.string);
+ PREG(1) = VTABLE_inspect_str(interp, PREG(2), CONST(3).u.string);
return (opcode_t *)cur_opcode + 4;}
opcode_t *
Parrot_inspect_p_pc_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_inspect_str(interp, CONST(2)->u.key, CONST(3)->u.string);
+ PREG(1) = VTABLE_inspect_str(interp, CONST(2).u.key, CONST(3).u.string);
return (opcode_t *)cur_opcode + 4;}
@@ -20646,7 +20646,7 @@
opcode_t *
Parrot_new_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- STRING * const name = CONST(2)->u.string;
+ STRING * const name = CONST(2).u.string;
PMC * const _class = Parrot_pcc_get_HLL(interp, CURRENT_CONTEXT(interp))
? Parrot_oo_get_class_str(interp, name)
: PMCNULL;
@@ -20690,7 +20690,7 @@
opcode_t *
Parrot_new_p_sc_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- STRING * const name = CONST(2)->u.string;
+ STRING * const name = CONST(2).u.string;
PMC * const _class = Parrot_pcc_get_HLL(interp, CURRENT_CONTEXT(interp))
? Parrot_oo_get_class_str(interp, name)
: PMCNULL;
@@ -20718,7 +20718,7 @@
: PMCNULL;
if (!PMC_IS_NULL(_class))
- PREG(1) = VTABLE_instantiate(interp, _class, CONST(3)->u.key);
+ PREG(1) = VTABLE_instantiate(interp, _class, CONST(3).u.key);
else {
const INTVAL type = Parrot_pmc_get_type_str(interp, name);
if (type <= 0) {
@@ -20726,7 +20726,7 @@
EXCEPTION_NO_CLASS,
"Class '%Ss' not found", name);return (opcode_t *)dest;
}
- PREG(1) = Parrot_pmc_new_init(interp, type, CONST(3)->u.key);
+ PREG(1) = Parrot_pmc_new_init(interp, type, CONST(3).u.key);
}
return (opcode_t *)cur_opcode + 4;}
@@ -20734,13 +20734,13 @@
opcode_t *
Parrot_new_p_sc_pc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- STRING * const name = CONST(2)->u.string;
+ STRING * const name = CONST(2).u.string;
PMC * const _class = Parrot_pcc_get_HLL(interp, CURRENT_CONTEXT(interp))
? Parrot_oo_get_class_str(interp, name)
: PMCNULL;
if (!PMC_IS_NULL(_class))
- PREG(1) = VTABLE_instantiate(interp, _class, CONST(3)->u.key);
+ PREG(1) = VTABLE_instantiate(interp, _class, CONST(3).u.key);
else {
const INTVAL type = Parrot_pmc_get_type_str(interp, name);
if (type <= 0) {
@@ -20748,7 +20748,7 @@
EXCEPTION_NO_CLASS,
"Class '%Ss' not found", name);return (opcode_t *)dest;
}
- PREG(1) = Parrot_pmc_new_init(interp, type, CONST(3)->u.key);
+ PREG(1) = Parrot_pmc_new_init(interp, type, CONST(3).u.key);
}
return (opcode_t *)cur_opcode + 4;}
@@ -20776,7 +20776,7 @@
opcode_t *
Parrot_new_p_pc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PMC * const name_key = CONST(2)->u.key;
+ PMC * const name_key = CONST(2).u.key;
PMC * const _class = Parrot_oo_get_class(interp, name_key);
if (!PMC_IS_NULL(_class))
@@ -20816,7 +20816,7 @@
opcode_t *
Parrot_new_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 name_key = CONST(2)->u.key;
+ PMC * const name_key = CONST(2).u.key;
PMC * const _class = Parrot_oo_get_class(interp, name_key);
if (!PMC_IS_NULL(_class))
@@ -20840,7 +20840,7 @@
PMC * const _class = Parrot_oo_get_class(interp, name_key);
if (!PMC_IS_NULL(_class))
- PREG(1) = VTABLE_instantiate(interp, _class, CONST(3)->u.key);
+ PREG(1) = VTABLE_instantiate(interp, _class, CONST(3).u.key);
else {
const INTVAL type = Parrot_pmc_get_type(interp, name_key);
if (type <= 0) {
@@ -20848,7 +20848,7 @@
EXCEPTION_NO_CLASS,
"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);
+ PREG(1) = Parrot_pmc_new_init(interp, type, CONST(3).u.key);
}
return (opcode_t *)cur_opcode + 4;}
@@ -20856,11 +20856,11 @@
opcode_t *
Parrot_new_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 name_key = CONST(2)->u.key;
+ PMC * const name_key = CONST(2).u.key;
PMC * const _class = Parrot_oo_get_class(interp, name_key);
if (!PMC_IS_NULL(_class))
- PREG(1) = VTABLE_instantiate(interp, _class, CONST(3)->u.key);
+ PREG(1) = VTABLE_instantiate(interp, _class, CONST(3).u.key);
else {
const INTVAL type = Parrot_pmc_get_type(interp, name_key);
if (type <= 0) {
@@ -20868,7 +20868,7 @@
EXCEPTION_NO_CLASS,
"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);
+ PREG(1) = Parrot_pmc_new_init(interp, type, CONST(3).u.key);
}
return (opcode_t *)cur_opcode + 4;}
@@ -20896,7 +20896,7 @@
opcode_t *
Parrot_root_new_p_pc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PMC * const key = CONST(2)->u.key;
+ PMC * const key = CONST(2).u.key;
PMC * const root_ns = interp->root_namespace;
PMC * const ns = Parrot_ns_get_namespace_keyed(interp, root_ns, key);
PMC * classobj = PMCNULL;
@@ -20936,7 +20936,7 @@
opcode_t *
Parrot_root_new_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 key = CONST(2)->u.key;
+ PMC * const key = CONST(2).u.key;
PMC * const root_ns = interp->root_namespace;
PMC * const ns = Parrot_ns_get_namespace_keyed(interp, root_ns, key);
PMC * classobj = PMCNULL;
@@ -20964,7 +20964,7 @@
if (!PMC_IS_NULL(ns))
classobj = Parrot_oo_get_class(interp, ns);
if (!PMC_IS_NULL(classobj))
- PREG(1) = VTABLE_instantiate(interp, classobj, CONST(3)->u.key);
+ 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,
EXCEPTION_NO_CLASS,
@@ -20976,7 +20976,7 @@
opcode_t *
Parrot_root_new_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 key = CONST(2)->u.key;
+ PMC * const key = CONST(2).u.key;
PMC * const root_ns = interp->root_namespace;
PMC * const ns = Parrot_ns_get_namespace_keyed(interp, root_ns, key);
PMC * classobj = PMCNULL;
@@ -20984,7 +20984,7 @@
if (!PMC_IS_NULL(ns))
classobj = Parrot_oo_get_class(interp, ns);
if (!PMC_IS_NULL(classobj))
- PREG(1) = VTABLE_instantiate(interp, classobj, CONST(3)->u.key);
+ 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,
EXCEPTION_NO_CLASS,
@@ -21031,11 +21031,11 @@
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;
- PREG(1) = VTABLE_find_method(interp, PREG(2), CONST(3)->u.string);
+ 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,
+ "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;
}
@@ -21071,7 +21071,7 @@
opcode_t *
Parrot_defined_i_p_kc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = PMC_IS_NULL(PREG(2)) ? 0 : VTABLE_defined_keyed(interp, PREG(2), CONST(3)->u.key);
+ IREG(1) = PMC_IS_NULL(PREG(2)) ? 0 : VTABLE_defined_keyed(interp, PREG(2), CONST(3).u.key);
return (opcode_t *)cur_opcode + 4;}
@@ -21099,7 +21099,7 @@
opcode_t *
Parrot_exists_i_p_kc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = PMC_IS_NULL(PREG(2)) ? 0: VTABLE_exists_keyed(interp, PREG(2), CONST(3)->u.key);
+ IREG(1) = PMC_IS_NULL(PREG(2)) ? 0: VTABLE_exists_keyed(interp, PREG(2), CONST(3).u.key);
return (opcode_t *)cur_opcode + 4;}
@@ -21113,7 +21113,7 @@
opcode_t *
Parrot_delete_p_kc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- VTABLE_delete_keyed(interp, PREG(1), CONST(2)->u.key);
+ VTABLE_delete_keyed(interp, PREG(1), CONST(2).u.key);
return (opcode_t *)cur_opcode + 3;}
@@ -21162,7 +21162,7 @@
opcode_t *
Parrot_push_p_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- VTABLE_push_float(interp, PREG(1), CONST(2)->u.number);
+ VTABLE_push_float(interp, PREG(1), CONST(2).u.number);
return (opcode_t *)cur_opcode + 3;}
@@ -21176,7 +21176,7 @@
opcode_t *
Parrot_push_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- VTABLE_push_string(interp, PREG(1), CONST(2)->u.string);
+ VTABLE_push_string(interp, PREG(1), CONST(2).u.string);
return (opcode_t *)cur_opcode + 3;}
@@ -21239,7 +21239,7 @@
opcode_t *
Parrot_unshift_p_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- VTABLE_unshift_float(interp, PREG(1), CONST(2)->u.number);
+ VTABLE_unshift_float(interp, PREG(1), CONST(2).u.number);
return (opcode_t *)cur_opcode + 3;}
@@ -21253,7 +21253,7 @@
opcode_t *
Parrot_unshift_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- VTABLE_unshift_string(interp, PREG(1), CONST(2)->u.string);
+ VTABLE_unshift_string(interp, PREG(1), CONST(2).u.string);
return (opcode_t *)cur_opcode + 3;}
@@ -21330,7 +21330,7 @@
opcode_t *
Parrot_setprop_p_sc_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- VTABLE_setprop(interp, PREG(1), CONST(2)->u.string, PREG(3));
+ VTABLE_setprop(interp, PREG(1), CONST(2).u.string, PREG(3));
return (opcode_t *)cur_opcode + 4;}
@@ -21344,7 +21344,7 @@
opcode_t *
Parrot_getprop_p_sc_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_getprop(interp, PREG(3), CONST(2)->u.string);
+ PREG(1) = VTABLE_getprop(interp, PREG(3), CONST(2).u.string);
return (opcode_t *)cur_opcode + 4;}
@@ -21358,7 +21358,7 @@
opcode_t *
Parrot_delprop_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- VTABLE_delprop(interp, PREG(1), CONST(2)->u.string);
+ VTABLE_delprop(interp, PREG(1), CONST(2).u.string);
return (opcode_t *)cur_opcode + 3;}
@@ -21386,7 +21386,7 @@
opcode_t *
Parrot_thaw_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = Parrot_thaw(interp, CONST(2)->u.string);
+ PREG(1) = Parrot_thaw(interp, CONST(2).u.string);
return (opcode_t *)cur_opcode + 3;}
@@ -21400,21 +21400,21 @@
opcode_t *
Parrot_add_multi_sc_s_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- Parrot_mmd_add_multi_from_long_sig(interp, CONST(1)->u.string, SREG(2), PREG(3));
+ Parrot_mmd_add_multi_from_long_sig(interp, CONST(1).u.string, SREG(2), PREG(3));
return (opcode_t *)cur_opcode + 4;}
opcode_t *
Parrot_add_multi_s_sc_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- Parrot_mmd_add_multi_from_long_sig(interp, SREG(1), CONST(2)->u.string, PREG(3));
+ Parrot_mmd_add_multi_from_long_sig(interp, SREG(1), CONST(2).u.string, PREG(3));
return (opcode_t *)cur_opcode + 4;}
opcode_t *
Parrot_add_multi_sc_sc_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- Parrot_mmd_add_multi_from_long_sig(interp, CONST(1)->u.string, CONST(2)->u.string, PREG(3));
+ Parrot_mmd_add_multi_from_long_sig(interp, CONST(1).u.string, CONST(2).u.string, PREG(3));
return (opcode_t *)cur_opcode + 4;}
@@ -21428,21 +21428,21 @@
opcode_t *
Parrot_find_multi_p_sc_s(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = Parrot_mmd_find_multi_from_long_sig(interp, CONST(2)->u.string, SREG(3));
+ PREG(1) = Parrot_mmd_find_multi_from_long_sig(interp, CONST(2).u.string, SREG(3));
return (opcode_t *)cur_opcode + 4;}
opcode_t *
Parrot_find_multi_p_s_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = Parrot_mmd_find_multi_from_long_sig(interp, SREG(2), CONST(3)->u.string);
+ PREG(1) = Parrot_mmd_find_multi_from_long_sig(interp, SREG(2), CONST(3).u.string);
return (opcode_t *)cur_opcode + 4;}
opcode_t *
Parrot_find_multi_p_sc_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = Parrot_mmd_find_multi_from_long_sig(interp, CONST(2)->u.string, CONST(3)->u.string);
+ PREG(1) = Parrot_mmd_find_multi_from_long_sig(interp, CONST(2).u.string, CONST(3).u.string);
return (opcode_t *)cur_opcode + 4;}
@@ -21488,7 +21488,7 @@
Parrot_box_p_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PREG(1) = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Float));
- VTABLE_set_number_native(interp, PREG(1), CONST(2)->u.number);
+ VTABLE_set_number_native(interp, PREG(1), CONST(2).u.number);
return (opcode_t *)cur_opcode + 3;}
@@ -21504,7 +21504,7 @@
Parrot_box_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PREG(1) = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_String));
- VTABLE_set_string_native(interp, PREG(1), CONST(2)->u.string);
+ VTABLE_set_string_native(interp, PREG(1), CONST(2).u.string);
return (opcode_t *)cur_opcode + 3;}
@@ -21525,7 +21525,7 @@
opcode_t *
Parrot_morph_p_pc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- VTABLE_morph(interp, PREG(1), CONST(2)->u.key);
+ VTABLE_morph(interp, PREG(1), CONST(2).u.key);
return (opcode_t *)cur_opcode + 3;}
@@ -21543,9 +21543,9 @@
Parrot_clone_s_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
/* cloning a NULL STRING produces an empty STRING; TT #964 */
- SREG(1) = STRING_IS_NULL(CONST(2)->u.string)
+ SREG(1) = STRING_IS_NULL(CONST(2).u.string)
? Parrot_str_new(interp, NULL, 0)
- : CONST(2)->u.string;
+ : CONST(2).u.string;
return (opcode_t *)cur_opcode + 3;}
@@ -21573,7 +21573,7 @@
opcode_t *
Parrot_set_i_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = (INTVAL)(CONST(2)->u.number);
+ IREG(1) = (INTVAL)(CONST(2).u.number);
return (opcode_t *)cur_opcode + 3;}
@@ -21587,7 +21587,7 @@
opcode_t *
Parrot_set_i_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = Parrot_str_to_int(interp, CONST(2)->u.string);
+ IREG(1) = Parrot_str_to_int(interp, CONST(2).u.string);
return (opcode_t *)cur_opcode + 3;}
@@ -21601,7 +21601,7 @@
opcode_t *
Parrot_set_n_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- NREG(1) = CONST(2)->u.number;
+ NREG(1) = CONST(2).u.number;
return (opcode_t *)cur_opcode + 3;}
@@ -21629,7 +21629,7 @@
opcode_t *
Parrot_set_n_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- NREG(1) = Parrot_str_to_num(interp, CONST(2)->u.string);
+ NREG(1) = Parrot_str_to_num(interp, CONST(2).u.string);
return (opcode_t *)cur_opcode + 3;}
@@ -21657,7 +21657,7 @@
opcode_t *
Parrot_set_s_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- SREG(1) = CONST(2)->u.string;
+ SREG(1) = CONST(2).u.string;
return (opcode_t *)cur_opcode + 3;}
@@ -21685,14 +21685,14 @@
opcode_t *
Parrot_set_s_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- SREG(1) = Parrot_str_from_num(interp, CONST(2)->u.number);
+ SREG(1) = Parrot_str_from_num(interp, CONST(2).u.number);
return (opcode_t *)cur_opcode + 3;}
opcode_t *
Parrot_set_p_pc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = CONST(2)->u.key;
+ PREG(1) = CONST(2).u.key;
return (opcode_t *)cur_opcode + 3;}
@@ -21727,7 +21727,7 @@
opcode_t *
Parrot_set_p_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- VTABLE_set_number_native(interp, PREG(1), CONST(2)->u.number);
+ VTABLE_set_number_native(interp, PREG(1), CONST(2).u.number);
return (opcode_t *)cur_opcode + 3;}
@@ -21741,7 +21741,7 @@
opcode_t *
Parrot_set_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- VTABLE_set_string_native(interp, PREG(1), CONST(2)->u.string);
+ VTABLE_set_string_native(interp, PREG(1), CONST(2).u.string);
return (opcode_t *)cur_opcode + 3;}
@@ -21783,7 +21783,7 @@
opcode_t *
Parrot_assign_p_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- VTABLE_set_number_native(interp, PREG(1), CONST(2)->u.number);
+ VTABLE_set_number_native(interp, PREG(1), CONST(2).u.number);
return (opcode_t *)cur_opcode + 3;}
@@ -21797,7 +21797,7 @@
opcode_t *
Parrot_assign_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- VTABLE_assign_string_native(interp, PREG(1), CONST(2)->u.string);
+ VTABLE_assign_string_native(interp, PREG(1), CONST(2).u.string);
return (opcode_t *)cur_opcode + 3;}
@@ -21811,7 +21811,7 @@
opcode_t *
Parrot_assign_s_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- SREG(1) = CONST(2)->u.string;
+ SREG(1) = CONST(2).u.string;
return (opcode_t *)cur_opcode + 3;}
@@ -21874,14 +21874,14 @@
opcode_t *
Parrot_set_p_ki_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- VTABLE_set_number_keyed_int(interp, PREG(1), IREG(2), CONST(3)->u.number);
+ VTABLE_set_number_keyed_int(interp, PREG(1), IREG(2), CONST(3).u.number);
return (opcode_t *)cur_opcode + 4;}
opcode_t *
Parrot_set_p_kic_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- VTABLE_set_number_keyed_int(interp, PREG(1), cur_opcode[2], CONST(3)->u.number);
+ VTABLE_set_number_keyed_int(interp, PREG(1), cur_opcode[2], CONST(3).u.number);
return (opcode_t *)cur_opcode + 4;}
@@ -21902,14 +21902,14 @@
opcode_t *
Parrot_set_p_ki_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- VTABLE_set_string_keyed_int(interp, PREG(1), IREG(2), CONST(3)->u.string);
+ VTABLE_set_string_keyed_int(interp, PREG(1), IREG(2), CONST(3).u.string);
return (opcode_t *)cur_opcode + 4;}
opcode_t *
Parrot_set_p_kic_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- VTABLE_set_string_keyed_int(interp, PREG(1), cur_opcode[2], CONST(3)->u.string);
+ VTABLE_set_string_keyed_int(interp, PREG(1), cur_opcode[2], CONST(3).u.string);
return (opcode_t *)cur_opcode + 4;}
@@ -21993,7 +21993,7 @@
opcode_t *
Parrot_set_p_kc_i(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- VTABLE_set_integer_keyed(interp, PREG(1), CONST(2)->u.key, IREG(3));
+ VTABLE_set_integer_keyed(interp, PREG(1), CONST(2).u.key, IREG(3));
return (opcode_t *)cur_opcode + 4;}
@@ -22007,7 +22007,7 @@
opcode_t *
Parrot_set_p_kc_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- VTABLE_set_integer_keyed(interp, PREG(1), CONST(2)->u.key, cur_opcode[3]);
+ VTABLE_set_integer_keyed(interp, PREG(1), CONST(2).u.key, cur_opcode[3]);
return (opcode_t *)cur_opcode + 4;}
@@ -22021,21 +22021,21 @@
opcode_t *
Parrot_set_p_kc_n(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- VTABLE_set_number_keyed(interp, PREG(1), CONST(2)->u.key, NREG(3));
+ VTABLE_set_number_keyed(interp, PREG(1), CONST(2).u.key, NREG(3));
return (opcode_t *)cur_opcode + 4;}
opcode_t *
Parrot_set_p_k_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- VTABLE_set_number_keyed(interp, PREG(1), PREG(2), CONST(3)->u.number);
+ VTABLE_set_number_keyed(interp, PREG(1), PREG(2), CONST(3).u.number);
return (opcode_t *)cur_opcode + 4;}
opcode_t *
Parrot_set_p_kc_nc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- VTABLE_set_number_keyed(interp, PREG(1), CONST(2)->u.key, CONST(3)->u.number);
+ VTABLE_set_number_keyed(interp, PREG(1), CONST(2).u.key, CONST(3).u.number);
return (opcode_t *)cur_opcode + 4;}
@@ -22049,21 +22049,21 @@
opcode_t *
Parrot_set_p_kc_s(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- VTABLE_set_string_keyed(interp, PREG(1), CONST(2)->u.key, SREG(3));
+ VTABLE_set_string_keyed(interp, PREG(1), CONST(2).u.key, SREG(3));
return (opcode_t *)cur_opcode + 4;}
opcode_t *
Parrot_set_p_k_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- VTABLE_set_string_keyed(interp, PREG(1), PREG(2), CONST(3)->u.string);
+ VTABLE_set_string_keyed(interp, PREG(1), PREG(2), CONST(3).u.string);
return (opcode_t *)cur_opcode + 4;}
opcode_t *
Parrot_set_p_kc_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- VTABLE_set_string_keyed(interp, PREG(1), CONST(2)->u.key, CONST(3)->u.string);
+ VTABLE_set_string_keyed(interp, PREG(1), CONST(2).u.key, CONST(3).u.string);
return (opcode_t *)cur_opcode + 4;}
@@ -22077,7 +22077,7 @@
opcode_t *
Parrot_set_p_kc_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- VTABLE_set_pmc_keyed(interp, PREG(1), CONST(2)->u.key, PREG(3));
+ VTABLE_set_pmc_keyed(interp, PREG(1), CONST(2).u.key, PREG(3));
return (opcode_t *)cur_opcode + 4;}
@@ -22091,7 +22091,7 @@
opcode_t *
Parrot_set_i_p_kc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = VTABLE_get_integer_keyed(interp, PREG(2), CONST(3)->u.key);
+ IREG(1) = VTABLE_get_integer_keyed(interp, PREG(2), CONST(3).u.key);
return (opcode_t *)cur_opcode + 4;}
@@ -22105,7 +22105,7 @@
opcode_t *
Parrot_set_n_p_kc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- NREG(1) = VTABLE_get_number_keyed(interp, PREG(2), CONST(3)->u.key);
+ NREG(1) = VTABLE_get_number_keyed(interp, PREG(2), CONST(3).u.key);
return (opcode_t *)cur_opcode + 4;}
@@ -22119,7 +22119,7 @@
opcode_t *
Parrot_set_s_p_kc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- SREG(1) = VTABLE_get_string_keyed(interp, PREG(2), CONST(3)->u.key);
+ SREG(1) = VTABLE_get_string_keyed(interp, PREG(2), CONST(3).u.key);
return (opcode_t *)cur_opcode + 4;}
@@ -22133,7 +22133,7 @@
opcode_t *
Parrot_set_p_p_kc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_get_pmc_keyed(interp, PREG(2), CONST(3)->u.key);
+ PREG(1) = VTABLE_get_pmc_keyed(interp, PREG(2), CONST(3).u.key);
return (opcode_t *)cur_opcode + 4;}
@@ -22154,7 +22154,7 @@
opcode_t *
Parrot_clone_p_p_pc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_clone_pmc(interp, PREG(2), CONST(3)->u.key);
+ PREG(1) = VTABLE_clone_pmc(interp, PREG(2), CONST(3).u.key);
return (opcode_t *)cur_opcode + 4;}
@@ -22234,7 +22234,7 @@
opcode_t *
Parrot_ord_i_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = string_ord(interp, CONST(2)->u.string, 0);
+ IREG(1) = string_ord(interp, CONST(2).u.string, 0);
return (opcode_t *)cur_opcode + 3;}
@@ -22248,7 +22248,7 @@
opcode_t *
Parrot_ord_i_sc_i(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = string_ord(interp, CONST(2)->u.string, IREG(3));
+ IREG(1) = string_ord(interp, CONST(2).u.string, IREG(3));
return (opcode_t *)cur_opcode + 4;}
@@ -22262,7 +22262,7 @@
opcode_t *
Parrot_ord_i_sc_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = string_ord(interp, CONST(2)->u.string, cur_opcode[3]);
+ IREG(1) = string_ord(interp, CONST(2).u.string, cur_opcode[3]);
return (opcode_t *)cur_opcode + 4;}
@@ -22292,7 +22292,7 @@
opcode_t *
Parrot_chopn_s_sc_i(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- SREG(1) = Parrot_str_chopn(interp, CONST(2)->u.string, IREG(3));
+ SREG(1) = Parrot_str_chopn(interp, CONST(2).u.string, IREG(3));
return (opcode_t *)cur_opcode + 4;}
@@ -22306,7 +22306,7 @@
opcode_t *
Parrot_chopn_s_sc_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- SREG(1) = Parrot_str_chopn(interp, CONST(2)->u.string, cur_opcode[3]);
+ SREG(1) = Parrot_str_chopn(interp, CONST(2).u.string, cur_opcode[3]);
return (opcode_t *)cur_opcode + 4;}
@@ -22320,7 +22320,7 @@
opcode_t *
Parrot_concat_s_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- SREG(1) = Parrot_str_concat(interp, SREG(1), CONST(2)->u.string);
+ SREG(1) = Parrot_str_concat(interp, SREG(1), CONST(2).u.string);
return (opcode_t *)cur_opcode + 3;}
@@ -22341,7 +22341,7 @@
opcode_t *
Parrot_concat_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- VTABLE_i_concatenate_str(interp, PREG(1), CONST(2)->u.string);
+ VTABLE_i_concatenate_str(interp, PREG(1), CONST(2).u.string);
return (opcode_t *)cur_opcode + 3;}
@@ -22355,14 +22355,14 @@
opcode_t *
Parrot_concat_s_sc_s(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- SREG(1) = Parrot_str_concat(interp, CONST(2)->u.string, SREG(3));
+ SREG(1) = Parrot_str_concat(interp, CONST(2).u.string, SREG(3));
return (opcode_t *)cur_opcode + 4;}
opcode_t *
Parrot_concat_s_s_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- SREG(1) = Parrot_str_concat(interp, SREG(2), CONST(3)->u.string);
+ SREG(1) = Parrot_str_concat(interp, SREG(2), CONST(3).u.string);
return (opcode_t *)cur_opcode + 4;}
@@ -22376,7 +22376,7 @@
opcode_t *
Parrot_concat_p_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_concatenate_str(interp, PREG(2), CONST(3)->u.string, PREG(1));
+ PREG(1) = VTABLE_concatenate_str(interp, PREG(2), CONST(3).u.string, PREG(1));
return (opcode_t *)cur_opcode + 4;}
@@ -22407,7 +22407,7 @@
EXCEPTION_NEG_REPEAT,
"Cannot repeat with negative arg");return (opcode_t *)handler;
}
- SREG(1) = Parrot_str_repeat(interp, CONST(2)->u.string, (UINTVAL)IREG(3));
+ SREG(1) = Parrot_str_repeat(interp, CONST(2).u.string, (UINTVAL)IREG(3));
return (opcode_t *)cur_opcode + 4;}
@@ -22431,7 +22431,7 @@
EXCEPTION_NEG_REPEAT,
"Cannot repeat with negative arg");return (opcode_t *)handler;
}
- SREG(1) = Parrot_str_repeat(interp, CONST(2)->u.string, (UINTVAL)cur_opcode[3]);
+ SREG(1) = Parrot_str_repeat(interp, CONST(2).u.string, (UINTVAL)cur_opcode[3]);
return (opcode_t *)cur_opcode + 4;}
@@ -22502,7 +22502,7 @@
opcode_t *
Parrot_length_i_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = Parrot_str_length(interp, CONST(2)->u.string);
+ IREG(1) = Parrot_str_length(interp, CONST(2).u.string);
return (opcode_t *)cur_opcode + 3;}
@@ -22516,7 +22516,7 @@
opcode_t *
Parrot_bytelength_i_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = Parrot_str_byte_length(interp, CONST(2)->u.string);
+ IREG(1) = Parrot_str_byte_length(interp, CONST(2).u.string);
return (opcode_t *)cur_opcode + 3;}
@@ -22545,8 +22545,8 @@
opcode_t *
Parrot_substr_s_sc_i(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- const INTVAL len = Parrot_str_byte_length(interp, CONST(2)->u.string);
- SREG(1) = Parrot_str_substr(interp, CONST(2)->u.string, IREG(3), len);
+ const INTVAL len = Parrot_str_byte_length(interp, CONST(2).u.string);
+ SREG(1) = Parrot_str_substr(interp, CONST(2).u.string, IREG(3), len);
return (opcode_t *)cur_opcode + 4;}
@@ -22561,8 +22561,8 @@
opcode_t *
Parrot_substr_s_sc_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- const INTVAL len = Parrot_str_byte_length(interp, CONST(2)->u.string);
- SREG(1) = Parrot_str_substr(interp, CONST(2)->u.string, cur_opcode[3], len);
+ const INTVAL len = Parrot_str_byte_length(interp, CONST(2).u.string);
+ SREG(1) = Parrot_str_substr(interp, CONST(2).u.string, cur_opcode[3], len);
return (opcode_t *)cur_opcode + 4;}
@@ -22576,7 +22576,7 @@
opcode_t *
Parrot_substr_s_sc_i_i(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- SREG(1) = Parrot_str_substr(interp, CONST(2)->u.string, IREG(3), IREG(4));
+ SREG(1) = Parrot_str_substr(interp, CONST(2).u.string, IREG(3), IREG(4));
return (opcode_t *)cur_opcode + 5;}
@@ -22590,7 +22590,7 @@
opcode_t *
Parrot_substr_s_sc_ic_i(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- SREG(1) = Parrot_str_substr(interp, CONST(2)->u.string, cur_opcode[3], IREG(4));
+ SREG(1) = Parrot_str_substr(interp, CONST(2).u.string, cur_opcode[3], IREG(4));
return (opcode_t *)cur_opcode + 5;}
@@ -22604,7 +22604,7 @@
opcode_t *
Parrot_substr_s_sc_i_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- SREG(1) = Parrot_str_substr(interp, CONST(2)->u.string, IREG(3), cur_opcode[4]);
+ SREG(1) = Parrot_str_substr(interp, CONST(2).u.string, IREG(3), cur_opcode[4]);
return (opcode_t *)cur_opcode + 5;}
@@ -22618,7 +22618,7 @@
opcode_t *
Parrot_substr_s_sc_ic_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- SREG(1) = Parrot_str_substr(interp, CONST(2)->u.string, cur_opcode[3], cur_opcode[4]);
+ SREG(1) = Parrot_str_substr(interp, CONST(2).u.string, cur_opcode[3], cur_opcode[4]);
return (opcode_t *)cur_opcode + 5;}
@@ -22660,7 +22660,7 @@
opcode_t *
Parrot_replace_s_sc_i_i_s(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- SREG(1) = Parrot_str_replace(interp, CONST(2)->u.string, IREG(3), IREG(4), SREG(5));
+ SREG(1) = Parrot_str_replace(interp, CONST(2).u.string, IREG(3), IREG(4), SREG(5));
return (opcode_t *)cur_opcode + 6;}
@@ -22674,7 +22674,7 @@
opcode_t *
Parrot_replace_s_sc_ic_i_s(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- SREG(1) = Parrot_str_replace(interp, CONST(2)->u.string, cur_opcode[3], IREG(4), SREG(5));
+ SREG(1) = Parrot_str_replace(interp, CONST(2).u.string, cur_opcode[3], IREG(4), SREG(5));
return (opcode_t *)cur_opcode + 6;}
@@ -22688,7 +22688,7 @@
opcode_t *
Parrot_replace_s_sc_i_ic_s(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- SREG(1) = Parrot_str_replace(interp, CONST(2)->u.string, IREG(3), cur_opcode[4], SREG(5));
+ SREG(1) = Parrot_str_replace(interp, CONST(2).u.string, IREG(3), cur_opcode[4], SREG(5));
return (opcode_t *)cur_opcode + 6;}
@@ -22702,63 +22702,63 @@
opcode_t *
Parrot_replace_s_sc_ic_ic_s(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- SREG(1) = Parrot_str_replace(interp, CONST(2)->u.string, cur_opcode[3], cur_opcode[4], SREG(5));
+ SREG(1) = Parrot_str_replace(interp, CONST(2).u.string, cur_opcode[3], cur_opcode[4], SREG(5));
return (opcode_t *)cur_opcode + 6;}
opcode_t *
Parrot_replace_s_s_i_i_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- SREG(1) = Parrot_str_replace(interp, SREG(2), IREG(3), IREG(4), CONST(5)->u.string);
+ SREG(1) = Parrot_str_replace(interp, SREG(2), IREG(3), IREG(4), CONST(5).u.string);
return (opcode_t *)cur_opcode + 6;}
opcode_t *
Parrot_replace_s_sc_i_i_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- SREG(1) = Parrot_str_replace(interp, CONST(2)->u.string, IREG(3), IREG(4), CONST(5)->u.string);
+ SREG(1) = Parrot_str_replace(interp, CONST(2).u.string, IREG(3), IREG(4), CONST(5).u.string);
return (opcode_t *)cur_opcode + 6;}
opcode_t *
Parrot_replace_s_s_ic_i_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- SREG(1) = Parrot_str_replace(interp, SREG(2), cur_opcode[3], IREG(4), CONST(5)->u.string);
+ SREG(1) = Parrot_str_replace(interp, SREG(2), cur_opcode[3], IREG(4), CONST(5).u.string);
return (opcode_t *)cur_opcode + 6;}
opcode_t *
Parrot_replace_s_sc_ic_i_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- SREG(1) = Parrot_str_replace(interp, CONST(2)->u.string, cur_opcode[3], IREG(4), CONST(5)->u.string);
+ SREG(1) = Parrot_str_replace(interp, CONST(2).u.string, cur_opcode[3], IREG(4), CONST(5).u.string);
return (opcode_t *)cur_opcode + 6;}
opcode_t *
Parrot_replace_s_s_i_ic_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- SREG(1) = Parrot_str_replace(interp, SREG(2), IREG(3), cur_opcode[4], CONST(5)->u.string);
+ SREG(1) = Parrot_str_replace(interp, SREG(2), IREG(3), cur_opcode[4], CONST(5).u.string);
return (opcode_t *)cur_opcode + 6;}
opcode_t *
Parrot_replace_s_sc_i_ic_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- SREG(1) = Parrot_str_replace(interp, CONST(2)->u.string, IREG(3), cur_opcode[4], CONST(5)->u.string);
+ SREG(1) = Parrot_str_replace(interp, CONST(2).u.string, IREG(3), cur_opcode[4], CONST(5).u.string);
return (opcode_t *)cur_opcode + 6;}
opcode_t *
Parrot_replace_s_s_ic_ic_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- SREG(1) = Parrot_str_replace(interp, SREG(2), cur_opcode[3], cur_opcode[4], CONST(5)->u.string);
+ SREG(1) = Parrot_str_replace(interp, SREG(2), cur_opcode[3], cur_opcode[4], CONST(5).u.string);
return (opcode_t *)cur_opcode + 6;}
opcode_t *
Parrot_replace_s_sc_ic_ic_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- SREG(1) = Parrot_str_replace(interp, CONST(2)->u.string, cur_opcode[3], cur_opcode[4], CONST(5)->u.string);
+ SREG(1) = Parrot_str_replace(interp, CONST(2).u.string, cur_opcode[3], cur_opcode[4], CONST(5).u.string);
return (opcode_t *)cur_opcode + 6;}
@@ -22772,21 +22772,21 @@
opcode_t *
Parrot_index_i_sc_s(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = (CONST(2)->u.string && SREG(3)) ? Parrot_str_find_index(interp, CONST(2)->u.string, SREG(3), 0) : -1;
+ IREG(1) = (CONST(2).u.string && SREG(3)) ? Parrot_str_find_index(interp, CONST(2).u.string, SREG(3), 0) : -1;
return (opcode_t *)cur_opcode + 4;}
opcode_t *
Parrot_index_i_s_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = (SREG(2) && CONST(3)->u.string) ? Parrot_str_find_index(interp, SREG(2), CONST(3)->u.string, 0) : -1;
+ IREG(1) = (SREG(2) && CONST(3).u.string) ? Parrot_str_find_index(interp, SREG(2), CONST(3).u.string, 0) : -1;
return (opcode_t *)cur_opcode + 4;}
opcode_t *
Parrot_index_i_sc_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = (CONST(2)->u.string && CONST(3)->u.string) ? Parrot_str_find_index(interp, CONST(2)->u.string, CONST(3)->u.string, 0) : -1;
+ IREG(1) = (CONST(2).u.string && CONST(3).u.string) ? Parrot_str_find_index(interp, CONST(2).u.string, CONST(3).u.string, 0) : -1;
return (opcode_t *)cur_opcode + 4;}
@@ -22800,21 +22800,21 @@
opcode_t *
Parrot_index_i_sc_s_i(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = (CONST(2)->u.string && SREG(3)) ? Parrot_str_find_index(interp, CONST(2)->u.string, SREG(3), IREG(4)) : -1;
+ IREG(1) = (CONST(2).u.string && SREG(3)) ? Parrot_str_find_index(interp, CONST(2).u.string, SREG(3), IREG(4)) : -1;
return (opcode_t *)cur_opcode + 5;}
opcode_t *
Parrot_index_i_s_sc_i(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = (SREG(2) && CONST(3)->u.string) ? Parrot_str_find_index(interp, SREG(2), CONST(3)->u.string, IREG(4)) : -1;
+ IREG(1) = (SREG(2) && CONST(3).u.string) ? Parrot_str_find_index(interp, SREG(2), CONST(3).u.string, IREG(4)) : -1;
return (opcode_t *)cur_opcode + 5;}
opcode_t *
Parrot_index_i_sc_sc_i(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = (CONST(2)->u.string && CONST(3)->u.string) ? Parrot_str_find_index(interp, CONST(2)->u.string, CONST(3)->u.string, IREG(4)) : -1;
+ IREG(1) = (CONST(2).u.string && CONST(3).u.string) ? Parrot_str_find_index(interp, CONST(2).u.string, CONST(3).u.string, IREG(4)) : -1;
return (opcode_t *)cur_opcode + 5;}
@@ -22828,21 +22828,21 @@
opcode_t *
Parrot_index_i_sc_s_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = (CONST(2)->u.string && SREG(3)) ? Parrot_str_find_index(interp, CONST(2)->u.string, SREG(3), cur_opcode[4]) : -1;
+ IREG(1) = (CONST(2).u.string && SREG(3)) ? Parrot_str_find_index(interp, CONST(2).u.string, SREG(3), cur_opcode[4]) : -1;
return (opcode_t *)cur_opcode + 5;}
opcode_t *
Parrot_index_i_s_sc_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = (SREG(2) && CONST(3)->u.string) ? Parrot_str_find_index(interp, SREG(2), CONST(3)->u.string, cur_opcode[4]) : -1;
+ IREG(1) = (SREG(2) && CONST(3).u.string) ? Parrot_str_find_index(interp, SREG(2), CONST(3).u.string, cur_opcode[4]) : -1;
return (opcode_t *)cur_opcode + 5;}
opcode_t *
Parrot_index_i_sc_sc_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = (CONST(2)->u.string && CONST(3)->u.string) ? Parrot_str_find_index(interp, CONST(2)->u.string, CONST(3)->u.string, cur_opcode[4]) : -1;
+ IREG(1) = (CONST(2).u.string && CONST(3).u.string) ? Parrot_str_find_index(interp, CONST(2).u.string, CONST(3).u.string, cur_opcode[4]) : -1;
return (opcode_t *)cur_opcode + 5;}
@@ -22856,7 +22856,7 @@
opcode_t *
Parrot_sprintf_s_sc_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- SREG(1)=Parrot_psprintf(interp, CONST(2)->u.string, PREG(3));
+ SREG(1)=Parrot_psprintf(interp, CONST(2).u.string, PREG(3));
return (opcode_t *)cur_opcode + 4;}
@@ -22928,27 +22928,27 @@
opcode_t *
Parrot_stringinfo_i_sc_i(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (CONST(2)->u.string == NULL)
+ if (CONST(2).u.string == NULL)
IREG(1) = 0;
else {
switch (IREG(3)) {
case STRINGINFO_HEADER:
- IREG(1) = PTR2UINTVAL(CONST(2)->u.string);
+ IREG(1) = PTR2UINTVAL(CONST(2).u.string);
break;
case STRINGINFO_STRSTART:
- IREG(1) = PTR2UINTVAL(CONST(2)->u.string->strstart);
+ IREG(1) = PTR2UINTVAL(CONST(2).u.string->strstart);
break;
case STRINGINFO_BUFLEN:
- IREG(1) = Buffer_buflen(CONST(2)->u.string);
+ IREG(1) = Buffer_buflen(CONST(2).u.string);
break;
case STRINGINFO_FLAGS:
- IREG(1) = PObj_get_FLAGS(CONST(2)->u.string);
+ IREG(1) = PObj_get_FLAGS(CONST(2).u.string);
break;
case STRINGINFO_BUFUSED:
- IREG(1) = CONST(2)->u.string->bufused;
+ IREG(1) = CONST(2).u.string->bufused;
break;
case STRINGINFO_STRLEN:
- IREG(1) = CONST(2)->u.string->strlen;
+ IREG(1) = CONST(2).u.string->strlen;
break;
default:
{
@@ -23000,27 +23000,27 @@
opcode_t *
Parrot_stringinfo_i_sc_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (CONST(2)->u.string == NULL)
+ if (CONST(2).u.string == NULL)
IREG(1) = 0;
else {
switch (cur_opcode[3]) {
case STRINGINFO_HEADER:
- IREG(1) = PTR2UINTVAL(CONST(2)->u.string);
+ IREG(1) = PTR2UINTVAL(CONST(2).u.string);
break;
case STRINGINFO_STRSTART:
- IREG(1) = PTR2UINTVAL(CONST(2)->u.string->strstart);
+ IREG(1) = PTR2UINTVAL(CONST(2).u.string->strstart);
break;
case STRINGINFO_BUFLEN:
- IREG(1) = Buffer_buflen(CONST(2)->u.string);
+ IREG(1) = Buffer_buflen(CONST(2).u.string);
break;
case STRINGINFO_FLAGS:
- IREG(1) = PObj_get_FLAGS(CONST(2)->u.string);
+ IREG(1) = PObj_get_FLAGS(CONST(2).u.string);
break;
case STRINGINFO_BUFUSED:
- IREG(1) = CONST(2)->u.string->bufused;
+ IREG(1) = CONST(2).u.string->bufused;
break;
case STRINGINFO_STRLEN:
- IREG(1) = CONST(2)->u.string->strlen;
+ IREG(1) = CONST(2).u.string->strlen;
break;
default:
{
@@ -23043,7 +23043,7 @@
opcode_t *
Parrot_upcase_s_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- SREG(1) = Parrot_str_upcase(interp, CONST(2)->u.string);
+ SREG(1) = Parrot_str_upcase(interp, CONST(2).u.string);
return (opcode_t *)cur_opcode + 3;}
@@ -23057,7 +23057,7 @@
opcode_t *
Parrot_downcase_s_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- SREG(1) = Parrot_str_downcase(interp, CONST(2)->u.string);
+ SREG(1) = Parrot_str_downcase(interp, CONST(2).u.string);
return (opcode_t *)cur_opcode + 3;}
@@ -23071,7 +23071,7 @@
opcode_t *
Parrot_titlecase_s_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- SREG(1) = Parrot_str_titlecase(interp, CONST(2)->u.string);
+ SREG(1) = Parrot_str_titlecase(interp, CONST(2).u.string);
return (opcode_t *)cur_opcode + 3;}
@@ -23085,7 +23085,7 @@
opcode_t *
Parrot_join_s_sc_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- SREG(1) = Parrot_str_join(interp, CONST(2)->u.string, PREG(3));
+ SREG(1) = Parrot_str_join(interp, CONST(2).u.string, PREG(3));
return (opcode_t *)cur_opcode + 4;}
@@ -23099,21 +23099,21 @@
opcode_t *
Parrot_split_p_sc_s(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = Parrot_str_split(interp, CONST(2)->u.string, SREG(3));
+ PREG(1) = Parrot_str_split(interp, CONST(2).u.string, SREG(3));
return (opcode_t *)cur_opcode + 4;}
opcode_t *
Parrot_split_p_s_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = Parrot_str_split(interp, SREG(2), CONST(3)->u.string);
+ PREG(1) = Parrot_str_split(interp, SREG(2), CONST(3).u.string);
return (opcode_t *)cur_opcode + 4;}
opcode_t *
Parrot_split_p_sc_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = Parrot_str_split(interp, CONST(2)->u.string, CONST(3)->u.string);
+ PREG(1) = Parrot_str_split(interp, CONST(2).u.string, CONST(3).u.string);
return (opcode_t *)cur_opcode + 4;}
@@ -23127,7 +23127,7 @@
opcode_t *
Parrot_charset_i_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = Parrot_charset_number_of_str(interp, CONST(2)->u.string);
+ IREG(1) = Parrot_charset_number_of_str(interp, CONST(2).u.string);
return (opcode_t *)cur_opcode + 3;}
@@ -23161,11 +23161,11 @@
opcode_t *
Parrot_find_charset_i_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- const INTVAL n = Parrot_charset_number(interp, CONST(2)->u.string);
+ const INTVAL n = Parrot_charset_number(interp, CONST(2).u.string);
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;
@@ -23181,7 +23181,7 @@
opcode_t *
Parrot_trans_charset_s_sc_i(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- SREG(1) = Parrot_str_change_charset(interp, CONST(2)->u.string, IREG(3));
+ SREG(1) = Parrot_str_change_charset(interp, CONST(2).u.string, IREG(3));
return (opcode_t *)cur_opcode + 4;}
@@ -23195,7 +23195,7 @@
opcode_t *
Parrot_trans_charset_s_sc_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- SREG(1) = Parrot_str_change_charset(interp, CONST(2)->u.string, cur_opcode[3]);
+ SREG(1) = Parrot_str_change_charset(interp, CONST(2).u.string, cur_opcode[3]);
return (opcode_t *)cur_opcode + 4;}
@@ -23209,7 +23209,7 @@
opcode_t *
Parrot_encoding_i_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = Parrot_encoding_number_of_str(interp, CONST(2)->u.string);
+ IREG(1) = Parrot_encoding_number_of_str(interp, CONST(2).u.string);
return (opcode_t *)cur_opcode + 3;}
@@ -23243,11 +23243,11 @@
opcode_t *
Parrot_find_encoding_i_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- const INTVAL n = Parrot_encoding_number(interp, CONST(2)->u.string);
+ const INTVAL n = Parrot_encoding_number(interp, CONST(2).u.string);
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;
@@ -23263,7 +23263,7 @@
opcode_t *
Parrot_trans_encoding_s_sc_i(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- SREG(1) = Parrot_str_change_encoding(interp, CONST(2)->u.string, IREG(3));
+ SREG(1) = Parrot_str_change_encoding(interp, CONST(2).u.string, IREG(3));
return (opcode_t *)cur_opcode + 4;}
@@ -23277,7 +23277,7 @@
opcode_t *
Parrot_trans_encoding_s_sc_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- SREG(1) = Parrot_str_change_encoding(interp, CONST(2)->u.string, cur_opcode[3]);
+ SREG(1) = Parrot_str_change_encoding(interp, CONST(2).u.string, cur_opcode[3]);
return (opcode_t *)cur_opcode + 4;}
@@ -23298,14 +23298,14 @@
opcode_t *
Parrot_is_cclass_i_i_sc_i(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = Parrot_str_is_cclass(interp, IREG(2), CONST(3)->u.string, IREG(4));
+ IREG(1) = Parrot_str_is_cclass(interp, IREG(2), CONST(3).u.string, IREG(4));
return (opcode_t *)cur_opcode + 5;}
opcode_t *
Parrot_is_cclass_i_ic_sc_i(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = Parrot_str_is_cclass(interp, cur_opcode[2], CONST(3)->u.string, IREG(4));
+ IREG(1) = Parrot_str_is_cclass(interp, cur_opcode[2], CONST(3).u.string, IREG(4));
return (opcode_t *)cur_opcode + 5;}
@@ -23326,14 +23326,14 @@
opcode_t *
Parrot_is_cclass_i_i_sc_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = Parrot_str_is_cclass(interp, IREG(2), CONST(3)->u.string, cur_opcode[4]);
+ IREG(1) = Parrot_str_is_cclass(interp, IREG(2), CONST(3).u.string, cur_opcode[4]);
return (opcode_t *)cur_opcode + 5;}
opcode_t *
Parrot_is_cclass_i_ic_sc_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = Parrot_str_is_cclass(interp, cur_opcode[2], CONST(3)->u.string, cur_opcode[4]);
+ IREG(1) = Parrot_str_is_cclass(interp, cur_opcode[2], CONST(3).u.string, cur_opcode[4]);
return (opcode_t *)cur_opcode + 5;}
@@ -23354,14 +23354,14 @@
opcode_t *
Parrot_find_cclass_i_i_sc_i_i(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = Parrot_str_find_cclass(interp, IREG(2), CONST(3)->u.string, IREG(4), IREG(5));
+ IREG(1) = Parrot_str_find_cclass(interp, IREG(2), CONST(3).u.string, IREG(4), IREG(5));
return (opcode_t *)cur_opcode + 6;}
opcode_t *
Parrot_find_cclass_i_ic_sc_i_i(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = Parrot_str_find_cclass(interp, cur_opcode[2], CONST(3)->u.string, IREG(4), IREG(5));
+ IREG(1) = Parrot_str_find_cclass(interp, cur_opcode[2], CONST(3).u.string, IREG(4), IREG(5));
return (opcode_t *)cur_opcode + 6;}
@@ -23382,14 +23382,14 @@
opcode_t *
Parrot_find_cclass_i_i_sc_ic_i(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = Parrot_str_find_cclass(interp, IREG(2), CONST(3)->u.string, cur_opcode[4], IREG(5));
+ IREG(1) = Parrot_str_find_cclass(interp, IREG(2), CONST(3).u.string, cur_opcode[4], IREG(5));
return (opcode_t *)cur_opcode + 6;}
opcode_t *
Parrot_find_cclass_i_ic_sc_ic_i(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = Parrot_str_find_cclass(interp, cur_opcode[2], CONST(3)->u.string, cur_opcode[4], IREG(5));
+ IREG(1) = Parrot_str_find_cclass(interp, cur_opcode[2], CONST(3).u.string, cur_opcode[4], IREG(5));
return (opcode_t *)cur_opcode + 6;}
@@ -23410,14 +23410,14 @@
opcode_t *
Parrot_find_cclass_i_i_sc_i_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = Parrot_str_find_cclass(interp, IREG(2), CONST(3)->u.string, IREG(4), cur_opcode[5]);
+ IREG(1) = Parrot_str_find_cclass(interp, IREG(2), CONST(3).u.string, IREG(4), cur_opcode[5]);
return (opcode_t *)cur_opcode + 6;}
opcode_t *
Parrot_find_cclass_i_ic_sc_i_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = Parrot_str_find_cclass(interp, cur_opcode[2], CONST(3)->u.string, IREG(4), cur_opcode[5]);
+ IREG(1) = Parrot_str_find_cclass(interp, cur_opcode[2], CONST(3).u.string, IREG(4), cur_opcode[5]);
return (opcode_t *)cur_opcode + 6;}
@@ -23438,14 +23438,14 @@
opcode_t *
Parrot_find_cclass_i_i_sc_ic_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = Parrot_str_find_cclass(interp, IREG(2), CONST(3)->u.string, cur_opcode[4], cur_opcode[5]);
+ IREG(1) = Parrot_str_find_cclass(interp, IREG(2), CONST(3).u.string, cur_opcode[4], cur_opcode[5]);
return (opcode_t *)cur_opcode + 6;}
opcode_t *
Parrot_find_cclass_i_ic_sc_ic_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = Parrot_str_find_cclass(interp, cur_opcode[2], CONST(3)->u.string, cur_opcode[4], cur_opcode[5]);
+ IREG(1) = Parrot_str_find_cclass(interp, cur_opcode[2], CONST(3).u.string, cur_opcode[4], cur_opcode[5]);
return (opcode_t *)cur_opcode + 6;}
@@ -23466,14 +23466,14 @@
opcode_t *
Parrot_find_not_cclass_i_i_sc_i_i(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = Parrot_str_find_not_cclass(interp, IREG(2), CONST(3)->u.string, IREG(4), IREG(5));
+ IREG(1) = Parrot_str_find_not_cclass(interp, IREG(2), CONST(3).u.string, IREG(4), IREG(5));
return (opcode_t *)cur_opcode + 6;}
opcode_t *
Parrot_find_not_cclass_i_ic_sc_i_i(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = Parrot_str_find_not_cclass(interp, cur_opcode[2], CONST(3)->u.string, IREG(4), IREG(5));
+ IREG(1) = Parrot_str_find_not_cclass(interp, cur_opcode[2], CONST(3).u.string, IREG(4), IREG(5));
return (opcode_t *)cur_opcode + 6;}
@@ -23494,14 +23494,14 @@
opcode_t *
Parrot_find_not_cclass_i_i_sc_ic_i(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = Parrot_str_find_not_cclass(interp, IREG(2), CONST(3)->u.string, cur_opcode[4], IREG(5));
+ IREG(1) = Parrot_str_find_not_cclass(interp, IREG(2), CONST(3).u.string, cur_opcode[4], IREG(5));
return (opcode_t *)cur_opcode + 6;}
opcode_t *
Parrot_find_not_cclass_i_ic_sc_ic_i(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = Parrot_str_find_not_cclass(interp, cur_opcode[2], CONST(3)->u.string, cur_opcode[4], IREG(5));
+ IREG(1) = Parrot_str_find_not_cclass(interp, cur_opcode[2], CONST(3).u.string, cur_opcode[4], IREG(5));
return (opcode_t *)cur_opcode + 6;}
@@ -23522,14 +23522,14 @@
opcode_t *
Parrot_find_not_cclass_i_i_sc_i_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = Parrot_str_find_not_cclass(interp, IREG(2), CONST(3)->u.string, IREG(4), cur_opcode[5]);
+ IREG(1) = Parrot_str_find_not_cclass(interp, IREG(2), CONST(3).u.string, IREG(4), cur_opcode[5]);
return (opcode_t *)cur_opcode + 6;}
opcode_t *
Parrot_find_not_cclass_i_ic_sc_i_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = Parrot_str_find_not_cclass(interp, cur_opcode[2], CONST(3)->u.string, IREG(4), cur_opcode[5]);
+ IREG(1) = Parrot_str_find_not_cclass(interp, cur_opcode[2], CONST(3).u.string, IREG(4), cur_opcode[5]);
return (opcode_t *)cur_opcode + 6;}
@@ -23550,14 +23550,14 @@
opcode_t *
Parrot_find_not_cclass_i_i_sc_ic_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = Parrot_str_find_not_cclass(interp, IREG(2), CONST(3)->u.string, cur_opcode[4], cur_opcode[5]);
+ IREG(1) = Parrot_str_find_not_cclass(interp, IREG(2), CONST(3).u.string, cur_opcode[4], cur_opcode[5]);
return (opcode_t *)cur_opcode + 6;}
opcode_t *
Parrot_find_not_cclass_i_ic_sc_ic_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = Parrot_str_find_not_cclass(interp, cur_opcode[2], CONST(3)->u.string, cur_opcode[4], cur_opcode[5]);
+ IREG(1) = Parrot_str_find_not_cclass(interp, cur_opcode[2], CONST(3).u.string, cur_opcode[4], cur_opcode[5]);
return (opcode_t *)cur_opcode + 6;}
@@ -23578,7 +23578,7 @@
opcode_t *
Parrot_compose_s_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- SREG(1) = Parrot_str_compose(interp, CONST(2)->u.string);
+ SREG(1) = Parrot_str_compose(interp, CONST(2).u.string);
return (opcode_t *)cur_opcode + 3;}
@@ -23592,7 +23592,7 @@
opcode_t *
Parrot_spawnw_i_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = Parrot_Run_OS_Command(interp, CONST(2)->u.string);
+ IREG(1) = Parrot_Run_OS_Command(interp, CONST(2).u.string);
return (opcode_t *)cur_opcode + 3;}
@@ -23688,12 +23688,12 @@
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;
- if (CONST(1)->u.number < 0.0) {
+ 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;
}
- 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 *
@@ -23716,7 +23716,7 @@
Parrot_store_lex_sc_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const ctx = CURRENT_CONTEXT(interp);
- STRING * const lex_name = CONST(1)->u.string;
+ STRING * const lex_name = CONST(1).u.string;
PMC * const lex_pad = Parrot_find_pad(interp, lex_name, ctx);
if (PMC_IS_NULL(lex_pad)) {
@@ -23751,7 +23751,7 @@
opcode_t *
Parrot_store_dynamic_lex_sc_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- STRING * const lex_name = CONST(1)->u.string;
+ STRING * const lex_name = CONST(1).u.string;
PMC * const ctx =
Parrot_pcc_get_caller_ctx(interp, CURRENT_CONTEXT(interp));
PMC * const lex_pad =
@@ -23792,7 +23792,7 @@
Parrot_find_lex_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const ctx = CURRENT_CONTEXT(interp);
- STRING * const lex_name = CONST(2)->u.string;
+ STRING * const lex_name = CONST(2).u.string;
PMC * const lex_pad = Parrot_find_pad(interp, lex_name, ctx);
PMC * const result =
@@ -23829,7 +23829,7 @@
opcode_t *
Parrot_find_dynamic_lex_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- STRING * const lex_name = CONST(2)->u.string;
+ STRING * const lex_name = CONST(2).u.string;
PMC * const ctx =
Parrot_pcc_get_caller_ctx(interp, CURRENT_CONTEXT(interp));
PMC * const lex_pad =
@@ -23868,7 +23868,7 @@
opcode_t *
Parrot_find_caller_lex_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- STRING * const lex_name = CONST(2)->u.string;
+ STRING * const lex_name = CONST(2).u.string;
PMC * ctx = CURRENT_CONTEXT(interp);
PMC * result = PMCNULL;
@@ -23908,7 +23908,7 @@
Parrot_get_namespace_p_pc(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));
- PMC * const ns = Parrot_ns_get_namespace_keyed(interp, cur_ns, CONST(2)->u.key);
+ PMC * const ns = Parrot_ns_get_namespace_keyed(interp, cur_ns, CONST(2).u.key);
PREG(1) = PMC_IS_NULL(ns) ? PMCNULL : ns;
@@ -23942,7 +23942,7 @@
if (PMC_IS_NULL(hll_ns))
PREG(1) = PMCNULL;
else {
- PMC * const ns = Parrot_ns_get_namespace_keyed(interp, hll_ns, CONST(2)->u.key);
+ PMC * const ns = Parrot_ns_get_namespace_keyed(interp, hll_ns, CONST(2).u.key);
PREG(1) = ns;
}
@@ -23976,7 +23976,7 @@
if (PMC_IS_NULL(root_ns))
PREG(1) = PMCNULL;
else {
- PMC * const ns = Parrot_ns_get_namespace_keyed(interp, root_ns, CONST(2)->u.key);
+ PMC * const ns = Parrot_ns_get_namespace_keyed(interp, root_ns, CONST(2).u.key);
PREG(1) = ns;
}
@@ -23994,7 +23994,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_ns_find_global_from_op(interp, cur_ns, CONST(2)->u.string, cur_opcode + 3);
+ PREG(1) = Parrot_ns_find_global_from_op(interp, cur_ns, CONST(2).u.string, cur_opcode + 3);
return (opcode_t *)cur_opcode + 3;}
@@ -24023,7 +24023,7 @@
PREG(1) = PMCNULL;
}
else {
- PMC * const ns = Parrot_ns_get_namespace_keyed(interp, cur_ns, CONST(2)->u.key);
+ PMC * const ns = Parrot_ns_get_namespace_keyed(interp, cur_ns, CONST(2).u.key);
if (PMC_IS_NULL(ns))
PREG(1) = PMCNULL;
else
@@ -24044,7 +24044,7 @@
if (PMC_IS_NULL(ns))
PREG(1) = PMCNULL;
else
- PREG(1) = Parrot_ns_find_global_from_op(interp, ns, CONST(3)->u.string, cur_opcode + 4);
+ PREG(1) = Parrot_ns_find_global_from_op(interp, ns, CONST(3).u.string, cur_opcode + 4);
}
return (opcode_t *)cur_opcode + 4;}
@@ -24057,11 +24057,11 @@
PREG(1) = PMCNULL;
}
else {
- PMC * const ns = Parrot_ns_get_namespace_keyed(interp, cur_ns, CONST(2)->u.key);
+ PMC * const ns = Parrot_ns_get_namespace_keyed(interp, cur_ns, CONST(2).u.key);
if (PMC_IS_NULL(ns))
PREG(1) = PMCNULL;
else
- PREG(1) = Parrot_ns_find_global_from_op(interp, ns, CONST(3)->u.string, cur_opcode + 4);
+ PREG(1) = Parrot_ns_find_global_from_op(interp, ns, CONST(3).u.string, cur_opcode + 4);
}
return (opcode_t *)cur_opcode + 4;}
@@ -24078,7 +24078,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_ns_find_global_from_op(interp, hll_ns, CONST(2)->u.string, cur_opcode + 3);
+ PREG(1) = Parrot_ns_find_global_from_op(interp, hll_ns, CONST(2).u.string, cur_opcode + 3);
return (opcode_t *)cur_opcode + 3;}
@@ -24107,7 +24107,7 @@
PREG(1) = hll_ns;
}
else {
- PMC * const ns = Parrot_ns_get_namespace_keyed(interp, hll_ns, CONST(2)->u.key);
+ PMC * const ns = Parrot_ns_get_namespace_keyed(interp, hll_ns, CONST(2).u.key);
if (PMC_IS_NULL(ns))
PREG(1) = PMCNULL;
else
@@ -24128,7 +24128,7 @@
if (PMC_IS_NULL(ns))
PREG(1) = PMCNULL;
else
- PREG(1) = Parrot_ns_find_global_from_op(interp, ns, CONST(3)->u.string, cur_opcode + 4);
+ PREG(1) = Parrot_ns_find_global_from_op(interp, ns, CONST(3).u.string, cur_opcode + 4);
}
return (opcode_t *)cur_opcode + 4;}
@@ -24141,11 +24141,11 @@
PREG(1) = hll_ns;
}
else {
- PMC * const ns = Parrot_ns_get_namespace_keyed(interp, hll_ns, CONST(2)->u.key);
+ PMC * const ns = Parrot_ns_get_namespace_keyed(interp, hll_ns, CONST(2).u.key);
if (PMC_IS_NULL(ns))
PREG(1) = PMCNULL;
else
- PREG(1) = Parrot_ns_find_global_from_op(interp, ns, CONST(3)->u.string, cur_opcode + 4);
+ PREG(1) = Parrot_ns_find_global_from_op(interp, ns, CONST(3).u.string, cur_opcode + 4);
}
return (opcode_t *)cur_opcode + 4;}
@@ -24162,7 +24162,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_ns_find_global_from_op(interp, root_ns, CONST(2)->u.string, cur_opcode + 3);
+ PREG(1) = Parrot_ns_find_global_from_op(interp, root_ns, CONST(2).u.string, cur_opcode + 3);
return (opcode_t *)cur_opcode + 3;}
@@ -24189,7 +24189,7 @@
if (PMC_IS_NULL(root_ns))
PREG(1) = PMCNULL;
else {
- PMC * const ns = Parrot_ns_get_namespace_keyed(interp, root_ns, CONST(2)->u.key);
+ PMC * const ns = Parrot_ns_get_namespace_keyed(interp, root_ns, CONST(2).u.key);
if (PMC_IS_NULL(ns))
PREG(1) = PMCNULL;
else
@@ -24209,7 +24209,7 @@
if (PMC_IS_NULL(ns))
PREG(1) = PMCNULL;
else
- PREG(1) = Parrot_ns_find_global_from_op(interp, ns, CONST(3)->u.string, cur_opcode + 4);
+ PREG(1) = Parrot_ns_find_global_from_op(interp, ns, CONST(3).u.string, cur_opcode + 4);
}
return (opcode_t *)cur_opcode + 4;}
@@ -24221,11 +24221,11 @@
if (PMC_IS_NULL(root_ns))
PREG(1) = PMCNULL;
else {
- PMC * const ns = Parrot_ns_get_namespace_keyed(interp, root_ns, CONST(2)->u.key);
+ PMC * const ns = Parrot_ns_get_namespace_keyed(interp, root_ns, CONST(2).u.key);
if (PMC_IS_NULL(ns))
PREG(1) = PMCNULL;
else
- PREG(1) = Parrot_ns_find_global_from_op(interp, ns, CONST(3)->u.string, cur_opcode + 4);
+ PREG(1) = Parrot_ns_find_global_from_op(interp, ns, CONST(3).u.string, cur_opcode + 4);
}
return (opcode_t *)cur_opcode + 4;}
@@ -24242,7 +24242,7 @@
Parrot_set_global_sc_p(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));
- Parrot_ns_set_global(interp, cur_ns, CONST(1)->u.string, PREG(2));
+ Parrot_ns_set_global(interp, cur_ns, CONST(1).u.string, PREG(2));
return (opcode_t *)cur_opcode + 3;}
@@ -24260,7 +24260,7 @@
Parrot_set_global_pc_s_p(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));
- PMC * const ns = Parrot_ns_make_namespace_keyed(interp, cur_ns, CONST(1)->u.key);
+ PMC * const ns = Parrot_ns_make_namespace_keyed(interp, cur_ns, CONST(1).u.key);
Parrot_ns_set_global(interp, ns, SREG(2), PREG(3));
@@ -24272,7 +24272,7 @@
PMC * const cur_ns = Parrot_pcc_get_namespace(interp, CURRENT_CONTEXT(interp));
PMC * const ns = Parrot_ns_make_namespace_keyed(interp, cur_ns, PREG(1));
- Parrot_ns_set_global(interp, ns, CONST(2)->u.string, PREG(3));
+ Parrot_ns_set_global(interp, ns, CONST(2).u.string, PREG(3));
return (opcode_t *)cur_opcode + 4;}
@@ -24280,9 +24280,9 @@
Parrot_set_global_pc_sc_p(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));
- PMC * const ns = Parrot_ns_make_namespace_keyed(interp, cur_ns, CONST(1)->u.key);
+ PMC * const ns = Parrot_ns_make_namespace_keyed(interp, cur_ns, CONST(1).u.key);
- Parrot_ns_set_global(interp, ns, CONST(2)->u.string, PREG(3));
+ Parrot_ns_set_global(interp, ns, CONST(2).u.string, PREG(3));
return (opcode_t *)cur_opcode + 4;}
@@ -24298,7 +24298,7 @@
Parrot_set_hll_global_sc_p(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);
- Parrot_ns_set_global(interp, hll_ns, CONST(1)->u.string, PREG(2));
+ Parrot_ns_set_global(interp, hll_ns, CONST(1).u.string, PREG(2));
return (opcode_t *)cur_opcode + 3;}
@@ -24316,7 +24316,7 @@
Parrot_set_hll_global_pc_s_p(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);
- PMC * const ns = Parrot_ns_make_namespace_keyed(interp, hll_ns, CONST(1)->u.key);
+ PMC * const ns = Parrot_ns_make_namespace_keyed(interp, hll_ns, CONST(1).u.key);
Parrot_ns_set_global(interp, ns, SREG(2), PREG(3));
@@ -24328,7 +24328,7 @@
PMC * const hll_ns = Parrot_get_ctx_HLL_namespace(interp);
PMC * const ns = Parrot_ns_make_namespace_keyed(interp, hll_ns, PREG(1));
- Parrot_ns_set_global(interp, ns, CONST(2)->u.string, PREG(3));
+ Parrot_ns_set_global(interp, ns, CONST(2).u.string, PREG(3));
return (opcode_t *)cur_opcode + 4;}
@@ -24336,9 +24336,9 @@
Parrot_set_hll_global_pc_sc_p(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);
- PMC * const ns = Parrot_ns_make_namespace_keyed(interp, hll_ns, CONST(1)->u.key);
+ PMC * const ns = Parrot_ns_make_namespace_keyed(interp, hll_ns, CONST(1).u.key);
- Parrot_ns_set_global(interp, ns, CONST(2)->u.string, PREG(3));
+ Parrot_ns_set_global(interp, ns, CONST(2).u.string, PREG(3));
return (opcode_t *)cur_opcode + 4;}
@@ -24354,7 +24354,7 @@
Parrot_set_root_global_sc_p(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;
- Parrot_ns_set_global(interp, root_ns, CONST(1)->u.string, PREG(2));
+ Parrot_ns_set_global(interp, root_ns, CONST(1).u.string, PREG(2));
return (opcode_t *)cur_opcode + 3;}
@@ -24372,7 +24372,7 @@
Parrot_set_root_global_pc_s_p(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;
- PMC * const ns = Parrot_ns_make_namespace_keyed(interp, root_ns, CONST(1)->u.key);
+ PMC * const ns = Parrot_ns_make_namespace_keyed(interp, root_ns, CONST(1).u.key);
Parrot_ns_set_global(interp, ns, SREG(2), PREG(3));
@@ -24384,7 +24384,7 @@
PMC * const root_ns = interp->root_namespace;
PMC * const ns = Parrot_ns_make_namespace_keyed(interp, root_ns, PREG(1));
- Parrot_ns_set_global(interp, ns, CONST(2)->u.string, PREG(3));
+ Parrot_ns_set_global(interp, ns, CONST(2).u.string, PREG(3));
return (opcode_t *)cur_opcode + 4;}
@@ -24392,9 +24392,9 @@
Parrot_set_root_global_pc_sc_p(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;
- PMC * const ns = Parrot_ns_make_namespace_keyed(interp, root_ns, CONST(1)->u.key);
+ PMC * const ns = Parrot_ns_make_namespace_keyed(interp, root_ns, CONST(1).u.key);
- Parrot_ns_set_global(interp, ns, CONST(2)->u.string, PREG(3));
+ Parrot_ns_set_global(interp, ns, CONST(2).u.string, PREG(3));
return (opcode_t *)cur_opcode + 4;}
@@ -24414,13 +24414,13 @@
opcode_t *
Parrot_find_name_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- if (!CONST(2)->u.string) {
+ 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;
}
- PREG(1) = Parrot_ns_find_named_item(interp, CONST(2)->u.string, cur_opcode + 3);
+ PREG(1) = Parrot_ns_find_named_item(interp, CONST(2).u.string, cur_opcode + 3);
return (opcode_t *)cur_opcode + 3;}
@@ -24446,14 +24446,14 @@
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;
- PMC *sub = Parrot_ns_find_named_item(interp, CONST(2)->u.string, dest);
+ PMC *sub = Parrot_ns_find_named_item(interp, CONST(2).u.string, dest);
if (PMC_IS_NULL(sub)) {
opcode_t *handler;
Parrot_pcc_set_pc_func(interp, CURRENT_CONTEXT(interp), dest);
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;
@@ -24512,7 +24512,7 @@
opcode_t *
Parrot_fetch_p_pc_p_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_get_pmc_keyed(interp, CONST(2)->u.key, PREG(3));
+ PREG(1) = VTABLE_get_pmc_keyed(interp, CONST(2).u.key, PREG(3));
if (PMC_IS_NULL(PREG(1))) {
PMC * const classobj = Parrot_oo_get_class(interp, PREG(4));
if (!PMC_IS_NULL(classobj))
@@ -24534,7 +24534,7 @@
opcode_t *
Parrot_fetch_p_p_pc_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_get_pmc_keyed(interp, PREG(2), CONST(3)->u.key);
+ PREG(1) = VTABLE_get_pmc_keyed(interp, PREG(2), CONST(3).u.key);
if (PMC_IS_NULL(PREG(1))) {
PMC * const classobj = Parrot_oo_get_class(interp, PREG(4));
if (!PMC_IS_NULL(classobj))
@@ -24556,7 +24556,7 @@
opcode_t *
Parrot_fetch_p_pc_pc_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_get_pmc_keyed(interp, CONST(2)->u.key, CONST(3)->u.key);
+ PREG(1) = VTABLE_get_pmc_keyed(interp, CONST(2).u.key, CONST(3).u.key);
if (PMC_IS_NULL(PREG(1))) {
PMC * const classobj = Parrot_oo_get_class(interp, PREG(4));
if (!PMC_IS_NULL(classobj))
@@ -24580,15 +24580,15 @@
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PREG(1) = VTABLE_get_pmc_keyed(interp, PREG(2), PREG(3));
if (PMC_IS_NULL(PREG(1))) {
- PMC * const classobj = Parrot_oo_get_class(interp, CONST(4)->u.key);
+ PMC * const classobj = Parrot_oo_get_class(interp, CONST(4).u.key);
if (!PMC_IS_NULL(classobj))
PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL);
else {
- const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
+ 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;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4).u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24600,17 +24600,17 @@
opcode_t *
Parrot_fetch_p_pc_p_pc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_get_pmc_keyed(interp, CONST(2)->u.key, PREG(3));
+ PREG(1) = VTABLE_get_pmc_keyed(interp, CONST(2).u.key, PREG(3));
if (PMC_IS_NULL(PREG(1))) {
- PMC * const classobj = Parrot_oo_get_class(interp, CONST(4)->u.key);
+ PMC * const classobj = Parrot_oo_get_class(interp, CONST(4).u.key);
if (!PMC_IS_NULL(classobj))
PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL);
else {
- const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
+ 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;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4).u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24622,17 +24622,17 @@
opcode_t *
Parrot_fetch_p_p_pc_pc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_get_pmc_keyed(interp, PREG(2), CONST(3)->u.key);
+ PREG(1) = VTABLE_get_pmc_keyed(interp, PREG(2), CONST(3).u.key);
if (PMC_IS_NULL(PREG(1))) {
- PMC * const classobj = Parrot_oo_get_class(interp, CONST(4)->u.key);
+ PMC * const classobj = Parrot_oo_get_class(interp, CONST(4).u.key);
if (!PMC_IS_NULL(classobj))
PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL);
else {
- const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
+ 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;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4).u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24644,17 +24644,17 @@
opcode_t *
Parrot_fetch_p_pc_pc_pc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_get_pmc_keyed(interp, CONST(2)->u.key, CONST(3)->u.key);
+ PREG(1) = VTABLE_get_pmc_keyed(interp, CONST(2).u.key, CONST(3).u.key);
if (PMC_IS_NULL(PREG(1))) {
- PMC * const classobj = Parrot_oo_get_class(interp, CONST(4)->u.key);
+ PMC * const classobj = Parrot_oo_get_class(interp, CONST(4).u.key);
if (!PMC_IS_NULL(classobj))
PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL);
else {
- const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
+ 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;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4).u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24688,7 +24688,7 @@
opcode_t *
Parrot_fetch_p_pc_i_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_get_pmc_keyed_int(interp, CONST(2)->u.key, IREG(3));
+ PREG(1) = VTABLE_get_pmc_keyed_int(interp, CONST(2).u.key, IREG(3));
if (PMC_IS_NULL(PREG(1))) {
PMC * const classobj = Parrot_oo_get_class(interp, PREG(4));
if (!PMC_IS_NULL(classobj))
@@ -24732,7 +24732,7 @@
opcode_t *
Parrot_fetch_p_pc_ic_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_get_pmc_keyed_int(interp, CONST(2)->u.key, cur_opcode[3]);
+ PREG(1) = VTABLE_get_pmc_keyed_int(interp, CONST(2).u.key, cur_opcode[3]);
if (PMC_IS_NULL(PREG(1))) {
PMC * const classobj = Parrot_oo_get_class(interp, PREG(4));
if (!PMC_IS_NULL(classobj))
@@ -24756,15 +24756,15 @@
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PREG(1) = VTABLE_get_pmc_keyed_int(interp, PREG(2), IREG(3));
if (PMC_IS_NULL(PREG(1))) {
- PMC * const classobj = Parrot_oo_get_class(interp, CONST(4)->u.key);
+ PMC * const classobj = Parrot_oo_get_class(interp, CONST(4).u.key);
if (!PMC_IS_NULL(classobj))
PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL);
else {
- const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
+ 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;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4).u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24776,17 +24776,17 @@
opcode_t *
Parrot_fetch_p_pc_i_pc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_get_pmc_keyed_int(interp, CONST(2)->u.key, IREG(3));
+ PREG(1) = VTABLE_get_pmc_keyed_int(interp, CONST(2).u.key, IREG(3));
if (PMC_IS_NULL(PREG(1))) {
- PMC * const classobj = Parrot_oo_get_class(interp, CONST(4)->u.key);
+ PMC * const classobj = Parrot_oo_get_class(interp, CONST(4).u.key);
if (!PMC_IS_NULL(classobj))
PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL);
else {
- const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
+ 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;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4).u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24800,15 +24800,15 @@
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PREG(1) = VTABLE_get_pmc_keyed_int(interp, PREG(2), cur_opcode[3]);
if (PMC_IS_NULL(PREG(1))) {
- PMC * const classobj = Parrot_oo_get_class(interp, CONST(4)->u.key);
+ PMC * const classobj = Parrot_oo_get_class(interp, CONST(4).u.key);
if (!PMC_IS_NULL(classobj))
PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL);
else {
- const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
+ 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;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4).u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24820,17 +24820,17 @@
opcode_t *
Parrot_fetch_p_pc_ic_pc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_get_pmc_keyed_int(interp, CONST(2)->u.key, cur_opcode[3]);
+ PREG(1) = VTABLE_get_pmc_keyed_int(interp, CONST(2).u.key, cur_opcode[3]);
if (PMC_IS_NULL(PREG(1))) {
- PMC * const classobj = Parrot_oo_get_class(interp, CONST(4)->u.key);
+ PMC * const classobj = Parrot_oo_get_class(interp, CONST(4).u.key);
if (!PMC_IS_NULL(classobj))
PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL);
else {
- const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
+ 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;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4).u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24864,7 +24864,7 @@
opcode_t *
Parrot_fetch_p_pc_s_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_get_pmc_keyed_str(interp, CONST(2)->u.key, SREG(3));
+ PREG(1) = VTABLE_get_pmc_keyed_str(interp, CONST(2).u.key, SREG(3));
if (PMC_IS_NULL(PREG(1))) {
PMC * const classobj = Parrot_oo_get_class(interp, PREG(4));
if (!PMC_IS_NULL(classobj))
@@ -24886,7 +24886,7 @@
opcode_t *
Parrot_fetch_p_p_sc_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_get_pmc_keyed_str(interp, PREG(2), CONST(3)->u.string);
+ PREG(1) = VTABLE_get_pmc_keyed_str(interp, PREG(2), CONST(3).u.string);
if (PMC_IS_NULL(PREG(1))) {
PMC * const classobj = Parrot_oo_get_class(interp, PREG(4));
if (!PMC_IS_NULL(classobj))
@@ -24908,7 +24908,7 @@
opcode_t *
Parrot_fetch_p_pc_sc_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_get_pmc_keyed_str(interp, CONST(2)->u.key, CONST(3)->u.string);
+ PREG(1) = VTABLE_get_pmc_keyed_str(interp, CONST(2).u.key, CONST(3).u.string);
if (PMC_IS_NULL(PREG(1))) {
PMC * const classobj = Parrot_oo_get_class(interp, PREG(4));
if (!PMC_IS_NULL(classobj))
@@ -24932,15 +24932,15 @@
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PREG(1) = VTABLE_get_pmc_keyed_str(interp, PREG(2), SREG(3));
if (PMC_IS_NULL(PREG(1))) {
- PMC * const classobj = Parrot_oo_get_class(interp, CONST(4)->u.key);
+ PMC * const classobj = Parrot_oo_get_class(interp, CONST(4).u.key);
if (!PMC_IS_NULL(classobj))
PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL);
else {
- const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
+ 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;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4).u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24952,17 +24952,17 @@
opcode_t *
Parrot_fetch_p_pc_s_pc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_get_pmc_keyed_str(interp, CONST(2)->u.key, SREG(3));
+ PREG(1) = VTABLE_get_pmc_keyed_str(interp, CONST(2).u.key, SREG(3));
if (PMC_IS_NULL(PREG(1))) {
- PMC * const classobj = Parrot_oo_get_class(interp, CONST(4)->u.key);
+ PMC * const classobj = Parrot_oo_get_class(interp, CONST(4).u.key);
if (!PMC_IS_NULL(classobj))
PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL);
else {
- const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
+ 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;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4).u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24974,17 +24974,17 @@
opcode_t *
Parrot_fetch_p_p_sc_pc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_get_pmc_keyed_str(interp, PREG(2), CONST(3)->u.string);
+ PREG(1) = VTABLE_get_pmc_keyed_str(interp, PREG(2), CONST(3).u.string);
if (PMC_IS_NULL(PREG(1))) {
- PMC * const classobj = Parrot_oo_get_class(interp, CONST(4)->u.key);
+ PMC * const classobj = Parrot_oo_get_class(interp, CONST(4).u.key);
if (!PMC_IS_NULL(classobj))
PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL);
else {
- const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
+ 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;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4).u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -24996,17 +24996,17 @@
opcode_t *
Parrot_fetch_p_pc_sc_pc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_get_pmc_keyed_str(interp, CONST(2)->u.key, CONST(3)->u.string);
+ PREG(1) = VTABLE_get_pmc_keyed_str(interp, CONST(2).u.key, CONST(3).u.string);
if (PMC_IS_NULL(PREG(1))) {
- PMC * const classobj = Parrot_oo_get_class(interp, CONST(4)->u.key);
+ PMC * const classobj = Parrot_oo_get_class(interp, CONST(4).u.key);
if (!PMC_IS_NULL(classobj))
PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL);
else {
- const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
+ 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;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4).u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -25043,7 +25043,7 @@
opcode_t *
Parrot_vivify_p_pc_p_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_get_pmc_keyed(interp, CONST(2)->u.key, PREG(3));
+ PREG(1) = VTABLE_get_pmc_keyed(interp, CONST(2).u.key, PREG(3));
if (PMC_IS_NULL(PREG(1))) {
PMC * const classobj = Parrot_oo_get_class(interp, PREG(4));
@@ -25060,7 +25060,7 @@
PREG(1) = Parrot_pmc_new(interp, type);
}
- VTABLE_set_pmc_keyed(interp, CONST(2)->u.key, PREG(3), PREG(1));
+ VTABLE_set_pmc_keyed(interp, CONST(2).u.key, PREG(3), PREG(1));
}
return (opcode_t *)cur_opcode + 5;}
@@ -25068,7 +25068,7 @@
opcode_t *
Parrot_vivify_p_p_pc_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_get_pmc_keyed(interp, PREG(2), CONST(3)->u.key);
+ PREG(1) = VTABLE_get_pmc_keyed(interp, PREG(2), CONST(3).u.key);
if (PMC_IS_NULL(PREG(1))) {
PMC * const classobj = Parrot_oo_get_class(interp, PREG(4));
@@ -25085,7 +25085,7 @@
PREG(1) = Parrot_pmc_new(interp, type);
}
- VTABLE_set_pmc_keyed(interp, PREG(2), CONST(3)->u.key, PREG(1));
+ VTABLE_set_pmc_keyed(interp, PREG(2), CONST(3).u.key, PREG(1));
}
return (opcode_t *)cur_opcode + 5;}
@@ -25093,7 +25093,7 @@
opcode_t *
Parrot_vivify_p_pc_pc_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_get_pmc_keyed(interp, CONST(2)->u.key, CONST(3)->u.key);
+ PREG(1) = VTABLE_get_pmc_keyed(interp, CONST(2).u.key, CONST(3).u.key);
if (PMC_IS_NULL(PREG(1))) {
PMC * const classobj = Parrot_oo_get_class(interp, PREG(4));
@@ -25110,7 +25110,7 @@
PREG(1) = Parrot_pmc_new(interp, type);
}
- VTABLE_set_pmc_keyed(interp, CONST(2)->u.key, CONST(3)->u.key, PREG(1));
+ VTABLE_set_pmc_keyed(interp, CONST(2).u.key, CONST(3).u.key, PREG(1));
}
return (opcode_t *)cur_opcode + 5;}
@@ -25121,16 +25121,16 @@
PREG(1) = VTABLE_get_pmc_keyed(interp, PREG(2), PREG(3));
if (PMC_IS_NULL(PREG(1))) {
- PMC * const classobj = Parrot_oo_get_class(interp, CONST(4)->u.key);
+ PMC * const classobj = Parrot_oo_get_class(interp, CONST(4).u.key);
if (!PMC_IS_NULL(classobj))
PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL);
else {
- const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
+ 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;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4).u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -25143,24 +25143,24 @@
opcode_t *
Parrot_vivify_p_pc_p_pc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_get_pmc_keyed(interp, CONST(2)->u.key, PREG(3));
+ PREG(1) = VTABLE_get_pmc_keyed(interp, CONST(2).u.key, PREG(3));
if (PMC_IS_NULL(PREG(1))) {
- PMC * const classobj = Parrot_oo_get_class(interp, CONST(4)->u.key);
+ PMC * const classobj = Parrot_oo_get_class(interp, CONST(4).u.key);
if (!PMC_IS_NULL(classobj))
PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL);
else {
- const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
+ 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;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4).u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
}
- VTABLE_set_pmc_keyed(interp, CONST(2)->u.key, PREG(3), PREG(1));
+ VTABLE_set_pmc_keyed(interp, CONST(2).u.key, PREG(3), PREG(1));
}
return (opcode_t *)cur_opcode + 5;}
@@ -25168,24 +25168,24 @@
opcode_t *
Parrot_vivify_p_p_pc_pc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_get_pmc_keyed(interp, PREG(2), CONST(3)->u.key);
+ PREG(1) = VTABLE_get_pmc_keyed(interp, PREG(2), CONST(3).u.key);
if (PMC_IS_NULL(PREG(1))) {
- PMC * const classobj = Parrot_oo_get_class(interp, CONST(4)->u.key);
+ PMC * const classobj = Parrot_oo_get_class(interp, CONST(4).u.key);
if (!PMC_IS_NULL(classobj))
PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL);
else {
- const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
+ 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;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4).u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
}
- VTABLE_set_pmc_keyed(interp, PREG(2), CONST(3)->u.key, PREG(1));
+ VTABLE_set_pmc_keyed(interp, PREG(2), CONST(3).u.key, PREG(1));
}
return (opcode_t *)cur_opcode + 5;}
@@ -25193,24 +25193,24 @@
opcode_t *
Parrot_vivify_p_pc_pc_pc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_get_pmc_keyed(interp, CONST(2)->u.key, CONST(3)->u.key);
+ PREG(1) = VTABLE_get_pmc_keyed(interp, CONST(2).u.key, CONST(3).u.key);
if (PMC_IS_NULL(PREG(1))) {
- PMC * const classobj = Parrot_oo_get_class(interp, CONST(4)->u.key);
+ PMC * const classobj = Parrot_oo_get_class(interp, CONST(4).u.key);
if (!PMC_IS_NULL(classobj))
PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL);
else {
- const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
+ 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;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4).u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
}
- VTABLE_set_pmc_keyed(interp, CONST(2)->u.key, CONST(3)->u.key, PREG(1));
+ VTABLE_set_pmc_keyed(interp, CONST(2).u.key, CONST(3).u.key, PREG(1));
}
return (opcode_t *)cur_opcode + 5;}
@@ -25243,7 +25243,7 @@
opcode_t *
Parrot_vivify_p_pc_i_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_get_pmc_keyed_int(interp, CONST(2)->u.key, IREG(3));
+ PREG(1) = VTABLE_get_pmc_keyed_int(interp, CONST(2).u.key, IREG(3));
if (PMC_IS_NULL(PREG(1))) {
PMC * const classobj = Parrot_oo_get_class(interp, PREG(4));
@@ -25260,7 +25260,7 @@
PREG(1) = Parrot_pmc_new(interp, type);
}
- VTABLE_set_pmc_keyed_int(interp, CONST(2)->u.key, IREG(3), PREG(1));
+ VTABLE_set_pmc_keyed_int(interp, CONST(2).u.key, IREG(3), PREG(1));
}
return (opcode_t *)cur_opcode + 5;}
@@ -25293,7 +25293,7 @@
opcode_t *
Parrot_vivify_p_pc_ic_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_get_pmc_keyed_int(interp, CONST(2)->u.key, cur_opcode[3]);
+ PREG(1) = VTABLE_get_pmc_keyed_int(interp, CONST(2).u.key, cur_opcode[3]);
if (PMC_IS_NULL(PREG(1))) {
PMC * const classobj = Parrot_oo_get_class(interp, PREG(4));
@@ -25310,7 +25310,7 @@
PREG(1) = Parrot_pmc_new(interp, type);
}
- VTABLE_set_pmc_keyed_int(interp, CONST(2)->u.key, cur_opcode[3], PREG(1));
+ VTABLE_set_pmc_keyed_int(interp, CONST(2).u.key, cur_opcode[3], PREG(1));
}
return (opcode_t *)cur_opcode + 5;}
@@ -25321,15 +25321,15 @@
PREG(1) = VTABLE_get_pmc_keyed_int(interp, PREG(2), IREG(3));
if (PMC_IS_NULL(PREG(1))) {
- PMC * const classobj = Parrot_oo_get_class(interp, CONST(4)->u.key);
+ PMC * const classobj = Parrot_oo_get_class(interp, CONST(4).u.key);
if (!PMC_IS_NULL(classobj))
PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL);
else {
- const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
+ 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;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4).u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -25343,24 +25343,24 @@
opcode_t *
Parrot_vivify_p_pc_i_pc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_get_pmc_keyed_int(interp, CONST(2)->u.key, IREG(3));
+ PREG(1) = VTABLE_get_pmc_keyed_int(interp, CONST(2).u.key, IREG(3));
if (PMC_IS_NULL(PREG(1))) {
- PMC * const classobj = Parrot_oo_get_class(interp, CONST(4)->u.key);
+ PMC * const classobj = Parrot_oo_get_class(interp, CONST(4).u.key);
if (!PMC_IS_NULL(classobj))
PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL);
else {
- const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
+ 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;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4).u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
}
- VTABLE_set_pmc_keyed_int(interp, CONST(2)->u.key, IREG(3), PREG(1));
+ VTABLE_set_pmc_keyed_int(interp, CONST(2).u.key, IREG(3), PREG(1));
}
return (opcode_t *)cur_opcode + 5;}
@@ -25371,15 +25371,15 @@
PREG(1) = VTABLE_get_pmc_keyed_int(interp, PREG(2), cur_opcode[3]);
if (PMC_IS_NULL(PREG(1))) {
- PMC * const classobj = Parrot_oo_get_class(interp, CONST(4)->u.key);
+ PMC * const classobj = Parrot_oo_get_class(interp, CONST(4).u.key);
if (!PMC_IS_NULL(classobj))
PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL);
else {
- const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
+ 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;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4).u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -25393,24 +25393,24 @@
opcode_t *
Parrot_vivify_p_pc_ic_pc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_get_pmc_keyed_int(interp, CONST(2)->u.key, cur_opcode[3]);
+ PREG(1) = VTABLE_get_pmc_keyed_int(interp, CONST(2).u.key, cur_opcode[3]);
if (PMC_IS_NULL(PREG(1))) {
- PMC * const classobj = Parrot_oo_get_class(interp, CONST(4)->u.key);
+ PMC * const classobj = Parrot_oo_get_class(interp, CONST(4).u.key);
if (!PMC_IS_NULL(classobj))
PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL);
else {
- const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
+ 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;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4).u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
}
- VTABLE_set_pmc_keyed_int(interp, CONST(2)->u.key, cur_opcode[3], PREG(1));
+ VTABLE_set_pmc_keyed_int(interp, CONST(2).u.key, cur_opcode[3], PREG(1));
}
return (opcode_t *)cur_opcode + 5;}
@@ -25443,7 +25443,7 @@
opcode_t *
Parrot_vivify_p_pc_s_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_get_pmc_keyed_str(interp, CONST(2)->u.key, SREG(3));
+ PREG(1) = VTABLE_get_pmc_keyed_str(interp, CONST(2).u.key, SREG(3));
if (PMC_IS_NULL(PREG(1))) {
PMC * const classobj = Parrot_oo_get_class(interp, PREG(4));
@@ -25460,7 +25460,7 @@
PREG(1) = Parrot_pmc_new(interp, type);
}
- VTABLE_set_pmc_keyed_str(interp, CONST(2)->u.key, SREG(3), PREG(1));
+ VTABLE_set_pmc_keyed_str(interp, CONST(2).u.key, SREG(3), PREG(1));
}
return (opcode_t *)cur_opcode + 5;}
@@ -25468,7 +25468,7 @@
opcode_t *
Parrot_vivify_p_p_sc_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_get_pmc_keyed_str(interp, PREG(2), CONST(3)->u.string);
+ PREG(1) = VTABLE_get_pmc_keyed_str(interp, PREG(2), CONST(3).u.string);
if (PMC_IS_NULL(PREG(1))) {
PMC * const classobj = Parrot_oo_get_class(interp, PREG(4));
@@ -25485,7 +25485,7 @@
PREG(1) = Parrot_pmc_new(interp, type);
}
- VTABLE_set_pmc_keyed_str(interp, PREG(2), CONST(3)->u.string, PREG(1));
+ VTABLE_set_pmc_keyed_str(interp, PREG(2), CONST(3).u.string, PREG(1));
}
return (opcode_t *)cur_opcode + 5;}
@@ -25493,7 +25493,7 @@
opcode_t *
Parrot_vivify_p_pc_sc_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_get_pmc_keyed_str(interp, CONST(2)->u.key, CONST(3)->u.string);
+ PREG(1) = VTABLE_get_pmc_keyed_str(interp, CONST(2).u.key, CONST(3).u.string);
if (PMC_IS_NULL(PREG(1))) {
PMC * const classobj = Parrot_oo_get_class(interp, PREG(4));
@@ -25510,7 +25510,7 @@
PREG(1) = Parrot_pmc_new(interp, type);
}
- VTABLE_set_pmc_keyed_str(interp, CONST(2)->u.key, CONST(3)->u.string, PREG(1));
+ VTABLE_set_pmc_keyed_str(interp, CONST(2).u.key, CONST(3).u.string, PREG(1));
}
return (opcode_t *)cur_opcode + 5;}
@@ -25521,15 +25521,15 @@
PREG(1) = VTABLE_get_pmc_keyed_str(interp, PREG(2), SREG(3));
if (PMC_IS_NULL(PREG(1))) {
- PMC * const classobj = Parrot_oo_get_class(interp, CONST(4)->u.key);
+ PMC * const classobj = Parrot_oo_get_class(interp, CONST(4).u.key);
if (!PMC_IS_NULL(classobj))
PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL);
else {
- const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
+ 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;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4).u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
@@ -25543,24 +25543,24 @@
opcode_t *
Parrot_vivify_p_pc_s_pc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_get_pmc_keyed_str(interp, CONST(2)->u.key, SREG(3));
+ PREG(1) = VTABLE_get_pmc_keyed_str(interp, CONST(2).u.key, SREG(3));
if (PMC_IS_NULL(PREG(1))) {
- PMC * const classobj = Parrot_oo_get_class(interp, CONST(4)->u.key);
+ PMC * const classobj = Parrot_oo_get_class(interp, CONST(4).u.key);
if (!PMC_IS_NULL(classobj))
PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL);
else {
- const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
+ 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;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4).u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
}
- VTABLE_set_pmc_keyed_str(interp, CONST(2)->u.key, SREG(3), PREG(1));
+ VTABLE_set_pmc_keyed_str(interp, CONST(2).u.key, SREG(3), PREG(1));
}
return (opcode_t *)cur_opcode + 5;}
@@ -25568,24 +25568,24 @@
opcode_t *
Parrot_vivify_p_p_sc_pc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_get_pmc_keyed_str(interp, PREG(2), CONST(3)->u.string);
+ PREG(1) = VTABLE_get_pmc_keyed_str(interp, PREG(2), CONST(3).u.string);
if (PMC_IS_NULL(PREG(1))) {
- PMC * const classobj = Parrot_oo_get_class(interp, CONST(4)->u.key);
+ PMC * const classobj = Parrot_oo_get_class(interp, CONST(4).u.key);
if (!PMC_IS_NULL(classobj))
PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL);
else {
- const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
+ 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;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4).u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
}
- VTABLE_set_pmc_keyed_str(interp, PREG(2), CONST(3)->u.string, PREG(1));
+ VTABLE_set_pmc_keyed_str(interp, PREG(2), CONST(3).u.string, PREG(1));
}
return (opcode_t *)cur_opcode + 5;}
@@ -25593,24 +25593,24 @@
opcode_t *
Parrot_vivify_p_pc_sc_pc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PREG(1) = VTABLE_get_pmc_keyed_str(interp, CONST(2)->u.key, CONST(3)->u.string);
+ PREG(1) = VTABLE_get_pmc_keyed_str(interp, CONST(2).u.key, CONST(3).u.string);
if (PMC_IS_NULL(PREG(1))) {
- PMC * const classobj = Parrot_oo_get_class(interp, CONST(4)->u.key);
+ PMC * const classobj = Parrot_oo_get_class(interp, CONST(4).u.key);
if (!PMC_IS_NULL(classobj))
PREG(1) = VTABLE_instantiate(interp, classobj, PMCNULL);
else {
- const INTVAL type = Parrot_pmc_get_type(interp, CONST(4)->u.key);
+ 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;
+ "Class '%Ss' not found", VTABLE_get_repr(interp, CONST(4).u.key));return (opcode_t *)dest;
}
PREG(1) = Parrot_pmc_new(interp, type);
}
- VTABLE_set_pmc_keyed_str(interp, CONST(2)->u.key, CONST(3)->u.string, PREG(1));
+ VTABLE_set_pmc_keyed_str(interp, CONST(2).u.key, CONST(3).u.string, PREG(1));
}
return (opcode_t *)cur_opcode + 5;}
@@ -25643,7 +25643,7 @@
opcode_t *
Parrot_new_p_sc_i(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- STRING * const name = CONST(2)->u.string;
+ STRING * const name = CONST(2).u.string;
PMC * const _class = Parrot_pcc_get_HLL(interp, CURRENT_CONTEXT(interp))
? Parrot_oo_get_class_str(interp, name)
: PMCNULL;
@@ -25693,7 +25693,7 @@
opcode_t *
Parrot_new_p_sc_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- STRING * const name = CONST(2)->u.string;
+ STRING * const name = CONST(2).u.string;
PMC * const _class = Parrot_pcc_get_HLL(interp, CURRENT_CONTEXT(interp))
? Parrot_oo_get_class_str(interp, name)
: PMCNULL;
@@ -25750,7 +25750,7 @@
opcode_t *
Parrot_new_p_pc_i(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PMC * const name_key = CONST(2)->u.key;
+ PMC * const name_key = CONST(2).u.key;
/* get_class() returns a PMCProxy for core types, so check for core PMCs */
const INTVAL type = Parrot_pmc_get_type(interp, name_key);
@@ -25814,7 +25814,7 @@
opcode_t *
Parrot_new_p_pc_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PMC * const name_key = CONST(2)->u.key;
+ PMC * const name_key = CONST(2).u.key;
/* get_class() returns a PMCProxy for core types, so check for core PMCs */
const INTVAL type = Parrot_pmc_get_type(interp, name_key);
@@ -25880,7 +25880,7 @@
opcode_t *
Parrot_root_new_p_pc_i(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PMC * const name_key = CONST(2)->u.key;
+ PMC * const name_key = CONST(2).u.key;
/* get_class() returns a PMCProxy for core types, so check for core PMCs */
const INTVAL type = Parrot_pmc_get_type(interp, name_key);
@@ -25948,7 +25948,7 @@
opcode_t *
Parrot_root_new_p_pc_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- PMC * const name_key = CONST(2)->u.key;
+ PMC * const name_key = CONST(2).u.key;
/* get_class() returns a PMCProxy for core types, so check for core PMCs */
const INTVAL type = Parrot_pmc_get_type(interp, name_key);
@@ -26001,7 +26001,7 @@
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
#if PARROT_HAS_ICU
UErrorCode err = U_ZERO_ERROR;
- char * const cstr = Parrot_str_to_cstring(interp, CONST(2)->u.string);
+ char * const cstr = Parrot_str_to_cstring(interp, CONST(2).u.string);
UChar32 codepoint = u_charFromName(U_EXTENDED_CHAR_NAME, cstr, &err);
Parrot_str_free_cstring(cstr);
IREG(1) = U_SUCCESS(err) ? (INTVAL) codepoint : -1;
@@ -26058,13 +26058,13 @@
/* Go to the next op after loop unrolling */
opcode_t * const dest = cur_opcode + 2;
PMC *eh = PMCNULL;
- if (!PMC_IS_NULL(CONST(1)->u.key)) {
+ if (!PMC_IS_NULL(CONST(1).u.key)) {
/* If isa ExceptionHandler, use it. If isa Exception, get its active handler */
- if (VTABLE_isa(interp, CONST(1)->u.key, Parrot_str_new_constant(interp, "ExceptionHandler")))
- eh = CONST(1)->u.key;
- else if (VTABLE_isa(interp, CONST(1)->u.key, Parrot_str_new_constant(interp, "Exception"))) {
+ if (VTABLE_isa(interp, CONST(1).u.key, Parrot_str_new_constant(interp, "ExceptionHandler")))
+ eh = CONST(1).u.key;
+ else if (VTABLE_isa(interp, CONST(1).u.key, Parrot_str_new_constant(interp, "Exception"))) {
PMC *iter = VTABLE_get_attr_str(interp,
- CONST(1)->u.key, Parrot_str_new_constant(interp, "handler_iter"));
+ CONST(1).u.key, Parrot_str_new_constant(interp, "handler_iter"));
if (!PMC_IS_NULL(iter))
eh = VTABLE_get_pmc_keyed_int(interp, iter, -1);
}
Modified: branches/dynop_mapping/src/packdump.c
==============================================================================
--- branches/dynop_mapping/src/packdump.c Mon Aug 9 04:23:47 2010 (r48355)
+++ branches/dynop_mapping/src/packdump.c Mon Aug 9 05:50:26 2010 (r48356)
@@ -69,7 +69,7 @@
for (i = 0; i < self->const_count; ++i) {
Parrot_io_printf(interp, " # %x:\n", (long)i);
- PackFile_Constant_dump(interp, self, self->constants[i]);
+ PackFile_Constant_dump(interp, self, &self->constants[i]);
}
}
@@ -209,7 +209,7 @@
Parrot_io_printf(interp, " TYPE => NUMBER\n");
ct_index = PackFile_find_in_const(interp, ct, key, PFC_NUMBER);
Parrot_io_printf(interp, " PFC_OFFSET => %ld\n", ct_index);
- detail = ct->constants[ct_index];
+ detail = &ct->constants[ct_index];
Parrot_io_printf(interp, " DATA => %ld\n", detail->u.number);
Parrot_io_printf(interp, " },\n");
}
@@ -222,7 +222,7 @@
Parrot_io_printf(interp, " TYPE => STRING\n");
ct_index = PackFile_find_in_const(interp, ct, key, PFC_STRING);
Parrot_io_printf(interp, " PFC_OFFSET => %ld\n", ct_index);
- detail = ct->constants[ct_index];
+ detail = &ct->constants[ct_index];
Parrot_io_printf(interp, " DATA => '%Ss'\n",
detail->u.string);
Parrot_io_printf(interp, " },\n");
Modified: branches/dynop_mapping/src/packfile.c
==============================================================================
--- branches/dynop_mapping/src/packfile.c Mon Aug 9 04:23:47 2010 (r48355)
+++ branches/dynop_mapping/src/packfile.c Mon Aug 9 05:50:26 2010 (r48356)
@@ -83,10 +83,13 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
-static PackFile_Constant * clone_constant(PARROT_INTERP,
- ARGIN(PackFile_Constant *old_const))
+static void clone_constant(PARROT_INTERP,
+ ARGIN(PackFile_Constant *old_const),
+ ARGMOD(PackFile_Constant *new_const))
__attribute__nonnull__(1)
- __attribute__nonnull__(2);
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3)
+ FUNC_MODIFIES(*new_const);
static void compile_or_load_file(PARROT_INTERP,
ARGIN(STRING *path),
@@ -214,7 +217,7 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
-static PackFile_Constant ** find_constants(PARROT_INTERP,
+static PackFile_Constant * find_constants(PARROT_INTERP,
ARGIN(PackFile_ConstTable *ct))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
@@ -392,7 +395,8 @@
, PARROT_ASSERT_ARG(cursor))
#define ASSERT_ARGS_clone_constant __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(old_const))
+ , PARROT_ASSERT_ARG(old_const) \
+ , PARROT_ASSERT_ARG(new_const))
#define ASSERT_ARGS_compile_or_load_file __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(path))
@@ -853,21 +857,21 @@
mark_1_seg(PARROT_INTERP, ARGMOD(PackFile_ConstTable *ct))
{
ASSERT_ARGS(mark_1_seg)
- PackFile_Constant ** const constants = find_constants(interp, ct);
+ PackFile_Constant * const constants = find_constants(interp, ct);
opcode_t i;
for (i = 0; i < ct->const_count; ++i) {
- switch (constants[i]->type) {
+ switch (constants[i].type) {
case PFC_PMC:
case PFC_KEY:
{
- PMC * const pmc = constants[i]->u.key;
+ PMC * const pmc = constants[i].u.key;
Parrot_gc_mark_PMC_alive(interp, pmc);
break;
}
case PFC_STRING:
{
- STRING * const string = constants[i]->u.string;
+ STRING * const string = constants[i].u.string;
Parrot_gc_mark_STRING_alive(interp, string);
break;
}
@@ -985,7 +989,7 @@
Parrot_ex_throw_from_c_args(interp, NULL, 1,
"Illegal fixup offset (%d) in enum_fixup_sub");
- sub_pmc = ct->constants[ci]->u.key;
+ sub_pmc = ct->constants[ci].u.key;
PMC_get_sub(interp, sub_pmc, sub);
sub->eval_pmc = eval_pmc;
@@ -998,7 +1002,7 @@
/* replace Sub PMC with computation results */
if (action == PBC_IMMEDIATE && !PMC_IS_NULL(result)) {
ft->fixups[i].type = enum_fixup_none;
- ct->constants[ci]->u.key = result;
+ ct->constants[ci].u.key = result;
}
}
@@ -3066,7 +3070,7 @@
Parrot_io_printf(interp, " OFFSET => %d,\n",
debug->mappings[i].offset);
Parrot_io_printf(interp, " FILENAME => %Ss\n",
- PF_CONST(debug->code, debug->mappings[i].filename)->u.string);
+ PF_CONST(debug->code, debug->mappings[i].filename).u.string);
Parrot_io_printf(interp, " ],\n");
}
@@ -3151,9 +3155,9 @@
if (debug->num_mappings) {
prev_filename_n = debug->mappings[debug->num_mappings-1].filename;
filename_pstr = Parrot_str_new(interp, filename, 0);
- if (ct->constants[prev_filename_n]->type == PFC_STRING &&
+ if (ct->constants[prev_filename_n].type == PFC_STRING &&
Parrot_str_equal(interp, filename_pstr,
- ct->constants[prev_filename_n]->u.string)) {
+ ct->constants[prev_filename_n].u.string)) {
return;
}
}
@@ -3194,8 +3198,8 @@
/* Check if there is already a constant with this filename */
for (i= 0; i < count; ++i) {
- if (ct->constants[i]->type == PFC_STRING &&
- Parrot_str_equal(interp, namestr, ct->constants[i]->u.string))
+ if (ct->constants[i].type == PFC_STRING &&
+ Parrot_str_equal(interp, namestr, ct->constants[i].u.string))
break;
}
if (i < count) {
@@ -3207,14 +3211,13 @@
PackFile_Constant *fnconst;
ct->const_count = ct->const_count + 1;
ct->constants = mem_gc_realloc_n_typed_zeroed(interp, ct->constants,
- ct->const_count, ct->const_count - 1, PackFile_Constant *);
+ ct->const_count, ct->const_count - 1, PackFile_Constant);
- fnconst = PackFile_Constant_new(interp);
+ fnconst = &ct->constants[ct->const_count - 1];
fnconst->type = PFC_STRING;
fnconst->u.string = Parrot_str_new_init(interp, filename, strlen(filename),
PARROT_DEFAULT_ENCODING, PARROT_DEFAULT_CHARSET,
PObj_constant_FLAG);
- ct->constants[ct->const_count - 1] = fnconst;
}
/* Set the mapped value */
@@ -3254,7 +3257,7 @@
|| (debug->mappings[i].offset <= pc
&& debug->mappings[i + 1].offset > pc))
return PF_CONST(debug->code,
- debug->mappings[i].filename)->u.string;
+ debug->mappings[i].filename).u.string;
}
/* Otherwise, no mappings == no filename. */
@@ -3347,8 +3350,8 @@
/*
-=item C<static PackFile_Constant * clone_constant(PARROT_INTERP,
-PackFile_Constant *old_const)>
+=item C<static void clone_constant(PARROT_INTERP, PackFile_Constant *old_const,
+PackFile_Constant *new_const)>
Clones a constant (at least, if it's a Sub PMC), returning the clone.
@@ -3356,22 +3359,20 @@
*/
-PARROT_WARN_UNUSED_RESULT
-PARROT_CANNOT_RETURN_NULL
-static PackFile_Constant *
-clone_constant(PARROT_INTERP, ARGIN(PackFile_Constant *old_const))
+static void
+clone_constant(PARROT_INTERP, ARGIN(PackFile_Constant *old_const),
+ARGMOD(PackFile_Constant *new_const))
{
ASSERT_ARGS(clone_constant)
STRING * const _sub = CONST_STRING(interp, "Sub");
+ memcpy(new_const, old_const, sizeof (PackFile_Constant));
+
if (old_const->type == PFC_PMC
&& VTABLE_isa(interp, old_const->u.key, _sub)) {
- PMC *old_sub_pmc, *new_sub_pmc;
+ PMC *old_sub_pmc, *new_sub_pmc;
Parrot_Sub_attributes *old_sub, *new_sub;
- PackFile_Constant * const ret = mem_gc_allocate_zeroed_typed(interp,
- PackFile_Constant);
- ret->type = old_const->type;
old_sub_pmc = old_const->u.key;
new_sub_pmc = Parrot_thaw_constants(interp, Parrot_freeze(interp, old_sub_pmc));
@@ -3384,18 +3385,14 @@
&& !(old_sub->comp_flags & SUB_COMP_FLAG_METHOD))
Parrot_ns_store_sub(interp, new_sub_pmc);
- ret->u.key = new_sub_pmc;
-
- return ret;
+ new_const->u.key = new_sub_pmc;
}
-
- return old_const;
}
/*
-=item C<static PackFile_Constant ** find_constants(PARROT_INTERP,
+=item C<static PackFile_Constant * find_constants(PARROT_INTERP,
PackFile_ConstTable *ct)>
Finds the constant table associated with a thread. For now, we need to copy
@@ -3408,7 +3405,7 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
-static PackFile_Constant **
+static PackFile_Constant *
find_constants(PARROT_INTERP, ARGIN(PackFile_ConstTable *ct))
{
ASSERT_ARGS(find_constants)
@@ -3418,7 +3415,7 @@
return ct->constants;
else {
Hash *tables;
- PackFile_Constant **new_consts;
+ PackFile_Constant *new_consts;
PARROT_ASSERT(interp->thread_data);
@@ -3427,19 +3424,19 @@
}
tables = interp->thread_data->const_tables;
- new_consts = (PackFile_Constant **)parrot_hash_get(interp, tables, ct);
+ new_consts = (PackFile_Constant *)parrot_hash_get(interp, tables, ct);
if (!new_consts) {
/* need to construct it */
- PackFile_Constant ** const old_consts = ct->constants;
- INTVAL const num_consts = ct->const_count;
- INTVAL i;
+ PackFile_Constant * const old_consts = ct->constants;
+ INTVAL const num_consts = ct->const_count;
+ INTVAL i;
new_consts = mem_gc_allocate_n_zeroed_typed(interp,
- num_consts, PackFile_Constant *);
+ num_consts, PackFile_Constant);
for (i = 0; i < num_consts; ++i)
- new_consts[i] = clone_constant(interp, old_consts[i]);
+ clone_constant(interp, &old_consts[i], &new_consts[i]);
parrot_hash_put(interp, tables, ct, new_consts);
}
@@ -3481,16 +3478,11 @@
while (bucket) {
PackFile_ConstTable * const table =
(PackFile_ConstTable *)bucket->key;
- PackFile_Constant ** const orig_consts = table->constants;
- PackFile_Constant ** const consts =
- (PackFile_Constant **) bucket->value;
+ PackFile_Constant * const orig_consts = table->constants;
+ PackFile_Constant * const consts =
+ (PackFile_Constant *) bucket->value;
INTVAL j;
- for (j = 0; j < table->const_count; ++j) {
- if (consts[j] != orig_consts[j])
- mem_gc_free(interp, consts[j]);
- }
-
mem_gc_free(interp, consts);
bucket = bucket->next;
}
@@ -3912,11 +3904,6 @@
ASSERT_ARGS(PackFile_ConstTable_clear)
opcode_t i;
- for (i = 0; i < self->const_count; ++i) {
- PackFile_Constant_destroy(interp, self->constants[i]);
- self->constants[i] = NULL;
- }
-
if (self->constants) {
mem_gc_free(interp, self->constants);
self->constants = NULL;
@@ -3967,7 +3954,7 @@
return cursor;
self->constants = mem_gc_allocate_n_zeroed_typed(interp, self->const_count,
- PackFile_Constant *);
+ PackFile_Constant);
if (!self->constants) {
Parrot_io_eprintf(interp,
@@ -3979,9 +3966,8 @@
for (i = 0; i < self->const_count; ++i) {
TRACE_PRINTF(("PackFile_ConstTable_unpack(): Unpacking constant %ld/%ld\n",
i, self->const_count));
- self->constants[i] = PackFile_Constant_new(interp);
- cursor = PackFile_Constant_unpack(interp, self, self->constants[i],
+ cursor = PackFile_Constant_unpack(interp, self, &self->constants[i],
cursor);
}
@@ -4034,61 +4020,6 @@
/*
-=back
-
-=head2 PackFile Constant Structure Functions
-
-=over 4
-
-=item C<PackFile_Constant * PackFile_Constant_new(PARROT_INTERP)>
-
-Allocates a new empty PackFile Constant.
-
-This is only here so we can make a new one and then do an unpack.
-
-=cut
-
-*/
-
-PARROT_EXPORT
-PARROT_MALLOC
-PARROT_CANNOT_RETURN_NULL
-PackFile_Constant *
-PackFile_Constant_new(PARROT_INTERP)
-{
- ASSERT_ARGS(PackFile_Constant_new)
- PackFile_Constant * const self = mem_gc_allocate_typed(interp,
- PackFile_Constant);
-
- self->type = PFC_NONE;
-
- return self;
-}
-
-
-/*
-
-=item C<void PackFile_Constant_destroy(PARROT_INTERP, PackFile_Constant *self)>
-
-Deletes the C<PackFile_Constant> C<self>.
-
-Don't delete C<PMC>s or C<STRING>s. The GC will claim them.
-
-=cut
-
-*/
-
-PARROT_EXPORT
-void
-PackFile_Constant_destroy(PARROT_INTERP, ARGMOD_NULLOK(PackFile_Constant *self))
-{
- ASSERT_ARGS(PackFile_Constant_destroy)
- mem_gc_free(interp, self);
-}
-
-
-/*
-
=item C<size_t PackFile_Constant_pack_size(PARROT_INTERP, const
PackFile_Constant *self, const PackFile_ConstTable *ct)>
@@ -4129,7 +4060,7 @@
case PFC_PMC:
component = self->u.key; /* the pmc (Sub, ...) */
- packed_size = PF_size_strlen(Parrot_freeze_pbc_size(interp, component, ct));
+ packed_size = PF_size_strlen(Parrot_freeze_pbc_size(interp, component, ct)) - 1;
break;
default:
@@ -4230,7 +4161,7 @@
/* thawing the PMC needs the real packfile in place */
PackFile_ByteCode * const cs_save = interp->code;
interp->code = pf->cur_cs;
- image = PF_fetch_string(interp, pf, &cursor);
+ image = PF_fetch_buf(interp, pf, &cursor);
pmc = Parrot_thaw_pbc(interp, image, constt);
@@ -4299,10 +4230,10 @@
key_set_integer(interp, tail, op);
break;
case PARROT_ARG_NC:
- key_set_number(interp, tail, constt->constants[op]->u.number);
+ key_set_number(interp, tail, constt->constants[op].u.number);
break;
case PARROT_ARG_SC:
- key_set_string(interp, tail, constt->constants[op]->u.string);
+ key_set_string(interp, tail, constt->constants[op].u.string);
break;
case PARROT_ARG_I:
key_set_register(interp, tail, op, KEY_integer_FLAG);
@@ -4577,7 +4508,7 @@
const PackFile_Annotations_Key * const key = self->keys + i;
Parrot_io_printf(interp, " #%d\n [\n", i);
Parrot_io_printf(interp, " NAME => %Ss\n",
- PF_CONST(self->code, key->name)->u.string);
+ PF_CONST(self->code, key->name).u.string);
Parrot_io_printf(interp, " TYPE => %s\n",
key->type == PF_ANNOTATION_KEY_TYPE_INT ? "integer" :
key->type == PF_ANNOTATION_KEY_TYPE_STR ? "string" :
@@ -4682,12 +4613,12 @@
{
ASSERT_ARGS(PackFile_Annotations_add_entry)
/* See if we already have this key. */
- STRING * const key_name = PF_CONST(self->code, key)->u.string;
+ STRING * const key_name = PF_CONST(self->code, key).u.string;
opcode_t key_id = -1;
INTVAL i;
for (i = 0; i < self->num_keys; ++i) {
- STRING * const test_key = PF_CONST(self->code, self->keys[i].name)->u.string;
+ STRING * const test_key = PF_CONST(self->code, self->keys[i].name).u.string;
if (Parrot_str_equal(interp, test_key, key_name)) {
key_id = i;
break;
@@ -4762,12 +4693,12 @@
case PF_ANNOTATION_KEY_TYPE_NUM:
result = Parrot_pmc_new(interp, enum_class_Float);
VTABLE_set_number_native(interp, result,
- PF_CONST(self->code, value)->u.number);
+ PF_CONST(self->code, value).u.number);
break;
default:
result = Parrot_pmc_new(interp, enum_class_String);
VTABLE_set_string_native(interp, result,
- PF_CONST(self->code, value)->u.string);
+ PF_CONST(self->code, value).u.string);
}
return result;
@@ -4804,7 +4735,7 @@
if (!STRING_IS_NULL(key)) {
for (i = 0; i < self->num_keys; ++i) {
- STRING * const test_key = PF_CONST(self->code, self->keys[i].name)->u.string;
+ STRING * const test_key = PF_CONST(self->code, self->keys[i].name).u.string;
if (Parrot_str_equal(interp, test_key, key)) {
key_id = i;
break;
@@ -4843,7 +4774,7 @@
for (i = 0; i < self->num_keys; ++i) {
if (have_values[i]) {
- STRING * const key_name = PF_CONST(self->code, self->keys[i].name)->u.string;
+ STRING * const key_name = PF_CONST(self->code, self->keys[i].name).u.string;
VTABLE_set_pmc_keyed_str(interp, result, key_name,
make_annotation_value_pmc(interp, self, self->keys[i].type,
latest_values[i]));
Modified: branches/dynop_mapping/src/packfile/pf_items.c
==============================================================================
--- branches/dynop_mapping/src/packfile/pf_items.c Mon Aug 9 04:23:47 2010 (r48355)
+++ branches/dynop_mapping/src/packfile/pf_items.c Mon Aug 9 05:50:26 2010 (r48356)
@@ -1018,20 +1018,18 @@
XXX assumes C<sizeof (INTVAL) == sizeof (opcode_t)> - we don't have
C<INTVAL> size in the PackFile header.
-When used for freeze/thaw the C<pf> argument might be NULL.
-
=cut
*/
PARROT_WARN_UNUSED_RESULT
INTVAL
-PF_fetch_integer(ARGIN_NULLOK(PackFile *pf), ARGIN(const opcode_t **stream))
+PF_fetch_integer(ARGIN(PackFile *pf), ARGIN(const opcode_t **stream))
{
ASSERT_ARGS(PF_fetch_integer)
INTVAL i;
- if (!pf || pf->fetch_iv == NULL)
+ if (!pf->fetch_iv)
return *(*stream)++;
i = (pf->fetch_iv)(*((const unsigned char **)stream));
TRACE_PRINTF_VAL((" PF_fetch_integer: 0x%x (%d) at 0x%x\n", i, i,
@@ -1191,6 +1189,107 @@
/*
+=item C<STRING * PF_fetch_buf(PARROT_INTERP, PackFile *pf, const opcode_t
+**cursor)>
+
+Fetches a buffer (fixed_8 encoded temporary C<STRING>) from bytecode.
+
+Opcode format is:
+
+ opcode_t size
+ * data
+
+When used for freeze/thaw, the C<pf> argument might be C<NULL>.
+
+The returned buffer points to the underlying packfile. It should be used and
+discarded immediately to avoid things changing underneath you.
+
+=cut
+
+*/
+
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+STRING *
+PF_fetch_buf(PARROT_INTERP, ARGIN_NULLOK(PackFile *pf), ARGIN(const opcode_t **cursor))
+{
+ ASSERT_ARGS(PF_fetch_buf)
+ const int wordsize = pf ? pf->header->wordsize : sizeof (opcode_t);
+ size_t size = PF_fetch_opcode(pf, cursor);
+ STRING *s = Parrot_str_new_init(interp, (const char *)*cursor, size,
+ Parrot_fixed_8_encoding_ptr, Parrot_binary_charset_ptr,
+ PObj_external_FLAG);
+ *((const unsigned char **)(cursor)) += ROUND_UP_B(size, wordsize);
+ return s;
+}
+
+
+/*
+
+=item C<opcode_t* PF_store_buf(opcode_t *cursor, const STRING *s)>
+
+Write a buffer (fixed_8 encoded, binary string) to the opcode stream. These
+are encoded more compactly and read more efficiently than normal strings, but
+have limitations (see C<PF_fetch_buf>).
+
+=cut
+
+*/
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+opcode_t*
+PF_store_buf(ARGOUT(opcode_t *cursor), ARGIN(const STRING *s))
+{
+ ASSERT_ARGS(PF_store_buf)
+ const int wordsize = sizeof (opcode_t);
+
+ PARROT_ASSERT(s->encoding == Parrot_fixed_8_encoding_ptr);
+ PARROT_ASSERT(s->charset == Parrot_binary_charset_ptr);
+
+ *cursor++ = s->bufused;
+
+ if (s->strstart) {
+ char *charcursor = (char *) cursor;
+ mem_sys_memcopy(charcursor, s->strstart, s->bufused);
+ charcursor += s->bufused;
+
+ /* Pad up to wordsize boundary. */
+ while ((charcursor - (char *)cursor) % wordsize)
+ *charcursor++ = 0;
+
+ cursor += (charcursor - (char *)cursor) / wordsize;
+ }
+
+ return cursor;
+}
+
+
+/*
+
+=item C<size_t PF_size_buf(const STRING *s)>
+
+Reports the stored size of a buffer in C<opcode_t> units.
+
+=cut
+
+*/
+
+PARROT_PURE_FUNCTION
+size_t
+PF_size_buf(ARGIN(const STRING *s))
+{
+ ASSERT_ARGS(PF_size_buf)
+ if (STRING_IS_NULL(s))
+ return 1;
+ else
+ return PF_size_strlen(s->bufused) - 1;
+}
+
+
+/*
+
=item C<STRING * PF_fetch_string(PARROT_INTERP, PackFile *pf, const opcode_t
**cursor)>
Modified: branches/dynop_mapping/src/packout.c
==============================================================================
--- branches/dynop_mapping/src/packout.c Mon Aug 9 04:23:47 2010 (r48355)
+++ branches/dynop_mapping/src/packout.c Mon Aug 9 05:50:26 2010 (r48356)
@@ -166,7 +166,7 @@
for (i = 0; i < n_constants; ++i) {
/* only constants up to the current one will be valid on unpack */
self->const_count = i;
- size += PackFile_Constant_pack_size(interp, self->constants[i], self);
+ size += PackFile_Constant_pack_size(interp, &self->constants[i], self);
}
self->const_count = i;
@@ -208,7 +208,7 @@
for (i = 0; i < n_constants; ++i) {
/* only constants up to the current one will be valid on unpack */
self->const_count = i;
- cursor = PackFile_Constant_pack(interp, self, self->constants[i], cursor);
+ cursor = PackFile_Constant_pack(interp, self, &self->constants[i], cursor);
}
self->const_count = n_constants;
@@ -283,7 +283,7 @@
}
for (i = 0; i < ct->const_count; ++i) {
- PackFile_Constant *constant = ct->constants[i];
+ PackFile_Constant *constant = &ct->constants[i];
switch (type) {
case PFC_STRING:
@@ -361,9 +361,9 @@
break;
case PFC_PMC:
- key = self->u.key; /* the (Sub) PMC */
- image = Parrot_freeze_pbc(interp, key, const_table);
- cursor = PF_store_string(cursor, image);
+ key = self->u.key; /* the (Sub) PMC */
+ image = Parrot_freeze_pbc(interp, key, const_table);
+ cursor = PF_store_buf(cursor, image);
break;
case PFC_KEY:
Modified: branches/dynop_mapping/src/pbc_merge.c
==============================================================================
--- branches/dynop_mapping/src/pbc_merge.c Mon Aug 9 04:23:47 2010 (r48355)
+++ branches/dynop_mapping/src/pbc_merge.c Mon Aug 9 05:50:26 2010 (r48356)
@@ -374,7 +374,7 @@
ARGMOD(PackFile_ByteCode *bc))
{
ASSERT_ARGS(pbc_merge_constants)
- PackFile_Constant **constants = mem_gc_allocate_typed(interp, PackFile_Constant *);
+ PackFile_Constant *constants = mem_gc_allocate_typed(interp, PackFile_Constant);
opcode_t cursor = 0;
opcode_t output_const_num = 0;
@@ -411,14 +411,13 @@
/* Allocate space for the constant list, provided we have some. */
if (in_seg->const_count > 0)
constants = mem_gc_realloc_n_typed(interp, constants,
- cursor + in_seg->const_count, PackFile_Constant*);
+ cursor + in_seg->const_count, PackFile_Constant);
/* Loop over the constants and copy them to the output PBC. */
for (j = 0; j < in_seg->const_count; ++j) {
- /* Get the entry and allocate space for copy. */
- PackFile_Constant *cur_entry = in_seg->constants[j];
- PackFile_Constant *copy = mem_gc_allocate_typed(interp,
- PackFile_Constant);
+ /* Get the entry and the copy. */
+ PackFile_Constant *cur_entry = &in_seg->constants[j];
+ PackFile_Constant *copy = &constants[cursor];
STRUCT_COPY(copy, cur_entry);
/* If it's a sub PMC, need to deal with offsets. */
@@ -442,8 +441,6 @@
++input_const_num;
++output_const_num;
- /* Slot it into the list. */
- constants[cursor] = copy;
++cursor;
}
}
@@ -745,7 +742,7 @@
op_func == interp->op_func_table[PARROT_OP_get_params_pc] ||
op_func == interp->op_func_table[PARROT_OP_set_returns_pc]) {
/* Get the signature. */
- PMC * const sig = bc->const_table->constants[op_ptr[1]]->u.key;
+ PMC * const sig = bc->const_table->constants[op_ptr[1]].u.key;
/* Loop over the arguments to locate any that need a fixup. */
const int sig_items = VTABLE_elements(interp, sig);
Modified: branches/dynop_mapping/src/pmc.c
==============================================================================
--- branches/dynop_mapping/src/pmc.c Mon Aug 9 04:23:47 2010 (r48355)
+++ branches/dynop_mapping/src/pmc.c Mon Aug 9 05:50:26 2010 (r48356)
@@ -573,10 +573,9 @@
PMC *const classobj = interp->vtables[base_type]->pmc_class;
if (!PMC_IS_NULL(classobj) && PObj_is_class_TEST(classobj)) {
- PMC * const initial =
- Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Integer));
- VTABLE_set_integer_native(interp, initial, init);
- return VTABLE_instantiate(interp, classobj, initial);
+ PMC * const obj = VTABLE_instantiate(interp, classobj, PMCNULL);
+ VTABLE_set_integer_native(interp, obj, init);
+ return obj;
}
else {
PMC * const pmc = get_new_pmc_header(interp, base_type, 0);
Modified: branches/dynop_mapping/src/pmc/callcontext.pmc
==============================================================================
--- branches/dynop_mapping/src/pmc/callcontext.pmc Mon Aug 9 04:23:47 2010 (r48355)
+++ branches/dynop_mapping/src/pmc/callcontext.pmc Mon Aug 9 05:50:26 2010 (r48356)
@@ -397,14 +397,13 @@
{
ASSERT_ARGS(get_named_names)
Hash *hash;
- PMC *result = PMCNULL;
GETATTR_CallContext_hash(interp, SELF, hash);
/* yes, this *looks* risky, but it's a Parrot STRING hash internally */
if (hash && hash->entries) {
UINTVAL i, j = 0;
- result = Parrot_pmc_new_init_int(interp, enum_class_FixedStringArray, hash->entries);
+ PMC *result = Parrot_pmc_new_init_int(interp, enum_class_FixedStringArray, hash->entries);
for (i = 0; i <= hash->mask; ++i) {
HashBucket *b = hash->bucket_indices[i];
@@ -415,9 +414,11 @@
b = b->next;
}
}
+
+ return result;
}
- return result;
+ return PMCNULL;
}
#include "parrot/packfile.h"
@@ -447,7 +448,7 @@
ATTR PMC *current_sig; /* temporary CallContext PMC for active call */
/* deref the constants - we need it all the time */
- ATTR struct PackFile_Constant **constants;
+ ATTR struct PackFile_Constant *constants;
ATTR INTVAL current_HLL; /* see also src/hll.c */
Modified: branches/dynop_mapping/src/pmc/default.pmc
==============================================================================
--- branches/dynop_mapping/src/pmc/default.pmc Mon Aug 9 04:23:47 2010 (r48355)
+++ branches/dynop_mapping/src/pmc/default.pmc Mon Aug 9 05:50:26 2010 (r48356)
@@ -360,6 +360,23 @@
/*
+=item C<void init_int(INTVAL initvalue)>
+
+Calls C<init()> and C<set_integer_native(initvalue)>.
+Default implementation to allow more usages of init_int without having to
+implement it everywhere.
+
+=cut
+
+*/
+
+ VTABLE void init_int(INTVAL initvalue) {
+ SELF.init();
+ SELF.set_integer_native(initvalue);
+ }
+
+/*
+
=item C<void destroy()>
Does nothing.
Modified: branches/dynop_mapping/src/pmc/env.pmc
==============================================================================
--- branches/dynop_mapping/src/pmc/env.pmc Mon Aug 9 04:23:47 2010 (r48355)
+++ branches/dynop_mapping/src/pmc/env.pmc Mon Aug 9 05:50:26 2010 (r48356)
@@ -10,9 +10,6 @@
C<Env> is a singleton class which provides access to the system environment.
-XXX Think about returning Pair back. Currently there is no way to iterate over
-environment I<keys>.
-
=head2 Methods
=over 4
Modified: branches/dynop_mapping/src/pmc/eval.pmc
==============================================================================
--- branches/dynop_mapping/src/pmc/eval.pmc Mon Aug 9 04:23:47 2010 (r48355)
+++ branches/dynop_mapping/src/pmc/eval.pmc Mon Aug 9 05:50:26 2010 (r48356)
@@ -71,7 +71,7 @@
if (e->type == enum_fixup_sub) {
opcode_t ci = e->offset;
- ct->constants[ci]->u.key = NULL;
+ ct->constants[ci].u.key = NULL;
e->type = 0;
}
}
@@ -106,7 +106,7 @@
opcode_t ci = e->offset;
if (n++ == idx)
- return ct->constants[ci]->u.key;
+ return ct->constants[ci].u.key;
}
}
}
@@ -138,7 +138,7 @@
if (e->type == enum_fixup_sub) {
opcode_t ci = e->offset;
- PMC *sub = ct->constants[ci]->u.key;
+ PMC *sub = ct->constants[ci].u.key;
Parrot_gc_mark_PMC_alive(interp, sub);
}
Modified: branches/dynop_mapping/src/pmc/imageio.pmc
==============================================================================
--- branches/dynop_mapping/src/pmc/imageio.pmc Mon Aug 9 04:23:47 2010 (r48355)
+++ branches/dynop_mapping/src/pmc/imageio.pmc Mon Aug 9 05:50:26 2010 (r48356)
@@ -132,16 +132,18 @@
return (opcode_t *)(buf + pos);
}
+
PARROT_INLINE
static void
SET_VISIT_CURSOR(ARGMOD(PMC *pmc), ARGIN(const char *cursor))
{
ASSERT_ARGS(SET_VISIT_CURSOR)
- const char *bufstart = (char *)Buffer_bufstart(PARROT_IMAGEIO(pmc)->buffer);
+ const char * const bufstart = (const char *)Buffer_bufstart(PARROT_IMAGEIO(pmc)->buffer);
PARROT_IMAGEIO(pmc)->pos = (cursor - bufstart);
}
+
PARROT_INLINE
static void
INC_VISIT_CURSOR(ARGMOD(PMC *pmc), UINTVAL inc)
@@ -151,11 +153,10 @@
PARROT_IMAGEIO(pmc)->pos += inc;
}
+
#define BYTECODE_SHIFT_OK(pmc) PARROT_ASSERT( \
PARROT_IMAGEIO(pmc)->pos <= PARROT_IMAGEIO(pmc)->input_length)
-
-
static void
create_buffer(PARROT_INTERP, ARGIN_NULLOK(PMC *pmc), ARGMOD(PMC *info))
{
@@ -166,11 +167,11 @@
if (!PMC_IS_NULL(pmc)) {
STRING * const array = CONST_STRING(interp, "array");
STRING * const hash = CONST_STRING(interp, "hash");
- INTVAL items = 1;
+ INTVAL items = 1;
- if (VTABLE_does(interp, pmc, array) || VTABLE_does(interp, pmc, hash)) {
+ if (VTABLE_does(interp, pmc, array) || VTABLE_does(interp, pmc, hash))
items += VTABLE_elements(interp, pmc);
- }
+
len = items * FREEZE_BYTES_PER_ITEM;
}
else
@@ -180,7 +181,8 @@
Parrot_gc_new_bufferlike_header(interp, sizeof (Buffer));
Parrot_gc_allocate_buffer_storage_aligned(interp,
PARROT_IMAGEIO(info)->buffer, len);
- SET_VISIT_CURSOR(info, (char *)Buffer_bufstart(PARROT_IMAGEIO(info)->buffer));
+ SET_VISIT_CURSOR(info,
+ (const char *)Buffer_bufstart(PARROT_IMAGEIO(info)->buffer));
}
@@ -198,15 +200,17 @@
{
ASSERT_ARGS(ensure_buffer_size)
- Buffer *buf = PARROT_IMAGEIO(io)->buffer;
+ Buffer * const buf = PARROT_IMAGEIO(io)->buffer;
const size_t used = PARROT_IMAGEIO(io)->pos;
const int need_free = Buffer_buflen(buf) - used - len;
/* grow by factor 1.5 or such */
if (need_free <= 16) {
size_t new_size = (size_t) (Buffer_buflen(buf) * 1.5);
+
if (new_size < Buffer_buflen(buf) - need_free + 512)
new_size = Buffer_buflen(buf) - need_free + 512;
+
Parrot_gc_reallocate_buffer_storage(interp, buf, new_size);
PARROT_ASSERT(Buffer_buflen(buf) - used - len >= 15);
}
@@ -214,9 +218,9 @@
#ifndef DISABLE_GC_DEBUG
Parrot_gc_compact_memory_pool(interp);
#endif
-
}
+
PARROT_WARN_UNUSED_RESULT
PARROT_INLINE
static INTVAL
@@ -227,6 +231,7 @@
return PARROT_IMAGEIO(io)->pos < PARROT_IMAGEIO(io)->input_length;
}
+
PARROT_WARN_UNUSED_RESULT
PARROT_CAN_RETURN_NULL
PARROT_INLINE
@@ -238,6 +243,7 @@
return VTABLE_get_pmc_keyed_int(interp, PARROT_IMAGEIO(io)->todo, id - 1);
}
+
PARROT_WARN_UNUSED_RESULT
PARROT_CAN_RETURN_NULL
PARROT_INLINE
@@ -247,7 +253,7 @@
ASSERT_ARGS(visit_todo_list_thaw)
const UINTVAL n = VTABLE_shift_integer(interp, info);
- const UINTVAL id = PackID_get_PMCID(n);
+ const INTVAL id = PackID_get_PMCID(n);
const int packid_flags = PackID_get_FLAGS(n);
PMC *pmc = PMCNULL;
@@ -260,13 +266,15 @@
break;
case enum_PackID_normal:
{
- PMC * const todo = PARROT_IMAGEIO(info)->todo;
+ PMC * const todo = PARROT_IMAGEIO(info)->todo;
const INTVAL type = VTABLE_shift_integer(interp, info);
- PARROT_ASSERT(id - 1 == VTABLE_elements(interp, PARROT_IMAGEIO(info)->todo));
+ PARROT_ASSERT(id - 1
+ == VTABLE_elements(interp, PARROT_IMAGEIO(info)->todo));
if (type <= 0 || type > interp->n_vtable_max)
- Parrot_ex_throw_from_c_args(interp, NULL, 1, "Unknown PMC type to thaw %d", type);
+ Parrot_ex_throw_from_c_args(interp, NULL, 1,
+ "Unknown PMC type to thaw %d", type);
/* workaround to keep ParrotInterpreter PBC hack working */
if (type == enum_class_ParrotInterpreter)
@@ -278,13 +286,15 @@
}
break;
default:
- Parrot_ex_throw_from_c_args(interp, NULL, 1, "Unknown PMC id args thaw %d", packid_flags);
+ Parrot_ex_throw_from_c_args(interp, NULL, 1,
+ "Unknown PMC id args thaw %d", packid_flags);
break;
}
return pmc;
}
+
static void
visit_todo_list_freeze(PARROT_INTERP, ARGIN_NULLOK(PMC* pmc), ARGMOD(PMC* info))
{
@@ -300,10 +310,12 @@
packid_type = enum_PackID_seen;
}
else {
- Hash * const hash = (Hash *)VTABLE_get_pointer(interp, PARROT_IMAGEIO(info)->seen);
+ Hash * const hash = (Hash *)VTABLE_get_pointer(interp,
+ PARROT_IMAGEIO(info)->seen);
HashBucket * const b = parrot_hash_get_bucket(interp, hash, pmc);
+
if (b) {
- id = (UINTVAL) b->value;
+ id = (UINTVAL)b->value;
packid_type = enum_PackID_seen;
}
else {
@@ -316,7 +328,8 @@
VTABLE_push_integer(interp, info, PackID_new(id, packid_type));
if (packid_type == enum_PackID_normal) {
- Hash * const hash = (Hash *)VTABLE_get_pointer(interp, PARROT_IMAGEIO(info)->seen);
+ Hash * const hash = (Hash *)VTABLE_get_pointer(interp,
+ PARROT_IMAGEIO(info)->seen);
PARROT_ASSERT(pmc);
@@ -325,16 +338,19 @@
PObj_flag_CLEAR(private1, info);
VTABLE_push_integer(interp, info,
- PObj_is_object_TEST(pmc) ? (INTVAL) enum_class_Object : pmc->vtable->base_type);
+ PObj_is_object_TEST(pmc)
+ ? (INTVAL) enum_class_Object
+ : pmc->vtable->base_type);
parrot_hash_put(interp, hash, pmc, (void *)id);
VTABLE_push_pmc(interp, PARROT_IMAGEIO(info)->todo, pmc);
}
}
+
pmclass ImageIO auto_attrs {
ATTR Buffer *buffer; /* buffer to store the image */
- ATTR size_t pos; /* current read/write position in buffer */
+ ATTR size_t pos; /* current read/write buf position */
ATTR size_t input_length;
ATTR INTVAL what;
ATTR PMC *seen; /* seen hash */
@@ -363,17 +379,17 @@
*/
VTABLE void init() {
- PARROT_IMAGEIO(SELF)->buffer = NULL;
- PARROT_IMAGEIO(SELF)->todo = Parrot_pmc_new(INTERP, enum_class_ResizablePMCArray);
- PARROT_IMAGEIO(SELF)->seen = PMCNULL;
- PARROT_IMAGEIO(SELF)->id = 0;
- PARROT_IMAGEIO(SELF)->pf = PackFile_new(INTERP, 0);
+ PARROT_IMAGEIO(SELF)->seen = PMCNULL;
+ PARROT_IMAGEIO(SELF)->pf = PackFile_new(INTERP, 0);
+ PARROT_IMAGEIO(SELF)->todo =
+ Parrot_pmc_new(INTERP, enum_class_ResizablePMCArray);
PObj_flag_CLEAR(private1, SELF);
PObj_custom_mark_destroy_SETALL(SELF);
}
+
/*
=item C<void init_pmc(PMC *pmc)>
@@ -384,13 +400,13 @@
*/
VTABLE void init_pmc(PMC *pmc) {
- PARROT_IMAGEIO(SELF)->buffer = NULL;
- PARROT_IMAGEIO(SELF)->todo = Parrot_pmc_new(INTERP, enum_class_ResizablePMCArray);
PARROT_IMAGEIO(SELF)->seen = PMCNULL;
- PARROT_IMAGEIO(SELF)->id = 0;
PARROT_IMAGEIO(SELF)->pf = PackFile_new(INTERP, 0);
+ PARROT_IMAGEIO(SELF)->pf_ct =
+ (PackFile_ConstTable *)VTABLE_get_pointer(INTERP, pmc);
+ PARROT_IMAGEIO(SELF)->todo =
+ Parrot_pmc_new(INTERP, enum_class_ResizablePMCArray);
- PARROT_IMAGEIO(SELF)->pf_ct = (PackFile_ConstTable *)VTABLE_get_pointer(INTERP, pmc);
PObj_flag_SET(private1, SELF);
PObj_custom_mark_destroy_SETALL(SELF);
@@ -411,6 +427,7 @@
PARROT_IMAGEIO(SELF)->pf = NULL;
}
+
/*
=item C<void mark()>
@@ -428,6 +445,7 @@
Parrot_gc_mark_PMC_alive(INTERP, PARROT_IMAGEIO(SELF)->seen);
}
+
/*
=item C<STRING *get_string()>
@@ -444,6 +462,7 @@
PARROT_IMAGEIO(SELF)->pos);
}
+
/*
=item C<VTABLE PMC *get_pmc()>
@@ -455,9 +474,11 @@
*/
VTABLE PMC *get_pmc() {
- return VTABLE_get_pmc_keyed_int(INTERP, (PARROT_IMAGEIO(SELF))->todo, 0);
+ return VTABLE_get_pmc_keyed_int(INTERP,
+ (PARROT_IMAGEIO(SELF))->todo, 0);
}
+
/*
=item C<VTABLE PMC *get_iter()>
@@ -476,7 +497,7 @@
=item C<VTABLE INTVAL get_integer()>
-Returns the flags describing the visit action
+Returns the flags describing the visit action.
=cut
@@ -486,6 +507,7 @@
return PARROT_IMAGEIO(SELF)->what;
}
+
/*
=item C<VTABLE void push_integer(INTVAL v)>
@@ -499,7 +521,8 @@
VTABLE void push_integer(INTVAL v) {
const size_t len = PF_size_integer() * sizeof (opcode_t);
ensure_buffer_size(INTERP, SELF, len);
- SET_VISIT_CURSOR(SELF, (char *)PF_store_integer(GET_VISIT_CURSOR(SELF), v));
+ SET_VISIT_CURSOR(SELF,
+ (const char *)PF_store_integer(GET_VISIT_CURSOR(SELF), v));
}
@@ -513,11 +536,11 @@
*/
- VTABLE void push_float(FLOATVAL v)
- {
- size_t len = PF_size_number() * sizeof (opcode_t);
+ VTABLE void push_float(FLOATVAL v) {
+ const size_t len = PF_size_number() * sizeof (opcode_t);
ensure_buffer_size(INTERP, SELF, len);
- SET_VISIT_CURSOR(SELF, (char *)PF_store_number(GET_VISIT_CURSOR(SELF), &v));
+ SET_VISIT_CURSOR(SELF,
+ (const char *)PF_store_number(GET_VISIT_CURSOR(SELF), &v));
}
@@ -534,33 +557,35 @@
VTABLE void push_string(STRING *v) {
if (PObj_flag_TEST(private1, SELF)) {
/* store a reference to constant table entry of string */
- PMC *v_pmc = key_new_string(interp, v);
- PackFile_ConstTable *table = PARROT_IMAGEIO(SELF)->pf_ct;
- int idx = PackFile_ConstTable_rlookup(INTERP, table, v_pmc, PFC_STRING);
+ PMC * const v_pmc = key_new_string(interp, v);
+ PackFile_ConstTable * const table = PARROT_IMAGEIO(SELF)->pf_ct;
+ const int idx =
+ PackFile_ConstTable_rlookup(INTERP, table, v_pmc, PFC_STRING);
if (idx >= 0) {
STATICSELF.push_integer(idx);
return;
}
- /* XXX
- * handle cases where the PMC has changed after Parrot_freeze_strings was called
- * eg: :immediate subs
- */
+ /* XXX handle cases where the PMC has changed after
+ * Parrot_freeze_strings was called eg: :immediate subs */
STATICSELF.push_integer(-1);
+
/* TODO
* should really be:
- * PANIC(INTERP, "string not previously in constant table when freezing to packfile");
- */
+ * PANIC(INTERP, "string not previously in constant table "
+ * "when freezing to packfile"); */
}
{
const size_t len = PF_size_string(v) * sizeof (opcode_t);
ensure_buffer_size(INTERP, SELF, len);
- SET_VISIT_CURSOR(SELF, (char *)PF_store_string(GET_VISIT_CURSOR(SELF), v));
+ SET_VISIT_CURSOR(SELF,
+ (const char *)PF_store_string(GET_VISIT_CURSOR(SELF), v));
}
}
+
/*
=item C<VTABLE void push_pmc(PMC *v)>
@@ -576,6 +601,23 @@
visit_todo_list_freeze(INTERP, v, SELF);
}
+
+/*
+
+=item C<void set_pointer(void *value)>
+
+Sets the constant table of this ImageIO PMC.
+
+=cut
+
+*/
+
+ VTABLE void set_pointer(void *value) {
+ PObj_flag_SET(private1, SELF);
+ PARROT_IMAGEIO(SELF)->pf_ct = (PackFile_ConstTable *)value;
+ }
+
+
/*
=item C<VTABLE INTVAL shift_integer()>
@@ -586,12 +628,14 @@
*/
- VTABLE INTVAL shift_integer()
- {
- opcode_t *pos = GET_VISIT_CURSOR(SELF);
- INTVAL i = PF_fetch_integer(PARROT_IMAGEIO(SELF)->pf,
- (const opcode_t **)&pos);
- SET_VISIT_CURSOR(SELF, (char *)pos);
+ VTABLE INTVAL shift_integer() {
+ /* inlining PF_fetch_integer speeds up PBC thawing measurably */
+ const PackFile *pf = PARROT_IMAGEIO(SELF)->pf;
+ const opcode_t *pos = GET_VISIT_CURSOR(SELF);
+ const unsigned char *stream = (const unsigned char *)pos;
+ const INTVAL i = pf->fetch_iv(stream);
+
+ SET_VISIT_CURSOR(SELF, (const char *)pos + pf->header->wordsize);
BYTECODE_SHIFT_OK(SELF);
return i;
}
@@ -608,10 +652,9 @@
*/
VTABLE FLOATVAL shift_float() {
- opcode_t *pos = GET_VISIT_CURSOR(SELF);
- FLOATVAL f = PF_fetch_number(PARROT_IMAGEIO(SELF)->pf,
- (const opcode_t **)&pos);
- SET_VISIT_CURSOR(SELF, (char *)pos);
+ const opcode_t *pos = GET_VISIT_CURSOR(SELF);
+ FLOATVAL f = PF_fetch_number(PARROT_IMAGEIO(SELF)->pf, &pos);
+ SET_VISIT_CURSOR(SELF, (const char *)pos);
BYTECODE_SHIFT_OK(SELF);
return f;
}
@@ -629,16 +672,17 @@
VTABLE STRING *shift_string() {
if (PObj_flag_TEST(private1, SELF)) {
- PackFile_ConstTable *table = PARROT_IMAGEIO(SELF)->pf_ct;
- INTVAL i = STATICSELF.shift_integer();
+ const INTVAL i = STATICSELF.shift_integer();
if (i >= 0) {
- if (! table->constants[i])
+ PackFile_ConstTable *table = PARROT_IMAGEIO(SELF)->pf_ct;
+
+ if (!table->constants[i].type)
Parrot_ex_throw_from_c_args(interp, NULL,
EXCEPTION_MALFORMED_PACKFILE,
"Reference to constant not yet unpacked %d", i);
- return table->constants[i]->u.string;
- }
+ return table->constants[i].u.string;
+ }
/* XXX
* only got here because constant table doesn't contain the string
@@ -647,15 +691,16 @@
}
{
- opcode_t *pos = GET_VISIT_CURSOR(SELF);
- STRING *s = PF_fetch_string(INTERP, PARROT_IMAGEIO(SELF)->pf,
- (const opcode_t **)&pos);
- SET_VISIT_CURSOR(SELF, (char *)pos);
+ const opcode_t * pos = GET_VISIT_CURSOR(SELF);
+ STRING * const s = PF_fetch_string(INTERP,
+ PARROT_IMAGEIO(SELF)->pf, &pos);
+ SET_VISIT_CURSOR(SELF, (const char *)pos);
BYTECODE_SHIFT_OK(SELF);
return s;
}
}
+
/*
=item C<static PMC *shift_pmc()>
@@ -672,9 +717,11 @@
VTABLE void set_pmc(PMC *p)
{
- const UINTVAL header_length = GROW_TO_16_BYTE_BOUNDARY(PACKFILE_HEADER_BYTES);
+ const UINTVAL header_length =
+ GROW_TO_16_BYTE_BOUNDARY(PACKFILE_HEADER_BYTES);
+
+ PARROT_IMAGEIO(SELF)->what = VISIT_FREEZE_NORMAL;
- PARROT_IMAGEIO(SELF)->what = VISIT_FREEZE_NORMAL;
create_buffer(INTERP, p, SELF);
ensure_buffer_size(INTERP, SELF, header_length);
mem_sys_memcopy(GET_VISIT_CURSOR(SELF),
@@ -691,15 +738,17 @@
VTABLE void set_string_native(STRING *image) {
PMC *unused;
- const UINTVAL header_length = GROW_TO_16_BYTE_BOUNDARY(PACKFILE_HEADER_BYTES);
- int unpacked_length;
+ int unpacked_length;
+ const UINTVAL header_length =
+ GROW_TO_16_BYTE_BOUNDARY(PACKFILE_HEADER_BYTES);
PARROT_IMAGEIO(SELF)->what = VISIT_THAW_NORMAL;
PARROT_IMAGEIO(SELF)->buffer = (Buffer *)image;
PARROT_ASSERT(image->_bufstart == image->strstart);
- SET_VISIT_CURSOR(SELF, (char *)Buffer_bufstart(PARROT_IMAGEIO(SELF)->buffer));
+ SET_VISIT_CURSOR(SELF,
+ (const char *)Buffer_bufstart(PARROT_IMAGEIO(SELF)->buffer));
PARROT_IMAGEIO(SELF)->input_length = image->strlen;
PARROT_IMAGEIO(SELF)->pf->options |= PFOPT_PMC_FREEZE_ONLY;
@@ -721,6 +770,7 @@
Parrot_visit_loop_thawfinish(INTERP, SELF);
}
+
/*
=back
Modified: branches/dynop_mapping/src/pmc/packfileconstanttable.pmc
==============================================================================
--- branches/dynop_mapping/src/pmc/packfileconstanttable.pmc Mon Aug 9 04:23:47 2010 (r48355)
+++ branches/dynop_mapping/src/pmc/packfileconstanttable.pmc Mon Aug 9 05:50:26 2010 (r48356)
@@ -92,7 +92,6 @@
PARROT_PACKFILECONSTANTTABLE(SELF);
const PackFile_ConstTable * const table =
(const PackFile_ConstTable *)(pointer);
- const PackFile_Constant * val;
opcode_t i;
/* Preallocate required amount of memory */
@@ -100,7 +99,7 @@
VTABLE_set_integer_native(INTERP, attrs->types, table->const_count);
for (i = 0; i < table->const_count; ++i) {
- val = table->constants[i];
+ const PackFile_Constant * val = &table->constants[i];
switch (val->type) {
case PFC_NONE:
break;
@@ -141,10 +140,10 @@
/* Copy all constanst with respect of type */
pftable->const_count = VTABLE_get_integer(INTERP, attrs->constants);
pftable->constants = mem_gc_allocate_n_typed(INTERP,
- pftable->const_count, PackFile_Constant*);
+ pftable->const_count, PackFile_Constant);
for (i = 0; i < pftable->const_count; ++i) {
- PackFile_Constant * const value = PackFile_Constant_new(INTERP);
+ PackFile_Constant * const value = &pftable->constants[i];
value->type = VTABLE_get_integer_keyed_int(INTERP, attrs->types, i);
switch (value->type) {
case PFC_NONE:
@@ -167,8 +166,6 @@
EXCEPTION_MALFORMED_PACKFILE,
"Unknown PackFile constant type: %d", value->type);
}
-
- pftable->constants[i] = value;
}
return pftable;
Modified: branches/dynop_mapping/src/pmc/sub.pmc
==============================================================================
--- branches/dynop_mapping/src/pmc/sub.pmc Mon Aug 9 04:23:47 2010 (r48355)
+++ branches/dynop_mapping/src/pmc/sub.pmc Mon Aug 9 05:50:26 2010 (r48356)
@@ -864,7 +864,7 @@
if (sub->seg->op_func_table[*pc]
== interp->op_func_table[PARROT_OP_get_params_pc]) {
/* Get the signature (the next thing in the bytecode). */
- PMC * const sig = PF_CONST(sub->seg, *(++pc))->u.key;
+ PMC * const sig = PF_CONST(sub->seg, *(++pc)).u.key;
/* Iterate over the signature and compute argument counts. */
const INTVAL sig_length = VTABLE_elements(INTERP, sig);
Modified: branches/dynop_mapping/src/pmc_freeze.c
==============================================================================
--- branches/dynop_mapping/src/pmc_freeze.c Mon Aug 9 04:23:47 2010 (r48355)
+++ branches/dynop_mapping/src/pmc_freeze.c Mon Aug 9 05:50:26 2010 (r48356)
@@ -11,7 +11,7 @@
Thawing PMCs uses a list with (maximum) size of the amount of PMCs to
keep track of retrieved PMCs.
-The individual information of PMCs is frozen/thawed by their vtables.
+PMCs freeze and thaw their own information through their vtables.
To avoid recursion, the whole functionality is driven by
C<< pmc->vtable->visit >>, which is called for the first PMC initially.
@@ -59,12 +59,13 @@
return VTABLE_get_string(interp, image);
}
+
/*
=item C<STRING * Parrot_freeze_pbc(PARROT_INTERP, PMC *pmc, const
PackFile_ConstTable *pf)>
-Freeze to a PackFile.
+Freezes a PMC to a PackFile.
=cut
@@ -81,7 +82,8 @@
PMC * const pf_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
DECL_CONST_CAST;
- VTABLE_set_pointer(interp, pf_pmc, PARROT_const_cast(void *, (const void*)pf));
+ VTABLE_set_pointer(interp, pf_pmc,
+ PARROT_const_cast(void *, (const void *)pf));
visitor = Parrot_pmc_new_init(interp, enum_class_ImageIO, pf_pmc);
VTABLE_set_pmc(interp, visitor, pmc);
@@ -94,7 +96,7 @@
=item C<UINTVAL Parrot_freeze_size(PARROT_INTERP, PMC *pmc)>
-Get the size of an image to be frozen without allocating a large buffer.
+Gets the size of an image to be frozen without allocating a large buffer.
=cut
@@ -106,21 +108,21 @@
Parrot_freeze_size(PARROT_INTERP, ARGIN(PMC *pmc))
{
ASSERT_ARGS(Parrot_freeze_size)
- UINTVAL int_result;
PMC *pmc_result;
PMC * const visitor = Parrot_pmc_new(interp, enum_class_ImageIOSize);
VTABLE_set_pmc(interp, visitor, pmc);
pmc_result = VTABLE_get_pmc(interp, visitor);
- int_result = VTABLE_get_integer(interp, pmc_result);
- return int_result;
+
+ return VTABLE_get_integer(interp, pmc_result);
}
+
/*
=item C<UINTVAL Parrot_freeze_pbc_size(PARROT_INTERP, PMC *pmc, const
PackFile_ConstTable *pf)>
-Get the size of an image if it were created using C<Parrot_freeze_pbc>.
+Gets the size of an image if it were created using C<Parrot_freeze_pbc>.
=cut
@@ -136,7 +138,8 @@
PMC *visitor, *pmc_result;
DECL_CONST_CAST;
- VTABLE_set_pointer(interp, pf_pmc, PARROT_const_cast(void *, (const void *)pf));
+ VTABLE_set_pointer(interp, pf_pmc,
+ PARROT_const_cast(void *, (const void *)pf));
visitor = Parrot_pmc_new_init(interp, enum_class_ImageIOSize, pf_pmc);
VTABLE_set_pmc(interp, visitor, pmc);
@@ -150,7 +153,7 @@
=item C<PMC * Parrot_freeze_strings(PARROT_INTERP, PMC *pmc)>
-Get the strings of a PMC to be frozen.
+Gets the strings of a PMC to be frozen.
=cut
@@ -171,15 +174,14 @@
/*
-=item C<PMC* Parrot_thaw(PARROT_INTERP, STRING *image)>
+=item C<PMC * Parrot_thaw(PARROT_INTERP, STRING *image)>
Thaws a PMC. Called from the C<thaw> opcode.
-For now it seems cheaper to use a list for remembering contained
-aggregates. We could of course decide dynamically, which strategy to
-use, e.g.: given a big image, the first thawed item is a small
-aggregate. This implies, it probably contains (or some big strings) more
-nested containers, for which another approach could be a win.
+For now it seems cheaper to use a list for remembering contained aggregates. We
+could of course decide dynamically, which strategy to use: given a big image,
+the first thawed item is a small aggregate. This implies it probably contains
+more nested containers, for which another approach could be a win.
=cut
@@ -188,14 +190,14 @@
PARROT_EXPORT
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
-PMC*
+PMC *
Parrot_thaw(PARROT_INTERP, ARGIN(STRING *image))
{
ASSERT_ARGS(Parrot_thaw)
- PMC * const info = Parrot_pmc_new(interp, enum_class_ImageIO);
- int gc_block = 0;
PMC *result;
+ PMC * const info = Parrot_pmc_new(interp, enum_class_ImageIO);
+ int gc_block = 0;
/*
* if we are thawing a lot of PMCs, it's cheaper to do
@@ -244,35 +246,20 @@
Parrot_thaw_pbc(PARROT_INTERP, ARGIN(STRING *image), ARGIN(PackFile_ConstTable *pf))
{
ASSERT_ARGS(Parrot_thaw_pbc)
- PMC *info, *pf_pmc, *result;
+ PMC *info = Parrot_pmc_new(interp, enum_class_ImageIO);
- pf_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
- VTABLE_set_pointer(interp, pf_pmc, pf);
-
- info = Parrot_pmc_new_init(interp, enum_class_ImageIO, pf_pmc);
-
- /* TODO
- * Find out what broken code depends on blocking GC here and fix it, regardless of performance
- * wins.
- */
- Parrot_block_GC_mark(interp);
- Parrot_block_GC_sweep(interp);
+ VTABLE_set_pointer(interp, info, pf);
VTABLE_set_string_native(interp, info, image);
- result = VTABLE_get_pmc(interp, info);
-
- Parrot_unblock_GC_mark(interp);
- Parrot_unblock_GC_sweep(interp);
-
- return result;
+ return VTABLE_get_pmc(interp, info);
}
+
/*
=item C<PMC* Parrot_thaw_constants(PARROT_INTERP, STRING *image)>
-Thaws constants, used by PackFile for unpacking PMC constants.
-This is a lie. It does nothing different from Parrot_thaw at the moment.
+This does nothing different from Parrot_thaw at the moment.
=cut
@@ -310,6 +297,7 @@
return VTABLE_clone(interp, pmc);
}
+
/*
=item C<void Parrot_visit_loop_visit(PARROT_INTERP, PMC *info)>
@@ -325,9 +313,10 @@
{
ASSERT_ARGS(Parrot_visit_loop_visit)
- INTVAL i;
+ PMC * const todo = VTABLE_get_iter(interp, info);
const INTVAL action = VTABLE_get_integer(interp, info);
- PMC * const todo = VTABLE_get_iter(interp, info);
+ const INTVAL e = VTABLE_elements(interp, todo);
+ INTVAL i;
/* can't cache upper limit, visit may append items */
for (i = 0; i < VTABLE_elements(interp, todo); ++i) {
@@ -349,11 +338,12 @@
}
}
+
/*
=item C<void Parrot_visit_loop_thawfinish(PARROT_INTERP, PMC *info)>
-Iterate a visitor PMC thawfinishing each encountered target PMC.
+Iterates a visitor PMC, thawfinishing each encountered target PMC.
=cut
@@ -374,17 +364,18 @@
* order here is likely broken.
*/
- PMC * const todo = VTABLE_get_iter(interp, info);
- const INTVAL n = VTABLE_elements(interp, todo);
+ PMC * const todo = VTABLE_get_iter(interp, info);
+ const INTVAL n = VTABLE_elements(interp, todo);
int i;
- for (i = n-1; i >= 0; --i) {
+ for (i = n - 1; i >= 0; --i) {
PMC *current = VTABLE_get_pmc_keyed_int(interp, todo, i);
if (!PMC_IS_NULL(current))
VTABLE_thawfinish(interp, current, info);
}
}
+
/*
=back
Modified: branches/dynop_mapping/src/runcore/trace.c
==============================================================================
--- branches/dynop_mapping/src/runcore/trace.c Mon Aug 9 04:23:47 2010 (r48355)
+++ branches/dynop_mapping/src/runcore/trace.c Mon Aug 9 05:50:26 2010 (r48356)
@@ -313,7 +313,7 @@
|| *pc == PARROT_OP_get_results_pc
|| *pc == PARROT_OP_get_params_pc
|| *pc == PARROT_OP_set_returns_pc) {
- sig = interp->code->const_table->constants[pc[1]]->u.key;
+ sig = interp->code->const_table->constants[pc[1]].u.key;
if (!sig)
Parrot_ex_throw_from_c_args(interp, NULL, 1,
Modified: branches/dynop_mapping/t/native_pbc/annotations.pbc
==============================================================================
Binary file (source and/or target). No diff available.
Modified: branches/dynop_mapping/t/native_pbc/integer.pbc
==============================================================================
Binary file (source and/or target). No diff available.
Modified: branches/dynop_mapping/t/native_pbc/integer_1.pbc
==============================================================================
Binary file (source and/or target). No diff available.
Modified: branches/dynop_mapping/t/native_pbc/number.pbc
==============================================================================
Binary file (source and/or target). No diff available.
Modified: branches/dynop_mapping/t/native_pbc/number_1.pbc
==============================================================================
Binary file (source and/or target). No diff available.
Modified: branches/dynop_mapping/t/native_pbc/string.pbc
==============================================================================
Binary file (source and/or target). No diff available.
Modified: branches/dynop_mapping/t/native_pbc/string_1.pbc
==============================================================================
Binary file (source and/or target). No diff available.
Modified: branches/dynop_mapping/t/pmc/capture.t
==============================================================================
--- branches/dynop_mapping/t/pmc/capture.t Mon Aug 9 04:23:47 2010 (r48355)
+++ branches/dynop_mapping/t/pmc/capture.t Mon Aug 9 05:50:26 2010 (r48356)
@@ -17,7 +17,7 @@
=cut
-.const int TESTS = 51
+.const int TESTS = 53
.sub 'test' :main
.include 'test_more.pir'
@@ -25,6 +25,7 @@
plan(TESTS)
test_new_capture()
+ empty_capture_tests()
basic_capture_tests()
test_defined_delete_exists()
test_hash_list()
@@ -41,20 +42,34 @@
ok(1, 'new Capture')
.end
-.sub 'basic_capture_tests'
+.sub 'empty_capture_tests'
.local pmc capt
capt = new ['Capture']
$I0 = elements capt
is($I0, 0, 'elements on empty Capture')
+
$N0 = capt[0]
- is($N0, 0, 'get_number_keyed_int on empty Capture')
+ is($N0, 0.0, 'get_number_keyed_int on empty Capture')
$I0 = capt[0]
is($I0, 0, 'get_integer_keyed_int on empty Capture')
$S0 = capt[0]
is($S0, '', 'get_string_keyed_int on empty Capture')
+ $N0 = capt['nothing']
+ is($N0, 0.0, 'get_number_keyed on empty Capture')
+
+ $S0 = capt
+ $S1 = 'get_string on empty Capture - ' . $S0
+ substring($S0, 'Capture[', $S1)
+.end
+
+.sub 'basic_capture_tests'
+ .local pmc capt
+
+ capt = new ['Capture']
+
capt[0] = 0
capt[1] = 1.5
capt[2] = 'two'
Modified: branches/dynop_mapping/t/pmc/oplib.t
==============================================================================
--- branches/dynop_mapping/t/pmc/oplib.t Mon Aug 9 04:23:47 2010 (r48355)
+++ branches/dynop_mapping/t/pmc/oplib.t Mon Aug 9 05:50:26 2010 (r48356)
@@ -12,11 +12,21 @@
=cut
+# Hardcoded assumptions for tests:
+# * We have an op called end
+# * It has no arguments
+# * Is the only member of its familiy
+.const string TESTED_OP = 'end'
+.const int TESTED_OP_ELEMS = 0
+.const int TESTED_OP_FAMILIY_ELEMS = 1
+# Never have an op with this name:
+.const string TESTED_NOSUCHOP = 'hopeweneverhaveopcodesnamedlikethis'
+
.include 'except_types.pasm'
.sub main :main
.include 'test_more.pir'
- plan(11)
+ plan(13)
new_oplib()
check_elements()
getint_end()
@@ -57,15 +67,14 @@
.sub getint_end
$P0 = new ['OpLib']
- # Assumption: we'll always have an end opcode.
- $I1 = $P0['end']
+ $I1 = $P0[TESTED_OP]
$I0 = isne $I1, -1
ok($I0, "got end opcode")
.end
.sub getint_no_opcode
$P0 = new ['OpLib']
- $I1 = $P0['hopeweneverhaveopcodesnamedlikethis']
+ $I1 = $P0[TESTED_NOSUCHOP]
$I0 = iseq $I1, -1
ok($I0, "get non existent opcode fails")
.end
@@ -73,16 +82,18 @@
.sub getop_end
.local pmc oplib, op, op2, name
oplib = new ['OpLib']
- # Assumption: we'll always have an end opcode.
# Using a string constant
- op = oplib['end']
+ op = oplib[TESTED_OP]
$I0 = isnull op
is($I0, 0, "got end opcode data")
+ $I0 = elements op
+ is($I0, TESTED_OP_ELEMS, "the opcode tested has the expected lenght")
+
# Using a String PMC
name = new ['String']
- name = 'end'
+ name = TESTED_OP
op2 = oplib[name]
$I0 = isnull op2
is($I0, 0, "got end opcode data keyed pmc")
@@ -91,25 +102,27 @@
ok($I0, "got same result from both ways")
$I1 = op
- $I0 = oplib['end']
+ $I0 = oplib[TESTED_OP]
is($I0, $I1, 'opcode number from Opcode and from OpLib is the same')
+
+ $S0 = op
+ is($S0, TESTED_OP, 'name from Opcode matches name searched for')
.end
.sub family_end
$P0 = new ['OpLib']
- # Assumption: we'll always have an end opcode.
- $P1 = $P0.'op_family'('end')
+ $P1 = $P0.'op_family'(TESTED_OP)
$I0 = isnull $P1
dec $I0
unless $I0 goto done
$I0 = elements $P1
done:
- is($I0, 1, "'end' family is not null and has 1 element")
+ is($I0, TESTED_OP_FAMILIY_ELEMS, "'end' family is not null and has 1 element")
.end
.sub family_no_opcode
$P0 = new ['OpLib']
- $P1 = $P0.'op_family'('hopeweneverhaveopcodesnamedlikethis')
+ $P1 = $P0.'op_family'(TESTED_NOSUCHOP)
$I0 = isnull $P1
ok($I0, "non existent opcode family is null")
.end
Modified: branches/dynop_mapping/t/pmc/packfile.t
==============================================================================
--- branches/dynop_mapping/t/pmc/packfile.t Mon Aug 9 04:23:47 2010 (r48355)
+++ branches/dynop_mapping/t/pmc/packfile.t Mon Aug 9 05:50:26 2010 (r48356)
@@ -20,12 +20,14 @@
=cut
.include 't/pmc/testlib/packfile_common.pir'
+.include 'except_types.pasm'
.sub main :main
.include 'test_more.pir'
- plan(36)
+ plan(37)
'test_new'()
+ 'test_set_string_native'()
'test_get_string'()
'test_set_string'()
'test_get_integer'()
@@ -47,10 +49,33 @@
pf = new ['Packfile']
$I0 = defined pf
ok($I0, 'new')
+
+ # Make sure the mark vtable function is exercised
+ sweep 1
+
.tailcall _check_header(pf)
.end
+.sub 'test_set_string_native'
+ .local pmc pf, eh
+ .local int result
+
+ eh = new ['ExceptionHandler']
+ eh.'handle_types'(.EXCEPTION_MALFORMED_PACKFILE)
+ set_label eh, catch
+ push_eh eh
+ pf = new ['Packfile']
+ pf = 'This is not data with a valid packfile format'
+ result = 0
+ goto end
+ catch:
+ result = 1
+ end:
+ is(result, 1, 'set_string_native with invalid data throws')
+.end
+
+
.sub 'test_get_string'
.local pmc pf
pf = new ['Packfile']
Modified: branches/dynop_mapping/tools/dev/pbc_to_exe.pir
==============================================================================
--- branches/dynop_mapping/tools/dev/pbc_to_exe.pir Mon Aug 9 04:23:47 2010 (r48355)
+++ branches/dynop_mapping/tools/dev/pbc_to_exe.pir Mon Aug 9 05:50:26 2010 (r48356)
@@ -255,7 +255,7 @@
read_done:
ifh.'close'()
- push codestring, "\n};\n\nconst int bytecode_size = "
+ push codestring, "\n};\n\nconst size_t bytecode_size = "
$S0 = size
push codestring, $S0
push codestring, ";\n"
@@ -353,7 +353,7 @@
push codestring, '"'
push codestring, "\n;\n\n"
- push codestring, "const int bytecode_size = "
+ push codestring, "const size_t bytecode_size = "
$S0 = size
push codestring, $S0
push codestring, ";\n"
Deleted: branches/dynop_mapping/tools/dev/pprof2cg.nqp
==============================================================================
--- branches/dynop_mapping/tools/dev/pprof2cg.nqp Mon Aug 9 05:50:26 2010 (r48355)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,284 +0,0 @@
-#! parrot-nqp
-
-
-#XXX: can't do main with args yet, so fake it
-
-main();
-
-sub main() {
-
- my $filename := pir::getinterp__P[2][1];
-
- my %stats;
- %stats<global_stats><total_time> := 0;
-
- my $fh := pir::new__PP("FileHandle");
- $fh.open($filename, "r");
-
- process_input($fh, %stats);
-
- $fh.close();
-
- #print_stats(%stats);
-
- $filename := $filename ~ ".out";
-
- $fh.open($filename, "w");
- my @profile := get_cg_profile(%stats);
- for @profile -> $line {
- $fh.print($line ~ "\n");
- }
- $fh.close();
- say("all done.");
-}
-
-sub process_input($fh, %stats) {
- my @call_stack;
- my $line := $fh.readline();
-
- while (!$fh.eof()) {
-
- my $type := pir::substr($line, 0, pir::index($line, ':'));
- my $data := pir::substr($line, pir::index($line, ':')+1);
- #say("data is '$data'");
-
- if ($type eq "OP") {
- #say("found an op line");
-
- my %op_hash := split_line($data);
- my %cur_ctx := @call_stack[0];
-
- if (pir::defined__IP(%cur_ctx<line>) && %op_hash<line> == %cur_ctx<line>) {
- %cur_ctx<op_num>++;
- }
- else {
- %cur_ctx<op_num> := 0;
- }
-
- my $op_time := %op_hash<time>;
- # += would be nice here
- my $global_time := $op_time + %stats<global_stats><total_time>;
- %stats<global_stats><total_time> := $global_time;
- %cur_ctx<line> := %op_hash<line>;
- store_stats(%stats, %cur_ctx, $op_time, %op_hash<op>);
-
- my $skip_first := 1;
- for @call_stack {
- if $skip_first {
- $skip_first--;
- }
- else {
- %stats{ $_<file> }{ $_<ns> }{ $_<line> }[ $_<op_num> ]<time> :=
- %stats{ $_<file> }{ $_<ns> }{ $_<line> }[ $_<op_num> ]<time> + $op_time;
- }
- }
- }
-
- elsif ($type eq "CS") {
- #say("found a context switch line");
-
- my %cs_hash := split_line($data);
- if (@call_stack == 0) {
- #say("ctx stack is empty");
- @call_stack[0] := %cs_hash;
- }
- else {
- my %cur_ctx := @call_stack[0];
- my $hash_ctx := %cs_hash<ctx>;
- my $is_redundant := %cur_ctx<ctx> eq $hash_ctx;
- my $reused_ctx := $is_redundant && %cur_ctx<sub> != %cs_hash<sub>;
-
- if ($reused_ctx) {
- #say("is reused: $hash_ctx vs " ~ %cur_ctx<ctx>);
- %cur_ctx<ns> := %cs_hash<ns>;
- %cur_ctx<sub> := %cs_hash<sub>;
- }
-
- elsif $is_redundant {
- #say("is redundant: $hash_ctx vs " ~ %cur_ctx<ctx>);
- }
- else {
- my $found_ctx := 0;
- for @call_stack {
- #would be nice to exit early
- $found_ctx := $found_ctx || $_<ctx> eq $hash_ctx;
- }
-
- if $found_ctx {
- pir::shift(@call_stack) while @call_stack[0]<ctx> ne $hash_ctx
- }
- else {
- %cur_ctx<op_num>++;
- store_stats(%stats, @call_stack[0], 0, "CALL", :target(%cs_hash<ns>));
- pir::unshift(@call_stack, %cs_hash);
- }
- }
- }
- }
-
- elsif ($type eq "VERSION") {
- my $version_num;
- Q:PIR {
- $P0 = find_lex "$data"
- $I0 = $P0
- $P0 = box $I0
- store_lex "$version_num", $P0
- };
- #say("found a version line: '$version_num'");
- if ($version_num != 1) {
- say("pprof is from an incompatible Parrot version");
- pir::exit(1);
- }
- }
- elsif ($type eq "CLI") {
- #say("found a CLI line");
- %stats<global_stats><cli> := $data;
- }
- elsif (pir::index($line, "END_OF_RUNLOOP") == 0) {
- #say("found an end of runloop line");
- @call_stack := ();
- }
- elsif (pir::index($line, "#") == 0) {
- #say("found a comment line");
- }
- else {
- say("don't know what to do with this line: \"$line\"");
- }
- $line := $fh.readline();
- }
-}
-
-
-sub store_stats(%stats, %loc, $time, $op_name, :$target?) {
-
- my %op_stats;
- if pir::defined__IP( %stats{ %loc<file> }{ %loc<ns> }{ %loc<line> }[ %loc<op_num> ] ) {
- %op_stats := %stats{ %loc<file> }{ %loc<ns> }{ %loc<line> }[ %loc<op_num> ];
- }
- else {
- %op_stats := %stats{ %loc<file> }{ %loc<ns> }{ %loc<line> }[ %loc<op_num> ] := {};
- }
-
- if %op_stats<hits> {
- %op_stats<hits>++;
- %op_stats<time> := %op_stats<time> + $time;
- }
- else {
- %op_stats<hits> := 1;
- %op_stats<time> := $time;
- %op_stats<op_name> := $op_name;
- %op_stats<target> := $target if pir::defined__IP($target);
- }
-}
-
-sub print_stats(%stats) {
-# for %stats -> $file {
-# if $file ne 'global_stats' {
-# for %stats{$file} -> $ns {
-# for %stats{$file}{$ns} -> $line_num {
-# my $max_op := +%stats{$file}{$ns}{$line_num};
-# my $cur_op := 0;
-# while ($cur_op < $max_op) {
-# print("$file $ns line/op:$line_num/$cur_op");
-# for %stats{$file}{$ns}{$line_num}[$cur_op] -> $attr {
-# print(" $attr => " ~ ~%stats{$file}{$ns}{$line_num}[$cur_op]{$attr});
-# }
-# $cur_op++;
-# print("\n");
-# }
-# }
-# print("\n");
-# }
-# }
-# }
- pir::load_bytecode("dumper.pbc");
- _dumper(%stats);
-}
-
-
-sub get_cg_profile(%stats) {
- my @output;
- @output.push("version: 1");
- @output.push("creator: PARROT IS AWESOME");
- @output.push("pid: 5751");
- @output.push("cmd: " ~ ~%stats<global_stats><cli>);
- #@output.push("");
- @output.push("part: 1");
- @output.push("desc: I1 cache:");
- @output.push("desc: D1 cache:");
- @output.push("desc: L2 cache:");
- @output.push("desc: Timerange: Basic block 0 - " ~ +%stats<global_stats><total_time>);
- @output.push("desc: Trigger: Program termination");
- @output.push("positions: line");
- @output.push("events: Ir");
- @output.push("summary: "~ %stats<global_stats><total_time>);
- @output.push("");
-
- for %stats -> $file {
- if $file ne "global_stats" {
-
- @output.push("fl=$file");
- for %stats{$file} -> $ns {
- @output.push("\nfn=$ns");
-
- #%stats{$file}{$ns}.sort();
- for %stats{$file}{$ns} -> $line {
- my $curr_op := 0;
- my @line_stats := %stats{$file}{$ns}{$line};
- my $op_count := + at line_stats;
- my $op_time := 0;
-
- while $curr_op < $op_count && @line_stats[$curr_op]<op_name> ne "CALL" {
- $op_time := $op_time + @line_stats[$curr_op]<time>;
- #say("op is "~ @line_stats[$curr_op]<op_name>);
- $curr_op++;
- }
- @output.push(~$line ~ " " ~ ~$op_time);
-
- if $curr_op < $op_count && @line_stats[$curr_op]<op_name> eq "CALL" {
- my $hits := @line_stats[$curr_op]<hits>;
- my $time := @line_stats[$curr_op]<time>;
- my $target := @line_stats[$curr_op]<target>;
- @output.push("cfn=$target");
- @output.push("calls=$hits $time");
- #say("op is "~ @line_stats[$curr_op]<op_name>);
- }
-
- if $curr_op < $op_count {
- $op_time := 0;
- while $curr_op < $op_count {
- $op_time := $op_time + @line_stats[$curr_op]<time>;
- #say("op is "~ @line_stats[$curr_op]<op_name>);
- $curr_op++;
- }
- @output.push(~$line ~ " " ~ ~$op_time);
- }
- }
- }
- }
- }
- @output.push("totals: " ~ ~%stats<global_stats><total_time>);
- @output;
-}
-
-
-sub split_line($line) {
- my %values := {};
-
- #take off the opening and closing {x{ and }x}
- $line := pir::substr($line, 3);
- my $len := pir::length($line);
- $len := $len - 4;
- $line := pir::substr($line, 0, $len);
-
- my @attrs := pir::split('}x}{x{', $line);
-
- for @attrs {
- my $idx := pir::index($_, ":");
- my $key := pir::substr($_, 0, $idx);
- my $value := pir::substr($_, $idx+1);
- %values{$key} := $value;
- #say("key is $key, value is $value");
- }
- return %values;
-}
More information about the parrot-commits
mailing list