{"id":363788,"date":"2024-05-21T02:03:30","date_gmt":"2024-05-21T02:03:30","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=363788"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=363788","title":{"rendered":"<span>\u0413\u043b\u0443\u0431\u043e\u043a\u0438\u0439 JS. \u041e\u0431\u043b\u0430\u0441\u0442\u0438 \u0442\u044c\u043c\u044b \u0438\u043b\u0438 \u0433\u0434\u0435 \u0436\u0438\u0432\u0443\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><em>\u0423\u0440\u043e\u0432\u0435\u043d\u044c:\u00a0<u>Senior<\/u>,\u00a0<u>Senior+<\/u><\/em><\/p>\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435\u00a0<a href=\"https:\/\/habr.com\/ru\/articles\/774548\/\" rel=\"noopener noreferrer nofollow\">\u0413\u043b\u0443\u0431\u043e\u043a\u0438\u0439 JS. \u0412 \u043f\u0430\u043c\u044f\u0442\u044c \u0438 \u0442\u0438\u043f\u0430\u0445 \u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/a>\u00a0\u043c\u044b \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u0438 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u0432\u0438\u0436\u043a\u0430 V8. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0442\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0433\u0434\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0438 \u043a\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0432 \u043f\u0430\u043c\u044f\u0442\u044c.<\/p>\n<p>\u041a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e, \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e, \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438, \u0432\u0435\u0440\u0441\u0438\u044e \u0434\u0432\u0438\u0436\u043a\u0430 (<a href=\"https:\/\/chromium.googlesource.com\/v8\/v8.git\/+\/refs\/tags\/12.2.136\" rel=\"noopener noreferrer nofollow\">12.2.136<\/a>).<\/p>\n<h2>\u0410\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u0435 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e (\u0410\u0421\u0414)<\/h2>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043c\u044b \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c, \u0441\u0442\u043e\u0438\u0442 \u043f\u0430\u0440\u0443 \u0441\u043b\u043e\u0432 \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u0442\u043e\u043c, \u043e\u0442\u043a\u0443\u0434\u0430 \u0432\u043e\u043e\u0431\u0449\u0435 V8 \u0438\u0445 \u0431\u0435\u0440\u0435\u0442. \u0412\u0435\u0434\u044c \u043a\u043e\u0434 JavaScript, \u043a\u0430\u043a \u0438 \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 \u043a\u043e\u0434 &#8212; \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c, \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0434\u043b\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0432\u043e\u0441\u043f\u0440\u0438\u044f\u0442\u0438\u044f \u0442\u0435\u043a\u0441\u0442. \u041a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0430\u0440\u0441\u0438\u0442\u0441\u044f \u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043c\u0430\u0448\u0438\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 (\u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439 \u0443\u0436\u0435 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0439 \u0441\u0440\u0435\u0434\u0435, \u0430 \u043d\u0435 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0443).<\/p>\n<p>\u0422\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u043e, \u044f\u0437\u044b\u043a\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0430\u0440\u0441\u044f\u0442 \u0442\u0435\u043a\u0441\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0438 \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e\u0442 \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u00a0<a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%90%D0%B1%D1%81%D1%82%D1%80%D0%B0%D0%BA%D1%82%D0%BD%D0%BE%D0%B5_%D1%81%D0%B8%D0%BD%D1%82%D0%B0%D0%BA%D1%81%D0%B8%D1%87%D0%B5%D1%81%D0%BA%D0%BE%D0%B5_%D0%B4%D0%B5%D1%80%D0%B5%D0%B2%D0%BE\" rel=\"noopener noreferrer nofollow\">\u0410\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u0435 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e<\/a>\u00a0\u0438\u043b\u0438 \u0410\u0421\u0414 (AST \u0432 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u043e\u043c \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435). \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 V8 \u043d\u0435 \u0441\u0442\u0430\u043b\u0438 \u0437\u0434\u0435\u0441\u044c \u0438\u0437\u043e\u0431\u0440\u0435\u0442\u0430\u0442\u044c \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434 \u0438 \u043f\u043e\u0448\u043b\u0438 \u043f\u043e \u0442\u043e\u043c\u0443 \u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u043c\u0443 \u043f\u0443\u0442\u0438.<\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u0432 \u043d\u0430 \u0432\u0445\u043e\u0434 \u0444\u0430\u0439\u043b \u0438\u043b\u0438 \u0441\u0442\u0440\u043e\u043a\u0443, \u0434\u0432\u0438\u0436\u043e\u043a \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u0442 \u0442\u0435\u043a\u0441\u0442 \u0438 \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0432 \u0434\u0435\u0440\u0435\u0432\u043e \u0410\u0421\u0414.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u0434 \u0434\u043b\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0415\u0432\u043a\u043b\u0438\u0434\u0430<\/p>\n<pre><code class=\"javascript\">while (b !== 0)   if (a > b) a = a - b   else b = b - a;<\/code><\/pre>\n<p>\u0412 \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0435\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a<\/p>\n<pre><code class=\"bash\">%> v8-debug --print-ast test.js [generating bytecode for function: ] --- AST --- FUNC at 0 . KIND 0 . LITERAL ID 0 . SUSPEND COUNT 0 . NAME \"\" . INFERRED NAME \"\" . BLOCK at -1 . . EXPRESSION STATEMENT at -1 . . . ASSIGN at -1 . . . . VAR PROXY local[0] (0x7fe71480ba60) (mode = TEMPORARY, assigned = true) \".result\" . . . . LITERAL undefined . . WHILE at 0 . . . COND at 9 . . . . NOT at 9 . . . . . EQ_STRICT at 9 . . . . . . VAR PROXY unallocated (0x7fe71480bbd0) (mode = DYNAMIC_GLOBAL, assigned = true) \"b\" . . . . . . LITERAL 0 . . . BODY at 18 . . . . IF at 18 . . . . . CONDITION at 24 . . . . . . GT at 24 . . . . . . . VAR PROXY unallocated (0x7fe71480bc00) (mode = DYNAMIC_GLOBAL, assigned = true) \"a\" . . . . . . . VAR PROXY unallocated (0x7fe71480bbd0) (mode = DYNAMIC_GLOBAL, assigned = true) \"b\" . . . . . THEN at 29 . . . . . . EXPRESSION STATEMENT at 29 . . . . . . . ASSIGN at -1 . . . . . . . . VAR PROXY local[0] (0x7fe71480ba60) (mode = TEMPORARY, assigned = true) \".result\" . . . . . . . . ASSIGN at 31 . . . . . . . . . VAR PROXY unallocated (0x7fe71480bc00) (mode = DYNAMIC_GLOBAL, assigned = true) \"a\" . . . . . . . . . SUB at 35 . . . . . . . . . . VAR PROXY unallocated (0x7fe71480bc00) (mode = DYNAMIC_GLOBAL, assigned = true) \"a\" . . . . . . . . . . VAR PROXY unallocated (0x7fe71480bbd0) (mode = DYNAMIC_GLOBAL, assigned = true) \"b\" . . . . . ELSE at 46 . . . . . . EXPRESSION STATEMENT at 46 . . . . . . . ASSIGN at -1 . . . . . . . . VAR PROXY local[0] (0x7fe71480ba60) (mode = TEMPORARY, assigned = true) \".result\" . . . . . . . . ASSIGN at 48 . . . . . . . . . VAR PROXY unallocated (0x7fe71480bbd0) (mode = DYNAMIC_GLOBAL, assigned = true) \"b\" . . . . . . . . . SUB at 52 . . . . . . . . . . VAR PROXY unallocated (0x7fe71480bbd0) (mode = DYNAMIC_GLOBAL, assigned = true) \"b\" . . . . . . . . . . VAR PROXY unallocated (0x7fe71480bc00) (mode = DYNAMIC_GLOBAL, assigned = true) \"a\" . RETURN at -1 . . VAR PROXY local[0] (0x7fe71480ba60) (mode = TEMPORARY, assigned = true) \".result\"<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0443\u0437\u043b\u044b (\u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0434\u0435\u0440\u0435\u0432\u0430), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b, \u0438 \u043a\u043e\u043d\u0446\u0435\u0432\u044b\u0435 \u0443\u0437\u043b\u044b (\u043b\u0438\u0441\u0442\u044c\u044f \u0434\u0435\u0440\u0435\u0432\u0430), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435.<\/p>\n<p>\u0423\u0436\u0435 \u043d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u0434\u0435\u043a\u043b\u0430\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043d\u043e \u043f\u0430\u043c\u044f\u0442\u044c \u043f\u043e\u0434 \u043d\u0438\u0445 \u0435\u0449\u0435 \u043d\u0435 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0430. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u0430\u043a\u043e\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432 \u0410\u0421\u0414 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u043a\u0438\u0439\u00a0<strong>VariableProxy<\/strong>\u00a0\u0443\u0437\u0435\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0432 \u043f\u0430\u043c\u044f\u0442\u0438. \u041f\u0440\u0438 \u0447\u0435\u043c, \u0442\u0430\u043a\u0438\u0445\u00a0<strong>VariableProxy<\/strong>\u00a0\u043d\u0430 \u043e\u0434\u043d\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043c\u043e\u0436\u0435\u0442 \u0441\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f \u0441\u0440\u0430\u0437\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e. \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c \u043f\u043e\u0437\u0436\u0435 \u0438 \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u043c\u0435\u0441\u0442\u0435, \u0432 Scope (\u043e\u0431 \u044d\u0442\u043e\u043c \u0447\u0443\u0442\u044c \u043d\u0438\u0436\u0435), \u0430\u00a0<strong>VariableProxy<\/strong>\u00a0&#8212; \u0441\u0432\u043e\u0435\u0433\u043e \u0440\u043e\u0434\u0430 \u0441\u0441\u044b\u043b\u043a\u0430-\u043f\u043b\u0435\u0439\u0441\u0445\u043e\u043b\u0434\u0435\u0440. \u041d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0410\u0421\u0414 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c \u043d\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f, \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u0440\u0435\u0437\u00a0<strong>VariableProxy<\/strong>.<\/p>\n<h2>VariableMode<\/h2>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f \u0441 \u0442\u0435\u043c, \u043a\u0430\u043a\u0438\u0445 \u0442\u0438\u043f\u043e\u0432 \u0431\u044b\u0432\u0430\u044e\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 V8. \u0423\u0441\u043b\u043e\u0432\u043d\u043e, \u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430 \u0442\u0440\u0438 \u0433\u0440\u0443\u043f\u043f\u044b<\/p>\n<h4>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u043e\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435<\/h4>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u044f\u0432\u043d\u044b\u043c (\u0438\u043b\u0438 \u043d\u0435\u044f\u0432\u043d\u044b\u043c) \u043e\u0431\u0440\u0430\u0437\u043e\u043c. \u0422\u0430\u043a\u0438\u0445 \u0432\u0441\u0435\u0433\u043e \u0442\u0440\u0438<\/p>\n<ul>\n<li>\n<p><u>kLet<\/u>\u00a0&#8212; \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0435\u043a\u0441\u0435\u043c\u043e\u0439 &#171;let&#187;<\/p>\n<\/li>\n<li>\n<p><u>kConst<\/u>\u00a0&#8212; \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0435\u043a\u0441\u0435\u043c\u043e\u0439 &#171;const&#187;<\/p>\n<\/li>\n<li>\n<p><u>kVar<\/u>\u00a0&#8212; \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0435\u043a\u0441\u0435\u043c\u0430\u043c\u0438 &#171;var&#187; \u0438 &#171;function&#187;<\/p>\n<\/li>\n<\/ul>\n<h4>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430<\/h4>\n<p>\u041a \u043d\u0438\u043c \u043e\u0442\u043d\u043e\u0441\u044f\u0442 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 &#8212; \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043d\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u044f\u0432\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c<\/p>\n<ul>\n<li>\n<p><u>kTemporary<\/u>\u00a0&#8212; \u043d\u0435 \u0432\u0438\u0434\u043d\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e, \u0436\u0438\u0432\u0435\u0442 \u0432 \u0441\u0442\u044d\u043a\u0435<\/p>\n<\/li>\n<li>\n<p><u>kDynamic<\/u>\u00a0&#8212; \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435\/\u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043d\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430, \u0432\u0441\u0435\u0433\u0434\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u043e\u0438\u0441\u043a\u0430<\/p>\n<\/li>\n<li>\n<p><u>kDynamicGlobal<\/u>\u00a0&#8212; \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435\/\u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043d\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430, \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u043e\u0438\u0441\u043a\u0430, \u043d\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u0430\u044f<\/p>\n<\/li>\n<li>\n<p><u>kDynamicLocal<\/u>\u00a0&#8212; \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435\/\u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043d\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430, \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u043e\u0438\u0441\u043a\u0430, \u043d\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"javascript\">a = \"a\"; \/\/ \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e DYNAMIC_GLOBAL a; <\/code><\/pre>\n<h4>\u041a\u043b\u0430\u0441\u0441\u043e\u0432\u044b\u0435 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435<\/h4>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0438 \u0430\u043a\u0441\u0435\u0441\u0441\u043e\u0440\u043e\u0432. \u0422\u0440\u0435\u0431\u0443\u044e\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u0440\u0430\u0432 \u0438 \u0436\u0438\u0432\u0443\u0442 \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u043a\u043b\u0430\u0441\u0441\u0430.<\/p>\n<ul>\n<li>\n<p><u>kPrivateMethod<\/u>\u00a0&#8212; \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u0434\u043d\u043e\u043c Scope \u0441 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0441 \u0442\u0430\u043a\u0438\u043c \u0436\u0435 \u0438\u043c\u0435\u043d\u0435\u043c<\/p>\n<\/li>\n<li>\n<p><u>kPrivateSetterOnly<\/u>\u00a0&#8212; \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u0434\u043d\u043e\u043c Scope \u0441 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0441 \u0442\u0430\u043a\u0438\u043c \u0436\u0435 \u0438\u043c\u0435\u043d\u0435\u043c, \u043a\u0440\u043e\u043c\u0435\u00a0<u>kPrivateGetterOnly<\/u><\/p>\n<\/li>\n<li>\n<p><u>kPrivateGetterOnly<\/u>\u00a0&#8212; \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u0434\u043d\u043e\u043c Scope \u0441 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0441 \u0442\u0430\u043a\u0438\u043c \u0436\u0435 \u0438\u043c\u0435\u043d\u0435\u043c, \u043a\u0440\u043e\u043c\u0435\u00a0<u>kPrivateSetterOnly<\/u><\/p>\n<\/li>\n<li>\n<p><u>kPrivateGetterAndSetter<\/u>\u00a0&#8212; \u0435\u0441\u043b\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0434\u0432\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435\u00a0<u>kPrivateSetterOnly<\/u>\u00a0\u0438\u00a0<u>kPrivateGetterOnly<\/u>\u00a0\u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c \u0438\u043c\u0435\u043d\u0435\u043c, \u043e\u043d\u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u043e\u0434\u043d\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0441 \u044d\u0442\u0438\u043c \u0442\u0438\u043f\u043e\u043c<\/p>\n<\/li>\n<\/ul>\n<p><a href=\"https:\/\/chromium.googlesource.com\/v8\/v8.git\/+\/refs\/tags\/12.2.136\/src\/common\/globals.h#1718\" rel=\"noopener noreferrer nofollow\">src\/common\/globals.h#1718<\/a><\/p>\n<pre><code class=\"cpp\">\/\/ The order of this enum has to be kept in sync with the predicates below. enum class VariableMode : uint8_t {   \/\/ User declared variables:   kLet,  \/\/ declared via 'let' declarations (first lexical)      kConst,  \/\/ declared via 'const' declarations (last lexical)      kVar,  \/\/ declared via 'var', and 'function' declarations      \/\/ Variables introduced by the compiler:   kTemporary,  \/\/ temporary variables (not user-visible), stack-allocated                \/\/ unless the scope as a whole has forced context allocation      kDynamic,  \/\/ always require dynamic lookup (we don't know              \/\/ the declaration)      kDynamicGlobal,  \/\/ requires dynamic lookup, but we know that the                    \/\/ variable is global unless it has been shadowed                    \/\/ by an eval-introduced variable      kDynamicLocal,  \/\/ requires dynamic lookup, but we know that the                   \/\/ variable is local and where it is unless it                   \/\/ has been shadowed by an eval-introduced                   \/\/ variable    \/\/ Variables for private methods or accessors whose access require   \/\/ brand check. Declared only in class scopes by the compiler   \/\/ and allocated only in class contexts:   kPrivateMethod,  \/\/ Does not coexist with any other variable with the same                    \/\/ name in the same scope.    kPrivateSetterOnly,  \/\/ Incompatible with variables with the same name but                        \/\/ any mode other than kPrivateGetterOnly. Transition to                        \/\/ kPrivateGetterAndSetter if a later declaration for the                        \/\/ same name with kPrivateGetterOnly is made.    kPrivateGetterOnly,  \/\/ Incompatible with variables with the same name but                        \/\/ any mode other than kPrivateSetterOnly. Transition to                        \/\/ kPrivateGetterAndSetter if a later declaration for the                        \/\/ same name with kPrivateSetterOnly is made.    kPrivateGetterAndSetter,  \/\/ Does not coexist with any other variable with the                             \/\/ same name in the same scope.    kLastLexicalVariableMode = kConst, };<\/code><\/pre>\n<h2>Isolate<\/h2>\n<p>\u0415\u0449\u0435 \u043e\u0434\u0438\u043d \u0432\u0430\u0436\u043d\u044b\u0439 \u0430\u0441\u043f\u0435\u043a\u0442 V8 &#8212;\u00a0<strong>Isolate<\/strong>.\u00a0<strong>Isolate<\/strong>\u00a0&#8212; \u044d\u0442\u043e \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0434\u0432\u0438\u0436\u043a\u0430. \u0418\u043c\u0435\u043d\u043d\u043e \u0437\u0434\u0435\u0441\u044c \u0438 \u0431\u0443\u0434\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0434\u0432\u0438\u0436\u043a\u0430. \u0412\u0441\u0435, \u0447\u0442\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e\u00a0<strong>Isolate<\/strong>, \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0434\u0440\u0443\u0433\u043e\u043c\u00a0<strong>Isolate<\/strong>. \u0421\u0430\u043c\u00a0<strong>Isolate<\/strong>\u00a0\u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0442\u043e\u043a\u043e-\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u043c. \u0422.\u0435. \u043a \u043d\u0435\u043c\u0443 \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u043f\u043e\u0442\u043e\u043a. \u0414\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 &#171;\u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u0435\u043b\u044f&#187; (Embedder), \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430, \u043a\u043e\u043c\u0430\u043d\u0434\u0430 V8 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u00a0<u>Locker\/Unlocker API<\/u>. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u00a0<strong>Isolate<\/strong>\u00a0\u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c, \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0442\u0430\u0431 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u0438\u043b\u0438\u00a0<a href=\"https:\/\/developer.mozilla.org\/ru\/docs\/Web\/API\/Worker\" rel=\"noopener noreferrer nofollow\">Worker<\/a>.<\/p>\n<h2>Scope<\/h2>\n<p>\u0412 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438\u00a0<a href=\"https:\/\/tc39.es\/ecma262\/#sec-ecmascript-language-statements-and-declarations\" rel=\"noopener noreferrer nofollow\">ECMAScript<\/a>\u00a0\u043f\u043e\u043d\u044f\u0442\u0438\u0435 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437\u043c\u044b\u0442\u043e, \u043d\u043e \u043c\u044b \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0430\u043b\u043b\u043e\u0446\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0442\u0430\u043a\u0438\u0445 \u043e\u0431\u043b\u0430\u0441\u0442\u0435\u0439. \u0412 V8 \u044d\u0442\u0430 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f\u00a0Scope. \u0412\u0441\u0435\u0433\u043e, \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442, \u0438\u0445 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043e 9<\/p>\n<ul>\n<li>\n<p><u>CLASS_SCOPE<\/u>\u00a0&#8212; \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u0430<\/p>\n<\/li>\n<li>\n<p><u>EVAL_SCOPE<\/u>\u00a0&#8212; \u0432\u0435\u0440\u0445\u043d\u0435\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0434\u043b\u044f eval<\/p>\n<\/li>\n<li>\n<p><u>FUNCTION_SCOPE<\/u>\u00a0&#8212; \u0432\u0435\u0440\u0445\u043d\u0435\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0444\u0443\u043a\u043d\u0446\u0438\u0438<\/p>\n<\/li>\n<li>\n<p><u>MODULE_SCOPE<\/u>\u00a0&#8212; \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044f<\/p>\n<\/li>\n<li>\n<p><u>SCRIPT_SCOPE<\/u>\u00a0&#8212; \u0432\u0435\u0440\u0445\u043d\u0435\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u0430 (&lt;script>) \u0438\u043b\u0438 \u0441\u0430\u043c\u043e\u0433\u043e \u0432\u0435\u0440\u0445\u043d\u0435\u0433\u043e eval<\/p>\n<\/li>\n<li>\n<p><u>CATCH_SCOPE<\/u>\u00a0&#8212; \u043e\u0431\u043b\u0430\u0441\u0442\u044c catch (\u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435\u00a0<code>try {} catch(e) {}<\/code>)<\/p>\n<\/li>\n<li>\n<p><u>BLOCK_SCOPE<\/u>\u00a0&#8212; \u0431\u043b\u043e\u0447\u043d\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c (\u0432\u043d\u0443\u0442\u0440\u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043d\u044b\u0445 \u0441\u043a\u043e\u0431\u043e\u043a)<\/p>\n<\/li>\n<li>\n<p><u>WITH_SCOPE<\/u>\u00a0&#8212; \u043e\u0431\u043b\u0430\u0441\u0442\u044c with (\u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435\u00a0<code>with (stm) {}<\/code>)<\/p>\n<\/li>\n<li>\n<p><u>SHADOW_REALM_SCOPE<\/u>\u00a0&#8212; \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 ShadowRealm\u00a0<\/p>\n<\/li>\n<\/ul>\n<p><a href=\"https:\/\/chromium.googlesource.com\/v8\/v8.git\/+\/refs\/tags\/12.2.136\/src\/common\/globals.h#1649\" rel=\"noopener noreferrer nofollow\">src\/common\/globals.h#1649<\/a><\/p>\n<pre><code class=\"cpp\">enum ScopeType : uint8_t {   CLASS_SCOPE,        \/\/ The scope introduced by a class.   EVAL_SCOPE,         \/\/ The top-level scope for an eval source.   FUNCTION_SCOPE,     \/\/ The top-level scope for a function.   MODULE_SCOPE,       \/\/ The scope introduced by a module literal   SCRIPT_SCOPE,       \/\/ The top-level scope for a script or a top-level eval.   CATCH_SCOPE,        \/\/ The scope introduced by catch   BLOCK_SCOPE,        \/\/ The scope introduced by a new block.   WITH_SCOPE,         \/\/ The scope introduced by with.   SHADOW_REALM_SCOPE  \/\/ Synthetic scope for ShadowRealm NativeContexts. };<\/code><\/pre>\n<p>\u041f\u043e\u043c\u0438\u043c\u043e \u044d\u0442\u0438\u0445 \u0434\u0435\u0432\u044f\u0442\u0438 \u0442\u0438\u043f\u043e\u0432 \u0435\u0441\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d &#8212; \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 (<strong>Global Scope<\/strong>), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0430 \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u0443\u0440\u043e\u0432\u043d\u0435\u00a0<strong>Isolate<\/strong>\u00a0\u0438 \u0445\u0440\u0430\u043d\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u0438. \u0418\u043c\u0435\u043d\u043d\u043e \u043d\u0430 \u044d\u0442\u0443 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0438 \u0431\u0443\u0434\u0435\u0442 \u0441\u0441\u044b\u043b\u0430\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442\u00a0Window\u00a0\u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435.<\/p>\n<p>\u0422\u0430\u043a \u0433\u0434\u0435 \u0436\u0435 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u0442\u043e\u0439 \u0438\u043b\u0438 \u0438\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438. \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u0436\u0434\u0443\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<h3>CLASS_SCOPE<\/h3>\n<p>\u0418\u0437 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0440\u0435\u0447\u044c \u0438\u0434\u0435\u0442 \u043e \u043a\u043b\u0430\u0441\u0441\u0430\u0445, \u0435\u0433\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u0445 \u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u0445<\/p>\n<pre><code class=\"javascript\">class A extends B  {   prop1 = \"prop1\";    method1() {} }<\/code><\/pre>\n<p>\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438, \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430\u00a0<code>class<\/code>\u00a0\u0438 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u043c\u00a0<code>}<\/code>.<\/p>\n<pre><code class=\"javascript\">\/* start position -> *\/class A extends B { body }\/* &lt;- end position *\/<\/code><\/pre>\n<p>\u0422.\u0435. \u0432 \u043a\u043b\u0430\u0441\u0441\u043e\u0432\u0443\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442:<\/p>\n<ul>\n<li>\n<p>\u0418\u043c\u044f \u043a\u043b\u0430\u0441\u0441\u0430<\/p>\n<\/li>\n<li>\n<p>\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043a\u043b\u0430\u0441\u0441\u0430 (\u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0435 \u0438 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435)<\/p>\n<\/li>\n<li>\n<p>\u041c\u0435\u0442\u043e\u0434\u044b \u043a\u043b\u0430\u0441\u0441\u0430<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 Scope \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430<\/p>\n<pre><code class=\"javascript\">class A {}<\/code><\/pre>\n<pre><code class=\"cpp\">%> v8-debug --print-scopes test.js Global scope: global { \/\/ (0x7f7b0a80c630) (0, 1371)   \/\/ will be compiled   \/\/ NormalFunction   \/\/ 1 stack slots   \/\/ 3 heap slots   \/\/ temporary vars:   TEMPORARY .result;  \/\/ (0x7f7b0a80cec0) local[0]   \/\/ local vars:   LET A;  \/\/ (0x7f7b0a80cde0) context[2]      class A { \/\/ (0x7f7b0a80c820) (0, 10)     \/\/ strict mode scope     \/\/ 2 heap slots     \/\/ class var, unused, index not saved:     CONST A;  \/\/ (0x7f7b0a80ca40)          function () { \/\/ (0x7f7b0a80ca88) (0, 0)       \/\/ strict mode scope       \/\/ DefaultBaseConstructor     }   } }<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043a\u043b\u0430\u0441\u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0442\u0438\u043f\u0430\u00a0<u>LET<\/u>. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0441\u0441\u044b\u043b\u043a\u0430 \u0437\u0430\u0434\u0435\u043a\u043b\u0430\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0432 Global Scope. \u0412\u043d\u0443\u0442\u0440\u0438 \u0436\u0435\u00a0<u>CLASS_SCOPE<\/u>\u00a0\u043c\u044b \u0432\u0438\u0434\u0438\u043c \u043a\u043b\u0430\u0441\u0441\u043e\u0432\u0443\u044e \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443\u00a0<code>CONST A<\/code>\u00a0\u0438 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440.<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043c\u0435\u0442\u043e\u0434 \u043a\u043b\u0430\u0441\u0441\u0430<\/p>\n<pre><code class=\"javascript\">class A {   method1 () {} }<\/code><\/pre>\n<pre><code class=\"cpp\">%> v8-debug --print-scopes test.js Inner function scope: function method1 () { \/\/ (0x7fcf8c80f250) (19, 24)   \/\/ strict mode scope   \/\/ ConciseMethod   \/\/ 2 heap slots } Global scope: global { \/\/ (0x7fcf8c80ee30) (0, 1387)   \/\/ will be compiled   \/\/ NormalFunction   \/\/ 1 stack slots   \/\/ 3 heap slots   \/\/ temporary vars:   TEMPORARY .result;  \/\/ (0x7fcf8c80f8a8) local[0]   \/\/ local vars:   LET A;  \/\/ (0x7fcf8c80f7c8) context[2]      class A { \/\/ (0x7fcf8c80f020) (0, 26)     \/\/ strict mode scope     \/\/ 2 heap slots     \/\/ class var, unused, index not saved:     CONST A;  \/\/ (0x7fcf8c80f428)          function () { \/\/ (0x7fcf8c80f470) (0, 0)       \/\/ strict mode scope       \/\/ DefaultBaseConstructor     }          function method1 () { \/\/ (0x7fcf8c80f250) (19, 24)       \/\/ strict mode scope       \/\/ lazily parsed       \/\/ ConciseMethod       \/\/ 2 heap slots     }   } }<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u0438\u0434\u0435\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044e\u00a0method1\u00a0\u0432\u043d\u0443\u0442\u0440\u0438\u00a0<u>CLASS_SCOPE<\/u>, \u0430 \u0442\u0430\u043a \u0436\u0435, \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e,\u00a0<u>FUNCTION_SCOPE<\/u>\u00a0\u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 (\u043e\u00a0<u>FUNCTION_SCOPE<\/u>\u00a0\u043d\u0438\u0436\u0435).<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u043a\u043b\u0430\u0441\u0441\u0430<\/p>\n<pre><code class=\"javascript\">class A {   prop1 = \"prop1\" }<\/code><\/pre>\n<pre><code class=\"cpp\">%> v8-debug --print-scopes test.js Global scope: global { \/\/ (0x7fa78502c230) (0, 1390)   \/\/ will be compiled   \/\/ NormalFunction   \/\/ 1 stack slots   \/\/ 3 heap slots   \/\/ temporary vars:   TEMPORARY .result;  \/\/ (0x7fa78502cde8) local[0]   \/\/ local vars:   LET A;  \/\/ (0x7fa78502cd08) context[2]      class A { \/\/ (0x7fa78502c420) (0, 29)     \/\/ strict mode scope     \/\/ 2 heap slots     \/\/ class var, unused, index not saved:     CONST A;  \/\/ (0x7fa78502c8e0)          function () { \/\/ (0x7fa78502c928) (0, 0)       \/\/ strict mode scope       \/\/ DefaultBaseConstructor     }          function A () { \/\/ (0x7fa78502c650) (8, 29)       \/\/ strict mode scope       \/\/ will be compiled       \/\/ ClassMembersInitializerFunction     }   } }<\/code><\/pre>\n<p>\u041a\u0430\u043a \u043d\u0438 \u0441\u0442\u0440\u0430\u043d\u043d\u043e, \u043c\u0435\u0442\u043e\u0434\u0430\u00a0<code>prop1<\/code>\u00a0\u043c\u044b \u0442\u0443\u0442 \u043d\u0435 \u0432\u0438\u0434\u0438\u043c. \u0412\u043c\u0435\u0441\u0442\u043e \u043d\u0435\u0433\u043e \u0432 \u043a\u043b\u0430\u0441\u0441\u043e\u0432\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u00a0<code>function A ()<\/code>. \u041e\u0431\u0443\u0441\u043b\u043e\u0432\u043b\u0435\u043d\u043e \u044d\u0442\u043e \u0442\u0435\u043c, \u0447\u0442\u043e \u043c\u0435\u0442\u043e\u0434\u044b \u043a\u043b\u0430\u0441\u0441\u0430 \u043c\u043e\u0433\u0443\u0442 \u0438\u043c\u0435\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0430, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u043c\u0438, \u0447\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u0440\u0430\u0432 \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u043a \u043d\u0438\u043c. \u0414\u0432\u0438\u0436\u043e\u043a V8 \u0438\u043c\u0435\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0430\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c \u043a\u043b\u0430\u0441\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0442\u0438\u043f\u0430\u00a0<u>kClassMembersInitializerFunction<\/u>. \u0412\u043e\u043e\u0431\u0449\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 V8 \u0431\u044b\u0432\u0430\u044e\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0442\u0438\u043f\u043e\u0432, \u0438\u0445 \u0430\u0436 \u0446\u0435\u043b\u044b\u0445 27, \u043d\u043e \u043e\u0431 \u044d\u0442\u043e\u043c \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0440\u0430\u0437.<\/p>\n<h3>EVAL_SCOPE<\/h3>\n<p>\u042d\u0442\u0430 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438\u00a0<a href=\"https:\/\/developer.mozilla.org\/ru\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/eval\" rel=\"noopener noreferrer nofollow\">eval<\/a><\/p>\n<pre><code class=\"javascript\">eval(\"var a = 'a'\")<\/code><\/pre>\n<pre><code class=\"cpp\">%> v8-debug --print-scopes test.js Global scope: global { \/\/ (0x7fc5e1838230) (0, 1380)   \/\/ inner scope calls 'eval'   \/\/ will be compiled   \/\/ NormalFunction   \/\/ 1 stack slots   \/\/ temporary vars:   TEMPORARY .result;  \/\/ (0x7fc5e18384e0) local[0]   \/\/ dynamic vars:   DYNAMIC_GLOBAL eval;  \/\/ (0x7fc5e18385a0) never assigned } Global scope: eval { \/\/ (0x7fc5e1838420) (0, 11)   \/\/ will be compiled   \/\/ NormalFunction   \/\/ temporary vars:   TEMPORARY .result;  \/\/ (0x7fc5e1838700)   \/\/ dynamic vars:   DYNAMIC a;  \/\/ (0x7fc5e1838610) lookup, never assigned }<\/code><\/pre>\n<p>\u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e,\u00a0<u>EVAL_SCOPE<\/u>\u00a0\u043c\u0430\u043b\u043e \u0447\u0435\u043c \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442\u00a0<u>Global Scope<\/u>, \u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432\u043d\u0443\u0442\u0440\u0438\u00a0eval, \u0447\u0430\u0441\u0442\u043e \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 (\u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0438\u0435 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0433\u043e \u0438\u0445 \u043f\u043e\u0438\u0441\u043a\u0430 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438) \u0442.\u043a. \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0438\u0445 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u0438 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430.<\/p>\n<h3>FUNCTION_SCOPE<\/h3>\n<p>\u041c\u044b \u0443\u0436\u0435 \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u0441 \u043e\u0431\u043b\u0430\u0441\u0442\u044c\u044e \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0433\u0434\u0430 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438\u00a0<u>CLASS_SCOPE<\/u>.<\/p>\n<pre><code class=\"javascript\">function fun\/* start postion -> *\/(a,b) { stmts }\/* &lt;- end position *\/<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 \u043f\u0435\u0440\u0432\u043e\u0439 \u043a\u0440\u0443\u0433\u043b\u043e\u0439 \u0441\u043a\u043e\u0431\u043a\u0438 \u0438 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0444\u0438\u0433\u0443\u0440\u043d\u043e\u0439<\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440<\/p>\n<pre><code class=\"javascript\">function fun(a) {   var b = \"b\"; }<\/code><\/pre>\n<pre><code class=\"cpp\">%> v8-debug --print-scopes test.js Inner function scope: function fun () { \/\/ (0x7f881c03c220) (12, 34)   \/\/ NormalFunction   \/\/ 2 heap slots   \/\/ local vars:   VAR a;  \/\/ (0x7f881c03e648) never assigned   VAR b;  \/\/ (0x7f881c03e690) never assigned } Global scope: global { \/\/ (0x7f881c03c030) (0, 1395)   \/\/ will be compiled   \/\/ NormalFunction   \/\/ local vars:   VAR fun;  \/\/ (0x7f881c03c3e0)      function fun () { \/\/ (0x7f881c03c220) (12, 34)     \/\/ lazily parsed     \/\/ NormalFunction     \/\/ 2 heap slots   } }<\/code><\/pre>\n<p>\u0412\u00a0<u>Global Scope<\/u>\u00a0\u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044e (\u0442\u0438\u043f\u00a0<u>VAR<\/u>), \u0430 \u0432\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0430 \u0432\u00a0<u>FUNCTION_SCOPE<\/u>, \u0433\u0434\u0435 \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0434\u0432\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435:\u00a0<code>a<\/code>\u00a0&#8212; \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u00a0<code>b<\/code>\u00a0&#8212; \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044f \u043f\u0435\u0440\u043c\u0435\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<p>\u041f\u043e\u0445\u043e\u0436\u0430\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u0438 \u0441\u043e \u0441\u0442\u0440\u0435\u043b\u043e\u0447\u043d\u044b\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438<\/p>\n<pre><code class=\"javascript\">var fun = (a) => {   var b = \"b\"; }<\/code><\/pre>\n<pre><code class=\"cpp\">%> v8-debug --print-scopes test.js Inner function scope: arrow (a) { \/\/ (0x7fec1e821098) (10, 35)   \/\/ ArrowFunction   \/\/ 2 heap slots   \/\/ local vars:   VAR a;  \/\/ (0x7fec1e821270) never assigned   VAR b;  \/\/ (0x7fec1e822f08) never assigned } Global scope: global { \/\/ (0x7fec1e820e30) (0, 1396)   \/\/ will be compiled   \/\/ NormalFunction   \/\/ 1 stack slots   \/\/ temporary vars:   TEMPORARY .result;  \/\/ (0x7fec1e821410) local[0]   \/\/ local vars:   VAR fun;  \/\/ (0x7fec1e821050)      arrow () { \/\/ (0x7fec1e821098) (10, 35)     \/\/ lazily parsed     \/\/ ArrowFunction     \/\/ 2 heap slots   } }<\/code><\/pre>\n<p>\u0422\u0438\u043f \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0431\u0443\u0434\u0435\u0442\u00a0<u>kArrowFunction<\/u>, \u043e\u0434\u043d\u0430\u043a\u043e, \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043d\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u043e\u0431\u044b\u0447\u043d\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438\u00a0<u>kNormalFunction<\/u>.<\/p>\n<p>\u0421\u0442\u043e\u0438\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e, \u043d\u0435 \u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0443 \u0441\u0442\u0440\u0435\u043b\u043e\u0447\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043d\u0435\u0442 \u0441\u0432\u043e\u0435\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430, \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u00a0<code>a<\/code>\u00a0\u0438 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044f\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f\u00a0<code>b<\/code>\u00a0\u0437\u0430\u0434\u0435\u043a\u043b\u0430\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0432\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438, \u043a\u0430\u043a \u0438 \u0443 \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u0422.\u0435. \u043a \u043d\u0438\u043c \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u0438\u0437 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u044b\u0448\u0435.<\/p>\n<pre><code class=\"javascript\">var fun = (a) => {   var b = \"b\"; }  console.log(this.a); \/\/ &lt;- undefined console.log(this.b); \/\/ &lt;- undefined<\/code><\/pre>\n<h3>MODULE_SCOPE<\/h3>\n<p>\u0414\u043b\u044f \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u00a0<code>.mjs<\/code>.<\/p>\n<pre><code class=\"javascript\">\/\/ test.mjs var a = \"a\"<\/code><\/pre>\n<pre><code class=\"cpp\">%> v8-debug --print-scopes test.mjs Global scope: module { \/\/ (0x7f793d00c820) (0, 1080)   \/\/ strict mode scope   \/\/ will be compiled   \/\/ Module   \/\/ 3 stack slots   \/\/ 3 heap slots   \/\/ temporary vars:   TEMPORARY .generator_object;  \/\/ (0x7f793d00cab8) local[0], never assigned   TEMPORARY .result;  \/\/ (0x7f793d00cc58) local[2]   \/\/ local vars:   VAR a;  \/\/ (0x7f793d00cb60) local[1] }<\/code><\/pre>\n<p>\u041c\u043e\u0434\u0443\u043b\u044c \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u0440\u044f\u0434\u043e\u043c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439, \u043d\u043e \u0435\u0433\u043e\u00a0<u>Scope<\/u>, \u043f\u043e \u0441\u0432\u043e\u0435\u0439 \u0441\u0443\u0442\u0438, \u043d\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e\u00a0<u>Global Scope<\/u>. \u0420\u0430\u0437\u0432\u0435 \u0447\u0442\u043e, \u0442\u0443\u0442 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u0443\u044e (\u0441\u043a\u0440\u044b\u0442\u0443\u044e) \u043f\u0435\u0440\u043c\u0435\u043d\u043d\u0443\u044e\u00a0<code>.generator_object<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0445\u0440\u0430\u043d\u0438\u0442 \u043e\u0431\u044a\u0435\u043a\u0442\u00a0<code>JSGeneratorObject<\/code>\u00a0\u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432. \u0415\u0451, \u0442\u0430\u043a \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u044c \u0432 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445 \u0438 REPL-\u0441\u043a\u0440\u0438\u043f\u0442\u0430\u0445.<\/p>\n<h3>SCRIPT_SCOPE<\/h3>\n<p>\u041e\u0431\u043b\u0430\u0441\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u0430. \u0421\u043a\u0440\u0438\u043f\u0442\u044b \u0431\u044b\u0432\u0430\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u044d\u0433 script \u0438\u043b\u0438 REPL-\u0441\u043a\u0440\u0438\u043f\u0442 \u0432 Node.js<\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 script-\u0442\u044d\u0433<\/p>\n<pre><code class=\"xml\">&lt;script>   var a = \"a\";   let b = \"a\"; &lt;\/script><\/code><\/pre>\n<p>\u041f\u0430\u0440\u0441\u0438\u043d\u0433 \u0442\u044d\u0433\u043e\u0432 \u043b\u0435\u0436\u0438\u0442 \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 V8 (\u044d\u0442\u0438\u043c \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0434\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f DOMTree), \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043e \u043d\u0430\u0447\u0430\u043b\u0435 \u0438 \u043a\u043e\u043d\u0446\u0435 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 &#8212; \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e. \u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0434\u0432\u0438\u0436\u043a\u0443 \u0442\u0435\u043b\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0432 \u0432\u0438\u0434\u0435 \u0441\u0442\u0440\u043e\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438 \u0431\u0443\u0434\u0435\u0442, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u043f\u043e\u043c\u0435\u0449\u0435\u043d\u0430 \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u044c\u00a0<u>SCRIPT_SCOPE<\/u>.<\/p>\n<p>\u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u044b\u0448\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f\u00a0<code>a<\/code>\u00a0\u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0434\u0435\u043a\u043b\u0430\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0432\u00a0<u>Global Scope<\/u>\u00a0(\u043f\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c \u0432c\u043f\u043b\u044b\u0442\u0438\u044f VAR), \u0430\u00a0<code>b<\/code>\u00a0\u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u0432\u0438\u0434\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u044d\u0442\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430.<\/p>\n<h3>CATCH_SCOPE<\/h3>\n<p>\u0421\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438\u00a0<code>try ... catch<\/code>\u00a0\u0431\u044b\u043b \u0432\u044b\u0434\u0435\u043b\u0435\u043d \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0442\u0438\u043f Scope. \u0422\u043e\u0447\u043d\u0435\u0435, \u0434\u043b\u044f \u0431\u043b\u043e\u043a\u0430\u00a0<code>catch(e) {}<\/code>.<\/p>\n<pre><code class=\"javascript\">try { stms } catch \/* start position -> *\/(e)\/* &lt;- end position *\/ { stmts }<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u043a\u0440\u0443\u0433\u043b\u043e\u0439 \u0441\u043a\u043e\u0431\u043a\u0438 \u043f\u043e\u0441\u043b\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430\u00a0<code>catch<\/code>\u00a0\u0438 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0435\u0439\u0441\u044f \u043a\u0440\u0443\u0433\u043b\u043e\u0439 \u0441\u043a\u043e\u0431\u043a\u043e\u0439. \u0423 \u0434\u0430\u043d\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043e\u0434\u043d\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 &#8212; \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443.<\/p>\n<pre><code class=\"javascript\">try {   var a = \"a\"; } catch (e) {   var b = \"b\"; }<\/code><\/pre>\n<pre><code class=\"cpp\">%> v8-debug --print-scopes test.js Global scope: global { \/\/ (0x7f8207010830) (0, 1412)   \/\/ will be compiled   \/\/ NormalFunction   \/\/ 1 stack slots   \/\/ temporary vars:   TEMPORARY .result;  \/\/ (0x7f8207011200) local[0]   \/\/ local vars:   VAR a;  \/\/ (0x7f8207010bc0)   VAR b;  \/\/ (0x7f82070110b8)      catch { \/\/ (0x7f8207010c58) (29, 51)     \/\/ 3 heap slots     \/\/ local vars:     VAR e;  \/\/ (0x7f8207010ee8) context[2], never assigned   } }<\/code><\/pre>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435\u00a0<code>a<\/code>\u00a0\u0438\u00a0<code>b<\/code>\u00a0\u043f\u043e\u043f\u0430\u043b\u0438 \u0432\u00a0<u>Global Scope<\/u>, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u0432\u00a0<u>CATCH_SCOPE<\/u>\u00a0\u043d\u0435\u0442 \u043d\u0438\u0447\u0435\u0433\u043e, \u043a\u0440\u043e\u043c\u0435\u00a0<code>e<\/code>. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b\u00a0<code>try {}<\/code>\u00a0\u0438\u00a0<code>catch {}<\/code>\u00a0\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0438\u0447\u0435\u043c \u0438\u043d\u044b\u043c, \u043a\u0430\u043a \u0431\u043b\u043e\u043a\u0430\u043c\u0438, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u043a \u043d\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0431\u043b\u043e\u0447\u043d\u043e\u0439 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438.<\/p>\n<h3>BLOCK_SCOPE<\/h3>\n<p>\u0418\u043c\u0435\u043d\u043d\u043e \u0441 \u0431\u043b\u043e\u0447\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u044c\u044e \u0447\u0430\u0441\u0442\u043e \u043f\u0443\u0442\u0430\u044e\u0442 \u0434\u0440\u0443\u0433\u0438\u0435 \u0442\u0438\u043f\u044b Scope. \u0421\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u043a \u0431\u043b\u043e\u0447\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438, \u043a\u0430\u043a \u044f \u0443\u0436\u0435 \u0441\u043a\u0430\u0437\u0430\u043b, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438.<\/p>\n<ul>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0442\u0438\u043f\u0430\u00a0<u>VAR<\/u>\u00a0\u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0442 \u0432 \u0432\u044b\u0448\u0435\u0441\u0442\u043e\u044f\u0449\u0438\u0439\u00a0<u>Scope<\/u><\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0442\u0438\u043f\u0430\u00a0<u>LET<\/u>\u00a0\u0438\u00a0<u>CONST<\/u>\u00a0\u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438\u00a0<u>BLOCK_SCOPE<\/u><\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"javascript\">\/* start postion -> *\/{ stmts }\/* &lt;- end position *\/<\/code><\/pre>\n<p>\u041e\u0431\u043b\u0430\u0441\u0442\u044c \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u0444\u0438\u0433\u0443\u0440\u043d\u043e\u0439 \u0441\u043a\u043e\u0431\u043a\u043e\u0439 \u0438 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u043a\u0430\u0440\u044b\u0432\u0430\u044e\u0449\u0435\u0439.<\/p>\n<pre><code class=\"javascript\">{   var a = \"a\";   let b = \"b\"; }<\/code><\/pre>\n<pre><code class=\"cpp\">%> v8-debug --print-scopes test.js Global scope: global { \/\/ (0x7fb799835e30) (0, 1411)   \/\/ will be compiled   \/\/ NormalFunction   \/\/ 3 stack slots   \/\/ temporary vars:   TEMPORARY .result;  \/\/ (0x7fb799836448) local[0]   \/\/ local vars:   VAR a;  \/\/ (0x7fb7998361c0)      block { \/\/ (0x7fb799836020) (0, 50)     \/\/ local vars:     CONST c;  \/\/ (0x7fb799836340) local[2], never assigned, hole initialization elided     LET b;  \/\/ (0x7fb799836280) local[1], never assigned, hole initialization elided   } }<\/code><\/pre>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435, \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f\u00a0<code>a<\/code>\u00a0\u0432\u0441\u043f\u043b\u044b\u043b\u0430 \u0432\u00a0<u>Global Scope<\/u>, \u0442\u0430\u043a \u043a\u0430\u043a \u0437\u0430\u0434\u0435\u043a\u043b\u0430\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0441 \u0442\u0438\u043f\u043e\u043c\u00a0<u>VAR<\/u>, \u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435\u00a0<code>b<\/code> \u0438\u00a0<code>c<\/code>\u00a0\u043e\u0441\u0442\u0430\u043b\u0438\u0441\u044c \u0432\u043d\u0443\u0442\u0440\u0438\u00a0<u>BLOCK_SCOPE<\/u>.<\/p>\n<p>\u041a \u0431\u043b\u043e\u0447\u043d\u044b\u043c \u0442\u0430\u043a \u0436\u0435, \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u00a0<code>for (let x ...) stmt<\/code><\/p>\n<pre><code class=\"javascript\">for \/* start position -> *\/(let x ...) stmt\/* &lt;- end position *\/<\/code><\/pre>\n<p>\u041d\u0430\u0447\u0430\u043b\u043e\u043c \u0442\u0430\u043a\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0432\u0430\u044f \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u043a\u0440\u0443\u0433\u043b\u0430\u044f \u0441\u043a\u043e\u0431\u043a\u0430, \u043a\u043e\u043d\u0446\u043e\u043c &#8212; \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0442\u043e\u043a\u0435\u043d\u00a0<code>stmt<\/code><\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"javascript\">for (let i = 0; i &lt; 2; i++) {   var a = \"a\";   let b = \"b\"; }<\/code><\/pre>\n<pre><code class=\"cpp\">%> v8-debug --print-scopes test.js Global scope: global { \/\/ (0x7fcdfd010430) (0, 1510)   \/\/ will be compiled   \/\/ NormalFunction   \/\/ 3 stack slots   \/\/ temporary vars:   TEMPORARY .result;  \/\/ (0x7fcdfd010ef0) local[0]   \/\/ local vars:   VAR a;  \/\/ (0x7fcdfd010d00)      block { \/\/ (0x7fcdfd010770) (4, 61)     \/\/ local vars:     LET i;  \/\/ (0x7fcdfd0108e8) local[1], hole initialization elided          block { \/\/ (0x7fcdfd010b60) (28, 61)       \/\/ local vars:       LET b;  \/\/ (0x7fcdfd010dc0) local[2], never assigned, hole initialization elided     }   } }<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0434\u0432\u0430\u00a0<u>BLOCK_SCOPE<\/u>, \u043f\u0435\u0440\u0432\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0445\u0440\u0430\u043d\u0438\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0446\u0438\u043a\u043b\u0430\u00a0<code>i<\/code>, \u0430 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0431\u043b\u043e\u0447\u043d\u0443\u044e \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0442\u0435\u043b\u0430 \u0446\u0438\u043a\u043b\u0430.<\/p>\n<p>\u0418 \u0435\u0449\u0435 \u043e\u0434\u043d\u0430 \u0431\u043b\u043e\u0447\u043d\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u00a0<code>switch (tag) { cases }<\/code><\/p>\n<pre><code class=\"javascript\">switch (tag) \/* start position -> *\/{ cases }\/* &lt;- end postion *\/<\/code><\/pre>\n<p>\u041d\u0430\u0447\u0430\u043b\u043e \u043e\u0431\u043b\u0430\u0441\u0442\u0438 &#8212; \u043f\u0435\u0440\u0432\u0430\u044f \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0444\u0438\u0433\u0443\u0440\u043d\u0430\u044f \u0441\u043a\u043e\u0431\u043a\u0430, \u043a\u043e\u043d\u0435\u0446 &#8212; \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0444\u0438\u0433\u0443\u0440\u043d\u0430\u044f \u0441\u043a\u043e\u0431\u043a\u0430.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"javascript\">var a = \"\";  switch (a) {   default:     let b = \"b\";     break; }<\/code><\/pre>\n<pre><code class=\"cpp\">%> v8-debug --print-scopes test.js Global scope: global { \/\/ (0x7fd4a1033230) (0, 1590)   \/\/ will be compiled   \/\/ NormalFunction   \/\/ 3 stack slots   \/\/ temporary vars:   TEMPORARY .switch_tag;  \/\/ (0x7fd4a10337a8) local[0]   TEMPORARY .result;  \/\/ (0x7fd4a10338e8) local[1]   \/\/ local vars:   VAR a;  \/\/ (0x7fd4a1033450)      block { \/\/ (0x7fd4a1033538) (13, 66)     \/\/ local vars:     LET b;  \/\/ (0x7fd4a10336b0) local[2], never assigned, hole initialization elided   } }<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <code>b<\/code> \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043d\u044b\u0445 \u0441\u043a\u043e\u0431\u043e\u043a \u0431\u043b\u043e\u043a\u0430\u00a0<code>switch<\/code>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d\u0430 \u0437\u0430\u0434\u0435\u043a\u043b\u0430\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u044d\u0442\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438.<\/p>\n<h3>WITH_SCOPE<\/h3>\n<p>\u041d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435, \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u00a0<code>with (obj) stmt<\/code>\u00a0\u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0435 \u0447\u0430\u0441\u0442\u043e, \u043d\u043e \u044f \u043d\u0435 \u043c\u043e\u0433\u0443 \u043e \u043d\u0435\u0439 \u043d\u0435 \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u043b\u044f \u043d\u0435\u0451 \u0442\u043e\u0436\u0435 \u0432\u044b\u0434\u0435\u043b\u0435\u043d \u0441\u0432\u043e\u0439 \u0442\u0438\u043f Scope.<\/p>\n<pre><code class=\"javascript\">with (obj) stmt<\/code><\/pre>\n<p>\u041d\u0430\u0447\u0430\u043b\u043e\u043c \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0432\u044b\u0439 \u0442\u043e\u043a\u0435\u043d\u00a0<code>stmt<\/code>, \u043a\u043e\u043d\u0446\u043e\u043c &#8212; \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0442\u043e\u043a\u0435\u043d\u00a0<code>stmt<\/code>.<\/p>\n<pre><code class=\"javascript\">var obj = {   prop1: \"prop1\" };  with (obj)   prop1 = \"prop2\";    console.log(obj.prop1); \/\/ &lt;- \"prop2\"<\/code><\/pre>\n<pre><code class=\"cpp\">%> v8-debug --print-scopes test.js Global scope: global { \/\/ (0x7fea4480ee30) (0, 1447)   \/\/ will be compiled   \/\/ NormalFunction   \/\/ 1 stack slots   \/\/ temporary vars:   TEMPORARY .result;  \/\/ (0x7fea4480f650) local[0]   \/\/ local vars:   VAR obj;  \/\/ (0x7fea4480f050)   \/\/ dynamic vars:   DYNAMIC_GLOBAL console;  \/\/ (0x7fea4480f730) never assigned      with { \/\/ (0x7fea4480f370) (46, 62)     \/\/ 3 heap slots     \/\/ dynamic vars:     DYNAMIC prop1;  \/\/ (0x7fea4480f790) lookup   } }<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0432\u0438\u0434\u0438\u043c\u043e, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f\u00a0<code>prop1<\/code>\u00a0(\u043a\u043e\u0442\u043e\u0440\u0430\u044f, \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u00a0<code>obj<\/code>) \u0437\u0430\u0434\u0435\u043a\u043b\u0430\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u0432\u00a0<u>WITH_SCOPE<\/u>\u00a0\u043a\u0430\u043a \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0430\u044f (\u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0430\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u0435\u0451 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u0435\u043d\u043e \u0431\u0435\u0437 \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430\u00a0<code>var<\/code>,\u00a0<code>let<\/code>\u00a0\u0438\u043b\u0438\u00a0<code>const<\/code>).<\/p>\n<h3>SHADOW_REALM_SCOPE<\/h3>\n<p>\u041e\u0431\u043b\u0430\u0441\u0442\u044c \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e\u00a0<a href=\"https:\/\/tc39.es\/proposal-shadowrealm\/\" rel=\"noopener noreferrer nofollow\">ShadowRealm<\/a>. \u0424\u0438\u0447\u0430 \u0431\u044b\u043b\u0430 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0430 \u0432 2022 \u0433\u043e\u0434\u0443 \u0438 \u043f\u043e\u043a\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0441\u0442\u0430\u0442\u0443\u0441\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439.<\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043c\u043e\u0442\u0438\u0432\u0430\u0446\u0438\u044f &#8212; \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e, \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0445 \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432. \u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c Realms (\u043c\u0438\u0440\u044b). \u0420\u0430\u043d\u0435\u0435 \u0442\u0430\u043a\u0430\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u043c\u0435\u043b\u0430\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0443 &#171;\u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u0435\u043b\u0435\u0439&#187; (embedders), \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0443 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u0435\u0439 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u0432, \u0447\u0435\u0440\u0435\u0437 API \u0434\u0432\u0438\u0436\u043a\u0430. \u0421\u0435\u0439\u0447\u0430\u0441 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0434\u0430\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438 JS-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c.<\/p>\n<pre><code class=\"javascript\">\/\/ test.mjs import { myRealmFunction } from \".\/realm.mjs\";  var realm = new ShadowRealm();  realm.importValue(\"realm.mjs\", \"myRealmFunction\").then((myRealmFunction) => {});<\/code><\/pre>\n<pre><code class=\"javascript\">\/\/ realm.mjs export function myRealmFunction() {}<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438 \u0444\u0438\u0447\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0444\u043b\u0430\u0433\u00a0<code>--harmony-shadow-realm<\/code><\/p>\n<pre><code class=\"cpp\">%> v8-debug --print-scopes --harmony-shadow-realm test.mjs V8 is running with experimental features enabled. Stability and security will suffer. Global scope: module { \/\/ (0x7faddd810c20) (0, 1231)   \/\/ strict mode scope   \/\/ will be compiled   \/\/ Module   \/\/ 3 stack slots   \/\/ 3 heap slots   \/\/ temporary vars:   TEMPORARY .generator_object;  \/\/ (0x7faddd810eb8) local[0], never assigned   TEMPORARY .result;  \/\/ (0x7faddd811558) local[2]   \/\/ local vars:   CONST myRealmFunction;  \/\/ (0x7faddd810f60) module, never assigned   VAR realm;  \/\/ (0x7faddd811090) local[1]      arrow (myRealmFunction) { \/\/ (0x7faddd811218) (135, 158)     \/\/ strict mode scope     \/\/ ArrowFunction     \/\/ local vars:     VAR myRealmFunction;  \/\/ (0x7faddd8113f0) parameter[0], never assigned   } } Inner function scope: function myRealmFunction () { \/\/ (0x7faddd811f38) (31, 36)   \/\/ strict mode scope   \/\/ NormalFunction   \/\/ 2 heap slots } Global scope: module { \/\/ (0x7faddd811c20) (0, 37)   \/\/ strict mode scope   \/\/ will be compiled   \/\/ Module   \/\/ 2 stack slots   \/\/ 3 heap slots   \/\/ temporary vars:   TEMPORARY .generator_object;  \/\/ (0x7faddd811eb8) local[0], never assigned   TEMPORARY .result;  \/\/ (0x7faddd812210) local[1]   \/\/ local vars:   LET myRealmFunction;  \/\/ (0x7faddd8120f8) module      function myRealmFunction () { \/\/ (0x7faddd811f38) (31, 36)     \/\/ strict mode scope     \/\/ lazily parsed     \/\/ NormalFunction     \/\/ 2 heap slots   } }<\/code><\/pre>\n<p>Scope \u0434\u043b\u044f\u00a0<strong>ShadowRealm<\/strong>\u00a0\u043f\u043e\u043a\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442, \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u044b\u0439\u00a0<u>MODULE_SCOPE<\/u>, \u0447\u0442\u043e \u043b\u043e\u0433\u0438\u0447\u043d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u0444\u0438\u0447\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438. \u0410 \u043f\u043e\u0442\u043e\u043c\u0443, \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u044d\u0442\u043e\u0439 Realm-\u0430 \u0432 \u0438\u0442\u043e\u0433\u043e\u0432\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435 &#8212; \u043f\u043e\u043a\u0430 \u043f\u0440\u0435\u0436\u0434\u0435\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e.<\/p>\n<h2>Allocate<\/h2>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0434\u0435\u043a\u043b\u0430\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432\u00a0<u>Scope<\/u>\u00a0\u043d\u0430\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0441\u0442\u0430\u0434\u0438\u044f \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438. \u041f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u044d\u0442\u043e \u0432 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0418\u0437 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043c\u044b \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0434\u0432\u0430 \u043d\u0435\u043a\u0438\u0445 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0445 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.\u00a0<strong>Stack<\/strong>\u00a0\u0438\u00a0<strong>Heap<\/strong>\u00a0(\u043a\u0443\u0447\u0430).<\/p>\n<p><strong>Heap<\/strong>, \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u0421\u044e\u0434\u0430 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442:<\/p>\n<ul>\n<li>\n<p>\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043a \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0435\u0441\u0442\u044c \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0438\u0437 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0433\u043e Scope<\/p>\n<\/li>\n<li>\n<p>\u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c, \u0447\u0442\u043e \u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u0438\u0437 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0438\u043b\u0438 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0433\u043e Scope (\u0447\u0435\u0440\u0435\u0437\u00a0<code>eval<\/code>\u00a0\u0438\u043b\u0438 runtime c \u043f\u043e\u0438\u0441\u043a\u043e\u043c)<\/p>\n<\/li>\n<\/ul>\n<p>\u041a \u043d\u0438\u043c \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f:<\/p>\n<ul>\n<li>\n<p>\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432\u00a0<u>CATCH_SCOPE<\/u><\/p>\n<\/li>\n<li>\n<p>\u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u044f\u0445\u00a0<u>SCRIPT_SCOPE<\/u>\u00a0\u0438\u00a0<u>EVAL_SCOPE<\/u>\u00a0\u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0442\u0438\u043f\u043e\u0432\u00a0<u>kLet<\/u>\u00a0\u0438\u00a0<u>kConst<\/u><\/p>\n<\/li>\n<li>\n<p>\u043d\u0435 \u0430\u043b\u043b\u043e\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435<\/p>\n<\/li>\n<li>\n<p>\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0438\u0435 \u043f\u043e\u0438\u0441\u043a\u0430 (\u0432\u0441\u0435 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0442\u0438\u043f\u044b)<\/p>\n<\/li>\n<li>\n<p>\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u043e\u0434\u0443\u043b\u044f<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u00a0Stack\u00a0\u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442:<\/p>\n<ul>\n<li>\n<p>\u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0442\u0438\u043f\u0430\u00a0<u>kTemporary<\/u>\u00a0(\u0441\u043a\u0440\u044b\u0442\u044b\u0435)<\/p>\n<\/li>\n<li>\n<p>\u0432\u0441\u0451, \u0447\u0442\u043e \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0432 Heap<\/p>\n<\/li>\n<\/ul>\n<hr\/>\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0434\u0432\u0438\u0436\u043a\u0435 V8. \u0421\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043e\u0431\u044a\u0435\u043c\u043d\u043e\u0439, \u043d\u043e, \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439.<\/p>\n<p>\u042d\u0442\u0443 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u043e\u0438 \u0441\u0442\u0430\u0442\u044c\u0438, \u0442\u0430\u043a \u0436\u0435, \u0447\u0438\u0442\u0430\u0439\u0442\u0435 \u0432 \u043c\u043e\u0435\u043c \u043a\u0430\u043d\u0430\u043b\u0435<\/p>\n<p>RU:\u00a0<a href=\"https:\/\/t.me\/frontend_almanac_ru\" rel=\"noopener noreferrer nofollow\">https:\/\/t.me\/frontend_almanac_ru<\/a><br \/>EN:\u00a0<a href=\"https:\/\/t.me\/frontend_almanac\" rel=\"noopener noreferrer nofollow\">https:\/\/t.me\/frontend_almanac<\/a><\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/782690\/\"> https:\/\/habr.com\/ru\/articles\/782690\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><em>\u0423\u0440\u043e\u0432\u0435\u043d\u044c:\u00a0<u>Senior<\/u>,\u00a0<u>Senior+<\/u><\/em><\/p>\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435\u00a0<a href=\"https:\/\/habr.com\/ru\/articles\/774548\/\" rel=\"noopener noreferrer nofollow\">\u0413\u043b\u0443\u0431\u043e\u043a\u0438\u0439 JS. \u0412 \u043f\u0430\u043c\u044f\u0442\u044c \u0438 \u0442\u0438\u043f\u0430\u0445 \u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/a>\u00a0\u043c\u044b \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u0438 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u0432\u0438\u0436\u043a\u0430 V8. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0442\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0433\u0434\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0438 \u043a\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0432 \u043f\u0430\u043c\u044f\u0442\u044c.<\/p>\n<p>\u041a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e, \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e, \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438, \u0432\u0435\u0440\u0441\u0438\u044e \u0434\u0432\u0438\u0436\u043a\u0430 (<a href=\"https:\/\/chromium.googlesource.com\/v8\/v8.git\/+\/refs\/tags\/12.2.136\" rel=\"noopener noreferrer nofollow\">12.2.136<\/a>).<\/p>\n<h2>\u0410\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u0435 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e (\u0410\u0421\u0414)<\/h2>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043c\u044b \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c, \u0441\u0442\u043e\u0438\u0442 \u043f\u0430\u0440\u0443 \u0441\u043b\u043e\u0432 \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u0442\u043e\u043c, \u043e\u0442\u043a\u0443\u0434\u0430 \u0432\u043e\u043e\u0431\u0449\u0435 V8 \u0438\u0445 \u0431\u0435\u0440\u0435\u0442. \u0412\u0435\u0434\u044c \u043a\u043e\u0434 JavaScript, \u043a\u0430\u043a \u0438 \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 \u043a\u043e\u0434 &#8212; \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c, \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0434\u043b\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0432\u043e\u0441\u043f\u0440\u0438\u044f\u0442\u0438\u044f \u0442\u0435\u043a\u0441\u0442. \u041a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0430\u0440\u0441\u0438\u0442\u0441\u044f \u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043c\u0430\u0448\u0438\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 (\u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439 \u0443\u0436\u0435 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0439 \u0441\u0440\u0435\u0434\u0435, \u0430 \u043d\u0435 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0443).<\/p>\n<p>\u0422\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u043e, \u044f\u0437\u044b\u043a\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0430\u0440\u0441\u044f\u0442 \u0442\u0435\u043a\u0441\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0438 \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e\u0442 \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u00a0<a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%90%D0%B1%D1%81%D1%82%D1%80%D0%B0%D0%BA%D1%82%D0%BD%D0%BE%D0%B5_%D1%81%D0%B8%D0%BD%D1%82%D0%B0%D0%BA%D1%81%D0%B8%D1%87%D0%B5%D1%81%D0%BA%D0%BE%D0%B5_%D0%B4%D0%B5%D1%80%D0%B5%D0%B2%D0%BE\" rel=\"noopener noreferrer nofollow\">\u0410\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u0435 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e<\/a>\u00a0\u0438\u043b\u0438 \u0410\u0421\u0414 (AST \u0432 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u043e\u043c \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435). \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 V8 \u043d\u0435 \u0441\u0442\u0430\u043b\u0438 \u0437\u0434\u0435\u0441\u044c \u0438\u0437\u043e\u0431\u0440\u0435\u0442\u0430\u0442\u044c \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434 \u0438 \u043f\u043e\u0448\u043b\u0438 \u043f\u043e \u0442\u043e\u043c\u0443 \u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u043c\u0443 \u043f\u0443\u0442\u0438.<\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u0432 \u043d\u0430 \u0432\u0445\u043e\u0434 \u0444\u0430\u0439\u043b \u0438\u043b\u0438 \u0441\u0442\u0440\u043e\u043a\u0443, \u0434\u0432\u0438\u0436\u043e\u043a \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u0442 \u0442\u0435\u043a\u0441\u0442 \u0438 \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0432 \u0434\u0435\u0440\u0435\u0432\u043e \u0410\u0421\u0414.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u0434 \u0434\u043b\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0415\u0432\u043a\u043b\u0438\u0434\u0430<\/p>\n<pre><code class=\"javascript\">while (b !== 0)   if (a > b) a = a - b   else b = b - a;<\/code><\/pre>\n<p>\u0412 \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0435\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a<\/p>\n<pre><code class=\"bash\">%> v8-debug --print-ast test.js [generating bytecode for function: ] --- AST --- FUNC at 0 . KIND 0 . LITERAL ID 0 . SUSPEND COUNT 0 . NAME \"\" . INFERRED NAME \"\" . BLOCK at -1 . . EXPRESSION STATEMENT at -1 . . . ASSIGN at -1 . . . . VAR PROXY local[0] (0x7fe71480ba60) (mode = TEMPORARY, assigned = true) \".result\" . . . . LITERAL undefined . . WHILE at 0 . . . COND at 9 . . . . NOT at 9 . . . . . EQ_STRICT at 9 . . . . . . VAR PROXY unallocated (0x7fe71480bbd0) (mode = DYNAMIC_GLOBAL, assigned = true) \"b\" . . . . . . LITERAL 0 . . . BODY at 18 . . . . IF at 18 . . . . . CONDITION at 24 . . . . . . GT at 24 . . . . . . . VAR PROXY unallocated (0x7fe71480bc00) (mode = DYNAMIC_GLOBAL, assigned = true) \"a\" . . . . . . . VAR PROXY unallocated (0x7fe71480bbd0) (mode = DYNAMIC_GLOBAL, assigned = true) \"b\" . . . . . THEN at 29 . . . . . . EXPRESSION STATEMENT at 29 . . . . . . . ASSIGN at -1 . . . . . . . . VAR PROXY local[0] (0x7fe71480ba60) (mode = TEMPORARY, assigned = true) \".result\" . . . . . . . . ASSIGN at 31 . . . . . . . . . VAR PROXY unallocated (0x7fe71480bc00) (mode = DYNAMIC_GLOBAL, assigned = true) \"a\" . . . . . . . . . SUB at 35 . . . . . . . . . . VAR PROXY unallocated (0x7fe71480bc00) (mode = DYNAMIC_GLOBAL, assigned = true) \"a\" . . . . . . . . . . VAR PROXY unallocated (0x7fe71480bbd0) (mode = DYNAMIC_GLOBAL, assigned = true) \"b\" . . . . . ELSE at 46 . . . . . . EXPRESSION STATEMENT at 46 . . . . . . . ASSIGN at -1 . . . . . . . . VAR PROXY local[0] (0x7fe71480ba60) (mode = TEMPORARY, assigned = true) \".result\" . . . . . . . . ASSIGN at 48 . . . . . . . . . VAR PROXY unallocated (0x7fe71480bbd0) (mode = DYNAMIC_GLOBAL, assigned = true) \"b\" . . . . . . . . . SUB at 52 . . . . . . . . . . VAR PROXY unallocated (0x7fe71480bbd0) (mode = DYNAMIC_GLOBAL, assigned = true) \"b\" . . . . . . . . . . VAR PROXY unallocated (0x7fe71480bc00) (mode = DYNAMIC_GLOBAL, assigned = true) \"a\" . RETURN at -1 . . VAR PROXY local[0] (0x7fe71480ba60) (mode = TEMPORARY, assigned = true) \".result\"<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0443\u0437\u043b\u044b (\u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0434\u0435\u0440\u0435\u0432\u0430), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b, \u0438 \u043a\u043e\u043d\u0446\u0435\u0432\u044b\u0435 \u0443\u0437\u043b\u044b (\u043b\u0438\u0441\u0442\u044c\u044f \u0434\u0435\u0440\u0435\u0432\u0430), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435.<\/p>\n<p>\u0423\u0436\u0435 \u043d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u0434\u0435\u043a\u043b\u0430\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043d\u043e \u043f\u0430\u043c\u044f\u0442\u044c \u043f\u043e\u0434 \u043d\u0438\u0445 \u0435\u0449\u0435 \u043d\u0435 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0430. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u0430\u043a\u043e\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432 \u0410\u0421\u0414 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u043a\u0438\u0439\u00a0<strong>VariableProxy<\/strong>\u00a0\u0443\u0437\u0435\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0432 \u043f\u0430\u043c\u044f\u0442\u0438. \u041f\u0440\u0438 \u0447\u0435\u043c, \u0442\u0430\u043a\u0438\u0445\u00a0<strong>VariableProxy<\/strong>\u00a0\u043d\u0430 \u043e\u0434\u043d\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043c\u043e\u0436\u0435\u0442 \u0441\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f \u0441\u0440\u0430\u0437\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e. \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c \u043f\u043e\u0437\u0436\u0435 \u0438 \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u043c\u0435\u0441\u0442\u0435, \u0432 Scope (\u043e\u0431 \u044d\u0442\u043e\u043c \u0447\u0443\u0442\u044c \u043d\u0438\u0436\u0435), \u0430\u00a0<strong>VariableProxy<\/strong>\u00a0&#8212; \u0441\u0432\u043e\u0435\u0433\u043e \u0440\u043e\u0434\u0430 \u0441\u0441\u044b\u043b\u043a\u0430-\u043f\u043b\u0435\u0439\u0441\u0445\u043e\u043b\u0434\u0435\u0440. \u041d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0410\u0421\u0414 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c \u043d\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f, \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u0440\u0435\u0437\u00a0<strong>VariableProxy<\/strong>.<\/p>\n<h2>VariableMode<\/h2>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f \u0441 \u0442\u0435\u043c, \u043a\u0430\u043a\u0438\u0445 \u0442\u0438\u043f\u043e\u0432 \u0431\u044b\u0432\u0430\u044e\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 V8. \u0423\u0441\u043b\u043e\u0432\u043d\u043e, \u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430 \u0442\u0440\u0438 \u0433\u0440\u0443\u043f\u043f\u044b<\/p>\n<h4>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u043e\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435<\/h4>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u044f\u0432\u043d\u044b\u043c (\u0438\u043b\u0438 \u043d\u0435\u044f\u0432\u043d\u044b\u043c) \u043e\u0431\u0440\u0430\u0437\u043e\u043c. \u0422\u0430\u043a\u0438\u0445 \u0432\u0441\u0435\u0433\u043e \u0442\u0440\u0438<\/p>\n<ul>\n<li>\n<p><u>kLet<\/u>\u00a0&#8212; \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0435\u043a\u0441\u0435\u043c\u043e\u0439 &#171;let&#187;<\/p>\n<\/li>\n<li>\n<p><u>kConst<\/u>\u00a0&#8212; \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0435\u043a\u0441\u0435\u043c\u043e\u0439 &#171;const&#187;<\/p>\n<\/li>\n<li>\n<p><u>kVar<\/u>\u00a0&#8212; \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0435\u043a\u0441\u0435\u043c\u0430\u043c\u0438 &#171;var&#187; \u0438 &#171;function&#187;<\/p>\n<\/li>\n<\/ul>\n<h4>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430<\/h4>\n<p>\u041a \u043d\u0438\u043c \u043e\u0442\u043d\u043e\u0441\u044f\u0442 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 &#8212; \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043d\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u044f\u0432\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c<\/p>\n<ul>\n<li>\n<p><u>kTemporary<\/u>\u00a0&#8212; \u043d\u0435 \u0432\u0438\u0434\u043d\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e, \u0436\u0438\u0432\u0435\u0442 \u0432 \u0441\u0442\u044d\u043a\u0435<\/p>\n<\/li>\n<li>\n<p><u>kDynamic<\/u>\u00a0&#8212; \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435\/\u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043d\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430, \u0432\u0441\u0435\u0433\u0434\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u043e\u0438\u0441\u043a\u0430<\/p>\n<\/li>\n<li>\n<p><u>kDynamicGlobal<\/u>\u00a0&#8212; \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435\/\u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043d\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430, \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u043e\u0438\u0441\u043a\u0430, \u043d\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u0430\u044f<\/p>\n<\/li>\n<li>\n<p><u>kDynamicLocal<\/u>\u00a0&#8212; \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435\/\u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043d\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430, \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u043e\u0438\u0441\u043a\u0430, \u043d\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"javascript\">a = \"a\"; \/\/ \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e DYNAMIC_GLOBAL a; <\/code><\/pre>\n<h4>\u041a\u043b\u0430\u0441\u0441\u043e\u0432\u044b\u0435 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435<\/h4>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0438 \u0430\u043a\u0441\u0435\u0441\u0441\u043e\u0440\u043e\u0432. \u0422\u0440\u0435\u0431\u0443\u044e\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u0440\u0430\u0432 \u0438 \u0436\u0438\u0432\u0443\u0442 \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u043a\u043b\u0430\u0441\u0441\u0430.<\/p>\n<ul>\n<li>\n<p><u>kPrivateMethod<\/u>\u00a0&#8212; \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u0434\u043d\u043e\u043c Scope \u0441 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0441 \u0442\u0430\u043a\u0438\u043c \u0436\u0435 \u0438\u043c\u0435\u043d\u0435\u043c<\/p>\n<\/li>\n<li>\n<p><u>kPrivateSetterOnly<\/u>\u00a0&#8212; \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u0434\u043d\u043e\u043c Scope \u0441 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0441 \u0442\u0430\u043a\u0438\u043c \u0436\u0435 \u0438\u043c\u0435\u043d\u0435\u043c, \u043a\u0440\u043e\u043c\u0435\u00a0<u>kPrivateGetterOnly<\/u><\/p>\n<\/li>\n<li>\n<p><u>kPrivateGetterOnly<\/u>\u00a0&#8212; \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u0434\u043d\u043e\u043c Scope \u0441 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0441 \u0442\u0430\u043a\u0438\u043c \u0436\u0435 \u0438\u043c\u0435\u043d\u0435\u043c, \u043a\u0440\u043e\u043c\u0435\u00a0<u>kPrivateSetterOnly<\/u><\/p>\n<\/li>\n<li>\n<p><u>kPrivateGetterAndSetter<\/u>\u00a0&#8212; \u0435\u0441\u043b\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0434\u0432\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435\u00a0<u>kPrivateSetterOnly<\/u>\u00a0\u0438\u00a0<u>kPrivateGetterOnly<\/u>\u00a0\u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c \u0438\u043c\u0435\u043d\u0435\u043c, \u043e\u043d\u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u043e\u0434\u043d\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0441 \u044d\u0442\u0438\u043c \u0442\u0438\u043f\u043e\u043c<\/p>\n<\/li>\n<\/ul>\n<p><a href=\"https:\/\/chromium.googlesource.com\/v8\/v8.git\/+\/refs\/tags\/12.2.136\/src\/common\/globals.h#1718\" rel=\"noopener noreferrer nofollow\">src\/common\/globals.h#1718<\/a><\/p>\n<pre><code class=\"cpp\">\/\/ The order of this enum has to be kept in sync with the predicates below. enum class VariableMode : uint8_t {   \/\/ User declared variables:   kLet,  \/\/ declared via 'let' declarations (first lexical)      kConst,  \/\/ declared via 'const' declarations (last lexical)      kVar,  \/\/ declared via 'var', and 'function' declarations      \/\/ Variables introduced by the compiler:   kTemporary,  \/\/ temporary variables (not user-visible), stack-allocated                \/\/ unless the scope as a whole has forced context allocation      kDynamic,  \/\/ always require dynamic lookup (we don't know              \/\/ the declaration)      kDynamicGlobal,  \/\/ requires dynamic lookup, but we know that the                    \/\/ variable is global unless it has been shadowed                    \/\/ by an eval-introduced variable      kDynamicLocal,  \/\/ requires dynamic lookup, but we know that the                   \/\/ variable is local and where it is unless it                   \/\/ has been shadowed by an eval-introduced                   \/\/ variable    \/\/ Variables for private methods or accessors whose access require   \/\/ brand check. Declared only in class scopes by the compiler   \/\/ and allocated only in class contexts:   kPrivateMethod,  \/\/ Does not coexist with any other variable with the same                    \/\/ name in the same scope.    kPrivateSetterOnly,  \/\/ Incompatible with variables with the same name but                        \/\/ any mode other than kPrivateGetterOnly. Transition to                        \/\/ kPrivateGetterAndSetter if a later declaration for the                        \/\/ same name with kPrivateGetterOnly is made.    kPrivateGetterOnly,  \/\/ Incompatible with variables with the same name but                        \/\/ any mode other than kPrivateSetterOnly. Transition to                        \/\/ kPrivateGetterAndSetter if a later declaration for the                        \/\/ same name with kPrivateSetterOnly is made.    kPrivateGetterAndSetter,  \/\/ Does not coexist with any other variable with the                             \/\/ same name in the same scope.    kLastLexicalVariableMode = kConst, };<\/code><\/pre>\n<h2>Isolate<\/h2>\n<p>\u0415\u0449\u0435 \u043e\u0434\u0438\u043d \u0432\u0430\u0436\u043d\u044b\u0439 \u0430\u0441\u043f\u0435\u043a\u0442 V8 &#8212;\u00a0<strong>Isolate<\/strong>.\u00a0<strong>Isolate<\/strong>\u00a0&#8212; \u044d\u0442\u043e \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0434\u0432\u0438\u0436\u043a\u0430. \u0418\u043c\u0435\u043d\u043d\u043e \u0437\u0434\u0435\u0441\u044c \u0438 \u0431\u0443\u0434\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0434\u0432\u0438\u0436\u043a\u0430. \u0412\u0441\u0435, \u0447\u0442\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e\u00a0<strong>Isolate<\/strong>, \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0434\u0440\u0443\u0433\u043e\u043c\u00a0<strong>Isolate<\/strong>. \u0421\u0430\u043c\u00a0<strong>Isolate<\/strong>\u00a0\u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0442\u043e\u043a\u043e-\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u043c. \u0422.\u0435. \u043a \u043d\u0435\u043c\u0443 \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u043f\u043e\u0442\u043e\u043a. \u0414\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 &#171;\u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u0435\u043b\u044f&#187; (Embedder), \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430, \u043a\u043e\u043c\u0430\u043d\u0434\u0430 V8 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u00a0<u>Locker\/Unlocker API<\/u>. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u00a0<strong>Isolate<\/strong>\u00a0\u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c, \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0442\u0430\u0431 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u0438\u043b\u0438\u00a0<a href=\"https:\/\/developer.mozilla.org\/ru\/docs\/Web\/API\/Worker\" rel=\"noopener noreferrer nofollow\">Worker<\/a>.<\/p>\n<h2>Scope<\/h2>\n<p>\u0412 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438\u00a0<a href=\"https:\/\/tc39.es\/ecma262\/#sec-ecmascript-language-statements-and-declarations\" rel=\"noopener noreferrer nofollow\">ECMAScript<\/a>\u00a0\u043f\u043e\u043d\u044f\u0442\u0438\u0435 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437\u043c\u044b\u0442\u043e, \u043d\u043e \u043c\u044b \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0430\u043b\u043b\u043e\u0446\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0442\u0430\u043a\u0438\u0445 \u043e\u0431\u043b\u0430\u0441\u0442\u0435\u0439. \u0412 V8 \u044d\u0442\u0430 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f\u00a0Scope. \u0412\u0441\u0435\u0433\u043e, \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442, \u0438\u0445 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043e 9<\/p>\n<ul>\n<li>\n<p><u>CLASS_SCOPE<\/u>\u00a0&#8212; \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u0430<\/p>\n<\/li>\n<li>\n<p><u>EVAL_SCOPE<\/u>\u00a0&#8212; \u0432\u0435\u0440\u0445\u043d\u0435\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0434\u043b\u044f eval<\/p>\n<\/li>\n<li>\n<p><u>FUNCTION_SCOPE<\/u>\u00a0&#8212; \u0432\u0435\u0440\u0445\u043d\u0435\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0444\u0443\u043a\u043d\u0446\u0438\u0438<\/p>\n<\/li>\n<li>\n<p><u>MODULE_SCOPE<\/u>\u00a0&#8212; \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044f<\/p>\n<\/li>\n<li>\n<p><u>SCRIPT_SCOPE<\/u>\u00a0&#8212; \u0432\u0435\u0440\u0445\u043d\u0435\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u0430 (&lt;script>) \u0438\u043b\u0438 \u0441\u0430\u043c\u043e\u0433\u043e \u0432\u0435\u0440\u0445\u043d\u0435\u0433\u043e eval<\/p>\n<\/li>\n<li>\n<p><u>CATCH_SCOPE<\/u>\u00a0&#8212; \u043e\u0431\u043b\u0430\u0441\u0442\u044c catch (\u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435\u00a0<code>try {} catch(e) {}<\/code>)<\/p>\n<\/li>\n<li>\n<p><u>BLOCK_SCOPE<\/u>\u00a0&#8212; \u0431\u043b\u043e\u0447\u043d\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c (\u0432\u043d\u0443\u0442\u0440\u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043d\u044b\u0445 \u0441\u043a\u043e\u0431\u043e\u043a)<\/p>\n<\/li>\n<li>\n<p><u>WITH_SCOPE<\/u>\u00a0&#8212; \u043e\u0431\u043b\u0430\u0441\u0442\u044c with (\u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435\u00a0<code>with (stm) {}<\/code>)<\/p>\n<\/li>\n<li>\n<p><u>SHADOW_REALM_SCOPE<\/u>\u00a0&#8212; \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 ShadowRealm\u00a0<\/p>\n<\/li>\n<\/ul>\n<p><a href=\"https:\/\/chromium.googlesource.com\/v8\/v8.git\/+\/refs\/tags\/12.2.136\/src\/common\/globals.h#1649\" rel=\"noopener noreferrer nofollow\">src\/common\/globals.h#1649<\/a><\/p>\n<pre><code class=\"cpp\">enum ScopeType : uint8_t {   CLASS_SCOPE,        \/\/ The scope introduced by a class.   EVAL_SCOPE,         \/\/ The top-level scope for an eval source.   FUNCTION_SCOPE,     \/\/ The top-level scope for a function.   MODULE_SCOPE,       \/\/ The scope introduced by a module literal   SCRIPT_SCOPE,       \/\/ The top-level scope for a script or a top-level eval.   CATCH_SCOPE,        \/\/ The scope introduced by catch   BLOCK_SCOPE,        \/\/ The scope introduced by a new block.   WITH_SCOPE,         \/\/ The scope introduced by with.   SHADOW_REALM_SCOPE  \/\/ Synthetic scope for ShadowRealm NativeContexts. };<\/code><\/pre>\n<p>\u041f\u043e\u043c\u0438\u043c\u043e \u044d\u0442\u0438\u0445 \u0434\u0435\u0432\u044f\u0442\u0438 \u0442\u0438\u043f\u043e\u0432 \u0435\u0441\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d &#8212; \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 (<strong>Global Scope<\/strong>), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0430 \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u0443\u0440\u043e\u0432\u043d\u0435\u00a0<strong>Isolate<\/strong>\u00a0\u0438 \u0445\u0440\u0430\u043d\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u0438. \u0418\u043c\u0435\u043d\u043d\u043e \u043d\u0430 \u044d\u0442\u0443 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0438 \u0431\u0443\u0434\u0435\u0442 \u0441\u0441\u044b\u043b\u0430\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442\u00a0Window\u00a0\u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435.<\/p>\n<p>\u0422\u0430\u043a \u0433\u0434\u0435 \u0436\u0435 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u0442\u043e\u0439 \u0438\u043b\u0438 \u0438\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438. \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u0436\u0434\u0443\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<h3>CLASS_SCOPE<\/h3>\n<p>\u0418\u0437 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-363788","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/363788","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=363788"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/363788\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=363788"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=363788"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=363788"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}