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

Unified Diff: test/cctest/test-regexp.cc

Issue 181453002: Reset trunk to 3.24.35.4 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 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 | « test/cctest/test-platform.cc ('k') | test/cctest/test-symbols.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-regexp.cc
diff --git a/test/cctest/test-regexp.cc b/test/cctest/test-regexp.cc
index b3d62f4717bd963dd6841b7b1566a26269b306e8..d0193520fae9a5e225ff7d1379b4fcf61653df08 100644
--- a/test/cctest/test-regexp.cc
+++ b/test/cctest/test-regexp.cc
@@ -49,11 +49,6 @@
#include "arm/macro-assembler-arm.h"
#include "arm/regexp-macro-assembler-arm.h"
#endif
-#if V8_TARGET_ARCH_A64
-#include "a64/assembler-a64.h"
-#include "a64/macro-assembler-a64.h"
-#include "a64/regexp-macro-assembler-a64.h"
-#endif
#if V8_TARGET_ARCH_MIPS
#include "mips/assembler-mips.h"
#include "mips/macro-assembler-mips.h"
@@ -449,15 +444,27 @@ static bool NotDigit(uc16 c) {
}
-static bool IsWhiteSpaceOrLineTerminator(uc16 c) {
- // According to ECMA 5.1, 15.10.2.12 the CharacterClassEscape \s includes
- // WhiteSpace (7.2) and LineTerminator (7.3) values.
- return v8::internal::WhiteSpaceOrLineTerminator::Is(c);
+static bool IsWhiteSpace(uc16 c) {
+ switch (c) {
+ case 0x09:
+ case 0x0A:
+ case 0x0B:
+ case 0x0C:
+ case 0x0d:
+ case 0x20:
+ case 0xA0:
+ case 0x2028:
+ case 0x2029:
+ case 0xFEFF:
+ return true;
+ default:
+ return unibrow::Space::Is(c);
+ }
}
-static bool NotWhiteSpaceNorLineTermiantor(uc16 c) {
- return !IsWhiteSpaceOrLineTerminator(c);
+static bool NotWhiteSpace(uc16 c) {
+ return !IsWhiteSpace(c);
}
@@ -487,8 +494,8 @@ TEST(CharacterClassEscapes) {
TestCharacterClassEscapes('.', IsRegExpNewline);
TestCharacterClassEscapes('d', IsDigit);
TestCharacterClassEscapes('D', NotDigit);
- TestCharacterClassEscapes('s', IsWhiteSpaceOrLineTerminator);
- TestCharacterClassEscapes('S', NotWhiteSpaceNorLineTermiantor);
+ TestCharacterClassEscapes('s', IsWhiteSpace);
+ TestCharacterClassEscapes('S', NotWhiteSpace);
TestCharacterClassEscapes('w', IsRegExpWord);
TestCharacterClassEscapes('W', NotWord);
}
@@ -694,8 +701,6 @@ typedef RegExpMacroAssemblerIA32 ArchRegExpMacroAssembler;
typedef RegExpMacroAssemblerX64 ArchRegExpMacroAssembler;
#elif V8_TARGET_ARCH_ARM
typedef RegExpMacroAssemblerARM ArchRegExpMacroAssembler;
-#elif V8_TARGET_ARCH_A64
-typedef RegExpMacroAssemblerA64 ArchRegExpMacroAssembler;
#elif V8_TARGET_ARCH_MIPS
typedef RegExpMacroAssemblerMIPS ArchRegExpMacroAssembler;
#endif
« no previous file with comments | « test/cctest/test-platform.cc ('k') | test/cctest/test-symbols.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698