| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 NativeRegExpMacroAssembler::NativeRegExpMacroAssembler(Zone* zone) | 60 NativeRegExpMacroAssembler::NativeRegExpMacroAssembler(Zone* zone) |
| 61 : RegExpMacroAssembler(zone) { | 61 : RegExpMacroAssembler(zone) { |
| 62 } | 62 } |
| 63 | 63 |
| 64 | 64 |
| 65 NativeRegExpMacroAssembler::~NativeRegExpMacroAssembler() { | 65 NativeRegExpMacroAssembler::~NativeRegExpMacroAssembler() { |
| 66 } | 66 } |
| 67 | 67 |
| 68 | 68 |
| 69 bool NativeRegExpMacroAssembler::CanReadUnaligned() { | 69 bool NativeRegExpMacroAssembler::CanReadUnaligned() { |
| 70 #ifdef V8_TARGET_CAN_READ_UNALIGNED | 70 return FLAG_enable_unaligned_accesses && !slow_safe(); |
| 71 return !slow_safe(); | |
| 72 #else | |
| 73 return false; | |
| 74 #endif | |
| 75 } | 71 } |
| 76 | 72 |
| 77 const byte* NativeRegExpMacroAssembler::StringCharacterPosition( | 73 const byte* NativeRegExpMacroAssembler::StringCharacterPosition( |
| 78 String* subject, | 74 String* subject, |
| 79 int start_index) { | 75 int start_index) { |
| 80 // Not just flat, but ultra flat. | 76 // Not just flat, but ultra flat. |
| 81 ASSERT(subject->IsExternalString() || subject->IsSeqString()); | 77 ASSERT(subject->IsExternalString() || subject->IsSeqString()); |
| 82 ASSERT(start_index >= 0); | 78 ASSERT(start_index >= 0); |
| 83 ASSERT(start_index <= subject->length()); | 79 ASSERT(start_index <= subject->length()); |
| 84 if (subject->IsAsciiRepresentation()) { | 80 if (subject->IsAsciiRepresentation()) { |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 return NULL; | 263 return NULL; |
| 268 } | 264 } |
| 269 *stack_base = new_stack_base; | 265 *stack_base = new_stack_base; |
| 270 intptr_t stack_content_size = old_stack_base - stack_pointer; | 266 intptr_t stack_content_size = old_stack_base - stack_pointer; |
| 271 return new_stack_base - stack_content_size; | 267 return new_stack_base - stack_content_size; |
| 272 } | 268 } |
| 273 | 269 |
| 274 #endif // V8_INTERPRETED_REGEXP | 270 #endif // V8_INTERPRETED_REGEXP |
| 275 | 271 |
| 276 } } // namespace v8::internal | 272 } } // namespace v8::internal |
| OLD | NEW |