⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 197155 in webkit


Ignore:
Timestamp:
Feb 25, 2016, 6:04:42 PM (11 years ago)
Author:
benjamin@webkit.org
Message:

[JSC] Temporal Dead Zone checks on "this" are eliminated when doing OSR Entry to FTL
https://bugs.webkit.org/show_bug.cgi?id=154664

Reviewed by Saam Barati.

When doing OSR Enter into a constructor, we lose the information
that this may have been set to empty by a previously executed block.

All the code just assumed the type for a FlushedJS value and thus
not an empty value. It was then okay to eliminate the TDZ checks.

In this patch, the values on root entry now assume they may be empty.
As a result, the SetArgument() for "this" has "empty" as possible
type and the TDZ checks are no longer eliminated.

  • dfg/DFGInPlaceAbstractState.cpp:

(JSC::DFG::InPlaceAbstractState::initialize):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r197153 r197155  
     12016-02-25  Benjamin Poulain  <benjamin@webkit.org>
     2
     3        [JSC] Temporal Dead Zone checks on "this" are eliminated when doing OSR Entry to FTL
     4        https://bugs.webkit.org/show_bug.cgi?id=154664
     5
     6        Reviewed by Saam Barati.
     7
     8        When doing OSR Enter into a constructor, we lose the information
     9        that this may have been set to empty by a previously executed block.
     10
     11        All the code just assumed the type for a FlushedJS value and thus
     12        not an empty value. It was then okay to eliminate the TDZ checks.
     13
     14        In this patch, the values on root entry now assume they may be empty.
     15        As a result, the SetArgument() for "this" has "empty" as possible
     16        type and the TDZ checks are no longer eliminated.
     17
     18        * dfg/DFGInPlaceAbstractState.cpp:
     19        (JSC::DFG::InPlaceAbstractState::initialize):
     20
    1212016-02-25  Ada Chan  <adachan@apple.com>
    222
  • trunk/Source/JavaScriptCore/dfg/DFGInPlaceAbstractState.cpp

    r190220 r197155  
    122122            break;
    123123        case FlushedJSValue:
    124             root->valuesAtHead.argument(i).makeHeapTop();
     124            root->valuesAtHead.argument(i).makeBytecodeTop();
    125125            break;
    126126        default:
Note: See TracChangeset for help on using the changeset viewer.