OLD | NEW |
1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 /// Copyright 2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
11 // with the distribution. | 11 // with the distribution. |
(...skipping 19 matching lines...) Expand all Loading... |
31 #include "v8.h" | 31 #include "v8.h" |
32 | 32 |
33 #include "string-stream.h" | 33 #include "string-stream.h" |
34 #include "cctest.h" | 34 #include "cctest.h" |
35 #include "zone-inl.h" | 35 #include "zone-inl.h" |
36 #include "parser.h" | 36 #include "parser.h" |
37 #include "ast.h" | 37 #include "ast.h" |
38 #include "jsregexp-inl.h" | 38 #include "jsregexp-inl.h" |
39 #include "regexp-macro-assembler.h" | 39 #include "regexp-macro-assembler.h" |
40 #include "regexp-macro-assembler-irregexp.h" | 40 #include "regexp-macro-assembler-irregexp.h" |
41 #ifdef ARM | 41 #ifdef V8_ARCH_ARM |
42 #include "arm/regexp-macro-assembler-arm.h" | 42 #include "arm/regexp-macro-assembler-arm.h" |
43 #else // IA32 | 43 #endif |
| 44 #ifdef V8_ARCH_X64 |
| 45 // No X64-implementation yet. |
| 46 #endif |
| 47 #ifdef V8_ARCH_IA32 |
44 #include "ia32/macro-assembler-ia32.h" | 48 #include "ia32/macro-assembler-ia32.h" |
45 #include "ia32/regexp-macro-assembler-ia32.h" | 49 #include "ia32/regexp-macro-assembler-ia32.h" |
46 #endif | 50 #endif |
47 #include "interpreter-irregexp.h" | 51 #include "interpreter-irregexp.h" |
48 | 52 |
49 | 53 |
50 using namespace v8::internal; | 54 using namespace v8::internal; |
51 | 55 |
52 | 56 |
53 static SmartPointer<const char> Parse(const char* input) { | 57 static SmartPointer<const char> Parse(const char* input) { |
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
650 | 654 |
651 const uc16 str2[] = {'b', 'a', 'r', 'f', 'o', 'o'}; | 655 const uc16 str2[] = {'b', 'a', 'r', 'f', 'o', 'o'}; |
652 Handle<String> f2_16 = | 656 Handle<String> f2_16 = |
653 Factory::NewStringFromTwoByte(Vector<const uc16>(str2, 6)); | 657 Factory::NewStringFromTwoByte(Vector<const uc16>(str2, 6)); |
654 | 658 |
655 CHECK(!IrregexpInterpreter::Match(array, f2_16, captures, 0)); | 659 CHECK(!IrregexpInterpreter::Match(array, f2_16, captures, 0)); |
656 CHECK_EQ(42, captures[0]); | 660 CHECK_EQ(42, captures[0]); |
657 } | 661 } |
658 | 662 |
659 | 663 |
660 #ifndef ARM // IA32 only tests. | 664 #ifdef V8_ARCH_IA32 // IA32 only tests. |
661 | 665 |
662 class ContextInitializer { | 666 class ContextInitializer { |
663 public: | 667 public: |
664 ContextInitializer() : env_(), scope_(), stack_guard_() { | 668 ContextInitializer() : env_(), scope_(), stack_guard_() { |
665 env_ = v8::Context::New(); | 669 env_ = v8::Context::New(); |
666 env_->Enter(); | 670 env_->Enter(); |
667 } | 671 } |
668 ~ContextInitializer() { | 672 ~ContextInitializer() { |
669 env_->Exit(); | 673 env_->Exit(); |
670 env_.Dispose(); | 674 env_.Dispose(); |
(...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1523 CHECK(!InClass(i, excluded)); | 1527 CHECK(!InClass(i, excluded)); |
1524 } | 1528 } |
1525 } | 1529 } |
1526 } | 1530 } |
1527 | 1531 |
1528 | 1532 |
1529 TEST(Graph) { | 1533 TEST(Graph) { |
1530 V8::Initialize(NULL); | 1534 V8::Initialize(NULL); |
1531 Execute("(?:(?:x(.))?\1)+$", false, true, true); | 1535 Execute("(?:(?:x(.))?\1)+$", false, true, true); |
1532 } | 1536 } |
OLD | NEW |