Ignore:
Timestamp:
Dec 3, 2008, 4:10:53 PM (16 years ago)
Author:
[email protected]
Message:

2008-12-03 Sam Weinig <[email protected]>

Reviewed by Geoffrey Garen.

Remove shared AssemblerBuffer 1MB buffer and instead give AssemblerBuffer
an 256 byte inline capacity.

1% progression on Sunspider.

  • assembler/AssemblerBuffer.h: (JSC::AssemblerBuffer::AssemblerBuffer): (JSC::AssemblerBuffer::~AssemblerBuffer): (JSC::AssemblerBuffer::grow):
  • assembler/MacroAssembler.h: (JSC::MacroAssembler::MacroAssembler):
  • assembler/X86Assembler.h: (JSC::X86Assembler::X86Assembler):
  • interpreter/Interpreter.cpp: (JSC::Interpreter::Interpreter):
  • interpreter/Interpreter.h:
  • jit/JIT.cpp: (JSC::JIT::JIT):
  • parser/Nodes.cpp: (JSC::RegExpNode::emitBytecode):
  • runtime/RegExp.cpp: (JSC::RegExp::RegExp): (JSC::RegExp::create):
  • runtime/RegExp.h:
  • runtime/RegExpConstructor.cpp: (JSC::constructRegExp):
  • runtime/RegExpPrototype.cpp: (JSC::regExpProtoFuncCompile):
  • runtime/StringPrototype.cpp: (JSC::stringProtoFuncMatch): (JSC::stringProtoFuncSearch):
  • wrec/WREC.cpp: (JSC::WREC::Generator::compileRegExp):
  • wrec/WRECGenerator.h: (JSC::WREC::Generator::Generator):
  • wrec/WRECParser.h: (JSC::WREC::Parser::Parser):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/RegExp.cpp

    r38839 r38975  
    3838#endif
    3939
    40 inline RegExp::RegExp(JSGlobalData* globalData, const UString& pattern)
     40inline RegExp::RegExp(const UString& pattern)
    4141    : m_pattern(pattern)
    4242    , m_flagBits(0)
     
    4646{
    4747#if ENABLE(WREC)
    48     m_wrecFunction = Generator::compileRegExp(globalData->interpreter, pattern, &m_numSubpatterns, &m_constructionError);
     48    m_wrecFunction = Generator::compileRegExp(pattern, &m_numSubpatterns, &m_constructionError);
    4949    if (m_wrecFunction)
    5050        return;
    5151    // Fall through to non-WREC case.
    52 #else
    53     UNUSED_PARAM(globalData);
    5452#endif
    5553    m_regExp = jsRegExpCompile(reinterpret_cast<const UChar*>(pattern.data()), pattern.size(),
     
    5755}
    5856
    59 PassRefPtr<RegExp> RegExp::create(JSGlobalData* globalData, const UString& pattern)
     57PassRefPtr<RegExp> RegExp::create(const UString& pattern)
    6058{
    61     return adoptRef(new RegExp(globalData, pattern));
     59    return adoptRef(new RegExp(pattern));
    6260}
    6361
    64 inline RegExp::RegExp(JSGlobalData* globalData, const UString& pattern, const UString& flags)
     62inline RegExp::RegExp(const UString& pattern, const UString& flags)
    6563    : m_pattern(pattern)
    6664    , m_flags(flags)
     
    8987
    9088#if ENABLE(WREC)
    91     m_wrecFunction = Generator::compileRegExp(globalData->interpreter, pattern, &m_numSubpatterns, &m_constructionError, (m_flagBits & IgnoreCase), (m_flagBits & Multiline));
     89    m_wrecFunction = Generator::compileRegExp(pattern, &m_numSubpatterns, &m_constructionError, (m_flagBits & IgnoreCase), (m_flagBits & Multiline));
    9290    if (m_wrecFunction)
    9391        return;
    9492    // Fall through to non-WREC case.
    95 #else
    96     UNUSED_PARAM(globalData);
    9793#endif
    9894    m_regExp = jsRegExpCompile(reinterpret_cast<const UChar*>(pattern.data()), pattern.size(),
     
    10096}
    10197
    102 PassRefPtr<RegExp> RegExp::create(JSGlobalData* globalData, const UString& pattern, const UString& flags)
     98PassRefPtr<RegExp> RegExp::create(const UString& pattern, const UString& flags)
    10399{
    104     return adoptRef(new RegExp(globalData, pattern, flags));
     100    return adoptRef(new RegExp(pattern, flags));
    105101}
    106102
Note: See TracChangeset for help on using the changeset viewer.