Convert call and construct APIs to take VarScope scopes#2361
Convert call and construct APIs to take VarScope scopes#2361aardvark179 wants to merge 2 commits intomozilla:masterfrom
VarScope scopes#2361Conversation
af9858f to
195b96a
Compare
195b96a to
b5d3d3b
Compare
|
I think the recursive |
|
This looks good and it's ready to go! This is the first PR in this series that will start to break existing code -- I am ready to move forward with it but I wonder what the implications will be on downstream projects and whether we start to get more input from the community once we do this. |
|
It looks like we missed most of the functions defined on LambdaConstructor and LambdaFunction -- that's causing some code I wrote to fail to compile, and I'm not sure how to reconcile that. Do you want to address that in a different PR, and is there a way to find other places where scope should now be a VarScope? |
I think they all get fixed up in the fourth round of migration, but it would also be great to get one of your examples which is currently failing, because it suggests we've got a gap in our testing that we should try and close. |
|
Sure -- this is a project that I noodle on from time to time as a way to exercise Rhino, but it never really got off the ground. But it's a good example of a codebase and since I wrote it I use LambdaFunction and LambdaConstructor all over the place. I can't currently build this branch I don't think because I am stuck in between using Scriptable and VarScope. https://github.com/gbrail/what-js/tree/rhino-update For example, here's some build output:
|
This is the first two commits of #2330, and will be followed by PRs that convert the use sites to the new type. We can stage this because the when converting method references to functional interfaces the Java compiler allows for widening of types, in this case
VarScopetoScriptable.