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

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

Issue 8343001: RegExpMacroAssembler::CheckStackGuardState should update input string pointer (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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/arm/regexp-macro-assembler-arm.cc ('k') | src/x64/regexp-macro-assembler-x64.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after
1134 start_index + slice_offset); 1134 start_index + slice_offset);
1135 1135
1136 if (start_address != new_address) { 1136 if (start_address != new_address) {
1137 // If there is a difference, update the object pointer and start and end 1137 // If there is a difference, update the object pointer and start and end
1138 // addresses in the RegExp stack frame to match the new value. 1138 // addresses in the RegExp stack frame to match the new value.
1139 const byte* end_address = frame_entry<const byte* >(re_frame, kInputEnd); 1139 const byte* end_address = frame_entry<const byte* >(re_frame, kInputEnd);
1140 int byte_length = static_cast<int>(end_address - start_address); 1140 int byte_length = static_cast<int>(end_address - start_address);
1141 frame_entry<const String*>(re_frame, kInputString) = *subject; 1141 frame_entry<const String*>(re_frame, kInputString) = *subject;
1142 frame_entry<const byte*>(re_frame, kInputStart) = new_address; 1142 frame_entry<const byte*>(re_frame, kInputStart) = new_address;
1143 frame_entry<const byte*>(re_frame, kInputEnd) = new_address + byte_length; 1143 frame_entry<const byte*>(re_frame, kInputEnd) = new_address + byte_length;
1144 } else if (frame_entry<const String*>(re_frame, kInputString) != *subject) {
1145 // Subject string might have been a ConsString that underwent
1146 // short-circuiting during GC. That will not change start_address but
1147 // will change pointer inside the subject handle.
1148 frame_entry<const String*>(re_frame, kInputString) = *subject;
1144 } 1149 }
1145 1150
1146 return 0; 1151 return 0;
1147 } 1152 }
1148 1153
1149 1154
1150 Operand RegExpMacroAssemblerIA32::register_location(int register_index) { 1155 Operand RegExpMacroAssemblerIA32::register_location(int register_index) {
1151 ASSERT(register_index < (1<<30)); 1156 ASSERT(register_index < (1<<30));
1152 if (num_registers_ <= register_index) { 1157 if (num_registers_ <= register_index) {
1153 num_registers_ = register_index + 1; 1158 num_registers_ = register_index + 1;
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
1276 } 1281 }
1277 1282
1278 1283
1279 #undef __ 1284 #undef __
1280 1285
1281 #endif // V8_INTERPRETED_REGEXP 1286 #endif // V8_INTERPRETED_REGEXP
1282 1287
1283 }} // namespace v8::internal 1288 }} // namespace v8::internal
1284 1289
1285 #endif // V8_TARGET_ARCH_IA32 1290 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm/regexp-macro-assembler-arm.cc ('k') | src/x64/regexp-macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698