| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 2630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2641 // The original subject is in the previous stack frame. Therefore we have to | 2641 // The original subject is in the previous stack frame. Therefore we have to |
| 2642 // use rbp, which points exactly to one pointer size below the previous rsp. | 2642 // use rbp, which points exactly to one pointer size below the previous rsp. |
| 2643 // (Because creating a new stack frame pushes the previous rbp onto the stack | 2643 // (Because creating a new stack frame pushes the previous rbp onto the stack |
| 2644 // and thereby moves up rsp by one kPointerSize.) | 2644 // and thereby moves up rsp by one kPointerSize.) |
| 2645 __ movq(arg_reg_1, r15); | 2645 __ movq(arg_reg_1, r15); |
| 2646 | 2646 |
| 2647 // Locate the code entry and call it. | 2647 // Locate the code entry and call it. |
| 2648 __ addq(r11, Immediate(Code::kHeaderSize - kHeapObjectTag)); | 2648 __ addq(r11, Immediate(Code::kHeaderSize - kHeapObjectTag)); |
| 2649 __ call(r11); | 2649 __ call(r11); |
| 2650 | 2650 |
| 2651 __ LeaveApiExitFrame(); | 2651 __ LeaveApiExitFrame(true); |
| 2652 | 2652 |
| 2653 // Check the result. | 2653 // Check the result. |
| 2654 Label success; | 2654 Label success; |
| 2655 Label exception; | 2655 Label exception; |
| 2656 __ cmpl(rax, Immediate(1)); | 2656 __ cmpl(rax, Immediate(1)); |
| 2657 // We expect exactly one result since we force the called regexp to behave | 2657 // We expect exactly one result since we force the called regexp to behave |
| 2658 // as non-global. | 2658 // as non-global. |
| 2659 __ j(equal, &success, Label::kNear); | 2659 __ j(equal, &success, Label::kNear); |
| 2660 __ cmpl(rax, Immediate(NativeRegExpMacroAssembler::EXCEPTION)); | 2660 __ cmpl(rax, Immediate(NativeRegExpMacroAssembler::EXCEPTION)); |
| 2661 __ j(equal, &exception); | 2661 __ j(equal, &exception); |
| (...skipping 3979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6641 __ bind(&fast_elements_case); | 6641 __ bind(&fast_elements_case); |
| 6642 GenerateCase(masm, FAST_ELEMENTS); | 6642 GenerateCase(masm, FAST_ELEMENTS); |
| 6643 } | 6643 } |
| 6644 | 6644 |
| 6645 | 6645 |
| 6646 #undef __ | 6646 #undef __ |
| 6647 | 6647 |
| 6648 } } // namespace v8::internal | 6648 } } // namespace v8::internal |
| 6649 | 6649 |
| 6650 #endif // V8_TARGET_ARCH_X64 | 6650 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |