Changeset 143553 in webkit


Ignore:
Timestamp:
Feb 20, 2013, 6:43:36 PM (12 years ago)
Author:
fpizlo@apple.com
Message:

DFG inlines Resolves that it doesn't know how to handle correctly
https://bugs.webkit.org/show_bug.cgi?id=110405

Source/JavaScriptCore:

Reviewed by Geoffrey Garen.

Don't try to be clever: if there's a failing resolve, we can't inline it, period.

  • dfg/DFGCapabilities.h:

(JSC::DFG::canInlineResolveOperations):
(JSC::DFG::canInlineOpcode):

LayoutTests:

Reviewed by Geoffrey Garen.

  • fast/js/dfg-inline-resolve-expected.txt: Added.
  • fast/js/dfg-inline-resolve.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r143548 r143553  
     12013-02-20  Filip Pizlo  <fpizlo@apple.com>
     2
     3        DFG inlines Resolves that it doesn't know how to handle correctly
     4        https://bugs.webkit.org/show_bug.cgi?id=110405
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        * fast/js/dfg-inline-resolve-expected.txt: Added.
     9        * fast/js/dfg-inline-resolve.html: Added.
     10
    1112013-02-20  Christian Biesinger  <cbiesinger@chromium.org>
    212
  • trunk/Source/JavaScriptCore/ChangeLog

    r143529 r143553  
     12013-02-20  Filip Pizlo  <fpizlo@apple.com>
     2
     3        DFG inlines Resolves that it doesn't know how to handle correctly
     4        https://bugs.webkit.org/show_bug.cgi?id=110405
     5
     6        Reviewed by Geoffrey Garen.
     7       
     8        Don't try to be clever: if there's a failing resolve, we can't inline it, period.
     9
     10        * dfg/DFGCapabilities.h:
     11        (JSC::DFG::canInlineResolveOperations):
     12        (JSC::DFG::canInlineOpcode):
     13
    1142013-02-20  Roger Fong  <roger_fong@apple.com>
    215
  • trunk/Source/JavaScriptCore/dfg/DFGCapabilities.h

    r142769 r143553  
    4949
    5050// Opcode checking.
    51 inline bool canInlineResolveOperations(OpcodeID opcode, ResolveOperations* operations)
     51inline bool canInlineResolveOperations(ResolveOperations* operations)
    5252{
    5353    for (unsigned i = 0; i < operations->size(); i++) {
     
    6666
    6767        case ResolveOperation::Fail:
    68             switch (opcode) {
    69             case op_resolve_base_to_global_dynamic:
    70             case op_resolve_base_to_scope_with_top_scope_check:
    71             case op_resolve_base_to_global:
    72             case op_resolve_base_to_scope:
    73                 CRASH();
    74             case op_resolve_with_base:
    75             case op_resolve_with_this:
    76                 return false;
    77             default:
    78                 continue;
    79             }
     68            // Fall-back resolves don't know how to deal with the ExecState* having a different
     69            // global object (and scope) than the inlined code that is invoking that resolve.
     70            return false;
    8071
    8172        case ResolveOperation::SkipTopScopeNode:
     
    236227    case op_resolve_scoped_var_on_top_scope:
    237228    case op_resolve_scoped_var_with_top_scope_check:
    238         return canInlineResolveOperations(opcodeID, pc[3].u.resolveOperations);
     229        return canInlineResolveOperations(pc[3].u.resolveOperations);
    239230
    240231    case op_resolve_base_to_global:
     
    245236    case op_resolve_with_base:
    246237    case op_resolve_with_this:
    247         return canInlineResolveOperations(opcodeID, pc[4].u.resolveOperations);
     238        return canInlineResolveOperations(pc[4].u.resolveOperations);
    248239       
    249240    // Inlining doesn't correctly remap regular expression operands.
Note: See TracChangeset for help on using the changeset viewer.