Putting in All the Stops: Execution Control for JavaScript

Scores of compilers produce JavaScript, enabling programmers to use many languages on the Web, reuse existing code, and even use Web IDEs. Unfortunately, most compilers inherit the browser's compromised execution model, so long-running programs freeze the browser tab, infinite loops crash IDEs,...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Baxter, Samuel, Nigam, Rachit, Politz, Joe Gibbs, Krishnamurthi, Shriram, Guha, Arjun
Format: Artikel
Sprache:eng
Schlagworte:
Online-Zugang:Volltext bestellen
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
container_end_page
container_issue
container_start_page
container_title
container_volume
creator Baxter, Samuel
Nigam, Rachit
Politz, Joe Gibbs
Krishnamurthi, Shriram
Guha, Arjun
description Scores of compilers produce JavaScript, enabling programmers to use many languages on the Web, reuse existing code, and even use Web IDEs. Unfortunately, most compilers inherit the browser's compromised execution model, so long-running programs freeze the browser tab, infinite loops crash IDEs, and so on. The few compilers that avoid these problems suffer poor performance and are difficult to engineer. This paper presents Stopify, a source-to-source compiler that extends JavaScript with debugging abstractions and blocking operations, and easily integrates with existing compilers. We apply Stopify to 10 programming languages and develop a Web IDE that supports stopping, single-stepping, breakpointing, and long-running computations. For nine languages, Stopify requires no or trivial compiler changes. For eight, our IDE is the first that provides these features. Two of our subject languages have compilers with similar features. Stopify's performance is competitive with these compilers and it makes them dramatically simpler. Stopify's abstractions rely on first-class continuations, which it provides by compiling JavaScript to JavaScript. We also identify sub-languages of JavaScript that compilers implicitly use, and exploit these to improve performance. Finally, Stopify needs to repeatedly interrupt and resume program execution. We use a sampling-based technique to estimate program speed that outperforms other systems.
doi_str_mv 10.48550/arxiv.1802.02974
format Article
fullrecord <record><control><sourceid>arxiv_GOX</sourceid><recordid>TN_cdi_arxiv_primary_1802_02974</recordid><sourceformat>XML</sourceformat><sourcesystem>PC</sourcesystem><sourcerecordid>1802_02974</sourcerecordid><originalsourceid>FETCH-LOGICAL-a674-e2b6b6947f711bd1bb8a3875ab93950fa1a4975768d62c33ebee200788823a7b3</originalsourceid><addsrcrecordid>eNotj81OAjEYAHvxQNAH4GRfYNf-fy03skHRkGgC983XpatN1u2mFIJvb0BPc5vMELLgrFZWa_aE-RLPNbdM1Ew4UDOy_DiVEsdPGke6GgZavgLdlTQdl3R9Cd2pxDTSJo0lp4H2KdM3POOuy3Eq9-Sux-EYHv45J_vn9b7ZVNv3l9dmta3QgKqC8MYbp6AHzv2Be29RWtDonXSa9chROdBg7MGITsrgQxCMgbVWSAQv5-TxT3uLb6ccvzH_tNeJ9jYhfwHJl0Cy</addsrcrecordid><sourcetype>Open Access Repository</sourcetype><iscdi>true</iscdi><recordtype>article</recordtype></control><display><type>article</type><title>Putting in All the Stops: Execution Control for JavaScript</title><source>arXiv.org</source><creator>Baxter, Samuel ; Nigam, Rachit ; Politz, Joe Gibbs ; Krishnamurthi, Shriram ; Guha, Arjun</creator><creatorcontrib>Baxter, Samuel ; Nigam, Rachit ; Politz, Joe Gibbs ; Krishnamurthi, Shriram ; Guha, Arjun</creatorcontrib><description>Scores of compilers produce JavaScript, enabling programmers to use many languages on the Web, reuse existing code, and even use Web IDEs. Unfortunately, most compilers inherit the browser's compromised execution model, so long-running programs freeze the browser tab, infinite loops crash IDEs, and so on. The few compilers that avoid these problems suffer poor performance and are difficult to engineer. This paper presents Stopify, a source-to-source compiler that extends JavaScript with debugging abstractions and blocking operations, and easily integrates with existing compilers. We apply Stopify to 10 programming languages and develop a Web IDE that supports stopping, single-stepping, breakpointing, and long-running computations. For nine languages, Stopify requires no or trivial compiler changes. For eight, our IDE is the first that provides these features. Two of our subject languages have compilers with similar features. Stopify's performance is competitive with these compilers and it makes them dramatically simpler. Stopify's abstractions rely on first-class continuations, which it provides by compiling JavaScript to JavaScript. We also identify sub-languages of JavaScript that compilers implicitly use, and exploit these to improve performance. Finally, Stopify needs to repeatedly interrupt and resume program execution. We use a sampling-based technique to estimate program speed that outperforms other systems.</description><identifier>DOI: 10.48550/arxiv.1802.02974</identifier><language>eng</language><subject>Computer Science - Programming Languages</subject><creationdate>2018-02</creationdate><rights>http://arxiv.org/licenses/nonexclusive-distrib/1.0</rights><oa>free_for_read</oa><woscitedreferencessubscribed>false</woscitedreferencessubscribed></display><links><openurl>$$Topenurl_article</openurl><openurlfulltext>$$Topenurlfull_article</openurlfulltext><thumbnail>$$Tsyndetics_thumb_exl</thumbnail><link.rule.ids>228,230,776,881</link.rule.ids><linktorsrc>$$Uhttps://arxiv.org/abs/1802.02974$$EView_record_in_Cornell_University$$FView_record_in_$$GCornell_University$$Hfree_for_read</linktorsrc><backlink>$$Uhttps://doi.org/10.48550/arXiv.1802.02974$$DView paper in arXiv$$Hfree_for_read</backlink></links><search><creatorcontrib>Baxter, Samuel</creatorcontrib><creatorcontrib>Nigam, Rachit</creatorcontrib><creatorcontrib>Politz, Joe Gibbs</creatorcontrib><creatorcontrib>Krishnamurthi, Shriram</creatorcontrib><creatorcontrib>Guha, Arjun</creatorcontrib><title>Putting in All the Stops: Execution Control for JavaScript</title><description>Scores of compilers produce JavaScript, enabling programmers to use many languages on the Web, reuse existing code, and even use Web IDEs. Unfortunately, most compilers inherit the browser's compromised execution model, so long-running programs freeze the browser tab, infinite loops crash IDEs, and so on. The few compilers that avoid these problems suffer poor performance and are difficult to engineer. This paper presents Stopify, a source-to-source compiler that extends JavaScript with debugging abstractions and blocking operations, and easily integrates with existing compilers. We apply Stopify to 10 programming languages and develop a Web IDE that supports stopping, single-stepping, breakpointing, and long-running computations. For nine languages, Stopify requires no or trivial compiler changes. For eight, our IDE is the first that provides these features. Two of our subject languages have compilers with similar features. Stopify's performance is competitive with these compilers and it makes them dramatically simpler. Stopify's abstractions rely on first-class continuations, which it provides by compiling JavaScript to JavaScript. We also identify sub-languages of JavaScript that compilers implicitly use, and exploit these to improve performance. Finally, Stopify needs to repeatedly interrupt and resume program execution. We use a sampling-based technique to estimate program speed that outperforms other systems.</description><subject>Computer Science - Programming Languages</subject><fulltext>true</fulltext><rsrctype>article</rsrctype><creationdate>2018</creationdate><recordtype>article</recordtype><sourceid>GOX</sourceid><recordid>eNotj81OAjEYAHvxQNAH4GRfYNf-fy03skHRkGgC983XpatN1u2mFIJvb0BPc5vMELLgrFZWa_aE-RLPNbdM1Ew4UDOy_DiVEsdPGke6GgZavgLdlTQdl3R9Cd2pxDTSJo0lp4H2KdM3POOuy3Eq9-Sux-EYHv45J_vn9b7ZVNv3l9dmta3QgKqC8MYbp6AHzv2Be29RWtDonXSa9chROdBg7MGITsrgQxCMgbVWSAQv5-TxT3uLb6ccvzH_tNeJ9jYhfwHJl0Cy</recordid><startdate>20180208</startdate><enddate>20180208</enddate><creator>Baxter, Samuel</creator><creator>Nigam, Rachit</creator><creator>Politz, Joe Gibbs</creator><creator>Krishnamurthi, Shriram</creator><creator>Guha, Arjun</creator><scope>AKY</scope><scope>GOX</scope></search><sort><creationdate>20180208</creationdate><title>Putting in All the Stops: Execution Control for JavaScript</title><author>Baxter, Samuel ; Nigam, Rachit ; Politz, Joe Gibbs ; Krishnamurthi, Shriram ; Guha, Arjun</author></sort><facets><frbrtype>5</frbrtype><frbrgroupid>cdi_FETCH-LOGICAL-a674-e2b6b6947f711bd1bb8a3875ab93950fa1a4975768d62c33ebee200788823a7b3</frbrgroupid><rsrctype>articles</rsrctype><prefilter>articles</prefilter><language>eng</language><creationdate>2018</creationdate><topic>Computer Science - Programming Languages</topic><toplevel>online_resources</toplevel><creatorcontrib>Baxter, Samuel</creatorcontrib><creatorcontrib>Nigam, Rachit</creatorcontrib><creatorcontrib>Politz, Joe Gibbs</creatorcontrib><creatorcontrib>Krishnamurthi, Shriram</creatorcontrib><creatorcontrib>Guha, Arjun</creatorcontrib><collection>arXiv Computer Science</collection><collection>arXiv.org</collection></facets><delivery><delcategory>Remote Search Resource</delcategory><fulltext>fulltext_linktorsrc</fulltext></delivery><addata><au>Baxter, Samuel</au><au>Nigam, Rachit</au><au>Politz, Joe Gibbs</au><au>Krishnamurthi, Shriram</au><au>Guha, Arjun</au><format>journal</format><genre>article</genre><ristype>JOUR</ristype><atitle>Putting in All the Stops: Execution Control for JavaScript</atitle><date>2018-02-08</date><risdate>2018</risdate><abstract>Scores of compilers produce JavaScript, enabling programmers to use many languages on the Web, reuse existing code, and even use Web IDEs. Unfortunately, most compilers inherit the browser's compromised execution model, so long-running programs freeze the browser tab, infinite loops crash IDEs, and so on. The few compilers that avoid these problems suffer poor performance and are difficult to engineer. This paper presents Stopify, a source-to-source compiler that extends JavaScript with debugging abstractions and blocking operations, and easily integrates with existing compilers. We apply Stopify to 10 programming languages and develop a Web IDE that supports stopping, single-stepping, breakpointing, and long-running computations. For nine languages, Stopify requires no or trivial compiler changes. For eight, our IDE is the first that provides these features. Two of our subject languages have compilers with similar features. Stopify's performance is competitive with these compilers and it makes them dramatically simpler. Stopify's abstractions rely on first-class continuations, which it provides by compiling JavaScript to JavaScript. We also identify sub-languages of JavaScript that compilers implicitly use, and exploit these to improve performance. Finally, Stopify needs to repeatedly interrupt and resume program execution. We use a sampling-based technique to estimate program speed that outperforms other systems.</abstract><doi>10.48550/arxiv.1802.02974</doi><oa>free_for_read</oa></addata></record>
fulltext fulltext_linktorsrc
identifier DOI: 10.48550/arxiv.1802.02974
ispartof
issn
language eng
recordid cdi_arxiv_primary_1802_02974
source arXiv.org
subjects Computer Science - Programming Languages
title Putting in All the Stops: Execution Control for JavaScript
url https://sfx.bib-bvb.de/sfx_tum?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2025-02-07T23%3A32%3A37IST&url_ver=Z39.88-2004&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&rfr_id=info:sid/primo.exlibrisgroup.com:primo3-Article-arxiv_GOX&rft_val_fmt=info:ofi/fmt:kev:mtx:journal&rft.genre=article&rft.atitle=Putting%20in%20All%20the%20Stops:%20Execution%20Control%20for%20JavaScript&rft.au=Baxter,%20Samuel&rft.date=2018-02-08&rft_id=info:doi/10.48550/arxiv.1802.02974&rft_dat=%3Carxiv_GOX%3E1802_02974%3C/arxiv_GOX%3E%3Curl%3E%3C/url%3E&disable_directlink=true&sfx.directlink=off&sfx.report_link=0&rft_id=info:oai/&rft_id=info:pmid/&rfr_iscdi=true