Changeset 29067 in webkit for trunk/JavaScriptCore/kjs/nodes.cpp
- Timestamp:
- Jan 1, 2008, 11:35:37 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/nodes.cpp
r29059 r29067 636 636 JSValue *ElementNode::evaluate(ExecState *exec) 637 637 { 638 JSObject *array = exec->lexicalGlobalObject()->arrayConstructor()->construct(exec, List::empty());638 JSObject* array = exec->lexicalGlobalObject()->arrayConstructor()->construct(exec, exec->emptyList()); 639 639 int length = 0; 640 640 for (ElementNode *n = this; n; n = n->next.get()) { … … 667 667 length = opt ? array->get(exec, exec->propertyNames().length)->toInt32(exec) : 0; 668 668 } else { 669 JSValue *newArr = exec->lexicalGlobalObject()->arrayConstructor()->construct(exec,List::empty());669 JSValue* newArr = exec->lexicalGlobalObject()->arrayConstructor()->construct(exec, exec->emptyList()); 670 670 array = static_cast<JSObject*>(newArr); 671 671 length = 0; … … 692 692 return list->evaluate(exec); 693 693 694 return exec->lexicalGlobalObject()->objectConstructor()->construct(exec, List::empty());694 return exec->lexicalGlobalObject()->objectConstructor()->construct(exec, exec->emptyList()); 695 695 } 696 696 … … 707 707 JSValue *PropertyListNode::evaluate(ExecState *exec) 708 708 { 709 JSObject *obj = exec->lexicalGlobalObject()->objectConstructor()->construct(exec, List::empty());709 JSObject* obj = exec->lexicalGlobalObject()->objectConstructor()->construct(exec, exec->emptyList()); 710 710 711 711 for (PropertyListNode *p = this; p; p = p->next.get()) { … … 4362 4362 // We can't just resize localStorage here because that would temporarily 4363 4363 // leave uninitialized entries, which would crash GC during the mark phase. 4364 localStorage.reserveCapacity(m_varStack.size() + m_parameters.size() + m_functionStack.size()); 4364 size_t totalSize = m_varStack.size() + m_parameters.size() + m_functionStack.size(); 4365 if (totalSize > localStorage.capacity()) // Doing this check inline avoids function call overhead. 4366 localStorage.reserveCapacity(totalSize); 4365 4367 4366 4368 int minAttributes = Internal | DontDelete; … … 4544 4546 FunctionImp *func = new FunctionImp(exec, ident, body.get(), exec->scopeChain()); 4545 4547 4546 JSObject *proto = exec->lexicalGlobalObject()->objectConstructor()->construct(exec, List::empty());4548 JSObject* proto = exec->lexicalGlobalObject()->objectConstructor()->construct(exec, exec->emptyList()); 4547 4549 proto->put(exec, exec->propertyNames().constructor, func, ReadOnly | DontDelete | DontEnum); 4548 4550 func->put(exec, exec->propertyNames().prototype, proto, Internal|DontDelete); … … 4580 4582 4581 4583 FunctionImp* func = new FunctionImp(exec, ident, body.get(), exec->scopeChain()); 4582 JSObject* proto = exec->lexicalGlobalObject()->objectConstructor()->construct(exec, List::empty());4584 JSObject* proto = exec->lexicalGlobalObject()->objectConstructor()->construct(exec, exec->emptyList()); 4583 4585 proto->put(exec, exec->propertyNames().constructor, func, ReadOnly | DontDelete | DontEnum); 4584 4586 func->put(exec, exec->propertyNames().prototype, proto, Internal | DontDelete);
Note:
See TracChangeset
for help on using the changeset viewer.