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 3366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3377 } | 3377 } |
3378 | 3378 |
3379 | 3379 |
3380 void RegExpExecStub::Generate(MacroAssembler* masm) { | 3380 void RegExpExecStub::Generate(MacroAssembler* masm) { |
3381 // Just jump directly to runtime if native RegExp is not selected at compile | 3381 // Just jump directly to runtime if native RegExp is not selected at compile |
3382 // time or if regexp entry in generated code is turned off runtime switch or | 3382 // time or if regexp entry in generated code is turned off runtime switch or |
3383 // at compilation. | 3383 // at compilation. |
3384 #ifdef V8_INTERPRETED_REGEXP | 3384 #ifdef V8_INTERPRETED_REGEXP |
3385 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); | 3385 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); |
3386 #else // V8_INTERPRETED_REGEXP | 3386 #else // V8_INTERPRETED_REGEXP |
3387 if (!FLAG_regexp_entry_native) { | |
3388 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); | |
3389 return; | |
3390 } | |
3391 | 3387 |
3392 // Stack frame on entry. | 3388 // Stack frame on entry. |
3393 // esp[0]: return address | 3389 // esp[0]: return address |
3394 // esp[4]: last_match_info (expected JSArray) | 3390 // esp[4]: last_match_info (expected JSArray) |
3395 // esp[8]: previous index | 3391 // esp[8]: previous index |
3396 // esp[12]: subject string | 3392 // esp[12]: subject string |
3397 // esp[16]: JSRegExp object | 3393 // esp[16]: JSRegExp object |
3398 | 3394 |
3399 static const int kLastMatchInfoOffset = 1 * kPointerSize; | 3395 static const int kLastMatchInfoOffset = 1 * kPointerSize; |
3400 static const int kPreviousIndexOffset = 2 * kPointerSize; | 3396 static const int kPreviousIndexOffset = 2 * kPointerSize; |
(...skipping 3593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6994 | 6990 |
6995 // Fall through when we need to inform the incremental marker. | 6991 // Fall through when we need to inform the incremental marker. |
6996 } | 6992 } |
6997 | 6993 |
6998 | 6994 |
6999 #undef __ | 6995 #undef __ |
7000 | 6996 |
7001 } } // namespace v8::internal | 6997 } } // namespace v8::internal |
7002 | 6998 |
7003 #endif // V8_TARGET_ARCH_IA32 | 6999 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |