Skip to content

Commit

Permalink
Remove the deprecated flattenropes op.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Nov 16, 2016
1 parent bc6e933 commit 1dc68e5
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 20 deletions.
4 changes: 2 additions & 2 deletions lib/MAST/Ops.nqp
Original file line number Diff line number Diff line change
Expand Up @@ -3907,7 +3907,7 @@ BEGIN {
'rindexfrom', 232,
'escape', 233,
'flip', 234,
'flattenropes', 235,
'DEPRECATED_1', 235,
'iscclass', 236,
'findcclass', 237,
'findnotcclass', 238,
Expand Down Expand Up @@ -4723,7 +4723,7 @@ BEGIN {
'rindexfrom',
'escape',
'flip',
'flattenropes',
'DEPRECATED_1',
'iscclass',
'findcclass',
'findnotcclass',
Expand Down
6 changes: 2 additions & 4 deletions src/core/interp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1596,10 +1596,8 @@ void MVM_interp_run(MVMThreadContext *tc, void (*initial_invoke)(MVMThreadContex
GET_REG(cur_op, 2).s);
cur_op += 4;
goto NEXT;
OP(flattenropes):
MVM_string_flatten(tc, GET_REG(cur_op, 0).s);
cur_op += 2;
goto NEXT;
OP(DEPRECATED_1):
MVM_exception_throw_adhoc(tc, "The flattenropes op was removed in MoarVM 2016.11.");
OP(iscclass):
GET_REG(cur_op, 0).i64 = MVM_string_is_cclass(tc,
GET_REG(cur_op, 2).i64, GET_REG(cur_op, 4).s,
Expand Down
2 changes: 1 addition & 1 deletion src/core/oplabels.h
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ static const void * const LABELS[] = {
&&OP_rindexfrom,
&&OP_escape,
&&OP_flip,
&&OP_flattenropes,
&&OP_DEPRECATED_1,
&&OP_iscclass,
&&OP_findcclass,
&&OP_findnotcclass,
Expand Down
3 changes: 1 addition & 2 deletions src/core/oplist
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,7 @@ ordat w(int64) r(str) r(int64) :pure
rindexfrom w(int64) r(str) r(str) r(int64) :pure
escape w(str) r(str) :pure
flip w(str) r(str) :pure
# flattenropes will be DEPRECATED! (Use non-inplace indexingoptimized op)
flattenropes r(str)
DEPRECATED_1 r(str)
iscclass w(int64) r(int64) r(str) r(int64) :pure
findcclass w(int64) r(int64) r(str) r(int64) r(int64) :pure
findnotcclass w(int64) r(int64) r(str) r(int64) r(int64) :pure
Expand Down
4 changes: 2 additions & 2 deletions src/core/ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -2585,8 +2585,8 @@ static const MVMOpInfo MVM_op_infos[] = {
{ MVM_operand_write_reg | MVM_operand_str, MVM_operand_read_reg | MVM_operand_str }
},
{
MVM_OP_flattenropes,
"flattenropes",
MVM_OP_DEPRECATED_1,
"DEPRECATED_1",
" ",
1,
0,
Expand Down
2 changes: 1 addition & 1 deletion src/core/ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@
#define MVM_OP_rindexfrom 232
#define MVM_OP_escape 233
#define MVM_OP_flip 234
#define MVM_OP_flattenropes 235
#define MVM_OP_DEPRECATED_1 235
#define MVM_OP_iscclass 236
#define MVM_OP_findcclass 237
#define MVM_OP_findnotcclass 238
Expand Down
8 changes: 0 additions & 8 deletions src/jit/graph.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,6 @@ static void * op_to_func(MVMThreadContext *tc, MVMint16 opcode) {
case MVM_OP_read_fhs: return MVM_io_read_string;

case MVM_OP_elems: return MVM_repr_elems;
case MVM_OP_flattenropes: return MVM_string_flatten;
case MVM_OP_concat_s: return MVM_string_concatenate;
case MVM_OP_repeat_s: return MVM_string_repeat;
case MVM_OP_flip: return MVM_string_flip;
Expand Down Expand Up @@ -1890,13 +1889,6 @@ static MVMint32 jgb_consume_ins(MVMThreadContext *tc, JitGraphBuilder *jgb,
jgb_append_primitive(tc, jgb, ins);
break;
}
case MVM_OP_flattenropes: {
MVMint32 target = ins->operands[0].reg.orig;
MVMJitCallArg args[] = { { MVM_JIT_INTERP_VAR, { MVM_JIT_INTERP_TC } },
{ MVM_JIT_REG_VAL, { target } } };
jgb_append_call_c(tc, jgb, op_to_func(tc, op), 2, args, MVM_JIT_RV_VOID, -1);
break;
}
case MVM_OP_hllize: {
MVMint16 dst = ins->operands[0].reg.orig;
MVMint16 src = ins->operands[1].reg.orig;
Expand Down

0 comments on commit 1dc68e5

Please sign in to comment.