Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge r230740 - A put is not an ExistingProperty put when we transiti…
…on a structure because of an attributes change https://bugs.webkit.org/show_bug.cgi?id=184706 <rdar://problem/38871451> Reviewed by Saam Barati. JSTests: * stress/put-by-id-direct-strict-transition.js: Added. (const.foo): (j.const.obj.set hello): * stress/put-by-id-direct-transition.js: Added. (const.foo): (j.const.obj.set hello): * stress/put-getter-setter-by-id-strict-transition.js: Added. (const.foo): (j.const.obj.set hello): * stress/put-getter-setter-by-id-transition.js: Added. (const.foo): (j.const.obj.set hello): Source/JavaScriptCore: When putting a property on a structure and the slot is a different type, the slot can't be said to have already been existing. * runtime/JSObjectInlines.h: (JSC::JSObject::putDirectInternal):
- Loading branch information
1 parent
44e0d37
commit a74610a
Showing
7 changed files
with
89 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
"use strict" | ||
|
||
let theglobal = 0; | ||
for (theglobal = 0; theglobal < 100000; ++theglobal) | ||
; | ||
const foo = (ignored, arg1) => { theglobal = arg1; }; | ||
for (let j = 0; j < 10000; ++j) { | ||
const obj = { | ||
set hello(ignored) {}, | ||
[theglobal]: 0 | ||
}; | ||
foo(obj, 'hello'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
let theglobal = 0; | ||
for (theglobal = 0; theglobal < 100000; ++theglobal) | ||
; | ||
const foo = (ignored, arg1) => { theglobal = arg1; }; | ||
for (let j = 0; j < 10000; ++j) { | ||
const obj = { | ||
set hello(ignored) {}, | ||
[theglobal]: 0 | ||
}; | ||
foo(obj, 'hello'); | ||
} |
13 changes: 13 additions & 0 deletions
13
JSTests/stress/put-getter-setter-by-id-strict-transition.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
"use strict" | ||
|
||
let theglobal = 0; | ||
for (theglobal = 0; theglobal < 100000; ++theglobal) | ||
; | ||
const foo = (ignored, arg1) => { theglobal = arg1; }; | ||
for (let j = 0; j < 10000; ++j) { | ||
const obj = { | ||
[theglobal]: 0, | ||
set hello(ignored) {} | ||
}; | ||
foo(obj, 'hello'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
let theglobal = 0; | ||
for (theglobal = 0; theglobal < 100000; ++theglobal) | ||
; | ||
const foo = (ignored, arg1) => { theglobal = arg1; }; | ||
for (let j = 0; j < 10000; ++j) { | ||
const obj = { | ||
[theglobal]: 0, | ||
set hello(ignored) {} | ||
}; | ||
foo(obj, 'hello'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters