Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(306)

Side by Side Diff: src/regexp-macro-assembler.cc

Issue 11087047: Allow unaligned accesses for ARMv7. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comments Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/globals.h ('k') | src/v8globals.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/globals.h ('k') | src/v8globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698