Ignore:
Timestamp:
Nov 18, 2013, 3:19:53 PM (12 years ago)
Author:
[email protected]
Message:

put_to_scope[5] should not point to the structure if it's a variable access, but it should point to the WatchpointSet
https://bugs.webkit.org/show_bug.cgi?id=124539

Reviewed by Mark Hahnenberg.

This is in preparation for getting put_to_scope to directly invalidate the watchpoint set
on stores, which will allow us to run constant inference on all globals.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::finalizeUnconditionally):

  • bytecode/Instruction.h:
  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

  • runtime/JSScope.cpp:

(JSC::abstractAccess):
(JSC::JSScope::abstractResolve):

  • runtime/JSScope.h:

(JSC::ResolveOp::ResolveOp):

  • runtime/SymbolTable.h:

(JSC::SymbolTableEntry::watchpointSet):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/JSScope.cpp

    r155143 r159462  
    5454        if (ident == exec->propertyNames().arguments) {
    5555            // We know the property will be at this activation scope, but we don't know how to cache it.
    56             op = ResolveOp(Dynamic, 0, 0, 0);
     56            op = ResolveOp(Dynamic, 0, 0, 0, 0);
    5757            return true;
    5858        }
     
    6161        if (entry.isReadOnly() && getOrPut == Put) {
    6262            // We know the property will be at this activation scope, but we don't know how to cache it.
    63             op = ResolveOp(Dynamic, 0, 0, 0);
     63            op = ResolveOp(Dynamic, 0, 0, 0, 0);
    6464            return true;
    6565        }
    6666
    6767        if (!entry.isNull()) {
    68             op = ResolveOp(makeType(ClosureVar, needsVarInjectionChecks), depth, activation->structure(), entry.getIndex());
     68            op = ResolveOp(makeType(ClosureVar, needsVarInjectionChecks), depth, activation->structure(), 0, entry.getIndex());
    6969            return true;
    7070        }
     
    8181                if (entry.isReadOnly()) {
    8282                    // We know the property will be at global scope, but we don't know how to cache it.
    83                     op = ResolveOp(Dynamic, 0, 0, 0);
     83                    op = ResolveOp(Dynamic, 0, 0, 0, 0);
    8484                    return true;
    8585                }
     
    8989            }
    9090
    91             op = ResolveOp(makeType(GlobalVar, needsVarInjectionChecks), depth, globalObject->structure(),
     91            op = ResolveOp(
     92                makeType(GlobalVar, needsVarInjectionChecks), depth, 0, entry.watchpointSet(),
    9293                reinterpret_cast<uintptr_t>(globalObject->registerAt(entry.getIndex()).slot()));
    9394            return true;
     
    101102            // We know the property will be at global scope, but we don't know how to cache it.
    102103            ASSERT(!scope->next());
    103             op = ResolveOp(makeType(GlobalProperty, needsVarInjectionChecks), depth, 0, 0);
     104            op = ResolveOp(makeType(GlobalProperty, needsVarInjectionChecks), depth, 0, 0, 0);
    104105            return true;
    105106        }
    106107
    107         op = ResolveOp(makeType(GlobalProperty, needsVarInjectionChecks), depth, globalObject->structure(), slot.cachedOffset());
     108        op = ResolveOp(makeType(GlobalProperty, needsVarInjectionChecks), depth, globalObject->structure(), 0, slot.cachedOffset());
    108109        return true;
    109110    }
    110111
    111     op = ResolveOp(Dynamic, 0, 0, 0);
     112    op = ResolveOp(Dynamic, 0, 0, 0, 0);
    112113    return true;
    113114}
     
    147148ResolveOp JSScope::abstractResolve(ExecState* exec, JSScope* scope, const Identifier& ident, GetOrPut getOrPut, ResolveType unlinkedType)
    148149{
    149     ResolveOp op(Dynamic, 0, 0, 0);
     150    ResolveOp op(Dynamic, 0, 0, 0, 0);
    150151    if (unlinkedType == Dynamic)
    151152        return op;
Note: See TracChangeset for help on using the changeset viewer.