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

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

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

Powered by Google App Engine
This is Rietveld 408576698