DeHydra: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 8: | Line 8: | ||
* Write scripts using that core to accomplish custom analyses without recompilation. | * Write scripts using that core to accomplish custom analyses without recompilation. | ||
* Work on these scripts to make them progressively as sound and as complete as possible. | * Work on these scripts to make them progressively as sound and as complete as possible. | ||
== Future Direction == | |||
'''Strong reference domination''' | |||
< roc> e.g. if I'm holding an nsCOMPtr reference to A, and A holds an nsCOMPtr reference to B, and I call A->GetB() and put the result in another nsCOMPtr H, and you can prove that there's no change to these references before H goes away, the refcount held by H is not needed | |||
Example: | |||
<pre> | |||
if (IsChromeURI(aLoadData->mURI)) { | |||
1549 nsCOMPtr<nsIXULPrototypeCache> cache(do_GetService("@mozilla.org/xul/xul-prototype-cache;1")); | |||
1550 if (cache) { | |||
1551 PRBool enabled; | |||
1552 cache->GetEnabled(&enabled); | |||
1553 if (enabled) { | |||
1554 nsCOMPtr<nsICSSStyleSheet> sheet; | |||
1555 cache->GetStyleSheet(aLoadData->mURI, getter_AddRefs(sheet)); | |||
1556 if (!sheet) { | |||
1557 LOG((" Putting sheet in XUL prototype cache")); | |||
1558 cache->PutStyleSheet(aLoadData->mSheet); | |||
1559 } | |||
1560 } | |||
1561 } | |||
1562 } | |||
</pre> | |||
in [http://lxr.mozilla.org/seamonkey/source/layout/style/nsCSSLoader.cpp#1554] | |||
'''Ownership Analysis''' | |||
Show that ref count on some objects is always 1. | |||
Also [http://suif.stanford.edu/~dlheine/ David Heine]'s thesis | |||
Revision as of 00:23, 9 March 2007
DeHydra is a tool inspired by UNO.
DeHydra integrates a low level C++ core and a JavaScript engine for user scripts. More info.
C++ core deals with parsing, name resolution, scoping, control flow graphs.
A user can utilize the JS engine to:
- Write scripts using that core to accomplish custom analyses without recompilation.
- Work on these scripts to make them progressively as sound and as complete as possible.
Future Direction
Strong reference domination
< roc> e.g. if I'm holding an nsCOMPtr reference to A, and A holds an nsCOMPtr reference to B, and I call A->GetB() and put the result in another nsCOMPtr H, and you can prove that there's no change to these references before H goes away, the refcount held by H is not needed
Example:
if (IsChromeURI(aLoadData->mURI)) {
1549 nsCOMPtr<nsIXULPrototypeCache> cache(do_GetService("@mozilla.org/xul/xul-prototype-cache;1"));
1550 if (cache) {
1551 PRBool enabled;
1552 cache->GetEnabled(&enabled);
1553 if (enabled) {
1554 nsCOMPtr<nsICSSStyleSheet> sheet;
1555 cache->GetStyleSheet(aLoadData->mURI, getter_AddRefs(sheet));
1556 if (!sheet) {
1557 LOG((" Putting sheet in XUL prototype cache"));
1558 cache->PutStyleSheet(aLoadData->mSheet);
1559 }
1560 }
1561 }
1562 }
in [1]
Ownership Analysis
Show that ref count on some objects is always 1.
Also David Heine's thesis