v8/src/ic
Joyee Cheung 80bbbb143c [class] handle existing readonly properties in StoreOwnIC
Previously, StoreOwnIC incorrectly reuses the [[Set]] semantics
when initializing public literal class fields and object literals in
certain cases (e.g. when there's no feedback).
This was less of an issue for object literals, but with public class
fields it's possible to define property attributes while the
instance is still being initialized, or to encounter existing static
"name" or "length" properties that should be readonly. This patch
fixes it by

1) Emitting code that calls into the slow stub when
   handling StoreOwnIC with existing read-only properties.
2) Adding extra steps in StoreIC::Store to handle such stores
   properly with [[DefineOwnProperty]] semantics.

Bug: v8:12421, v8:9888
Change-Id: I6547320a1caba58c66ee1043cd3183a2de7cefef
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3300092
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Joyee Cheung <joyee@igalia.com>
Cr-Commit-Position: refs/heads/main@{#78659}
2022-01-18 09:22:47 +00:00
..
accessor-assembler.cc [ext-code-space][compiler] Support calling CodeT targets 2021-12-16 13:45:12 +00:00
accessor-assembler.h [ext-code-space][compiler] Support calling CodeT targets 2021-12-16 13:45:12 +00:00
binary-op-assembler.cc [baseline] Improve BitwiseBinaryOp with Smi rhs 2021-12-02 12:09:33 +00:00
binary-op-assembler.h [baseline] Improve BitwiseBinaryOp with Smi rhs 2021-12-02 12:09:33 +00:00
call-optimization.cc Fix most instances of -Wunreachable-code-aggressive. 2021-07-01 03:03:25 +00:00
call-optimization.h [cleanup] Rename LocalIsolate templates to IsolateT 2021-04-26 09:11:10 +00:00
DIR_METADATA Add DIR_METADATA files to v8. 2020-10-20 22:12:28 +00:00
handler-configuration-inl.h [ext-code-space][cleanup] Remove CodeDataContainer table 2021-12-16 17:32:39 +00:00
handler-configuration.cc [ic] Make DefineOwnIC throw if the private symbol already exists 2021-11-01 21:07:43 +00:00
handler-configuration.h [ic] Make DefineOwnIC throw if the private symbol already exists 2021-11-01 21:07:43 +00:00
handler-configuration.tq [build] Reduce size of inline header cycles 2021-06-11 15:36:04 +00:00
ic-inl.h [ic] Fix -Wshadow by making InlineCacheState an enum class 2021-11-19 18:52:15 +00:00
ic-stats.cc Fix most instances of -Wunreachable-code-aggressive. 2021-07-01 03:03:25 +00:00
ic-stats.h [cleanup] Consistent comments on namespace ends 2020-08-17 10:09:02 +00:00
ic.cc [class] handle existing readonly properties in StoreOwnIC 2022-01-18 09:22:47 +00:00
ic.h [ic] Fix -Wshadow by making InlineCacheState an enum class 2021-11-19 18:52:15 +00:00
keyed-store-generic.cc [class] handle existing readonly properties in StoreOwnIC 2022-01-18 09:22:47 +00:00
keyed-store-generic.h [class] Add IC support for defining class fields to replace runtime call 2021-10-13 10:40:24 +00:00
OWNERS Remove mythria@ from OWNERS 2021-08-26 13:21:32 +00:00
stub-cache.cc [ic] Use the Map for hashing in the secondary stub cache 2021-10-15 14:54:28 +00:00
stub-cache.h [ic] Use the Map for hashing in the secondary stub cache 2021-10-15 14:54:28 +00:00
unary-op-assembler.cc [csa, torque, cleanup] Rename CSA_ASSERT to CSA_DCHECK 2021-09-30 08:41:23 +00:00
unary-op-assembler.h [cleanup] Create UpdateFeedbackMode enum 2021-02-16 14:42:31 +00:00