Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add C type constants for parrot/jvm
  • Loading branch information
FROGGS committed Feb 14, 2015
1 parent 8ae7b29 commit d4ed5bd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/vm/jvm/QAST/Compiler.nqp
Expand Up @@ -1965,6 +1965,15 @@ my %const_map := nqp::hash(
'TYPE_CHECK_CACHE_DEFINITIVE', 0,
'TYPE_CHECK_CACHE_THEN_METHOD', 1,
'TYPE_CHECK_NEEDS_ACCEPTS', 2,

'C_TYPE_CHAR', -1,
'C_TYPE_SHORT', -2,
'C_TYPE_INT', -3,
'C_TYPE_LONG', -4,
'C_TYPE_LONGLONG', -5,
'C_TYPE_FLOAT', -1,
'C_TYPE_DOUBLE', -2,
'C_TYPE_LONGDOUBLE', -3,
);
QAST::OperationsJAST.add_core_op('const', -> $qastcomp, $op {
if nqp::existskey(%const_map, $op.name) {
Expand Down
9 changes: 9 additions & 0 deletions src/vm/parrot/QAST/Operations.nqp
Expand Up @@ -1290,6 +1290,15 @@ my %const_map := nqp::hash(
'TYPE_CHECK_CACHE_DEFINITIVE', 0,
'TYPE_CHECK_CACHE_THEN_METHOD', 1,
'TYPE_CHECK_NEEDS_ACCEPTS', 2,

'C_TYPE_CHAR', -1,
'C_TYPE_SHORT', -2,
'C_TYPE_INT', -3,
'C_TYPE_LONG', -4,
'C_TYPE_LONGLONG', -5,
'C_TYPE_FLOAT', -1,
'C_TYPE_DOUBLE', -2,
'C_TYPE_LONGDOUBLE', -3,
);
QAST::Operations.add_core_op('const', -> $qastcomp, $op {
if nqp::existskey(%const_map, $op.name) {
Expand Down

0 comments on commit d4ed5bd

Please sign in to comment.