Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Unified Diff: src/jsregexp.cc

Issue 99355: Introduce processor detection in globals.h, instead of from the build system. (Closed)
Patch Set: Guard 64-bit literals around 64-bit. Switch to long. Created 11 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/jsregexp.h ('k') | src/macro-assembler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/jsregexp.cc
diff --git a/src/jsregexp.cc b/src/jsregexp.cc
index 1757f5241c5cc1a37cbc70f2c1471d016df392c8..ebaefc0d7ecd8ac9feb148a50475c498f67e80c6 100644
--- a/src/jsregexp.cc
+++ b/src/jsregexp.cc
@@ -42,18 +42,14 @@
#include "regexp-macro-assembler-irregexp.h"
#include "regexp-stack.h"
-#ifdef V8_ARCH_ARM
-#include "arm/regexp-macro-assembler-arm.h"
-#endif
-
-#ifdef V8_ARCH_X64
-#include "x64/macro-assembler-x64.h"
-#include "x64/regexp-macro-assembler-x64.h"
-#endif
-
-#ifdef V8_ARCH_IA32
+#ifdef V8_TARGET_ARCH_IA32
#include "ia32/macro-assembler-ia32.h"
#include "ia32/regexp-macro-assembler-ia32.h"
+#elif V8_TARGET_ARCH_X64
+#include "x64/macro-assembler-x64.h"
+#include "x64/regexp-macro-assembler-x64.h"
+#elif V8_TARGET_ARCH_ARM
+#include "arm/regexp-macro-assembler-arm.h"
#endif
#include "interpreter-irregexp.h"
@@ -431,13 +427,7 @@ Handle<Object> RegExpImpl::IrregexpExec(Handle<JSRegExp> jsregexp,
Handle<String> original_subject = subject;
Handle<FixedArray> regexp(FixedArray::cast(jsregexp->data()));
if (UseNativeRegexp()) {
-#ifdef V8_ARCH_ARM
- UNREACHABLE();
-#endif
-#ifdef V8_ARCH_X64
- UNIMPLEMENTED();
-#endif
-#ifdef V8_ARCH_IA32
+#if V8_TARGET_ARCH_IA32
RegExpMacroAssemblerIA32::Result res;
do {
bool is_ascii = subject->IsAsciiRepresentation();
@@ -461,6 +451,8 @@ Handle<Object> RegExpImpl::IrregexpExec(Handle<JSRegExp> jsregexp,
|| res == RegExpMacroAssemblerIA32::FAILURE);
rc = (res == RegExpMacroAssemblerIA32::SUCCESS);
+#else
+ UNREACHABLE();
#endif
} else {
bool is_ascii = subject->IsAsciiRepresentation();
@@ -2521,7 +2513,7 @@ void LoopChoiceNode::Emit(RegExpCompiler* compiler, Trace* trace) {
int ChoiceNode::CalculatePreloadCharacters(RegExpCompiler* compiler) {
int preload_characters = EatsAtLeast(4, 0);
-#ifdef CAN_READ_UNALIGNED
+#ifdef V8_HOST_CAN_READ_UNALIGNED
bool ascii = compiler->ascii();
if (ascii) {
if (preload_characters > 4) preload_characters = 4;
@@ -4445,13 +4437,13 @@ RegExpEngine::CompilationResult RegExpEngine::Compile(RegExpCompileData* data,
NodeInfo info = *node->info();
if (RegExpImpl::UseNativeRegexp()) {
-#ifdef V8_ARCH_ARM
+#ifdef V8_TARGET_ARCH_ARM
UNREACHABLE();
#endif
-#ifdef V8_ARCH_X64
+#ifdef V8_TARGET_ARCH_X64
UNREACHABLE();
#endif
-#ifdef V8_ARCH_IA32
+#ifdef V8_TARGET_ARCH_IA32
RegExpMacroAssemblerIA32::Mode mode;
if (is_ascii) {
mode = RegExpMacroAssemblerIA32::ASCII;
« no previous file with comments | « src/jsregexp.h ('k') | src/macro-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698