Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Massive changes to replace the site API with a new Invoker based one. #199

Merged
merged 12 commits into from
Jul 13, 2017

Conversation

arthurp
Copy link
Member

@arthurp arthurp commented Jul 8, 2017

The initial change introduces a bugs and missing features in a couple of places. These will be fixed before merge into master.

  • OrcXML does not handle what used to be JavaClassProxy correctly.
  • Complete conversion to strict def/routines.
  • Change interpreter to avoid having closures as Readables. This will make it so the only readable is Future.
  • Closures are not correctly handled in Token.newObject.

This change introduced a bug related to non-strict defs. This will
be fixed before merge into master. Similarly, OrcXML is currently
broken, but will be fixed before merge.
@arthurp
Copy link
Member Author

arthurp commented Jul 8, 2017

I have posted this before I have corrected the broken things so that review can start ahead of completing the last few things. If you would prefer to wait, go ahead.

@arthurp arthurp requested a review from jthywiss July 8, 2017 03:45
arthurp added 7 commits July 10, 2017 14:07
Classes maintain lenience by lifting any captured variables to
constructor (partial constructor) parameters.

This commit simply disables the closure lenience. Code to support it
is still in the token interpreter.
Also clean up TODOs in ClassForms.
This affects the VirtualClock handling more than expected.

This introduces a probable bug in the distrib code, but that
should be removable since contexts will no longer contain
readable closures.
@jthywiss
Copy link
Member

Since you're in here, can the ResolvableCollection stuff be collapsed back into ClosureGroup?

@arthurp
Copy link
Member Author

arthurp commented Jul 11, 2017

It could be yes. However, I don't think we should. It's a extra abstraction that might be useful later and it doesn't confuse the code.

@arthurp
Copy link
Member Author

arthurp commented Jul 11, 2017

All bugs mentioned above are fixed.

The only issue at this point is that these changes introduce a probably bug in TokenReplacement:251. I suspect this problem will go away once distrib has been updated to use the assumption that all Readables are futures and closures are never lenient.

Copy link
Member

@jthywiss jthywiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the invoker stuff will be useful for dOrc.

@@ -24,7 +24,7 @@
*
* @author dkitchin
*/
public abstract class OrcException extends Exception {
public abstract class OrcException extends RuntimeException {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, no, keep them checked exceptions, please.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why? We are Scala in 99% of the time so they are unchecked anyway.

The reason I changed this is that if they are checked I have to wrap them in the truffle interpreter. I could work around this, but I didn't know of any reason to have them checked.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For (all the millions of) Java callers to Orc. :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll look into making it checked. If I cant make it checked without having to wrap and unwrap the at truffle call boundaries I will. Otherwise I will make a TODO (and maybe an issue) and we can revisit it later.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I will leave it checker here and maybe change it later if I have to.

@arthurp
Copy link
Member Author

arthurp commented Jul 12, 2017

About using Invokers in dOrc. I'd be interested to know how you think you could use them specifically. For instance if you want to be able to serialize them in some cases we should probably add "Take the serializable contract serious, dude" to the documentation so that I don't forget that's important.

Some invokers will probably be totally non-serializable (for instance, if they are invokers for JavaScript or native code functions running in Truffle, since those would include references to local truffle, graal, or even native execution state). But we can control that so it seems manageable.

@arthurp
Copy link
Member Author

arthurp commented Jul 13, 2017

There last two commits should address all the comments you have brought up.

Copy link
Member

@jthywiss jthywiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new files need their "Created by amp on July 12, 2017." header lines fixed.

After that, looks good to me.

@arthurp arthurp merged commit 308f05e into master Jul 13, 2017
@arthurp arthurp deleted the invoker-external-api branch August 3, 2017 07:02
@arthurp arthurp restored the invoker-external-api branch July 13, 2018 20:02
@arthurp arthurp deleted the invoker-external-api branch July 13, 2018 20:04
@arthurp arthurp restored the invoker-external-api branch July 13, 2018 20:04
@arthurp arthurp deleted the invoker-external-api branch July 13, 2018 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants