comparison lib/js/urweb.js @ 847:0f7e2cca6d9b

<dyn> inside <table>; fix Specialize bug with datatype decls generating other mutually-recursive datatype decls
author Adam Chlipala <adamc@hcoop.net>
date Sat, 13 Jun 2009 14:29:36 -0400
parents 44c2c089ca15
children bcad392e288e
comparison
equal deleted inserted replaced
846:0d30e6338c65 847:0f7e2cca6d9b
276 x.closures = null; 276 x.closures = null;
277 x.recreate = function(v) { 277 x.recreate = function(v) {
278 for (var ls = x.closures; ls; ls = ls.next) 278 for (var ls = x.closures; ls; ls = ls.next)
279 freeClosure(ls.data); 279 freeClosure(ls.data);
280 280
281 var spans = x.getElementsByTagName("span"); 281 var doKind = function(kind) {
282 for (var i = 0; i < spans.length; ++i) { 282 var arr = x.getElementsByTagName(kind);
283 var span = spans[i]; 283 for (var i = 0; i < arr.length; ++i) {
284 span.dead = true; 284 var span = arr[i];
285 for (var ls = span.sources; ls; ls = ls.next) 285 span.dead = true;
286 ls.data.dyns = remove(span, ls.data.dyns); 286 for (var ls = span.sources; ls; ls = ls.next)
287 for (var ls = span.closures; ls; ls = ls.next) 287 ls.data.dyns = remove(span, ls.data.dyns);
288 freeClosure(ls.data); 288 for (var ls = span.closures; ls; ls = ls.next)
289 } 289 freeClosure(ls.data);
290 }
291 };
292
293 doKind("span");
294 doKind("tbody");
290 295
291 var cls = {v : null}; 296 var cls = {v : null};
292 x.innerHTML = flatten(cls, v); 297 x.innerHTML = flatten(cls, v);
293 x.closures = cls.v; 298 x.closures = cls.v;
294 runScripts(x); 299 runScripts(x);