OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/assembler.h" | 7 #include "src/assembler.h" |
8 #include "src/ast.h" | 8 #include "src/ast.h" |
9 #include "src/regexp-macro-assembler.h" | 9 #include "src/regexp-macro-assembler.h" |
10 #include "src/regexp-stack.h" | 10 #include "src/regexp-stack.h" |
11 #include "src/simulator.h" | 11 #include "src/simulator.h" |
12 | 12 |
13 namespace v8 { | 13 namespace v8 { |
14 namespace internal { | 14 namespace internal { |
15 | 15 |
16 RegExpMacroAssembler::RegExpMacroAssembler(Zone* zone) | 16 RegExpMacroAssembler::RegExpMacroAssembler(Zone* zone) |
17 : slow_safe_compiler_(false), | 17 : slow_safe_compiler_(false), |
18 global_mode_(NOT_GLOBAL), | 18 global_mode_(NOT_GLOBAL), |
19 zone_(zone) { | 19 zone_(zone) { |
20 } | 20 } |
21 | 21 |
22 | 22 |
23 RegExpMacroAssembler::~RegExpMacroAssembler() { | 23 RegExpMacroAssembler::~RegExpMacroAssembler() { |
24 } | 24 } |
25 | 25 |
26 | 26 |
| 27 bool RegExpMacroAssembler::CanReadUnaligned() { |
| 28 #ifdef V8_HOST_CAN_READ_UNALIGNED |
| 29 return true; |
| 30 #else |
| 31 return false; |
| 32 #endif |
| 33 } |
| 34 |
| 35 |
27 #ifndef V8_INTERPRETED_REGEXP // Avoid unused code, e.g., on ARM. | 36 #ifndef V8_INTERPRETED_REGEXP // Avoid unused code, e.g., on ARM. |
28 | 37 |
29 NativeRegExpMacroAssembler::NativeRegExpMacroAssembler(Zone* zone) | 38 NativeRegExpMacroAssembler::NativeRegExpMacroAssembler(Zone* zone) |
30 : RegExpMacroAssembler(zone) { | 39 : RegExpMacroAssembler(zone) { |
31 } | 40 } |
32 | 41 |
33 | 42 |
34 NativeRegExpMacroAssembler::~NativeRegExpMacroAssembler() { | 43 NativeRegExpMacroAssembler::~NativeRegExpMacroAssembler() { |
35 } | 44 } |
36 | 45 |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 return NULL; | 258 return NULL; |
250 } | 259 } |
251 *stack_base = new_stack_base; | 260 *stack_base = new_stack_base; |
252 intptr_t stack_content_size = old_stack_base - stack_pointer; | 261 intptr_t stack_content_size = old_stack_base - stack_pointer; |
253 return new_stack_base - stack_content_size; | 262 return new_stack_base - stack_content_size; |
254 } | 263 } |
255 | 264 |
256 #endif // V8_INTERPRETED_REGEXP | 265 #endif // V8_INTERPRETED_REGEXP |
257 | 266 |
258 } } // namespace v8::internal | 267 } } // namespace v8::internal |
OLD | NEW |