diff options
author | Gaming4JC <g4jc@hyperbola.info> | 2019-07-14 20:59:26 -0400 |
---|---|---|
committer | Gaming4JC <g4jc@hyperbola.info> | 2019-07-18 22:38:48 -0400 |
commit | 221239a77c6d7de58424448de7b83af04c638378 (patch) | |
tree | c5726f7ff54abdd7dfaebe20d1459eb03f871406 /js/src/frontend/FoldConstants.cpp | |
parent | 8b4ee77d34ce04e3c8bb2ba017b009d5f25d1eb9 (diff) | |
download | UXP-221239a77c6d7de58424448de7b83af04c638378.tar UXP-221239a77c6d7de58424448de7b83af04c638378.tar.gz UXP-221239a77c6d7de58424448de7b83af04c638378.tar.lz UXP-221239a77c6d7de58424448de7b83af04c638378.tar.xz UXP-221239a77c6d7de58424448de7b83af04c638378.zip |
1339395 - Part 7: Remove no longer needed check for jsid strings which are indices from frontend.
Diffstat (limited to 'js/src/frontend/FoldConstants.cpp')
-rw-r--r-- | js/src/frontend/FoldConstants.cpp | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/js/src/frontend/FoldConstants.cpp b/js/src/frontend/FoldConstants.cpp index 441a72a45..689fa02b4 100644 --- a/js/src/frontend/FoldConstants.cpp +++ b/js/src/frontend/FoldConstants.cpp @@ -1345,15 +1345,8 @@ FoldElement(ExclusiveContext* cx, ParseNode** nodePtr, Parser<FullParseHandler>& if (!name) return true; - // Also don't optimize if the name doesn't map directly to its id for TI's - // purposes. - if (NameToId(name) != IdToTypeId(NameToId(name))) - return true; - // Optimization 3: We have expr["foo"] where foo is not an index. Convert // to a property access (like expr.foo) that optimizes better downstream. - // Don't bother with this for names that TI considers to be indexes, to - // simplify downstream analysis. ParseNode* dottedAccess = parser.handler.newPropertyAccess(expr, name, node->pn_pos.end); if (!dottedAccess) return false; |