Changeset 258824 in webkit
- Timestamp:
- Mar 22, 2020 5:40:46 PM (4 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r258801 r258824 1 2020-03-22 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [JSC] Add JSC::keepAlive(JSValue) 4 https://bugs.webkit.org/show_bug.cgi?id=209398 5 6 Reviewed by Mark Lam. 7 8 Add JSC::keepAlive(JSValue). This is useful to make some JSValue variable alive from GC. 9 10 * heap/HeapCell.cpp: 11 * runtime/JSCJSValue.cpp: 12 (JSC::keepAlive): 13 * runtime/JSCJSValue.h: 14 (JSC::keepAlive): 15 1 16 2020-03-20 Ross Kirsling <ross.kirsling@sony.com> 2 17 -
trunk/Source/JavaScriptCore/heap/HeapCell.cpp
r253074 r258824 44 44 45 45 #if !COMPILER(GCC_COMPATIBLE) 46 // This makes the argument opaque from the compiler. 46 47 NEVER_INLINE void keepAlive(const void*) 47 48 { -
trunk/Source/JavaScriptCore/runtime/JSCJSValue.cpp
r253648 r258824 428 428 } 429 429 430 #if !COMPILER(GCC_COMPATIBLE) 431 // This makes the argument opaque from the compiler. 432 NEVER_INLINE void keepAlive(JSValue) 433 { 434 } 435 #endif 436 430 437 } // namespace JSC -
trunk/Source/JavaScriptCore/runtime/JSCJSValue.h
r257399 r258824 638 638 bool sameValue(JSGlobalObject*, JSValue a, JSValue b); 639 639 640 #if COMPILER(GCC_COMPATIBLE) 641 ALWAYS_INLINE void keepAlive(JSValue value) 642 { 643 #if USE(JSVALUE64) 644 asm volatile ("" : : "r"(bitwise_cast<uint64_t>(value)) : "memory"); 645 #else 646 asm volatile ("" : : "r"(value.payload()) : "memory"); 647 #endif 648 } 649 #else 650 JS_EXPORT_PRIVATE void keepAlive(JSValue); 651 #endif 652 640 653 } // namespace JSC
Note: See TracChangeset
for help on using the changeset viewer.