Changeset 49726 in webkit for trunk/JavaScriptCore/runtime/Operations.h
- Timestamp:
- Oct 16, 2009, 7:31:42 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/Operations.h
r49717 r49726 225 225 } 226 226 227 inline size_t normalizePrototypeChain(CallFrame* callFrame, JSValue base, JSValue slotBase)228 { 229 JSCell* cell = asCell(base );227 inline size_t countPrototypeChainEntriesAndCheckForProxies(CallFrame* callFrame, JSValue baseValue, const PropertySlot& slot) 228 { 229 JSCell* cell = asCell(baseValue); 230 230 size_t count = 0; 231 231 232 while (slot Base!= cell) {232 while (slot.slotBase() != cell) { 233 233 JSValue v = cell->structure()->prototypeForLookup(callFrame); 234 234 235 // If we didn't find slotBase in base 's prototype chain, then base235 // If we didn't find slotBase in baseValue's prototype chain, then baseValue 236 236 // must be a proxy for another object. 237 237 … … 251 251 ASSERT(count); 252 252 return count; 253 }254 255 inline size_t normalizePrototypeChain(CallFrame* callFrame, JSCell* base)256 {257 size_t count = 0;258 while (1) {259 JSValue v = base->structure()->prototypeForLookup(callFrame);260 if (v.isNull())261 return count;262 263 base = asCell(v);264 265 // Since we're accessing a prototype in a loop, it's a good bet that it266 // should not be treated as a dictionary.267 if (base->structure()->isDictionary())268 asObject(base)->setStructure(Structure::fromDictionaryTransition(base->structure()));269 270 ++count;271 }272 253 } 273 254
Note:
See TracChangeset
for help on using the changeset viewer.