Skip to content

Commit a4584d3

Browse files
committed
Remove references to readlineint_fh
This corresponds to recent changes in MoarVM, in the no-moar-linenoise branch. I haven't removed readlineintfh from the Parrot stage 0 stuff, because the tests are currently failing, and I don't want to bork Parrot worse than it already is.
1 parent 5b982d7 commit a4584d3

File tree

6 files changed

+2
-33
lines changed

6 files changed

+2
-33
lines changed

docs/ops.markdown

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,11 +1037,6 @@ in the next `$count` bytes from the filehandle and store them in the array.
10371037

10381038
Return the next line of the open filehandle.
10391039

1040-
## readlineintfh
1041-
* `readlineintfh(Handle $fh, str $prompt)`
1042-
1043-
Prompt the user with `$prompt`, then return the next line of the open filehandle.
1044-
10451040
## readcharsfh
10461041
* `nqp::readcharsfh(Handle $fh, $chars)`
10471042

src/HLL/Compiler.nqp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ class HLL::Compiler does HLL::Backend::Default {
6767
while 1 {
6868
last if nqp::eoffh($stdin);
6969

70-
my str $newcode := nqp::readlineintfh($stdin, ~$prompt);
71-
if nqp::isnull_s($newcode) {
70+
my str $newcode := nqp::readlinefh($stdin);
71+
if nqp::isnull_s($newcode) || !nqp::defined($newcode) {
7272
nqp::print("\n");
7373
last;
7474
}

src/vm/jvm/QAST/Compiler.nqp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2037,7 +2037,6 @@ QAST::OperationsJAST.map_classlib_core_op('printfh', $TYPE_OPS, 'printfh', [$RT_
20372037
QAST::OperationsJAST.map_classlib_core_op('sayfh', $TYPE_OPS, 'sayfh', [$RT_OBJ, $RT_STR], $RT_INT, :tc);
20382038
QAST::OperationsJAST.map_classlib_core_op('flushfh', $TYPE_OPS, 'flushfh', [$RT_OBJ], $RT_OBJ, :tc);
20392039
QAST::OperationsJAST.map_classlib_core_op('readlinefh', $TYPE_OPS, 'readlinefh', [$RT_OBJ], $RT_STR, :tc);
2040-
QAST::OperationsJAST.map_classlib_core_op('readlineintfh', $TYPE_OPS, 'readlineintfh', [$RT_OBJ, $RT_STR], $RT_STR, :tc);
20412040
QAST::OperationsJAST.map_classlib_core_op('readallfh', $TYPE_OPS, 'readallfh', [$RT_OBJ], $RT_STR, :tc);
20422041
QAST::OperationsJAST.map_classlib_core_op('getcfh', $TYPE_OPS, 'getcfh', [$RT_OBJ], $RT_STR, :tc);
20432042
QAST::OperationsJAST.map_classlib_core_op('eoffh', $TYPE_OPS, 'eoffh', [$RT_OBJ], $RT_INT, :tc);

src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -656,21 +656,6 @@ public static String readlinefh(SixModelObject obj, ThreadContext tc) {
656656
}
657657
}
658658

659-
public static String readlineintfh(SixModelObject obj, String prompt, ThreadContext tc) {
660-
if (obj instanceof IOHandleInstance) {
661-
IOHandleInstance h = (IOHandleInstance)obj;
662-
if (h.handle instanceof IIOInteractive)
663-
return ((IIOInteractive)h.handle).readlineInteractive(tc, prompt);
664-
else
665-
throw ExceptionHandling.dieInternal(tc,
666-
"This handle does not support readline interactive");
667-
}
668-
else {
669-
throw ExceptionHandling.dieInternal(tc,
670-
"readlineintfh requires an object with the IOHandle REPR");
671-
}
672-
}
673-
674659
public static String readallfh(SixModelObject obj, ThreadContext tc) {
675660
if (obj instanceof IOHandleInstance) {
676661
IOHandleInstance h = (IOHandleInstance)obj;

src/vm/moar/QAST/QASTOperationsMAST.nqp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1984,7 +1984,6 @@ QAST::MASTOperations.add_core_moarop_mapping('writefh', 'write_fhb', 1);
19841984
QAST::MASTOperations.add_core_moarop_mapping('printfh', 'write_fhs');
19851985
QAST::MASTOperations.add_core_moarop_mapping('sayfh', 'say_fhs');
19861986
QAST::MASTOperations.add_core_moarop_mapping('readlinefh', 'readline_fh');
1987-
QAST::MASTOperations.add_core_moarop_mapping('readlineintfh', 'readlineint_fh');
19881987
QAST::MASTOperations.add_core_moarop_mapping('readallfh', 'readall_fh');
19891988
QAST::MASTOperations.add_core_op('getcfh', -> $qastcomp, $op {
19901989
$qastcomp.as_mast( QAST::VM.new( :moarop('read_fhs'), $op[0], QAST::IVal.new( :value(1) )) )

src/vm/parrot/QAST/Operations.nqp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1821,15 +1821,6 @@ QAST::Operations.add_core_op('readlinefh', -> $qastcomp, $op {
18211821
$op[0]
18221822
))
18231823
});
1824-
QAST::Operations.add_core_op('readlineintfh', -> $qastcomp, $op {
1825-
if +$op.list != 2 {
1826-
nqp::die("The 'readlineintfh' op expects two operands");
1827-
}
1828-
$qastcomp.as_post(QAST::Op.new(
1829-
:op('callmethod'), :name('readline_interactive'),
1830-
$op[0], $op[1]
1831-
))
1832-
});
18331824
QAST::Operations.add_core_op('readallfh', -> $qastcomp, $op {
18341825
if +$op.list != 1 {
18351826
nqp::die("The 'readallfh' op expects one operand");

0 commit comments

Comments
 (0)