Index: src/jsregexp.cc |
diff --git a/src/jsregexp.cc b/src/jsregexp.cc |
index 06208aa50aebda4d9170781d220dac084b98cb24..4fb8a9fdaa7735e55f6044eb42a08f34752b9aa0 100644 |
--- a/src/jsregexp.cc |
+++ b/src/jsregexp.cc |
@@ -51,6 +51,7 @@ |
#include "x64/macro-assembler-x64.h" |
#include "x64/regexp-macro-assembler-x64.h" |
#elif V8_TARGET_ARCH_ARM |
+#include "arm/macro-assembler-arm.h" |
#include "arm/regexp-macro-assembler-arm.h" |
#else |
#error Unsupported target architecture. |
@@ -419,9 +420,7 @@ Handle<Object> RegExpImpl::IrregexpExec(Handle<JSRegExp> jsregexp, |
Handle<FixedArray> regexp(FixedArray::cast(jsregexp->data())); |
#ifdef V8_NATIVE_REGEXP |
-#ifdef V8_TARGET_ARCH_ARM |
- UNIMPLEMENTED(); |
-#else // Native regexp supported. |
+ |
OffsetsVector captures(number_of_capture_registers); |
int* captures_vector = captures.vector(); |
NativeRegExpMacroAssembler::Result res; |
@@ -455,9 +454,9 @@ Handle<Object> RegExpImpl::IrregexpExec(Handle<JSRegExp> jsregexp, |
SetCapture(*array, i, captures_vector[i]); |
SetCapture(*array, i + 1, captures_vector[i + 1]); |
} |
-#endif // Native regexp supported. |
#else // ! V8_NATIVE_REGEXP |
+ |
bool is_ascii = subject->IsAsciiRepresentation(); |
if (!EnsureCompiledIrregexp(jsregexp, is_ascii)) { |
return Handle<Object>::null(); |
@@ -487,6 +486,7 @@ Handle<Object> RegExpImpl::IrregexpExec(Handle<JSRegExp> jsregexp, |
SetCapture(*array, i, register_vector[i]); |
SetCapture(*array, i + 1, register_vector[i + 1]); |
} |
+ |
#endif // V8_NATIVE_REGEXP |
SetLastCaptureCount(*array, number_of_capture_registers); |
@@ -4470,16 +4470,12 @@ RegExpEngine::CompilationResult RegExpEngine::Compile(RegExpCompileData* data, |
is_ascii ? NativeRegExpMacroAssembler::ASCII |
: NativeRegExpMacroAssembler::UC16; |
-#ifdef V8_TARGET_ARCH_IA32 |
- RegExpMacroAssemblerIA32 macro_assembler(mode, |
- (data->capture_count + 1) * 2); |
-#endif |
-#ifdef V8_TARGET_ARCH_X64 |
- RegExpMacroAssemblerX64 macro_assembler(mode, |
- (data->capture_count + 1) * 2); |
-#endif |
-#ifdef V8_TARGET_ARCH_ARM |
- UNIMPLEMENTED(); |
+#if V8_TARGET_ARCH_IA32 |
+ RegExpMacroAssemblerIA32 macro_assembler(mode, (data->capture_count + 1) * 2); |
+#elif V8_TARGET_ARCH_X64 |
+ RegExpMacroAssemblerX64 macro_assembler(mode, (data->capture_count + 1) * 2); |
+#elif V8_TARGET_ARCH_ARM |
+ RegExpMacroAssemblerARM macro_assembler(mode, (data->capture_count + 1) * 2); |
#endif |
#else // ! V8_NATIVE_REGEXP |