18.11.2014 Views

Langages de l'informatique

Langages de l'informatique

Langages de l'informatique

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Machine p. 111 - virtuelle Licence <strong>de</strong>s droits d’usage en page 2.<br />

Gestion du refCount et Appel <strong>de</strong> fonctions<br />

<strong>Langages</strong> <strong>de</strong> l’informatique<br />

Patrick Bellot<br />

Introduction<br />

Les langages<br />

Les paradigmes<br />

Modèle impératif abstrait<br />

Boehm et Jacopini<br />

Programmation impérative<br />

Programmation fonctionnelle<br />

Programmation en logique<br />

Gestion <strong>de</strong> la mémoire<br />

Quatre types <strong>de</strong> mémoire<br />

Gérer sa mémoire<br />

Comptage <strong>de</strong> référence<br />

Syntaxe et sémantique<br />

Sémantiques<br />

Analyse lexicale<br />

Analyse syntaxique<br />

int f(Data *p)<br />

{<br />

if (p != NULL)<br />

p->refCount = p->refCount + 1 ;<br />

...<br />

...<br />

if (p !=NULL) {<br />

p->refCount = p->refCount - 1 ;<br />

if (p->refCount == 0)<br />

free(p) ;<br />

}<br />

return resultat ;<br />

}<br />

Cas particulier : si p et resultat sont la même variable.<br />

Compilation<br />

Interprétation

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!