Changeset 289863 in webkit
- Timestamp:
- Feb 15, 2022, 4:42:15 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r289823 r289863 1 2022-02-15 Mark Lam <mark.lam@apple.com> 2 3 Make HeapType an enum class. 4 https://bugs.webkit.org/show_bug.cgi?id=236667 5 <rdar://problem/88984607> 6 7 Reviewed by Yusuke Suzuki. 8 9 * dynbench.cpp: 10 * heap/Heap.cpp: 11 * heap/Heap.h: 12 * jsc.cpp: 13 (runJSC): 14 * runtime/VM.cpp: 15 (JSC::VM::sharedInstance): 16 * runtime/VM.h: 17 * testRegExp.cpp: 18 (realMain): 19 1 20 2022-02-15 Elliott Williams <emw@apple.com> 2 21 -
trunk/Source/JavaScriptCore/dynbench.cpp
r278069 r289863 1 1 /* 2 * Copyright (C) 2015-20 19Apple Inc. All rights reserved.2 * Copyright (C) 2015-2022 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 92 92 JSC::initialize(); 93 93 94 VM& vm = VM::create( LargeHeap).leakRef();94 VM& vm = VM::create(HeapType::Large).leakRef(); 95 95 { 96 96 JSLockHolder locker(vm); -
trunk/Source/JavaScriptCore/heap/Heap.cpp
r289417 r289863 1 1 /* 2 * Copyright (C) 2003-202 1Apple Inc. All rights reserved.2 * Copyright (C) 2003-2022 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> 4 4 * … … 115 115 size_t minHeapSize(HeapType heapType, size_t ramSize) 116 116 { 117 if (heapType == LargeHeap) {117 if (heapType == HeapType::Large) { 118 118 double result = std::min( 119 119 static_cast<double>(Options::largeHeapSize()), -
trunk/Source/JavaScriptCore/heap/Heap.h
r289417 r289863 2 2 * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) 3 3 * Copyright (C) 2001 Peter Kelly (pmk@post.com) 4 * Copyright (C) 2003-202 1Apple Inc. All rights reserved.4 * Copyright (C) 2003-2022 Apple Inc. All rights reserved. 5 5 * 6 6 * This library is free software; you can redistribute it and/or … … 110 110 typedef HashCountedSet<const char*> TypeCountSet; 111 111 112 enum HeapType { SmallHeap, LargeHeap};112 enum class HeapType : uint8_t { Small, Large }; 113 113 114 114 class HeapUtil; -
trunk/Source/JavaScriptCore/jsc.cpp
r289417 r289863 1 1 /* 2 2 * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) 3 * Copyright (C) 2004-202 1Apple Inc. All rights reserved.3 * Copyright (C) 2004-2022 Apple Inc. All rights reserved. 4 4 * Copyright (C) 2006 Bjoern Graf (bjoern.graf@gmail.com) 5 5 * … … 3605 3605 Worker worker(Workers::singleton()); 3606 3606 3607 VM& vm = VM::create( LargeHeap).leakRef();3607 VM& vm = VM::create(HeapType::Large).leakRef(); 3608 3608 if (!isWorker && options.m_canBlockIsFalse) 3609 3609 vm.m_typedArrayController = adoptRef(new JSC::SimpleTypedArrayController(false)); -
trunk/Source/JavaScriptCore/runtime/VM.cpp
r289417 r289863 552 552 VM*& instance = sharedInstanceInternal(); 553 553 if (!instance) 554 instance = adoptRef(new VM(APIShared, SmallHeap)).leakRef();554 instance = adoptRef(new VM(APIShared, HeapType::Small)).leakRef(); 555 555 return *instance; 556 556 } -
trunk/Source/JavaScriptCore/runtime/VM.h
r289417 r289863 254 254 JS_EXPORT_PRIVATE static VM& sharedInstance(); 255 255 256 JS_EXPORT_PRIVATE static Ref<VM> create(HeapType = SmallHeap, WTF::RunLoop* = nullptr);257 JS_EXPORT_PRIVATE static RefPtr<VM> tryCreate(HeapType = SmallHeap, WTF::RunLoop* = nullptr);258 static Ref<VM> createContextGroup(HeapType = SmallHeap);256 JS_EXPORT_PRIVATE static Ref<VM> create(HeapType = HeapType::Small, WTF::RunLoop* = nullptr); 257 JS_EXPORT_PRIVATE static RefPtr<VM> tryCreate(HeapType = HeapType::Small, WTF::RunLoop* = nullptr); 258 static Ref<VM> createContextGroup(HeapType = HeapType::Small); 259 259 JS_EXPORT_PRIVATE ~VM(); 260 260 -
trunk/Source/JavaScriptCore/testRegExp.cpp
r285730 r289863 1 1 /* 2 * Copyright (C) 2011-202 1Apple Inc. All rights reserved.2 * Copyright (C) 2011-2022 Apple Inc. All rights reserved. 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 517 517 int realMain(int argc, char** argv) 518 518 { 519 VM* vm = &VM::create( LargeHeap).leakRef();519 VM* vm = &VM::create(HeapType::Large).leakRef(); 520 520 JSLockHolder locker(vm); 521 521 -
trunk/Source/WebCore/ChangeLog
r289862 r289863 1 2022-02-15 Mark Lam <mark.lam@apple.com> 2 3 Make HeapType an enum class. 4 https://bugs.webkit.org/show_bug.cgi?id=236667 5 <rdar://problem/88984607> 6 7 Reviewed by Yusuke Suzuki. 8 9 * bindings/js/CommonVM.cpp: 10 (WebCore::commonVMSlow): 11 1 12 2022-02-15 Nikolaos Mouchtaris <nmouchtaris@apple.com> 2 13 -
trunk/Source/WebCore/bindings/js/CommonVM.cpp
r275013 r289863 1 1 /* 2 * Copyright (C) 2016-202 0Apple Inc. All rights reserved.2 * Copyright (C) 2016-2022 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 62 62 #endif 63 63 64 auto& vm = JSC::VM::create(JSC:: LargeHeap, runLoop).leakRef();64 auto& vm = JSC::VM::create(JSC::HeapType::Large, runLoop).leakRef(); 65 65 66 66 g_commonVMOrNull = &vm; -
trunk/Tools/ChangeLog
r289856 r289863 1 2022-02-15 Mark Lam <mark.lam@apple.com> 2 3 Make HeapType an enum class. 4 https://bugs.webkit.org/show_bug.cgi?id=236667 5 <rdar://problem/88984607> 6 7 Reviewed by Yusuke Suzuki. 8 9 * TestWebKitAPI/Tests/JavaScriptCore/DisallowVMEntry.cpp: 10 (TestWebKitAPI::TEST): 11 * TestWebKitAPI/Tests/JavaScriptCore/PropertySlot.cpp: 12 (TestWebKitAPI::TEST): 13 1 14 2022-02-15 Jonathan Bedard <jbedard@apple.com> 2 15 -
trunk/Tools/TestWebKitAPI/Tests/JavaScriptCore/DisallowVMEntry.cpp
r264937 r289863 1 1 /* 2 * Copyright (C) 2020 Apple Inc. All rights reserved.2 * Copyright (C) 2020-2022 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 33 33 using JSC::DisallowVMEntry; 34 34 using JSC::JSLockHolder; 35 using JSC:: LargeHeap;35 using JSC::HeapType; 36 36 using JSC::VM; 37 37 … … 52 52 JSC::initialize(); 53 53 54 VM& vm = VM::create( LargeHeap).leakRef();54 VM& vm = VM::create(HeapType::Large).leakRef(); 55 55 { 56 56 JSLockHolder locker(vm); … … 66 66 JSC::initialize(); 67 67 68 VM& vm = VM::create( LargeHeap).leakRef();68 VM& vm = VM::create(HeapType::Large).leakRef(); 69 69 { 70 70 JSLockHolder locker(vm); … … 90 90 JSC::initialize(); 91 91 92 VM& vm = VM::create( LargeHeap).leakRef();92 VM& vm = VM::create(HeapType::Large).leakRef(); 93 93 { 94 94 JSLockHolder locker(vm); -
trunk/Tools/TestWebKitAPI/Tests/JavaScriptCore/PropertySlot.cpp
r264937 r289863 1 1 /* 2 * Copyright (C) 2020 Apple Inc. All rights reserved.2 * Copyright (C) 2020-2022 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 33 33 34 34 using JSC::JSLockHolder; 35 using JSC:: LargeHeap;35 using JSC::HeapType; 36 36 using JSC::PropertySlot; 37 37 using JSC::VM; … … 43 43 JSC::initialize(); 44 44 45 VM& vm = VM::create( LargeHeap).leakRef();45 VM& vm = VM::create(HeapType::Large).leakRef(); 46 46 { 47 47 JSLockHolder locker(vm); … … 79 79 JSC::initialize(); 80 80 81 VM& vm = VM::create( LargeHeap).leakRef();81 VM& vm = VM::create(HeapType::Large).leakRef(); 82 82 { 83 83 JSLockHolder locker(vm); … … 103 103 JSC::initialize(); 104 104 105 VM& vm = VM::create( LargeHeap).leakRef();105 VM& vm = VM::create(HeapType::Large).leakRef(); 106 106 { 107 107 JSLockHolder locker(vm);
Note:
See TracChangeset
for help on using the changeset viewer.