Difference between revisions of "Plugins"

(New page: Here are some basic ideas on how to build plugins for Eiffel systems. Given the following code: <e>a: STRING create a.make (4) a.something_polymorphic (x, y) </e> This code is by defaul...)
 
Line 21: Line 21:
 
(R234_234 (a))(a, x, y);
 
(R234_234 (a))(a, x, y);
 
</c>
 
</c>
 +
 +
So if we want the code of A, the plugin, to be executed properly in the context of B, we need to patch the code of A. Currently this means replacing the ID for the creation (i.e. 25), the address for the static call (i.e. F1_24) and the table content to reflect the new polymorphic call (i.e. R1_25).

Revision as of 02:14, 28 June 2011

Here are some basic ideas on how to build plugins for Eiffel systems.

Given the following code:

a: STRING
create a.make (4)
a.something_polymorphic (x, y)

This code is by default generated as follow in two different systems.

  • System A:
a = RTLN (25);
F1_24 (a, 4);
(R1_25 (a))(a, x, y);
  • System B:
a = RTLN (23455);
F234_394 (a, 4);
(R234_234 (a))(a, x, y);

So if we want the code of A, the plugin, to be executed properly in the context of B, we need to patch the code of A. Currently this means replacing the ID for the creation (i.e. 25), the address for the static call (i.e. F1_24) and the table content to reflect the new polymorphic call (i.e. R1_25).