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 17 matching lines...) Expand all Loading... |
28 #include "v8.h" | 28 #include "v8.h" |
29 #include "ast.h" | 29 #include "ast.h" |
30 #include "assembler.h" | 30 #include "assembler.h" |
31 #include "regexp-stack.h" | 31 #include "regexp-stack.h" |
32 #include "regexp-macro-assembler.h" | 32 #include "regexp-macro-assembler.h" |
33 #include "simulator.h" | 33 #include "simulator.h" |
34 | 34 |
35 namespace v8 { | 35 namespace v8 { |
36 namespace internal { | 36 namespace internal { |
37 | 37 |
38 RegExpMacroAssembler::RegExpMacroAssembler() | 38 RegExpMacroAssembler::RegExpMacroAssembler(Zone* zone) |
39 : slow_safe_compiler_(false), | 39 : slow_safe_compiler_(false), |
40 global_mode_(NOT_GLOBAL) { | 40 global_mode_(NOT_GLOBAL), |
| 41 zone_(zone) { |
41 } | 42 } |
42 | 43 |
43 | 44 |
44 RegExpMacroAssembler::~RegExpMacroAssembler() { | 45 RegExpMacroAssembler::~RegExpMacroAssembler() { |
45 } | 46 } |
46 | 47 |
47 | 48 |
48 bool RegExpMacroAssembler::CanReadUnaligned() { | 49 bool RegExpMacroAssembler::CanReadUnaligned() { |
49 #ifdef V8_HOST_CAN_READ_UNALIGNED | 50 #ifdef V8_HOST_CAN_READ_UNALIGNED |
50 return true; | 51 return true; |
51 #else | 52 #else |
52 return false; | 53 return false; |
53 #endif | 54 #endif |
54 } | 55 } |
55 | 56 |
56 | 57 |
57 #ifndef V8_INTERPRETED_REGEXP // Avoid unused code, e.g., on ARM. | 58 #ifndef V8_INTERPRETED_REGEXP // Avoid unused code, e.g., on ARM. |
58 | 59 |
59 NativeRegExpMacroAssembler::NativeRegExpMacroAssembler() | 60 NativeRegExpMacroAssembler::NativeRegExpMacroAssembler(Zone* zone) |
60 : RegExpMacroAssembler() { | 61 : RegExpMacroAssembler(zone) { |
61 } | 62 } |
62 | 63 |
63 | 64 |
64 NativeRegExpMacroAssembler::~NativeRegExpMacroAssembler() { | 65 NativeRegExpMacroAssembler::~NativeRegExpMacroAssembler() { |
65 } | 66 } |
66 | 67 |
67 | 68 |
68 bool NativeRegExpMacroAssembler::CanReadUnaligned() { | 69 bool NativeRegExpMacroAssembler::CanReadUnaligned() { |
69 #ifdef V8_TARGET_CAN_READ_UNALIGNED | 70 #ifdef V8_TARGET_CAN_READ_UNALIGNED |
70 return !slow_safe(); | 71 return !slow_safe(); |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 return NULL; | 267 return NULL; |
267 } | 268 } |
268 *stack_base = new_stack_base; | 269 *stack_base = new_stack_base; |
269 intptr_t stack_content_size = old_stack_base - stack_pointer; | 270 intptr_t stack_content_size = old_stack_base - stack_pointer; |
270 return new_stack_base - stack_content_size; | 271 return new_stack_base - stack_content_size; |
271 } | 272 } |
272 | 273 |
273 #endif // V8_INTERPRETED_REGEXP | 274 #endif // V8_INTERPRETED_REGEXP |
274 | 275 |
275 } } // namespace v8::internal | 276 } } // namespace v8::internal |
OLD | NEW |