Skip to content

Commit 8dfe076

Browse files
committed
deploy: 66dedb3
1 parent cb38ee1 commit 8dfe076

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+117
-116
lines changed

404.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<title data-rh="true">Page Not Found | Boa JS</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:image" content="https://boajs.dev/img/new_logo_yellow.svg"><meta data-rh="true" name="twitter:image" content="https://boajs.dev/img/new_logo_yellow.svg"><meta data-rh="true" property="og:url" content="https://boajs.dev/404.html"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docusaurus_tag" content="default"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docsearch:docusaurus_tag" content="default"><meta data-rh="true" property="og:title" content="Page Not Found | Boa JS"><link data-rh="true" rel="icon" href="/img/new_logo_yellow.svg"><link data-rh="true" rel="canonical" href="https://boajs.dev/404.html"><link data-rh="true" rel="alternate" href="https://boajs.dev/404.html" hreflang="en"><link data-rh="true" rel="alternate" href="https://boajs.dev/404.html" hreflang="x-default"><link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="Boa JS RSS Feed">
77
<link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="Boa JS Atom Feed">
88
<link rel="alternate" type="application/json" href="/blog/feed.json" title="Boa JS JSON Feed"><link rel="stylesheet" href="/assets/css/styles.062cb03f.css">
9-
<script src="/assets/js/runtime~main.3a47cf3b.js" defer="defer"></script>
9+
<script src="/assets/js/runtime~main.d1c62c34.js" defer="defer"></script>
1010
<script src="/assets/js/main.8cd2cc52.js" defer="defer"></script>
1111
</head>
1212
<body class="navigation-with-keyboard">

about.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<title data-rh="true">About Boa | Boa JS</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:image" content="https://boajs.dev/img/new_logo_yellow.svg"><meta data-rh="true" name="twitter:image" content="https://boajs.dev/img/new_logo_yellow.svg"><meta data-rh="true" property="og:url" content="https://boajs.dev/about"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docusaurus_tag" content="default"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docsearch:docusaurus_tag" content="default"><meta data-rh="true" property="og:title" content="About Boa | Boa JS"><meta data-rh="true" name="description" content="Information on the background of Boa."><meta data-rh="true" property="og:description" content="Information on the background of Boa."><link data-rh="true" rel="icon" href="/img/new_logo_yellow.svg"><link data-rh="true" rel="canonical" href="https://boajs.dev/about"><link data-rh="true" rel="alternate" href="https://boajs.dev/about" hreflang="en"><link data-rh="true" rel="alternate" href="https://boajs.dev/about" hreflang="x-default"><link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="Boa JS RSS Feed">
77
<link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="Boa JS Atom Feed">
88
<link rel="alternate" type="application/json" href="/blog/feed.json" title="Boa JS JSON Feed"><link rel="stylesheet" href="/assets/css/styles.062cb03f.css">
9-
<script src="/assets/js/runtime~main.3a47cf3b.js" defer="defer"></script>
9+
<script src="/assets/js/runtime~main.d1c62c34.js" defer="defer"></script>
1010
<script src="/assets/js/main.8cd2cc52.js" defer="defer"></script>
1111
</head>
1212
<body class="navigation-with-keyboard">

assets/js/0fed9329.d6180f57.js renamed to assets/js/0fed9329.9e933824.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/ec7a319c.d327323e.js renamed to assets/js/ec7a319c.dac47ae0.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ function _createMdxContent(props) {
113113
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre, {
114114
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code, {
115115
className: "language-js",
116-
children: "const a = 1;\nconsole.log(a); // 1\n\n{ // <- start of a block scope\n const a = 2;\n console.log(a); // 2\n} // <- end of a block scope\n"
116+
children: "const a = 1;\nconsole.log(a); // 1\n\n{\n // <- start of a block scope\n const a = 2;\n console.log(a); // 2\n} // <- end of a block scope\n"
117117
})
118118
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p, {
119119
children: ["We declare and initialize two variables with the identifier ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code, {
@@ -130,7 +130,7 @@ function _createMdxContent(props) {
130130
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre, {
131131
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code, {
132132
className: "language-js",
133-
children: "const a = 1;\n\n{\n const b = 2;\n console.log(a); // 1\n console.log(b); // 2\n}\n"
133+
children: "const a = 1;\n\n{\n const b = 2;\n console.log(a); // 1\n console.log(b); // 2\n}\n"
134134
})
135135
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p, {
136136
children: ["In this example, our two variables have different identifiers.\nNotice that when we access the variable ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code, {
@@ -143,7 +143,7 @@ function _createMdxContent(props) {
143143
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre, {
144144
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code, {
145145
className: "language-js",
146-
children: "const a = 1;\nconsole.log(a); // 1\n\nfunction f() { // <- start of a function scope\n var a = 2;\n console.log(a); // 2\n\n { // <- start of a block scope\n let a = 3;\n console.log(a); // 3\n } // <- end of a block scope\n\n console.log(a); // 2\n} // <- end of a function scope\n\nf();\n\nconsole.log(a); // 1\n"
146+
children: "const a = 1;\nconsole.log(a); // 1\n\nfunction f() {\n // <- start of a function scope\n var a = 2;\n console.log(a); // 2\n\n {\n // <- start of a block scope\n let a = 3;\n console.log(a); // 3\n } // <- end of a block scope\n\n console.log(a); // 2\n} // <- end of a function scope\n\nf();\n\nconsole.log(a); // 1\n"
147147
})
148148
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p, {
149149
children: ["You can see that variables are tied to their scopes.\nAll three variables ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code, {
@@ -222,7 +222,7 @@ function _createMdxContent(props) {
222222
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre, {
223223
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code, {
224224
className: "language-js",
225-
children: "const a = 1; // scope index: 0; variable index: 0\n{\n const b = 2; // scope index: 1; variable index: 0\n const c = 3; // scope index: 1; variable index: 1\n}\n"
225+
children: "const a = 1; // scope index: 0; variable index: 0\n{\n const b = 2; // scope index: 1; variable index: 0\n const c = 3; // scope index: 1; variable index: 1\n}\n"
226226
})
227227
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p, {
228228
children: "You can see how each variable has a set of two unique indices.\nThe scope index increases with each nested scope.\nThe variable index increases with each variable in one specific scope."
@@ -231,7 +231,7 @@ function _createMdxContent(props) {
231231
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre, {
232232
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code, {
233233
className: "language-js",
234-
children: "{\n const a = 1; // scope index: 1; variable index: 0\n}\n{\n const b = 2; // scope index: 1; variable index: 0\n}\n"
234+
children: "{\n const a = 1; // scope index: 1; variable index: 0\n}\n{\n const b = 2; // scope index: 1; variable index: 0\n}\n"
235235
})
236236
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p, {
237237
children: ["As you can see, both ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code, {
@@ -271,7 +271,7 @@ function _createMdxContent(props) {
271271
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre, {
272272
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code, {
273273
className: "language-js",
274-
children: "function addOne(a) {\n const one = 1;\n return one + a;\n}\naddOne(2);\n"
274+
children: "function addOne(a) {\n const one = 1;\n return one + a;\n}\naddOne(2);\n"
275275
})
276276
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p, {
277277
children: ["Currently, we store ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code, {
@@ -321,7 +321,7 @@ function _createMdxContent(props) {
321321
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre, {
322322
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code, {
323323
className: "language-js",
324-
children: "function addOneBuilder() {\n const one = 1;\n return (a) => {\n return one + a;\n };\n}\nconst addOne = addOneBuilder();\naddOne(2);\n"
324+
children: "function addOneBuilder() {\n const one = 1;\n return (a) => {\n return one + a;\n };\n}\nconst addOne = addOneBuilder();\naddOne(2);\n"
325325
})
326326
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p, {
327327
children: "While running the code, depending on the implementation, we might get a panic, a wrong result or even an unsafe memory access.\nLet's try to understand what is going on here:"
@@ -409,7 +409,7 @@ function _createMdxContent(props) {
409409
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre, {
410410
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code, {
411411
className: "language-js",
412-
children: "function addOneBuilder() {\n const one = 1;\n return (a) => {\n return one + a;\n };\n}\n"
412+
children: "function addOneBuilder() {\n const one = 1;\n return (a) => {\n return one + a;\n };\n}\n"
413413
})
414414
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p, {
415415
children: "These are our scopes before the scope analysis.\nNotice that we start from the scope of the arrow function, since we work our way out from the most nested scope:"
@@ -451,7 +451,7 @@ function _createMdxContent(props) {
451451
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre, {
452452
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code, {
453453
className: "language-js",
454-
children: "function f(a) {\n console.log(a); // initial\n (() => {\n arguments[0] = \"modified\";\n })()\n console.log(a); // modified\n}\nf(\"initial\");\n"
454+
children: "function f(a) {\n console.log(a); // initial\n (() => {\n arguments[0] = \"modified\";\n })();\n console.log(a); // modified\n}\nf(\"initial\");\n"
455455
})
456456
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p, {
457457
children: ["The solution here is to mark every argument variable that might be accessed through a mapped ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code, {
@@ -474,7 +474,7 @@ function _createMdxContent(props) {
474474
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre, {
475475
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code, {
476476
className: "language-js",
477-
children: "function f() {\n const a = 1;\n eval(\"function nested() {console.log(a)}; nested();\");\n}\nf();\n"
477+
children: "function f() {\n const a = 1;\n eval(\"function nested() {console.log(a)}; nested();\");\n}\nf();\n"
478478
})
479479
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p, {
480480
children: ["Our solution is this case is to mark every variable in the scopes where the direct ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code, {
@@ -493,7 +493,7 @@ function _createMdxContent(props) {
493493
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre, {
494494
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code, {
495495
className: "language-js",
496-
children: "function f() {\n const a1 = 1;\n for (let i = 0; i < 2; i++) {\n with ({ [`a${i}`]: 2 }) {\n console.log(a1);\n }\n }\n}\nf();\n"
496+
children: "function f() {\n const a1 = 1;\n for (let i = 0; i < 2; i++) {\n with ({ [`a${i}`]: 2 }) {\n console.log(a1);\n }\n }\n}\nf();\n"
497497
})
498498
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p, {
499499
children: ["In the first loop execution ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code, {

assets/js/f81c1134.6c7bf273.js

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/f81c1134.8010f372.js

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

0 commit comments

Comments
 (0)