Skip to content

Commit 7c8a11c

Browse files
committed
Rip out the NQPMultiSig PMC; we don't need it any more.
1 parent 33fc4d2 commit 7c8a11c

File tree

4 files changed

+4
-55
lines changed

4 files changed

+4
-55
lines changed

src/guts/multi_dispatch.c

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#include "../6model/sixmodelobject.h"
55
#include "../pmc/pmc_dispatchersub.h"
66
#include "pmc_sub.h"
7-
#include "../pmc/pmc_nqpmultisig.h"
87
#include "multi_dispatch.h"
98

109
/* This file contains a somewhat simplified implementation of the Perl 6
@@ -142,15 +141,9 @@ static candidate_info** sort_candidates(PARROT_INTERP, PMC *candidates) {
142141

143142
/* Get hold of signature, types and definednesses. */
144143
GETATTR_Sub_multi_signature(interp, candidate, multi_sig_pmc);
145-
if (multi_sig_pmc->vtable->base_type == smo_id) {
146-
multi_sig = (NQP_Signature *)PMC_data(multi_sig_pmc);
147-
types_list = multi_sig->types;
148-
definedness_list = multi_sig->definednesses;
149-
}
150-
else {
151-
GETATTR_NQPMultiSig_types(interp, multi_sig_pmc, types_list);
152-
GETATTR_NQPMultiSig_definedness_constraints(interp, multi_sig_pmc, definedness_list);
153-
}
144+
multi_sig = (NQP_Signature *)PMC_data(multi_sig_pmc);
145+
types_list = multi_sig->types;
146+
definedness_list = multi_sig->definednesses;
154147
sig_elems = VTABLE_elements(interp, types_list);
155148

156149
/* Type information. */

src/ops/nqp.ops

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ BEGIN_OPS_PREAMBLE
1111
#include "../6model/serialization_context.h"
1212
#include "../guts/multi_dispatch.h"
1313
#include "../pmc/pmc_dispatchersub.h"
14-
#include "../pmc/pmc_nqpmultisig.h"
1514
#include "pmc_sub.h"
1615

1716
/* SHA1 algorithm. */
@@ -29,7 +28,6 @@ static INTVAL initialized = 0;
2928
static INTVAL stable_id = 0;
3029
static INTVAL smo_id = 0;
3130
static INTVAL disp_id = 0;
32-
static INTVAL ms_id = 0;
3331

3432
/* Built-in meta-objects. */
3533
static PMC *KnowHOW = NULL;
@@ -58,7 +56,6 @@ inline op nqp_dynop_setup() :base_core {
5856
stable_id = Parrot_pmc_get_type_str(interp, Parrot_str_new(interp, "STable", 0));
5957
smo_id = Parrot_pmc_get_type_str(interp, Parrot_str_new(interp, "SixModelObject", 0));
6058
disp_id = Parrot_pmc_get_type_str(interp, Parrot_str_new(interp, "DispatcherSub", 0));
61-
ms_id = Parrot_pmc_get_type_str(interp, Parrot_str_new(interp, "NQPMultiSig", 0));
6259

6360
/* Initialize the object model. */
6461
SixModelObject_initialize(interp, &KnowHOW, &KnowHOWAttribute);
@@ -1278,30 +1275,6 @@ inline op is_dispatcher(out INT, in PMC) :base_core {
12781275
}
12791276

12801277

1281-
/*
1282-
1283-
=item set_sub_multisig()
1284-
1285-
Sets a sub's multi_signature. $1 is the sub, $2 is an array of type objects
1286-
and $3 is is an array of definedness constraint descriptors.
1287-
1288-
=cut
1289-
1290-
*/
1291-
inline op set_sub_multisig(in PMC, in PMC, in PMC) :base_core {
1292-
if ($1->vtable->base_type == enum_class_Sub) {
1293-
PMC *sig = Parrot_pmc_new(interp, ms_id);
1294-
SETATTR_NQPMultiSig_types(interp, sig, $2);
1295-
SETATTR_NQPMultiSig_definedness_constraints(interp, sig, $3);
1296-
SETATTR_Sub_multi_signature(interp, $1, sig);
1297-
PARROT_GC_WRITE_BARRIER(interp, $1);
1298-
}
1299-
else
1300-
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
1301-
"Can only use set_sub_multisig if first operand is a Sub.");
1302-
}
1303-
1304-
13051278
/*
13061279

13071280
=item set_sub_multisig()

src/pmc/nqpmultisig.pmc

Lines changed: 0 additions & 16 deletions
This file was deleted.

tools/build/Makefile.in

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,7 @@ DYNPMC = $(PMC_DIR)/$(GROUP)$(LOAD_EXT)
171171
DYNOPS = $(OPS_DIR)/$(OPS)$(LOAD_EXT)
172172

173173
PMC_SOURCES = $(PMC_DIR)/stable.pmc $(PMC_DIR)/sixmodelobject.pmc \
174-
$(PMC_DIR)/dispatchersub.pmc \
175-
$(PMC_DIR)/nqpmultisig.pmc $(PMC_DIR)/nqplexinfo.pmc \
174+
$(PMC_DIR)/dispatchersub.pmc $(PMC_DIR)/nqplexinfo.pmc \
176175
$(PMC_DIR)/nqplexpad.pmc $(PMC_DIR)/serializationcontext.pmc
177176

178177
OPS_SOURCE = nqp.ops

0 commit comments

Comments
 (0)