OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 73 |
74 endOfInput.link(&generator); | 74 endOfInput.link(&generator); |
75 generator.generateReturnFailure(); | 75 generator.generateReturnFailure(); |
76 | 76 |
77 if (parser.error()) { | 77 if (parser.error()) { |
78 *error_ptr = parser.syntaxError(); // NULL in the case of patterns that
WREC doesn't support yet. | 78 *error_ptr = parser.syntaxError(); // NULL in the case of patterns that
WREC doesn't support yet. |
79 return 0; | 79 return 0; |
80 } | 80 } |
81 | 81 |
82 *numSubpatterns_ptr = parser.numSubpatterns(); | 82 *numSubpatterns_ptr = parser.numSubpatterns(); |
83 pool = globalData->poolForSize(generator.size()); | 83 pool = globalData->executableAllocator.poolForSize(generator.size()); |
84 return reinterpret_cast<CompiledRegExp>(generator.copyCode(pool.get())); | 84 return reinterpret_cast<CompiledRegExp>(generator.copyCode(pool.get())); |
85 } | 85 } |
86 | 86 |
87 } } // namespace JSC::WREC | 87 } } // namespace JSC::WREC |
88 | 88 |
89 #endif // ENABLE(WREC) | 89 #endif // ENABLE(WREC) |
90 | 90 |
91 | 91 |
92 | 92 |
93 | 93 |
94 | 94 |
95 | 95 |
96 | 96 |
OLD | NEW |