Skip to content

Conversation

chard4
Copy link

@chard4 chard4 commented May 24, 2022

Discussion of potential conflicts or the lack thereof between Inheritance and other features.

Update to design doc regarding next steps for our team.

chard4 and others added 30 commits May 6, 2022 10:40
Handle chain inheritance
@KamranAlipour
Copy link
Contributor

Please take a look at your current conflicts and try to resolve them. One specific case that you might want to look into is how to merge call_indirect in lower.ts. We should have call and call_indirect and seems like its a runtime decision to choose which, and you probably need to develop a little bit to navigate between the two.

@chard4
Copy link
Author

chard4 commented May 26, 2022

Please take a look at your current conflicts and try to resolve them. One specific case that you might want to look into is how to merge call_indirect in lower.ts. We should have call and call_indirect and seems like its a runtime decision to choose which, and you probably need to develop a little bit to navigate between the two.

I don't understand what you mean by it being a runtime decision to pick between call and call_indirect. Shouldn't all method-calls be lowered to call_indirect?

EDIT: or do you mean some method calls are directed to call because of sets?

@KamranAlipour
Copy link
Contributor

I see, so you are directing all method-calls to call_indirect? even if an object end up calling a method from its own class type, you still tag it as call-indirect ?

@chard4
Copy link
Author

chard4 commented May 26, 2022

Yeah, the vtable contains every method of every class, so all method calls index into it. Only function calls go to call.

@chard4
Copy link
Author

chard4 commented May 26, 2022

Consider this scenario

class Parent(object):
    def foo(self):
        pass

class Child(Parent):
    x : int = 0

We currently create a function definition for $Child$foo and put it in the vtable as well.
Maybe we shouldn't do that?
And instead, the vtable section for Child should reference $Parent$foo instead of $Child$foo?

@chard4
Copy link
Author

chard4 commented May 27, 2022

Merge conflicts fixed.

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.

4 participants