Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
hook up new uniprop opcodes
  • Loading branch information
TimToady committed Mar 4, 2014
1 parent a0dc24c commit fb32da5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
11 changes: 8 additions & 3 deletions docs/ops.markdown
Expand Up @@ -695,12 +695,17 @@ Translates a property name to the property category it's in.
Looks up a property name in its property category, and returns which
table within that category to use.

## getuniprop
* `getuniprop(int $codepoint, int $propcode, int $pvalcode)`
## getuniprop_int
* `getuniprop_int(int $codepoint, int $propcode, int $pvalcode)`

Uses the table found by the previous two opcodes to look up the property value
Uses the table found by the previous two opcodes to look up an integer property value
for a given codepoint.

## getuniprop_str
* `getuniprop_str(int $codepoint, int $propcode, int $pvalcode)`

Same thing, but fetches a string property value.

# Conditional Opcodes

## if
Expand Down
4 changes: 2 additions & 2 deletions src/vm/moar/QAST/QASTOperationsMAST.nqp
Expand Up @@ -1954,9 +1954,9 @@ QAST::MASTOperations.add_core_op('rindex', -> $qastcomp, $op {
# unicode properties
QAST::MASTOperations.add_core_moarop_mapping('unipropcode', 'unipropcode');
QAST::MASTOperations.add_core_moarop_mapping('unipvalcode', 'unipvalcode');
QAST::MASTOperations.add_core_moarop_mapping('getuniprop', 'getuniprop');
QAST::MASTOperations.add_core_moarop_mapping('getuniname', 'getuniname');

QAST::MASTOperations.add_core_moarop_mapping('getuniprop_int', 'getuniprop_int');
QAST::MASTOperations.add_core_moarop_mapping('getuniprop_str', 'getuniprop_str');

# serialization context opcodes
QAST::MASTOperations.add_core_moarop_mapping('sha1', 'sha1');
Expand Down

0 comments on commit fb32da5

Please sign in to comment.