Ignore:
Timestamp:
Nov 17, 2013, 6:10:42 PM (12 years ago)
Author:
[email protected]
Message:

Simplify WatchpointSet state tracking
https://bugs.webkit.org/show_bug.cgi?id=124465

Reviewed by Sam Weinig.

We previously represented the state of watchpoint sets using two booleans. But that
makes it awkward to case over the state.

We also previously supported a watchpoint set being both watched and invalidated. We
never used that capability, and its presence was just purely confusing.

This turns the whole thing into an enum.

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::branch8):

  • assembler/MacroAssemblerARMv7.h:

(JSC::MacroAssemblerARMv7::branch8):

  • assembler/MacroAssemblerX86.h:

(JSC::MacroAssemblerX86::branch8):

  • assembler/MacroAssemblerX86_64.h:

(JSC::MacroAssemblerX86_64::branch8):

  • bytecode/Watchpoint.cpp:

(JSC::WatchpointSet::WatchpointSet):
(JSC::WatchpointSet::add):
(JSC::WatchpointSet::notifyWriteSlow):
(JSC::InlineWatchpointSet::inflateSlow):

  • bytecode/Watchpoint.h:

(JSC::WatchpointSet::state):
(JSC::WatchpointSet::isStillValid):
(JSC::WatchpointSet::startWatching):
(JSC::WatchpointSet::notifyWrite):
(JSC::WatchpointSet::addressOfState):
(JSC::InlineWatchpointSet::InlineWatchpointSet):
(JSC::InlineWatchpointSet::hasBeenInvalidated):
(JSC::InlineWatchpointSet::startWatching):
(JSC::InlineWatchpointSet::notifyWrite):
(JSC::InlineWatchpointSet::decodeState):
(JSC::InlineWatchpointSet::encodeState):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emitVarInjectionCheck):

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::emitVarInjectionCheck):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/JSFunction.cpp:

(JSC::JSFunction::JSFunction):

  • runtime/JSFunctionInlines.h:

(JSC::JSFunction::JSFunction):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::JSGlobalObject):

  • runtime/Structure.cpp:

(JSC::Structure::Structure):

  • runtime/SymbolTable.cpp:

(JSC::SymbolTableEntry::attemptToWatch):

  • runtime/SymbolTable.h:
File:
1 edited

Legend:

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

    r157539 r159395  
    159159    , m_prototype(vm, this, prototype)
    160160    , m_classInfo(classInfo)
    161     , m_transitionWatchpointSet(InitializedWatching)
     161    , m_transitionWatchpointSet(IsWatched)
    162162    , m_offset(invalidOffset)
    163163    , m_typeInfo(typeInfo)
     
    186186    , m_prototype(vm, this, jsNull())
    187187    , m_classInfo(info())
    188     , m_transitionWatchpointSet(InitializedWatching)
     188    , m_transitionWatchpointSet(IsWatched)
    189189    , m_offset(invalidOffset)
    190190    , m_typeInfo(CompoundType, OverridesVisitChildren)
     
    208208    , m_prototype(vm, this, previous->storedPrototype())
    209209    , m_classInfo(previous->m_classInfo)
    210     , m_transitionWatchpointSet(InitializedWatching)
     210    , m_transitionWatchpointSet(IsWatched)
    211211    , m_offset(invalidOffset)
    212212    , m_typeInfo(previous->typeInfo().type(), previous->typeInfo().flags() & ~StructureHasRareData)
Note: See TracChangeset for help on using the changeset viewer.