[llvm-commits] CVS: llvm-www/pubs/pubs.js index.html

Misha Brukman brukman at cs.uiuc.edu
Wed Dec 24 15:09:23 PST 2008



Changes in directory llvm-www/pubs:

pubs.js added (r1.1)
index.html updated: 1.87 -> 1.88
---
Log message:

* Comply with HTML 4.01 Strict
* Added pubs.js to store the publications in a quasi-BibTeX-like manner
* Converted the 2 oldest papers to the new Javascript format

Tested on various major platforms/browsers via http://browsershots.org .


---
Diffs of the changes:  (+74 -13)

 index.html |   19 +++++------------
 pubs.js    |   68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 74 insertions(+), 13 deletions(-)


Index: llvm-www/pubs/pubs.js
diff -c /dev/null llvm-www/pubs/pubs.js:1.1
*** /dev/null	Wed Dec 24 17:08:49 2008
--- llvm-www/pubs/pubs.js	Wed Dec 24 17:08:39 2008
***************
*** 0 ****
--- 1,68 ----
+ // The array should be sorted reverse-chronologically, and will be displayed on
+ // the page in the order listed.
+ var PUBS = [
+   {url: '2002-08-08-CASES02-ControlC.html',
+    title: 'Ensuring Code Safety Without Runtime Checks for Real-Time ' +
+           'Control Systems',
+    author: 'Sumant Kowshik, Dinakar Dhurjati, and Vikram Adve',
+    published: "Proc. Int'l Conf. on Compilers, Architecture and Synthesis " +
+               "for Embedded Systems (CASES02)",
+    location: 'Grenoble, France',
+    date: 'Oct. 2002'},
+ 
+   {url: '2002-06-AutomaticPoolAllocation.html',
+    title: 'Automatic Pool Allocation for Disjoint Data Structures',
+    author: 'Chris Lattner & Vikram Adve',
+    published: 'ACM SIGPLAN Workshop on Memory System Performance (MSP)',
+    location: 'Berlin, Germany',
+    date: 'June 2002'}
+ ];
+ 
+ /**
+  * HTML-escapes entities for display in a web page.
+  * 
+  * @param {string} str The input to be escaped.
+  * @return {string} HTML-escaped version of str.
+  */
+ function htmlEscape(str) {
+   return str.replace(/&/g, '&').replace(/</g, '<')
+       .replace(/>/g, '>');
+ }
+ 
+ /**
+  * Tests to see if the given object is defined or not (and not null).
+  *
+  * @param {Object?}
+  * @return {bool} Whether or not the object is defined and not null.
+  */
+ function isDef(obj) {
+   return typeof obj != 'undefined' && obj != null;
+ }
+ 
+ /**
+  * Displays all publications by attaching them to the element with the passed-in
+  * id.
+  *
+  * @param {string} id ID of the OL/UL element that will serve as the parent of
+  *     the publications, each of which will be a list item (LI).
+  */
+ function displayAllPubs(id) {
+   var list = document.getElementById(id);
+   for (var i = 0; i < PUBS.length; ++i) {
+     var pub = PUBS[i];
+     var item = document.createElement('li');
+     item.innerHTML += '"<a href="' + pub.url + '">' + htmlEscape(pub.title) +
+                       '</a>"<br>';
+     item.innerHTML += htmlEscape(pub.author) + '<br>';
+     item.innerHTML += '<i>' + htmlEscape(pub.published) + '</i>';
+     if (isDef(pub.location)) {
+       item.innerHTML += ', ' + htmlEscape(pub.location);
+     }
+     if (isDef(pub.date)) {
+       item.innerHTML += ', ' + htmlEscape(pub.date);
+     }
+     item.innerHTML += '.';
+     list.appendChild(item);
+   }
+ }
+ 


Index: llvm-www/pubs/index.html
diff -u llvm-www/pubs/index.html:1.87 llvm-www/pubs/index.html:1.88
--- llvm-www/pubs/index.html:1.87	Thu Dec 18 12:01:05 2008
+++ llvm-www/pubs/index.html	Wed Dec 24 17:08:39 2008
@@ -1,7 +1,7 @@
 <!--#include virtual="../header.incl" -->
 <div class="www_sectiontitle">LLVM Related Publications</div>
 
-<ol>
+<ol id='pubs_list'>
 <li>"<a href="2009-03-ASPLOS-Recovery.html">Recovery Domains: An Organizing 
 Principle for Recoverable Operating Systems</a>"<br>
 Andrew Lenharth, Samuel T. King, Vikram Adve<br>
@@ -256,7 +256,7 @@
 <li>"<a href="2005-05-21-PLDI-PoolAlloc.html">Automatic Pool Allocation: 
 Improving Performance by Controlling Data Structure Layout in the Heap</a>"<br>
 Chris Lattner and Vikram Adve<br>
-  <i>Proc. of the 2005 ACM SIGPLAN Conference on Programming Language Design and Implementation</a> (PLDI'05)</i>, Chicago, Illinois,
+  <i>Proc. of the 2005 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI'05)</i>, Chicago, Illinois,
 June, 2005.<br>
 <b>Received PLDI 2005 Best Paper Award.</b></li>
 
@@ -338,17 +338,10 @@
 Computer Science Dept., University of Illinois at Urbana-Champaign, 
 Dec. 2002</li>
 
-<li>"<a href="2002-08-08-CASES02-ControlC.html">Ensuring Code Safety Without
-Runtime Checks for Real-Time Control Systems</a>"<br> Sumant Kowshik, Dinakar
-Dhurjati, and Vikram Adve<br> <i>Proc. Int'l Conf.
-on Compilers, Architecture and Synthesis for Embedded Systems (CASES02)</i>,
-Grenoble, France, Oct. 2002. </li>
-
-<li>"<a href="2002-06-AutomaticPoolAllocation.html">Automatic Pool Allocation
-for Disjoint Data Structures</a>,"<br> Chris Lattner & Vikram Adve<br>
-<i>ACM SIGPLAN Workshop on Memory System Performance (MSP)</i>, Berlin, Germany, June 2002.<br>
-</li>
-
 </ol>
 
+<script src="pubs.js" type="text/javascript"></script>
+<script type="text/javascript">displayAllPubs('pubs_list');</script>
+<noscript><p>Please enable Javascript to view this page properly.</p></noscript>
+
 <!--#include virtual="../footer.incl" -->






More information about the llvm-commits mailing list