Ticket #651 (closed bug: invalid)

Opened 6 years ago

Last modified 6 years ago

[PMC] cannot share functions between PMC

Reported by: fperrad Owned by: bacek
Priority: normal Milestone:
Component: none Version: 1.1.0
Severity: medium Keywords:
Cc: bacek Language:
Patch status: new Platform:

Description

Since r38536 (tt631_part2 merge), we cannot share functions (VTABLE & MULTI) between PMC in the same group.

For example, LuaString PMC calls code from LuaNumber PMC (VTABLE & MULTI).

The linking is broken, because all functions are now 'static'.

Attachments

pmc-share-code.patch Download (490 bytes) - added by fperrad 6 years ago.

Change History

Changed 6 years ago by fperrad

in reply to: ↑ description   Changed 6 years ago by bacek

  • owner set to bacek

Replying to fperrad:

Since r38536 (tt631_part2 merge), we cannot share functions (VTABLE & MULTI) between PMC in the same group.

There is two sides of this problem:

1. No one should call vtable function directly. Described in #528 and #631. Unfortunately Pmc2c/MethodEmitter.pm still emits direct calls sometimes. E.g. for OtherClass.pmc.method. My personal option - remove handling of this mapping at all. But for now I'll try to fix generated code.

2. Second realted problem - lua uses direct calls to MULTI functions. I can help with replacing such calls with "Parrot_mmd_multi_dispatch".

-- Bacek

  Changed 6 years ago by fperrad

  • status changed from new to closed
  • resolution set to invalid

successful refactor of Lua PMC with these new constraints.

Note: See TracTickets for help on using tickets.