JSRegExp::Flags flags,
unsigned* number_of_captures,
const char** error_message,
- JscreRegExp** code) {
- JSRegExpIgnoreCaseOption case_option = flags.is_ignore_case()
- ? JSRegExpIgnoreCase
- : JSRegExpDoNotIgnoreCase;
- JSRegExpMultilineOption multiline_option = flags.is_multiline()
- ? JSRegExpMultiline
- : JSRegExpSingleLine;
+ v8::jscre::JscreRegExp** code) {
+ v8::jscre::JSRegExpIgnoreCaseOption case_option = flags.is_ignore_case()
+ ? v8::jscre::JSRegExpIgnoreCase
+ : v8::jscre::JSRegExpDoNotIgnoreCase;
+ v8::jscre::JSRegExpMultilineOption multiline_option = flags.is_multiline()
+ ? v8::jscre::JSRegExpMultiline
+ : v8::jscre::JSRegExpSingleLine;
*error_message = NULL;
malloc_failure = Failure::Exception();
- *code = jsRegExpCompile(pattern->GetTwoByteData(),
- pattern->length(),
- case_option,
- multiline_option,
- number_of_captures,
- error_message,
- &JSREMalloc,
- &JSREFree);
+ *code = v8::jscre::jsRegExpCompile(pattern->GetTwoByteData(),
+ pattern->length(),
+ case_option,
+ multiline_option,
+ number_of_captures,
+ error_message,
+ &JSREMalloc,
+ &JSREFree);
if (*code == NULL && (malloc_failure->IsRetryAfterGC() ||
malloc_failure->IsOutOfMemoryFailure())) {
return malloc_failure;
JSRegExp::Flags flags,
unsigned* number_of_captures,
const char** error_message,
- JscreRegExp** code) {
+ v8::jscre::JscreRegExp** code) {
CALL_HEAP_FUNCTION_VOID(DoCompile(*pattern,
flags,
number_of_captures,
unsigned number_of_captures;
const char* error_message = NULL;
- JscreRegExp* code = NULL;
+ v8::jscre::JscreRegExp* code = NULL;
FlattenString(pattern);
CompileWithRetryAfterGC(two_byte_pattern,
{
AssertNoAllocation a;
ByteArray* internal = JscreInternal(regexp);
- const JscreRegExp* js_regexp =
- reinterpret_cast<JscreRegExp*>(internal->GetDataStartAddress());
+ const v8::jscre::JscreRegExp* js_regexp =
+ reinterpret_cast<v8::jscre::JscreRegExp*>(
+ internal->GetDataStartAddress());
LOG(RegExpExecEvent(regexp, previous_index, subject));
- rc = jsRegExpExecute(js_regexp,
- two_byte_subject,
- subject->length(),
- previous_index,
- offsets_vector,
- offsets_vector_length);
+ rc = v8::jscre::jsRegExpExecute(js_regexp,
+ two_byte_subject,
+ subject->length(),
+ previous_index,
+ offsets_vector,
+ offsets_vector_length);
}
// The KJS JavaScript engine returns null (ie, a failed match) when
// JSRE's internal match limit is exceeded. We duplicate that behavior here.
- if (rc == JSRegExpErrorNoMatch
- || rc == JSRegExpErrorHitLimit) {
+ if (rc == v8::jscre::JSRegExpErrorNoMatch
+ || rc == v8::jscre::JSRegExpErrorHitLimit) {
return Factory::null_value();
}
#include "pcre_internal.h"
+namespace v8 { namespace jscre {
+
/*************************************************
* Tables for UTF-8 support *
*************************************************/
3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5 };
#include "pcre_chartables.c"
+
+} } // namespace v8::jscre