Changeset 67583 in webkit for trunk/JavaScriptCore/runtime
- Timestamp:
- Sep 15, 2010, 5:05:13 PM (15 years ago)
- Location:
- trunk/JavaScriptCore/runtime
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/Executable.cpp
r66150 r67583 102 102 return exception; 103 103 } 104 recordParse(evalNode->features(), evalNode-> lineNo(), evalNode->lastLine());104 recordParse(evalNode->features(), evalNode->hasCapturedVariables(), evalNode->lineNo(), evalNode->lastLine()); 105 105 106 106 ScopeChain scopeChain(scopeChainNode); … … 151 151 return exception; 152 152 } 153 recordParse(programNode->features(), programNode-> lineNo(), programNode->lastLine());153 recordParse(programNode->features(), programNode->hasCapturedVariables(), programNode->lineNo(), programNode->lastLine()); 154 154 155 155 ScopeChain scopeChain(scopeChainNode); … … 187 187 body->setUsesArguments(); 188 188 body->finishParsing(m_parameters, m_name); 189 recordParse(body->features(), body-> lineNo(), body->lastLine());189 recordParse(body->features(), body->hasCapturedVariables(), body->lineNo(), body->lastLine()); 190 190 191 191 ScopeChain scopeChain(scopeChainNode); … … 228 228 body->setUsesArguments(); 229 229 body->finishParsing(m_parameters, m_name); 230 recordParse(body->features(), body-> lineNo(), body->lastLine());230 recordParse(body->features(), body->hasCapturedVariables(), body->lineNo(), body->lastLine()); 231 231 232 232 ScopeChain scopeChain(scopeChainNode); -
trunk/JavaScriptCore/runtime/Executable.h
r63675 r67583 173 173 bool usesEval() const { return m_features & EvalFeature; } 174 174 bool usesArguments() const { return m_features & ArgumentsFeature; } 175 bool needsActivation() const { return m_ features & (EvalFeature | ClosureFeature | WithFeature | CatchFeature); }175 bool needsActivation() const { return m_hasCapturedVariables || m_features & (EvalFeature | WithFeature | CatchFeature); } 176 176 177 177 virtual PassOwnPtr<ExceptionInfo> reparseExceptionInfo(JSGlobalData*, ScopeChainNode*, CodeBlock*) = 0; 178 178 179 179 protected: 180 void recordParse(CodeFeatures features, int firstLine, int lastLine)180 void recordParse(CodeFeatures features, bool hasCapturedVariables, int firstLine, int lastLine) 181 181 { 182 182 m_features = features; 183 m_hasCapturedVariables = hasCapturedVariables; 183 184 m_firstLine = firstLine; 184 185 m_lastLine = lastLine; … … 187 188 SourceCode m_source; 188 189 CodeFeatures m_features; 190 bool m_hasCapturedVariables; 189 191 int m_firstLine; 190 192 int m_lastLine;
Note:
See TracChangeset
for help on using the changeset viewer.