Skip to content

Commit 94afdd5

Browse files
author
Justin Michaud
committed
Inline Cache delete by id/val
https://bugs.webkit.org/show_bug.cgi?id=207522 JSTests: Reviewed by Keith Miller and Filip Pizlo. * microbenchmarks/delete-property-from-prototype-chain.js: (delete.C.prototype.z): * microbenchmarks/delete-property-inline-cache-polymorphic.js: Added. (C): (noInline.C.foo): (noInline.foo.F): (noInline.F): * microbenchmarks/delete-property-inline-cache.js: Added. (C): (noInline.C.D): (noInline.D.foo): (noInline.foo.E): (noInline.E.F): (noInline.F): * microbenchmarks/delete-property-keeps-cacheable-structure.js: * stress/delete-property-check-structure-transition.js: (sd): Deleted. (testDeleteIsNotUncacheable): Deleted. (): Deleted. (testCanFlatten): Deleted. (testDeleteWithInlineCache.Object.prototype.globalProperty.42.makeFoo): Deleted. (testDeleteWithInlineCache.noInline.doTest): Deleted. (testDeleteWithInlineCache): Deleted. * stress/delete-property-inline-cache.js: Added. (assert): (assert_eq): (assert_neq): (assert_throws): (noInline.assert.noInline.assert_eq.noInline.assert_neq.noInline.assert_throws.testCacheableDeleteById.makeFoo): (noInline.assert.noInline.assert_eq.noInline.assert_neq.noInline.assert_throws.testCacheableDeleteById): (noInline.testCacheableDeleteById.testCacheableDeleteByVal.makeFoo2): (noInline.testCacheableDeleteById.testCacheableDeleteByVal): (noInline.testCacheableDeleteByVal.testCacheableEmptyDeleteById.makeFoo3): (noInline.testCacheableDeleteByVal.testCacheableEmptyDeleteById): (noInline.testCacheableEmptyDeleteById.testCacheableDeleteByIdMiss.makeFoo4): (noInline.testCacheableEmptyDeleteById.testCacheableDeleteByIdMiss): (noInline.testCacheableDeleteByIdMiss.testDeleteIndex.makeFoo5): (noInline.testCacheableDeleteByIdMiss.testDeleteIndex): (noInline.testDeleteIndex.testPolymorphicDelByVal.makeFoo6): (noInline.testDeleteIndex.testPolymorphicDelByVal): (noInline.testPolymorphicDelByVal.testBigintDeleteByVal.makeFoo7): (noInline.testPolymorphicDelByVal.testBigintDeleteByVal): (noInline.testBigintDeleteByVal.testSymbolDeleteByVal.makeFoo8): (noInline.testBigintDeleteByVal.testSymbolDeleteByVal): (noInline.testSymbolDeleteByVal.testObjDeleteByVal.makeFoo9): (noInline.testSymbolDeleteByVal.testObjDeleteByVal): (noInline.testObjDeleteByVal.testStrict.makeFoo10): (noInline.testObjDeleteByVal.testStrict): (noInline.testStrict.testOverride.arr.j): (noInline.testStrict.testOverride): (noInline.testOverride.testNonObject.deleteIt): (noInline.testOverride.testNonObject): (noInline.testNonObject.testNonObjectStrict.deleteIt): (noInline.testNonObject.testNonObjectStrict): (noInline.testNonObjectStrict.testExceptionUnwind.mutateThem): (noInline.testNonObjectStrict.testExceptionUnwind.noInline.deleteIt): (noInline.testNonObjectStrict.testExceptionUnwind): (noInline.testExceptionUnwind.testTDZ): (noInline.testTDZ): Source/JavaScriptCore: Reviewed by Keith Miller and Filip Pizlo. We add inline caching for deleteById/val for baseline only. We also fix a concurrency bug in ICStats used for testing. We add three new access cases (no inline code is emitted at this time): - Delete is a cached delete of an existing property - DeleteMiss is a delete of a property that does not exist - DeleteNonConfigurable is a delete of a property that exists, but should not be deleted. There are no conditions required for these caches, since the structure id must change and the prototype does not matter. This gives the following microbenchmark results: delete-property-keeps-cacheable-structure (neutral) delete-property-inline-cache definitely 3.9096x faster delete-property-inline-cache-polymorphic definitely 1.5239x faster delete-property-from-prototype-chain (neutral) * API/JSCallbackObject.h: * API/JSCallbackObjectFunctions.h: (JSC::JSCallbackObject<Parent>::deleteProperty): (JSC::JSCallbackObject<Parent>::deletePropertyByIndex): * API/JSObjectRef.cpp: (JSObjectDeletePropertyForKey): (JSObjectDeleteProperty): * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * bytecode/AccessCase.cpp: (JSC::AccessCase::create): (JSC::AccessCase::createTransition): (JSC::AccessCase::createDelete): (JSC::AccessCase::requiresIdentifierNameMatch const): (JSC::AccessCase::requiresInt32PropertyCheck const): (JSC::AccessCase::needsScratchFPR const): (JSC::AccessCase::forEachDependentCell const): (JSC::AccessCase::doesCalls const): (JSC::AccessCase::canReplace const): (JSC::AccessCase::dump const): (JSC::AccessCase::propagateTransitions const): (JSC::AccessCase::generateImpl): * bytecode/AccessCase.h: (JSC::AccessCase::structure const): (JSC::AccessCase::newStructure const): * bytecode/PolymorphicAccess.cpp: (WTF::printInternal): * bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::reset): * bytecode/StructureStubInfo.h: * debugger/DebuggerScope.cpp: (JSC::DebuggerScope::deleteProperty): * debugger/DebuggerScope.h: * dfg/DFGFixupPhase.cpp: (JSC::DFG::FixupPhase::fixupNode): * dfg/DFGJITCompiler.cpp: (JSC::DFG::JITCompiler::link): * dfg/DFGJITCompiler.h: (JSC::DFG::JITCompiler::addDelById): (JSC::DFG::JITCompiler::addDelByVal): * dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::compileDeleteById): Deleted. (JSC::DFG::SpeculativeJIT::compileDeleteByVal): Deleted. * dfg/DFGSpeculativeJIT32_64.cpp: (JSC::DFG::SpeculativeJIT::compileDeleteById): (JSC::DFG::SpeculativeJIT::compileDeleteByVal): * dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::compileDeleteById): (JSC::DFG::SpeculativeJIT::compileDeleteByVal): * ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileDelBy): (JSC::FTL::DFG::LowerDFGToB3::compileDeleteById): (JSC::FTL::DFG::LowerDFGToB3::compileDeleteByVal): * jit/ICStats.h: * jit/JIT.cpp: (JSC::JIT::privateCompileSlowCases): (JSC::JIT::link): * jit/JIT.h: * jit/JITInlineCacheGenerator.cpp: (JSC::JITDelByValGenerator::JITDelByValGenerator): (JSC::JITDelByValGenerator::generateFastPath): (JSC::JITDelByValGenerator::finalize): (JSC::JITDelByIdGenerator::JITDelByIdGenerator): (JSC::JITDelByIdGenerator::generateFastPath): (JSC::JITDelByIdGenerator::finalize): * jit/JITInlineCacheGenerator.h: (JSC::JITDelByValGenerator::JITDelByValGenerator): (JSC::JITDelByValGenerator::slowPathJump const): (JSC::JITDelByIdGenerator::JITDelByIdGenerator): (JSC::JITDelByIdGenerator::slowPathJump const): * jit/JITOperations.cpp: * jit/JITOperations.h: * jit/JITPropertyAccess.cpp: (JSC::JIT::emit_op_del_by_id): (JSC::JIT::emitSlow_op_del_by_id): (JSC::JIT::emit_op_del_by_val): (JSC::JIT::emitSlow_op_del_by_val): * jit/JITPropertyAccess32_64.cpp: (JSC::JIT::emit_op_del_by_id): (JSC::JIT::emit_op_del_by_val): (JSC::JIT::emitSlow_op_del_by_val): (JSC::JIT::emitSlow_op_del_by_id): * jit/Repatch.cpp: (JSC::tryCachePutByID): (JSC::tryCacheDelBy): (JSC::repatchDelBy): (JSC::resetPutByID): (JSC::resetDelBy): * jit/Repatch.h: * llint/LLIntSlowPaths.cpp: (JSC::LLInt::LLINT_SLOW_PATH_DECL): * runtime/CacheableIdentifierInlines.h: (JSC::CacheableIdentifier::CacheableIdentifier): * runtime/ClassInfo.h: * runtime/ClonedArguments.cpp: (JSC::ClonedArguments::deleteProperty): * runtime/ClonedArguments.h: * runtime/CommonSlowPaths.cpp: (JSC::SLOW_PATH_DECL): * runtime/DeletePropertySlot.h: Added. (JSC::DeletePropertySlot::DeletePropertySlot): (JSC::DeletePropertySlot::setConfigurableMiss): (JSC::DeletePropertySlot::setNonconfigurable): (JSC::DeletePropertySlot::setHit): (JSC::DeletePropertySlot::isCacheableDelete const): (JSC::DeletePropertySlot::isDeleteHit const): (JSC::DeletePropertySlot::isConfigurableDeleteMiss const): (JSC::DeletePropertySlot::isNonconfigurable const): (JSC::DeletePropertySlot::cachedOffset const): (JSC::DeletePropertySlot::disableCaching): (JSC::DeletePropertySlot::isCacheable const): * runtime/ErrorConstructor.cpp: (JSC::ErrorConstructor::deleteProperty): * runtime/ErrorConstructor.h: * runtime/ErrorInstance.cpp: (JSC::ErrorInstance::deleteProperty): * runtime/ErrorInstance.h: * runtime/GenericArguments.h: * runtime/GenericArgumentsInlines.h: (JSC::GenericArguments<Type>::put): (JSC::GenericArguments<Type>::deleteProperty): * runtime/GetterSetter.h: * runtime/JSArray.cpp: (JSC::JSArray::deleteProperty): * runtime/JSArray.h: * runtime/JSCJSValue.h: * runtime/JSCell.cpp: (JSC::JSCell::deleteProperty): * runtime/JSCell.h: * runtime/JSDataView.cpp: (JSC::JSDataView::deleteProperty): * runtime/JSDataView.h: * runtime/JSFunction.cpp: (JSC::JSFunction::deleteProperty): * runtime/JSFunction.h: * runtime/JSGenericTypedArrayView.h: * runtime/JSGenericTypedArrayViewInlines.h: (JSC::JSGenericTypedArrayView<Adaptor>::deleteProperty): (JSC::JSGenericTypedArrayView<Adaptor>::deletePropertyByIndex): * runtime/JSGlobalObject.cpp: (JSC::JSGlobalObject::addFunction): * runtime/JSLexicalEnvironment.cpp: (JSC::JSLexicalEnvironment::deleteProperty): * runtime/JSLexicalEnvironment.h: * runtime/JSModuleEnvironment.cpp: (JSC::JSModuleEnvironment::deleteProperty): * runtime/JSModuleEnvironment.h: * runtime/JSModuleNamespaceObject.cpp: (JSC::JSModuleNamespaceObject::deleteProperty): * runtime/JSModuleNamespaceObject.h: * runtime/JSONObject.cpp: (JSC::Walker::walk): * runtime/JSObject.cpp: (JSC::JSObject::deleteProperty): (JSC::JSObject::deletePropertyByIndex): (JSC::validateAndApplyPropertyDescriptor): * runtime/JSObject.h: * runtime/JSProxy.cpp: (JSC::JSProxy::deleteProperty): * runtime/JSProxy.h: * runtime/JSSymbolTableObject.cpp: (JSC::JSSymbolTableObject::deleteProperty): * runtime/JSSymbolTableObject.h: * runtime/ProxyObject.cpp: (JSC::ProxyObject::deleteProperty): * runtime/ProxyObject.h: * runtime/RegExpObject.cpp: (JSC::RegExpObject::deleteProperty): * runtime/RegExpObject.h: * runtime/StrictEvalActivation.cpp: (JSC::StrictEvalActivation::deleteProperty): * runtime/StrictEvalActivation.h: * runtime/StringObject.cpp: (JSC::StringObject::deleteProperty): * runtime/StringObject.h: * runtime/Structure.cpp: (JSC::Structure::removePropertyTransition): (JSC::Structure::removePropertyTransitionFromExistingStructureImpl): (JSC::Structure::removePropertyTransitionFromExistingStructure): (JSC::Structure::removePropertyTransitionFromExistingStructureConcurrently): (JSC::Structure::removeNewPropertyTransition): (JSC::Structure::dump const): * runtime/Structure.h: * runtime/StructureInlines.h: (JSC::Structure::hasIndexingHeader const): (JSC::Structure::mayHaveIndexingHeader const): * tools/JSDollarVM.cpp: (JSC::functionHasOwnLengthProperty): (JSC::JSDollarVM::finishCreation): Source/WebCore: Reviewed by Keith Miller and Filip Pizlo. * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::deleteProperty): * bindings/js/JSLocationCustom.cpp: (WebCore::JSLocation::deleteProperty): * bindings/js/JSRemoteDOMWindowCustom.cpp: (WebCore::JSRemoteDOMWindow::deleteProperty): * bindings/scripts/CodeGeneratorJS.pm: (GenerateDeleteProperty): (GenerateHeader): (GenerateImplementation): (GenerateConstructorHelperMethods): * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp: (WebCore::JSTestEnabledBySettingPrototype::finishCreation): * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: (WebCore::JSTestGenerateIsReachablePrototype::finishCreation): * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp: (WebCore::JSTestNamedDeleterNoIdentifier::deleteProperty): * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.h: * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp: (WebCore::JSTestNamedDeleterThrowingException::deleteProperty): * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.h: * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp: (WebCore::JSTestNamedDeleterWithIdentifier::deleteProperty): * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.h: * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp: (WebCore::JSTestNamedDeleterWithIndexedGetter::deleteProperty): * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.h: * bindings/scripts/test/JS/JSTestNode.cpp: (WebCore::JSTestNodePrototype::finishCreation): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObjConstructor::initializeProperties): (WebCore::JSTestObjPrototype::finishCreation): * bridge/NP_jsobject.cpp: * bridge/objc/WebScriptObject.mm: (-[WebScriptObject removeWebScriptKey:]): * bridge/objc/objc_runtime.h: * bridge/objc/objc_runtime.mm: (JSC::Bindings::ObjcFallbackObjectImp::deleteProperty): * bridge/runtime_array.cpp: (JSC::RuntimeArray::deleteProperty): * bridge/runtime_array.h: * bridge/runtime_object.cpp: (JSC::Bindings::RuntimeObject::deleteProperty): * bridge/runtime_object.h: Source/WebKit: Reviewed by Keith Miller and Filip Pizlo. * WebProcess/Plugins/Netscape/JSNPObject.cpp: (WebKit::JSNPObject::deleteProperty): * WebProcess/Plugins/Netscape/JSNPObject.h: * WebProcess/Plugins/Netscape/NPJSObject.cpp: (WebKit::NPJSObject::removeProperty): Source/WebKitLegacy/mac: Reviewed by Keith Miller and Filip Pizlo. * Plugins/Hosted/NetscapePluginInstanceProxy.mm: (WebKit::NetscapePluginInstanceProxy::removeProperty): Source/WTF: Reviewed by Keith Miller and Filip Pizlo. * wtf/Spectrum.h: (WTF::Spectrum::add): (WTF::Spectrum::get const): (WTF::Spectrum::buildList const): (WTF::Spectrum::clear): (WTF::Spectrum::removeIf): (WTF::Spectrum::begin): Deleted. (WTF::Spectrum::end): Deleted. Canonical link: https://commits.webkit.org/221165@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@257399 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent ba42089 commit 94afdd5

File tree

122 files changed

+2154
-243
lines changed

Some content is hidden

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

122 files changed

+2154
-243
lines changed

JSTests/ChangeLog

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,70 @@
1+
2020-02-25 Justin Michaud <justin_michaud@apple.com>
2+
3+
Inline Cache delete by id/val
4+
https://bugs.webkit.org/show_bug.cgi?id=207522
5+
6+
Reviewed by Keith Miller and Filip Pizlo.
7+
8+
* microbenchmarks/delete-property-from-prototype-chain.js:
9+
(delete.C.prototype.z):
10+
* microbenchmarks/delete-property-inline-cache-polymorphic.js: Added.
11+
(C):
12+
(noInline.C.foo):
13+
(noInline.foo.F):
14+
(noInline.F):
15+
* microbenchmarks/delete-property-inline-cache.js: Added.
16+
(C):
17+
(noInline.C.D):
18+
(noInline.D.foo):
19+
(noInline.foo.E):
20+
(noInline.E.F):
21+
(noInline.F):
22+
* microbenchmarks/delete-property-keeps-cacheable-structure.js:
23+
* stress/delete-property-check-structure-transition.js:
24+
(sd): Deleted.
25+
(testDeleteIsNotUncacheable): Deleted.
26+
(): Deleted.
27+
(testCanFlatten): Deleted.
28+
(testDeleteWithInlineCache.Object.prototype.globalProperty.42.makeFoo): Deleted.
29+
(testDeleteWithInlineCache.noInline.doTest): Deleted.
30+
(testDeleteWithInlineCache): Deleted.
31+
* stress/delete-property-inline-cache.js: Added.
32+
(assert):
33+
(assert_eq):
34+
(assert_neq):
35+
(assert_throws):
36+
(noInline.assert.noInline.assert_eq.noInline.assert_neq.noInline.assert_throws.testCacheableDeleteById.makeFoo):
37+
(noInline.assert.noInline.assert_eq.noInline.assert_neq.noInline.assert_throws.testCacheableDeleteById):
38+
(noInline.testCacheableDeleteById.testCacheableDeleteByVal.makeFoo2):
39+
(noInline.testCacheableDeleteById.testCacheableDeleteByVal):
40+
(noInline.testCacheableDeleteByVal.testCacheableEmptyDeleteById.makeFoo3):
41+
(noInline.testCacheableDeleteByVal.testCacheableEmptyDeleteById):
42+
(noInline.testCacheableEmptyDeleteById.testCacheableDeleteByIdMiss.makeFoo4):
43+
(noInline.testCacheableEmptyDeleteById.testCacheableDeleteByIdMiss):
44+
(noInline.testCacheableDeleteByIdMiss.testDeleteIndex.makeFoo5):
45+
(noInline.testCacheableDeleteByIdMiss.testDeleteIndex):
46+
(noInline.testDeleteIndex.testPolymorphicDelByVal.makeFoo6):
47+
(noInline.testDeleteIndex.testPolymorphicDelByVal):
48+
(noInline.testPolymorphicDelByVal.testBigintDeleteByVal.makeFoo7):
49+
(noInline.testPolymorphicDelByVal.testBigintDeleteByVal):
50+
(noInline.testBigintDeleteByVal.testSymbolDeleteByVal.makeFoo8):
51+
(noInline.testBigintDeleteByVal.testSymbolDeleteByVal):
52+
(noInline.testSymbolDeleteByVal.testObjDeleteByVal.makeFoo9):
53+
(noInline.testSymbolDeleteByVal.testObjDeleteByVal):
54+
(noInline.testObjDeleteByVal.testStrict.makeFoo10):
55+
(noInline.testObjDeleteByVal.testStrict):
56+
(noInline.testStrict.testOverride.arr.j):
57+
(noInline.testStrict.testOverride):
58+
(noInline.testOverride.testNonObject.deleteIt):
59+
(noInline.testOverride.testNonObject):
60+
(noInline.testNonObject.testNonObjectStrict.deleteIt):
61+
(noInline.testNonObject.testNonObjectStrict):
62+
(noInline.testNonObjectStrict.testExceptionUnwind.mutateThem):
63+
(noInline.testNonObjectStrict.testExceptionUnwind.noInline.deleteIt):
64+
(noInline.testNonObjectStrict.testExceptionUnwind):
65+
(noInline.testExceptionUnwind.testTDZ):
66+
(noInline.testTDZ):
67+
168
2020-02-19 Ross Kirsling <ross.kirsling@sony.com>
269

370
Computed Properties with increment sometimes produces incorrect results

JSTests/microbenchmarks/delete-property-from-prototype-chain.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ skip if $model == "Apple Watch Series 3" # added by mark-jsc-stress-test.py
1+
//@ skip if $model =~ /^Apple Watch/
22
function assert(b) {
33
if (!b)
44
throw new Error;
@@ -28,15 +28,15 @@ function doTest(zVal) {
2828
}
2929
noInline(doTest);
3030

31-
for (let i=0; i<10000; ++i) {
31+
for (let i = 0; i < 10000; ++i) {
3232
const X = { i }
3333
C.prototype.z = X
3434
doTest(X)
3535
}
3636

3737
delete C.prototype.z
3838

39-
for (let i=0; i<1000000; ++i) {
39+
for (let i = 0; i < 2000000; ++i) {
4040
getZ({z: i})
4141
doTest(undefined)
4242
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
//@ skip if $model =~ /^Apple Watch/
2+
3+
function C(prop) {
4+
this[prop] = 4
5+
delete this[prop]
6+
}
7+
noInline(C)
8+
9+
function foo(o, prop) {
10+
delete o[prop]
11+
}
12+
noInline(foo)
13+
14+
function F(prop) {
15+
this[prop] = 4
16+
foo(this, prop)
17+
}
18+
noInline(F)
19+
20+
for (let i = 0; i < 100000; ++i) {
21+
new C("foo1")
22+
new F("foo1")
23+
new C("foo2")
24+
new F("foo2")
25+
new C("foo3")
26+
new F("foo3")
27+
new C("foo4")
28+
new F("foo4")
29+
new C("foo5")
30+
new F("foo5")
31+
new C("foo6")
32+
new F("foo6")
33+
new C("foo7")
34+
new F("foo7")
35+
new C("foo8")
36+
new F("foo8")
37+
new C("foo9")
38+
new F("foo9")
39+
new C("foo10")
40+
new F("foo10")
41+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
//@ skip if $model =~ /^Apple Watch/
2+
3+
function C() {
4+
this.x = 4;
5+
delete this.x
6+
}
7+
noInline(C)
8+
9+
function D() {
10+
delete this.x
11+
}
12+
noInline(D)
13+
14+
function foo(o) {
15+
delete o.x
16+
}
17+
noInline(foo)
18+
19+
function E() {
20+
this.x = 4
21+
foo(this)
22+
}
23+
noInline(E)
24+
25+
function F() {
26+
foo(this)
27+
}
28+
noInline(F)
29+
30+
for (let i = 0; i < 10000000; ++i) {
31+
new C
32+
new D
33+
new E
34+
new F
35+
}

JSTests/microbenchmarks/delete-property-keeps-cacheable-structure.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ function doTest() {
2424
}
2525
noInline(doTest);
2626

27-
for (let i=0; i<10000000; ++i) doTest()
27+
for (let i = 0; i < 5000000; ++i) doTest()
2828

JSTests/stress/delete-property-check-structure-transition.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ function assert_neq(a, b) {
1212
if (a === b)
1313
throw new Error("assertion failed: " + a + " !== " + b);
1414
}
15+
noInline(assert)
16+
noInline(assert_eq)
17+
noInline(assert_neq)
1518

1619
function sd(obj) {
1720
let data = $vm.getStructureTransitionList(obj)
@@ -31,6 +34,8 @@ function sid(obj) {
3134
let data = sd(obj)
3235
return data[data.length-1].id
3336
}
37+
noInline(sd)
38+
noInline(sid)
3439

3540
function testDeleteIsNotUncacheable(i) {
3641
let foo = {}
@@ -62,6 +67,7 @@ function testDeleteIsNotUncacheable(i) {
6267
assert_eq($vm.getConcurrently(foo, "bar"+i), 1)
6368
assert(foo["bar" + i] === 1)
6469
}
70+
noInline(testDeleteIsNotUncacheable)
6571

6672
function testCanMaterializeDeletes(i) {
6773
let foo = {}
@@ -100,6 +106,8 @@ function testCanMaterializeDeletes(i) {
100106
assert_eq(data[data.length-2].property, "bar" + i)
101107
}
102108

109+
noInline(testCanMaterializeDeletes)
110+
103111
function testCanFlatten(i) {
104112
let foo = {}
105113
for (let j=0; j<500; ++j) {
@@ -131,6 +139,7 @@ function testCanFlatten(i) {
131139
assert_eq(val, undefined)
132140
}
133141
}
142+
noInline(testCanFlatten)
134143

135144
function testDeleteWithInlineCache() {
136145
Object.prototype.globalProperty = 42
@@ -175,6 +184,7 @@ function testDeleteWithInlineCache() {
175184

176185
doTest(undefined)
177186
}
187+
noInline(testDeleteWithInlineCache)
178188

179189
testDeleteWithInlineCache()
180190

0 commit comments

Comments
 (0)