Skip to content

Commit d36f217

Browse files
committed
[JSC] Remove JSInternalPromise
https://bugs.webkit.org/show_bug.cgi?id=312428 rdar://174878581 Reviewed by Mark Lam. Now new module loader no longer uses JSInternalPromise, let's just remove that. * JSTests/microbenchmarks/internal-promise-internal-all.js: Removed. * JSTests/stress/internal-promise-constructor-not-confusing.js: Removed. * JSTests/stress/internal-promise-is-not-exposed.js: Removed. * Source/JavaScriptCore/API/JSContext.mm: * Source/JavaScriptCore/CMakeLists.txt: * Source/JavaScriptCore/DerivedSources-input.xcfilelist: * Source/JavaScriptCore/DerivedSources-output.xcfilelist: * Source/JavaScriptCore/DerivedSources.make: * Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj: * Source/JavaScriptCore/Sources.txt: * Source/JavaScriptCore/builtins/PromiseConstructor.js: (nakedConstructor.Promise): (nakedConstructor.InternalPromise): Deleted. * Source/JavaScriptCore/bytecode/BytecodeList.rb: * Source/JavaScriptCore/bytecode/LinkTimeConstant.h: * Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp: (JSC::BytecodeGenerator::BytecodeGenerator): (JSC::BytecodeGenerator::emitCreatePromise): (JSC::BytecodeGenerator::emitNewPromise): * Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h: * Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp: (JSC::BytecodeIntrinsicNode::emit_intrinsic_createPromise): (JSC::BytecodeIntrinsicNode::emit_intrinsic_newPromise): * Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h: (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects): * Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::parseBlock): * Source/JavaScriptCore/dfg/DFGConstantFoldingPhase.cpp: (JSC::DFG::ConstantFoldingPhase::foldConstants): * Source/JavaScriptCore/dfg/DFGGraph.cpp: (JSC::DFG::Graph::dump): * Source/JavaScriptCore/dfg/DFGNode.h: (JSC::DFG::Node::hasIsInternalPromise): Deleted. (JSC::DFG::Node::isInternalPromise): Deleted. * Source/JavaScriptCore/dfg/DFGObjectAllocationSinkingPhase.cpp: * Source/JavaScriptCore/dfg/DFGOperations.cpp: * Source/JavaScriptCore/dfg/DFGOperations.h: * Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp: * Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileNewInternalFieldObject): (JSC::FTL::DFG::LowerDFGToB3::compileCreatePromise): (JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq): * Source/JavaScriptCore/ftl/FTLOperations.cpp: (JSC::FTL::JSC_DEFINE_NOEXCEPT_JIT_OPERATION): * Source/JavaScriptCore/jit/JITOperations.cpp: * Source/JavaScriptCore/jit/JITOperations.h: * Source/JavaScriptCore/lol/LOLJITOperations.cpp: * Source/JavaScriptCore/runtime/CommonSlowPaths.cpp: (JSC::JSC_DEFINE_COMMON_SLOW_PATH): * Source/JavaScriptCore/runtime/GlobalObjectMethodTable.h: * Source/JavaScriptCore/runtime/JSGlobalObject.cpp: (JSC::JSGlobalObject::init): (JSC::JSGlobalObject::visitChildrenImpl): * Source/JavaScriptCore/runtime/JSGlobalObject.h: * Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp: * Source/JavaScriptCore/runtime/JSInternalPromise.cpp: Removed. * Source/JavaScriptCore/runtime/JSInternalPromise.h: Removed. * Source/JavaScriptCore/runtime/JSInternalPromiseConstructor.cpp: Removed. * Source/JavaScriptCore/runtime/JSInternalPromiseConstructor.h: Removed. * Source/JavaScriptCore/runtime/JSInternalPromisePrototype.cpp: Removed. * Source/JavaScriptCore/runtime/JSInternalPromisePrototype.h: Removed. * Source/JavaScriptCore/runtime/JSMicrotask.cpp: (JSC::runInternalMicrotask): (JSC::internalPromiseAllResolveJob): Deleted. * Source/JavaScriptCore/runtime/JSPromise.cpp: (JSC::JSPromise::resolveWithInternalMicrotaskForAsyncAwait): (JSC::JSPromise::isThenFastAndNonObservable): (JSC::JSPromise::then): * Source/JavaScriptCore/runtime/JSPromisePrototype.cpp: (JSC::promiseSpeciesWatchpointIsValid): * Source/JavaScriptCore/runtime/JSPromisePrototype.h: * Source/JavaScriptCore/runtime/Microtask.h: * Source/JavaScriptCore/runtime/ShadowRealmPrototype.cpp: (JSC::JSC_DEFINE_HOST_FUNCTION): * Source/JavaScriptCore/runtime/SyntheticModuleRecord.cpp: * Source/JavaScriptCore/runtime/SyntheticModuleRecord.h: * Source/WebCore/bindings/js/JSDOMGlobalObject.cpp: * Source/WebCore/bindings/js/JSDOMWindowBase.cpp: * Source/WebCore/bindings/js/ScriptController.cpp: * Source/WebCore/bindings/js/ScriptController.h: * Source/WebCore/bindings/js/ScriptModuleLoader.h: * Source/WebCore/workers/WorkerOrWorkletScriptController.cpp: Canonical link: https://commits.webkit.org/311382@main
1 parent ec67268 commit d36f217

55 files changed

Lines changed: 59 additions & 764 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎JSTests/microbenchmarks/internal-promise-internal-all.js‎

Lines changed: 0 additions & 12 deletions
This file was deleted.

‎JSTests/stress/internal-promise-constructor-not-confusing.js‎

Lines changed: 0 additions & 32 deletions
This file was deleted.

‎JSTests/stress/internal-promise-is-not-exposed.js‎

Lines changed: 0 additions & 6 deletions
This file was deleted.

‎Source/JavaScriptCore/API/JSContext.mm‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
#import "JSContextPrivate.h"
3636
#import "JSContextRefInternal.h"
3737
#import "JSGlobalObject.h"
38-
#import "JSInternalPromise.h"
3938
#import "JSModuleLoader.h"
4039
#import "JSRetainPtr.h"
4140
#import "JSScriptInternal.h"

‎Source/JavaScriptCore/CMakeLists.txt‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ set(JavaScriptCore_OBJECT_LUT_SOURCES
9090
runtime/IntlSegmentsPrototype.cpp
9191
runtime/JSDataViewPrototype.cpp
9292
runtime/JSGlobalObject.cpp
93-
runtime/JSInternalPromiseConstructor.cpp
9493
runtime/JSIterator.cpp
9594
runtime/JSIteratorConstructor.cpp
9695
runtime/JSIteratorHelperPrototype.cpp
@@ -1210,8 +1209,6 @@ set(JavaScriptCore_PRIVATE_FRAMEWORK_HEADERS
12101209
runtime/JSInt32Array.h
12111210
runtime/JSInt8Array.h
12121211
runtime/JSInternalFieldObjectImpl.h
1213-
runtime/JSInternalPromise.h
1214-
runtime/JSInternalPromiseConstructor.h
12151212
runtime/JSIteratorPrototype.h
12161213
runtime/JSLexicalEnvironment.h
12171214
runtime/JSLock.h

‎Source/JavaScriptCore/DerivedSources-input.xcfilelist‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ $(PROJECT_DIR)/runtime/IntlSegmenterPrototype.cpp
171171
$(PROJECT_DIR)/runtime/IntlSegmentsPrototype.cpp
172172
$(PROJECT_DIR)/runtime/JSDataViewPrototype.cpp
173173
$(PROJECT_DIR)/runtime/JSGlobalObject.cpp
174-
$(PROJECT_DIR)/runtime/JSInternalPromiseConstructor.cpp
175174
$(PROJECT_DIR)/runtime/JSIteratorHelperPrototype.cpp
176175
$(PROJECT_DIR)/runtime/JSModuleLoader.cpp
177176
$(PROJECT_DIR)/runtime/JSONObject.cpp

‎Source/JavaScriptCore/DerivedSources-output.xcfilelist‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ $(BUILT_PRODUCTS_DIR)/DerivedSources/JavaScriptCore/JSCBuiltins.cpp
4646
$(BUILT_PRODUCTS_DIR)/DerivedSources/JavaScriptCore/JSCBuiltins.h
4747
$(BUILT_PRODUCTS_DIR)/DerivedSources/JavaScriptCore/JSDataViewPrototype.lut.h
4848
$(BUILT_PRODUCTS_DIR)/DerivedSources/JavaScriptCore/JSGlobalObject.lut.h
49-
$(BUILT_PRODUCTS_DIR)/DerivedSources/JavaScriptCore/JSInternalPromiseConstructor.lut.h
5049
$(BUILT_PRODUCTS_DIR)/DerivedSources/JavaScriptCore/JSIteratorHelperPrototype.lut.h
5150
$(BUILT_PRODUCTS_DIR)/DerivedSources/JavaScriptCore/JSONObject.lut.h
5251
$(BUILT_PRODUCTS_DIR)/DerivedSources/JavaScriptCore/JSPromiseConstructor.lut.h

‎Source/JavaScriptCore/DerivedSources.make‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@ OBJECT_LUT_HEADERS = \
188188
IntlSegmentsPrototype.lut.h \
189189
JSDataViewPrototype.lut.h \
190190
JSGlobalObject.lut.h \
191-
JSInternalPromiseConstructor.lut.h \
192191
JSIteratorHelperPrototype.lut.h \
193192
JSONObject.lut.h \
194193
JSPromiseConstructor.lut.h \

‎Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj‎

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2044,9 +2044,6 @@
20442044
E33B33362B9BA14E0011E80F /* SharedJITStubSet.h in Headers */ = {isa = PBXBuildFile; fileRef = E33B33342B9BA14E0011E80F /* SharedJITStubSet.h */; };
20452045
E33BBE0925BFA0410053690F /* WasmStreamingCompiler.h in Headers */ = {isa = PBXBuildFile; fileRef = E33BBE0825BFA03C0053690F /* WasmStreamingCompiler.h */; settings = {ATTRIBUTES = (Private, ); }; };
20462046
E33E8D1D1B9013C300346B52 /* JSNativeStdFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = E33E8D1B1B9013C300346B52 /* JSNativeStdFunction.h */; settings = {ATTRIBUTES = (Private, ); }; };
2047-
E33F50751B8421C000413856 /* JSInternalPromisePrototype.h in Headers */ = {isa = PBXBuildFile; fileRef = E33F50731B8421C000413856 /* JSInternalPromisePrototype.h */; };
2048-
E33F50791B84225700413856 /* JSInternalPromiseConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = E33F50771B84225700413856 /* JSInternalPromiseConstructor.h */; settings = {ATTRIBUTES = (Private, ); }; };
2049-
E33F50811B8429A400413856 /* JSInternalPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = E33F507F1B8429A400413856 /* JSInternalPromise.h */; settings = {ATTRIBUTES = (Private, ); }; };
20502047
E3400EC122A1CC7B009DED54 /* FunctionExecutableInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = E3400EC022A1CC78009DED54 /* FunctionExecutableInlines.h */; };
20512048
E3443E3128E9711700C0020C /* ArrayPrototypeInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = E3443E3028E9711700C0020C /* ArrayPrototypeInlines.h */; };
20522049
E348876228F516C600527E5E /* ObjectPrototypeInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = E348876128F516C600527E5E /* ObjectPrototypeInlines.h */; };
@@ -5950,13 +5947,6 @@
59505947
E33BBE0825BFA03C0053690F /* WasmStreamingCompiler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WasmStreamingCompiler.h; sourceTree = "<group>"; };
59515948
E33E8D1A1B9013C300346B52 /* JSNativeStdFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSNativeStdFunction.cpp; sourceTree = "<group>"; };
59525949
E33E8D1B1B9013C300346B52 /* JSNativeStdFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSNativeStdFunction.h; sourceTree = "<group>"; };
5953-
E33F50721B8421C000413856 /* JSInternalPromisePrototype.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSInternalPromisePrototype.cpp; sourceTree = "<group>"; };
5954-
E33F50731B8421C000413856 /* JSInternalPromisePrototype.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSInternalPromisePrototype.h; sourceTree = "<group>"; };
5955-
E33F50761B84225700413856 /* JSInternalPromiseConstructor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSInternalPromiseConstructor.cpp; sourceTree = "<group>"; };
5956-
E33F50771B84225700413856 /* JSInternalPromiseConstructor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSInternalPromiseConstructor.h; sourceTree = "<group>"; };
5957-
E33F507E1B8429A400413856 /* JSInternalPromise.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSInternalPromise.cpp; sourceTree = "<group>"; };
5958-
E33F507F1B8429A400413856 /* JSInternalPromise.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSInternalPromise.h; sourceTree = "<group>"; };
5959-
E33F50861B8449EF00413856 /* JSInternalPromiseConstructor.lut.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSInternalPromiseConstructor.lut.h; sourceTree = "<group>"; };
59605950
E3400EC022A1CC78009DED54 /* FunctionExecutableInlines.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FunctionExecutableInlines.h; sourceTree = "<group>"; };
59615951
E3443E3028E9711700C0020C /* ArrayPrototypeInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArrayPrototypeInlines.h; sourceTree = "<group>"; };
59625952
E348876128F516C600527E5E /* ObjectPrototypeInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjectPrototypeInlines.h; sourceTree = "<group>"; };
@@ -8173,7 +8163,6 @@
81738163
A7D801A71880D6A80026C39B /* JSCBuiltins.h */,
81748164
996B730A1BD9FA2C00331B84 /* JSDataViewPrototype.lut.h */,
81758165
996B730B1BD9FA2C00331B84 /* JSGlobalObject.lut.h */,
8176-
E33F50861B8449EF00413856 /* JSInternalPromiseConstructor.lut.h */,
81778166
BC87CDB810712ACA000614CF /* JSONObject.lut.h */,
81788167
7C184E2417BFFA36007CB63A /* JSPromiseConstructor.lut.h */,
81798168
7C184E2517BFFA36007CB63A /* JSPromisePrototype.lut.h */,
@@ -8977,12 +8966,6 @@
89778966
0F2B66C917B6B5AB00A7AE3F /* JSInt8Array.h */,
89788967
E33095DC23210A1400EB7856 /* JSInternalFieldObjectImpl.h */,
89798968
E339700423210E0A00B0AE21 /* JSInternalFieldObjectImplInlines.h */,
8980-
E33F507E1B8429A400413856 /* JSInternalPromise.cpp */,
8981-
E33F507F1B8429A400413856 /* JSInternalPromise.h */,
8982-
E33F50761B84225700413856 /* JSInternalPromiseConstructor.cpp */,
8983-
E33F50771B84225700413856 /* JSInternalPromiseConstructor.h */,
8984-
E33F50721B8421C000413856 /* JSInternalPromisePrototype.cpp */,
8985-
E33F50731B8421C000413856 /* JSInternalPromisePrototype.h */,
89868969
05517C9F2C74004600ED0CD5 /* JSIterator.cpp */,
89878970
05517CA12C74004700ED0CD5 /* JSIterator.h */,
89888971
05517CA22C74004700ED0CD5 /* JSIteratorConstructor.cpp */,
@@ -11995,9 +11978,6 @@
1199511978
A76C51761182748D00715B05 /* JSInterfaceJIT.h in Headers */,
1199611979
E33095DD23210A1B00EB7856 /* JSInternalFieldObjectImpl.h in Headers */,
1199711980
E339700523210E0B00B0AE21 /* JSInternalFieldObjectImplInlines.h in Headers */,
11998-
E33F50811B8429A400413856 /* JSInternalPromise.h in Headers */,
11999-
E33F50791B84225700413856 /* JSInternalPromiseConstructor.h in Headers */,
12000-
E33F50751B8421C000413856 /* JSInternalPromisePrototype.h in Headers */,
1200111981
8AF85BDD2C9CE0E3005E28DA /* JSIteratorHelper.h in Headers */,
1200211982
8AF85BE22CA4EE90005E28DA /* JSIteratorHelperPrototype.h in Headers */,
1200311983
8AF85BE32CA4EE90005E28DA /* JSIteratorHelperPrototypeInlines.h in Headers */,

‎Source/JavaScriptCore/Sources.txt‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -938,9 +938,6 @@ runtime/JSGlobalObjectFunctions.cpp
938938
runtime/JSGlobalProxy.cpp
939939
runtime/JSCellButterfly.cpp
940940
runtime/JSHeapInt32.cpp
941-
runtime/JSInternalPromise.cpp
942-
runtime/JSInternalPromiseConstructor.cpp
943-
runtime/JSInternalPromisePrototype.cpp
944941
runtime/JSIterator.cpp
945942
runtime/JSIteratorConstructor.cpp
946943
runtime/JSIteratorHelper.cpp

0 commit comments

Comments
 (0)