<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#ffffff">
Salut,<br>
<br>
Je pense avoir trouvé un bug dans l'algo de lookup de parents dans le
cas d'héritage dynamique<br>
<br>
Voici ce que j'ai mis en commentaire dans un fichier:<br>
<tt><br>
  // Lisaac BUG: with dynamic inheritance. Say we have a prototype SELF<br>
  // inheriting from ROOT. Now, we dynamically change the parent to use
P that<br>
  // is a child of ROOT.<br>
  //<br>
  // When code in P tries to call a slot specific to P (the slot is not
defined<br>
  // in ROOT). Instead of looking at the slot in P, it tries to look at
the slot<br>
  // in SELF, then in ROOT.<br>
  //<br>
  // If the slot is found in SELF, then it is called. That is wrong, it
should<br>
  // call the slot in P instead. The fact is that SELF never redefined
the slot<br>
  // that P tries to call, and it might well do something completely
different <br>
  // than the slot in P does.<br>
  //<br>
  // And if the slot is not found at all, the compiler throws an error.<br>
  //<br>
  // In this section, I define slots that are found in DTA_RD_ARGS and
mark them<br>
  // as deferred. This is to avoid compiler errors.</tt><br>
<br>
En pratique, c'est quoi le problème ?<br>
<br>
J'ai un type, DTA_DISPATCH_ARGS qui utilise l'héritage dynamique.<br>
En pratique, DTA_DISPATCH_ARGS hérite de DTA_RD est sert
d'intermédiaire entre un utilisateur et une DTA_RD quelconque.<br>
<br>
Lorsque je crée un DTA_DISPATCH_ARGS, je lui donne le parent DTA_RD à
utiliser et quelques paramètres qui vont modifier le comportement du
DTA_RD.<br>
<br>
Le problème survient lorsque je veux utiliser un DTA_RD_ARGS comme
parent de DTA_DISPATCH_ARGS. Le type parent (statique) reste DTA_RD,
mais l'implémentation utilise un objet DTA_RD_ARGS.<br>
<br>
Et maintenant, lorsque DTA_RD_ARGS fait un appel interne sur un de ses
slots (par exemple, le slot copy_argument), voilà ce qui se passe:<br>
<ul>
  <li>Le type SELF est DTA_DISPATCH_ARGS</li>
  <li>Donc le compilateur va chercher un slot qui s'appellerait
copy_argument dans DTA_DISPATCH_ARGS ou un de ses types parents (lookup
statique)</li>
  <li>Si le slot copy_argument n'existe que dans DTA_RD_ARGS,
l'algorithme échour en disant qu'il n'arrive pas à trouver le slot.</li>
</ul>
Au lieu de cela, ce que le compilateur devrait faire, c'est aller
chercher le slot dans DTA_RD_ARGS.<br>
<br>
<br>
vous voyez le problème ?<br>
<br>
<br>
Mildred<br>
<pre class="moz-signature" cols="72">-- 
Mildred Ki'Lya
╭───────── mildred593@online.fr ──────────
│ Jabber, GoogleTalk: <a class="moz-txt-link-rfc2396E" href="mailto:mildred@jabber.fr">&lt;mildred@jabber.fr&gt;</a>
│ Website: <a class="moz-txt-link-rfc2396E" href="http://ki.lya.online.fr">&lt;http://ki.lya.online.fr&gt;</a>           GPG ID: 9A7D 2E2B
│ Fingerprint: 197C A7E6 645B 4299 6D37 684B 6F9D A8D6 9A7D 2E2B
</pre>
</body>
</html>