{"id":321290,"date":"2021-04-12T15:00:06","date_gmt":"2021-04-12T15:00:06","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=321290"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=321290","title":{"rendered":"\u0421\u0442\u0435\u043a \u0432\u044b\u0437\u043e\u0432\u043e\u0432 JavaScript \u0438 \u0435\u0449\u0451 \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u043c\u0430\u0433\u0438\u044f"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/uy\/yq\/oc\/uyyqoc2rgksgbx2v-pdz8rz4coa.png\"><\/p>\n<p>  \u0412 \u043d\u0430\u0447\u0430\u043b\u0435 \u0430\u043f\u0440\u0435\u043b\u044f \u043d\u0430 \u0445\u0430\u0431\u0440\u0435 \u0431\u044b\u043b\u0430 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u0430 \u0441\u0442\u0430\u0442\u044c\u044f <a href=\"https:\/\/habr.com\/ru\/post\/550534\/\">\u00abJavaScript: \u0421\u0442\u0435\u043a \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0438 \u043c\u0430\u0433\u0438\u044f \u0435\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430\u00bb<\/a> \u2014 \u0435\u0451 \u0430\u0432\u0442\u043e\u0440 \u043f\u0440\u0438\u0448\u0451\u043b \u043a \u0432\u044b\u0432\u043e\u0434\u0443, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u043a\u0430\u0434\u0440 \u0441\u0442\u0435\u043a\u0430 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 (72 + 8 * \u0447\u0438\u0441\u043b\u043e_\u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445_\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445) \u0431\u0430\u0439\u0442\u043e\u0432: <i>\u00ab\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043c\u044b \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u043b\u0438 \u0432\u0441\u0435 \u0432\u0435\u0440\u043d\u043e \u0438 \u043c\u043e\u0436\u0435\u043c \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0442\u044c, \u0447\u0442\u043e \u0440\u0430\u0437\u043c\u0435\u0440 \u043f\u0443\u0441\u0442\u043e\u0433\u043e ExecutionStack \u0432 Chrome \u0440\u0430\u0432\u0435\u043d 72 \u0431\u0430\u0439\u0442\u0430\u043c, \u0430 \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u043b\u043b\u0441\u0442\u044d\u043a\u0430 \u2014 \u0447\u0443\u0442\u044c \u043c\u0435\u043d\u044c\u0448\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u043c\u0435\u0433\u0430\u0431\u0430\u0439\u0442\u0430. \u041e\u0442\u043b\u0438\u0447\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430!\u00bb<\/i><\/p>\n<p>  \u0414\u043b\u044f \u0437\u0430\u0442\u0440\u0430\u0432\u043a\u0438 \u2014 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043c \u043a\u043e\u0434, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 <a href=\"https:\/\/habr.com\/ru\/users\/axemafr\/\" class=\"user_link\">AxemaFr<\/a> \u0434\u043b\u044f \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432:<\/p>\n<pre><code class=\"javascript\">{let i = 0;  const func = () =&gt; {   i += 1.00000000000001;   func(); };  try {   func(); } catch (e) {   console.log(i); }}<\/code><\/pre>\n<p>  \u0412\u043c\u0435\u0441\u0442\u043e 1 \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0448\u0430\u0433\u0435 \u043f\u0440\u0438\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0447\u0443\u0442\u043e\u0447\u043a\u0443 \u0431\u043e\u043b\u044c\u0448\u0435, \u0438 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432\u043c\u0435\u0441\u0442\u043e 13951 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c 12556.000000000002 \u2014 \u043a\u0430\u043a \u0431\u0443\u0434\u0442\u043e \u0431\u044b \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0430\u0441\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f! <\/p>\n<p>  \u041f\u043e\u0432\u0442\u043e\u0440\u0438\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0437\u0430\u0434\u0430\u0432\u0430\u043b\u0441\u044f Senior Frontend Developer <a href=\"https:\/\/habr.com\/ru\/users\/axemafr\/\" class=\"user_link\">AxemaFr<\/a>: <i>\u00ab\u041f\u043e\u0447\u0435\u043c\u0443 \u0436\u0435 \u0442\u0430\u043a? \u0427\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c? \u041a\u0430\u043a \u043f\u043e\u043d\u044f\u0442\u044c, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0432 \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u043e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c\u0441\u044f \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e?!\u00bb<\/i><a name=\"habracut\"><\/a><\/p>\n<h3>\u0413\u043e\u0442\u043e\u0432\u0438\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b<\/h3>\n<p>  \u0412 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 Chrome \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f JS-\u0434\u0432\u0438\u0436\u043a\u0430; \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0438 \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u0442\u0435\u043a\u0430 \u0441 984 \u041a\u0411 \u043d\u0430 \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u043a\u043b\u044e\u0447\u043e\u043c <code>--js-flags=--stack-size=<\/code>. <\/p>\n<p>  \u0420\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0442\u043e\u043c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0435\u043a\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043d\u0430\u043c \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043a\u043b\u044e\u0447 <code>--print-bytecode<\/code>, \u0443\u0436\u0435 <a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/336294\/\">\u0443\u043f\u043e\u043c\u0438\u043d\u0430\u0432\u0448\u0438\u0439\u0441\u044f \u0440\u0430\u043d\u0435\u0435<\/a>. \u041d\u0435 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b\u043e\u0441\u044c \u0442\u043e, \u0447\u0442\u043e \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 stdout, \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0443 Chrome \u043f\u043e\u0434 Windows \u0442\u0443\u043f\u043e \u043d\u0435\u0442, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d \u043a\u0430\u043a GUI-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0418\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u043e: \u0441\u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u043a\u043e\u043f\u0438\u044e chrome.exe, \u0438 \u0432 \u0441\u0432\u043e\u0451\u043c \u043b\u044e\u0431\u0438\u043c\u043e\u043c hex-\u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u044c\u0442\u0435 \u0431\u0430\u0439\u0442 <code>0xD4<\/code> \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <code>0x02<\/code> \u043d\u0430 <code>0x03<\/code> (\u0442\u0435\u043c, \u043a\u0442\u043e \u0441 hex-\u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u043e\u043c \u043d\u0435 \u0434\u0440\u0443\u0436\u0438\u0442, \u044d\u0442\u043e\u0442 \u0431\u0430\u0439\u0442 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c <a href=\"https:\/\/stackoverflow.com\/a\/11126998\/1722457\">\u0441\u043a\u0440\u0438\u043f\u0442 \u043d\u0430 Python<\/a>). \u041d\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u0440\u044f\u043c\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u0447\u0438\u0442\u0430\u0435\u0442\u0435 \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e \u0432 Chrome, \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u2014 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0432\u044b \u043d\u0430\u0437\u0432\u0430\u043b\u0438 \u0435\u0433\u043e cui_chrome.exe \u2014 \u0442\u043e \u043e\u0442\u043a\u0440\u043e\u0435\u0442\u0441\u044f \u043d\u043e\u0432\u043e\u0435 \u043e\u043a\u043d\u043e \u0432 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430, \u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 <code>--js-flags<\/code> \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u043d. \u0427\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 Chrome, \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0435\u043c\u0443 \u043a\u0430\u043a\u0443\u044e-\u043d\u0438\u0431\u0443\u0434\u044c \u043d\u043e\u0432\u0443\u044e <code>--user-data-dir<\/code>:  <\/p>\n<blockquote><p><code>cui_chrome.exe --no-sandbox --js-flags=&quot;--print-bytecode --print-bytecode-filter=func&quot; --user-data-dir=\\Windows\\Temp<\/code><\/p><\/blockquote>\n<p>  \u0411\u0435\u0437 <code>--print-bytecode-filter<\/code> \u0432\u044b \u0443\u0442\u043e\u043d\u0435\u0442\u0435 \u0432 \u043a\u0438\u043b\u043e\u043c\u0435\u0442\u0440\u043e\u0432\u044b\u0445 \u0434\u0430\u043c\u043f\u0430\u0445 \u0431\u0430\u0439\u0442\u043a\u043e\u0434\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0432 Chrome.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u043e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0438 \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u043a\u043e\u0434, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 <a href=\"https:\/\/habr.com\/ru\/users\/axemafr\/\" class=\"user_link\">AxemaFr<\/a>:<\/p>\n<pre><code class=\"javascript\">{let i = 0;  const func = () =&gt; {   i++;   func(); };  func()}<\/code><\/pre>\n<p>  \u0415\u0449\u0451 \u0434\u043e \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0432\u044b \u043d\u0430\u0436\u043c\u0451\u0442\u0435 \u043d\u0430 Enter, \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u043e\u043c \u043e\u043a\u043d\u0435 \u043f\u043e\u0437\u0430\u0434\u0438 Chrome \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0434\u0430\u043c\u043f:  <\/p>\n<blockquote>\n<pre>[generated bytecode for function: func (0x44db08635355 &lt;SharedFunctionInfo func&gt;)] Parameter count 1 Register count 1 Frame size 8    36 S&gt; 000044DB086355EE @    0 : 1a 02             LdaCurrentContextSlot [2]          000044DB086355F0 @    2 : ac 00             ThrowReferenceErrorIfHole [0]          000044DB086355F2 @    4 : 4d 00             Inc [0]          000044DB086355F4 @    6 : 26 fa             Star r0          000044DB086355F6 @    8 : 1a 02             LdaCurrentContextSlot [2]    37 E&gt; 000044DB086355F8 @   10 : ac 00             ThrowReferenceErrorIfHole [0]          000044DB086355FA @   12 : 25 fa             Ldar r0          000044DB086355FC @   14 : 1d 02             StaCurrentContextSlot [2]    44 S&gt; 000044DB086355FE @   16 : 1b 03             LdaImmutableCurrentContextSlot [3]          000044DB08635600 @   18 : ac 01             ThrowReferenceErrorIfHole [1]          000044DB08635602 @   20 : 26 fa             Star r0    44 E&gt; 000044DB08635604 @   22 : 5d fa 01          CallUndefinedReceiver0 r0, [1]          000044DB08635607 @   25 : 0d                LdaUndefined    52 S&gt; 000044DB08635608 @   26 : ab                Return Constant pool (size = 2) Handler Table (size = 0) Source Position Table (size = 12)<\/pre>\n<\/blockquote>\n<p>  \u041a\u0430\u043a \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f \u0434\u0430\u043c\u043f, \u0435\u0441\u043b\u0438 \u0441\u0442\u0440\u043e\u0447\u043a\u0443 <code>i++;<\/code> \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430 <code>i += 1.00000000000001;<\/code>?  <\/p>\n<blockquote>\n<pre>[generated bytecode for function: func (0x44db0892d495 &lt;SharedFunctionInfo func&gt;)] Parameter count 1 Register count 2 Frame size 16    36 S&gt; 000044DB0892D742 @    0 : 1a 02             LdaCurrentContextSlot [2]          000044DB0892D744 @    2 : ac 00             ThrowReferenceErrorIfHole [0]          000044DB0892D746 @    4 : 26 fa             Star r0          000044DB0892D748 @    6 : 12 01             LdaConstant [1]          000044DB0892D74A @    8 : 35 fa 00          Add r0, [0]          000044DB0892D74D @   11 : 26 f9             Star r1          000044DB0892D74F @   13 : 1a 02             LdaCurrentContextSlot [2]    37 E&gt; 000044DB0892D751 @   15 : ac 00             ThrowReferenceErrorIfHole [0]          000044DB0892D753 @   17 : 25 f9             Ldar r1          000044DB0892D755 @   19 : 1d 02             StaCurrentContextSlot [2]    60 S&gt; 000044DB0892D757 @   21 : 1b 03             LdaImmutableCurrentContextSlot [3]          000044DB0892D759 @   23 : ac 02             ThrowReferenceErrorIfHole [2]          000044DB0892D75B @   25 : 26 fa             Star r0    60 E&gt; 000044DB0892D75D @   27 : 5d fa 01          CallUndefinedReceiver0 r0, [1]          000044DB0892D760 @   30 : 0d                LdaUndefined    68 S&gt; 000044DB0892D761 @   31 : ab                Return Constant pool (size = 3) Handler Table (size = 0) Source Position Table (size = 12)<\/pre>\n<\/blockquote>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f, \u0447\u0442\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u043b\u043e\u0441\u044c \u0438 \u043f\u043e\u0447\u0435\u043c\u0443.<\/p>\n<h3>\u0418\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u044b<\/h3>\n<p>  \u0412\u0441\u0435 \u043e\u043f\u043a\u043e\u0434\u044b V8 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432 <a href=\"https:\/\/github.com\/v8\/v8\/blob\/master\/src\/interpreter\/interpreter-generator.cc\">github.com\/v8\/v8\/blob\/master\/src\/interpreter\/interpreter-generator.cc<\/a><br \/>  \u041f\u0435\u0440\u0432\u044b\u0439 \u0434\u0430\u043c\u043f \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u0430\u043a:  <\/p>\n<blockquote>\n<pre>LdaCurrentContextSlot [2]           ; a := context[2] ThrowReferenceErrorIfHole [0]       ; if (a === undefined)                                     ;   throw(&quot;ReferenceError: %s is not defined&quot;, const[0]) Inc [0]                             ; a++ Star r0                             ; r0 := a LdaCurrentContextSlot [2]           ; a := context[2] ThrowReferenceErrorIfHole [0]       ; if (a === undefined)                                     ;   throw(&quot;ReferenceError: %s is not defined&quot;, const[0]) Ldar r0                             ; a := r0 StaCurrentContextSlot [2]           ; context[2] := a LdaImmutableCurrentContextSlot [3]  ; a := context[3] ThrowReferenceErrorIfHole [1]       ; if (a === undefined)                                     ;   throw(&quot;ReferenceError: %s is not defined&quot;, const[1]) Star r0                             ; r0 := a CallUndefinedReceiver0 r0, [1]      ; r0() LdaUndefined                        ; a := undefined Return<\/pre>\n<\/blockquote>\n<p>  \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u043e\u043f\u043a\u043e\u0434\u043e\u0432 <code>Inc<\/code> \u0438 <code>CallUndefinedReceiver0<\/code> \u0437\u0430\u0434\u0430\u0451\u0442 feedback slot, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0434\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u043d\u0430\u043a\u0430\u043f\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0442\u0438\u043f\u0430\u0445. \u041d\u0430 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0443 \u0431\u0430\u0439\u0442\u043a\u043e\u0434\u0430 \u044d\u0442\u043e \u043d\u0435 \u0432\u043b\u0438\u044f\u0435\u0442, \u0442\u0430\u043a \u0447\u0442\u043e \u043d\u0430\u0441 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442.<\/p>\n<p>  \u041f\u043e\u0434 \u0434\u0430\u043c\u043f\u043e\u043c \u0435\u0441\u0442\u044c \u043f\u0440\u0438\u043f\u0438\u0441\u043a\u0430: \u00abConstant pool (size = 2)\u00bb \u2014 \u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0432 \u0431\u0430\u0439\u0442\u043a\u043e\u0434\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u0432\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u2014 <code>&quot;i&quot;<\/code> \u0438 <code>&quot;func&quot;<\/code> \u2014 \u0434\u043b\u044f \u043f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0432 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0441 \u0442\u0430\u043a\u0438\u043c\u0438 \u0438\u043c\u0435\u043d\u0430\u043c\u0438 undefined. \u0415\u0441\u0442\u044c \u043f\u0440\u0438\u043f\u0438\u0441\u043a\u0430 \u0438 \u043d\u0430\u0434 \u0434\u0430\u043c\u043f\u043e\u043c: \u00abFrame size 8\u00bb \u2014 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u0434\u0438\u043d \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u0430 (<code>r0<\/code>).<\/p>\n<p>  \u0421\u0442\u0435\u043a\u043e\u0432\u044b\u0439 \u043a\u0430\u0434\u0440 \u043d\u0430\u0448\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437: <\/p>\n<ul>\n<li>\u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 <code>this<\/code>;<\/li>\n<li>\u0430\u0434\u0440\u0435\u0441\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430;<\/li>\n<li>\u0447\u0438\u0441\u043b\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 (<code>arguments.length<\/code>);<\/li>\n<li>\u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 constant pool c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u043c\u0438 \u0441\u0442\u0440\u043e\u043a\u0430\u043c\u0438;<\/li>\n<li>\u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 context \u0441 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438;<\/li>\n<li>\u0435\u0449\u0451 \u0442\u0440\u0451\u0445 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439, \u043d\u0443\u0436\u043d\u044b\u0445 \u0434\u0432\u0438\u0436\u043a\u0443; \u0438 \u043d\u0430\u043a\u043e\u043d\u0435\u0446,<\/li>\n<li>\u043c\u0435\u0441\u0442\u0430 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430.<\/li>\n<\/ul>\n<p>  \u0418\u0442\u043e\u0433\u043e 9*8=72 \u0431\u0430\u0439\u0442\u0430, \u043a\u0430\u043a \u0441\u0438\u043d\u044c\u043e\u0440 <a href=\"https:\/\/habr.com\/ru\/users\/axemafr\/\" class=\"user_link\">AxemaFr<\/a> \u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u043b.<\/p>\n<p>  \u0418\u0437 \u0441\u0435\u043c\u0438 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0445, \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u043c\u043e\u0433\u0443\u0442 \u0442\u0440\u0438 \u2014 \u0447\u0438\u0441\u043b\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043d\u0430\u043b\u0438\u0447\u0438\u0435 constant pool, \u0438 \u0447\u0438\u0441\u043b\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432. \u0427\u0442\u043e \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0432 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435 \u0441 1.00000000000001?<\/p>\n<blockquote>\n<pre>LdaCurrentContextSlot [2]      ; a := context[2] ThrowReferenceErrorIfHole [0]  ; if (a === undefined)                                ;   throw(&quot;ReferenceError: %s is not defined&quot;, const[0]) Star r0                        ; r0 := a LdaConstant [1]                ; a := const[1] Add r0, [0]                    ; a += r0 Star r1                        ; r1 := a                                ; ...\u0434\u0430\u043b\u044c\u0448\u0435 \u043a\u0430\u043a \u0440\u0430\u043d\u044c\u0448\u0435<\/pre>\n<\/blockquote>\n<p>  \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043f\u0440\u0438\u0431\u0430\u0432\u043b\u044f\u0435\u043c\u0430\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430 \u0437\u0430\u043d\u044f\u043b\u0430 \u0442\u0440\u0435\u0442\u044c\u0435 \u043c\u0435\u0441\u0442\u043e \u0432 constant pool; \u0432\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0434\u043b\u044f \u0435\u0451 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u0441\u044f \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u0440\u0435\u0433\u0438\u0441\u0442\u0440, \u0442\u0430\u043a \u0447\u0442\u043e \u0441\u0442\u0435\u043a\u043e\u0432\u044b\u0439 \u043a\u0430\u0434\u0440 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u044b\u0440\u043e\u0441 \u043d\u0430 8 \u0431\u0430\u0439\u0442\u043e\u0432.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u0431\u0435\u0437 constant pool. \u041d\u0430 <a href=\"https:\/\/github.com\/v8\/v8\/blob\/master\/src\/execution\/frame-constants.h#L289\">github.com\/v8\/v8\/blob\/master\/src\/execution\/frame-constants.h#L289<\/a> \u043e\u043f\u0438\u0441\u0430\u043d \u0444\u043e\u0440\u043c\u0430\u0442 \u0441\u0442\u0435\u043a\u043e\u0432\u043e\u0433\u043e \u043a\u0430\u0434\u0440\u0430 V8 \u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u043e, \u0447\u0442\u043e \u043a\u043e\u0433\u0434\u0430 constant pool \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u0442\u043e \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u0442\u0435\u043a\u043e\u0432\u043e\u0433\u043e \u043a\u0430\u0434\u0440\u0430 \u0441\u043e\u043a\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043e\u0434\u0438\u043d \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c. \u041a\u0430\u043a \u0432 \u044d\u0442\u043e\u043c \u0443\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u0438\u0442\u044c\u0441\u044f? \u041d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0430\u044f \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b, \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e\u0439; \u043d\u043e \u0432\u0437\u0433\u043b\u044f\u043d\u0438\u0442\u0435-\u043a\u0430:<\/p>\n<pre><code class=\"javascript\">{let i = 0;  function func() {   this()(); };  const helper = () =&gt; (i++, func.bind(helper));  try {   helper()(); } catch (e) {   console.log(i); }}<\/code><\/pre>\n<p>  <\/p>\n<blockquote>\n<pre>[generated bytecode for function: func (0x44db0878e575 &lt;SharedFunctionInfo func&gt;)] Parameter count 1 Register count 1 Frame size 8    37 S&gt; 000044DB0878E8DA @    0 : 5e 02 02 00       CallUndefinedReceiver1 &lt;this&gt;, &lt;this&gt;, [0]          000044DB0878E8DE @    4 : 26 fa             Star r0    43 E&gt; 000044DB0878E8E0 @    6 : 5d fa 02          CallUndefinedReceiver0 r0, [2]          000044DB0878E8E3 @    9 : 0d                LdaUndefined    47 S&gt; 000044DB0878E8E4 @   10 : ab                Return Constant pool (size = 0) Handler Table (size = 0) Source Position Table (size = 8)<\/pre>\n<\/blockquote>\n<p>  \u0426\u0435\u043b\u044c \u2014 \u00abConstant pool (size = 0)\u00bb \u2014 \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442\u0430; \u043d\u043e \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0441\u0442\u0435\u043a\u0430, \u043a\u0430\u043a \u0438 \u0440\u0430\u043d\u044c\u0448\u0435, \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 13951 \u0432\u044b\u0437\u043e\u0432. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0434\u0430\u0436\u0435 \u043a\u043e\u0433\u0434\u0430 constant pool \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u0441\u0442\u0435\u043a\u043e\u0432\u044b\u0439 \u043a\u0430\u0434\u0440 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u043d\u0435\u0433\u043e.<\/p>\n<p>  \u0410 \u0443\u0434\u0430\u0441\u0442\u0441\u044f \u043b\u0438 \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u043c\u0435\u043d\u044c\u0448\u0435\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0441\u0442\u0435\u043a\u043e\u0432\u043e\u0433\u043e \u043a\u0430\u0434\u0440\u0430, \u0447\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 <a href=\"https:\/\/habr.com\/ru\/users\/axemafr\/\" class=\"user_link\">AxemaFr<\/a> \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435? \u2014\u0434\u0430, \u0435\u0441\u043b\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0438 \u043e\u0434\u0438\u043d \u0440\u0435\u0433\u0438\u0441\u0442\u0440:  <\/p>\n<pre><code class=\"javascript\">{function func() {   this(); };  let chain = ()=&gt;null; for(let i=0; i&lt;15050; i++)   chain = func.bind(chain);  chain()}<\/code><\/pre>\n<p>  <\/p>\n<blockquote>\n<pre>[generated bytecode for function: func (0x44db08c34059 &lt;SharedFunctionInfo func&gt;)] Parameter count 1 Register count 0 Frame size 0    25 S&gt; 000044DB08C34322 @    0 : 5d 02 00          CallUndefinedReceiver0 &lt;this&gt;, [0]          000044DB08C34325 @    3 : 0d                LdaUndefined    29 S&gt; 000044DB08C34326 @    4 : ab                Return Constant pool (size = 0) Handler Table (size = 0) Source Position Table (size = 6)<\/pre>\n<\/blockquote>\n<p>  (\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0446\u0435\u043f\u043e\u0447\u043a\u0430 \u0438\u0437 15051 \u0432\u044b\u0437\u043e\u0432\u0430 \u0443\u0436\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u00abRangeError: Maximum call stack size exceeded\u00bb.)<\/p>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432\u044b\u0432\u043e\u0434 \u0441\u0438\u043d\u044c\u043e\u0440\u0430 <a href=\"https:\/\/habr.com\/ru\/users\/axemafr\/\" class=\"user_link\">AxemaFr<\/a> \u043e \u0442\u043e\u043c, \u0447\u0442\u043e<i> \u00ab\u0440\u0430\u0437\u043c\u0435\u0440 \u043f\u0443\u0441\u0442\u043e\u0433\u043e ExecutionStack \u0432 Chrome \u0440\u0430\u0432\u0435\u043d 72 \u0431\u0430\u0439\u0442\u0430\u043c\u00bb<\/i>, \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043e\u043f\u0440\u043e\u0432\u0435\u0440\u0433\u043d\u0443\u0442.<\/p>\n<h3>\u0423\u0442\u043e\u0447\u043d\u044f\u0435\u043c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f<\/h3>\n<p>  \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0442\u044c, \u0447\u0442\u043e \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u0442\u0435\u043a\u043e\u0432\u043e\u0433\u043e \u043a\u0430\u0434\u0440\u0430 \u0434\u043b\u044f JS-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 Chrome \u0440\u0430\u0432\u0435\u043d <b>64<\/b> \u0431\u0430\u0439\u0442\u0430\u043c. \u041a \u044d\u0442\u043e\u043c\u0443 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0438\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e 8 \u0431\u0430\u0439\u0442\u043e\u0432 \u0437\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u0435\u0449\u0451 \u043f\u043e 8 \u0431\u0430\u0439\u0442\u043e\u0432 \u0437\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0441\u0432\u0435\u0440\u0445 \u0447\u0438\u0441\u043b\u0430 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0445, \u0438 \u0435\u0449\u0451 \u043f\u043e 8 \u0431\u0430\u0439\u0442\u043e\u0432 \u0437\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440. \u041f\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0443 \u043e\u0442\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442, \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c \u0438\u0437 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430, \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0430\u0445, \u0438 \u0442.\u0434. \u0422\u043e\u0447\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u043f\u043e \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c\u0443 \u0442\u0435\u043a\u0441\u0442\u0443 \u043d\u0430 JS \u0432\u0440\u044f\u0434 \u043b\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c. \u0421\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 JS \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043d\u0435\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u2014 \u043e\u043d\u0438 \u043d\u0435 \u0438\u043c\u0435\u044e\u0442 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u043a \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043f\u043e\u0447\u0435\u043c\u0443:<\/p>\n<ul>\n<li>\u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 (<code>func = (x) =&gt; { i++; func(); };<\/code>) \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u0442 \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0436\u0435 \u043f\u0430\u043c\u044f\u0442\u0438, \u043a\u0430\u043a \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f;<\/li>\n<li>\u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u043d\u0435\u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 (<code>func = () =&gt; { i++; func(1); };<\/code>) \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u0442 \u0432\u0434\u0432\u043e\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0430\u043c\u044f\u0442\u0438, \u0447\u0435\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u2014 \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440:<br \/>\n<blockquote>\n<pre>[generated bytecode for function: func (0x44db08e12da1 &lt;SharedFunctionInfo func&gt;)] Parameter count 1 Register count 2 Frame size 16    34 S&gt; 000044DB08E12FE2 @    0 : 1a 02             LdaCurrentContextSlot [2]          000044DB08E12FE4 @    2 : ac 00             ThrowReferenceErrorIfHole [0]          000044DB08E12FE6 @    4 : 4d 00             Inc [0]          000044DB08E12FE8 @    6 : 26 fa             Star r0          000044DB08E12FEA @    8 : 1a 02             LdaCurrentContextSlot [2]    35 E&gt; 000044DB08E12FEC @   10 : ac 00             ThrowReferenceErrorIfHole [0]          000044DB08E12FEE @   12 : 25 fa             Ldar r0          000044DB08E12FF0 @   14 : 1d 02             StaCurrentContextSlot [2]    39 S&gt; 000044DB08E12FF2 @   16 : 1b 03             LdaImmutableCurrentContextSlot [3]          000044DB08E12FF4 @   18 : ac 01             ThrowReferenceErrorIfHole [1]          000044DB08E12FF6 @   20 : 26 fa             Star r0          000044DB08E12FF8 @   22 : 0c 01             LdaSmi [1]          000044DB08E12FFA @   24 : 26 f9             Star r1    39 E&gt; 000044DB08E12FFC @   26 : 5e fa f9 01       CallUndefinedReceiver1 r0, r1, [1]          000044DB08E13000 @   30 : 0d                LdaUndefined    48 S&gt; 000044DB08E13001 @   31 : ab                Return Constant pool (size = 2) Handler Table (size = 0) Source Position Table (size = 12)<\/pre>\n<\/blockquote>\n<\/li>\n<li>\u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0430 1.00000000000001 \u043d\u0435 \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u0442\u0435\u043a\u043e\u0432\u043e\u0433\u043e \u043a\u0430\u0434\u0440\u0430 \u2014 \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 <code>r1<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0438 \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b, \u0438 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430.<\/li>\n<\/ul>\n<p>  <a href=\"https:\/\/macloud.ru\/?partner=4189mjxpzx&amp;utm_source=habr&amp;utm_medium=original&amp;utm_campaign=severus\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/et\/1a\/yp\/et1aypandyuamqprsz3m2ntm4ky.png\"><\/a><\/div>\n<p> \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\/company\/macloud\/blog\/552030\/\"> https:\/\/habr.com\/ru\/company\/macloud\/blog\/552030\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/uy\/yq\/oc\/uyyqoc2rgksgbx2v-pdz8rz4coa.png\"><\/p>\n<p>  \u0412 \u043d\u0430\u0447\u0430\u043b\u0435 \u0430\u043f\u0440\u0435\u043b\u044f \u043d\u0430 \u0445\u0430\u0431\u0440\u0435 \u0431\u044b\u043b\u0430 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u0430 \u0441\u0442\u0430\u0442\u044c\u044f <a href=\"https:\/\/habr.com\/ru\/post\/550534\/\">\u00abJavaScript: \u0421\u0442\u0435\u043a \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0438 \u043c\u0430\u0433\u0438\u044f \u0435\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430\u00bb<\/a> \u2014 \u0435\u0451 \u0430\u0432\u0442\u043e\u0440 \u043f\u0440\u0438\u0448\u0451\u043b \u043a \u0432\u044b\u0432\u043e\u0434\u0443, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u043a\u0430\u0434\u0440 \u0441\u0442\u0435\u043a\u0430 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 (72 + 8 * \u0447\u0438\u0441\u043b\u043e_\u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445_\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445) \u0431\u0430\u0439\u0442\u043e\u0432: <i>\u00ab\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043c\u044b \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u043b\u0438 \u0432\u0441\u0435 \u0432\u0435\u0440\u043d\u043e \u0438 \u043c\u043e\u0436\u0435\u043c \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0442\u044c, \u0447\u0442\u043e \u0440\u0430\u0437\u043c\u0435\u0440 \u043f\u0443\u0441\u0442\u043e\u0433\u043e ExecutionStack \u0432 Chrome \u0440\u0430\u0432\u0435\u043d 72 \u0431\u0430\u0439\u0442\u0430\u043c, \u0430 \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u043b\u043b\u0441\u0442\u044d\u043a\u0430 \u2014 \u0447\u0443\u0442\u044c \u043c\u0435\u043d\u044c\u0448\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u043c\u0435\u0433\u0430\u0431\u0430\u0439\u0442\u0430. \u041e\u0442\u043b\u0438\u0447\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430!\u00bb<\/i><\/p>\n<p>  \u0414\u043b\u044f \u0437\u0430\u0442\u0440\u0430\u0432\u043a\u0438 \u2014 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043c \u043a\u043e\u0434, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 <a href=\"https:\/\/habr.com\/ru\/users\/axemafr\/\" class=\"user_link\">AxemaFr<\/a> \u0434\u043b\u044f \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432:<\/p>\n<pre><code class=\"javascript\">{let i = 0;  const func = () =&gt; {   i += 1.00000000000001;   func(); };  try {   func(); } catch (e) {   console.log(i); }}<\/code><\/pre>\n<p>  \u0412\u043c\u0435\u0441\u0442\u043e 1 \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0448\u0430\u0433\u0435 \u043f\u0440\u0438\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0447\u0443\u0442\u043e\u0447\u043a\u0443 \u0431\u043e\u043b\u044c\u0448\u0435, \u0438 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432\u043c\u0435\u0441\u0442\u043e 13951 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c 12556.000000000002 \u2014 \u043a\u0430\u043a \u0431\u0443\u0434\u0442\u043e \u0431\u044b \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0430\u0441\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f! <\/p>\n<p>  \u041f\u043e\u0432\u0442\u043e\u0440\u0438\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0437\u0430\u0434\u0430\u0432\u0430\u043b\u0441\u044f Senior Frontend Developer <a href=\"https:\/\/habr.com\/ru\/users\/axemafr\/\" class=\"user_link\">AxemaFr<\/a>: <i>\u00ab\u041f\u043e\u0447\u0435\u043c\u0443 \u0436\u0435 \u0442\u0430\u043a? \u0427\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c? \u041a\u0430\u043a \u043f\u043e\u043d\u044f\u0442\u044c, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0432 \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u043e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c\u0441\u044f \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e?!\u00bb<\/i><\/p>\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-321290","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/321290","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=321290"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/321290\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=321290"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=321290"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=321290"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}