Changeset 24534 in webkit for trunk/JavaScriptCore/kjs/nodes.cpp
- Timestamp:
- Jul 23, 2007, 3:26:02 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/nodes.cpp
r24533 r24534 1624 1624 ASSERT(!chain.isEmpty()); 1625 1625 1626 if (init) { 1626 bool inGlobalScope = ++chain.begin() == chain.end(); 1627 1628 if (inGlobalScope && (init || !variableObject->getDirect(ident))) { 1629 JSValue* val = init ? init->evaluate(exec) : jsUndefined(); 1630 int flags = Internal; 1631 if (exec->context()->codeType() != EvalCode) 1632 flags |= DontDelete; 1633 if (varType == VarDeclNode::Constant) 1634 flags |= ReadOnly; 1635 variableObject->putDirect(ident, val, flags); 1636 } else if (init) { 1627 1637 JSValue* val = init->evaluate(exec); 1628 1638 KJS_CHECKEXCEPTIONVALUE … … 1639 1649 flags |= ReadOnly; 1640 1650 1641 if (++chain.begin() == chain.end()) { 1642 int flags = Internal; 1643 if (exec->context()->codeType() != EvalCode) 1644 flags |= DontDelete; 1645 if (varType == VarDeclNode::Constant) 1646 flags |= ReadOnly; 1647 variableObject->putDirect(ident, val, flags); 1648 } else { 1649 ASSERT(variableObject->getDirect(ident) || ident == exec->propertyNames().arguments); 1650 variableObject->put(exec, ident, val, flags); 1651 } 1652 } else { 1653 if (++chain.begin() == chain.end()) { 1654 int flags = Internal; 1655 if (exec->context()->codeType() != EvalCode) 1656 flags |= DontDelete; 1657 if (varType == VarDeclNode::Constant) 1658 flags |= ReadOnly; 1659 variableObject->putDirect(ident, jsUndefined(), flags); 1660 } else { 1661 1662 } 1651 ASSERT(variableObject->getDirect(ident) || ident == exec->propertyNames().arguments); 1652 variableObject->put(exec, ident, val, flags); 1663 1653 } 1664 1654
Note:
See TracChangeset
for help on using the changeset viewer.