Introduction
Since IMCC has become Parrot's parser, it has changed a lot and acquired all sorts of new syntax in order to support Parrot's new features. On the TODO list for Parrot is defining PDD 19 - PIR. Now is a good time to review the current PIR language as implemented in IMCC. Some syntax constructs are ambiguous and inconsistent. This page is intended to list these inconsistencies and help in the process of deciding what syntax should stay and which should go.
Proposals
In order to keep this page somewhat structured, each proposal consist of the following sections: Introduction, Issues, Proposals for cleanup, and finally hopefully, a Decision section.
Issue: Method names
Method invocation syntax in PIR can look like the following:
.local pmc foo
# get a reference to some method and store it in 'foo'.
# 1. the symbolic temporary variable named 'foo' holds
a reference to a method of the PMC in $P0
$P0.foo()
# 2. call the method 'foo' on the PMC in $P0
$P0.'foo'()
Moreover, PMC methods ("PCCMETHOD") are methods of a PMC written in C. These are called PCCMETHODs, as they are methods using the Parrot Calling Conventions. These use bareword method names, like so:
$P0.foo() # 3. 'foo' is a PCCMETHOD of the PMC stored in $P0.
Issues
Look at code examples 1 and 3. In the first case, 'foo' is a temporary symbolic variable. In example 3, 'foo' indicates a PCCMETHOD. The syntax is the same, but the semantics are different. This should be disambiguated.
Proposals
# Change method invocation syntax of PCCMETHODs so the method names need to be quoted.
Decision
TBD
Rationale
TBD