Changeset 107345 in webkit
- Timestamp:
- Feb 9, 2012, 7:14:34 PM (15 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
bytecompiler/BytecodeGenerator.cpp (modified) (1 diff)
-
bytecompiler/BytecodeGenerator.h (modified) (1 diff)
-
bytecompiler/NodesCodegen.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r107338 r107345 1 2012-02-09 Andy Wingo <wingo@igalia.com> 2 3 Remove BytecodeGenerator::isLocal 4 https://bugs.webkit.org/show_bug.cgi?id=78241 5 6 Minor refactor to BytecodeGenerator. 7 8 Reviewed by Gavin Barraclough. 9 10 * bytecompiler/BytecodeGenerator.h: 11 * bytecompiler/BytecodeGenerator.cpp: 12 (JSC::BytecodeGenerator::isLocal): 13 (JSC::BytecodeGenerator::isLocalConstant): Remove now-unused 14 methods. 15 * bytecompiler/NodesCodegen.cpp: 16 (JSC::ResolveNode::isPure): Use the ResolveResult mechanism 17 instead of isLocal. This will recognize more resolve nodes as 18 being pure. 19 (JSC::PrefixResolveNode::emitBytecode): Use isReadOnly on the 20 location instead of isLocalConstant. 21 1 22 2012-02-09 Oliver Hunt <oliver@apple.com> 2 23 -
trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
r107338 r107345 560 560 emitLazyNewFunction(reg, m_lazyFunctions.get(reg->index())); 561 561 return reg; 562 }563 564 bool BytecodeGenerator::isLocal(const Identifier& ident)565 {566 if (ident == propertyNames().thisIdentifier)567 return true;568 569 return shouldOptimizeLocals() && symbolTable().contains(ident.impl());570 }571 572 bool BytecodeGenerator::isLocalConstant(const Identifier& ident)573 {574 return symbolTable().get(ident.impl()).isReadOnly();575 562 } 576 563 -
trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h
r106504 r107345 263 263 RegisterID* thisRegister() { return &m_thisRegister; } 264 264 265 bool isLocal(const Identifier&);266 bool isLocalConstant(const Identifier&);267 268 265 // Returns the next available temporary register. Registers returned by 269 266 // newTemporary require a modified form of reference counting: any -
trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp
r106512 r107345 143 143 bool ResolveNode::isPure(BytecodeGenerator& generator) const 144 144 { 145 return generator. isLocal(m_ident);145 return generator.resolve(m_ident).isStatic(); 146 146 } 147 147 … … 793 793 ResolveResult resolveResult = generator.resolve(m_ident); 794 794 if (RegisterID* local = resolveResult.local()) { 795 if ( generator.isLocalConstant(m_ident)) {795 if (resolveResult.isReadOnly()) { 796 796 if (dst == generator.ignoredResult()) 797 797 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.