-
How do you obtain (consistently and uniformly) the parameter position of a I see this code: From this code, we see that there is some correspondence between value numbers and parameters. If |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
I believe that for instance methods, value number 1 is the receiver, and then the remaining parameters get consecutive value numbers after that. For static methods, value number 1 is the first declared formal parameter and they are numbered consecutively after that. Does that match what you are seeing? |
Beta Was this translation helpful? Give feedback.
-
No, but I am looking at IR from Python CAst. There, at least for functions (not methods), value number 1 is actually the function itself. I believe that this is how @juliandolby is dealing with the import aliasing in Python. |
Beta Was this translation helpful? Give feedback.
-
Is this scheme documented anywhere? I had a quick look in the wiki but couldn't find anything. |
Beta Was this translation helpful? Give feedback.
I believe that for instance methods, value number 1 is the receiver, and then the remaining parameters get consecutive value numbers after that. For static methods, value number 1 is the first declared formal parameter and they are numbered consecutively after that. Does that match what you are seeing?