Changeset 46643 in webkit
- Timestamp:
- Jul 31, 2009, 3:29:11 PM (16 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r46623 r46643 1 2009-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 1 14 2009-07-30 Xan Lopez <[email protected]> 2 15 -
trunk/JavaScriptCore/yarr/RegexInterpreter.cpp
r44174 r46643 105 105 DisjunctionContext* allocDisjunctionContext(ByteDisjunction* disjunction) 106 106 { 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(); 108 108 } 109 109 110 110 void freeDisjunctionContext(DisjunctionContext* context) 111 111 { 112 f ree(context);112 fastFree(context); 113 113 } 114 114 … … 151 151 ParenthesesDisjunctionContext* allocParenthesesDisjunctionContext(ByteDisjunction* disjunction, int* output, ByteTerm& term) 152 152 { 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); 154 154 } 155 155 156 156 void freeParenthesesDisjunctionContext(ParenthesesDisjunctionContext* context) 157 157 { 158 f ree(context);158 fastFree(context); 159 159 } 160 160
Note:
See TracChangeset
for help on using the changeset viewer.