Commit 4bf14eb1 authored by fpizlo@apple.com's avatar fpizlo@apple.com

Rename WatchpointSet::notifyWrite() should be renamed to WatchpointSet::fireAll()

https://bugs.webkit.org/show_bug.cgi?id=124609

Source/JavaScriptCore: 

Rubber stamped by Mark Lam.
        
notifyWrite() is a thing that SymbolTable does. WatchpointSet uses that terminology
because it was original designed to match exactly SymbolTable's semantics. But now
it's a confusing term.

* bytecode/Watchpoint.cpp:
(JSC::WatchpointSet::fireAllSlow):
* bytecode/Watchpoint.h:
(JSC::WatchpointSet::fireAll):
(JSC::InlineWatchpointSet::fireAll):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::execute):
* runtime/JSFunction.cpp:
(JSC::JSFunction::put):
(JSC::JSFunction::defineOwnProperty):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::haveABadTime):
* runtime/Structure.h:
(JSC::Structure::notifyTransitionFromThisStructure):
* runtime/SymbolTable.cpp:
(JSC::SymbolTableEntry::notifyWriteSlow):

Source/WebCore: 

Rubber stamped by Mark Lam.

No new tests because no new behavior.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
* bindings/scripts/test/JS/JSTestEventTarget.h:
(WebCore::JSTestEventTarget::create):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159528 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent f0e4d5d6
2013-11-19 Filip Pizlo <fpizlo@apple.com>
Rename WatchpointSet::notifyWrite() should be renamed to WatchpointSet::fireAll()
https://bugs.webkit.org/show_bug.cgi?id=124609
Rubber stamped by Mark Lam.
notifyWrite() is a thing that SymbolTable does. WatchpointSet uses that terminology
because it was original designed to match exactly SymbolTable's semantics. But now
it's a confusing term.
* bytecode/Watchpoint.cpp:
(JSC::WatchpointSet::fireAllSlow):
* bytecode/Watchpoint.h:
(JSC::WatchpointSet::fireAll):
(JSC::InlineWatchpointSet::fireAll):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::execute):
* runtime/JSFunction.cpp:
(JSC::JSFunction::put):
(JSC::JSFunction::defineOwnProperty):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::haveABadTime):
* runtime/Structure.h:
(JSC::Structure::notifyTransitionFromThisStructure):
* runtime/SymbolTable.cpp:
(JSC::SymbolTableEntry::notifyWriteSlow):
2013-11-18 Michael Saboff <msaboff@apple.com>
REGRESSION (r159395): Error compiling for ARMv7
......
......@@ -63,7 +63,7 @@ void WatchpointSet::add(Watchpoint* watchpoint)
m_state = IsWatched;
}
void WatchpointSet::notifyWriteSlow()
void WatchpointSet::fireAllSlow()
{
ASSERT(state() == IsWatched);
......
......@@ -91,16 +91,16 @@ public:
m_state = IsWatched;
}
void notifyWrite()
void fireAll()
{
if (state() != IsWatched)
return;
notifyWriteSlow();
fireAllSlow();
}
int8_t* addressOfState() { return &m_state; }
JS_EXPORT_PRIVATE void notifyWriteSlow(); // Call only if you've checked isWatched.
JS_EXPORT_PRIVATE void fireAllSlow(); // Call only if you've checked isWatched.
private:
void fireAllWatchpoints();
......@@ -177,10 +177,10 @@ public:
m_data = encodeState(IsWatched);
}
void notifyWrite()
void fireAll()
{
if (isFat()) {
fat()->notifyWrite();
fat()->fireAll();
return;
}
if (decodeState(m_data) == ClearWatchpoint)
......
......@@ -1197,7 +1197,7 @@ JSValue Interpreter::execute(EvalExecutable* eval, CallFrame* callFrame, JSValue
if (numVariables || numFunctions) {
BatchedTransitionOptimizer optimizer(vm, variableObject);
if (variableObject->next())
variableObject->globalObject()->varInjectionWatchpoint()->notifyWrite();
variableObject->globalObject()->varInjectionWatchpoint()->fireAll();
for (unsigned i = 0; i < numVariables; ++i) {
const Identifier& ident = codeBlock->variable(i);
......
......@@ -387,7 +387,7 @@ void JSFunction::put(JSCell* cell, ExecState* exec, PropertyName propertyName, J
PropertySlot slot(thisObject);
thisObject->methodTable()->getOwnPropertySlot(thisObject, exec, propertyName, slot);
thisObject->m_allocationProfile.clear();
thisObject->m_allocationProfileWatchpoint.notifyWrite();
thisObject->m_allocationProfileWatchpoint.fireAll();
// Don't allow this to be cached, since a [[Put]] must clear m_allocationProfile.
PutPropertySlot dontCache;
Base::put(thisObject, exec, propertyName, value, dontCache);
......@@ -434,7 +434,7 @@ bool JSFunction::defineOwnProperty(JSObject* object, ExecState* exec, PropertyNa
PropertySlot slot(thisObject);
thisObject->methodTable()->getOwnPropertySlot(thisObject, exec, propertyName, slot);
thisObject->m_allocationProfile.clear();
thisObject->m_allocationProfileWatchpoint.notifyWrite();
thisObject->m_allocationProfileWatchpoint.fireAll();
return Base::defineOwnProperty(object, exec, propertyName, descriptor, throwException);
}
......
......@@ -521,7 +521,7 @@ void JSGlobalObject::haveABadTime(VM& vm)
// Make sure that all allocations or indexed storage transitions that are inlining
// the assumption that it's safe to transition to a non-SlowPut array storage don't
// do so anymore.
m_havingABadTimeWatchpoint->notifyWrite();
m_havingABadTimeWatchpoint->fireAll();
ASSERT(isHavingABadTime()); // The watchpoint is what tells us that we're having a bad time.
// Make sure that all JSArray allocations that load the appropriate structure from
......
......@@ -351,7 +351,7 @@ public:
void notifyTransitionFromThisStructure() const
{
m_transitionWatchpointSet.notifyWrite();
m_transitionWatchpointSet.fireAll();
}
InlineWatchpointSet& transitionWatchpointSet() const
......
......@@ -86,7 +86,7 @@ void SymbolTableEntry::notifyWriteSlow()
WatchpointSet* watchpoints = fatEntry()->m_watchpoints.get();
if (!watchpoints)
return;
watchpoints->notifyWrite();
watchpoints->fireAll();
}
SymbolTableEntry::FatEntry* SymbolTableEntry::inflateSlow()
......
2013-11-19 Filip Pizlo <fpizlo@apple.com>
Rename WatchpointSet::notifyWrite() should be renamed to WatchpointSet::fireAll()
https://bugs.webkit.org/show_bug.cgi?id=124609
Rubber stamped by Mark Lam.
No new tests because no new behavior.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
* bindings/scripts/test/JS/JSTestEventTarget.h:
(WebCore::JSTestEventTarget::create):
2013-11-19 Bear Travis <betravis@adobe.com>
[CSS Shapes] Parse [<box> || <shape>] values
......
......@@ -651,7 +651,7 @@ sub GenerateHeader
AddIncludesForTypeInHeader($implType) unless $svgPropertyOrListPropertyType;
push(@headerContent, " static $className* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<$implType> impl)\n");
push(@headerContent, " {\n");
push(@headerContent, " globalObject->masqueradesAsUndefinedWatchpoint()->notifyWrite();\n");
push(@headerContent, " globalObject->masqueradesAsUndefinedWatchpoint()->fireAll();\n");
push(@headerContent, " $className* ptr = new (NotNull, JSC::allocateCell<$className>(globalObject->vm().heap)) $className(structure, globalObject, impl);\n");
push(@headerContent, " ptr->finishCreation(globalObject->vm());\n");
push(@headerContent, " return ptr;\n");
......
......@@ -34,7 +34,7 @@ public:
typedef JSDOMWrapper Base;
static JSTestEventTarget* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<TestEventTarget> impl)
{
globalObject->masqueradesAsUndefinedWatchpoint()->notifyWrite();
globalObject->masqueradesAsUndefinedWatchpoint()->fireAll();
JSTestEventTarget* ptr = new (NotNull, JSC::allocateCell<JSTestEventTarget>(globalObject->vm().heap)) JSTestEventTarget(structure, globalObject, impl);
ptr->finishCreation(globalObject->vm());
return ptr;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment