Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
hoelzro committed Apr 24, 2015
1 parent 5b982d7 commit a4584d3
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 33 deletions.
5 changes: 0 additions & 5 deletions docs/ops.markdown
Expand Up @@ -1037,11 +1037,6 @@ in the next `$count` bytes from the filehandle and store them in the array.

Return the next line of the open filehandle.

## readlineintfh
* `readlineintfh(Handle $fh, str $prompt)`

Prompt the user with `$prompt`, then return the next line of the open filehandle.

## readcharsfh
* `nqp::readcharsfh(Handle $fh, $chars)`

Expand Down
4 changes: 2 additions & 2 deletions src/HLL/Compiler.nqp
Expand Up @@ -67,8 +67,8 @@ class HLL::Compiler does HLL::Backend::Default {
while 1 {
last if nqp::eoffh($stdin);

my str $newcode := nqp::readlineintfh($stdin, ~$prompt);
if nqp::isnull_s($newcode) {
my str $newcode := nqp::readlinefh($stdin);
if nqp::isnull_s($newcode) || !nqp::defined($newcode) {
nqp::print("\n");
last;
}
Expand Down
1 change: 0 additions & 1 deletion src/vm/jvm/QAST/Compiler.nqp
Expand Up @@ -2037,7 +2037,6 @@ QAST::OperationsJAST.map_classlib_core_op('printfh', $TYPE_OPS, 'printfh', [$RT_
QAST::OperationsJAST.map_classlib_core_op('sayfh', $TYPE_OPS, 'sayfh', [$RT_OBJ, $RT_STR], $RT_INT, :tc);
QAST::OperationsJAST.map_classlib_core_op('flushfh', $TYPE_OPS, 'flushfh', [$RT_OBJ], $RT_OBJ, :tc);
QAST::OperationsJAST.map_classlib_core_op('readlinefh', $TYPE_OPS, 'readlinefh', [$RT_OBJ], $RT_STR, :tc);
QAST::OperationsJAST.map_classlib_core_op('readlineintfh', $TYPE_OPS, 'readlineintfh', [$RT_OBJ, $RT_STR], $RT_STR, :tc);
QAST::OperationsJAST.map_classlib_core_op('readallfh', $TYPE_OPS, 'readallfh', [$RT_OBJ], $RT_STR, :tc);
QAST::OperationsJAST.map_classlib_core_op('getcfh', $TYPE_OPS, 'getcfh', [$RT_OBJ], $RT_STR, :tc);
QAST::OperationsJAST.map_classlib_core_op('eoffh', $TYPE_OPS, 'eoffh', [$RT_OBJ], $RT_INT, :tc);
Expand Down
15 changes: 0 additions & 15 deletions src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java
Expand Up @@ -656,21 +656,6 @@ public static String readlinefh(SixModelObject obj, ThreadContext tc) {
}
}

public static String readlineintfh(SixModelObject obj, String prompt, ThreadContext tc) {
if (obj instanceof IOHandleInstance) {
IOHandleInstance h = (IOHandleInstance)obj;
if (h.handle instanceof IIOInteractive)
return ((IIOInteractive)h.handle).readlineInteractive(tc, prompt);
else
throw ExceptionHandling.dieInternal(tc,
"This handle does not support readline interactive");
}
else {
throw ExceptionHandling.dieInternal(tc,
"readlineintfh requires an object with the IOHandle REPR");
}
}

public static String readallfh(SixModelObject obj, ThreadContext tc) {
if (obj instanceof IOHandleInstance) {
IOHandleInstance h = (IOHandleInstance)obj;
Expand Down
1 change: 0 additions & 1 deletion src/vm/moar/QAST/QASTOperationsMAST.nqp
Expand Up @@ -1984,7 +1984,6 @@ QAST::MASTOperations.add_core_moarop_mapping('writefh', 'write_fhb', 1);
QAST::MASTOperations.add_core_moarop_mapping('printfh', 'write_fhs');
QAST::MASTOperations.add_core_moarop_mapping('sayfh', 'say_fhs');
QAST::MASTOperations.add_core_moarop_mapping('readlinefh', 'readline_fh');
QAST::MASTOperations.add_core_moarop_mapping('readlineintfh', 'readlineint_fh');
QAST::MASTOperations.add_core_moarop_mapping('readallfh', 'readall_fh');
QAST::MASTOperations.add_core_op('getcfh', -> $qastcomp, $op {
$qastcomp.as_mast( QAST::VM.new( :moarop('read_fhs'), $op[0], QAST::IVal.new( :value(1) )) )
Expand Down
9 changes: 0 additions & 9 deletions src/vm/parrot/QAST/Operations.nqp
Expand Up @@ -1821,15 +1821,6 @@ QAST::Operations.add_core_op('readlinefh', -> $qastcomp, $op {
$op[0]
))
});
QAST::Operations.add_core_op('readlineintfh', -> $qastcomp, $op {
if +$op.list != 2 {
nqp::die("The 'readlineintfh' op expects two operands");
}
$qastcomp.as_post(QAST::Op.new(
:op('callmethod'), :name('readline_interactive'),
$op[0], $op[1]
))
});
QAST::Operations.add_core_op('readallfh', -> $qastcomp, $op {
if +$op.list != 1 {
nqp::die("The 'readallfh' op expects one operand");
Expand Down

0 comments on commit a4584d3

Please sign in to comment.