side effects on object literals

15 views
Skip to first unread message

Gus Caplan

unread,
Jul 3, 2020, 11:21:08 AM7/3/20
to v8-dev
Given some input like `({}.a = 1)`, evaluated with throwOnSideEffects, how does V8 know that it is safe to mutate that specific object?

Yang Guo

unread,
Jul 3, 2020, 11:31:39 AM7/3/20
to v8-...@googlegroups.com
We have a TemporaryObjectsTracker that tracks which objects are temporarily allocated during side effect free mode: https://source.chromium.org/chromium/chromium/src/+/master:v8/src/debug/debug.cc;l=2213?q=startsideeffect&ss=chromium&originalUrl=https:%2F%2Fcs.chromium.org%2F

On Fri, Jul 3, 2020 at 5:21 PM Gus Caplan <fluffyro...@gmail.com> wrote:
Given some input like `({}.a = 1)`, evaluated with throwOnSideEffects, how does V8 know that it is safe to mutate that specific object?

--
--
v8-dev mailing list
v8-...@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-dev+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-dev/406b2122-c792-4424-9708-59abc1128f92n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages