- Revision
- 258825
- Author
- ysuz...@apple.com
- Date
- 2020-03-22 21:57:06 -0700 (Sun, 22 Mar 2020)
Log Message
Unreviewed, rename keepAlive to ensureStillAliveHere
https://bugs.webkit.org/show_bug.cgi?id=209398
Based on Geoff and Mark's feedback, renaming keepAlive to ensureStillAliveHere
to make the effect of keepAlive clear.
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileAtomicsReadModifyWrite):
(JSC::FTL::DFG::LowerDFGToB3::compileGetByVal):
(JSC::FTL::DFG::LowerDFGToB3::compilePutByVal):
(JSC::FTL::DFG::LowerDFGToB3::compileArraySlice):
(JSC::FTL::DFG::LowerDFGToB3::ensureStillAliveHere):
(JSC::FTL::DFG::LowerDFGToB3::keepAlive): Deleted.
* heap/HeapCell.cpp:
(JSC::ensureStillAliveHere):
(JSC::keepAlive): Deleted.
* heap/HeapCell.h:
(JSC::ensureStillAliveHere):
(JSC::HeapCell::use const):
(JSC::keepAlive): Deleted.
* runtime/JSCJSValue.cpp:
(JSC::ensureStillAliveHere):
(JSC::keepAlive): Deleted.
* runtime/JSCJSValue.h:
(JSC::ensureStillAliveHere):
(JSC::keepAlive): Deleted.
* wasm/js/WebAssemblyModuleRecord.cpp:
(JSC::WebAssemblyModuleRecord::link):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (258824 => 258825)
--- trunk/Source/_javascript_Core/ChangeLog 2020-03-23 00:40:46 UTC (rev 258824)
+++ trunk/Source/_javascript_Core/ChangeLog 2020-03-23 04:57:06 UTC (rev 258825)
@@ -1,5 +1,36 @@
2020-03-22 Yusuke Suzuki <ysuz...@apple.com>
+ Unreviewed, rename keepAlive to ensureStillAliveHere
+ https://bugs.webkit.org/show_bug.cgi?id=209398
+
+ Based on Geoff and Mark's feedback, renaming keepAlive to ensureStillAliveHere
+ to make the effect of keepAlive clear.
+
+ * ftl/FTLLowerDFGToB3.cpp:
+ (JSC::FTL::DFG::LowerDFGToB3::compileAtomicsReadModifyWrite):
+ (JSC::FTL::DFG::LowerDFGToB3::compileGetByVal):
+ (JSC::FTL::DFG::LowerDFGToB3::compilePutByVal):
+ (JSC::FTL::DFG::LowerDFGToB3::compileArraySlice):
+ (JSC::FTL::DFG::LowerDFGToB3::ensureStillAliveHere):
+ (JSC::FTL::DFG::LowerDFGToB3::keepAlive): Deleted.
+ * heap/HeapCell.cpp:
+ (JSC::ensureStillAliveHere):
+ (JSC::keepAlive): Deleted.
+ * heap/HeapCell.h:
+ (JSC::ensureStillAliveHere):
+ (JSC::HeapCell::use const):
+ (JSC::keepAlive): Deleted.
+ * runtime/JSCJSValue.cpp:
+ (JSC::ensureStillAliveHere):
+ (JSC::keepAlive): Deleted.
+ * runtime/JSCJSValue.h:
+ (JSC::ensureStillAliveHere):
+ (JSC::keepAlive): Deleted.
+ * wasm/js/WebAssemblyModuleRecord.cpp:
+ (JSC::WebAssemblyModuleRecord::link):
+
+2020-03-22 Yusuke Suzuki <ysuz...@apple.com>
+
[JSC] Add JSC::keepAlive(JSValue)
https://bugs.webkit.org/show_bug.cgi?id=209398
Modified: trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp (258824 => 258825)
--- trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp 2020-03-23 00:40:46 UTC (rev 258824)
+++ trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp 2020-03-23 04:57:06 UTC (rev 258825)
@@ -3840,7 +3840,7 @@
m_heaps.decorateFencedAccess(&m_heaps.typedArrayProperties, atomicValue);
// We have to keep base alive since that keeps storage alive.
- keepAlive(lowCell(baseEdge));
+ ensureStillAliveHere(lowCell(baseEdge));
setIntTypedArrayLoadResult(result, type);
}
@@ -4726,7 +4726,7 @@
}
// We have to keep base alive since that keeps storage alive.
- keepAlive(base);
+ ensureStillAliveHere(base);
setDouble(result);
return;
}
@@ -5094,7 +5094,7 @@
}
// We have to keep base alive since that keeps storage alive.
- keepAlive(base);
+ ensureStillAliveHere(base);
return;
}
}
@@ -5609,7 +5609,7 @@
}
// Keep the sourceArray alive at least until after anything that can GC.
- keepAlive(sourceArray);
+ ensureStillAliveHere(sourceArray);
LBasicBlock loop = m_out.newBlock();
LBasicBlock continuation = m_out.newBlock();
@@ -18344,7 +18344,7 @@
return true;
}
- void keepAlive(LValue value)
+ void ensureStillAliveHere(LValue value)
{
PatchpointValue* patchpoint = m_out.patchpoint(Void);
patchpoint->effects = Effects::none();
Modified: trunk/Source/_javascript_Core/heap/HeapCell.cpp (258824 => 258825)
--- trunk/Source/_javascript_Core/heap/HeapCell.cpp 2020-03-23 00:40:46 UTC (rev 258824)
+++ trunk/Source/_javascript_Core/heap/HeapCell.cpp 2020-03-23 04:57:06 UTC (rev 258825)
@@ -44,7 +44,7 @@
#if !COMPILER(GCC_COMPATIBLE)
// This makes the argument opaque from the compiler.
-NEVER_INLINE void keepAlive(const void*)
+NEVER_INLINE void ensureStillAliveHere(const void*)
{
}
#endif
Modified: trunk/Source/_javascript_Core/heap/HeapCell.h (258824 => 258825)
--- trunk/Source/_javascript_Core/heap/HeapCell.h 2020-03-23 00:40:46 UTC (rev 258824)
+++ trunk/Source/_javascript_Core/heap/HeapCell.h 2020-03-23 04:57:06 UTC (rev 258825)
@@ -38,12 +38,12 @@
struct CellAttributes;
#if COMPILER(GCC_COMPATIBLE)
-ALWAYS_INLINE void keepAlive(const void* pointer)
+ALWAYS_INLINE void ensureStillAliveHere(const void* pointer)
{
asm volatile ("" : : "r"(pointer) : "memory");
}
#else
-JS_EXPORT_PRIVATE void keepAlive(const void*);
+JS_EXPORT_PRIVATE void ensureStillAliveHere(const void*);
#endif
class HeapCell {
@@ -95,7 +95,7 @@
// but not the object itself.
ALWAYS_INLINE void use() const
{
- keepAlive(this);
+ ensureStillAliveHere(this);
}
};
Modified: trunk/Source/_javascript_Core/runtime/JSCJSValue.cpp (258824 => 258825)
--- trunk/Source/_javascript_Core/runtime/JSCJSValue.cpp 2020-03-23 00:40:46 UTC (rev 258824)
+++ trunk/Source/_javascript_Core/runtime/JSCJSValue.cpp 2020-03-23 04:57:06 UTC (rev 258825)
@@ -429,7 +429,7 @@
#if !COMPILER(GCC_COMPATIBLE)
// This makes the argument opaque from the compiler.
-NEVER_INLINE void keepAlive(JSValue)
+NEVER_INLINE void ensureStillAliveHere(JSValue)
{
}
#endif
Modified: trunk/Source/_javascript_Core/runtime/JSCJSValue.h (258824 => 258825)
--- trunk/Source/_javascript_Core/runtime/JSCJSValue.h 2020-03-23 00:40:46 UTC (rev 258824)
+++ trunk/Source/_javascript_Core/runtime/JSCJSValue.h 2020-03-23 04:57:06 UTC (rev 258825)
@@ -638,7 +638,7 @@
bool sameValue(JSGlobalObject*, JSValue a, JSValue b);
#if COMPILER(GCC_COMPATIBLE)
-ALWAYS_INLINE void keepAlive(JSValue value)
+ALWAYS_INLINE void ensureStillAliveHere(JSValue value)
{
#if USE(JSVALUE64)
asm volatile ("" : : "r"(bitwise_cast<uint64_t>(value)) : "memory");
@@ -647,7 +647,7 @@
#endif
}
#else
-JS_EXPORT_PRIVATE void keepAlive(JSValue);
+JS_EXPORT_PRIVATE void ensureStillAliveHere(JSValue);
#endif
} // namespace JSC
Modified: trunk/Source/_javascript_Core/wasm/js/WebAssemblyModuleRecord.cpp (258824 => 258825)
--- trunk/Source/_javascript_Core/wasm/js/WebAssemblyModuleRecord.cpp 2020-03-23 00:40:46 UTC (rev 258824)
+++ trunk/Source/_javascript_Core/wasm/js/WebAssemblyModuleRecord.cpp 2020-03-23 04:57:06 UTC (rev 258825)
@@ -428,7 +428,7 @@
JSWebAssemblyGlobal* globalValue = JSWebAssemblyGlobal::tryCreate(globalObject, vm, globalObject->webAssemblyGlobalStructure(), WTFMove(globalRef));
scope.assertNoException();
m_instance->linkGlobal(vm, globalIndex, globalValue);
- keepAlive(bitwise_cast<void*>(initialBits)); // Ensure this is kept alive while creating JSWebAssemblyGlobal.
+ ensureStillAliveHere(bitwise_cast<void*>(initialBits)); // Ensure this is kept alive while creating JSWebAssemblyGlobal.
break;
}
}