Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Implement isconcrete.
  • Loading branch information
jnthn committed Jan 6, 2013
1 parent 0c15d3d commit c966654
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/QAST/JASTCompiler.nqp
Expand Up @@ -750,6 +750,7 @@ QAST::OperationsJAST.map_classlib_core_op('bootstr', $TYPE_OPS, 'bootstr', [], $
QAST::OperationsJAST.map_classlib_core_op('bootarray', $TYPE_OPS, 'bootarray', [], $RT_OBJ, :tc);
QAST::OperationsJAST.map_classlib_core_op('boothash', $TYPE_OPS, 'boothash', [], $RT_OBJ, :tc);
QAST::OperationsJAST.map_classlib_core_op('create', $TYPE_OPS, 'create', [$RT_OBJ], $RT_OBJ, :tc);
QAST::OperationsJAST.map_classlib_core_op('isconcrete', $TYPE_OPS, 'isconcrete', [$RT_OBJ], $RT_INT, :tc);
QAST::OperationsJAST.map_classlib_core_op('getattr', $TYPE_OPS, 'getattr', [$RT_OBJ, $RT_OBJ, $RT_STR], $RT_OBJ, :tc);
QAST::OperationsJAST.map_classlib_core_op('getattr_i', $TYPE_OPS, 'getattr_i', [$RT_OBJ, $RT_OBJ, $RT_STR], $RT_INT, :tc);
QAST::OperationsJAST.map_classlib_core_op('getattr_n', $TYPE_OPS, 'getattr_n', [$RT_OBJ, $RT_OBJ, $RT_STR], $RT_NUM, :tc);
Expand Down
3 changes: 3 additions & 0 deletions src/org/perl6/nqp/runtime/Ops.java
Expand Up @@ -444,6 +444,9 @@ public static SixModelObject create(SixModelObject obj, ThreadContext tc) {
res.initialize(tc);
return res;
}
public static long isconcrete(SixModelObject obj, ThreadContext tc) {
return obj instanceof TypeObject ? 0 : 1;
}
public static SixModelObject knowhow(ThreadContext tc) {
return tc.gc.KnowHOW;
}
Expand Down

0 comments on commit c966654

Please sign in to comment.