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

Change code generation for method calls to use the new arg structs. #72

Merged
merged 2 commits into from
Feb 4, 2015
Merged

Conversation

kaeluka
Copy link
Contributor

@kaeluka kaeluka commented Feb 4, 2015

If a message like this:

def bar(x : int, y : string) : void
  print x*2

is called via the bang operator, the argument construction will look
like this:

___encore_Foo_bar_fut_msg _arg_4;
_arg_4.f1 = ({int64_t _literal_2 = 100; _literal_2;});
_arg_4.f2 = ({char* _literal_3 = ""; _literal_3;});
pony_sendv(({ _f_1;}), MSG_Foo__one_way_bar, 2, _arg_4);

This will require giving the argument structs less descriptive names
(f1,f2,...), but anything else would make expression translation
even harder to comprehend than it is already.

We (Kiko+Stephan) also removed some whitespace.

@parapluu parapluu locked and limited conversation to collaborators Feb 4, 2015
Stephan Brandauer added 2 commits February 4, 2015 17:18
If a message like this:

    def bar(x : int, y : string) : void
      print x*2

is called via the bang operator, the argument construction will look
like this:

    ___encore_Foo_bar_fut_msg _arg_4;
    _arg_4.f1 = ({int64_t _literal_2 = 100; _literal_2;});
    _arg_4.f2 = ({char* _literal_3 = ""; _literal_3;});
    pony_sendv(({ _f_1;}), MSG_Foo__one_way_bar, 2, _arg_4);

This will require giving the argument structs less descriptive names
(`f1`,`f2`,...), but anything else would make expression translation
even harder to comprehend than it is already.

We (Kiko+Stephan) also removed some whitespace.
The fields are now all called `f1`..`fN` like so:

    struct encore_Foo_bar_fut_msg
    {
      encore_fut_msg_t msg;
      int64_t f1;
      char* f2;
    };

This greatly simplifies calling functions (no lookup of the called
function is necessary).
@parapluu parapluu unlocked this conversation Feb 4, 2015
@TobiasWrigstad
Copy link
Contributor

Tending to this now

@TobiasWrigstad TobiasWrigstad merged commit 5639837 into parapluu:new-ponyrt Feb 4, 2015
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