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

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

Issue 173567: ARM native regexps. (Closed)
Patch Set: Created 11 years, 3 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
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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 int* offsets_vector, 188 int* offsets_vector,
189 int offsets_vector_length, 189 int offsets_vector_length,
190 int previous_index); 190 int previous_index);
191 191
192 // Compares two-byte strings case insensitively. 192 // Compares two-byte strings case insensitively.
193 // Called from generated RegExp code. 193 // Called from generated RegExp code.
194 static int CaseInsensitiveCompareUC16(Address byte_offset1, 194 static int CaseInsensitiveCompareUC16(Address byte_offset1,
195 Address byte_offset2, 195 Address byte_offset2,
196 size_t byte_length); 196 size_t byte_length);
197 197
198 // Called from RegExp if the backtrack stack limit is hit.
199 // Tries to expand the stack. Returns the new stack-pointer if
200 // successful, and updates the stack_top address, or returns 0 if unable
201 // to grow the stack.
202 // This function must not trigger a garbage collection.
203 static Address GrowStack(Address stack_pointer, Address* stack_top);
204
198 static const byte* StringCharacterPosition(String* subject, int start_index); 205 static const byte* StringCharacterPosition(String* subject, int start_index);
199 206
200 static Result Execute(Code* code, 207 static Result Execute(Code* code,
201 String* input, 208 String* input,
202 int start_offset, 209 int start_offset,
203 const byte* input_start, 210 const byte* input_start,
204 const byte* input_end, 211 const byte* input_end,
205 int* output, 212 int* output,
206 bool at_start); 213 bool at_start);
207 }; 214 };
215
216
217 // Enter C code from generated RegExp code in a way that allows
218 // the C code to fix the return address in case of a GC.
219 // Currently only needed on ARM.
220 class RegExpCEntryStub: public CodeStub {
221 public:
222 RegExpCEntryStub() {}
223 virtual ~RegExpCEntryStub() {}
224 void Generate(MacroAssembler* masm);
225
226 private:
227 Major MajorKey() { return RegExpCEntry; }
228 int MinorKey() { return 0; }
229 const char* GetName() { return "RegExpCEntryStub"; }
230 };
231
208 #endif // V8_NATIVE_REGEXP 232 #endif // V8_NATIVE_REGEXP
233
209 } } // namespace v8::internal 234 } } // namespace v8::internal
210 235
211 #endif // V8_REGEXP_MACRO_ASSEMBLER_H_ 236 #endif // V8_REGEXP_MACRO_ASSEMBLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698