Changeset 46643 in webkit


Ignore:
Timestamp:
Jul 31, 2009, 3:29:11 PM (16 years ago)
Author:
[email protected]
Message:

2009-07-31 Zoltan Horvath <[email protected]>

Change malloc to fastMalloc and free to fastFree in Yarr's RegexInterpreter.cpp
https://bugs.webkit.org/show_bug.cgi?id=27874

Use fastMalloc and fastFree instead of malloc and free in RegexInterpreter.cpp's methods.

  • yarr/RegexInterpreter.cpp: (JSC::Yarr::Interpreter::allocDisjunctionContext): (JSC::Yarr::Interpreter::freeDisjunctionContext): (JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext): (JSC::Yarr::Interpreter::freeParenthesesDisjunctionContext):
Location:
trunk/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r46623 r46643  
     12009-07-31  Zoltan Horvath  <[email protected]>
     2
     3        Change malloc to fastMalloc and free to fastFree in Yarr's RegexInterpreter.cpp
     4        https://bugs.webkit.org/show_bug.cgi?id=27874
     5
     6        Use fastMalloc and fastFree instead of malloc and free in RegexInterpreter.cpp's methods.
     7
     8        * yarr/RegexInterpreter.cpp:
     9        (JSC::Yarr::Interpreter::allocDisjunctionContext):
     10        (JSC::Yarr::Interpreter::freeDisjunctionContext):
     11        (JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext):
     12        (JSC::Yarr::Interpreter::freeParenthesesDisjunctionContext):
     13
    1142009-07-30  Xan Lopez  <[email protected]>
    215
  • trunk/JavaScriptCore/yarr/RegexInterpreter.cpp

    r44174 r46643  
    105105    DisjunctionContext* allocDisjunctionContext(ByteDisjunction* disjunction)
    106106    {
    107         return new(malloc(sizeof(DisjunctionContext) + (disjunction->m_frameSize - 1) * sizeof(uintptr_t))) DisjunctionContext();
     107        return new(fastMalloc(sizeof(DisjunctionContext) + (disjunction->m_frameSize - 1) * sizeof(uintptr_t))) DisjunctionContext();
    108108    }
    109109
    110110    void freeDisjunctionContext(DisjunctionContext* context)
    111111    {
    112         free(context);
     112        fastFree(context);
    113113    }
    114114
     
    151151    ParenthesesDisjunctionContext* allocParenthesesDisjunctionContext(ByteDisjunction* disjunction, int* output, ByteTerm& term)
    152152    {
    153         return new(malloc(sizeof(ParenthesesDisjunctionContext) + (((term.atom.parenthesesDisjunction->m_numSubpatterns << 1) - 1) * sizeof(int)) + sizeof(DisjunctionContext) + (disjunction->m_frameSize - 1) * sizeof(uintptr_t))) ParenthesesDisjunctionContext(output, term);
     153        return new(fastMalloc(sizeof(ParenthesesDisjunctionContext) + (((term.atom.parenthesesDisjunction->m_numSubpatterns << 1) - 1) * sizeof(int)) + sizeof(DisjunctionContext) + (disjunction->m_frameSize - 1) * sizeof(uintptr_t))) ParenthesesDisjunctionContext(output, term);
    154154    }
    155155
    156156    void freeParenthesesDisjunctionContext(ParenthesesDisjunctionContext* context)
    157157    {
    158         free(context);
     158        fastFree(context);
    159159    }
    160160
Note: See TracChangeset for help on using the changeset viewer.