You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
implement these specifications, allowing developers to write code that behaves similarly across different environments.
60
-
</p>
61
-
<p>
62
-
SpiderMonkey, the engine developed by Mozilla, powers JavaScript™ execution in Firefox and supports the development of new language features.
63
-
This tutorial focuses on working within SpiderMonkey to implement and test a new JavaScript™ proposal, providing insight into both the ECMAScript®
64
-
standardization process and the inner workings of a JavaScript™ engine.
65
-
</p>
46
+
<p>JavaScript™ is standardized by ECMAScript® and specified in the <ahref="https://ecma-international.org/publications-and-standards/standards/ecma-262/" target="_blank">ECMA-262 language specification</a>, which is maintained by Ecma International's <ahref="https://tc39.es/" target="_blank">TC39 committee</a>. ECMAScript® defines the core features of the language, providing a standard that ensures consistency across different JavaScript™ engines. Major engines like <ahref="https://v8.dev/" target="_blank">V8</a> (used in Chrome and Node.js), <ahref="https://developer.apple.com/documentation/javascriptcore" target="_blank">JavaScriptCore</a> (Safari), and <ahref="https://spidermonkey.dev/" target="_blank">SpiderMonkey</a> (Firefox) implement these specifications, allowing developers to write code that behaves similarly across different environments.</p>
47
+
<p><ahref="https://spidermonkey.dev/">SpiderMonkey</a>, the engine developed by Mozilla, powers JavaScript™ execution in <ahref="https://www.mozilla.org/en-US/firefox/">Firefox</a> and supports development of new language features. This tutorial focuses on working within SpiderMonkey to implement and test an ECMAScript® proposal, providing insight into both the ECMAScript® standardization process and the inner workings of a JavaScript™ browser engine.</p>
48
+
66
49
</section>
67
50
68
51
<!-- Introduction Section (non-collapsible) -->
69
52
<sectionid="introduction">
70
53
<h2>Introduction</h2>
71
-
<p>Welcome to this detailed tutorial on how to implement and understand the Map.prototype.upsert proposal. This guide is tailored to help both beginners and advanced developers learn how to contribute to JavaScript™ language development by implementing a new feature in SpiderMonkey, Mozilla's JavaScript™ engine. We’ll cover all the necessary steps, from downloading and setting up the development environment to writing the upsert method and testing it with the official test suite, Test262.</p>
72
-
<p>We'll start with an introduction to <code>Map.prototype.upsert</code> proposal, highlighting its benefits for developers. From there, you'll be guided through setting up the development environment using Mozilla's SpiderMonkey JavaScript™ engine. You'll then implement the <code>upsert</code> method using both <i>self-hosted</i> JavaScript™ and (a little bit of) C++, ensuring alignment with the ECMAScript® specification.</p>
73
-
<p>By the end of this tutorial, you'll have implemented a fully functional <code>upsert</code> method and gained valuable insight into the process of designing, testing, and standardizing JavaScript™ features.</p>
54
+
<p>Welcome to this detailed tutorial on how to implement and understand the <ahref="https://github.com/tc39/proposal-upsert" target="_blank"><code>Map.prototype.upsert</code></a> proposal. This tutorial is tailored to help both beginners and advanced developers learn how to contribute to JavaScript™ language development by implementing a new feature in SpiderMonkey - Mozilla's JavaScript™ engine. We will cover all the necessary steps, from downloading and setting up the development environment to specifying and implementing the <code>upsert</code> method and testing it with the official test suite, <ahref="https://github.com/tc39/test262" target="_blank">Test262</a>.</p>
55
+
<p>We'll start with an introduction to the <code>Map.prototype.upsert</code> proposal, highlighting its benefits for developers. From there, you'll be guided through setting up the development environment using the SpiderMonkey engine. You'll then implement the <code>upsert</code> method using both <ahref="https://udn.realityripple.com/docs/Mozilla/Projects/SpiderMonkey/Internals/self-hosting"><em>self-hosted</em></a> JavaScript™ and (a little bit of) C++, ensuring alignment with the ECMAScript® specification. </p>
56
+
<p>The main focus will initially be on developing a functional solution. Once basic functionality is working, optimization techniques will be applied to ensure your code is efficient and performant. You'll also gain insight into contributing to the ECMAScript® standard, aligning your code with the best practises in the JavaScript™ evolution. Finally, you'll explore testing with <ahref="https://github.com/tc39/test262">Test262</a>, the official ECMAScript® test suite, learning how to write custom tests to validate your implementation.</p>
57
+
<p>By the end of this tutorial, you'll have implemented a fully functional <code>upsert</code> method and gained an understanding into the process of designing, testing and standardizing JavaScript™ features.</p>
58
+
74
59
</section>
75
60
61
+
<sectionid="authors">
62
+
<h3>Authors</h3>
63
+
<p>This tutorial has been written and edited by: <strong>Lauritz Thoresen Angeltveit</strong>, <strong>Jonas Haukenes</strong>, <strong>Vetle Larsen</strong>, <strong>Sune Eriksson Lianes</strong>, <strong>Mathias Hop Ness</strong>, and <strong>Mikhail Barash</strong>, and is a result of a project conducted at the University of Bergen (Norway) in collaboration with <strong>Daniel Minor</strong> (Mozilla) during August - November 2024.</p>
<pre><code>L. Angeltveit, J. Haukenes, V. Larsen, S. Lianes, M. Ness, M. Barash. Implementing a JavaScript API proposal `Map.prototype.upsert` (a tutorial). 2024.
68
+
</code></pre>
69
+
</section>
70
+
71
+
76
72
<!-- What's Covered Section (non-collapsible) -->
77
73
<sectionid="whats-covered">
78
-
<h2>What’s Covered in This Tutorial?</h2>
74
+
<h2>What's Covered in This Tutorial?</h2>
79
75
<ul>
80
-
<li><strong><code>Map.prototype.upsert</code> Proposal:</strong> Learn what this proposal is, how it works, and why it’s beneficial for JavaScript™ developers.</li>
81
-
<li><strong>Up the Development Environment:</strong> How to download and build Mozilla Unified, the repository that contains SpiderMonkey.</li>
82
-
<li><strong>Implementing the Proposal:</strong>Implementing the upsert method in self-hosted JavaScript™ and C++.</li>
83
-
<li><strong>Debugging and Testing:</strong> How to test your implementation using Test262and run custom scripts.</li>
84
-
<li><strong>Optimizing Your Code:</strong> Learn about performance considerations and optimizations.</li>
85
-
<li><strong>Contributing to the ECMAScript® Standard:</strong> Understand how to write specification-compliant code and contribute to ECMAScript®.</li>
86
-
</ul>
76
+
<li><strong>The <code>Map.prototype.upsert</code> Proposal:</strong> Learn what <ahref="https://github.com/tc39/proposal-upsert">this proposal</a> is, how it works, and why it’s beneficial for JavaScript™ developers.</li>
77
+
<li><strong>Setting up the development environment:</strong> How to download and build <ahref="https://hg.mozilla.org/mozilla-unified/"><em>Mozilla Unified</em></a>, the repository that contains SpiderMonkey.</li>
78
+
<li><strong>Implementing the proposal:</strong>We will implement the <code>upsert</code> method both in <ahref="https://udn.realityripple.com/docs/Mozilla/Projects/SpiderMonkey/Internals/self-hosting">self-hosted</a> JavaScript™ and C++.</li>
79
+
<li><strong>Debugging and testing:</strong> How to test your implementation using <ahref="https://github.com/tc39/test262">Test262</a>, the official test suite for ECMAScript®, and how to run custom scripts.</li>
80
+
<li><strong>Optimizing the code:</strong> Learn about performance considerations and optimizations.</li>
81
+
<li><strong>Contributing to the ECMAScript® Specification:</strong> Understand how to write <ahref="https://tc39.es/proposal-upsert/">specification</a>-compliant code and contribute to the broader <ahref="https://262.ecma-international.org/">ECMAScript® standard</a>.</li>
0 commit comments