Changeset 68171 in webkit for trunk/JavaScriptCore/runtime/JSActivation.cpp
- Timestamp:
- Sep 23, 2010, 11:49:56 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/JSActivation.cpp
r63267 r68171 63 63 markStack.appendValues(registerArray, count); 64 64 65 size_t numVars = d()->functionExecutable-> variableCount();65 size_t numVars = d()->functionExecutable->capturedVariableCount(); 66 66 67 67 // Skip the call frame, which sits between the parameters and vars. 68 68 markStack.appendValues(registerArray + count + RegisterFile::CallFrameHeaderSize, numVars, MayContainNullValues); 69 } 70 71 inline bool JSActivation::symbolTableGet(const Identifier& propertyName, PropertySlot& slot) 72 { 73 SymbolTableEntry entry = symbolTable().inlineGet(propertyName.impl()); 74 if (!entry.isNull()) { 75 ASSERT(entry.getIndex() < static_cast<int>(d()->functionExecutable->capturedVariableCount())); 76 slot.setRegisterSlot(®isterAt(entry.getIndex())); 77 return true; 78 } 79 return false; 80 } 81 82 inline bool JSActivation::symbolTablePut(const Identifier& propertyName, JSValue value) 83 { 84 ASSERT(!Heap::heap(value) || Heap::heap(value) == Heap::heap(this)); 85 86 SymbolTableEntry entry = symbolTable().inlineGet(propertyName.impl()); 87 if (entry.isNull()) 88 return false; 89 if (entry.isReadOnly()) 90 return true; 91 ASSERT(entry.getIndex() < static_cast<int>(d()->functionExecutable->capturedVariableCount())); 92 registerAt(entry.getIndex()) = value; 93 return true; 94 } 95 96 void JSActivation::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode) 97 { 98 SymbolTable::const_iterator end = symbolTable().end(); 99 for (SymbolTable::const_iterator it = symbolTable().begin(); it != end; ++it) { 100 ASSERT(it->second.getIndex() < static_cast<int>(d()->functionExecutable->capturedVariableCount())); 101 if (!(it->second.getAttributes() & DontEnum) || (mode == IncludeDontEnumProperties)) 102 propertyNames.add(Identifier(exec, it->first.get())); 103 } 104 // Skip the JSVariableObject implementation of getOwnPropertyNames 105 JSObject::getOwnPropertyNames(exec, propertyNames, mode); 106 } 107 108 inline bool JSActivation::symbolTablePutWithAttributes(const Identifier& propertyName, JSValue value, unsigned attributes) 109 { 110 ASSERT(!Heap::heap(value) || Heap::heap(value) == Heap::heap(this)); 111 112 SymbolTable::iterator iter = symbolTable().find(propertyName.impl()); 113 if (iter == symbolTable().end()) 114 return false; 115 SymbolTableEntry& entry = iter->second; 116 ASSERT(!entry.isNull()); 117 if (entry.getIndex() >= static_cast<int>(d()->functionExecutable->capturedVariableCount())) 118 return false; 119 entry.setAttributes(attributes); 120 registerAt(entry.getIndex()) = value; 121 return true; 69 122 } 70 123
Note:
See TracChangeset
for help on using the changeset viewer.