Skip to content

goog.reflect.sinkValue and deadcode elimination #203

Answered by gkdn
treblereel asked this question in Q&A
Discussion options

You must be logged in to vote

There are couple of issues here.

The reason you are looking into sinkValue is because you are not directly accessing the property, but accessing it through a map which is a string access. Your code is effectively test["m_test___$p_org_treblereel_Test"] which wouldn't be recognized as a property access by JsCompiler hence will be renamed, removed etc. If the access looked like test.test then you wouldn't need goog.reflect.objectProperty or sinkValue. [Details]

The second issues here is that the mangled names like m_test___$p_org_treblereel_Test are not stable. We are not intending to preserve the mangling rules and we already have changed them in the past. So this may get broken any time. …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by gkdn
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #202 on July 25, 2023 18:30.