Changeset 38465 in webkit for trunk/JavaScriptCore/runtime


Ignore:
Timestamp:
Nov 16, 2008, 6:33:58 PM (17 years ago)
Author:
[email protected]
Message:

2008-11-16 Geoffrey Garen <[email protected]>

Reviewed by Sam Weinig.


Renamed WREC => JSC::WREC, removing JSC:: prefix in a lot of places.
Renamed WRECFunction => WREC::CompiledRegExp, and deployed this type
name in place of a few casts.

  • runtime/RegExp.cpp: (JSC::RegExp::RegExp): (JSC::RegExp::~RegExp): (JSC::RegExp::match):
  • runtime/RegExp.h:
  • wrec/CharacterClassConstructor.cpp:
  • wrec/CharacterClassConstructor.h:
  • wrec/WREC.cpp: (JSC::WREC::compileRegExp):
  • wrec/WREC.h: (JSC::WREC::Generator::Generator): (JSC::WREC::Parser::Parser): (JSC::WREC::Parser::parseAlternative):
Location:
trunk/JavaScriptCore/runtime
Files:
2 edited

Legend:

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

    r38463 r38465  
    3232#include <wtf/OwnArrayPtr.h>
    3333
     34namespace JSC {
     35
    3436#if ENABLE(WREC)
    3537using namespace WREC;
    3638#endif
    37 
    38 namespace JSC {
    3939
    4040inline RegExp::RegExp(JSGlobalData* globalData, const UString& pattern)
     
    4646{
    4747#if ENABLE(WREC)
    48     m_wrecFunction = WREC::compileRegExp(globalData->interpreter, pattern, &m_numSubpatterns, &m_constructionError);
     48    m_wrecFunction = compileRegExp(globalData->interpreter, pattern, &m_numSubpatterns, &m_constructionError);
    4949    if (m_wrecFunction)
    5050        return;
     
    8989
    9090#if ENABLE(WREC)
    91     m_wrecFunction = WREC::compileRegExp(globalData->interpreter, pattern, &m_numSubpatterns, &m_constructionError, (m_flagBits & IgnoreCase), (m_flagBits & Multiline));
     91    m_wrecFunction = compileRegExp(globalData->interpreter, pattern, &m_numSubpatterns, &m_constructionError, (m_flagBits & IgnoreCase), (m_flagBits & Multiline));
    9292    if (m_wrecFunction)
    9393        return;
     
    110110#if ENABLE(WREC)
    111111    if (m_wrecFunction)
    112         WTF::fastFreeExecutable(m_wrecFunction);
     112        WTF::fastFreeExecutable(reinterpret_cast<void*>(m_wrecFunction));
    113113#endif
    114114}
     
    137137            ovector->set(offsetVector);
    138138
    139         int result = reinterpret_cast<WRECFunction>(m_wrecFunction)(s.data(), i, s.size(), offsetVector);
     139        int result = m_wrecFunction(s.data(), i, s.size(), offsetVector);
    140140
    141141        if (result < 0) {
  • trunk/JavaScriptCore/runtime/RegExp.h

    r38463 r38465  
    2323
    2424#include "UString.h"
     25#include "WREC.h"
    2526#include <wtf/Forward.h>
    2627#include <wtf/RefCounted.h>
     
    6768
    6869#if ENABLE(WREC)
    69         // Called as a WRECFunction
    70         void* m_wrecFunction;
     70        WREC::CompiledRegExp m_wrecFunction;
    7171#endif
    7272    };
Note: See TracChangeset for help on using the changeset viewer.