OLD | NEW |
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 4453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4464 } | 4464 } |
4465 | 4465 |
4466 | 4466 |
4467 void RegExpExecStub::Generate(MacroAssembler* masm) { | 4467 void RegExpExecStub::Generate(MacroAssembler* masm) { |
4468 // Just jump directly to runtime if native RegExp is not selected at compile | 4468 // Just jump directly to runtime if native RegExp is not selected at compile |
4469 // time or if regexp entry in generated code is turned off runtime switch or | 4469 // time or if regexp entry in generated code is turned off runtime switch or |
4470 // at compilation. | 4470 // at compilation. |
4471 #ifdef V8_INTERPRETED_REGEXP | 4471 #ifdef V8_INTERPRETED_REGEXP |
4472 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); | 4472 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); |
4473 #else // V8_INTERPRETED_REGEXP | 4473 #else // V8_INTERPRETED_REGEXP |
4474 if (!FLAG_regexp_entry_native) { | |
4475 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); | |
4476 return; | |
4477 } | |
4478 | 4474 |
4479 // Stack frame on entry. | 4475 // Stack frame on entry. |
4480 // sp[0]: last_match_info (expected JSArray) | 4476 // sp[0]: last_match_info (expected JSArray) |
4481 // sp[4]: previous index | 4477 // sp[4]: previous index |
4482 // sp[8]: subject string | 4478 // sp[8]: subject string |
4483 // sp[12]: JSRegExp object | 4479 // sp[12]: JSRegExp object |
4484 | 4480 |
4485 static const int kLastMatchInfoOffset = 0 * kPointerSize; | 4481 static const int kLastMatchInfoOffset = 0 * kPointerSize; |
4486 static const int kPreviousIndexOffset = 1 * kPointerSize; | 4482 static const int kPreviousIndexOffset = 1 * kPointerSize; |
4487 static const int kSubjectOffset = 2 * kPointerSize; | 4483 static const int kSubjectOffset = 2 * kPointerSize; |
(...skipping 2535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7023 __ mov(result, zero_reg); | 7019 __ mov(result, zero_reg); |
7024 __ Ret(); | 7020 __ Ret(); |
7025 } | 7021 } |
7026 | 7022 |
7027 | 7023 |
7028 #undef __ | 7024 #undef __ |
7029 | 7025 |
7030 } } // namespace v8::internal | 7026 } } // namespace v8::internal |
7031 | 7027 |
7032 #endif // V8_TARGET_ARCH_MIPS | 7028 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |