Changeset 95877 in webkit for trunk/Source/JavaScriptCore/parser
- Timestamp:
- Sep 23, 2011, 3:59:18 PM (14 years ago)
- Location:
- trunk/Source/JavaScriptCore/parser
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/parser/JSParser.cpp
r90535 r95877 753 753 ASSERT(m_isFunction); 754 754 info->usesEval = m_usesEval; 755 info->strictMode = m_strictMode; 756 info->needsFullActivation = m_needsFullActivation; 755 757 copyCapturedVariablesToVector(m_writtenVariables, info->writtenVariables); 756 758 copyCapturedVariablesToVector(m_usedVariables, info->usedVariables); … … 761 763 ASSERT(m_isFunction); 762 764 m_usesEval = info->usesEval; 765 m_strictMode = info->strictMode; 766 m_needsFullActivation = info->needsFullActivation; 763 767 unsigned size = info->usedVariables.size(); 764 768 for (unsigned i = 0; i < size; ++i) … … 1609 1613 bodyStartLine = tokenLine(); 1610 1614 1615 // If we know about this function already, we can use the cached info and skip the parser to the end of the function. 1611 1616 if (const SourceProviderCacheItem* cachedInfo = TreeBuilder::CanUseFunctionCache ? findCachedFunctionInfo(openBracePos) : 0) { 1612 // If we know about this function already, we can use the cached info and skip the parser to the end of the function. 1613 body = context.createFunctionBody(strictMode()); 1617 // If we're in a strict context, the cached function info must say it was strict too. 1618 ASSERT(!strictMode() || cachedInfo->strictMode); 1619 body = context.createFunctionBody(cachedInfo->strictMode); 1614 1620 1615 1621 functionScope->restoreFunctionInfo(cachedInfo); -
trunk/Source/JavaScriptCore/parser/SourceProviderCacheItem.h
r76611 r95877 60 60 int closeBracePos; 61 61 bool usesEval; 62 bool strictMode; 63 bool needsFullActivation; 62 64 Vector<RefPtr<StringImpl> > usedVariables; 63 65 Vector<RefPtr<StringImpl> > writtenVariables;
Note:
See TracChangeset
for help on using the changeset viewer.