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

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

Issue 6526043: Fix non-simulated ARM calling of RegExp code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge/build-ia32
Patch Set: More generic approach. Created 9 years, 10 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/ia32/simulator-ia32.h ('k') | src/x64/simulator-x64.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 2008 the V8 project authors. All rights reserved. 1 // Copyright 2008 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 } 147 }
148 148
149 149
150 NativeRegExpMacroAssembler::Result NativeRegExpMacroAssembler::Execute( 150 NativeRegExpMacroAssembler::Result NativeRegExpMacroAssembler::Execute(
151 Code* code, 151 Code* code,
152 String* input, 152 String* input,
153 int start_offset, 153 int start_offset,
154 const byte* input_start, 154 const byte* input_start,
155 const byte* input_end, 155 const byte* input_end,
156 int* output) { 156 int* output) {
157 typedef int (*matcher)(String*, int, const byte*,
158 const byte*, int*, Address, int);
159 matcher matcher_func = FUNCTION_CAST<matcher>(code->entry());
160
161 // Ensure that the minimum stack has been allocated. 157 // Ensure that the minimum stack has been allocated.
162 RegExpStack stack; 158 RegExpStack stack;
163 Address stack_base = RegExpStack::stack_base(); 159 Address stack_base = RegExpStack::stack_base();
164 160
165 int direct_call = 0; 161 int direct_call = 0;
166 int result = CALL_GENERATED_REGEXP_CODE(matcher_func, 162 int result = CALL_GENERATED_REGEXP_CODE(code->entry(),
167 input, 163 input,
168 start_offset, 164 start_offset,
169 input_start, 165 input_start,
170 input_end, 166 input_end,
171 output, 167 output,
172 stack_base, 168 stack_base,
173 direct_call); 169 direct_call);
174 ASSERT(result <= SUCCESS); 170 ASSERT(result <= SUCCESS);
175 ASSERT(result >= RETRY); 171 ASSERT(result >= RETRY);
176 172
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 return NULL; 248 return NULL;
253 } 249 }
254 *stack_base = new_stack_base; 250 *stack_base = new_stack_base;
255 intptr_t stack_content_size = old_stack_base - stack_pointer; 251 intptr_t stack_content_size = old_stack_base - stack_pointer;
256 return new_stack_base - stack_content_size; 252 return new_stack_base - stack_content_size;
257 } 253 }
258 254
259 #endif // V8_INTERPRETED_REGEXP 255 #endif // V8_INTERPRETED_REGEXP
260 256
261 } } // namespace v8::internal 257 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/simulator-ia32.h ('k') | src/x64/simulator-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698