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/regexp/regexp-macro-assembler.h" | 5 #include "src/regexp/regexp-macro-assembler.h" |
6 | 6 |
7 #include "src/assembler.h" | 7 #include "src/assembler.h" |
8 #include "src/isolate-inl.h" | 8 #include "src/isolate-inl.h" |
9 #include "src/regexp/regexp-stack.h" | 9 #include "src/regexp/regexp-stack.h" |
10 #include "src/simulator.h" | 10 #include "src/simulator.h" |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 NativeRegExpMacroAssembler::NativeRegExpMacroAssembler(Isolate* isolate, | 115 NativeRegExpMacroAssembler::NativeRegExpMacroAssembler(Isolate* isolate, |
116 Zone* zone) | 116 Zone* zone) |
117 : RegExpMacroAssembler(isolate, zone) {} | 117 : RegExpMacroAssembler(isolate, zone) {} |
118 | 118 |
119 | 119 |
120 NativeRegExpMacroAssembler::~NativeRegExpMacroAssembler() { | 120 NativeRegExpMacroAssembler::~NativeRegExpMacroAssembler() { |
121 } | 121 } |
122 | 122 |
123 | 123 |
124 bool NativeRegExpMacroAssembler::CanReadUnaligned() { | 124 bool NativeRegExpMacroAssembler::CanReadUnaligned() { |
125 return FLAG_enable_unaligned_accesses && !slow_safe(); | 125 return FLAG_enable_regexp_unaligned_accesses && !slow_safe(); |
126 } | 126 } |
127 | 127 |
128 const byte* NativeRegExpMacroAssembler::StringCharacterPosition( | 128 const byte* NativeRegExpMacroAssembler::StringCharacterPosition( |
129 String* subject, | 129 String* subject, |
130 int start_index) { | 130 int start_index) { |
131 if (subject->IsConsString()) { | 131 if (subject->IsConsString()) { |
132 subject = ConsString::cast(subject)->first(); | 132 subject = ConsString::cast(subject)->first(); |
133 } else if (subject->IsSlicedString()) { | 133 } else if (subject->IsSlicedString()) { |
134 start_index += SlicedString::cast(subject)->offset(); | 134 start_index += SlicedString::cast(subject)->offset(); |
135 subject = SlicedString::cast(subject)->parent(); | 135 subject = SlicedString::cast(subject)->parent(); |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 } | 347 } |
348 *stack_base = new_stack_base; | 348 *stack_base = new_stack_base; |
349 intptr_t stack_content_size = old_stack_base - stack_pointer; | 349 intptr_t stack_content_size = old_stack_base - stack_pointer; |
350 return new_stack_base - stack_content_size; | 350 return new_stack_base - stack_content_size; |
351 } | 351 } |
352 | 352 |
353 #endif // V8_INTERPRETED_REGEXP | 353 #endif // V8_INTERPRETED_REGEXP |
354 | 354 |
355 } // namespace internal | 355 } // namespace internal |
356 } // namespace v8 | 356 } // namespace v8 |
OLD | NEW |