Bug 781289 - Remove unecessary check that let variable name matches are atoms. r=luke

This commit is contained in:
Benjamin Peterson 2012-08-08 11:52:09 -07:00
parent 754a2a4a8f
commit 0195f43641

View File

@ -6093,13 +6093,8 @@ ExpressionDecompiler::findLetVar(jsbytecode *pc, unsigned depth)
if (uint32_t(depth - blockDepth) < uint32_t(blockCount)) {
for (Shape::Range r(block.lastProperty()); !r.empty(); r.popFront()) {
const Shape &shape = r.front();
if (shape.shortid() == int(depth - blockDepth)) {
// !JSID_IS_ATOM(shape.propid()) happens for empty
// destructuring variables in lets. They can be safely
// ignored.
if (JSID_IS_ATOM(shape.propid()))
return JSID_TO_ATOM(shape.propid());
}
if (shape.shortid() == int(depth - blockDepth))
return JSID_TO_ATOM(shape.propid());
}
}
chain = chain->getParent();