Changeset 43661 in webkit for trunk/JavaScriptCore/bytecompiler
- Timestamp:
- May 13, 2009, 2:53:59 PM (16 years ago)
- Location:
- trunk/JavaScriptCore/bytecompiler
- Files:
-
- 3 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; -
trunk/JavaScriptCore/bytecompiler/BytecodeGenerator.h
r43642 r43661 320 320 void emitThrow(RegisterID* exc) { emitUnaryNoDstOp(op_throw, exc); } 321 321 RegisterID* emitNewError(RegisterID* dst, ErrorType type, JSValue message); 322 void emitPushNewScope(RegisterID* dst, constIdentifier& property, RegisterID* value);322 void emitPushNewScope(RegisterID* dst, Identifier& property, RegisterID* value); 323 323 324 324 RegisterID* emitPushScope(RegisterID* scope); -
trunk/JavaScriptCore/bytecompiler/SegmentedVector.h
r43642 r43661 51 51 52 52 size_t size() const { return m_size; } 53 bool isEmpty() const { return !size(); }54 53 55 54 T& at(size_t index)
Note:
See TracChangeset
for help on using the changeset viewer.