OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1072 | 1072 |
1073 // Find the current start address of the same character at the current string | 1073 // Find the current start address of the same character at the current string |
1074 // position. | 1074 // position. |
1075 int start_index = frame_entry<int>(re_frame, kStartIndex); | 1075 int start_index = frame_entry<int>(re_frame, kStartIndex); |
1076 const byte* new_address = StringCharacterPosition(*subject, start_index); | 1076 const byte* new_address = StringCharacterPosition(*subject, start_index); |
1077 | 1077 |
1078 if (start_address != new_address) { | 1078 if (start_address != new_address) { |
1079 // If there is a difference, update the object pointer and start and end | 1079 // If there is a difference, update the object pointer and start and end |
1080 // addresses in the RegExp stack frame to match the new value. | 1080 // addresses in the RegExp stack frame to match the new value. |
1081 const byte* end_address = frame_entry<const byte* >(re_frame, kInputEnd); | 1081 const byte* end_address = frame_entry<const byte* >(re_frame, kInputEnd); |
1082 int byte_length = end_address - start_address; | 1082 int byte_length = static_cast<int>(end_address - start_address); |
1083 frame_entry<const String*>(re_frame, kInputString) = *subject; | 1083 frame_entry<const String*>(re_frame, kInputString) = *subject; |
1084 frame_entry<const byte*>(re_frame, kInputStart) = new_address; | 1084 frame_entry<const byte*>(re_frame, kInputStart) = new_address; |
1085 frame_entry<const byte*>(re_frame, kInputEnd) = new_address + byte_length; | 1085 frame_entry<const byte*>(re_frame, kInputEnd) = new_address + byte_length; |
1086 } | 1086 } |
1087 | 1087 |
1088 return 0; | 1088 return 0; |
1089 } | 1089 } |
1090 | 1090 |
1091 | 1091 |
1092 Operand RegExpMacroAssemblerX64::register_location(int register_index) { | 1092 Operand RegExpMacroAssemblerX64::register_location(int register_index) { |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1283 Operand(rsi, rdi, times_1, cp_offset * sizeof(uc16))); | 1283 Operand(rsi, rdi, times_1, cp_offset * sizeof(uc16))); |
1284 } | 1284 } |
1285 } | 1285 } |
1286 } | 1286 } |
1287 | 1287 |
1288 #undef __ | 1288 #undef __ |
1289 | 1289 |
1290 #endif // V8_NATIVE_REGEXP | 1290 #endif // V8_NATIVE_REGEXP |
1291 | 1291 |
1292 }} // namespace v8::internal | 1292 }} // namespace v8::internal |
OLD | NEW |