Ignore:
Timestamp:
Mar 29, 2012, 1:16:03 PM (13 years ago)
Author:
[email protected]
Message:

Template the Yarr::Interpreter on the character type
https://bugs.webkit.org/show_bug.cgi?id=82637

Reviewed by Sam Weinig.

We should be able to call to the interpreter after having already checked the character type,
without having to re-package the character pointer back up into a string!

../JavaScriptCore:

  • runtime/RegExp.cpp:

(JSC::RegExp::match):
(JSC::RegExp::matchCompareWithInterpreter):

  • Don't pass length.
  • yarr/Yarr.h:
    • moved function declarations to YarrInterpreter.h.
  • yarr/YarrInterpreter.cpp:

(Yarr):
(Interpreter):
(JSC::Yarr::Interpreter::InputStream::InputStream):
(InputStream):
(JSC::Yarr::Interpreter::Interpreter):
(JSC::Yarr::interpret):

  • templated Interpreter class on CharType.
  • yarr/YarrInterpreter.h:

(Yarr):

  • added function declarations.

../WebCore:

  • inspector/ContentSearchUtils.cpp:

(WebCore::ContentSearchUtils::findMagicComment):

  • platform/text/RegularExpression.cpp:

(WebCore::RegularExpression::match):

  • Don't pass length.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/yarr/YarrInterpreter.h

    r108858 r112564  
    376376};
    377377
     378JS_EXPORT_PRIVATE PassOwnPtr<BytecodePattern> byteCompile(YarrPattern&, BumpPointerAllocator*);
     379JS_EXPORT_PRIVATE unsigned interpret(BytecodePattern*, const UString& input, unsigned start, unsigned* output);
     380unsigned interpret(BytecodePattern*, const LChar* input, unsigned length, unsigned start, unsigned* output);
     381unsigned interpret(BytecodePattern*, const UChar* input, unsigned length, unsigned start, unsigned* output);
     382
    378383} } // namespace JSC::Yarr
    379384
Note: See TracChangeset for help on using the changeset viewer.