[svn:parrot] r42802 - trunk/compilers/pct/src/PAST
pmichaud at svn.parrot.org
pmichaud at svn.parrot.org
Wed Nov 25 05:30:52 UTC 2009
Author: pmichaud
Date: Wed Nov 25 05:30:51 2009
New Revision: 42802
URL: https://trac.parrot.org/parrot/changeset/42802
Log:
[pct/past]: Allow :pirop<opcode__sig> as well as :pirop<opcode sig>.
Add 'find_dynamic_lex' opcode to piropsig table.
Modified:
trunk/compilers/pct/src/PAST/Compiler.pir
Modified: trunk/compilers/pct/src/PAST/Compiler.pir
==============================================================================
--- trunk/compilers/pct/src/PAST/Compiler.pir Tue Nov 24 23:17:13 2009 (r42801)
+++ trunk/compilers/pct/src/PAST/Compiler.pir Wed Nov 25 05:30:51 2009 (r42802)
@@ -77,6 +77,7 @@
piropsig['exit'] = 'vi'
piropsig['fdiv'] = 'PP+'
piropsig['find_name'] = 'Ps'
+ piropsig['find_dynamic_lex'] = 'Ps'
piropsig['getprop'] = 'P~P'
piropsig['index'] = 'Issi'
piropsig['join'] = 'SsP'
@@ -1071,11 +1072,19 @@
pirop = node.'pirop'()
## see if pirop is of form "pirop signature"
$I0 = index pirop, ' '
- if $I0 < 0 goto pirop_1
+ if $I0 < 0 goto pirop_0
$I1 = $I0 + 1
signature = substr pirop, $I1
pirop = substr pirop, 0, $I0
goto have_signature
+ pirop_0:
+ ## see if pirop is of form "pirop__signature"
+ $I0 = index pirop, '__'
+ if $I0 < 0 goto pirop_1
+ $I1 = $I0 + 2
+ signature = substr pirop, $I1
+ pirop = substr pirop, 0, $I0
+ goto have_signature
pirop_1:
$P0 = get_global '%piropsig'
signature = $P0[pirop]
More information about the parrot-commits
mailing list