Changeset 43661 in webkit for trunk/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
- Timestamp:
- May 13, 2009, 2:53:59 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
r43642 r43661 270 270 Vector<RegisterID*, 32> newVars; 271 271 for (size_t i = 0; i < varStack.size(); ++i) 272 if (!globalObject->hasProperty(exec, *varStack[i].first))273 newVars.append(addGlobalVar( *varStack[i].first, varStack[i].second & DeclarationStacks::IsConstant));272 if (!globalObject->hasProperty(exec, varStack[i].first)) 273 newVars.append(addGlobalVar(varStack[i].first, varStack[i].second & DeclarationStacks::IsConstant)); 274 274 275 275 allocateConstants(programNode->neededConstants()); … … 283 283 } 284 284 for (size_t i = 0; i < varStack.size(); ++i) { 285 if (globalObject->hasProperty(exec, *varStack[i].first))285 if (globalObject->hasProperty(exec, varStack[i].first)) 286 286 continue; 287 287 int attributes = DontDelete; 288 288 if (varStack[i].second & DeclarationStacks::IsConstant) 289 289 attributes |= ReadOnly; 290 globalObject->putWithAttributes(exec, *varStack[i].first, jsUndefined(), attributes);290 globalObject->putWithAttributes(exec, varStack[i].first, jsUndefined(), attributes); 291 291 } 292 292 … … 346 346 const DeclarationStacks::VarStack& varStack = functionBody->varStack(); 347 347 for (size_t i = 0; i < varStack.size(); ++i) 348 addVar( *varStack[i].first, varStack[i].second & DeclarationStacks::IsConstant);348 addVar(varStack[i].first, varStack[i].second & DeclarationStacks::IsConstant); 349 349 350 350 const Identifier* parameters = functionBody->parameters(); … … 1838 1838 } 1839 1839 1840 void BytecodeGenerator::emitPushNewScope(RegisterID* dst, constIdentifier& property, RegisterID* value)1840 void BytecodeGenerator::emitPushNewScope(RegisterID* dst, Identifier& property, RegisterID* value) 1841 1841 { 1842 1842 ControlFlowContext context;
Note:
See TracChangeset
for help on using the changeset viewer.