WebKit Bugzilla
Attachment 340173 Details for
Bug 185539
: Don't use inferred types when the JIT is disabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for landing
b-backup.diff (text/plain), 3.26 KB, created by
Saam Barati
on 2018-05-10 23:05:26 PDT
(
hide
)
Description:
patch for landing
Filename:
MIME Type:
Creator:
Saam Barati
Created:
2018-05-10 23:05:26 PDT
Size:
3.26 KB
patch
obsolete
>Index: Source/JavaScriptCore/ChangeLog >=================================================================== >--- Source/JavaScriptCore/ChangeLog (revision 231692) >+++ Source/JavaScriptCore/ChangeLog (working copy) >@@ -1,3 +1,20 @@ >+2018-05-10 Saam Barati <sbarati@apple.com> >+ >+ Don't use inferred types when the JIT is disabled >+ https://bugs.webkit.org/show_bug.cgi?id=185539 >+ >+ Reviewed by Yusuke Suzuki. >+ >+ There are many JSC API clients that run with the JIT disabled. They were >+ all allocating and tracking inferred types for no benefit. Inferred types >+ only benefit programs when they make it to the DFG/FTL. I was seeing cases >+ where the inferred type machinery used ~0.5MB. This patch makes is so we >+ don't allocate that machinery when the JIT is disabled. >+ >+ * runtime/Structure.cpp: >+ (JSC::Structure::willStoreValueSlow): >+ * runtime/Structure.h: >+ > 2018-05-10 Yusuke Suzuki <utatane.tea@gmail.com> > > [JSC] Make return types of construction functions tight >Index: Source/JavaScriptCore/runtime/Structure.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/Structure.cpp (revision 231687) >+++ Source/JavaScriptCore/runtime/Structure.cpp (working copy) >@@ -895,6 +895,8 @@ void Structure::willStoreValueSlow( > ASSERT(structure()->classInfo() == info()); > ASSERT(!hasBeenDictionary()); > >+ ASSERT_WITH_MESSAGE(VM::canUseJIT(), "We don't want to use memory for inferred types unless we're using the JIT."); >+ > // Create the inferred type table before doing anything else, so that we don't GC after we have already > // grabbed a pointer into the property map. > InferredTypeTable* table = m_inferredTypeTable.get(); >Index: Source/JavaScriptCore/runtime/Structure.h >=================================================================== >--- Source/JavaScriptCore/runtime/Structure.h (revision 231687) >+++ Source/JavaScriptCore/runtime/Structure.h (working copy) >@@ -608,7 +608,7 @@ public: > ALWAYS_INLINE void willStoreValueForNewTransition( > VM& vm, PropertyName propertyName, JSValue value, bool shouldOptimize) > { >- if (hasBeenDictionary() || (!shouldOptimize && !m_inferredTypeTable)) >+ if (hasBeenDictionary() || (!shouldOptimize && !m_inferredTypeTable) || !VM::canUseJIT()) > return; > willStoreValueSlow(vm, propertyName, value, shouldOptimize, InferredTypeTable::NewProperty); > } >@@ -619,7 +619,7 @@ public: > ALWAYS_INLINE void willStoreValueForExistingTransition( > VM& vm, PropertyName propertyName, JSValue value, bool shouldOptimize) > { >- if (hasBeenDictionary() || !m_inferredTypeTable) >+ if (hasBeenDictionary() || !m_inferredTypeTable || !VM::canUseJIT()) > return; > willStoreValueSlow(vm, propertyName, value, shouldOptimize, InferredTypeTable::NewProperty); > } >@@ -628,7 +628,7 @@ public: > ALWAYS_INLINE void willStoreValueForReplace( > VM& vm, PropertyName propertyName, JSValue value, bool shouldOptimize) > { >- if (hasBeenDictionary()) >+ if (hasBeenDictionary() || !VM::canUseJIT()) > return; > willStoreValueSlow(vm, propertyName, value, shouldOptimize, InferredTypeTable::OldProperty); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185539
:
340169
| 340173