WebKit Bugzilla
Attachment 360919 Details for
Bug 194177
: [JSC] Remove some of IsoSubspaces for JSFunction subclasses
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194177-20190201160714.patch (text/plain), 6.44 KB, created by
Yusuke Suzuki
on 2019-02-01 16:07:15 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Yusuke Suzuki
Created:
2019-02-01 16:07:15 PST
Size:
6.44 KB
patch
obsolete
>Subversion Revision: 240886 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index d021748c656098946963b214db46718f6b85a03b..2f1178ce6ce21fd3b5386ad4a43093722bb597c5 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,20 @@ >+2019-02-01 Yusuke Suzuki <ysuzuki@apple.com> >+ >+ [JSC] Remove some of IsoSubspaces for JSFunction subclasses >+ https://bugs.webkit.org/show_bug.cgi?id=194177 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ JSGeneratorFunction, JSAsyncFunction, and JSAsyncGeneratorFunction do not add any fields / classInfo methods. >+ We can share the IsoSubspace for JSFunction. >+ >+ * runtime/JSAsyncFunction.h: >+ * runtime/JSAsyncGeneratorFunction.h: >+ * runtime/JSGeneratorFunction.h: >+ * runtime/VM.cpp: >+ (JSC::VM::VM): >+ * runtime/VM.h: >+ > 2019-02-01 Mark Lam <mark.lam@apple.com> > > Remove invalid assertion in DFG's compileDoubleRep(). >diff --git a/Source/JavaScriptCore/runtime/JSAsyncFunction.h b/Source/JavaScriptCore/runtime/JSAsyncFunction.h >index 459d5a9f77a6f261f8cdb8ac968b13c37c22a2a0..9b98ea28efea48e8a9e781cab18f92c6121f46fd 100644 >--- a/Source/JavaScriptCore/runtime/JSAsyncFunction.h >+++ b/Source/JavaScriptCore/runtime/JSAsyncFunction.h >@@ -41,7 +41,7 @@ class JSAsyncFunction final : public JSFunction { > template<typename CellType> > static IsoSubspace* subspaceFor(VM& vm) > { >- return &vm.asyncFunctionSpace; >+ return &vm.functionSpace; > } > > DECLARE_EXPORT_INFO; >@@ -67,5 +67,6 @@ class JSAsyncFunction final : public JSFunction { > > static JSAsyncFunction* createImpl(VM&, FunctionExecutable*, JSScope*, Structure*); > }; >+static_assert(sizeof(JSAsyncFunction) == sizeof(JSFunction), "Some subclasses of JSFunction should be the same size to share IsoSubspace"); > > } // namespace JSC >diff --git a/Source/JavaScriptCore/runtime/JSAsyncGeneratorFunction.h b/Source/JavaScriptCore/runtime/JSAsyncGeneratorFunction.h >index a38c6225ba816a5e379587e4c2b6d141251f7aee..06c072bcd887813ef51bc24863d5ad474bb9dfcf 100644 >--- a/Source/JavaScriptCore/runtime/JSAsyncGeneratorFunction.h >+++ b/Source/JavaScriptCore/runtime/JSAsyncGeneratorFunction.h >@@ -41,7 +41,7 @@ class JSAsyncGeneratorFunction final : public JSFunction { > template<typename CellType> > static IsoSubspace* subspaceFor(VM& vm) > { >- return &vm.asyncGeneratorFunctionSpace; >+ return &vm.functionSpace; > } > > DECLARE_EXPORT_INFO; >@@ -80,5 +80,6 @@ class JSAsyncGeneratorFunction final : public JSFunction { > > static JSAsyncGeneratorFunction* createImpl(VM&, FunctionExecutable*, JSScope*, Structure*); > }; >+static_assert(sizeof(JSAsyncGeneratorFunction) == sizeof(JSFunction), "Some subclasses of JSFunction should be the same size to share IsoSubspace"); > > } // namespace JSC >diff --git a/Source/JavaScriptCore/runtime/JSGeneratorFunction.h b/Source/JavaScriptCore/runtime/JSGeneratorFunction.h >index 0e88fc735cb92a72b1c0b495b7fa630c25fe9490..ee5ac42a806d49786779fe5c1360b9edbe8ef46a 100644 >--- a/Source/JavaScriptCore/runtime/JSGeneratorFunction.h >+++ b/Source/JavaScriptCore/runtime/JSGeneratorFunction.h >@@ -69,7 +69,7 @@ class JSGeneratorFunction final : public JSFunction { > template<typename CellType> > static IsoSubspace* subspaceFor(VM& vm) > { >- return &vm.generatorFunctionSpace; >+ return &vm.functionSpace; > } > > DECLARE_EXPORT_INFO; >@@ -97,5 +97,6 @@ class JSGeneratorFunction final : public JSFunction { > > friend class LLIntOffsetsExtractor; > }; >+static_assert(sizeof(JSGeneratorFunction) == sizeof(JSFunction), "Some subclasses of JSFunction should be the same size to share IsoSubspace"); > > } // namespace JSC >diff --git a/Source/JavaScriptCore/runtime/VM.cpp b/Source/JavaScriptCore/runtime/VM.cpp >index fa6a3fbd79861a4aec01a59fa6ca9db8e91a265d..30afc6ab9cb4c4417191642e69b5f2ecd0d21870 100644 >--- a/Source/JavaScriptCore/runtime/VM.cpp >+++ b/Source/JavaScriptCore/runtime/VM.cpp >@@ -287,14 +287,11 @@ VM::VM(VMType vmType, HeapType heapType) > , destructibleObjectSpace("JSDestructibleObject", heap, destructibleObjectHeapCellType.get(), fastMallocAllocator.get()) > , eagerlySweptDestructibleObjectSpace("Eagerly Swept JSDestructibleObject", heap, destructibleObjectHeapCellType.get(), fastMallocAllocator.get()) > , segmentedVariableObjectSpace("JSSegmentedVariableObjectSpace", heap, segmentedVariableObjectHeapCellType.get(), fastMallocAllocator.get()) >- , asyncFunctionSpace ISO_SUBSPACE_INIT(heap, cellHeapCellType.get(), JSAsyncFunction) >- , asyncGeneratorFunctionSpace ISO_SUBSPACE_INIT(heap, cellHeapCellType.get(), JSAsyncGeneratorFunction) > , boundFunctionSpace ISO_SUBSPACE_INIT(heap, cellHeapCellType.get(), JSBoundFunction) > , callbackFunctionSpace ISO_SUBSPACE_INIT(heap, destructibleObjectHeapCellType.get(), JSCallbackFunction) > , customGetterSetterFunctionSpace ISO_SUBSPACE_INIT(heap, cellHeapCellType.get(), JSCustomGetterSetterFunction) > , executableToCodeBlockEdgeSpace ISO_SUBSPACE_INIT(heap, cellHeapCellType.get(), ExecutableToCodeBlockEdge) > , functionSpace ISO_SUBSPACE_INIT(heap, cellHeapCellType.get(), JSFunction) >- , generatorFunctionSpace ISO_SUBSPACE_INIT(heap, cellHeapCellType.get(), JSGeneratorFunction) > , inferredValueSpace ISO_SUBSPACE_INIT(heap, destructibleCellHeapCellType.get(), InferredValue) > , internalFunctionSpace ISO_SUBSPACE_INIT(heap, destructibleObjectHeapCellType.get(), InternalFunction) > , nativeExecutableSpace ISO_SUBSPACE_INIT(heap, destructibleCellHeapCellType.get(), NativeExecutable) >diff --git a/Source/JavaScriptCore/runtime/VM.h b/Source/JavaScriptCore/runtime/VM.h >index 4d6f2c615c2662d642350d463d09ee638799de25..8abaa20b154226ec2189d27f0cda7da667c56ab2 100644 >--- a/Source/JavaScriptCore/runtime/VM.h >+++ b/Source/JavaScriptCore/runtime/VM.h >@@ -366,14 +366,11 @@ class VM : public ThreadSafeRefCounted<VM>, public DoublyLinkedListNode<VM> { > CompleteSubspace eagerlySweptDestructibleObjectSpace; > CompleteSubspace segmentedVariableObjectSpace; > >- IsoSubspace asyncFunctionSpace; >- IsoSubspace asyncGeneratorFunctionSpace; > IsoSubspace boundFunctionSpace; > IsoSubspace callbackFunctionSpace; > IsoSubspace customGetterSetterFunctionSpace; > IsoSubspace executableToCodeBlockEdgeSpace; > IsoSubspace functionSpace; >- IsoSubspace generatorFunctionSpace; > IsoSubspace inferredValueSpace; > IsoSubspace internalFunctionSpace; > IsoSubspace nativeExecutableSpace;
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
Flags:
saam
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194177
: 360919