OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 | 45 |
46 #ifndef V8_INTERPRETED_REGEXP | 46 #ifndef V8_INTERPRETED_REGEXP |
47 #if V8_TARGET_ARCH_IA32 | 47 #if V8_TARGET_ARCH_IA32 |
48 #include "ia32/regexp-macro-assembler-ia32.h" | 48 #include "ia32/regexp-macro-assembler-ia32.h" |
49 #elif V8_TARGET_ARCH_X64 | 49 #elif V8_TARGET_ARCH_X64 |
50 #include "x64/regexp-macro-assembler-x64.h" | 50 #include "x64/regexp-macro-assembler-x64.h" |
51 #elif V8_TARGET_ARCH_ARM | 51 #elif V8_TARGET_ARCH_ARM |
52 #include "arm/regexp-macro-assembler-arm.h" | 52 #include "arm/regexp-macro-assembler-arm.h" |
53 #elif V8_TARGET_ARCH_MIPS | 53 #elif V8_TARGET_ARCH_MIPS |
54 #include "mips/regexp-macro-assembler-mips.h" | 54 #include "mips/regexp-macro-assembler-mips.h" |
| 55 #elif V8_TARGET_ARCH_SH4 |
| 56 #include "sh4/regexp-macro-assembler-sh4.h" |
55 #else | 57 #else |
56 #error Unsupported target architecture. | 58 #error Unsupported target architecture. |
57 #endif | 59 #endif |
58 #endif | 60 #endif |
59 | 61 |
60 #include "interpreter-irregexp.h" | 62 #include "interpreter-irregexp.h" |
61 | 63 |
62 | 64 |
63 namespace v8 { | 65 namespace v8 { |
64 namespace internal { | 66 namespace internal { |
(...skipping 6062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6127 zone); | 6129 zone); |
6128 #elif V8_TARGET_ARCH_X64 | 6130 #elif V8_TARGET_ARCH_X64 |
6129 RegExpMacroAssemblerX64 macro_assembler(mode, (data->capture_count + 1) * 2, | 6131 RegExpMacroAssemblerX64 macro_assembler(mode, (data->capture_count + 1) * 2, |
6130 zone); | 6132 zone); |
6131 #elif V8_TARGET_ARCH_ARM | 6133 #elif V8_TARGET_ARCH_ARM |
6132 RegExpMacroAssemblerARM macro_assembler(mode, (data->capture_count + 1) * 2, | 6134 RegExpMacroAssemblerARM macro_assembler(mode, (data->capture_count + 1) * 2, |
6133 zone); | 6135 zone); |
6134 #elif V8_TARGET_ARCH_MIPS | 6136 #elif V8_TARGET_ARCH_MIPS |
6135 RegExpMacroAssemblerMIPS macro_assembler(mode, (data->capture_count + 1) * 2, | 6137 RegExpMacroAssemblerMIPS macro_assembler(mode, (data->capture_count + 1) * 2, |
6136 zone); | 6138 zone); |
| 6139 #elif V8_TARGET_ARCH_SH4 |
| 6140 RegExpMacroAssemblerSH4 macro_assembler(mode, (data->capture_count + 1) * 2, |
| 6141 zone); |
6137 #endif | 6142 #endif |
6138 | 6143 |
6139 #else // V8_INTERPRETED_REGEXP | 6144 #else // V8_INTERPRETED_REGEXP |
6140 // Interpreted regexp implementation. | 6145 // Interpreted regexp implementation. |
6141 EmbeddedVector<byte, 1024> codes; | 6146 EmbeddedVector<byte, 1024> codes; |
6142 RegExpMacroAssemblerIrregexp macro_assembler(codes, zone); | 6147 RegExpMacroAssemblerIrregexp macro_assembler(codes, zone); |
6143 #endif // V8_INTERPRETED_REGEXP | 6148 #endif // V8_INTERPRETED_REGEXP |
6144 | 6149 |
6145 // Inserted here, instead of in Assembler, because it depends on information | 6150 // Inserted here, instead of in Assembler, because it depends on information |
6146 // in the AST that isn't replicated in the Node structure. | 6151 // in the AST that isn't replicated in the Node structure. |
(...skipping 12 matching lines...) Expand all Loading... |
6159 } | 6164 } |
6160 | 6165 |
6161 return compiler.Assemble(¯o_assembler, | 6166 return compiler.Assemble(¯o_assembler, |
6162 node, | 6167 node, |
6163 data->capture_count, | 6168 data->capture_count, |
6164 pattern); | 6169 pattern); |
6165 } | 6170 } |
6166 | 6171 |
6167 | 6172 |
6168 }} // namespace v8::internal | 6173 }} // namespace v8::internal |
OLD | NEW |