Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Stub nqp::filenofh on JVM.
  • Loading branch information
jnthn committed Dec 14, 2015
1 parent 436b4f2 commit cf246d6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/vm/jvm/QAST/Compiler.nqp
Expand Up @@ -2080,6 +2080,7 @@ QAST::OperationsJAST.map_classlib_core_op('closefh', $TYPE_OPS, 'closefh', [$RT_
QAST::OperationsJAST.map_classlib_core_op('closefh_i', $TYPE_OPS, 'closefhi', [$RT_OBJ], $RT_INT, :tc);

QAST::OperationsJAST.map_classlib_core_op('isttyfh', $TYPE_OPS, 'isttyfh', [$RT_OBJ], $RT_INT, :tc);
QAST::OperationsJAST.map_classlib_core_op('filenofh', $TYPE_OPS, 'filenofh', [$RT_OBJ], $RT_INT, :tc);

QAST::OperationsJAST.map_classlib_core_op('chmod', $TYPE_OPS, 'chmod', [$RT_STR, $RT_INT], $RT_INT, :tc);
QAST::OperationsJAST.map_classlib_core_op('unlink', $TYPE_OPS, 'unlink', [$RT_STR], $RT_INT, :tc);
Expand Down
5 changes: 5 additions & 0 deletions src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java
Expand Up @@ -863,6 +863,11 @@ public static long isttyfh(SixModelObject obj, ThreadContext tc) {
return -1;
}

public static long filenofh(SixModelObject obj, ThreadContext tc) {
/* XXX Implement this */
return -1;
}

public static Set<PosixFilePermission> modeToPosixFilePermission(long mode) {
Set<PosixFilePermission> perms = EnumSet.noneOf(PosixFilePermission.class);
if ((mode & 0001) != 0) perms.add(PosixFilePermission.OTHERS_EXECUTE);
Expand Down

0 comments on commit cf246d6

Please sign in to comment.