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

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

Issue 3357023: [Isolates] Pass current isolate address to the regexp native functions (Closed)
Patch Set: Made helper function private(ARM) Created 10 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
« no previous file with comments | « src/objects-inl.h ('k') | src/regexp-macro-assembler.cc » ('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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 enum Result { RETRY = -2, EXCEPTION = -1, FAILURE = 0, SUCCESS = 1 }; 182 enum Result { RETRY = -2, EXCEPTION = -1, FAILURE = 0, SUCCESS = 1 };
183 183
184 NativeRegExpMacroAssembler(); 184 NativeRegExpMacroAssembler();
185 virtual ~NativeRegExpMacroAssembler(); 185 virtual ~NativeRegExpMacroAssembler();
186 virtual bool CanReadUnaligned(); 186 virtual bool CanReadUnaligned();
187 187
188 static Result Match(Handle<Code> regexp, 188 static Result Match(Handle<Code> regexp,
189 Handle<String> subject, 189 Handle<String> subject,
190 int* offsets_vector, 190 int* offsets_vector,
191 int offsets_vector_length, 191 int offsets_vector_length,
192 int previous_index); 192 int previous_index,
193 Isolate* isolate);
193 194
194 // Compares two-byte strings case insensitively. 195 // Compares two-byte strings case insensitively.
195 // Called from generated RegExp code. 196 // Called from generated RegExp code.
196 static int CaseInsensitiveCompareUC16(Address byte_offset1, 197 static int CaseInsensitiveCompareUC16(Address byte_offset1,
197 Address byte_offset2, 198 Address byte_offset2,
198 size_t byte_length); 199 size_t byte_length,
200 Isolate* isolate);
199 201
200 // Called from RegExp if the backtrack stack limit is hit. 202 // Called from RegExp if the backtrack stack limit is hit.
201 // Tries to expand the stack. Returns the new stack-pointer if 203 // Tries to expand the stack. Returns the new stack-pointer if
202 // successful, and updates the stack_top address, or returns 0 if unable 204 // successful, and updates the stack_top address, or returns 0 if unable
203 // to grow the stack. 205 // to grow the stack.
204 // This function must not trigger a garbage collection. 206 // This function must not trigger a garbage collection.
205 static Address GrowStack(Address stack_pointer, Address* stack_top); 207 static Address GrowStack(Address stack_pointer, Address* stack_top,
208 Isolate* isolate);
206 209
207 static const byte* StringCharacterPosition(String* subject, int start_index); 210 static const byte* StringCharacterPosition(String* subject, int start_index);
208 211
209 // Byte map of ASCII characters with a 0xff if the character is a word 212 // Byte map of ASCII characters with a 0xff if the character is a word
210 // character (digit, letter or underscore) and 0x00 otherwise. 213 // character (digit, letter or underscore) and 0x00 otherwise.
211 // Used by generated RegExp code. 214 // Used by generated RegExp code.
212 static const byte word_character_map[128]; 215 static const byte word_character_map[128];
213 216
214 static Address word_character_map_address() { 217 static Address word_character_map_address() {
215 return const_cast<Address>(&word_character_map[0]); 218 return const_cast<Address>(&word_character_map[0]);
216 } 219 }
217 220
218 static Result Execute(Code* code, 221 static Result Execute(Code* code,
219 String* input, 222 String* input,
220 int start_offset, 223 int start_offset,
221 const byte* input_start, 224 const byte* input_start,
222 const byte* input_end, 225 const byte* input_end,
223 int* output); 226 int* output,
227 Isolate* isolate);
224 }; 228 };
225 229
226 #endif // V8_INTERPRETED_REGEXP 230 #endif // V8_INTERPRETED_REGEXP
227 231
228 } } // namespace v8::internal 232 } } // namespace v8::internal
229 233
230 #endif // V8_REGEXP_MACRO_ASSEMBLER_H_ 234 #endif // V8_REGEXP_MACRO_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/regexp-macro-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698