Skip to content

Commit d44d53d

Browse files
author
Neil Fraser
committed
Ownership change
No change in the real world, just keeping lawyers happier.
1 parent 9c31dcb commit d44d53d

7 files changed

+25
-45
lines changed

CONTRIBUTING.md

Lines changed: 0 additions & 23 deletions
This file was deleted.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ Apache License
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright 2013 Google Inc.
189+
Copyright 2013 Neil Fraser
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

acorn_interpreter.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demos/serialize.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/**
22
* @license
3-
* Copyright 2017 Google LLC
3+
* Copyright 2017 Neil Fraser
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

77
/**
88
* @fileoverview Saving and restoring the state of a JS-Intepreter.
9-
* @author [email protected] (Neil Fraser)
9+
* @author [email protected] (Neil Fraser)
1010
*/
1111
'use strict';
1212

docs.html

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
<meta charset="utf-8">
55
<title>JS-Interpreter Documentation</title>
66
<link href="demos/style.css" rel="stylesheet" type="text/css">
7+
<style>
8+
h2 {
9+
background-color: #f7df1e;
10+
padding-left: 1ex;
11+
}
12+
</style>
713
</head>
814
<body>
915
<img src="logo.png" height=200 width=200 style="float: right">
@@ -19,7 +25,7 @@ <h1>JS-Interpreter Documentation</h1>
1925

2026
<p>Get the <a href="https://github.com/NeilFraser/JS-Interpreter">source code</a>.</p>
2127

22-
<h2>Usage</h2>
28+
<h2 id="usage">Usage</h2>
2329

2430
<p>Start by including the two JavaScript source files:</p>
2531

@@ -76,7 +82,7 @@ <h2>Usage</h2>
7682
<code>run</code> will return true if it is blocked and needs to be called
7783
again at a later time.</p>
7884

79-
<h2>External API</h2>
85+
<h2 id="external_api">External API</h2>
8086

8187
<p>Similar to the <code>eval</code> function, the result of the last
8288
statement executed is available in <code>myInterpreter.value</code>:</p>
@@ -165,7 +171,7 @@ <h2>External API</h2>
165171
<p>For a working example, see the
166172
<a href="demos/async.html">async demo</a>.</p>
167173

168-
<h2>Serialization</h2>
174+
<h2 id="serialization">Serialization</h2>
169175

170176
<p>A unique feature of the JS-Interpreter is its ability to pause execution,
171177
serialize the current state, then resume the execution at that point at a
@@ -189,7 +195,7 @@ <h2>Serialization</h2>
189195
<p>Another example shows how to use serialization of every step to enable
190196
<a href="demos/backwards.html">stepping backwards</a>.</p>
191197

192-
<h2>Threading</h2>
198+
<h2 id="threading">Threading</h2>
193199

194200
<p>JavaScript is single-threaded, but the JS-Interpreter allows one to run
195201
multiple threads at the same time. Creating two or more completely
@@ -209,7 +215,7 @@ <h2>Threading</h2>
209215
<p>For a working example, see the
210216
<a href="demos/thread.html">thread demo</a>.</p>
211217

212-
<h2>Status</h2>
218+
<h2 id="status">Status</h2>
213219

214220
<p>A JS-Intepreter instance has a <code>getStatus</code> function that returns
215221
information about what the interpreter is doing. The return values are one of:</p>
@@ -232,7 +238,7 @@ <h2>Status</h2>
232238
<p>This status information might be used to determine whether to take another
233239
step immediately, or call setTimeout and step later, or stop.</p>
234240

235-
<h2>Security</h2>
241+
<h2 id="security">Security</h2>
236242

237243
<p>A common use-case of the JS-Interpreter is to sandbox potentially hostile
238244
code. The interpreter is secure by default: it does not use blacklists to
@@ -249,15 +255,15 @@ <h2>Security</h2>
249255
grows too large. For a working example, see the
250256
<a href="demos/size.html">size demo</a>.</p>
251257

252-
<h2>Regular Expressions</h2>
258+
<h2 id="regular_expressions">Regular Expressions</h2>
253259

254260
<p>Pathological regular expressions can execute in geometric time. For example
255261
<code>'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaac'.match(/^(a+)+b/)</code>
256262
will effectively crash any JavaScript runtime. JS-Interpreter has a
257263
variety of methods for <a href="demos/regexp.html">safely dealing with
258264
regular expressions</a> depending on the platform.</p>
259265

260-
<h2>Limitations</h2>
266+
<h2 id="limitations">Limitations</h2>
261267

262268
<p>The version of JavaScript implemented by the interpreter has a few
263269
differences from that which executes in a browser:</p>
@@ -283,12 +289,12 @@ <h2>Limitations</h2>
283289
200 times slower than native JavaScript.</dd>
284290
</dl>
285291

286-
<h2>Node.js</h2>
292+
<h2 id="node_js">Node.js</h2>
287293

288294
<p>JS-Intepreter can be run server-side using Node.js. For a minimal demo,
289295
just run: <code>node <a href="demos/node.js">demos/node.js</a></code></p>
290296

291-
<h2>Dependency</h2>
297+
<h2 id="dependency">Dependency</h2>
292298

293299
<p>The only dependency is <a href="https://github.com/acornjs/acorn">Acorn</a>,
294300
a beautifully written JavaScript parser by Marijn Haverbeke. A minimal
@@ -299,7 +305,7 @@ <h2>Dependency</h2>
299305
doesn't use. There's no benefit in doing so unless your project already uses
300306
Acorn for something else.</p>
301307

302-
<h2>Compatibility</h2>
308+
<h2 id="compatibility">Compatibility</h2>
303309

304310
<p>The limiting factor for browser support is the use of
305311
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create"><code>Object.create(null)</code></a>
@@ -321,8 +327,5 @@ <h2>Compatibility</h2>
321327
<p>Additionally, if safely executing regular expressions is required, then
322328
IE 11 is the minimum version of IE that supports Web Workers via Blobs.</p>
323329

324-
<h2>Disclaimer</h2>
325-
326-
<p>This project is not an official Google product.</p>
327330
</body>
328331
</html>

interpreter.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/**
22
* @license
3-
* Copyright 2013 Google LLC
3+
* Copyright 2013 Neil Fraser
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

77
/**
88
* @fileoverview Interpreting JavaScript in JavaScript.
9-
* @author [email protected] (Neil Fraser)
9+
* @author [email protected] (Neil Fraser)
1010
*/
1111
'use strict';
1212

polyfill_compile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""JS-Interpreter Polyfill Compiler
22
3-
Copyright 2024 Google LLC
3+
Copyright 2024 Neil Fraser
44
55
Licensed under the Apache License, Version 2.0 (the "License");
66
you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
1818
""" Process interpreter.tmp.js and compile the annotated polyfills.
1919
"""
2020

21-
_author__ = "[email protected] (Neil Fraser)"
21+
_author__ = "[email protected] (Neil Fraser)"
2222

2323
import json
2424
import os

0 commit comments

Comments
 (0)